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

Adding custom verification function #13

Closed
wants to merge 461 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
461 commits
Select commit Hold shift + click to select a range
3b23020
Merge commit '1cab72ff3' into merge-nitro-v2.3.4
tsahee Apr 6, 2024
b3c16ec
min cached init gas
rachel-bousfield Apr 6, 2024
18e2e7f
ArbWasmCache
rachel-bousfield Apr 7, 2024
65e805a
codehashIsCached precompile method
rachel-bousfield Apr 7, 2024
acc5618
Update src/node-interface/NodeInterface.sol
Jason-W123 Apr 7, 2024
70e203b
simple cache manager
rachel-bousfield Apr 8, 2024
b00d781
precompile list method & events
rachel-bousfield Apr 8, 2024
94e2ab7
Refactor e2e tests
gvladika Apr 8, 2024
de162b0
Read rollup creator address from logs
gvladika Apr 8, 2024
b77a8ab
Add CI config
gvladika Apr 8, 2024
f16d096
remove trie table
rachel-bousfield Apr 9, 2024
7ef4c03
add actual impl
rachel-bousfield Apr 9, 2024
bf58412
format
rachel-bousfield Apr 9, 2024
52bd007
32-bit asm size
rachel-bousfield Apr 9, 2024
191062a
better idioms & API
rachel-bousfield Apr 9, 2024
d317dab
Merge branch 'testnode-deploy' into e2e-to-ci
gvladika Apr 9, 2024
e7b2a7e
Use current branch for CI
gvladika Apr 9, 2024
92a7f4e
Also run e2e test on top of custom fee token chain
gvladika Apr 9, 2024
d0433c1
Remove unused
gvladika Apr 9, 2024
1b9f0dc
add events and simplify
rachel-bousfield Apr 9, 2024
e9f26af
Merge pull request #35 from OffchainLabs/merge-nitro-v2.3.4
rachel-bousfield Apr 9, 2024
8056af3
Merge remote-tracking branch 'stylus/stylus' into init-cache
rachel-bousfield Apr 9, 2024
0b675b6
fix condition
rachel-bousfield Apr 10, 2024
dd08a3e
fix comparison
rachel-bousfield Apr 10, 2024
c1a66f9
txCacheSize methods
rachel-bousfield Apr 10, 2024
8ca0b87
add test case
rachel-bousfield Apr 11, 2024
447582a
add makeSpace
rachel-bousfield Apr 11, 2024
9b198f3
math hostio test
rachel-bousfield Apr 12, 2024
0b23ea7
Merge pull request #38 from OffchainLabs/math-hostios
rachel-bousfield Apr 12, 2024
c9f1ce6
Merge branch 'stylus' into init-cache
rachel-bousfield Apr 12, 2024
1600221
limit makeSpace
rachel-bousfield Apr 15, 2024
f3445c0
return amount of space left
rachel-bousfield Apr 15, 2024
133fdc8
Merge pull request #36 from OffchainLabs/init-cache
rachel-bousfield Apr 15, 2024
eda0ab9
optimize func merkle
rachel-bousfield Apr 15, 2024
c8dbbd4
fix root proof
rachel-bousfield Apr 15, 2024
4e42788
O(n) instruction hashing
rachel-bousfield Apr 15, 2024
b75e7c7
Merge pull request #39 from OffchainLabs/optimize-func-merkle
rachel-bousfield Apr 15, 2024
dc6327c
feat: conditional osp
gzeoneth Apr 16, 2024
b6d60e6
feat: make getter public
gzeoneth Apr 16, 2024
bad6780
Update src/node-interface/NodeInterface.sol
Jason-W123 Apr 16, 2024
f05cd14
fix: interface
gzeoneth Apr 16, 2024
e5ba177
fix: set condOsp with postUpgradeInit
gzeoneth Apr 16, 2024
337f763
chore: remove event
gzeoneth Apr 16, 2024
9677456
docs: explain
gzeoneth Apr 16, 2024
e3725f7
address review comments
rachel-bousfield Apr 16, 2024
a2889ae
fix to all comments
Jason-W123 Apr 17, 2024
1e64e2a
remove '=' in pin
rachel-bousfield Apr 17, 2024
c51ab1d
Merge pull request #41 from OffchainLabs/cache-manager-feedback
rachel-bousfield Apr 18, 2024
e7ec425
add unsafe entrypoint situation
Jason-W123 Apr 19, 2024
4ab3943
Merge branch 'decimals-audit' into e2e-decimals
gvladika Apr 22, 2024
6c4da9d
Merge pull request #161 from OffchainLabs/testnode-deploy
gvladika Apr 23, 2024
08ad24a
Merge branch 'develop' into e2e-to-ci
gvladika Apr 23, 2024
4255d5a
Merge branch 'develop' into init-price
gvladika Apr 23, 2024
ce2e32b
reset to high level comment
Jason-W123 Apr 24, 2024
8c22b28
refactor: move machine hash logic to osp
gzeoneth Apr 24, 2024
4661583
chore: add OneStepProofEntry to test
gzeoneth Apr 24, 2024
9ad425e
Merge remote-tracking branch 'origin/develop' into stylus
gzeoneth Apr 24, 2024
ecb46c1
Merge branch 'refactor-machine-hash' into stylus
gzeoneth Apr 24, 2024
95c8e59
Merge branch 'stylus' into cond-osp
gzeoneth Apr 24, 2024
82e9425
fix: use machine hash from osp
gzeoneth Apr 24, 2024
988618b
Properly calculate and configure validator addresses
gvladika Apr 25, 2024
0ab2b78
Add unit test to test conditional OSP
gvladika Apr 25, 2024
2e8eeb9
Merge pull request #174 from OffchainLabs/validator-wallet-fix
godzillaba Apr 25, 2024
7867bae
Add check
gvladika Apr 26, 2024
6d86f7a
Merge pull request #175 from OffchainLabs/unit-cond-osp
gvladika Apr 26, 2024
026578e
Merge branch 'develop' into refactor-machine-hash
gvladika Apr 26, 2024
9e875b1
Merge branch 'develop' into e2e-to-ci
gvladika Apr 29, 2024
05f263d
Use defaults
gvladika Apr 29, 2024
07d8116
Merge branch 'e2e-to-ci' of github.com:OffchainLabs/nitro-contracts i…
gvladika Apr 29, 2024
d9593ea
Add missing refs
gvladika Apr 29, 2024
3323768
Skip check if local deployment
gvladika Apr 29, 2024
9de6819
Revert "Skip check if local deployment"
gvladika Apr 29, 2024
8b6aded
add wasm to module & new precompile methods
rachel-bousfield Apr 30, 2024
707e3d4
revert wasm hash
rachel-bousfield Apr 30, 2024
a51e769
add extra hash (more powerful than just wasm)
rachel-bousfield Apr 30, 2024
a9fd08d
Merge branch 'develop' into e2e-decimals
gvladika Apr 30, 2024
09ff1db
Remove debug
gvladika Apr 30, 2024
89f7655
Merge pull request #172 from OffchainLabs/refactor-machine-hash
gzeoneth Apr 30, 2024
2537361
Merge pull request #173 from OffchainLabs/cond-osp
gzeoneth Apr 30, 2024
2cc0c6c
Merge branch 'develop' into stylus
gzeoneth Apr 30, 2024
ce34e93
Merge branch 'stylus' into stylus-mainnet-constants
hkalodner May 3, 2024
6cc4dfd
Merge pull request #179 from OffchainLabs/stylus-mainnet-constants
gzeoneth May 6, 2024
3fad9a2
ci: use known working version of foundry
gzeoneth May 6, 2024
68e179a
ci: use known working version of foundry 2
gzeoneth May 6, 2024
d615424
Fix the nitro CI builds.
eljobe May 6, 2024
c36913f
chore: keep static remapping
gzeoneth May 6, 2024
df13ab5
Merge remote-tracking branch 'origin/develop' into fix-ci
gzeoneth May 6, 2024
b9e21f0
format: remappings
gzeoneth May 6, 2024
a00d2fa
Merge pull request #182 from OffchainLabs/fix-ci
gzeoneth May 6, 2024
8f3d93f
Revert "ci: use known working version of foundry 2"
gzeoneth May 6, 2024
16c4eb1
Revert "ci: use known working version of foundry"
gzeoneth May 6, 2024
3ce2251
Merge remote-tracking branch 'origin/develop' into stylus
gzeoneth May 6, 2024
77ee9de
Merge pull request #170 from OffchainLabs/stylus
gzeoneth May 6, 2024
13fb029
Merge branch 'develop' into e2e-to-ci
gvladika May 7, 2024
62a424f
Merge branch 'develop' into e2e-decimals
gvladika May 7, 2024
7a41cd5
MultiCallTest.sol: a non-standard contract for stylus compatibility t…
tsahee May 11, 2024
e4cfb2e
Merge branch 'develop' into e2e-to-ci
gvladika May 13, 2024
eebd303
Merge branch 'e2e-to-ci' of github.com:OffchainLabs/nitro-contracts i…
gvladika May 13, 2024
791a4dd
Bump SDK
gvladika May 13, 2024
0b0fa6a
Refactor withdrawal test
gvladika May 13, 2024
8a9df20
Use whole number
gvladika May 13, 2024
83dd079
Do amount scaling where necessary
gvladika May 13, 2024
5754b88
Scale amount conditionally
gvladika May 13, 2024
05b1c67
Yarn audit fix
gvladika May 13, 2024
d320be9
Update audit-ci.json
gvladika May 13, 2024
6d35410
feat: CacheManager qol
gzeoneth May 14, 2024
15a0e1b
docs: proper natspec tag
gzeoneth May 14, 2024
11409d8
perf: cache decay
gzeoneth May 14, 2024
d7ae068
docs: chunk explain
gzeoneth May 14, 2024
c14c60e
Make node version consistent
gvladika May 14, 2024
869a458
Bump node
gvladika May 14, 2024
c4322db
Bump hardhat
gvladika May 14, 2024
2562279
Merge pull request #165 from OffchainLabs/e2e-to-ci
gzeoneth May 14, 2024
c45c84d
refactor: get rid of while true
gzeoneth May 14, 2024
5b485d2
refactor: remove loop
gzeoneth May 14, 2024
a83fb1d
fix: i=0
gzeoneth May 14, 2024
e9c1917
test: mustCache
gzeoneth May 14, 2024
f4937b3
fix: reduced cache size
gzeoneth May 14, 2024
2ebb078
refactor: needToFree
gzeoneth May 14, 2024
cb4ce8c
test: better cache manager test
gzeoneth May 14, 2024
8b29b5e
chore: remove log
gzeoneth May 14, 2024
86bf6e5
fix: lint
gzeoneth May 14, 2024
53adafa
fix: review comments
gzeoneth May 14, 2024
244303e
fix: review comments 2
gzeoneth May 14, 2024
c1cf003
fix: loop length
gzeoneth May 14, 2024
c4bd9a5
doc: fix comment
gzeoneth May 14, 2024
2af5173
Merge branch 'develop' into cache-manager-qol
gzeoneth May 14, 2024
ad27a47
Merge pull request #185 from OffchainLabs/cache-manager-qol
gzeoneth May 14, 2024
144acb1
Merge branch 'develop' into g-handle-decimals
gvladika May 15, 2024
a537889
Bump Slither action
gvladika May 15, 2024
3c2ef62
Workaround for Slither bug
gvladika May 15, 2024
bf5cabe
Update slither db
gvladika May 15, 2024
013809a
Update slither db
gvladika May 15, 2024
e43f6c2
Use 0.3.1
gvladika May 15, 2024
2d7ce34
Update slither db
gvladika May 15, 2024
8d506e0
Merge branch 'g-handle-decimals' into decimals-audit
gvladika May 15, 2024
0770fe0
Merge branch 'decimals-audit' of github.com:OffchainLabs/nitro-contra…
gvladika May 15, 2024
7dd3257
Merge branch 'decimals-audit' into e2e-decimals
gvladika May 15, 2024
be976e9
Add 6 decimals chain to CI
gvladika May 15, 2024
2ea34de
DOn't bump hardhat yet
gvladika May 16, 2024
e0a9c88
Merge branch 'develop' into e2e-withdraw
gvladika May 16, 2024
29a2d20
Don't handle audit-ci in this PR
gvladika May 16, 2024
ad0b301
Merge branch 'e2e-withdraw' of github.com:OffchainLabs/nitro-contract…
gvladika May 16, 2024
64a19cd
Merge branch 'develop' into stylus_recursive_test
gzeoneth May 22, 2024
4e153cc
Merge pull request #184 from OffchainLabs/stylus_recursive_test
gzeoneth May 22, 2024
b9da273
feat: anytrust fast confirmation
gzeoneth May 22, 2024
81eb06a
docs: fastConfirmNextNode
gzeoneth May 22, 2024
4445cd5
Merge branch 'develop' into bump-slither
gzeoneth May 24, 2024
00f94f7
Merge pull request #186 from OffchainLabs/bump-slither
gzeoneth May 24, 2024
b0126f5
Merge pull request #102 from OffchainLabs/decimals-audit
gzeoneth May 24, 2024
f93a327
test: improve outbox tests
gzeoneth Jun 4, 2024
086b1ca
Merge pull request #188 from OffchainLabs/fix-outbox-test
gzeoneth Jun 6, 2024
d7aa313
Fix link to license
joshuacolvin0 Jun 10, 2024
2d95abf
Add initializer for cache manager
yahgwai Jun 14, 2024
7f6f430
Forge fmt
yahgwai Jun 14, 2024
1e37427
Scale fee amount in rollupo creation script
gvladika Jun 14, 2024
483153f
src/
yahgwai Jun 14, 2024
334b760
Added slither exceptions for cachemanager
yahgwai Jun 14, 2024
0f4d8f3
Do scaling only when fee token is used
gvladika Jun 14, 2024
432f8af
Deploy and set cache manager
gvladika Jun 14, 2024
aebd20f
Deploy on child chain
gvladika Jun 14, 2024
6cc9bbf
Use existing deployer key
gvladika Jun 14, 2024
7abde68
Put CacheManager deployment into separate script
gvladika Jun 17, 2024
8676636
Add yarn action to deploy cache manager in testnode
gvladika Jun 17, 2024
a6e8efa
Merge pull request #192 from OffchainLabs/deploy-cache-manager
gvladika Jun 18, 2024
bce4e72
Merge branch 'develop' into fast-conf-port
gzeoneth Jun 20, 2024
f1bb9a5
Specify address when caching Stylus program
PlasmaPower Jun 21, 2024
cc53496
Add back in cacheCodehash as deprecated
PlasmaPower Jun 21, 2024
ccd2c2b
chore: update storage and 4bytes
gzeoneth Jun 24, 2024
40caf7c
Merge branch 'develop' into cache-program-address
gzeoneth Jun 25, 2024
37bb571
fix: merge conflicts
gzeoneth Jun 25, 2024
1a868ce
feat: getMinBid(address)
gzeoneth Jun 25, 2024
739495e
ci: contract size check
gzeoneth Jun 27, 2024
6716681
fix: workaround contract size issue
gzeoneth Jun 27, 2024
24e76a1
test: prebold fast confirmer
gzeoneth Jul 1, 2024
e17f2ac
docs: anyTrustFastConfirmer need to be validator
gzeoneth Jul 1, 2024
b1a870d
docs: reminder to remove old fast confirmer
gzeoneth Jul 1, 2024
d876e2a
test: add deadline test
gzeoneth Jul 1, 2024
7142dd8
fix: lint
gzeoneth Jul 1, 2024
2ca8da4
Merge branch 'develop' into e2e-withdraw
gzeoneth Jul 1, 2024
b8fd7cd
Merge pull request #194 from OffchainLabs/cache-program-address
gzeoneth Jul 1, 2024
1c0b9c7
Merge branch 'develop' into proxy-cache-manager
gzeoneth Jul 1, 2024
cf0f18f
test: add CacheManager to upgradibility checks
gzeoneth Jul 1, 2024
45f7d4f
chore: push CacheManager storage and 4bytes
gzeoneth Jul 1, 2024
6ec09ad
chore: ignore slither
gzeoneth Jul 1, 2024
8017f6d
Merge branch 'develop' into hotfix-comment-for-excessFeeRefundAddress
gzeoneth Jul 1, 2024
b34e450
Merge branch 'develop' into init-price
gzeoneth Jul 1, 2024
04f247e
Merge branch 'develop' into license-link
gzeoneth Jul 1, 2024
d021be2
Merge pull request #191 from OffchainLabs/proxy-cache-manager
gzeoneth Jul 1, 2024
ab25450
Merge branch 'develop' into license-link
gzeoneth Jul 1, 2024
7106b13
Merge pull request #190 from OffchainLabs/license-link
gzeoneth Jul 1, 2024
18f950e
Merge branch 'develop' into hotfix-comment-for-excessFeeRefundAddress
gzeoneth Jul 1, 2024
cfd5cb8
Merge pull request #167 from OffchainLabs/hotfix-comment-for-excessFe…
gzeoneth Jul 1, 2024
4acde7d
Merge branch 'develop' into e2e-withdraw
gzeoneth Jul 1, 2024
a1f57bf
Merge pull request #183 from OffchainLabs/e2e-withdraw
gzeoneth Jul 1, 2024
06e6d6b
Merge branch 'develop' into init-price
gzeoneth Jul 1, 2024
41a265d
Merge branch 'develop' into g-handle-decimals
gzeoneth Jul 1, 2024
fc6603c
Merge branch 'develop' into factory-deployer-helper
gzeoneth Jul 1, 2024
16095ce
Merge pull request #105 from OffchainLabs/factory-deployer-helper
gzeoneth Jul 1, 2024
6111b41
fix: use safeApprove
ControlCplusControlV Jul 1, 2024
e25b9f6
test: fix similar to #188 with scoping
gzeoneth Jul 1, 2024
1256a71
Merge branch 'develop' into g-handle-decimals
gzeoneth Jul 1, 2024
a7fb67a
Merge branch 'develop' into init-price
gzeoneth Jul 2, 2024
0aaab5d
Deploy CacheManger as upgradeable
gvladika Jul 2, 2024
0929b6f
Use type to init
gvladika Jul 2, 2024
d07819f
Slither update
gvladika Jul 3, 2024
b46af65
Remove unused
gvladika Jul 3, 2024
09d10b3
Merge pull request #200 from OffchainLabs/fix-cache-manager
gzeoneth Jul 3, 2024
870566d
Merge branch 'develop' into g-handle-decimals
gzeoneth Jul 3, 2024
34751a7
Merge branch 'g-handle-decimals' into e2e-decimals
gzeoneth Jul 3, 2024
f4bf96e
Merge pull request #201 from OffchainLabs/e2e-decimals
gvladika Jul 3, 2024
2e90a05
Merge pull request #100 from OffchainLabs/g-handle-decimals
gzeoneth Jul 3, 2024
de1852c
Merge branch 'develop' into init-price
gzeoneth Jul 3, 2024
7aae8fa
Merge pull request #117 from OffchainLabs/init-price
gzeoneth Jul 3, 2024
5cf93d2
Merge branch 'develop' into fast-conf-port
gzeoneth Jul 3, 2024
bddac4b
Merge pull request #187 from OffchainLabs/fast-conf-port
gzeoneth Jul 3, 2024
cf19dad
chore: review and ignore slither issues
gzeoneth Jul 3, 2024
35d1571
chore: bump packages
gzeoneth Jul 3, 2024
677e1bf
chore: ignore npm audit issues
gzeoneth Jul 3, 2024
0a1df6c
chore: drop nodejs 16 support
gzeoneth Jul 3, 2024
b59d546
chore: revert prettier bump
gzeoneth Jul 3, 2024
42ac427
fix: unused import
gzeoneth Jul 3, 2024
1a47665
ci: use node18 testnode ref
gzeoneth Jul 4, 2024
5686d68
fix: use 127.0.0.1 instead
gzeoneth Jul 4, 2024
39bd03d
Merge pull request #203 from OffchainLabs/chore-slither-db
gzeoneth Jul 4, 2024
1ac59aa
ci: use sha instead of head ref to support push and pull
gzeoneth Jul 4, 2024
0ed27f0
ci: branch expression
gzeoneth Jul 4, 2024
61204dd
Merge pull request #205 from OffchainLabs/ci-use-sha
gzeoneth Jul 4, 2024
3094e23
v2.0.0-beta.1
gzeoneth Jul 8, 2024
9cb5890
pull eigenda changes
ethenotethan Jul 9, 2024
f82b16d
Revert "pull eigenda changes"
ethenotethan Jul 9, 2024
9d643a5
merge changes
ethenotethan Jul 9, 2024
5172b81
Merge branch 'v3.0.3-chnages' of github.com:Layr-Labs/nitro-contracts…
ethenotethan Jul 9, 2024
0f9ddd7
update package dep
ethenotethan Jul 9, 2024
a450cd9
dummy file for debugging
ethenotethan Jul 9, 2024
6ded685
fix: add gas refunding to eigenda batch sequencing
ethenotethan Jul 17, 2024
7719367
fix: fix bugs
ethenotethan Jul 17, 2024
81fa76a
incorporate osp fixes
ethenotethan Jul 18, 2024
4e89d97
adding custom verification with equation
Aug 2, 2024
025f549
adding missing alpha-z argument for gamma calculation
Aug 2, 2024
d87ad54
removing unwanted function
Aug 2, 2024
f8d3956
adding verbose messages
Aug 2, 2024
2ff03f2
using the library from DA, cleanup
Aug 2, 2024
8278074
cleanup
Aug 2, 2024
6f7fa21
adding auditci
Aug 2, 2024
e887b0f
reverting audit-ci
Aug 2, 2024
b3e1e35
mainnet G1 Alpha point
Aug 2, 2024
ccfd5cf
sanity check changes.
Aug 7, 2024
63a15ec
more clear error mesage
Aug 7, 2024
16c94b7
Update OneStepProverHostIo.sol
anupsv Aug 8, 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
2 changes: 1 addition & 1 deletion .github/workflows/audit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]
node-version: [18, 20]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
102 changes: 100 additions & 2 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

