Skip to content
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

Merge nitro v2.3.4 (rc3) #222

Merged
merged 335 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
335 commits
Select commit Hold shift + click to select a range
749d487
fix race in system tests
ganeshvanahalli Feb 15, 2024
26c24f0
try fixing race in CI test
ganeshvanahalli Feb 15, 2024
a069bf1
Update nitro-testnode to add beacon client URL
PlasmaPower Feb 15, 2024
d3203f7
disable test for race
ganeshvanahalli Feb 15, 2024
e1f5484
Merge branch 'master' into require-beacon-client-rpc
PlasmaPower Feb 15, 2024
58f83c5
Bump testnode pin to disable blob reader there
PlasmaPower Feb 15, 2024
7c81f34
Merge remote-tracking branch 'origin/master' into testnode-update
tsahee Feb 15, 2024
c341182
system_tests: fix initialization of default value of MaxRecreateState…
magicxyyz Feb 16, 2024
308fd45
Merge branch 'master' into require-beacon-client-rpc
PlasmaPower Feb 16, 2024
2e5db55
Merge pull request #2148 from OffchainLabs/require-beacon-client-rpc
PlasmaPower Feb 16, 2024
107190f
Add consensus-v20 to Dockerfile
PlasmaPower Feb 20, 2024
ab9699e
Seq-coordinator-manager should handle uninitialized redis
ganeshvanahalli Feb 20, 2024
e62cc57
Merge pull request #2153 from OffchainLabs/docker-consensus-v20
PlasmaPower Feb 20, 2024
59876e0
Merge branch 'master' into finalize-arbos-20
PlasmaPower Feb 20, 2024
3e14543
Merge pull request #2111 from OffchainLabs/finalize-arbos-20
PlasmaPower Feb 20, 2024
15a0926
Unified interface for Data Availability providers
ganeshvanahalli Feb 20, 2024
3295032
resolve conflict and address PR comments
ganeshvanahalli Feb 21, 2024
5559118
update geth
magicxyyz Feb 22, 2024
ab310ac
Merge branch 'master' into state-release
magicxyyz Feb 22, 2024
cb1e663
address PR comments
ganeshvanahalli Feb 22, 2024
514edfe
bug fix
ganeshvanahalli Feb 22, 2024
251abe0
update blocks reexecutor
magicxyyz Feb 23, 2024
41ebf43
update geth
magicxyyz Feb 23, 2024
22fa881
uncomment testing defaults in recreate state tests
magicxyyz Feb 23, 2024
58e4b50
Merge pull request #2155 from OffchainLabs/unified-da-provider-interface
ganeshvanahalli Feb 23, 2024
61c8c52
Avoid freq switch of non-4844 to 4844 batch post
Tristan-Wilson Feb 25, 2024
bc76c20
Update cmd/deploy/deploy.go
ganeshvanahalli Feb 25, 2024
7f1678f
Merge branch 'master' into bump-contracts-pin
ganeshvanahalli Feb 25, 2024
49ec18c
Merge branch 'master' into state-release
magicxyyz Feb 27, 2024
ee599c2
Ignore Blob errors, sort returned methods list in Get4ByteMethodSigna…
anodar Feb 27, 2024
8683407
Merge pull request #2127 from OffchainLabs/bump-contracts-pin
ganeshvanahalli Feb 27, 2024
830e7e3
Merge branch 'master' into testnode-update
joshuacolvin0 Feb 27, 2024
99f8e6b
Remove chrome from testnode
joshuacolvin0 Feb 27, 2024
8757d0c
Merge pull request #2132 from OffchainLabs/testnode-update
joshuacolvin0 Feb 27, 2024
eb21ea5
Merge branch 'master' into unsupportedtxs-system-test
ganeshvanahalli Feb 27, 2024
1d5ec87
Merge branch 'master' into batch-4844-hysteresis
Tristan-Wilson Feb 27, 2024
bd7ffa1
Merge pull request #2140 from OffchainLabs/unsupportedtxs-system-test
ganeshvanahalli Feb 27, 2024
a1adf6e
Merge branch 'master' into batch-4844-hysteresis
Tristan-Wilson Feb 27, 2024
3d6630f
Merge branch 'master' into scm-handle-unset-prioritieskey
joshuacolvin0 Feb 27, 2024
3777f92
Merge pull request #2154 from OffchainLabs/scm-handle-unset-prioritie…
joshuacolvin0 Feb 27, 2024
d5a66c3
Add option for beacon auth header
Tristan-Wilson Feb 28, 2024
b6ef4d0
Merge pull request #2162 from OffchainLabs/beacon-auth-header
PlasmaPower Feb 28, 2024
552837e
Merge branch 'master' into dont-force-delayed
PlasmaPower Feb 28, 2024
5dab604
Merge pull request #2079 from OffchainLabs/dont-force-delayed
PlasmaPower Feb 28, 2024
507b780
Log a warning whenever we don’t do the next validation because we’re …
ganeshvanahalli Feb 28, 2024
3299982
Merge branch 'master' into batch-4844-hysteresis
Tristan-Wilson Feb 28, 2024
dd4e192
Properly support replace by fee for blob txs
PlasmaPower Feb 28, 2024
610d0be
Simplify impl of batch type switching logic
Tristan-Wilson Feb 28, 2024
8a52c76
Merge pull request #2158 from OffchainLabs/batch-4844-hysteresis
Tristan-Wilson Feb 28, 2024
e7cdfcd
New batch bidding model
PlasmaPower Feb 29, 2024
b68d5b2
Require rbf meets parent chain minimum fees
PlasmaPower Feb 29, 2024
9677a33
Remove out of date TODO comment
PlasmaPower Feb 29, 2024
25aeaf8
Merge branch 'master' into data-poster-blob-rbf
PlasmaPower Feb 29, 2024
9c90fda
Merge branch 'master' into fuzzer-ignore-errors
anodar Feb 29, 2024
851c15b
Return early from fuzzer if batch starts with L1AuthenticatedMessageH…
anodar Feb 29, 2024
5597e62
Merge remote-tracking branch 'refs/remotes/origin/fuzzer-ignore-error…
anodar Feb 29, 2024
51c3cf5
Merge branch 'master' into blockvalidator-lowonmemory-warning
ganeshvanahalli Feb 29, 2024
7bc9a6e
Merge pull request #2163 from OffchainLabs/blockvalidator-lowonmemory…
ganeshvanahalli Feb 29, 2024
60eb342
Don't fill in cumulative weight for old queued txs
PlasmaPower Feb 29, 2024
80f61c8
Add separate blob tx replacement times
PlasmaPower Mar 1, 2024
bd529c1
Add debug log for fee and tip cap calculation
PlasmaPower Mar 1, 2024
8b39fba
Fix variables in rbf fee calculations
PlasmaPower Mar 1, 2024
3db7246
Make sure tip is calculated before basefee blobfee split
PlasmaPower Mar 1, 2024
b5f2bf2
Fix baseFeeCostIncrease calculation
PlasmaPower Mar 1, 2024
833d758
Verify that --chain.info-json is compatible with deployed chain confi…
ganeshvanahalli Mar 1, 2024
8e8f8c5
Save Blob data as fetched from beaconURL to disk
ganeshvanahalli Mar 1, 2024
1891599
Merge branch 'master' into data-poster-blob-rbf
PlasmaPower Mar 1, 2024
f10123b
Merge pull request #2164 from OffchainLabs/data-poster-blob-rbf
PlasmaPower Mar 1, 2024
355a77f
Merge branch 'master' into update-saveblobtodisk-design
Tristan-Wilson Mar 1, 2024
60ff801
Merge pull request #2166 from OffchainLabs/update-saveblobtodisk-design
ganeshvanahalli Mar 1, 2024
838aacf
Fix recording blob preimages
PlasmaPower Mar 1, 2024
f761877
Merge branch 'master' into fix-blob-preimages
PlasmaPower Mar 1, 2024
26fad6f
Merge pull request #2167 from OffchainLabs/fix-blob-preimages
PlasmaPower Mar 2, 2024
81de197
Support blob transactions in external signer
anodar Mar 4, 2024
a0caabe
Merge branch 'master' into external-signer-4844
anodar Mar 4, 2024
7b161f4
Merge branch 'master' into fuzzer-ignore-errors
anodar Mar 4, 2024
7a90622
Merge pull request #2161 from OffchainLabs/fuzzer-ignore-errors
anodar Mar 4, 2024
ecaa1e5
Follow TransactionArgs struct field types for BlobTx, make sidecar op…
anodar Mar 4, 2024
1e85aee
Merge branch 'master' into relaybroadcaster-connect-test
ganeshvanahalli Mar 4, 2024
3845399
Update cmd/nitro/init.go
ganeshvanahalli Mar 4, 2024
4ee7db1
Merge branch 'master' into check-nodeconfig-deployedchainconfig-compa…
ganeshvanahalli Mar 4, 2024
4261e74
Merge pull request #2134 from OffchainLabs/relaybroadcaster-connect-test
ganeshvanahalli Mar 4, 2024
0099286
Merge branch 'master' into external-signer-4844
anodar Mar 5, 2024
22e80a4
Merge pull request #2169 from OffchainLabs/external-signer-4844
anodar Mar 5, 2024
8239168
Add backup blob client
ganeshvanahalli Mar 5, 2024
3725323
Include chainID in Tx to signtx args conversion
anodar Mar 6, 2024
1dc241c
Merge branch 'master' into external-signer-4844
anodar Mar 6, 2024
6890439
update geth
magicxyyz Mar 6, 2024
48d0b9d
update geth
magicxyyz Mar 6, 2024
7296df7
Merge branch 'master' into state-release
magicxyyz Mar 6, 2024
56654aa
Merge pull request #2171 from OffchainLabs/external-signer-4844
anodar Mar 6, 2024
62c384b
Update badgerdb
Tristan-Wilson Mar 6, 2024
f9999e7
Merge pull request #2172 from OffchainLabs/update-badgerdb
Tristan-Wilson Mar 6, 2024
87f08dc
Add metrics to track L1 price in batch poster
ganeshvanahalli Mar 6, 2024
2a53d99
Merge branch 'master' into state-release
magicxyyz Mar 7, 2024
a5f4cdb
Add --data-availability.local-cache.max-size-mb
Tristan-Wilson Mar 7, 2024
2ad7f7f
Merge pull request #2176 from OffchainLabs/das-cache-limit
Tristan-Wilson Mar 7, 2024
b08cf5e
Replace bigcache with lru.Cache
Tristan-Wilson Mar 11, 2024
e8a7dc5
Remove bigcache dep
Tristan-Wilson Mar 11, 2024
d023b00
Rename bigcache to cache
Tristan-Wilson Mar 11, 2024
3ed2d0d
Merge pull request #2179 from OffchainLabs/das-replace-cache
Tristan-Wilson Mar 11, 2024
a7a7e12
Track pricing data in sequencer and batch poster. Add option to decli…
ganeshvanahalli Mar 11, 2024
3a7564c
Merge branch 'master' into batchposter-l1price-metrics
ganeshvanahalli Mar 11, 2024
7dfe942
Update generated method names in tests
anodar Mar 11, 2024
583231e
Handle go-ethereum's blob tx already known handling
PlasmaPower Mar 12, 2024
86ab0c9
Prefix comment with TODO:
PlasmaPower Mar 12, 2024
306e4b4
refactor
ganeshvanahalli Mar 12, 2024
ec909b2
refactor
ganeshvanahalli Mar 12, 2024
9aa1450
merge upstream
ganeshvanahalli Mar 12, 2024
f84450a
Merge pull request #2182 from OffchainLabs/blob-tx-already-known
PlasmaPower Mar 12, 2024
301bd84
Merge branch 'master' into postfix-signatures
anodar Mar 12, 2024
24a036e
Fix ErrExceedsMaxMempoolSize err log
amsanghi Mar 12, 2024
6100dd7
fix race
ganeshvanahalli Mar 12, 2024
5734b84
Merge pull request #2183 from OffchainLabs/fix_log_
PlasmaPower Mar 12, 2024
61eedbd
fix race
ganeshvanahalli Mar 12, 2024
2d449ae
add StateAndHeader test
magicxyyz Mar 12, 2024
8f4bf75
Merge branch 'master' into state-release
magicxyyz Mar 12, 2024
8c24484
update StateAndHeader test
magicxyyz Mar 12, 2024
b64198a
update error check in StateAndHeader test
magicxyyz Mar 12, 2024
7718918
update geth
magicxyyz Mar 12, 2024
25624db
update geth
magicxyyz Mar 12, 2024
596ccec
add debug_traceCall test
magicxyyz Mar 12, 2024
0610d6f
clean up debug_traceCall test
magicxyyz Mar 12, 2024
51637b5
update geth
magicxyyz Mar 12, 2024
4e1dc54
update trace call test error check
magicxyyz Mar 12, 2024
ef34311
update geth
magicxyyz Mar 12, 2024
99bc3e0
fix race in debug_trace_test
magicxyyz Mar 12, 2024
d1b4201
Merge pull request #2005 from OffchainLabs/state-release
tsahee Mar 13, 2024
116d23f
Disable EIP-4844 blob posting when another DAS is enabled
PlasmaPower Mar 14, 2024
ef2766d
Merge pull request #2186 from OffchainLabs/NIT-2113-das-no-4844
Tristan-Wilson Mar 14, 2024
8f2ab11
Supply a maxFeePerGas for batch gas estimation
PlasmaPower Mar 14, 2024
4100ac2
Drop "latest" eth_estimateGas parameter
PlasmaPower Mar 14, 2024
06864f2
update geth
magicxyyz Mar 14, 2024
e27f726
Merge branch 'master' into trace-call-test
magicxyyz Mar 14, 2024
239a45a
Merge pull request #2187 from OffchainLabs/gas-estimate-fee-cap
Tristan-Wilson Mar 14, 2024
20043d7
Merge branch 'master' into trace-call-test
PlasmaPower Mar 14, 2024
7eff767
lower number of threads used in trace call test to shorten the test e…
magicxyyz Mar 14, 2024
efb4084
Set a maximum multiple of the current tx fees to bid in the data poster
PlasmaPower Mar 14, 2024
dbf70fd
Bump go-ethereum submodule to latest master
PlasmaPower Mar 14, 2024
064fa11
Merge pull request #2188 from OffchainLabs/NIT-2112-max-fee-bid-multiple
PlasmaPower Mar 14, 2024
8a0d746
Merge branch 'master' into trace-call-test
magicxyyz Mar 14, 2024
928c04a
Add test to verify if arbBlockHash on pending block returns latest
ganeshvanahalli Mar 15, 2024
1acf393
Improve error logging when blob client fails to read blobs from beaco…
ganeshvanahalli Mar 15, 2024
0893f70
minor fix
ganeshvanahalli Mar 15, 2024
8d201d7
minor fix
ganeshvanahalli Mar 15, 2024
301833c
Merge branch 'master' into check-nodeconfig-deployedchainconfig-compa…
joshuacolvin0 Mar 15, 2024
8fc3178
Merge pull request #2165 from OffchainLabs/check-nodeconfig-deployedc…
ganeshvanahalli Mar 15, 2024
2615e1c
Add badgerdb memory options
Tristan-Wilson Mar 18, 2024
5d67b59
Merge pull request #2194 from OffchainLabs/badgerdb-memory-opts
Tristan-Wilson Mar 18, 2024
f965fb8
update contracts pin
ganeshvanahalli Mar 18, 2024
86e2ae7
Merge branch 'master' into fix-arbblockhash-pendingblock
ganeshvanahalli Mar 18, 2024
f8ff731
Merge branch 'master' into trace-call-test
magicxyyz Mar 18, 2024
f8a598c
Merge pull request #2192 from OffchainLabs/fix-arbblockhash-pendingblock
ganeshvanahalli Mar 18, 2024
e15263a
Merge branch 'master' into trace-call-test
magicxyyz Mar 18, 2024
13071d6
Merge branch 'master' into improve-errorlogging-blobreader
ganeshvanahalli Mar 18, 2024
fd1eef6
add l1 block number info to error
ganeshvanahalli Mar 18, 2024
966bcdb
refactor: pass latestHeader into feeAndTipCaps fn
Tristan-Wilson Mar 18, 2024
557f557
Merge branch 'master' into batchposter-l1price-metrics
ganeshvanahalli Mar 18, 2024
aa71e2e
address PR comments
ganeshvanahalli Mar 18, 2024
d66c19d
rectify blobFee calculation
ganeshvanahalli Mar 18, 2024
0221524
resolve merge conflicts
ganeshvanahalli Mar 18, 2024
71499ef
fix typos
ganeshvanahalli Mar 18, 2024
ad9ab00
Merge pull request #2193 from OffchainLabs/improve-errorlogging-blobr…
ganeshvanahalli Mar 18, 2024
096b437
Scaffolding for calling feeAndTipCaps
Tristan-Wilson Mar 18, 2024
134010e
Merge branch 'master' into trace-call-test
magicxyyz Mar 19, 2024
d06c18f
Merge remote-tracking branch 'origin/master' into execution-service-4
tsahee Mar 20, 2024
a3e275b
wait for validation before safe or final
tsahee Mar 20, 2024
0ca597b
fix more merge errors
tsahee Mar 20, 2024
0618a80
Merge remote-tracking branch 'origin/master' into execution-service-4
tsahee Mar 20, 2024
0b7a590
support counting validations for blocks not yet posted to parent
tsahee Mar 20, 2024
69758df
NodeInterface: update comments
tsahee Mar 20, 2024
7e82acf
remove seqinbox_test from race testing
tsahee Mar 20, 2024
b49b660
Revert "remove seqinbox_test from race testing"
tsahee Mar 20, 2024
db76dff
remove nodeInterface from race tests
tsahee Mar 20, 2024
5ddfaeb
No backlog/replace, enough bal blob tx price test
Tristan-Wilson Mar 21, 2024
0d2e89b
Test replacing tx pricing
Tristan-Wilson Mar 21, 2024
4d144c7
Test RBF with diverging blob/non blob basefees
Tristan-Wilson Mar 22, 2024
df0dd50
Fix MaxFeeBidMultipleBips to respect rbf minimums
PlasmaPower Mar 22, 2024
c38a0ee
Fix MaxFeeBidMultipleBips == 0
PlasmaPower Mar 22, 2024
6c042f0
Temp disable rbf part of 1st TestFeeAndTipCaps test
Tristan-Wilson Mar 22, 2024
6db8034
Merge branch 'master' into test-feeAndTipCaps
Tristan-Wilson Mar 22, 2024
6bd2721
Add backtrace to help debug flaky relay test
PlasmaPower Mar 22, 2024
52272ae
Use raw JSON RPCs to look for batch reverts [NIT-1279]
ganeshvanahalli Mar 22, 2024
6d5ab86
address PR comments
ganeshvanahalli Mar 22, 2024
2810b5e
Fix test timeouts in CI
PlasmaPower Mar 23, 2024
14a2b0b
Merge pull request #2203 from OffchainLabs/fix-test-timeout
Tristan-Wilson Mar 25, 2024
7911fae
Merge branch 'master' into rbf-max-multiple
Tristan-Wilson Mar 25, 2024
f3e74d2
Fix lint errors
Tristan-Wilson Mar 25, 2024
9bfb92f
Merge branch 'master' into fix-batchreverts-checking
ganeshvanahalli Mar 25, 2024
5b1871c
Merge pull request #2199 from OffchainLabs/rbf-max-multiple
Tristan-Wilson Mar 25, 2024
bcc9186
Merge branch 'master' into test-feeAndTipCaps
Tristan-Wilson Mar 25, 2024
7e19512
Merge pull request #2180 from OffchainLabs/track-l1pricing-data
joshuacolvin0 Mar 25, 2024
23aae50
Merge branch 'master' into backup-blob-client
ganeshvanahalli Mar 25, 2024
daaf7ca
address PR comments
ganeshvanahalli Mar 25, 2024
eece598
Update arbnode/dataposter/dataposter_test.go
Tristan-Wilson Mar 25, 2024
703c626
Merge pull request #2170 from OffchainLabs/backup-blob-client
ganeshvanahalli Mar 25, 2024
9be62f6
Merge branch 'master' into test-feeAndTipCaps
Tristan-Wilson Mar 25, 2024
0399e76
Merge pull request #2200 from OffchainLabs/test-feeAndTipCaps
Tristan-Wilson Mar 25, 2024
157633b
fix small PR comments
tsahee Mar 25, 2024
9777dd0
nodeinterface_test: use bindAPI
tsahee Mar 25, 2024
cc5ec18
modify DetailTxError impl to be usable for batchposter checkReverts
ganeshvanahalli Mar 25, 2024
414cd55
Merge branch 'master' into fix-batchreverts-checking
ganeshvanahalli Mar 25, 2024
054e895
refactor
ganeshvanahalli Mar 25, 2024
543be5d
sync_monitor update
tsahee Mar 25, 2024
88cf37e
Merge branch 'master' into postfix-signatures
joshuacolvin0 Mar 25, 2024
d806f4d
inbox_tracker: add comment
tsahee Mar 25, 2024
adab53d
Merge pull request #2181 from OffchainLabs/postfix-signatures
joshuacolvin0 Mar 25, 2024
329edf1
address PR comments
ganeshvanahalli Mar 26, 2024
2197e44
Merge branch 'master' into fix-batchreverts-checking
ganeshvanahalli Mar 26, 2024
97c2bfa
Add metrics for L2 gas pricing [NIT-2361]
ganeshvanahalli Mar 26, 2024
622abd6
Merge pull request #2202 from OffchainLabs/fix-batchreverts-checking
ganeshvanahalli Mar 26, 2024
e9f9163
Merge remote-tracking branch 'origin/master' into execution-service-4
tsahee Mar 26, 2024
8abc855
address PR comments
ganeshvanahalli Mar 26, 2024
39f5cdc
Merge branch 'master' into l2-gaspricing-metrics
ganeshvanahalli Mar 26, 2024
5e46a4b
Merge branch 'master' into batchposter-l1price-metrics
ganeshvanahalli Mar 26, 2024
158ce7b
fix metric name
ganeshvanahalli Mar 26, 2024
6a1c1a7
Merge pull request #2204 from OffchainLabs/l2-gaspricing-metrics
PlasmaPower Mar 26, 2024
5879b05
Fix new rust warning about static mut references
PlasmaPower Mar 26, 2024
c581be7
Merge branch 'master' into execution-service-4
PlasmaPower Mar 26, 2024
bf01c86
Merge pull request #1535 from OffchainLabs/execution-service-4
PlasmaPower Mar 26, 2024
e4b8027
Merge branch 'master' into fix-static-mut-warn
PlasmaPower Mar 26, 2024
f93d2c3
Merge pull request #2205 from OffchainLabs/fix-static-mut-warn
joshuacolvin0 Mar 27, 2024
238d54d
Merge branch 'master' into trace-call-test
joshuacolvin0 Mar 27, 2024
397f368
Validate preimages in both JIT and Arbitrator [NIT-2377]
ganeshvanahalli Mar 28, 2024
21c6632
fix clippy recommendations
ganeshvanahalli Mar 28, 2024
cb01da3
syncProgressMap: bug fix
tsahee Mar 28, 2024
4ad776c
resolve merge conflicts
ganeshvanahalli Mar 28, 2024
9472733
address PR comments
ganeshvanahalli Mar 28, 2024
ff9e72a
Merge pull request #2209 from OffchainLabs/sync_progress_map
tsahee Mar 28, 2024
066b9fa
Merge branch 'master' into batchposter-l1price-metrics
joshuacolvin0 Mar 28, 2024
d28682b
Merge pull request #2173 from OffchainLabs/batchposter-l1price-metrics
joshuacolvin0 Mar 28, 2024
31de956
address PR comments
ganeshvanahalli Mar 28, 2024
40ca241
minor fix
ganeshvanahalli Mar 28, 2024
020123c
Merge branch 'master' into trace-call-test
PlasmaPower Mar 30, 2024
69fd6fe
Merge pull request #2184 from OffchainLabs/trace-call-test
joshuacolvin0 Mar 30, 2024
7680874
Set default --execution.sequencer.max-revert-gas-reject=0
PlasmaPower Apr 1, 2024
777b136
Don't increment the gas used metric in the prefetcher
PlasmaPower Apr 1, 2024
fc0feea
Merge pull request #2213 from OffchainLabs/no-default-revert-reject
joshuacolvin0 Apr 1, 2024
564c462
Merge branch 'master' into prefetcher-gas-used
joshuacolvin0 Apr 1, 2024
61b98c8
Merge pull request #2214 from OffchainLabs/prefetcher-gas-used
joshuacolvin0 Apr 1, 2024
dc86a44
Merge branch 'master' into validate-preimages-jitandarbitrator
PlasmaPower Apr 1, 2024
2e15a68
Merge pull request #2208 from OffchainLabs/validate-preimages-jitanda…
PlasmaPower Apr 1, 2024
f9ee79d
Do not log 'error applying transaction' errors when the block is bein…
ganeshvanahalli Apr 1, 2024
45bbd99
Don't wait on the prefetcher to complete before producing the next block
PlasmaPower Apr 1, 2024
df28fc7
Merge pull request #2215 from OffchainLabs/disable-applytx-errorloggi…
PlasmaPower Apr 1, 2024
f3f7521
Merge branch 'master' into dont-wait-on-prefetcher
PlasmaPower Apr 1, 2024
c84507b
Merge pull request #2216 from OffchainLabs/dont-wait-on-prefetcher
PlasmaPower Apr 1, 2024
4a70c18
Merge tag 'v2.3.4-rc.2' into merge-nitro-v2.3.4
tsahee Apr 6, 2024
015e09a
rust + go tidy
tsahee Apr 6, 2024
3e491c7
prover: fix wasm compilation
tsahee Apr 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ COPY ./scripts/download-machine.sh .
#RUN ./download-machine.sh consensus-v10.3 0xf559b6d4fa869472dabce70fe1c15221bdda837533dfd891916836975b434dec
#RUN ./download-machine.sh consensus-v11 0xf4389b835497a910d7ba3ebfb77aa93da985634f3c052de1290360635be40c4a
#RUN ./download-machine.sh consensus-v11.1 0x68e4fe5023f792d4ef584796c84d710303a5e12ea02d6e37e2b5e9c4332507c4
#RUN ./download-machine.sh consensus-v20 0x8b104a2e80ac6165dc58b9048de12f301d70b02a0ab51396c22b4b4b802a16a4

