-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add a boolean field to tx receipt object indicating if the tx was timeboosted #369
Conversation
…osted-receiptsfield
if txIndex >= maxTxCount { | ||
return false, nil | ||
} | ||
return b[1+(txIndex/8)]&(1<<(txIndex%8)) != 0, nil |
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 line needs a comment.
8 seems like a magical number and it isn't clear how the bitwise & is checking if the transaction was timeboosted or not.
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.
I agree. Currently the explanation for this exists on the sequencer side where blockMetadata originates https://github.com/OffchainLabs/nitro/blob/071aa54de1a8c2f510b5d11835bad9124eb38f37/execution/gethexec/executionengine.go#L615-L619 but having it here as well is a good idea
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.
LGTM
This PR introduces a new field to the receipts object/s returned by
eth_getTransactionReceipt
andeth_getBlockReceipts
, indicating whether a transaction was timeboosted or not. This field is a boolean named astimeboosted
.The PR is based of of
wasm-store-compile-target
branch (revived) instead of master because the current main Timeboost PR's geth pin is pointing to this branch and we do this to be in sync with the main PR.Corresponding nitro PR- OffchainLabs/nitro#2760
Resolves NIT-2836