Skip to content

Commit

Permalink
chore: update dev config to use genesis assertion state
Browse files Browse the repository at this point in the history
  • Loading branch information
ethenotethan committed Feb 4, 2025
1 parent cc1d39d commit b1e666e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions scripts/rollupCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ 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 } from '../build/types/src/challengeV2/IAssertionChain'


// 1 gwei
const MAX_FER_PER_GAS = BigNumber.from('1000000000')
Expand Down Expand Up @@ -232,7 +234,7 @@ async function _getDevRollupConfig(
) {
// set up owner address
const ownerAddress =
process.env.OWNER_ADDRESS !== undefined ? process.env.OWNER_ADDRESS : ''
process.env.OWNER_ADDRESS !== undefined ? process.env.OWNER_ADDRESS : ''

// set up max data size
const _maxDataSize =
Expand Down Expand Up @@ -260,9 +262,9 @@ async function _getDevRollupConfig(

// get wasmModuleRoot
const wasmModuleRoot =
process.env.WASM_MODULE_ROOT !== undefined
? process.env.WASM_MODULE_ROOT
: ''
process.env.WASM_MODULE_ROOT !== undefined
? process.env.WASM_MODULE_ROOT
: ''

// set up batch posters
const sequencerAddress =
Expand All @@ -285,6 +287,15 @@ async function _getDevRollupConfig(
}
}

const genesisAssertionState: AssertionStateStruct = {
globalState: {
bytes32Vals: [ethers.constants.HashZero, ethers.constants.HashZero],
u64Vals: [ethers.BigNumber.from('0'), ethers.BigNumber.from('0')],
},
machineStatus: 0,
endHistoryRoot: ethers.constants.HashZero,
}

// set up batch poster manager
const batchPosterManagerEnv =
process.env.BATCH_POSTER_MANAGER !== undefined
Expand Down Expand Up @@ -314,7 +325,7 @@ async function _getDevRollupConfig(
chainConfig: chainConfig,
minimumAssertionPeriod: 75,
validatorAfkBlocks: 201600,
genesisAssertionState: {}, // AssertionState
genesisAssertionState: genesisAssertionState, // AssertionState
genesisInboxCount: 0,
miniStakeValues: [
ethers.utils.parseEther('1'),
Expand Down

0 comments on commit b1e666e

Please sign in to comment.