RUN mkdir 0x965a35130f4e34b7b2339eac03b2eacc659e2dafe850d213ea6a7cdf9edfa99f && \
ln -sfT 0x965a35130f4e34b7b2339eac03b2eacc659e2dafe850d213ea6a7cdf9edfa99f latest && \
Expand Down
55 changes: 54 additions & 1 deletion arbitrator/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions arbitrator/jit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ hex = "0.4.3"
structopt = "0.3.26"
sha3 = "0.9.1"
libc = "0.2.132"
sha2 = "0.9.9"

[features]
llvm = ["dep:wasmer-compiler-llvm"]
17 changes: 17 additions & 0 deletions arbitrator/jit/src/wavmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use crate::{
};
use arbutil::{Color, PreimageType};
use caller_env::{GuestPtr, MemAccess};
use sha2::Sha256;
use sha3::{Digest, Keccak256};
use std::{
io,
io::{BufReader, BufWriter, ErrorKind},
Expand Down Expand Up @@ -168,6 +170,21 @@ pub fn resolve_preimage_impl(
error!("Missing requested preimage for hash {hash_hex} in {name}")
};

// Check if preimage rehashes to the provided hash. Exclude blob preimages
let calculated_hash: [u8; 32] = match preimage_type {
PreimageType::Keccak256 => Keccak256::digest(preimage).into(),
PreimageType::Sha2_256 => Sha256::digest(preimage).into(),
PreimageType::EthVersionedHash => *hash,
};
if calculated_hash != *hash {
error!(
"Calculated hash {} of preimage {} does not match provided hash {}",
hex::encode(calculated_hash),
hex::encode(preimage),
hex::encode(*hash)
);
}

if offset % 32 != 0 {
error!("bad offset {offset} in {name}")
};
Expand Down
1 change: 1 addition & 0 deletions arbitrator/prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ num-derive = "0.4.1"
num-traits = "0.2.17"
c-kzg = { version = "0.4.0", optional = true } # TODO: look into switching to rust-kzg (no crates.io release or hosted rustdoc yet)
sha2 = "0.9.9"
lru = "0.12.3"

[lib]
name = "prover"
Expand Down
60 changes: 42 additions & 18 deletions arbitrator/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,29 @@ pub use machine::Machine;

use arbutil::{Bytes32, PreimageType};
use eyre::{Report, Result};
use lru::LruCache;
use machine::{
argument_data_to_inbox, get_empty_preimage_resolver, GlobalState, MachineStatus,
PreimageResolver,
};
use static_assertions::const_assert_eq;
use std::{
ffi::CStr,
num::NonZeroUsize,
os::raw::{c_char, c_int},
path::Path,
ptr, slice,
sync::{
atomic::{self, AtomicU8},
Arc,
Arc, Mutex,
},
};
use utils::CBytes;

lazy_static::lazy_static! {
static ref BLOBHASH_PREIMAGE_CACHE: Mutex<LruCache<Bytes32, CBytes>> = Mutex::new(LruCache::new(NonZeroUsize::new(12).unwrap()));
}

#[repr(C)]
#[derive(Clone, Copy)]
pub struct CByteArray {
Expand Down Expand Up @@ -326,32 +332,50 @@ pub struct ResolvedPreimage {
pub len: isize, // negative if not found
}

macro_rules! handle_preimage_resolution {
($context:expr, $ty:expr, $hash:expr, $resolver:expr) => {{
let res = $resolver($context, $ty.into(), $hash.as_ptr());
if res.len < 0 {
return None;
}
let data = CBytes::from_raw_parts(res.ptr, res.len as usize);
// Check if preimage rehashes to the provided hash
match crate::utils::hash_preimage(&data, $ty) {
Ok(have_hash) if have_hash.as_slice() == *$hash => {}
Ok(got_hash) => panic!(
"Resolved incorrect data for hash {} (rehashed to {})",
$hash,
Bytes32(got_hash),
),
Err(err) => panic!(
"Failed to hash preimage from resolver (expecting hash {}): {}",
$hash, err,
),
}
Some(data)
}};
}

#[no_mangle]
#[cfg(feature = "native")]
pub unsafe extern "C" fn arbitrator_set_preimage_resolver(
mach: *mut Machine,
resolver: unsafe extern "C" fn(u64, u8, *const u8) -> ResolvedPreimage,
) {
(*mach).set_preimage_resolver(Arc::new(
move |context: u64, ty: PreimageType, hash: Bytes32| -> Option<CBytes> {
let res = resolver(context, ty.into(), hash.as_ptr());
if res.len < 0 {
if let PreimageType::EthVersionedHash = ty {
let mut cache = BLOBHASH_PREIMAGE_CACHE.lock().unwrap();
if cache.contains(&hash) {
return cache.get(&hash).cloned();
}
if let Some(data) = handle_preimage_resolution!(context, ty, hash, resolver) {
cache.put(hash, data.clone());
return Some(data);
}
return None;
}
let data = CBytes::from_raw_parts(res.ptr, res.len as usize);
#[cfg(debug_assertions)]
match crate::utils::hash_preimage(&data, ty) {
Ok(have_hash) if have_hash.as_slice() == *hash => {}
Ok(got_hash) => panic!(
"Resolved incorrect data for hash {} (rehashed to {})",
hash,
Bytes32(got_hash),
),
Err(err) => panic!(
"Failed to hash preimage from resolver (expecting hash {}): {}",
hash, err,
),
}
Some(data)
handle_preimage_resolution!(context, ty, hash, resolver)
},
) as PreimageResolver);
}
Expand Down
54 changes: 53 additions & 1 deletion arbitrator/wasm-libraries/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading