Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bcfceed
Updated config
yahgwai Feb 9, 2025
8d159f1
feat: add stake-token
gzeoneth Feb 10, 2025
78f7d5b
chore: log weth deploy
gzeoneth Feb 10, 2025
4a3a3a1
chore: wait deployed
gzeoneth Feb 10, 2025
c121881
fix: deploy weth with deployerWallet
gzeoneth Feb 10, 2025
b027e5e
workaround: use smaller stake size for test
gzeoneth Feb 11, 2025
f3e9a63
workaround: add testnode validator signer as validator
gzeoneth Feb 11, 2025
b0e17ec
fix: remove unused dependency
gzeoneth Mar 3, 2025
dc32f97
chore: bump dependencies
gzeoneth Mar 3, 2025
e189d5a
chore: remove from audit ci whitelist
gzeoneth Mar 3, 2025
dbaea9f
chore: disable bold upgrade test
gzeoneth Mar 3, 2025
b800cfe
ci: use foundry stable
gzeoneth Mar 3, 2025
a251ac8
chore: bump dependencies
gzeoneth Mar 4, 2025
821e11e
test: use new revertedWithCustomError
gzeoneth Mar 4, 2025
9252c5f
chore: bump more dependencies
gzeoneth Mar 4, 2025
54a7ac6
chore: remove issue from whitelist
gzeoneth Mar 4, 2025
81e4ae3
fix: pretty is now default
gzeoneth Mar 4, 2025
ba23b12
fix: allow_internal_expect_revert for lib test
gzeoneth Mar 4, 2025
dc7160b
Merge remote-tracking branch 'origin/develop' into fix-audit-ci
gzeoneth Mar 17, 2025
2da13be
chore: whitelist advisory
gzeoneth Mar 17, 2025
4cf0422
chore: bump minors in package.json
gzeoneth Mar 17, 2025
558e393
revert: non-dev dependencies bump
gzeoneth Mar 17, 2025
6dcd1e5
test - nocache in foundry install (#301)
godzillaba Mar 17, 2025
f3a6e47
Merge branch 'fix-audit-ci' into v3-dev-testnode
gzeoneth Mar 17, 2025
f9a2b86
fix: genesis machine finished
gzeoneth Mar 21, 2025
dfbfd2b
try realistic params
godzillaba Mar 24, 2025
3626c3c
lower min assertion period
godzillaba Mar 25, 2025
b09b170
Merge branch 'develop' into v3-dev-testnode
gzeoneth Mar 27, 2025
8ee5b78
Merge branch 'develop' into v3-dev-testnode
gzeoneth Mar 28, 2025
b23e6ef
Merge branch 'develop' into v3-dev-testnode
godzillaba Mar 28, 2025
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
4 changes: 3 additions & 1 deletion scripts/local-deployment/deployCreatorAndCreateRollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ async function main() {
let stakeToken = process.env.STAKE_TOKEN_ADDRESS as string
if (!stakeToken) {
console.log('Deploying WETH')
const wethFactory = await ethers.getContractFactory('TestWETH9')
const wethFactory = (await ethers.getContractFactory('TestWETH9')).connect(deployerWallet)
const weth = await wethFactory.deploy('Wrapped Ether', 'WETH')
await weth.deployTransaction.wait()
await weth.deployed()
stakeToken = weth.address
console.log('WETH deployed at', stakeToken)
}

/// deploy templates and rollup creator
Expand Down
81 changes: 48 additions & 33 deletions scripts/rollupCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ERC20, ERC20__factory, IERC20__factory } from '../build/types'
import { sleep } from './testSetup'
import { promises as fs } from 'fs'
import { _isRunningOnArbitrum, verifyContract } from './deploymentUtils'
import { AssertionStateStruct, ConfigStruct, RollupCreator } from '../build/types/src/rollup/RollupCreator'

// 1 gwei
const MAX_FER_PER_GAS = BigNumber.from('1000000000')
Expand Down Expand Up @@ -39,6 +40,7 @@ interface RollupCreationResult {
'native-token': string
'upgrade-executor': string
'validator-wallet-creator': string
'stake-token': string
}

interface ChainInfo {
Expand Down Expand Up @@ -186,6 +188,7 @@ export async function createRollup(
'native-token': nativeToken,
'upgrade-executor': upgradeExecutor,
'validator-wallet-creator': validatorWalletCreator,
'stake-token': stakeToken,
}

const chainInfo: ChainInfo = {
Expand Down Expand Up @@ -220,7 +223,7 @@ async function _getDevRollupConfig(
feeToken: string,
validatorWalletCreator: string,
stakeToken: string
) {
): Promise<RollupCreator.RollupDeploymentParamsStruct> {
// set up owner address
const ownerAddress =
process.env.OWNER_ADDRESS !== undefined ? process.env.OWNER_ADDRESS : ''
Expand All @@ -238,6 +241,7 @@ async function _getDevRollupConfig(
for (let i = 1; i <= authorizeValidators; i++) {
validators.push(_createValidatorAddress(validatorWalletCreator, i))
}
validators.push('0x6A568afe0f82d34759347bb36F14A6bB171d2CBe') // testnode validator signer

// get chain config
const childChainConfigPath =
Expand Down Expand Up @@ -292,39 +296,50 @@ async function _getDevRollupConfig(
}
}

return {
config: {
confirmPeriodBlocks: ethers.BigNumber.from('20'),
extraChallengeTimeBlocks: ethers.BigNumber.from('200'),
stakeToken: stakeToken,
baseStake: ethers.utils.parseEther('1'),
wasmModuleRoot: wasmModuleRoot,
owner: ownerAddress,
loserStakeEscrow: ethers.constants.AddressZero,
chainId: JSON.parse(chainConfig)['chainId'],
chainConfig: chainConfig,
minimumAssertionPeriod: 75,
validatorAfkBlocks: 201600,
genesisAssertionState: {}, // AssertionState
genesisInboxCount: 0,
miniStakeValues: [
ethers.utils.parseEther('1'),
ethers.utils.parseEther('1'),
ethers.utils.parseEther('1'),
],
layerZeroBlockEdgeHeight: 2 ** 5,
layerZeroBigStepEdgeHeight: 2 ** 5,
layerZeroSmallStepEdgeHeight: 2 ** 5,
numBigStepLevel: 1,
challengeGracePeriodBlocks: 10,
bufferConfig: { threshold: 600, max: 14400, replenishRateInBasis: 500 },
sequencerInboxMaxTimeVariation: {
delayBlocks: ethers.BigNumber.from('5760'),
futureBlocks: ethers.BigNumber.from('12'),
delaySeconds: ethers.BigNumber.from('86400'),
futureSeconds: ethers.BigNumber.from('3600'),
},
const genesisAssertionState: AssertionStateStruct = {
globalState: {
bytes32Vals: [ethers.constants.HashZero, ethers.constants.HashZero],
u64Vals: [ethers.BigNumber.from('0'), ethers.BigNumber.from('0')],
},
machineStatus: 1, // FINISHED
endHistoryRoot: ethers.constants.HashZero,
}

const config: ConfigStruct = {
confirmPeriodBlocks: ethers.BigNumber.from('20'),
stakeToken: stakeToken,
baseStake: 8,
wasmModuleRoot: wasmModuleRoot,
owner: ownerAddress,
loserStakeEscrow: ownerAddress,
chainId: JSON.parse(chainConfig)['chainId'],
chainConfig: chainConfig,
minimumAssertionPeriod: 5,
validatorAfkBlocks: 201600,
genesisAssertionState: genesisAssertionState,
genesisInboxCount: 0,
miniStakeValues: [
4,
2,
1,
],
layerZeroBlockEdgeHeight: 2 ** 26,
layerZeroBigStepEdgeHeight: 2 ** 19,
layerZeroSmallStepEdgeHeight: 2 ** 23,
numBigStepLevel: 1,
challengeGracePeriodBlocks: 10,
bufferConfig: { threshold: 600, max: 14400, replenishRateInBasis: 500 },
sequencerInboxMaxTimeVariation: {
delayBlocks: ethers.BigNumber.from('5760'),
futureBlocks: ethers.BigNumber.from('12'),
delaySeconds: ethers.BigNumber.from('86400'),
futureSeconds: ethers.BigNumber.from('3600'),
},
anyTrustFastConfirmer: ethers.constants.AddressZero
}

return {
config: config,
validators: validators,
maxDataSize: _maxDataSize,
nativeToken: feeToken,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/orbitChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ describe('Orbit Chain', () => {
bytes32Vals: [ethers.constants.HashZero, ethers.constants.HashZero],
u64Vals: [ethers.BigNumber.from('0'), ethers.BigNumber.from('0')],
},
machineStatus: 0,
machineStatus: 1, // FINISHED
endHistoryRoot: ethers.constants.HashZero,
}

Expand Down