Adds L1RollupTxId on Transaction and Transaction-related objects#10
Conversation
There was a problem hiding this comment.
Nice! It seems like it's not actually hard to update a crazy number of values all at once in Geth! I still need to review the Typescript side of things but this side looks super non-controversially reasonable.
Left a question but overall this PR LGTM! Woot! And big fan of the naming
|
|
||
| func (api *RetestethAPI) BlockNumber(ctx context.Context) (uint64, error) { | ||
| //fmt.Printf("BlockNumber, response: %d\n", api.blockNumber) | ||
| //fmt.Printf("SubmissionNumber, response: %d\n", api.blockNumber) |
There was a problem hiding this comment.
What was the reason for the rename?
There was a problem hiding this comment.
Ahh I see now -- renaming blockNumber to SubmissionNumber -- nice! Agreed it seems like a better word
| Timestamp *hexutil.Uint64 `json:"timestamp"` | ||
| BlockNumber *hexutil.Uint64 `json:"blockNumber"` | ||
| Batches [][]*RollupTransaction `json:"batches"` | ||
| type GethSubmission struct { |
There was a problem hiding this comment.
Am I right that the L1RollupTxId is what allows us to tie L1->L2 txs for instance to the outputs of Geth? And we need it because the tx hash isn't valid if the tx that gets processed can't be decoded?
There was a problem hiding this comment.
Yes on the first part, and yeah, that's one of the reasons on the second part. We need a unique identifier for transactions we pull from L1 queues, and unfortunately tx hash can't be. Like you said, someone could submit an incorrectly formatted and therefore invalid transaction, someone could submit the exact same transaction twice, etc.
As a nice plus, presence or absence of this field in an L2 Tx Output lets us know with certainty where the tx originated (in an L1 queue or from a tx that has never been posted to L1, respectively)
…pi.go. Signing key and endpoint will be removed when go handles batch fetching
* Adding L1RollupTxId field to Transactions * Adding rollup transactions signing key config and bug fixing within api.go. Signing key and endpoint will be removed when go handles batch fetching
* Adding L1RollupTxId field to Transactions * Adding rollup transactions signing key config and bug fixing within api.go. Signing key and endpoint will be removed when go handles batch fetching
Description
Adds L1RollupTxId on Transactions and adjusts the SendBlockBatches endpoint to be SendRollupTransactions to make more sense.
Metadata
Fixes
Contributing Agreement