-
Notifications
You must be signed in to change notification settings - Fork 198
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
Use TxnManager
for onchain transactions
#164
Conversation
5bc6b43
to
0c9760e
Compare
if err != nil { | ||
return nil, fmt.Errorf("HandleSingleBatch: error getting batch header hash: %w", err) | ||
} | ||
batchID, err := b.getBatchID(ctx, txnReceipt) |
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.
This function requests a new receipt if the previous one doesn't contain the logs. Are the logs the only thing that may not be populated? I see that we are using the TxHash
on L258. Assuming this will always be populated.
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.
Yes, TxHash
will be populated as long as the txn has been published.
I've seen logs
missing intermittently in some RPC endpoints when receipt is retrieved too soon
@@ -44,7 +44,7 @@ func (c *BatchConfirmer) ConfirmBatch(ctx context.Context, header *core.BatchHea | |||
ctxWithTimeout, cancel := context.WithTimeout(ctx, c.timeout) | |||
defer cancel() | |||
for i := 0; i < maxRetries; i++ { | |||
txReceipt, err = c.Transactor.ConfirmBatch(ctxWithTimeout, *header, quorums, *sigAgg) | |||
txReceipt, err = c.Transactor.ConfirmBatch(ctxWithTimeout, header, quorums, sigAgg) |
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.
Looks like maybe we can remove this object?
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.
Yes, I'm planning on removing BatchConfirmer entirely once we've tested and validated TxnManager
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.
Looks good to me. Just a few questions.
0c9760e
to
541dcfc
Compare
Why are these changes needed?
TxnManager
to wait for transactions in a separate goroutinesconfirmationInfo
is updated in a separate goroutine as transaction receipt is now received asynchronouslyTODOs In following PRs:
TxnManager
Checks