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

Release: v3.2.4-mainnet #84

Merged
merged 88 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
57cab78
fix(MainchainGatewayV3): more checks on invalid signer and null total…
TuDo1403 Aug 7, 2024
e33ff8b
fix(MainchainGatewayV3): rename accWeight -> accumWeight
TuDo1403 Aug 7, 2024
790e10a
fix(MainchainGatewayV3): rename ErrInvalidSignature -> ErrInvalidSigner
TuDo1403 Aug 7, 2024
bd38460
fix(GatewayV3): revert on null min vote weight
TuDo1403 Aug 7, 2024
761d9e7
Merge pull request #63 from ronin-chain/mainnet
nxqbao Aug 8, 2024
0d1c8f0
script: proposal for invoke add operators callback
nxqbao Aug 7, 2024
c8fb983
script: add upgrade mainchain gateway v3 to proposal
Aug 8, 2024
acad51e
fix(WithdrawalLimitation): revert when _highTierVoteWeight is zero
Aug 9, 2024
2347580
script: add broadcast `propose`
nxqbao Aug 9, 2024
47b39d0
script: add more post check gateway
Aug 9, 2024
b799d8d
Merge pull request #58 from ronin-chain/fix/improve-submit-withdrawal…
TuDo1403 Aug 12, 2024
b06c11c
script: remove new BM logic
nxqbao Aug 12, 2024
27b69a9
script: add executor
Aug 12, 2024
132fcc6
Merge pull request #65 from ronin-chain/ir/recover-bridge
TuDo1403 Aug 12, 2024
6812048
test: fix all failed unit tests
Aug 15, 2024
f259f17
ci: fix ci
TuDo1403 Aug 19, 2024
6e7668f
ci: run test when pr to release/* branch
TuDo1403 Aug 19, 2024
4966566
Merge pull request #66 from ronin-chain/test/fix-broken-unit-tests
TuDo1403 Aug 20, 2024
ecb8f2b
fix(MainchainGateway): rollback IWETH
nxqbao Aug 22, 2024
f96667d
feat: remove `requestDepositForBatch`
nxqbao Aug 22, 2024
7182aa7
fix(MainchainGateway): deprecated var
nxqbao Aug 23, 2024
d2821f0
fix(MainchainGateway): rollback setter and assert of wethUnwrapper
nxqbao Aug 23, 2024
b7982f4
Update src/mainchain/MainchainGatewayV3.sol
nxqbao Aug 23, 2024
f81b08a
Update src/mainchain/MainchainGatewayV3.sol
nxqbao Aug 23, 2024
0e45084
script: expect revert with invalid signer (#68)
nxqbao Aug 23, 2024
4a6ff0f
Merge pull request #72 from ronin-chain/ir/recover-bridge
nxqbao Aug 23, 2024
38098fe
Update src/mainchain/MainchainGatewayV3.sol
nxqbao Aug 23, 2024
1f9cda8
fix(MainchainGatewayV3): rename local var mainchainWETH
nxqbao Aug 23, 2024
2a938d0
Merge branch 'release/v3.2.4' into ir/fix/resolve-audit
nxqbao Aug 23, 2024
abe6b80
Merge pull request #69 from ronin-chain/ir/fix/resolve-audit
nxqbao Aug 23, 2024
ca7b110
script: add more post check in quorum
TuDo1403 Aug 19, 2024
bac6a3f
chore: storage layout
TuDo1403 Aug 19, 2024
88b49b3
update postcheck
TuDo1403 Aug 19, 2024
f72cb11
script: add more post check on proposal
TuDo1403 Aug 20, 2024
195d95f
chore: storage layout
TuDo1403 Aug 20, 2024
3a60b83
script: add more post check on withdraw
TuDo1403 Aug 20, 2024
febd568
script: uncomment validate gateway
TuDo1403 Aug 20, 2024
cd107eb
chore: storage layout
TuDo1403 Aug 20, 2024
9386e85
script: add more post check
TuDo1403 Aug 22, 2024
dd0e0d9
chore: storage layout
TuDo1403 Aug 22, 2024
c09d52e
script: fix case-sensitive cause ci failure
TuDo1403 Aug 22, 2024
eeb7d2c
chore: move prb-test to soldeer
TuDo1403 Aug 22, 2024
3d7bc1d
test: fix test fail
TuDo1403 Aug 22, 2024
e61da0c
ci: setup secret
TuDo1403 Aug 22, 2024
63bd7ee
script: add more post check
TuDo1403 Aug 22, 2024
1711aad
ci: split PostCheck and analyze step in Unittest
huyngopt1994 Aug 23, 2024
b797a96
fix(MainchainGateway): rollback setter and assert of wethUnwrapper
nxqbao Aug 23, 2024
359f9ee
Update src/mainchain/MainchainGatewayV3.sol
nxqbao Aug 23, 2024
1c0c4ea
ci: print detail log
TuDo1403 Aug 23, 2024
57c5c4b
chore: storage layout
TuDo1403 Aug 23, 2024
f59bc24
script: update post check
TuDo1403 Aug 23, 2024
67cf7cf
script: update post check
TuDo1403 Aug 23, 2024
1e08afc
chore: storage layout
TuDo1403 Aug 23, 2024
912c77d
ci: split workflow
TuDo1403 Aug 23, 2024
cca4318
ci: revert on failure
TuDo1403 Aug 23, 2024
82c0f3b
script: update post checl
TuDo1403 Aug 23, 2024
cbf24cf
ci: rename ci
TuDo1403 Aug 23, 2024
7da19a6
ci: new error code
TuDo1403 Aug 23, 2024
0544268
ci: fix ci
TuDo1403 Aug 23, 2024
2bec5e1
ci: fix ci
TuDo1403 Aug 23, 2024
5b64d3b
chore: enhance pre-commit hook
TuDo1403 Aug 23, 2024
49cf228
script: fix post check
TuDo1403 Aug 25, 2024
31603ab
chore: storage layout
TuDo1403 Aug 25, 2024
410f258
script: add ir-recover testnet script
TuDo1403 Aug 25, 2024
4a68d51
script: more check after proposal (#74)
nxqbao Aug 26, 2024
aeb52c4
Merge pull request #67 from ronin-chain/script/add-more-postchecks
TuDo1403 Aug 26, 2024
0ad1f69
script: post check should revert state on mainchain (#76)
TuDo1403 Aug 26, 2024
6029e77
script: more check after proposal (#74)
nxqbao Aug 26, 2024
b32a98b
script: post check should revert state on mainchain (#76)
TuDo1403 Aug 26, 2024
b178693
script: update ir recover script relay on sepolia
TuDo1403 Aug 26, 2024
f4e97cf
script: fix compile error post check
TuDo1403 Aug 26, 2024
a6e506b
script: prank unpause ronin gateway (#77)
nxqbao Aug 26, 2024
34ac2c2
script: fix post check and and more custom postcheck for weth unwrapp…
TuDo1403 Aug 26, 2024
f95b8b1
script: fix relay proposal gas
TuDo1403 Aug 26, 2024
93f3448
Merge branch 'release/v3.2.4' into script/add-ir-recover-testnet-script
TuDo1403 Aug 26, 2024
77b3b4c
chore: add testnet artifact
TuDo1403 Aug 26, 2024
06042a6
Merge pull request #75 from ronin-chain/script/add-ir-recover-testnet…
TuDo1403 Aug 27, 2024
69aa82d
chore: add artifact of mainchain gw
nxqbao Aug 27, 2024
78cd2ef
script: rework factory script allow provide pks via terminal
tringuyenskymavis Aug 27, 2024
81b12db
chore: specify foundry version in CI
tringuyenskymavis Aug 28, 2024
5b14d5c
Merge pull request #80 from ronin-chain/script/rework-factory-script
tringuyenskymavis Aug 28, 2024
2a69b28
chore: add wbtc testnet artifact
TuDo1403 Aug 27, 2024
e06403a
script: map wbtc script 27-08-2024
tringuyenskymavis Aug 27, 2024
6703c74
chore: storage layout
tringuyenskymavis Aug 28, 2024
23a7f31
script: simulate reimburse bridge reward
nxqbao Aug 30, 2024
ab5e46a
Merge pull request #82 from ronin-chain/script/reimburse-bridge-reward
TuDo1403 Sep 5, 2024
9be98bc
Merge pull request #78 from ronin-chain/chore/mainchain-gw-artifact
TuDo1403 Sep 5, 2024
5209a0f
Merge pull request #81 from ronin-chain/script/remap-wbtc-testnet
TuDo1403 Sep 5, 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
65 changes: 65 additions & 0 deletions .github/workflows/post-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Post Check

on:
push:
branches:
- mainnet
- testnet
- "feature/*"
- "features/*"
- "feat/*"
- "feats/*"
pull_request:
branches:
- mainnet
- testnet
- "feature/*"
- "features/*"
- "feat/*"
- "feats/*"
- "release/*"

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

name: Foundry project
runs-on: ubuntu-latest

env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Update package with soldeer
run: forge soldeer update

- name: Recursively update dependencies
run: |
chmod +x ./update-deps.sh
./update-deps.sh
id: update-deps

- name: Run Forge build
run: |
forge --version
forge build
id: build

- name: Run PostCheck CI
run: |
./run.sh PostCheckCI -f ronin-mainnet -vvvv
id: postcheck
71 changes: 71 additions & 0 deletions .github/workflows/slither-analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Slither Analyze

on:
push:
branches:
- mainnet
- testnet
- "feature/*"
- "features/*"
- "feat/*"
- "feats/*"
pull_request:
branches:
- mainnet
- testnet
- "feature/*"
- "features/*"
- "feat/*"
- "feats/*"
- "release/*"

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

name: Foundry project
runs-on: ubuntu-latest

env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Install package with soldeer
run: forge soldeer install

- name: Recursively update dependencies
run: |
chmod +x ./update-deps.sh
./update-deps.sh
id: update-deps

- name: Run Forge build
run: |
forge --version
forge build
id: build

- name: Install Slither for security analysis
run: |
sudo apt-get update
sudo apt-get install -y python3-pip
python3 -m pip install slither-analyzer

- name: Run Slither analysis
run: |
slither . --exclude-low --exclude-medium --exclude-informational --exclude-dependencies --filter-paths "dependencies/|mocks/" --exclude-optimization
id: slither
35 changes: 25 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
name: test
name: Unit Test

on:
push:
branches:
- mainnet
- testnet
- 'feature/*'
- 'features/*'
- 'feat/*'
- 'feats/*'
- "feature/*"
- "features/*"
- "feat/*"
- "feats/*"
pull_request:
branches:
- mainnet
- testnet
- 'feature/*'
- 'features/*'
- 'feat/*'
- 'feats/*'
- "feature/*"
- "features/*"
- "feat/*"
- "feats/*"
- "release/*"

env:
FOUNDRY_PROFILE: ci
Expand All @@ -28,6 +29,11 @@ jobs:

name: Foundry project
runs-on: ubuntu-latest

env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -36,7 +42,16 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
version: nightly-2b1f8d6dd90f9790faf0528e05e60e573a7569ce

- name: Install package with soldeer
run: forge soldeer install

- name: Recursively update dependencies
run: |
chmod +x ./update-deps.sh
./update-deps.sh
id: update-deps

- name: Run Forge build
run: |
Expand Down
7 changes: 0 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
[submodule "lib/prb-test"]
branch = release-v0
path = lib/prb-test
url = https://github.com/PaulRBerg/prb-test
[submodule "lib/prb-math"]
path = lib/prb-math
url = https://github.com/PaulRBerg/prb-math
branch = release-v4
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
11 changes: 9 additions & 2 deletions .husky/generate-layout.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
#!/bin/sh

rm -rf logs/storage/*

dirOutputs=$(ls out | grep '^[^.]*\.sol$') # assuming the out dir is at 'out'

while IFS= read -r contractDir; do
innerdirOutputs=$(ls out/$contractDir)
innerDirOutputs=$(ls out/$contractDir)

# Skip if folder ends with .s.sol
if [[ $contractDir == *".s.sol" ]]; then
continue
fi

while IFS= read -r jsonFile; do
fileIn=out/$contractDir/$jsonFile
fileOut=logs/storage/$contractDir:${jsonFile%.json}.log
node .husky/storage-logger.js $fileIn $fileOut &
done <<< "$innerdirOutputs"
done <<< "$innerDirOutputs"
done <<< "$dirOutputs"

# Wait for all background jobs to finish
Expand Down
4 changes: 2 additions & 2 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ stashed=true
if [[ $output == *"No local changes to save"* ]]; then
stashed=false
fi
forge build --skip test script --sizes 2>&1 | sed -n '/Contract/,$p' > logs/contract-code-sizes.log
forge build --skip test --skip script --sizes 2>&1 | sed -n '/Contract/,$p' >logs/contract-code-sizes.log
.husky/generate-layout.sh

git add logs
Expand All @@ -21,5 +21,5 @@ if [ "$line_count" -gt 1 ]; then
fi

if $stashed; then
git stash pop
git stash pop
fi

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions broadcast/20240807-random-proposal.s.sol/2021/run-1724731787.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"transactions": [
{
"hash": null,
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf",
"function": "proposeProposalForCurrentNetwork(uint256,address,address[],uint256[],bytes[],uint256[],uint8)",
"arguments": [
"1724818166",
"0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa",
"[0x0000000000000000000000000000000000000000]",
"[0]",
"[0x]",
"[0]",
"0"
],
"transaction": {
"from": "0xd24d87ddc1917165435b306aac68d99e0f49a3fa",
"to": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf",
"gas": "0x6e592",
"value": "0x0",
"input": "0xdd1f89140000000000000000000000000000000000000000000000000000000066cea2f6000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x272",
"chainId": "0x7e5"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1724731787,
"chain": 2021,
"commit": "77b3b4c"
}
101 changes: 101 additions & 0 deletions broadcast/20240807-random-proposal.s.sol/2021/run-1724731847.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"transactions": [
{
"hash": "0x43113e3e96a385785edc5e71c18aae40ea6050bd09b04c0afdcd93274243be39",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf",
"function": "proposeProposalForCurrentNetwork(uint256,address,address[],uint256[],bytes[],uint256[],uint8)",
"arguments": [
"1724818220",
"0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa",
"[0x0000000000000000000000000000000000000000]",
"[0]",
"[0x]",
"[0]",
"0"
],
"transaction": {
"from": "0xd24d87ddc1917165435b306aac68d99e0f49a3fa",
"to": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf",
"gas": "0x6e592",
"value": "0x0",
"input": "0xdd1f89140000000000000000000000000000000000000000000000000000000066cea32c000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x272",
"chainId": "0x7e5"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x3c539",
"logs": [
{
"address": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf",
"topics": [
"0x58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a55",
"0x0000000000000000000000000000000000000000000000000000000000000000"
],
"data": "0x",
"blockHash": "0x79f3cda27dec1679059ef0be6829fab97ab767d402475084f79f11f072f99ae2",
"blockNumber": "0x1ceccae",
"transactionHash": "0x43113e3e96a385785edc5e71c18aae40ea6050bd09b04c0afdcd93274243be39",
"transactionIndex": "0x1",
"logIndex": "0x1",
"removed": false
},
{
"address": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf",
"topics": [
"0xd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4",
"0x00000000000000000000000000000000000000000000000000000000000007e5",
"0x0000000000000000000000000000000000000000000000000000000000000006",
"0xf25c395a99ca363e43d15bedccc359f8c471b9883dbbc2fa8f49e829f9848d09"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000066cea32c000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x79f3cda27dec1679059ef0be6829fab97ab767d402475084f79f11f072f99ae2",
"blockNumber": "0x1ceccae",
"transactionHash": "0x43113e3e96a385785edc5e71c18aae40ea6050bd09b04c0afdcd93274243be39",
"transactionIndex": "0x1",
"logIndex": "0x2",
"removed": false
},
{
"address": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf",
"topics": [
"0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23",
"0xf25c395a99ca363e43d15bedccc359f8c471b9883dbbc2fa8f49e829f9848d09",
"0x000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064",
"blockHash": "0x79f3cda27dec1679059ef0be6829fab97ab767d402475084f79f11f072f99ae2",
"blockNumber": "0x1ceccae",
"transactionHash": "0x43113e3e96a385785edc5e71c18aae40ea6050bd09b04c0afdcd93274243be39",
"transactionIndex": "0x1",
"logIndex": "0x3",
"removed": false
}
],
"logsBloom": "0x00000000000400010000000000100000000040000000000000000000000000000000000000000000100000000000000000000000000400000000010000000000000000000004000000400000000000000000000000000000000000000000000000000000020080000000000000000800000000040000000000000000000000000000000400000000000000000000000000000000000000000000000005000000000000000000000000008000000000000000020400008000000000080000000000000000000000000010000000000000000000002000000000000000000020000000000000004000000000000000000000000000040000000000080000000000",
"type": "0x0",
"transactionHash": "0x43113e3e96a385785edc5e71c18aae40ea6050bd09b04c0afdcd93274243be39",
"transactionIndex": "0x1",
"blockHash": "0x79f3cda27dec1679059ef0be6829fab97ab767d402475084f79f11f072f99ae2",
"blockNumber": "0x1ceccae",
"gasUsed": "0x33edc",
"effectiveGasPrice": "0x4a817c800",
"from": "0xd24d87ddc1917165435b306aac68d99e0f49a3fa",
"to": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf",
"contractAddress": null
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1724731847,
"chain": 2021,
"commit": "77b3b4c"
}
Loading
Loading