Expand Down Expand Up @@ -85,6 +85,9 @@ jobs:
- name: Forge build
run: forge build

- name: Test size
run: yarn contract:size

- name: Test Storage Layouts
run: yarn run test:storage

Expand Down Expand Up @@ -123,7 +126,7 @@ jobs:
- name: Setup nodejs
uses: actions/setup-node@v2
with:
node-version: '18'
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

Expand All @@ -135,3 +138,98 @@ jobs:

- name: Test 4844
run: yarn test:4844
test-e2e:
name: Test e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: OffchainLabs/actions/run-nitro-test-node@main
with:
l3-node: true
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
nitro-testnode-ref: node-18

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install packages
run: yarn

- name: Compile contracts
run: yarn build

- name: Run e2e tests
run: yarn test:e2e
test-e2e-custom-fee-token:
name: Test e2e custom fee token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: OffchainLabs/actions/run-nitro-test-node@main
with:
l3-node: true
args: --l3-fee-token
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
nitro-testnode-ref: node-18

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install packages
run: yarn

- name: Compile contracts
run: yarn build

- name: Run e2e tests
run: yarn test:e2e
test-e2e-fee-token-6-decimals:
name: Test e2e fee token with 6 decimals
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: OffchainLabs/actions/run-nitro-test-node@main
with:
l3-node: true
args: --l3-fee-token --l3-fee-token-decimals 6
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
nitro-testnode-ref: 'non18-decimal-token-node-18'

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install packages
run: yarn

