Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

[Do not merge] Nitro Stylus Diff #22

Draft
wants to merge 687 commits into
base: nitro-stylus-split
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
687 commits
Select commit Hold shift + click to select a range
de1687a
new ArbWasm methods
rachel-bousfield Jan 5, 2024
f09a360
keepalive method
rachel-bousfield Jan 5, 2024
f2a14c6
ArbOwner methods
rachel-bousfield Jan 5, 2024
c1ca7ce
Clarify that we're iterating over bits
PlasmaPower Jan 8, 2024
a952917
docstrings & errors
rachel-bousfield Jan 9, 2024
56e15c4
initGas
rachel-bousfield Jan 9, 2024
7f4dffc
Pull out modExp256 into function
PlasmaPower Jan 9, 2024
f265777
Merge pull request #103 from OffchainLabs/change-date-2028
rachel-bousfield Jan 9, 2024
5ac7553
Merge pull request #26 from OffchainLabs/change-date-2028
rachel-bousfield Jan 9, 2024
154e95b
Fix formatting
PlasmaPower Jan 10, 2024
f271a78
Merge pull request #28 from OffchainLabs/activation-pricing
rachel-bousfield Jan 11, 2024
3b38b30
Address some PR comments
PlasmaPower Jan 16, 2024
95ed12b
Add additional comment explaining proof data
PlasmaPower Jan 16, 2024
7364128
Require blsModulus matches expected value
PlasmaPower Jan 16, 2024
61197ba
Fix comparison in comment
PlasmaPower Jan 16, 2024
45f280e
Merge branch 'develop' into seq-inbox-tests
gzeoneth Jan 16, 2024
929860b
Merge branch 'develop' into kzg-proof
gzeoneth Jan 16, 2024
235bc45
fix: test account init
gzeoneth Jan 16, 2024
7f4b442
Merge pull request #95 from OffchainLabs/seq-inbox-tests
gzeoneth Jan 16, 2024
4f6aeb8
account_code checks
Jan 9, 2024
3b59719
refactor: remove sequencer immutable optimation
gzeoneth Jan 18, 2024
9bcde9e
Merge remote-tracking branch 'origin/develop' into 4844-only-2
gzeoneth Jan 18, 2024
a4e709c
chore: remove dot file
gzeoneth Jan 18, 2024
50221f8
Merge branch 'develop' into kzg-proof
gzeoneth Jan 18, 2024
b2b52d9
Merge pull request #104 from OffchainLabs/kzg-proof
gzeoneth Jan 18, 2024
0e733fc
Added both block basefee and blob basefee to batch spending report
yahgwai Jan 18, 2024
0efe90c
Updated gas refunder for blob costs
yahgwai Jan 17, 2024
e6871c5
Moved gas refund enabled to separate file to for interface compatibil…
yahgwai Jan 17, 2024
798934b
Merge remote-tracking branch 'origin/develop' into 4844-only
gzeoneth Jan 18, 2024
e3cc721
fix: add DelegateCallAware
gzeoneth Jan 18, 2024
6f7e2c1
Update readme and license for AEP
hkalodner Jan 18, 2024
750a54e
Merge pull request #113 from OffchainLabs/aep-update
hkalodner Jan 18, 2024
d31cdff
Fix typo in BSL
hkalodner Jan 18, 2024
38a70a5
Fix AEP link
hkalodner Jan 18, 2024
dcb688b
Include blob cost in extraGas field of batch posting reports
PlasmaPower Jan 19, 2024
b95ab08
Expect extraGas field in batch posting report
PlasmaPower Jan 19, 2024
5989fe0
chore: revert SequencerInboxStub changes
gzeoneth Jan 19, 2024
cb4fe67
Merge branch '4844-only' into blob-extra-gas
PlasmaPower Jan 19, 2024
77ce30e
Fix expected log in SequencerInboxTest
PlasmaPower Jan 19, 2024
ab7df1b
Moved 4844 readers into a single yul contract - reduces stack size in…
yahgwai Jan 19, 2024
fec2e1e
Merge from 4844-only
yahgwai Jan 19, 2024
229b43a
Formatting
yahgwai Jan 19, 2024
d07138c
Formatting
yahgwai Jan 19, 2024
4d91bc1
test: fix
gzeoneth Jan 19, 2024
7957bf7
test: fix 4844
gzeoneth Jan 19, 2024
c39bbdf
Merge branch '4844-only' into batch-poster-manager
gzeoneth Jan 19, 2024
11b105a
fix: various
gzeoneth Jan 19, 2024
d843ac7
fix: set batch poster manager in rollup creator
gzeoneth Jan 19, 2024
477b16f
fix: solhint
gzeoneth Jan 19, 2024
b0c43dc
Merge pull request #114 from OffchainLabs/blob-extra-gas
gzeoneth Jan 19, 2024
62a06a5
Merge remote-tracking branch 'origin/4844-only' into 4844-gas-refunder
gzeoneth Jan 19, 2024
a8e7709
Merge pull request #111 from OffchainLabs/4844-gas-refunder
gzeoneth Jan 19, 2024
5f1d5f5
Add safety checks to Reader4844.yul
PlasmaPower Jan 19, 2024
ac03c0e
Use solc's formatting for Yul
PlasmaPower Jan 19, 2024
5bfc19a
Merge pull request #115 from OffchainLabs/reader-4844-safety
gzeoneth Jan 20, 2024
b43718a
Update src/bridge/SequencerInbox.sol
yahgwai Jan 22, 2024
9ee895e
Added postupgradeinit for the challenge manafer
yahgwai Jan 22, 2024
dd3d8ba
Formatting
yahgwai Jan 22, 2024
86390e6
Added postupgradeinit tests
yahgwai Jan 22, 2024
0e3d3e0
Add unit test for fee token based chain
gvladika Jan 12, 2024
c0ef200
Add test for arbitrum hosted ETH-based chain
gvladika Jan 12, 2024
c7a03ef
Make it more readable
gvladika Jan 12, 2024
d9e7a30
Add missing deployment block
gvladika Jan 12, 2024
0685d07
Instead of reporting 0 basefee, don't send report at all in case fee …
gvladika Jan 22, 2024
d78ecb2
Add KZG preimage proof
PlasmaPower Jan 2, 2024
1acb8f0
Clarify that we're iterating over bits
PlasmaPower Jan 8, 2024
81e493e
Pull out modExp256 into function
PlasmaPower Jan 9, 2024
d6b1e5f
Fix formatting
PlasmaPower Jan 10, 2024
60cf250
Address some PR comments
PlasmaPower Jan 16, 2024
871b328
Add additional comment explaining proof data
PlasmaPower Jan 16, 2024
eb4d05a
Require blsModulus matches expected value
PlasmaPower Jan 16, 2024
b7c9bb5
Fix comparison in comment
PlasmaPower Jan 16, 2024
458b272
Make 'isUsingFeeToken' immutable to avoid nativeToken() calls
gvladika Jan 22, 2024
5cbeb97
Add constructor/initialization unit tests
gvladika Jan 22, 2024
2dc88d7
Add import
gvladika Jan 22, 2024
142e758
Merge pull request #116 from OffchainLabs/4844-chalman-update
yahgwai Jan 22, 2024
56ffcfb
Merge branch 'develop' into fee-token-reports
gvladika Jan 22, 2024
43bf9a8
add datafee
rachel-bousfield Jan 22, 2024
c47d917
add comment
rachel-bousfield Jan 22, 2024
342c460
Merge pull request #29 from OffchainLabs/add-datafee
rachel-bousfield Jan 22, 2024
2ba6315
add keepalive event
rachel-bousfield Jan 23, 2024
b454b21
rename programLifetimeExtended
rachel-bousfield Jan 23, 2024
04cb3e5
Merge pull request #30 from OffchainLabs/keepalive-event
rachel-bousfield Jan 23, 2024
00d4d62
Use 0x50 as the header byte for 4844 batches
PlasmaPower Jan 23, 2024
66aba4e
test: update DATA_BLOB_HEADER_FLAG
gzeoneth Jan 23, 2024
6822d51
Merge pull request #118 from OffchainLabs/4844-0x50
gzeoneth Jan 23, 2024
620d60e
Merge branch '4844-only' into fee-token-reports
gvladika Jan 23, 2024
7e41d6a
Format and remove unnecessary
gvladika Jan 23, 2024
95444d5
Format
gvladika Jan 23, 2024
e253b8b
Support zero basefee for gas estimation
PlasmaPower Jan 24, 2024
cd5093d
Fix SequencerInboxStubCreator
PlasmaPower Jan 24, 2024
d5d576f
Merge pull request #119 from OffchainLabs/zero-basefee
gzeoneth Jan 24, 2024
e3a656e
Merge pull request #120 from OffchainLabs/fix-stub-creator
gzeoneth Jan 24, 2024
50e7ab4
Merge branch '4844-only' into fee-token-reports
gzeoneth Jan 24, 2024
6a6cd17
fix: stub creator
gzeoneth Jan 24, 2024
12d7a3f
Removed TODOs
yahgwai Jan 24, 2024
d63b064
Increased data size
yahgwai Jan 24, 2024
ecca913
fix: txorigin as spender
gzeoneth Jan 24, 2024
58c6008
chore: deprecate old method
gzeoneth Jan 24, 2024
0a6322f
fix: duplicated declaration
gzeoneth Jan 24, 2024
201890e
refactor: move blob gas logic
gzeoneth Jan 24, 2024
e5c5af2
format: fix
gzeoneth Jan 24, 2024
22dd3a7
docs: more comment
gzeoneth Jan 24, 2024
cc976ab
docs: comments
gzeoneth Jan 24, 2024
86b2b09
Merge pull request #121 from OffchainLabs/4844-blob-spend
gzeoneth Jan 24, 2024
7c841ee
Merge pull request #109 from OffchainLabs/4844-only
gzeoneth Jan 24, 2024
7364e6a
Merge remote-tracking branch 'origin/develop' into batch-poster-manager
gzeoneth Jan 24, 2024
daf757c
Merge remote-tracking branch 'origin/develop' into fee-token-reports
gzeoneth Jan 24, 2024
80d5415
fix: disable fee token blob spending report
gzeoneth Jan 24, 2024
b4c739f
Merge pull request #108 from OffchainLabs/fee-token-reports
gzeoneth Jan 24, 2024
14d2cd4
Merge remote-tracking branch 'origin/develop' into batch-poster-manager
gzeoneth Jan 24, 2024
c755485
Merge pull request #74 from OffchainLabs/batch-poster-manager
gzeoneth Jan 24, 2024
a71cd7d
Updated 4844 test for custom fee token arg
yahgwai Jan 26, 2024
75346fb
Merge pull request #124 from OffchainLabs/missing-4844-flag
yahgwai Jan 26, 2024
7b84be5
Add missing getters for L1 pricing parameters to ArbGasInfo
PlasmaPower Jan 28, 2024
f28f248
Add comments noting precompile methods are new to ArbOS 20
PlasmaPower Jan 28, 2024
6e61fdb
Add ArbOS precompile method to get scheduled upgrade
PlasmaPower Jan 28, 2024
9a6bfad
Fix formatting
PlasmaPower Jan 28, 2024
a099703
Merge pull request #126 from OffchainLabs/scheduled-upgrade-getter
PlasmaPower Jan 29, 2024
4c4ba8b
Merge branch 'develop' into missing-l1-pricing-getters
gzeoneth Jan 29, 2024
0708a1c
Merge pull request #125 from OffchainLabs/missing-l1-pricing-getters
gzeoneth Jan 30, 2024
39ab455
Merge remote-tracking branch 'stylus/stylus' into hostio-code
rachel-bousfield Jan 30, 2024
900e094
improve spacing
rachel-bousfield Jan 30, 2024
8364145
Merge branch 'main' into develop; fix license conflict
DZGoldman Jan 30, 2024
f6aae2c
Merge pull request #127 from OffchainLabs/develop-main
DZGoldman Jan 30, 2024
c455e98
Merge pull request #27 from OffchainLabs/hostio-code
rachel-bousfield Jan 30, 2024
adc095c
Add contract to test pending block's time and number advance
ganeshvanahalli Feb 2, 2024
e78e2c6
fix name
ganeshvanahalli Feb 2, 2024
3c31d2a
refactor
ganeshvanahalli Feb 2, 2024
38efd0b
chore: remove sol2uml
gzeoneth Feb 5, 2024
76d541c
Merge pull request #134 from OffchainLabs/remove-sol2uml
hkalodner Feb 5, 2024
41b3de9
machine: support multistack in hashes and proofs
tsahee Jan 29, 2024
9554740
remove error guard's enable
tsahee Jan 30, 2024
b0a14ee
fix introducing cothreads
tsahee Jan 30, 2024
ee178c8
add cothread onestepproofs
tsahee Jan 30, 2024
c735bd2
removing error guard
tsahee Feb 1, 2024
76d8d07
fix cothread support, use recoveryPc
tsahee Feb 7, 2024
52ccb26
fix: yarn format and build warnings
gzeoneth Feb 9, 2024
bf96228
fix: solhint warnings
gzeoneth Feb 9, 2024
8871a4a
fix: eslint warnings
gzeoneth Feb 9, 2024
637f953
fmt: spacing
gzeoneth Feb 9, 2024
29642b4
test: fix
gzeoneth Feb 9, 2024
31f35e1
test: unused var
gzeoneth Feb 9, 2024
f3a1326
chore: swap ignore
gzeoneth Feb 9, 2024
7300d7c
release: 1.2.0
gzeoneth Feb 9, 2024
dcc5106
Merge pull request #137 from OffchainLabs/fix-lint-warnings
gzeoneth Feb 9, 2024
5061cad
Merge remote-tracking branch 'origin/main' into develop
gzeoneth Feb 9, 2024
5ebb128
Merge pull request #138 from OffchainLabs/merge-main
gzeoneth Feb 9, 2024
cd79324
refactor: deployment utils
gzeoneth Feb 12, 2024
07698cf
deploy: 4844 upgrade
gzeoneth Feb 12, 2024
590e3ec
chore: add yul build to release
gzeoneth Feb 12, 2024
9a84548
Add reader4844 to deployment script
gvladika Feb 12, 2024
d78de7f
Merge pull request #141 from OffchainLabs/scripts-blob-reader
gzeoneth Feb 12, 2024
2ef39be
fix: struct change
gzeoneth Feb 12, 2024
de9baf6
Merge branch 'deploy-tools' into fix-struct-change
gzeoneth Feb 12, 2024
2c83dec
Properly set seq inbox blob reader
gvladika Feb 13, 2024
3e1dcca
Update script to work with latest design
gvladika Feb 13, 2024
1be15e3
Merge pull request #143 from OffchainLabs/fix-deploy-params
gzeoneth Feb 13, 2024
1ebb4d6
merge audit-ci changes onto develop
DZGoldman Feb 13, 2024
6e15f8a
update audit-ci json
DZGoldman Feb 13, 2024
fac404b
update arbrollup.spec with waffle v4 syntax
DZGoldman Feb 13, 2024
b7925a9
Add check for 4bytes function signatures
gvladika Feb 14, 2024
4fb16f8
Add to CI
gvladika Feb 14, 2024
ca030fd
Update gitignore
gvladika Feb 14, 2024
4446f69
Merge branch 'develop' into sig-ci-check
gvladika Feb 14, 2024
6ba5d9c
Typo
gvladika Feb 14, 2024
e1f83f0
Merge branch 'sig-ci-check' of github.com:OffchainLabs/nitro-contract…
gvladika Feb 14, 2024
16c0e33
multistack: 0 for empty remaining
tsahee Feb 14, 2024
efcc03d
lint
tsahee Feb 14, 2024
2641673
Merge pull request #140 from OffchainLabs/deploy-tools
gzeoneth Feb 15, 2024
649e824
Merge pull request #139 from OffchainLabs/develop
gzeoneth Feb 15, 2024
885bd00
Merge branch 'develop' into fix-struct-change
gzeoneth Feb 15, 2024
fd48ece
Merge branch 'develop' into sig-ci-check
gzeoneth Feb 15, 2024
ecf46de
Merge pull request #145 from OffchainLabs/sig-ci-check
gzeoneth Feb 15, 2024
c6095e7
Merge remote-tracking branch 'origin/develop' into fix-struct-change
gzeoneth Feb 15, 2024
cc34639
chore: 4bytes update
gzeoneth Feb 15, 2024
fa2dafd
chore: remove unused errors
gzeoneth Feb 15, 2024
8e1693b
feat: safe cast in setMaxTimeVariation
gzeoneth Feb 15, 2024
e89e01b
fmt: yarn format
gzeoneth Feb 15, 2024
ca74d31
test: setMaxTimeVariation
gzeoneth Feb 15, 2024
1f8f124
fix: eslint
gzeoneth Feb 15, 2024
399790b
v1.2.1
gzeoneth Feb 15, 2024
7fbbdd4
Merge pull request #142 from OffchainLabs/fix-struct-change
gzeoneth Feb 15, 2024
2e5a2cb
Merge branch 'develop' into audit-ci-dev, fix conflict
DZGoldman Feb 15, 2024
90037b9
Merge pull request #146 from OffchainLabs/develop
gzeoneth Feb 16, 2024
b8a12f1
Merge pull request #144 from OffchainLabs/audit-ci-dev
gzeoneth Feb 21, 2024
7c46876
Merge branch 'develop' into add-pendingblk-blktimeadvance-contract
ganeshvanahalli Feb 21, 2024
f44d525
Basic Slither CI config
gvladika Feb 22, 2024
f61129c
Use sarif
gvladika Feb 22, 2024
1e1bce5
Check if job fails
gvladika Feb 22, 2024
6f3f111
Do not fail
gvladika Feb 22, 2024
8ea61ce
Add slither config
gvladika Feb 22, 2024
b28f0a8
Exclude optimizations
gvladika Feb 22, 2024
d9841e6
Exclude test/mock files
gvladika Feb 22, 2024
2feab15
Upload triage DB
gvladika Feb 22, 2024
ccc3ff2
Add dangerous call to test slither reporter
gvladika Feb 23, 2024
47a597c
Revert "Add dangerous call to test slither reporter"
gvladika Feb 23, 2024
f3973f3
Update config to always upload results
gvladika Feb 23, 2024
9ecaa64
chore: remove hardhat patch
gzeoneth Feb 26, 2024
fd0af84
fix: foundry optimizer_runs
gzeoneth Feb 26, 2024
551da72
Merge pull request #133 from OffchainLabs/add-pendingblk-blktimeadvan…
ganeshvanahalli Feb 27, 2024
be8879c
Merge branch 'remove-hardhat-patch' into fix-audit
gzeoneth Feb 27, 2024
147352e
fix: audit:ci
gzeoneth Feb 27, 2024
409b3e1
ci: unignore advisories
gzeoneth Feb 28, 2024
18b2e79
Merge pull request #152 from OffchainLabs/fix-audit
gzeoneth Feb 28, 2024
bd62252
update yarn audit: OZ base 64
DZGoldman Mar 5, 2024
0f88cf7
Merge pull request #157 from OffchainLabs/oz-audit
gzeoneth Mar 5, 2024
819596d
Merge branch 'develop' into slither-integration
gzeoneth Mar 5, 2024
58b6741
Update triage slither db
gvladika Mar 5, 2024
b3df270
Merge pull request #148 from OffchainLabs/slither-integration
gzeoneth Mar 5, 2024
5666569
fix typo
rachel-bousfield Mar 8, 2024
07b92d0
Merge pull request #32 from OffchainLabs/go-wasi-edits
rachel-bousfield Mar 8, 2024
76e541d
Merge pull request #31 from OffchainLabs/cothread_support
rachel-bousfield Mar 8, 2024
aeaae5d
Merge commit '9a6bfad2363322099d399698751551ff044c7a72' into nitro-2.…
tsahee Mar 11, 2024
11e643e
Add function to test if arbBlockHash on pending block returns latest
ganeshvanahalli Mar 15, 2024
1cab72f
address PR comments
ganeshvanahalli Mar 18, 2024
9cca05a
Merge pull request #34 from OffchainLabs/nitro-2.2.5-merge
rachel-bousfield Apr 3, 2024
d402001
cached init gas
rachel-bousfield Apr 4, 2024
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
70e203b
simple cache manager
rachel-bousfield Apr 8, 2024
b00d781
precompile list method & events
rachel-bousfield 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
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
e3725f7
address review comments
rachel-bousfield Apr 16, 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
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
7 changes: 7 additions & 0 deletions .env.sample.goerli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ROLLUP_CREATOR_ADDRESS=""
ARBISCAN_API_KEY=""
## deployer key
DEVNET_PRIVKEY=""

