-
Notifications
You must be signed in to change notification settings - Fork 17
adding a new function for reconciling confirmations map in the connector interface #148
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
Merged
peterbroadhurst
merged 12 commits into
hyperledger:main
from
kaleido-io:expose-reconcile-confirmation-map
Oct 27, 2025
Merged
adding a new function for reconciling confirmations map in the connector interface #148
peterbroadhurst
merged 12 commits into
hyperledger:main
from
kaleido-io:expose-reconcile-confirmation-map
Oct 27, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
7bc7bb8 to
07127ff
Compare
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
EnriqueL8
reviewed
Sep 15, 2025
Contributor
EnriqueL8
left a comment
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.
A few thoughts
Chengxuan
commented
Sep 15, 2025
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
Chengxuan
commented
Oct 3, 2025
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
Comment on lines
+98
to
+112
| type ConfirmationUpdateResult struct { | ||
| // a linked list of accumulated confirmations for a transaction | ||
| // the list is sorted by block number | ||
| // - the first block is the block that contains the transaction hash | ||
| // - the last block is the most recent confirmation | ||
| // this list can be used as input to the future reconcile request to avoid re-fetching the blocks if they are no longer | ||
| // in the in-memory partial chain | ||
| // WARNING: mutation to this list is not expected, invalid modifications will cause inefficiencies in the reconciliation process | ||
| // `rebuilt` will be true if an invalid confirmation list is detected by the reconciliation process | ||
| Confirmations []*MinimalBlockInfo `json:"confirmations,omitempty"` | ||
| Rebuilt bool `json:"rebuilt,omitempty"` // when true, it means the existing confirmations contained invalid blocks, the new confirmations are rebuilt from scratch | ||
| NewFork bool `json:"newFork,omitempty"` // when true, it means a new fork was detected based on the existing confirmations | ||
| Confirmed bool `json:"confirmed,omitempty"` // when true, it means the confirmation list is complete and the transaction is confirmed | ||
| TargetConfirmationCount uint64 `json:"targetConfirmationCount"` // the target number of confirmations for this reconcile request | ||
| } |
Contributor
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.
Nice clear comments thank you 👍
peterbroadhurst
approved these changes
Oct 27, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Exposing a method to allow confirmation map building using the in-memory canonical chain in the connector for efficient confirmation calculation of any given tx hash.
The new approach is similar to the existing confirmation manager, but with the following differences:
The in-memory canonical chain will be used to build up the confirmations when it contains required blocks, then fall back to existing blocks that get passed into the reconciler. Finally query the targeting JSON-RPC endpoint.
More details in the firefly-evmconnect PR: hyperledger/firefly-evmconnect#174