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

Real Upgrade Parameters #670

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
806af16
fmt
godzillaba Jun 3, 2024
5b93303
wip
godzillaba Jun 3, 2024
418b2e7
upgrade test script
godzillaba Jun 4, 2024
17de8c7
sepolia test
godzillaba Jun 4, 2024
2465452
nova test
godzillaba Jun 4, 2024
c8edb9f
wip
godzillaba Jun 4, 2024
ebf8dd4
finish checks
godzillaba Jun 12, 2024
dd58b8b
fmt
godzillaba Jun 12, 2024
fa98c54
remove deployed contracts
godzillaba Jun 12, 2024
3fe1734
Merge branch 'main' into upgrade-action-test-improvements
godzillaba Jun 12, 2024
77585a6
move config to ts file
godzillaba Jun 12, 2024
1643ea9
separate config files
godzillaba Jun 12, 2024
89b4e79
fix ts error
godzillaba Jun 12, 2024
70cadda
stricter types
godzillaba Jun 12, 2024
58c1ad5
fmt
godzillaba Jun 12, 2024
cc23c57
update real parameters
godzillaba Jun 13, 2024
316c1bd
Move configs to ts files (#669)
godzillaba Jun 13, 2024
9732ce4
solgen
godzillaba Jun 13, 2024
d137e4d
Merge branch 'upgrade-action-test-improvements' into real-upgrade-par…
godzillaba Jun 13, 2024
c6eb374
Merge branch 'main' into upgrade-action-test-improvements
godzillaba Jun 13, 2024
c7e3985
Merge branch 'upgrade-action-test-improvements' into real-upgrade-par…
godzillaba Jun 13, 2024
bac331a
Merge branch 'main' into real-upgrade-parameters
godzillaba Jun 13, 2024
d824ba5
set grace period sepolia
godzillaba Jun 13, 2024
e17495c
keep sepolia whitelist and short confirm period
godzillaba Jun 17, 2024
f51801f
update grace period
godzillaba Jun 17, 2024
6265a50
checked sepolia validators
godzillaba Jun 17, 2024
edfa405
checked arb1 validators
godzillaba Jun 17, 2024
d27762f
checked nova validators
godzillaba Jun 17, 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
41 changes: 21 additions & 20 deletions contracts/scripts/files/configs/arb1.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { parseEther } from 'ethers/lib/utils'
import { Config } from '../../common'
import { hoursToBlocks } from '.'

export const arb1: Config = {
contracts: {
Expand All @@ -23,7 +24,7 @@ export const arb1: Config = {
seqInbox: '0x554723262467f125ac9e1cdfa9ce15cc53822dbd',
},
settings: {
challengeGracePeriodBlocks: 14400, // 2 days
challengeGracePeriodBlocks: hoursToBlocks(48),
confirmPeriodBlocks: 45818, // same as old rollup, ~6.4 days
challengePeriodBlocks: 45818, // same as confirm period
stakeToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
Expand All @@ -32,31 +33,31 @@ export const arb1: Config = {
chainId: 42161,
anyTrustFastConfirmer: '0x0000000000000000000000000000000000000000',
disableValidatorWhitelist: true,
blockLeafSize: 1048576, // todo below
bigStepLeafSize: 512,
smallStepLeafSize: 128,
blockLeafSize: 2**26,
bigStepLeafSize: 2**19,
smallStepLeafSize: 2**23,
numBigStepLevel: 1,
maxDataSize: 117964,
isDelayBufferable: true,
bufferConfig: {
max: 14400,
threshold: 300,
max: hoursToBlocks(48),
threshold: hoursToBlocks(1),
replenishRateInBasis: 500,
},
},
validators: [
'0x0ff813f6bd577c3d1cdbe435bac0621be6ae34b4',
'0x54c0d3d6c101580db3be8763a2ae2c6bb9dc840c',
'0x56d83349c2b8dcf74d7e92d5b6b33d0badd52d78',
'0x610aa279989f440820e14248bd3879b148717974',
'0x6fb914de4653ec5592b7c15f4d9466cbd03f2104',
'0x758c6bb08b3ea5889b5cddbdef9a45b3a983c398',
'0x7cf3d537733f6ba4183a833c9b021265716ce9d0',
'0x83215480db2c6a7e56f9e99ef93ab9b36f8a3dd5',
'0xab1a39332e934300ebcc57b5f95ca90631a347ff',
'0xb0cb1384e3f4a9a9b2447e39b05e10631e1d34b0',
'0xddf2f71ab206c0138a8eceeb54386567d5abf01e',
'0xf59caf75e8a4bfba4e6e07ad86c7e498e4d2519b',
'0xf8d3e1cf58386c92b27710c6a0d8a54c76bc6ab5',
validators: [ // current validators
'0x83215480dB2C6A7E56f9E99EF93AB9B36F8A3DD5',
'0x7CF3d537733F6Ba4183A833c9B021265716cE9d0',
'0x56D83349c2B8DCF74d7E92D5b6B33d0BADD52D78',
'0x758C6bB08B3ea5889B5cddbdeF9A45b3a983c398',
'0x6Fb914de4653eC5592B7c15F4d9466Cbd03F2104',
'0xf59caf75e8A4bFBA4e6e07aD86C7E498E4d2519b',
'0xB0CB1384e3f4a9a9b2447e39b05e10631E1D34B0',
'0x54c0D3d6C101580dB3be8763A2aE2c6bb9dc840c',
'0x0fF813f6BD577c3D1cDbE435baC0621BE6aE34B4',
'0xAB1A39332e934300eBCc57B5f95cA90631a347FF',
'0xdDf2F71Ab206C0138A8eceEb54386567D5abF01E',
'0x610Aa279989F440820e14248BD3879B148717974',
'0xF8D3E1cF58386c92B27710C6a0D8A54c76BC6ab5'
],
}
8 changes: 8 additions & 0 deletions contracts/scripts/files/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ import { nova } from './nova'
import { sepolia } from './sepolia'
import { local } from './local'

export function hoursToBlocks(hours: number, blockTime = 12) {
const x = hours * 3600 / blockTime
if (x !== Math.floor(x)) {
throw new Error('hours must be divisible by blockTime')
}
return x
}

export const configs = {
arb1,
nova,
Expand Down
42 changes: 22 additions & 20 deletions contracts/scripts/files/configs/nova.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { parseEther } from 'ethers/lib/utils'
import { Config } from '../../common'
import { hoursToBlocks } from '.'

export const nova: Config = {
contracts: {
// the l1Timelock does not actually need to be the timelock
// it is only used to set the excess stake receiver / loser stake escrow
// TODO: change this to a fee router before real deployment
l1Timelock: '0xE6841D92B0C345144506576eC13ECf5103aC7f49',
rollup: '0xFb209827c58283535b744575e11953DCC4bEAD88',
bridge: '0xC1Ebd02f738644983b6C4B2d440b8e77DdE276Bd',
Expand All @@ -20,37 +24,35 @@ export const nova: Config = {
seqInbox: '0x71d78dc7ccc0e037e12de1e50f5470903ce37148',
},
settings: {
challengeGracePeriodBlocks: 14400,
confirmPeriodBlocks: 50400,
challengePeriodBlocks: 51600,
challengeGracePeriodBlocks: hoursToBlocks(48),
confirmPeriodBlocks: 45818, // same as old rollup, ~6.4 days
challengePeriodBlocks: 45818, // same as confirm period
stakeToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
stakeAmt: parseEther('1'),
stakeAmt: parseEther('1'), // warrants discussion
miniStakeAmounts: [
parseEther('6'),
parseEther('5'),
parseEther('4'),
parseEther('3'),
parseEther('2'),
parseEther('0'),
parseEther('1'),
parseEther('1'),
],
chainId: 42161,
anyTrustFastConfirmer: '0x0000000000000000000000000000000000000000',
anyTrustFastConfirmer: '0x0000000000000000000000000000000000000000', // TODO
disableValidatorWhitelist: false,
blockLeafSize: 1048576,
bigStepLeafSize: 512,
smallStepLeafSize: 128,
numBigStepLevel: 4,
blockLeafSize: 2**26, // leaf sizes same as arb1
bigStepLeafSize: 2**19,
smallStepLeafSize: 2**23,
numBigStepLevel: 1,
maxDataSize: 117964,
isDelayBufferable: true,
bufferConfig: {
max: 14400,
threshold: 300,
max: hoursToBlocks(48),
threshold: hoursToBlocks(1),
replenishRateInBasis: 500,
},
},
validators: [
'0xE27d4Ed355e5273A3D4855c8e11BC4a8d3e39b87',
'0x57004b440Cc4eb2FEd8c4d1865FaC907F9150C76',
'0x24ca61c31c7f9af3ab104db6b9a444f28e9071e3',
validators: [ // current validators
'0xB51EDdfc9A945e2B909905e4F242C4796Ac0C61d',
'0x54c0D3d6C101580dB3be8763A2aE2c6bb9dc840c',
'0x658e8123722462F888b6fa01a7dbcEFe1D6DD709',
'0xDfB23DFE9De7dcC974467195C8B7D5cd21C9d7cB'
],
}
41 changes: 21 additions & 20 deletions contracts/scripts/files/configs/sepolia.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { parseEther } from 'ethers/lib/utils'
import { Config } from '../../common'
import { hoursToBlocks } from '.'

export const sepolia: Config = {
contracts: {
// the l1Timelock does not actually need to be the timelock
// it is only used to set the excess stake receiver / loser stake escrow
// TODO: change this to a fee router before real deployment
l1Timelock: '0x6EC62D826aDc24AeA360be9cF2647c42b9Cdb19b',
rollup: '0xd80810638dbDF9081b72C1B33c65375e807281C8',
bridge: '0x38f918D0E9F1b721EDaA41302E399fa1B79333a9',
Expand All @@ -20,35 +24,32 @@ export const sepolia: Config = {
seqInbox: '0xdd63bcaa89d7c3199ef220c1dd59c49f821078b8',
},
settings: {
challengeGracePeriodBlocks: 14400,
confirmPeriodBlocks: 50400,
challengePeriodBlocks: 51600,
stakeToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
stakeAmt: parseEther('1'),
challengeGracePeriodBlocks: 20,
confirmPeriodBlocks: 20, // current is 20 blocks, 45818 is arb1 config
challengePeriodBlocks: 45818, // same as arb1
stakeToken: '0xefb383126640fe4a760010c6e59c397d2b6c7141', // WETH
stakeAmt: parseEther('36'), // 1/100th of arb1, same for mini stakes
miniStakeAmounts: [
parseEther('6'),
parseEther('5'),
parseEther('4'),
parseEther('3'),
parseEther('2'),
parseEther('1'),
parseEther('0'),
parseEther('5.5'),
parseEther('0.79'),
],
chainId: 42161,
chainId: 421614,
anyTrustFastConfirmer: '0x0000000000000000000000000000000000000000',
disableValidatorWhitelist: false,
blockLeafSize: 1048576,
bigStepLeafSize: 512,
smallStepLeafSize: 128,
numBigStepLevel: 4,
blockLeafSize: 2**26, // leaf sizes same as arb1
bigStepLeafSize: 2**19,
smallStepLeafSize: 2**23,
numBigStepLevel: 1,
maxDataSize: 117964,
isDelayBufferable: true,
isDelayBufferable: false, // batch poster not yet ready
bufferConfig: {
max: 14400,
threshold: 300,
max: hoursToBlocks(48),
threshold: hoursToBlocks(1),
replenishRateInBasis: 500,
},
},
validators: [
validators: [ // current validators
'0x8a8f0a24d7e58a76FC8F77bb68C7c902b91e182e',
'0x87630025E63A30eCf9Ca9d580d9D95922Fea6aF0',
'0xC32B93e581db6EBc50C08ce381143A259B92f1ED',
Expand Down
Loading