Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gateway overview edited #3042
Gateway overview edited #3042
Changes from all commits
ed77469
6c8bfc1
d8483f6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"However, if the inclusion of an organization violates a required endorsement policy, then the transaction is invalidated by all of the requested endorsing peers."
"inclusion of an organization" is awkward here. It would be better to say something like "if the specified endorsing organizations violates the endorsement policy"...
Also, "then the transaction is invalidated by all of the requested endorsing peers" is not correct. The endorsing peers will successfully return a proposal response. Once the transaction gets included in a block, EVERY peer on the channel (not just the endorsing peers) will invalidate the transaction and not update its state database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there's this concept of a "plan" when there are multiple endorsement policies that must pass. I think just referencing multiple policies is easier to digest than an additional concept. Here you say "the endorsement policy" as if there is only one policy, please confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what is the proposal response in this case of failure for one or more of the endorsement policies. failed, e.g.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"if the specified endorsing organizations violates the endorsement policy"... we're talking about the mere selection of a given org as violating a policy right. So it's the "selection" of an org, right, not something the selected org. would then do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we currently have this:
In some cases, a client application must explicitly select the organizations to evaluate or endorse a transaction proposal. For example, transient data often contains personal or sensitive information which must be written only to a private data collection, thereby limiting the pool of endorsement organizations. In these cases, the client application can explicitly specify the endorsing organizations; the gateway will then select the (available) endorsing peer with the highest block count from each organization. However, if the selection of one or more endorsing organizations violates an endorsement policy, then the transaction is invalidated by all peers in the channel. This failed endorsement is recorded on the ledger but the transaction is not written to the state database on any channel peer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, one transaction may have multiple endorsement policies due to chaincode-level, collection-level, and state-based endorsement policies. All of these have to be satisfied for the transaction to be validated. Sometimes we refer to this whole set as the endorsement policy of the transaction as a whole.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember, endorsement policy is not checked until validation/commit time later. The proposal and proposal response are ignorant of the endorsement policy. The gateway peer however does inspect the first proposal response and work with discovery service to identify the endorsement policy of the transaction and route the proposal to the required organization's peers.