- name: Compile contracts
run: yarn build

- name: Run e2e tests
run: yarn test:e2e
3 changes: 2 additions & 1 deletion .github/workflows/slither.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ jobs:
- uses: actions/checkout@v4

- name: Run Slither
uses: crytic/slither-action@v0.3.1
uses: crytic/slither-action@v0.4.0
id: slither
with:
sarif: results.sarif
fail-on: medium
slither-args: --skip-assembly

- name: Upload SARIF file
if: always()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ yarn build

## License

Nitro is currently licensed under a [Business Source License](./LICENSE), similar to our friends at Uniswap and Aave, with an "Additional Use Grant" to ensure that everyone can have full comfort using and running nodes on all public Arbitrum chains.
Nitro is currently licensed under a [Business Source License](./LICENSE.md), similar to our friends at Uniswap and Aave, with an "Additional Use Grant" to ensure that everyone can have full comfort using and running nodes on all public Arbitrum chains.

The Additional Use Grant also permits the deployment of the Nitro software, in a permissionless fashion and without cost, as a new blockchain provided that the chain settles to either Arbitrum One or Arbitrum Nova.

Expand Down
10 changes: 9 additions & 1 deletion audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@
// Exposure of sensitive information in follow-redirects
"GHSA-74fj-2j2h-c42q",
// Open Zeppelin: Base64 encoding may read from potentially dirty memory
"GHSA-9vx6-7xxf-x967"
"GHSA-9vx6-7xxf-x967",
// semver vulnerable to Regular Expression Denial of Service
"GHSA-c2qf-rxjj-qqgw",
// follow-redirects' Proxy-Authorization header kept across hosts
"GHSA-cxjh-pqwp-8mfp",
// Prototype Pollution in async
"GHSA-fwr7-v2mv-hh25",
// ws affected by a DoS when handling a request with many HTTP headers
"GHSA-3h5v-q93c-6h6q"
]
}
11 changes: 11 additions & 0 deletions deploy/EigenDARollupManager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = async hre => {
const { deployments, getNamedAccounts, ethers } = hre
const { deploy } = deployments
const { deployer } = await getNamedAccounts()

await deploy('EigenDADummyManager', { from: deployer, args: [] })
}

