Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ ops/l2-genesis/.devnet
ops/l2-genesis/.qanet
ops/l2-genesis/.testnet
ops/l2-genesis/.holesky
ops/l2-genesis/.hoodi
ops/l2-genesis/.mainnet
ops/l2-genesis/.morphtestnet
ops/devnet-morph/devnet/__pycache__
contracts/qanetL1.json
contracts/holesky.json
contracts/hoodi.json
contracts/mainnet.json
.env

# logs
Expand Down
24 changes: 13 additions & 11 deletions MakefileEc2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,36 @@ build-bk-prod-morph-prod-mainnet-to-morph-tx-submitter:
tar -czvf tx-submitter.tar.gz dist
aws s3 cp tx-submitter.tar.gz s3://morph-0582-morph-technical-department-mainnet-data/morph-setup/tx-submitter.tar.gz

# build for holesky
build-bk-prod-morph-prod-testnet-to-morph-node-holesky:

build-bk-test-morph-test-qanet-to-morph-node-qanet:
if [ ! -d dist ]; then mkdir -p dist; fi
cd $(PWD)/node && make build
cp node/build/bin/morphnode dist/
cp node/build/bin/tendermint dist/
tar -czvf morph-node.tar.gz dist
aws s3 cp morph-node.tar.gz s3://morph-0582-morph-technical-department-testnet-data/testnet/holesky/morph-setup/morph-node.tar.gz
aws s3 cp morph-node.tar.gz s3://morph-7637-morph-technical-department-qanet-data/morph-setup/morph-node.tar.gz

build-bk-prod-morph-prod-testnet-to-morph-tx-submitter-holesky:
build-bk-test-morph-test-qanet-to-morph-tx-submitter-qanet:
if [ ! -d dist ]; then mkdir -p dist; fi
env GO111MODULE=on CGO_LDFLAGS="-ldl" CGO_ENABLED=1 go build -v $(LDFLAGS) -o tx-submitter/tx-submitter ./tx-submitter/cmd
cp tx-submitter/tx-submitter dist/
tar -czvf tx-submitter.tar.gz dist
aws s3 cp tx-submitter.tar.gz s3://morph-0582-morph-technical-department-testnet-data/testnet/holesky/morph-setup/tx-submitter.tar.gz


build-bk-test-morph-test-qanet-to-morph-node-qanet:
aws s3 cp tx-submitter.tar.gz s3://morph-7637-morph-technical-department-qanet-data/morph-setup/tx-submitter.tar.gz


# build for hoodi
build-bk-prod-morph-prod-testnet-to-morph-node-hoodi:
if [ ! -d dist ]; then mkdir -p dist; fi
cd $(PWD)/node && make build
cp node/build/bin/morphnode dist/
cp node/build/bin/tendermint dist/
tar -czvf morph-node.tar.gz dist
aws s3 cp morph-node.tar.gz s3://morph-7637-morph-technical-department-qanet-data/morph-setup/morph-node.tar.gz
aws s3 cp morph-node.tar.gz s3://morph-0582-morph-technical-department-testnet-data/testnet/hoodi/morph-setup/morph-node.tar.gz

build-bk-test-morph-test-qanet-to-morph-tx-submitter-qanet:
build-bk-prod-morph-prod-testnet-to-morph-tx-submitter-hoodi:
if [ ! -d dist ]; then mkdir -p dist; fi
env GO111MODULE=on CGO_LDFLAGS="-ldl" CGO_ENABLED=1 go build -v $(LDFLAGS) -o tx-submitter/tx-submitter ./tx-submitter/cmd
cp tx-submitter/tx-submitter dist/
tar -czvf tx-submitter.tar.gz dist
aws s3 cp tx-submitter.tar.gz s3://morph-7637-morph-technical-department-qanet-data/morph-setup/tx-submitter.tar.gz
aws s3 cp tx-submitter.tar.gz s3://morph-0582-morph-technical-department-testnet-data/testnet/hoodi/morph-setup/tx-submitter.tar.gz

8 changes: 8 additions & 0 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const DEPLOYER_PK = process.env.DEPLOYER_PRIVATE_KEY || '0xac0974bec39a17e36ba4a
const QA_URL = process.env.QA_RPC_URL || 'http://127.0.0.1:8545'
const SEPOLIA_URL = process.env.SEPOLIA_RPC_URL || 'http://127.0.0.1:8545'
const HOLESKY_URL = process.env.HOLESKY_RPC_URL || 'http://127.0.0.1:8545'
const HOODI_URL = process.env.HOODI_RPC_URL || 'http://127.0.0.1:8545'

