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

SP1 upgrade #553

Merged
merged 60 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
88ead9f
evm inside risc-v
Sep 10, 2024
85e9c6b
snark prove
Sep 10, 2024
1e374d6
snark prove
Sep 10, 2024
9d8980e
snark prove
Sep 10, 2024
68cc9c6
dev
Sep 11, 2024
871d2f3
dev
Sep 11, 2024
4ecd774
add DA verify
Sep 11, 2024
49a8d51
verify_blob_kzg_proof
Sep 11, 2024
879834d
bls12381 test
Sep 12, 2024
7f1f0c1
tx da encode
Sep 12, 2024
01d2d69
kzg-bls-dev
Sep 12, 2024
e6247d5
zstd test
Sep 13, 2024
96a30e0
suport zstd compressed
Sep 14, 2024
e262698
SP1 Contracts updates (#539)
chengwenxi Sep 18, 2024
4aa11be
dev
Sep 18, 2024
f67e8ef
merge main
Sep 18, 2024
a8ea97f
Merge branch 'feat/sp1' of https://github.com/morph-l2/morph into fea…
Sep 18, 2024
c360807
dev
Sep 18, 2024
a053680
dev
Sep 18, 2024
5aff38a
batch
Sep 18, 2024
c16e19d
plonk
Sep 18, 2024
1583b58
plonk
Sep 18, 2024
9935487
plonk
Sep 18, 2024
92f7a63
plonk
Sep 18, 2024
11a40f9
plonk
Sep 18, 2024
159e5fb
plonk
Sep 18, 2024
448da6f
plonk
Sep 18, 2024
d72a56d
batch verify
Sep 18, 2024
b9eb6c1
Merge branch 'feat/sp1' into sp1-batch
Sep 18, 2024
5077726
plonk app
Sep 18, 2024
413860e
enable plonk
Sep 18, 2024
476aee2
Cleanup contracts (#543)
chengwenxi Sep 18, 2024
436867c
Change batch format (#542)
FletcherMan Sep 19, 2024
f10e092
batch verify
Sep 19, 2024
ecfe8ea
Merge branch 'feat/sp1' into sp1-batch
Sep 19, 2024
0ce4bd1
Fix codec and tests (#544)
chengwenxi Sep 19, 2024
b463664
Restore cargo.lock
Sep 19, 2024
b2b0674
Fix batch hash (#547)
chengwenxi Sep 19, 2024
0d066cf
batch prove
Sep 19, 2024
95a0a39
devnet prove
Sep 19, 2024
8406e55
export verifier
Sep 20, 2024
ed42b3e
plonk-circuits
Sep 23, 2024
329d9c6
Merge branch 'feat/sp1' into sp1-batch
Sep 24, 2024
cd771b7
update rollup contract and bindings
Kukoomomo Sep 24, 2024
0fdb7d9
Cleaning up expired variables (#555)
SegueII Sep 24, 2024
8182a63
Merge branch 'main' into feat/sp1
chengwenxi Sep 25, 2024
7e14ca1
remove used params
Sep 25, 2024
e7a7c69
fix workflow
chengwenxi Sep 25, 2024
9e3a55c
fix workflow
chengwenxi Sep 25, 2024
a90b6ed
fix workflow
chengwenxi Sep 25, 2024
1c96dcb
fix workflow
chengwenxi Sep 25, 2024
257b18c
fix workflow
chengwenxi Sep 25, 2024
b0f8366
check numBlocks max 2 bytes
FletcherMan Sep 26, 2024
f200c02
fix gov deploy
Kukoomomo Sep 26, 2024
70b68bb
remove unnecessary check
Sep 26, 2024
259b33c
delete kzg proof
chengwenxi Sep 27, 2024
c6b69e2
update bindings
Kukoomomo Sep 27, 2024
c3fdb3f
update rollup and bindings
Kukoomomo Sep 27, 2024
7283bd5
Update SP1 verifier (#557)
chengwenxi Sep 27, 2024
a97b710
update dependency
FletcherMan Sep 29, 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
46 changes: 23 additions & 23 deletions .github/workflows/prover.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: Prover

on:
push:
branches:
- main
paths:
- "prover/**"
- ".github/workflows/prover.yaml"
pull_request:
paths:
- "prover/**"
- ".github/workflows/prover.yaml"

defaults:
run:
working-directory: "prover"

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run build
run: make build-prover
# on:
# push:
# branches:
# - main
# paths:
# - "prover/**"
# - ".github/workflows/prover.yaml"
# pull_request:
# paths:
# - "prover/**"
# - ".github/workflows/prover.yaml"
#
# defaults:
# run:
# working-directory: "prover"
#
# jobs:
# check:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v3
# - name: Run build
# run: make build-prover
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################## update dependencies ####################

ETHEREUM_TARGET_VERSION := v0.5.0
TENDERMINT_TARGET_VERSION := v0.3.0
ETHEREUM_TARGET_VERSION := v1.10.14-0.20240928131248-d5897cc977af
TENDERMINT_TARGET_VERSION := v0.3.1

ETHEREUM_MODULE_NAME := github.com/morph-l2/go-ethereum
TENDERMINT_MODULE_NAME := github.com/morph-l2/tendermint
Expand Down Expand Up @@ -128,14 +128,10 @@ go-ubuntu-builder:

################## devnet 4 nodes ####################

devnet-up: submodules go-ubuntu-builder go-rust-builder
devnet-up: submodules go-ubuntu-builder
python3 ops/devnet-morph/main.py --polyrepo-dir=.
.PHONY: devnet-up

devnet-up-mockccc:
python3 ops/devnet-morph/main.py --polyrepo-dir=. --mockccc
.PHONY: devnet-up-mockccc

devnet-up-debugccc:
python3 ops/devnet-morph/main.py --polyrepo-dir=. --debugccc
.PHONY: devnet-up-debugccc
Expand Down Expand Up @@ -179,5 +175,5 @@ start-all-tx-submitter:
done

# build geth
nccc_geth: submodules
geth: submodules
cd go-ethereum && env GO111MODULE=on GOWORK=off go run build/ci.go install ./cmd/geth
7 changes: 6 additions & 1 deletion bindings/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ bindings: \
l2-withdrawlock-erc20-gateway-bindings \
l2-reverse-custom-gateway-bindings \
white-list-bindings \
zk-evm-verifier-bindings \
transparent-upgradeable-proxy-bindings \
proxy-admin-bindings \
morph-token-bindings \
Expand Down Expand Up @@ -153,6 +154,10 @@ l2-reverse-custom-gateway-bindings: compile
white-list-bindings: compile
./gen_bindings.sh contracts/libraries/common/Whitelist.sol:Whitelist $(pkg)

# Library
zk-evm-verifier-bindings: compile
./gen_bindings.sh contracts/libraries/verifier/ZkEvmVerifierV1.sol:ZkEvmVerifierV1 $(pkg)

# Proxy
transparent-upgradeable-proxy-bindings: compile
./gen_bindings.sh node_modules/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy $(pkg)
Expand All @@ -177,7 +182,7 @@ more: compile-forge
go run ./gen/main.go \
-artifacts ../contracts/artifacts \
-out ./bindings \
-contracts ProxyAdmin,TransparentUpgradeableProxy,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,Distribute,L2Staking,Record,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist \
-contracts ProxyAdmin,TransparentUpgradeableProxy,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,Distribute,L2Staking,Record,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist,ZkEvmVerifierV1 \
-package bindings

mkdir:
Expand Down
2 changes: 1 addition & 1 deletion bindings/bin/gov_deployed.hex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/bin/multipleversionrollupverifier_deployed.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0x608060405234801561000f575f80fd5b50600436106100c4575f3560e01c8063955123061161007d578063c7065b6a11610058578063c7065b6a146101da578063cb23bcb514610227578063f2fde38b14610247575f80fd5b8063955123061461016c578063bd98b2b01461017f578063c4d66de8146101c7575f80fd5b80635027ad2e116100ad5780635027ad2e1461011a578063715018a6146101475780638da5cb5b1461014f575f80fd5b806328aee03f146100c85780632c09a84814610105575b5f80fd5b6100db6100d6366004610a50565b61025a565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610118610113366004610a70565b610397565b005b610139610128366004610af0565b5f9081526002602052604090205490565b6040519081526020016100fc565b61011861042f565b5f5473ffffffffffffffffffffffffffffffffffffffff166100db565b61011861017a366004610b2f565b610442565b61019261018d366004610a50565b610779565b6040805167ffffffffffffffff909316835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016100fc565b6101186101d5366004610b76565b6107d1565b6101926101e8366004610af0565b60036020525f908152604090205467ffffffffffffffff81169068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6001546100db9073ffffffffffffffffffffffffffffffffffffffff1681565b610118610255366004610b76565b6108a5565b5f82815260036020908152604080832081518083019092525467ffffffffffffffff81168083526801000000000000000090910473ffffffffffffffffffffffffffffffffffffffff16928201929092529083101561038c575f84815260026020526040902054805b8015610389575f86815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830190811061030a5761030a610b96565b5f9182526020918290206040805180820190915291015467ffffffffffffffff81168083526801000000000000000090910473ffffffffffffffffffffffffffffffffffffffff16928201929092529350851015610389577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016102c3565b50505b602001519392505050565b5f6103a2868661025a565b6040517f6b40634100000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff821690636b406341906103fb90879087908790600401610bc3565b5f6040518083038186803b158015610411575f80fd5b505afa158015610423573d5f803e3d5ffd5b50505050505050505050565b61043761095c565b6104405f6109dc565b565b61044a61095c565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663059def616040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104b4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d89190610c18565b8267ffffffffffffffff161161051a576040517f9a4ff10400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8381526003602090815260409182902082518084019093525467ffffffffffffffff8082168085526801000000000000000090920473ffffffffffffffffffffffffffffffffffffffff169284019290925290841610156105a8576040517fb0d8c70400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166105f5576040517fa7f9319d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805167ffffffffffffffff808516911610156106ba57602081015173ffffffffffffffffffffffffffffffffffffffff16156106ac575f84815260026020908152604082208054600181018255908352918190208351920180549184015173ffffffffffffffffffffffffffffffffffffffff1668010000000000000000027fffffffff0000000000000000000000000000000000000000000000000000000090921667ffffffffffffffff909316929092171790555b67ffffffffffffffff831681525b73ffffffffffffffffffffffffffffffffffffffff82811660208381018281525f8881526003835260409081902086518154935190961668010000000000000000027fffffffff0000000000000000000000000000000000000000000000000000000090931667ffffffffffffffff96871617929092179091558051888152938716918401919091528201527f7a98750a395b9ee50a2644ffda039e31f1d5d06de45510275f972bb20b229b309060600160405180910390a150505050565b6002602052815f5260405f208181548110610792575f80fd5b5f9182526020909120015467ffffffffffffffff8116925068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff16905082565b6107d961095c565b60015473ffffffffffffffffffffffffffffffffffffffff161561085e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f696e697469616c697a656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6108ad61095c565b73ffffffffffffffffffffffffffffffffffffffff8116610950576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610855565b610959816109dc565b50565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610855565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f8060408385031215610a61575f80fd5b50508035926020909101359150565b5f805f805f60808688031215610a84575f80fd5b8535945060208601359350604086013567ffffffffffffffff80821115610aa9575f80fd5b818801915088601f830112610abc575f80fd5b813581811115610aca575f80fd5b896020828501011115610adb575f80fd5b96999598505060200195606001359392505050565b5f60208284031215610b00575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b2a575f80fd5b919050565b5f805f60608486031215610b41575f80fd5b83359250602084013567ffffffffffffffff81168114610b5f575f80fd5b9150610b6d60408501610b07565b90509250925092565b5f60208284031215610b86575f80fd5b610b8f82610b07565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b60408152826040820152828460608301375f606084830101525f60607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601168301019050826020830152949350505050565b5f60208284031215610c28575f80fd5b505191905056fea164736f6c6343000818000a
0x608060405234801561000f575f80fd5b50600436106100c4575f3560e01c8063955123061161007d578063c7065b6a11610058578063c7065b6a146101da578063cb23bcb514610227578063f2fde38b14610247575f80fd5b8063955123061461016c578063bd98b2b01461017f578063c4d66de8146101c7575f80fd5b80635027ad2e116100ad5780635027ad2e1461011a578063715018a6146101475780638da5cb5b1461014f575f80fd5b806328aee03f146100c85780632c09a84814610105575b5f80fd5b6100db6100d6366004610a50565b61025a565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610118610113366004610a70565b610397565b005b610139610128366004610af0565b5f9081526002602052604090205490565b6040519081526020016100fc565b61011861042f565b5f5473ffffffffffffffffffffffffffffffffffffffff166100db565b61011861017a366004610b2f565b610442565b61019261018d366004610a50565b610779565b6040805167ffffffffffffffff909316835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016100fc565b6101186101d5366004610b76565b6107d1565b6101926101e8366004610af0565b60036020525f908152604090205467ffffffffffffffff81169068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6001546100db9073ffffffffffffffffffffffffffffffffffffffff1681565b610118610255366004610b76565b6108a5565b5f82815260036020908152604080832081518083019092525467ffffffffffffffff81168083526801000000000000000090910473ffffffffffffffffffffffffffffffffffffffff16928201929092529083101561038c575f84815260026020526040902054805b8015610389575f86815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830190811061030a5761030a610b96565b5f9182526020918290206040805180820190915291015467ffffffffffffffff81168083526801000000000000000090910473ffffffffffffffffffffffffffffffffffffffff16928201929092529350851015610389577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016102c3565b50505b602001519392505050565b5f6103a2868661025a565b6040517fc8bd017600000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063c8bd0176906103fb90879087908790600401610bc3565b5f6040518083038186803b158015610411575f80fd5b505afa158015610423573d5f803e3d5ffd5b50505050505050505050565b61043761095c565b6104405f6109dc565b565b61044a61095c565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663059def616040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104b4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d89190610c18565b8267ffffffffffffffff161161051a576040517f9a4ff10400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8381526003602090815260409182902082518084019093525467ffffffffffffffff8082168085526801000000000000000090920473ffffffffffffffffffffffffffffffffffffffff169284019290925290841610156105a8576040517fb0d8c70400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166105f5576040517fa7f9319d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805167ffffffffffffffff808516911610156106ba57602081015173ffffffffffffffffffffffffffffffffffffffff16156106ac575f84815260026020908152604082208054600181018255908352918190208351920180549184015173ffffffffffffffffffffffffffffffffffffffff1668010000000000000000027fffffffff0000000000000000000000000000000000000000000000000000000090921667ffffffffffffffff909316929092171790555b67ffffffffffffffff831681525b73ffffffffffffffffffffffffffffffffffffffff82811660208381018281525f8881526003835260409081902086518154935190961668010000000000000000027fffffffff0000000000000000000000000000000000000000000000000000000090931667ffffffffffffffff96871617929092179091558051888152938716918401919091528201527f7a98750a395b9ee50a2644ffda039e31f1d5d06de45510275f972bb20b229b309060600160405180910390a150505050565b6002602052815f5260405f208181548110610792575f80fd5b5f9182526020909120015467ffffffffffffffff8116925068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff16905082565b6107d961095c565b60015473ffffffffffffffffffffffffffffffffffffffff161561085e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f696e697469616c697a656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6108ad61095c565b73ffffffffffffffffffffffffffffffffffffffff8116610950576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610855565b610959816109dc565b50565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610855565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f8060408385031215610a61575f80fd5b50508035926020909101359150565b5f805f805f60808688031215610a84575f80fd5b8535945060208601359350604086013567ffffffffffffffff80821115610aa9575f80fd5b818801915088601f830112610abc575f80fd5b813581811115610aca575f80fd5b896020828501011115610adb575f80fd5b96999598505060200195606001359392505050565b5f60208284031215610b00575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b2a575f80fd5b919050565b5f805f60608486031215610b41575f80fd5b83359250602084013567ffffffffffffffff81168114610b5f575f80fd5b9150610b6d60408501610b07565b90509250925092565b5f60208284031215610b86575f80fd5b610b8f82610b07565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b60408152826040820152828460608301375f606084830101525f60607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601168301019050826020830152949350505050565b5f60208284031215610c28575f80fd5b505191905056fea164736f6c6343000818000a
2 changes: 1 addition & 1 deletion bindings/bin/rollup_deployed.hex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions bindings/bin/zkevmverifierv1_deployed.hex

Large diffs are not rendered by default.

Loading
Loading