* feat: add system config consensus to deprecate poa
* fix: check extra field lens
* Finish implementation with one signer only
* Implement unit tests
* Only check signature if block not requested
* Remove Extra from rlp encoding (and hashing)
* Implement UpgradableEngine as middleware for Clique/SystemContract
* Use isEuclid, add json tag to Requested, make go idiomatic
* Changes post integration test
* Remove comment
* Address comments
* Merge
* New field BlockSignature (not used in hashing/JSON)
* Enforce .Extra to be an empty slice
* replace header.Requested for header.IsNewBlock
* mark new block as IsNewBlock
* Make new RLP optional fields always default for legacy/reth compatibility
* Placing new fields as last non-zero rlp:optional values used by Scroll
* Penalize nodes that send non-zero Euclid V2 header field values
* Bring back .Requested to downloader instead of .IsNewBlock
* Replace IsNewBlock for Requested
* Address comments
* merge
* prevent timing issues in tests
* fix ci
* chore: auto version bump [bot]
* Update consensus/system_contract/consensus.go
Co-authored-by: Morty <70688412+yiweichi@users.noreply.github.com>
* chore: auto version bump [bot]
* Update consensus/system_contract/consensus.go
Co-authored-by: Jonas Theis <4181434+jonastheis@users.noreply.github.com>
* Remove whitespaces and merge version number
* chore: auto version bump [bot]
* validate that the read address from L1 is not empty and improved error handling when fetching address
* Fix indentation issue
* Fix test
* goimports fix
* goimports
---------
Co-authored-by: Alejandro Ranchal-Pedrosa <a.ranchalpedrosa@gmail.com>
Co-authored-by: jonastheis <4181434+jonastheis@users.noreply.github.com>
Co-authored-by: jonastheis <jonastheis@users.noreply.github.com>
Co-authored-by: ranchalp <ranchalp@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* port changes from #1013
* port changes from #1068
* go.mod tidy
* fix compile error
* fix goimports
* fix log
* address review comments
* upgrade golang.org/x/net to 0.23.0
* port changes from #1018
* fix tests and linter errors
* address review comments
* refactor rollup sync service / verifier to use CalldataBlobSource to retrieve data from L1
* add configuration and initialize blob clients
* fix unit tests
* remove unused code
* address review comments
* address more review comments
* implement first version of new da-codec and to handle multiple batches submitted in one transaction
* add CommitBatchDAV7 and handle multiple commit events submitted in a single transactions
* fix bug due to previous batch being empty when processing the first batch within a set of batches
* Allow using MPT
* update to latest da-codec
* add field to CommittedBatchMeta to store LastL1MessageQueueHash for CodecV7 batches
* adjust rollup verifier to support CodecV7 batches
* address review comments
* fix issues after merge
* go mod tidy
* fix unit tests
* update da-codec
* add test TestValidateBatchCodecV7
* go mod tidy
* do not log error on shutdown
* add sanity check for version to deserialization of committedBatchMetaV7
* port changes from #1073
* chore: auto version bump [bot]
* address review comments
* add more logs
* disable ENRUpdater if DA sync mode is enabled
* exit pipeline if context is cancelled
* correctly handle override by setting the head of the chain to the parent's height so that created blocks will always become part of canonical chain
* fix error with genesis event being nil
* rebase #1087 to new base branch
* chore: auto version bump [bot]
---------
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
Co-authored-by: jonastheis <jonastheis@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* port changes from #1013
* port changes from #1068
* go.mod tidy
* fix compile error
* fix goimports
* fix log
* address review comments
* upgrade golang.org/x/net to 0.23.0
* port changes from #1018
* fix tests and linter errors
* address review comments
* refactor rollup sync service / verifier to use CalldataBlobSource to retrieve data from L1
* add configuration and initialize blob clients
* fix unit tests
* remove unused code
* address review comments
* address more review comments
* implement first version of new da-codec and to handle multiple batches submitted in one transaction
* add CommitBatchDAV7 and handle multiple commit events submitted in a single transactions
* fix bug due to previous batch being empty when processing the first batch within a set of batches
* Allow using MPT
* update to latest da-codec
* add field to CommittedBatchMeta to store LastL1MessageQueueHash for CodecV7 batches
* adjust rollup verifier to support CodecV7 batches
* address review comments
* fix issues after merge
* go mod tidy
* fix unit tests
* update da-codec
* add test TestValidateBatchCodecV7
* go mod tidy
* do not log error on shutdown
* add sanity check for version to deserialization of committedBatchMetaV7
* port changes from #1073
* chore: auto version bump [bot]
* address review comments
* add more logs
* disable ENRUpdater if DA sync mode is enabled
* exit pipeline if context is cancelled
* correctly handle override by setting the head of the chain to the parent's height so that created blocks will always become part of canonical chain
* fix error with genesis event being nil
* chore: auto version bump [bot]
* chore: auto version bump [bot]
* goimports
---------
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
Co-authored-by: jonastheis <jonastheis@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* feat: add EIP-7702
* fix goimport
* add unit tests
* add api test
* sync txpool update
* update generated code
* make code readable
* fix goimport
* fix TestAsyncChecker unit test
* add AuthorizationList in fuzz tests for completeness sake
* add EuclidV2 test, EIP-7702 transaction in TestT8n
* clean up logs
* bump version
* fix TestAsyncChecker
* Revert "fix TestAsyncChecker"
This reverts commit 314478303d4a504a3948bd6595568916ba7d82f0.
* accept eip-7702 txns only after enabling eip-7702
* revert IntrinsicGas param name from setCodeAuthorizations to authList
* fix a bug
* align upstream implementation in Encoding Receipts
* fix one test case
* fix tracer
* return precode copy
* support setcode tx in EstimateGas and add unit tests
* add TestValidateAuthorizations
* poseidon hash fix
* migrate a fix before the fix pr is merged
* support setcode type transactions in TransactionData
* chore: auto version bump [bot]
* add a nonce-gapped-auth-does-not-block-pending-tx unit test
* make the auth invalid
* Apply suggestions from code review
* change usedAndLeftSlots and knownConflicts to util functions
* add comments about different return of applyAuthorization
* remove gencodec:required in transaction signatures
* fix goimport
* update StructLogger and AccessListTracer
* fix a bug
* fix flaky test
---------
Co-authored-by: colinlyguo <colinlyguo@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* port changes from #1013
* port changes from #1068
* go.mod tidy
* fix compile error
* fix goimports
* fix log
* address review comments
* upgrade golang.org/x/net to 0.23.0
* port changes from #1018
* fix tests and linter errors
* address review comments
* refactor rollup sync service / verifier to use CalldataBlobSource to retrieve data from L1
* add configuration and initialize blob clients
* fix unit tests
* remove unused code
* address review comments
* address more review comments
* implement first version of new da-codec and to handle multiple batches submitted in one transaction
* add CommitBatchDAV7 and handle multiple commit events submitted in a single transactions
* fix bug due to previous batch being empty when processing the first batch within a set of batches
* Allow using MPT
* implement reading of QueueTransaction from L1MessageQueueV1 and V2
* implement access to V1 and V2 messages and replace usage so that V1 is used before EuclidV2 fork and V2 afterward
* add tests
* update to latest da-codec
* add field to CommittedBatchMeta to store LastL1MessageQueueHash for CodecV7 batches
* adjust rollup verifier to support CodecV7 batches
* address review comments
* consume all L1 messages before EuclidV2 fork
* address review comments
* address review comments
* fix issues after merge
* go mod tidy
* fix unit tests
* update da-codec
* add test TestValidateBatchCodecV7
* go mod tidy
* do not log error on shutdown
* add flag to explicitly disable L1MessageQueueV2
* add TestEuclidV2HardForkMessageQueue to scroll worker
* add sanity check for version to deserialization of committedBatchMetaV7
* add mechanism for nodes to retrieve V2 messages even if they upgrade after L1MessageQueueV2 is deployed
* chore: auto version bump [bot]
* address review comments
* Update core/rawdb/accessors_l1_message.go
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
* address review comments
---------
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* port changes from #1013
* port changes from #1068
* go.mod tidy
* fix compile error
* fix goimports
* fix log
* address review comments
* upgrade golang.org/x/net to 0.23.0
* port changes from #1018
* fix tests and linter errors
* address review comments
* refactor rollup sync service / verifier to use CalldataBlobSource to retrieve data from L1
* add configuration and initialize blob clients
* fix unit tests
* remove unused code
* address review comments
* address more review comments
* Allow using MPT
* fix issues after merge
* bump version
---------
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* fix(GPO): increase min suggested tip to 100 wei
* chore: auto version bump [bot]
* make DefaultGasTip configurable
* revert a comment change
* fix unit tests
* rename GasTip to GasTipCap, more consistent with geth naming conventions
* yet another comment tweak
* tweak
* address comments
* another
* make defaultGasTipCap.Int64 >0
---------
Co-authored-by: colinlyguo <colinlyguo@users.noreply.github.com>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com>
Co-authored-by: Xi Lin <zimpha@gmail.com>
* feat(tx-pool): fast reject known skipped txs (#1001)
* feat(tx-pool): fast reject known skipped txs
* fix make lint
* add miner flag to tx pool
* bump version
* Implement functionality to reset gas price / suggested tip to minimal value when there's no congestion
* Add flags to configure congestion value and initialize gas price oracle accordingly
* Fix and add tests to make sure GPO works as expected depending on pre- or post-Curie (EIP 1559) upgrade
* Apply review suggestions
* chore: auto version bump [bot]
---------
Co-authored-by: omerfirmak <omerfirmak@users.noreply.github.com>
* update fee calculation
* add missing GPO slots to trace
* add placeholder for contract update logic
* nit
* update fee calculation
* update formula
* update GPO slots
* update L1GPO bytecode
* apply Curie in new worker
* move bytecode to config
* create an empty block for curie hard fork
* initialize L1GasPriceOracle storage slots
* add comments
* add test
* add IsCurie to traces and tests
* group GPO storage slots into a struct
* update unit test
* chore: auto version bump [bot]
* trigger ci
* update bytecode
* remove leading 0x
* update comments
* include rollup fee tests in CI
---------
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
* all: implement EIP-1153 transient storage (#26003)
Implements TSTORE and TLOAD as specified by the following EIP:
https://eips.ethereum.org/EIPS/eip-1153https://ethereum-magicians.org/t/eip-1153-transient-storage-opcodes/553
Co-authored-by: Sara Reynolds <snreynolds2506@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core/vm: move TSTORE,TLOAD to correct opcode nums (#27613)
* core/vm: move TSTORE,TLOAD to correct opcode nums
* core/vm: cleanup
* fix tests, rename
* goimports
* enable 1153 at Curie
* bump version
* comment fix
* improve test
* version
* testchainconfig
* fix another test that affects newly added
* fix previous test to clenaup after
---------
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Sara Reynolds <snreynolds2506@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* feat: re-enable EIP-1559 in Banach hard fork
* enable BASEFEE opcode
* do not double gas limit on Banach fork block
* do not burn base fee
* update base fee calculation logic
* fix gas price oracle
* fix ethapi backend
* typo
* reorder worker code
* update genesis base fee
* add MaximumL2BaseFee
* add base fee metrics
* handle nil base fee
* revert state-transition change
* bump version
* remove TODO
* update test
* fix typo
* fix typo
* update traces
* fix test
* update london to banach
* handle error
* bump version
* bump version
* feat: configure max block range for eth_getLogs (#521)
* configure max block range for eth_getLogs
* bump version
* address comments, add test
* set default value
* address comments
* fix golint
* Update cmd/utils/flags.go
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
---------
Co-authored-by: colinlyguo <colinlyguo@scroll.io>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
* set dafault maxblockrange to -1 and fix nil pointer bug
* update version
* change error logic
* check for range in filter
* Update eth/ethconfig/config.go
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
* adjust error message
* fix duplicate version
---------
Co-authored-by: colinlyguo <colinlyguo@scroll.io>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* configure max block range for eth_getLogs
* bump version
* address comments, add test
* set default value
* address comments
* fix golint
* Update cmd/utils/flags.go
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
---------
Co-authored-by: colinlyguo <colinlyguo@scroll.io>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
* add sepolia flag and configuration
* bump patch version
* Update params/version.go
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* Update params/config.go
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* Update params/config.go
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* explicitly set l1.confirmations and l1.sync.startblock for sepolia
* update config
---------
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* core/vm: implement EIP-3860: Limit and meter initcode (#23847)
Implementation of https://eips.ethereum.org/EIPS/eip-3860, limit and meter initcode. This PR enables EIP-3860 as part of the Shanghai fork.
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* add ishanghai
* fix test
* fix
---------
Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* update go version
* update go version
* format code by goimports
* format code by goimports
* go mod tidy
* update go version
* update go version
* upgrade linter
* add exclude rule
* fix golangci exclude
---------
Co-authored-by: vincent <419436363@qq.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>