feat: add batch-tx submitter custom encoding and test vectors#1728
feat: add batch-tx submitter custom encoding and test vectors#1728mslipper merged 5 commits intoethereum-optimism:developfrom
Conversation
🦋 Changeset detectedLatest commit: 272d20d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
@@ Coverage Diff @@
## develop #1728 +/- ##
========================================
Coverage 71.99% 71.99%
========================================
Files 70 70
Lines 2321 2321
Branches 346 346
========================================
Hits 1671 1671
Misses 650 650
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
go/batch-submitter/batch-tx/batch.go
Outdated
There was a problem hiding this comment.
We should check to make sure there is a tx in the block to prevent a panic here, the genesis block won't have a tx in it
There was a problem hiding this comment.
afaict the genesis block is explicitly skipped by setting BLOCK_OFFSET=1, so we should never process it?
c966b25 to
cff1f31
Compare
ffe89bb to
777b91e
Compare
There was a problem hiding this comment.
Confirming that this is an empty transaction:
$ rlp decode 0xc9808080808080808080
[
'', '', '', '', '',
'', '', '', ''
]
There was a problem hiding this comment.
yes, i just used the most minimal txn possible for the test vectors. we could add more complicated ones, plus invalid ones for negative test vectors.
|
Can you add changesets? |
da42066 to
8706d07
Compare
4ce2b3b to
272d20d
Compare
Description
This PR implements the batch-tx calldata encoding and AppendSequencerBatchParams construction in the
go/batch-submitterpackage. The serialization test vectors are also committed in JSON, which will offer a language-agnostic test suite for the expected behavior captured in the final batch submitter spec.Additional Context
In order to import both L1 and L2 geth into the same binary, the
l2gethpackage name had to be changed to avoid a naming collision. The first commit modifies thel2gethgo.modname, and updates the entire project's import paths. The batch-submitter's package name is also corrected, as the original had a typo.Metadata