module.exports.tags = ['EigenDADummyManager']
module.exports.dependencies = []

1 change: 1 addition & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import '@nomiclabs/hardhat-etherscan'
import '@typechain/hardhat'
import 'solidity-coverage'
import 'hardhat-gas-reporter'
import 'hardhat-contract-sizer'
import 'hardhat-ignore-warnings'
// import '@tovarishfin/hardhat-yul';
import dotenv from 'dotenv'
Expand Down
Empty file added hello.txt
Empty file.
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arbitrum/nitro-contracts",
"version": "1.2.1",
"version": "2.0.0-beta.1",
"description": "Layer 2 precompiles and rollup for Arbitrum Nitro",
"author": "Offchain Labs, Inc.",
"license": "BUSL-1.1",
Expand All @@ -26,6 +26,7 @@
"build:forge:sol": "forge build --skip *.yul",
"build:forge:yul": "FOUNDRY_PROFILE=yul forge build --skip *.sol",
"build:forge": "yarn build:forge:sol && yarn build:forge:yul",
"contract:size": "STRICT=true hardhat size-contracts",
"lint:test": "eslint ./test",
"solhint": "solhint -f table src/**/*.sol",
"prettier:solidity": "prettier --write src/**/*.sol",
Expand All @@ -42,23 +43,23 @@
"deploy-factory": "hardhat run scripts/deployment.ts",
"deploy-eth-rollup": "hardhat run scripts/createEthRollup.ts",
"deploy-erc20-rollup": "hardhat run scripts/createERC20Rollup.ts",
"create-rollup-testnode": "hardhat run scripts/local-deployment/deployCreatorAndCreateRollup.ts"
"create-rollup-testnode": "hardhat run scripts/local-deployment/deployCreatorAndCreateRollup.ts",
"deploy-cachemanager-testnode": "hardhat run scripts/local-deployment/deployCacheManager.ts"
},
"dependencies": {
"@eigenda/eigenda-utils": "2.0.0",
"@grpc/grpc-js": "^1.8.22",
"@grpc/proto-loader": "^0.7.13",
"@offchainlabs/upgrade-executor": "1.1.0-beta.0",
"@openzeppelin-upgrades/contracts": "npm:@openzeppelin/contracts-upgradeable@4.7",
"@openzeppelin/contracts": "4.7",
"@openzeppelin/contracts-upgradeable": "4.7",
"google-protobuf": "^3.21.2",
"@openzeppelin/contracts": "4.7.0",
"@openzeppelin/contracts-upgradeable": "4.7.2",
"patch-package": "^6.4.7",
"solady": "0.0.182"
},
"private": false,
"devDependencies": {
"@arbitrum/sdk": "^3.1.3",
"@arbitrum/sdk": "^3.4.1",
"@ethersproject/providers": "^5.7.2",
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13",
"@nomiclabs/hardhat-etherscan": "^3.1.0",
Expand All @@ -83,6 +84,7 @@
"ethereum-waffle": "^4.0.10",
"ethers": "^5.5.4",
"hardhat": "^2.17.2",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-deploy": "^0.11.37",
"hardhat-gas-reporter": "^1.0.9",
"hardhat-ignore-warnings": "^0.2.9",
Expand Down
53 changes: 51 additions & 2 deletions scripts/deploymentUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ import {
bytecode as UpgradeExecutorBytecode,
} from '@offchainlabs/upgrade-executor/build/contracts/src/UpgradeExecutor.sol/UpgradeExecutor.json'
import { Toolkit4844 } from '../test/contract/toolkit4844'
import { ArbSys__factory } from '../build/types'
import { ARB_SYS_ADDRESS } from '@arbitrum/sdk/dist/lib/dataEntities/constants'
import {
ArbOwner__factory,
ArbSys__factory,
CacheManager__factory,
} from '../build/types'

const INIT_CACHE_SIZE = 536870912
const INIT_DECAY = 10322197911
const ARB_OWNER_ADDRESS = '0x0000000000000000000000000000000000000070'
const ARB_SYS_ADDRESS = '0x0000000000000000000000000000000000000064'

// Define a verification function
export async function verifyContract(
Expand Down Expand Up @@ -241,6 +249,47 @@ export async function deployAllContracts(
}
}

export async function deployAndSetCacheManager(
chainOwnerWallet: any,
verify: boolean = true
) {
const cacheManagerLogic = await deployContract(
'CacheManager',
chainOwnerWallet,
[],
verify
)

const proxyAdmin = await deployContract(
'ProxyAdmin',
chainOwnerWallet,
[],
verify
)

const cacheManagerProxy = await deployContract(
'TransparentUpgradeableProxy',
chainOwnerWallet,
[cacheManagerLogic.address, proxyAdmin.address, '0x'],
verify
)

const cacheManager = CacheManager__factory.connect(
cacheManagerProxy.address,
chainOwnerWallet
)

await (await cacheManager.initialize(INIT_CACHE_SIZE, INIT_DECAY)).wait()

const arbOwner = ArbOwner__factory.connect(
ARB_OWNER_ADDRESS,
chainOwnerWallet
)
await (await arbOwner.addWasmCacheManager(cacheManagerProxy.address)).wait()

return cacheManagerProxy
}

// Check if we're deploying to an Arbitrum chain
export async function _isRunningOnArbitrum(signer: any): Promise<boolean> {
const arbSys = ArbSys__factory.connect(ARB_SYS_ADDRESS, signer)
Expand Down
17 changes: 0 additions & 17 deletions scripts/genNetwork.ts

This file was deleted.

32 changes: 32 additions & 0 deletions scripts/local-deployment/deployCacheManager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { ethers } from 'hardhat'
import '@nomiclabs/hardhat-ethers'
import { deployAndSetCacheManager } from '../deploymentUtils'

async function main() {
/// read env vars needed for deployment
let chainOwnerPrivKey = process.env.CHAIN_OWNER_PRIVKEY as string
if (!chainOwnerPrivKey) {
throw new Error('CHAIN_OWNER_PRIVKEY not set')
}

const childChainRpc = process.env.CHILD_CHAIN_RPC as string
if (!childChainRpc) {
throw new Error('CHILD_CHAIN_RPC not set')
}

const chainOwnerWallet = new ethers.Wallet(
chainOwnerPrivKey,
new ethers.providers.JsonRpcProvider(childChainRpc)
)

// deploy cache manager
const cacheManager = await deployAndSetCacheManager(chainOwnerWallet, false)
console.log('Cache manager deployed at:', cacheManager.address)
}

main()
.then(() => process.exit(0))
.catch((error: Error) => {
console.error(error)
process.exit(1)
})
1 change: 0 additions & 1 deletion scripts/local-deployment/deployCreatorAndCreateRollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ async function main() {
if (!feeToken) {
feeToken = ethers.constants.AddressZero
}
console.log('Fee token address:', feeToken)

/// deploy templates and rollup creator
console.log('Deploy RollupCreator')
Expand Down
Loading
Loading