## optional - address of already deployed ERC20 token which shall be used as rollup's fee token
FEE_TOKEN_ADDRESS=""
48 changes: 48 additions & 0 deletions .github/workflows/audit-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Audit NPM packages

on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- main
- develop

jobs:
install:
name: 'Install'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main

yarn-audit:
name: Audit
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Restore node_modules
uses: OffchainLabs/actions/node-modules/restore@main

- name: Run audit
run: yarn audit:ci
81 changes: 79 additions & 2 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ on:
- develop

jobs:
test-unit:
name: Test unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

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

- name: Install packages
run: yarn

- name: Build
run: forge test
tests:
name: Contract tests
runs-on: ubuntu-8
Expand All @@ -19,14 +44,26 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

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

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install dependencies
run: yarn install

Expand All @@ -37,17 +74,23 @@ jobs:
run: yarn lint:test

- name: Build
run: yarn build
run: yarn build:all

- name: Run tests
run: yarn hardhat --network hardhat test test/contract/*.spec.ts

- name: Interface compatibility
run: yarn run test:compatibility

- name: Forge build
run: forge build

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

- name: Test function signatures
run: yarn run test:signatures

- name: Run coverage
run: yarn hardhat coverage --testfiles "test/contract/*.spec.ts"

Expand All @@ -58,3 +101,37 @@ jobs:
files: ./contracts/coverage.json
verbose: false
token: ${{ secrets.CODECOV_TOKEN }}
test-4844:
name: 4844 tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- uses: OffchainLabs/actions/run-nitro-test-node@test-node-args
with:
nitro-testnode-ref: deneb-integration
args: --pos
no-token-bridge: true

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

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build:all

- name: Test 4844
run: yarn test:4844
24 changes: 24 additions & 0 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Slither Analysis

on:
workflow_dispatch:
pull_request:

jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
sarif: results.sarif
fail-on: medium

- name: Upload SARIF file
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ node_modules/
deployments/
/test/prover/proofs/*.json
/test/prover/spec-proofs/*.json
/test/storage/*-old.dot
/test/storage/*-old
/test/signatures/*-old
scripts/config.ts
forge-cache/
out/
.env
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ coverage/**
deployments/**
src/lib/abi/**
.nyc_output
out/**
lib/**
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
printWidth: 100,
singleQuote: false,
bracketSpacing: false,
compiler: '0.8.6',
compiler: '0.8.9',
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"no-empty-blocks": "off",
"reason-string": ["warn", { "maxLength": 128 }],
"not-rely-on-time": "off",
"max-states-count": ["warn", 30],
"max-states-count": ["warn", 40],
"no-inline-assembly": "off"
},
"plugins": ["prettier"]
Expand Down
34 changes: 18 additions & 16 deletions LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,29 @@ Parameters
Licensor: Offchain Labs

Licensed Work: Arbitrum Nitro Contracts
The Licensed Work is (c) 2021-2023 Offchain Labs
The Licensed Work is (c) 2021-2024 Offchain Labs

Additional Use Grant: You may use the Licensed Work in a production environment solely
to provide a point of interface to permit end users or applications
utilizing the Covered Arbitrum Chains to interact and query the
state of a Covered Arbitrum Chain, including without limitation
validating the correctness of the posted chain state. For purposes
of this Additional Use Grant, the "Covered Arbitrum Chains" are
means (a) Arbitrum One (chainid:42161), Arbitrum Nova (chainid:42170),
Arbitrum Rinkeby testnet/Rinkarby (chainid:421611), and
Arbitrum Nitro Goerli testnet (chainid:421613) (b) any future
blockchains authorized to be designated as Covered Arbitrum Chains
by the decentralized autonomous organization governing the Arbitrum
network; and (c) any “Layer 3” Arbitrum-based blockchain that is built
on and settles to another Covered Arbitrum Chain.





Change Date: Dec 31, 2027
validating the correctness of the posted chain state, or to deploy
and operate (x) a blockchain that settles to a Covered Arbitrum Chain
or (y) a blockchain in accordance with, and subject to, the [Arbitrum
Expansion Program Term of Use](https://docs.arbitrum.foundation/assets/files/Arbitrum%20Expansion%20Program%20Jan182024-4f08b0c2cb476a55dc153380fa3e64b0.pdf). For purposes of this
Additional Use Grant, the "Covered Arbitrum Chains" are
(a) Arbitrum One (chainid:42161), Arbitrum Nova (chainid:42170),
rbitrum Rinkeby testnet/Rinkarby (chainid:421611),Arbitrum Nitro
Goerli testnet (chainid:421613), and Arbitrum Sepolia Testnet
(chainid:421614); (b) any future blockchains authorized to be
designated as Covered Arbitrum Chains by the decentralized autonomous
organization governing the Arbitrum network; and (c) any “Layer 3”
Arbitrum-based blockchain that is built on and settles to another
Covered Arbitrum Chain.



Change Date: Dec 31, 2028

Change License: Apache License Version 2.0

Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,17 @@ cd nitro-contracts
yarn install
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.

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.

For those that prefer to deploy the Nitro software either directly on Ethereum (i.e. an L2) or have it settle to another Layer-2 on top of Ethereum, the [Arbitrum Expansion Program (the "AEP")](https://docs.arbitrum.foundation/assets/files/Arbitrum%20Expansion%20Program%20Jan182024-4f08b0c2cb476a55dc153380fa3e64b0.pdf) was recently established. The AEP allows for the permissionless deployment in the aforementioned fashion provided that 10% of net revenue is contributed back to the Arbitrum community in accordance with the requirements of the AEP.

## Contact

Discord - [Arbitrum](https://discord.com/invite/5KE54JwyTs)

Twitter: [Arbitrum](https://twitter.com/arbitrum)
52 changes: 52 additions & 0 deletions audit-ci.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
"low": true,
"allowlist": [
// OpenZeppelin Contracts's SignatureChecker may revert on invalid EIP-1271 signers
"GHSA-4g63-c64m-25w9",
// OpenZeppelin Contracts's GovernorVotesQuorumFraction updates to quorum may affect past defeated proposals
"GHSA-xrc4-737v-9q75",
// OpenZeppelin Contracts's ERC165Checker may revert instead of returning false
"GHSA-qh9x-gcfh-pcrw",
// OpenZeppelin Contracts vulnerable to ECDSA signature malleability. Only an issue for the functions that take a single `bytes` argument, and not the functions that take `r, v, s` or `r, vs` as separate arguments.
"GHSA-4h98-2769-gh6h",
// GovernorCompatibilityBravo may trim proposal calldata
"GHSA-93hq-5wgc-jc82",
// OpenZeppelin Contracts ERC165Checker unbounded gas consumption
"GHSA-7grf-83vw-6f5x",
// OpenZeppelin: Using ERC2771Context with a custom forwarder can yield address(0)
"GHSA-g4vp-m682-qqmp",
// OpenZeppelin Contracts TransparentUpgradeableProxy clashing selector calls may not be delegated
"GHSA-mx2q-35m2-x2rh",
// OpenZeppelin Contracts's governor proposal creation may be blocked by frontrunning
"GHSA-5h3x-9wvq-w4m2",
// axios cookies data-privacy issue; used only in hardhat-deploy and sol2uml (dev deps)
"GHSA-wf5p-g6vw-rhxx",
// flat vulnerable to Prototype Pollution
"GHSA-2j2x-2gpw-g8fm",
// regular expression DoS in debug
"GHSA-gxpj-cx7g-858c",
// tough-cookie Prototype Pollution vulnerability; used only via eth-gas-reporter
"GHSA-72xf-g2v4-qvf3",
// minimatch ReDoS vulnerability
"GHSA-f8q6-p94x-37v3",
// Server-Side Request Forgery in Request
"GHSA-p8p7-x288-28g6",
// OpenZeppelin Contracts using MerkleProof multiproofs may allow proving arbitrary leaves for specific trees; unused
"GHSA-wprv-93r4-jj2p",
// follow-redirects improperly handles URLs in the url.parse() function
"GHSA-jchw-25xp-jwwc",
// yargs-parser Vulnerable to Prototype Pollution
"GHSA-p9pc-299p-vxgp",
// Axios vulnerable to Server-Side Request Forgery
"GHSA-4w2v-q235-vp99",
// axios Inefficient Regular Expression Complexity vulnerability
"GHSA-cph5-m8f7-6c5x",
// Exposure of Sensitive Information to an Unauthorized Actor in follow-redirects
"GHSA-pw2r-vq6v-hr8c",
// 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"
]
}
5 changes: 4 additions & 1 deletion deploy/SequencerInbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ module.exports = async hre => {
const { deploy } = deployments
const { deployer } = await getNamedAccounts()

await deploy('SequencerInbox', { from: deployer, args: [] })
const blobBasefeeReader = await ethers.getContract('BlobBasefeeReader')
const dataHashReader = await ethers.getContract('DataHashReader')

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

module.exports.tags = ['SequencerInbox']
Expand Down
Loading
Loading