module.exports = {
defaultNetwork: 'hardhat',
Expand Down Expand Up @@ -98,6 +99,13 @@ module.exports = {
gas: 'auto',
gasPrice: 'auto',
accounts: [DEPLOYER_PK]
},
hoodi: {
url: HOODI_URL,
chainId: 560048,
gas: 'auto',
gasPrice: 'auto',
accounts: [DEPLOYER_PK]
}
},
foundry: {
Expand Down
5 changes: 5 additions & 0 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
"deploy:holesky": "rm -f holesky.json && hardhat deploy --network holesky --storagepath holesky.json",
"initialize:holesky": "hardhat initialize --network holesky --storagepath holesky.json",
"register:holesky": "hardhat register --network holesky --storagepath holesky.json",

"deploy:hoodi": "rm -f hoodi.json && hardhat deploy --network hoodi --storagepath hoodi.json",
"initialize:hoodi": "hardhat initialize --network hoodi --storagepath hoodi.json",
"register:hoodi": "hardhat register --network hoodi --storagepath hoodi.json",

"deploy:qanetL1": "rm -f qanetL1.json && hardhat deploy --network qanetl1 --storagepath qanetL1.json",
"initialize:qanetL1": "hardhat initialize --network qanetl1 --storagepath qanetL1.json",
"register:qanetL1": "hardhat register --network qanetl1 --storagepath qanetL1.json"
Expand Down
64 changes: 64 additions & 0 deletions contracts/src/deploy-config/hoodi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
const config = {
// Global configuration
l1FeeVaultRecipient: '0x291046850908e59B33b1758045882e9FDcfcBD1E',
contractAdmin: '0x291046850908e59B33b1758045882e9FDcfcBD1E',

l1WETHAddress: "",
l1USDCAddress: "",

// chainID config
l1ChainID: 560048,
l2ChainID: 2910,

// L1MessageQueue config
l1MessageQueueMaxGasLimit: 30000000,

// gasPriceOracle config
l2BaseFee: 0.1, // Gwei

// verify contract config
programVkey: '0x006c835a4c049b699a3675fefa51b182c7efe404a656151c0410245966724bc3',
// rollup contract config
// initialize config
finalizationPeriodSeconds: 600,
rollupProofWindow: 86400,
proofRewardPercent: 70,
// challenge config
rollupProposer: '0x48446b07A04307F320fa34790116d73aD4A51810',
rollupChallenger: '0x2910DB00C9537B90337b40D9732f4c356cbb84D0',
// genesis config
batchHeader: '00000000000000000000000000000000000000000000000000aa0feb482ae04f2a6b6b422932b5a2d537cd657ceb83008e87fce6ed6d290031010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c44401400000000000000000000000000000000000000000000000000000000000000000a31941eb1853862c0c38f378eb0c519e9e66f0942e39b47dca38c0437ab6b3e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',


// staking config
// staking Cross-Chain config
stakingCrossChainGaslimitAdd: 1000000,
stakingCrossChainGaslimitRemove: 8000000,

// staking initialize config
stakingLockNumber: 3,
stakingChallengeDeposit: 1, // 1 ether
stakingMinDeposit: 1, // 1 ether
stakingChallengerRewardPercentage: 100,
// register sequencers
l2SequencerAddresses: [
"0x48446b07A04307F320fa34790116d73aD4A51810",
"0x48447a9d66D8eAE067e59E3F9f7E6B5f1b5E7581",
"0x4844631425Ed76D79164c37CA9d558bd5FB12662",
"0x4844ede12C743845dfae266A6BE891F114702583"
],
l2SequencerTmKeys: [
"0xa4f3a7fb882c3159398f520e3c89a39dc9818235fea07789995a9ce7b4aba31d",
"0x0535824f72998615ac8265c12c9cfc63d315d8f3e849aa1857f42b11cfc5d72c",
"0x3a50197cbfdbe5bbd85ff13b0d55ddc08ecd5dbddbc012880ba1358562e192bd",
"0x814ce757e9727768f25ead4619efa552d9f8facad85236c0a774d0b21fae28ea"
],
l2SequencerBlsKeys: [
"0x0000000000000000000000000000000017c22eb22cfacc028f8556a10ed0dcf56f4189c03c57103498bebc38df3f04202a1bf2ae6361bd0fd0c606e5a5d1122500000000000000000000000000000000115359ea50bb5e0bc9a72d5d96dbe5425aad06b7c4f9b18c30534d8237de9f3d94df3fd38e2e19bf572cda4e76dfd7200000000000000000000000000000000001584eb7275c2678f41b1649c4de05acecffa73f998c30995e934b01029257a6466964b68d4ea34c64ac1807f57bad0c0000000000000000000000000000000016d8f19d0fb3f0428c5fe338ca6bdb4b93e49f106267a106b11bde1bc4b795a119cbd8bfcd21d5be79b83fabc43c1d1e",
"0x0000000000000000000000000000000018ca6c24a492491ccbc97b0743c52e188ccbf4c42fe858a22ece10c96d99af4c80a3c73b2b199f1bc35adf2b42be86e700000000000000000000000000000000028ebe1896404b3a9f3609d61b55c8a13aed4c2ba951fb081d0982bebcd072ea2fa5a90bd581565e4277be1b86b201c80000000000000000000000000000000009f5d61b5b90288ba4650db5865235935447e4999ed773965db1cc663d14bd30e364244f8f97cbdb9483591366d11db00000000000000000000000000000000015d1d71cb633e1a33b7e7432b268d94453704f0fcd54dbf223d294c969c4ea9285d807a42d785d6198d3a361be98fdf7",
"0x000000000000000000000000000000000c666fbafcde1b34ac662d6edd8ddaca29fb406c27bdb4b45114409d1d6b3a1415efcb88a9adf94a925f255a7e3b4cb300000000000000000000000000000000097f204c34019966d2f1f2e57572e534d51f93f5c2e372bf15bdb031eefa72398fb5c773c217365df980c9c6b3480962000000000000000000000000000000000b1d419b65cf9d415ae3dc213f41296623517efeea8a6b97ed31aacfd75a9d0c15b1b59091fa185981ce1b45b85291240000000000000000000000000000000007085c7d37c0b2ac925b75b1f86ea93cbfc60909ddabbc7a1d89cc24b1766e4bdfc3e88cf405a7cd8e8137050777a8e7",
"0x0000000000000000000000000000000017cb2706bf579e0043486627a62d7b4b9f868585bab1eb584253e54d57cc6e8d5851d4260df693f2e671eadf5daac13b000000000000000000000000000000001176bb97fd0c8d1ecec2d240ffe9db99305ef00fdd2341590970dde0e34f26c672b5bb3ecd2e91fa66c349cba9f2f77a000000000000000000000000000000000220ff827a48e8a21e7ec9c73432fa47453d275de48fbc1988dad49e58123a91ba1e8f0463c2f6913a5efff41f3100a2000000000000000000000000000000000219da2bc157d03525b20e6ec00d2edb312ab654c107465dfe9c2b19e2c07639c02bbbe19ba5ab0202110ba7b7d72c90"
]
}

export default config
50 changes: 50 additions & 0 deletions ops/l2-genesis/deploy-config/hoodi-deploy-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"l1ChainID": 560048,
"l2ChainID": 2910,
"l2GenesisBlockTimestamp": "0x68CCF160",

"finalSystemOwner": "0x2910beed7B7F86f4bE9907b2e91FA0a216a67f2E",
"proxyAdminOwner": "0x2910beed7B7F86f4bE9907b2e91FA0a216a67f2E",

"l1FeeVaultRecipient": "0x29107CB79Ef8f69fE1587F77e283d47E84c5202f",
"sequencerFeeVaultRecipient": "0x29107CB79Ef8f69fE1587F77e283d47E84c5202f",
"l2BridgeFeeVaultRecipient": "0x29107CB79Ef8f69fE1587F77e283d47E84c5202f",
"fundDevAccounts": false,

"l1StartingBlockTag": "earliest",
"maxTxPerBlock": 100,

"gasPriceOracleOverhead": 2500,
"gasPriceOracleScalar": 1000000000,
"gasPriceOracleOwner": "0x2910beed7B7F86f4bE9907b2e91FA0a216a67f2E",

"recordOracleAddress": "0x291013E884C338A4BD6Ef083Bb7dC649662d49E0",
"recordNextBatchSubmissionIndex": 1,

"govVotingDuration": 1000,
"govBatchBlockInterval": 600,
"govBatchTimeout": 1200,
"govRollupEpoch": 600,

"l2StakingSequencerMaxSize": 4,
"l2StakingUnDelegatedLockEpochs": 4,
"l2StakingRewardStartTime": 1764460800,
"l2StakingAddresses": [
"0x48446b07A04307F320fa34790116d73aD4A51810",
"0x48447a9d66D8eAE067e59E3F9f7E6B5f1b5E7581",
"0x4844631425Ed76D79164c37CA9d558bd5FB12662",
"0x4844ede12C743845dfae266A6BE891F114702583"
],
"l2StakingTmKeys": [
"0xa4f3a7fb882c3159398f520e3c89a39dc9818235fea07789995a9ce7b4aba31d",
"0x0535824f72998615ac8265c12c9cfc63d315d8f3e849aa1857f42b11cfc5d72c",
"0x3a50197cbfdbe5bbd85ff13b0d55ddc08ecd5dbddbc012880ba1358562e192bd",
"0x814ce757e9727768f25ead4619efa552d9f8facad85236c0a774d0b21fae28ea"
],
"l2StakingBlsKeys": [
"0x0000000000000000000000000000000017c22eb22cfacc028f8556a10ed0dcf56f4189c03c57103498bebc38df3f04202a1bf2ae6361bd0fd0c606e5a5d1122500000000000000000000000000000000115359ea50bb5e0bc9a72d5d96dbe5425aad06b7c4f9b18c30534d8237de9f3d94df3fd38e2e19bf572cda4e76dfd7200000000000000000000000000000000001584eb7275c2678f41b1649c4de05acecffa73f998c30995e934b01029257a6466964b68d4ea34c64ac1807f57bad0c0000000000000000000000000000000016d8f19d0fb3f0428c5fe338ca6bdb4b93e49f106267a106b11bde1bc4b795a119cbd8bfcd21d5be79b83fabc43c1d1e",
"0x0000000000000000000000000000000018ca6c24a492491ccbc97b0743c52e188ccbf4c42fe858a22ece10c96d99af4c80a3c73b2b199f1bc35adf2b42be86e700000000000000000000000000000000028ebe1896404b3a9f3609d61b55c8a13aed4c2ba951fb081d0982bebcd072ea2fa5a90bd581565e4277be1b86b201c80000000000000000000000000000000009f5d61b5b90288ba4650db5865235935447e4999ed773965db1cc663d14bd30e364244f8f97cbdb9483591366d11db00000000000000000000000000000000015d1d71cb633e1a33b7e7432b268d94453704f0fcd54dbf223d294c969c4ea9285d807a42d785d6198d3a361be98fdf7",
"0x000000000000000000000000000000000c666fbafcde1b34ac662d6edd8ddaca29fb406c27bdb4b45114409d1d6b3a1415efcb88a9adf94a925f255a7e3b4cb300000000000000000000000000000000097f204c34019966d2f1f2e57572e534d51f93f5c2e372bf15bdb031eefa72398fb5c773c217365df980c9c6b3480962000000000000000000000000000000000b1d419b65cf9d415ae3dc213f41296623517efeea8a6b97ed31aacfd75a9d0c15b1b59091fa185981ce1b45b85291240000000000000000000000000000000007085c7d37c0b2ac925b75b1f86ea93cbfc60909ddabbc7a1d89cc24b1766e4bdfc3e88cf405a7cd8e8137050777a8e7",
"0x0000000000000000000000000000000017cb2706bf579e0043486627a62d7b4b9f868585bab1eb584253e54d57cc6e8d5851d4260df693f2e671eadf5daac13b000000000000000000000000000000001176bb97fd0c8d1ecec2d240ffe9db99305ef00fdd2341590970dde0e34f26c672b5bb3ecd2e91fa66c349cba9f2f77a000000000000000000000000000000000220ff827a48e8a21e7ec9c73432fa47453d275de48fbc1988dad49e58123a91ba1e8f0463c2f6913a5efff41f3100a2000000000000000000000000000000000219da2bc157d03525b20e6ec00d2edb312ab654c107465dfe9c2b19e2c07639c02bbbe19ba5ab0202110ba7b7d72c90"
]
}
28 changes: 28 additions & 0 deletions ops/l2-genesis/hoodi-l2genesis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
set -eu

source ../../contracts/.env
FOLDER=".hoodi"
CONTRACT_CONFIG="../../contracts/src/deploy-config/hoodi.ts"
echo "Regenerating genesis files"
# Check if the folder exists
if [ ! -d "$FOLDER" ]; then
echo "Folder not exists, mkdir $FOLDER"
mkdir "$FOLDER"
fi


RPC_URL="https://rpc.hoodi.ethpandaops.io"

echo "RPC_URL is $RPC_URL"
cat "deploy-config/hoodi-deploy-config.json" > $FOLDER/hoodi-deploy-config.json
(
go run cmd/main.go genesis l2 \
--l1-rpc $RPC_URL \
--deploy-config $FOLDER/hoodi-deploy-config.json \
--deployment-dir "$PWD/../../contracts/hoodi.json" \
--outfile.l2 $FOLDER/genesis-l2.json \
--outfile.rollup $FOLDER/rollup.json \
--outfile.genbatchheader $FOLDER/genesis-batch-header.json
touch "$FOLDER/done"
)
Loading