diff --git a/.env-sample b/.env-sample new file mode 100644 index 00000000..70a6dbf6 --- /dev/null +++ b/.env-sample @@ -0,0 +1,5 @@ +L1_RPC_URL="http://127.0.0.1:8545" +L1_PRIV_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" +CONFIG_NETWORK_NAME="arb1" +DEPLOYED_CONTRACTS_DIR="./scripts/files/" +DISABLE_VERIFICATION=true diff --git a/.env.sample.goerli b/.env.sample.goerli index 52bf51b5..b5541716 100644 --- a/.env.sample.goerli +++ b/.env.sample.goerli @@ -5,3 +5,4 @@ DEVNET_PRIVKEY="" ## optional - address of already deployed ERC20 token which shall be used as rollup's fee token FEE_TOKEN_ADDRESS="" +STAKE_TOKEN_ADDRESS="" \ No newline at end of file diff --git a/.github/workflows/contract-tests.yml b/.github/workflows/contract-tests.yml index 265aef22..67fddf53 100644 --- a/.github/workflows/contract-tests.yml +++ b/.github/workflows/contract-tests.yml @@ -34,7 +34,7 @@ jobs: run: yarn - name: Build - run: forge test + run: yarn test:foundry tests: name: Contract tests runs-on: ubuntu-8 @@ -64,6 +64,9 @@ jobs: with: version: nightly + - name: Check Contracts Format + run: forge fmt --check + - name: Install dependencies run: yarn install @@ -147,51 +150,114 @@ jobs: - name: Test 4844 run: yarn test:4844 - test-e2e: - name: Test e2e + # test-e2e: + # name: Test e2e + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # with: + # submodules: recursive + + # - uses: OffchainLabs/actions/run-nitro-test-node@main + # with: + # l3-node: true + # no-token-bridge: true + # no-l3-token-bridge: true + # nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}' + # nitro-testnode-ref: node-18 + + # - name: Setup node/yarn + # uses: actions/setup-node@v3 + # with: + # node-version: 18 + # cache: 'yarn' + # cache-dependency-path: '**/yarn.lock' + + # - name: Install packages + # run: yarn + + # - name: Compile contracts + # run: yarn build + + # - name: Run e2e tests + # run: yarn test:e2e + # test-e2e-custom-fee-token: + # name: Test e2e custom fee token + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # with: + # submodules: recursive + + # - uses: OffchainLabs/actions/run-nitro-test-node@main + # with: + # l3-node: true + # args: --l3-fee-token + # no-token-bridge: true + # no-l3-token-bridge: true + # nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}' + # nitro-testnode-ref: node-18 + + # - name: Setup node/yarn + # uses: actions/setup-node@v3 + # with: + # node-version: 18 + # cache: 'yarn' + # cache-dependency-path: '**/yarn.lock' + + # - name: Install packages + # run: yarn + + # - name: Compile contracts + # run: yarn build + + # - name: Run e2e tests + # run: yarn test:e2e + # test-e2e-fee-token-6-decimals: + # name: Test e2e fee token with 6 decimals + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # with: + # submodules: recursive + + # - uses: OffchainLabs/actions/run-nitro-test-node@main + # with: + # l3-node: true + # args: --l3-fee-token --l3-fee-token-decimals 6 + # no-token-bridge: true + # no-l3-token-bridge: true + # nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}' + # nitro-testnode-ref: 'non18-decimal-token-node-18' + + # - name: Setup node/yarn + # uses: actions/setup-node@v3 + # with: + # node-version: 18 + # cache: 'yarn' + # cache-dependency-path: '**/yarn.lock' + + # - name: Install packages + # run: yarn + + # - name: Compile contracts + # run: yarn build + + # - name: Run e2e tests + # run: yarn test:e2e + + bold-upgrade: + name: BOLD upgrade test runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: submodules: recursive - - uses: OffchainLabs/actions/run-nitro-test-node@main - with: - l3-node: true - no-token-bridge: true - no-l3-token-bridge: true - nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}' - - - name: Setup node/yarn - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: 'yarn' - cache-dependency-path: '**/yarn.lock' - - - name: Install packages - run: yarn - - - name: Compile contracts - run: yarn build - - - name: Run e2e tests - run: yarn test:e2e - test-e2e-custom-fee-token: - name: Test e2e custom fee token - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - uses: OffchainLabs/actions/run-nitro-test-node@main + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 with: - l3-node: true - args: --l3-fee-token - no-token-bridge: true - no-l3-token-bridge: true - nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}' + version: nightly - name: Setup node/yarn uses: actions/setup-node@v3 @@ -204,38 +270,11 @@ jobs: run: yarn - name: Compile contracts - run: yarn build - - - name: Run e2e tests - run: yarn test:e2e - test-e2e-fee-token-6-decimals: - name: Test e2e fee token with 6 decimals - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - uses: OffchainLabs/actions/run-nitro-test-node@main - with: - l3-node: true - args: --l3-fee-token --l3-fee-token-decimals 6 - no-token-bridge: true - no-l3-token-bridge: true - nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}' - - - name: Setup node/yarn - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: 'yarn' - cache-dependency-path: '**/yarn.lock' - - - name: Install packages - run: yarn + run: yarn build:all - - name: Compile contracts - run: yarn build + - name: Copy .env + run: | + cp ./.env-sample ./.env - - name: Run e2e tests - run: yarn test:e2e + - name: Test upgrade + run: L1_RPC=${{ secrets.L1_RPC || 'https://rpc.ankr.com/eth' }} yarn test:upgrade diff --git a/.gitignore b/.gitignore index 62617e35..e21fd65b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ deployments/ scripts/config.ts forge-cache/ out/ -.env \ No newline at end of file +.env +.DS_Store \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index cad44e90..03c812c1 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,3 +8,5 @@ src/lib/abi/** out/** lib/** src/mocks/MultiCallTest.sol +slither.db.json +LICENSE.md \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js index 5392936b..2b65bdf8 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -6,16 +6,4 @@ module.exports = { tabWidth: 2, arrowParens: 'avoid', bracketSpacing: true, - overrides: [ - { - files: '*.sol', - options: { - tabWidth: 4, - printWidth: 100, - singleQuote: false, - bracketSpacing: false, - compiler: '0.8.9', - }, - }, - ], } diff --git a/.solhint.json b/.solhint.json index ee37a04c..dc36fe57 100644 --- a/.solhint.json +++ b/.solhint.json @@ -1,7 +1,6 @@ { "extends": ["solhint:recommended"], "rules": { - "prettier/prettier": "error", "avoid-throw": "off", "avoid-suicide": "error", "avoid-sha3": "warn", @@ -12,7 +11,11 @@ "reason-string": ["warn", { "maxLength": 128 }], "not-rely-on-time": "off", "max-states-count": ["warn", 40], - "no-inline-assembly": "off" + "no-inline-assembly": "off", + "no-global-import": "off", + "custom-errors": "off", + "immutable-vars-naming": "off", + "var-name-mixedcase": "off" }, - "plugins": ["prettier"] + "plugins": [] } diff --git a/.solhintignore b/.solhintignore new file mode 100644 index 00000000..2a2cb989 --- /dev/null +++ b/.solhintignore @@ -0,0 +1,3 @@ +src/mocks +src/precompiles +src/test-helpers \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 1bb66e83..bb83a72e 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,17 +1,16 @@ [profile.default] -src = 'src/' +src = 'src' out = 'out' libs = ['node_modules', 'lib'] -test = 'test/foundry' cache_path = 'forge-cache/sol' optimizer = true -optimizer_runs = 100 +optimizer_runs = 2000 via_ir = false -solc_version = '0.8.9' -remappings = ['ds-test/=lib/forge-std/lib/ds-test/src/', - 'forge-std/=lib/forge-std/src/', - '@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/', - '@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/'] +solc_version = '0.8.17' +remappings = ['@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/', + '@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/', + '@offchainlabs/upgrade-executor/=node_modules/@offchainlabs/upgrade-executor/'] +fs_permissions = [{ access = "read", path = "./"}] [profile.yul] src = 'yul' @@ -22,6 +21,19 @@ remappings = [] auto_detect_remappings = false [fmt] -number_underscore = 'thousands' line_length = 100 -# See more config options https://github.com/foundry-rs/foundry/tree/master/config +tab_width = 4 +bracket_spacing = false +int_types = "long" +multiline_func_header = "params_first" +quote_style = "double" +number_underscore = "preserve" +hex_underscore = "remove" +single_line_statement_blocks = "preserve" +override_spacing = false +wrap_comments = false +ignore = [] +contract_new_lines = false +sort_imports = false + +# See more config options https://github.com/foundry-rs/foundry/tree/master/config \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 3599427d..22e6cf51 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -15,22 +15,31 @@ dotenv.config() const solidity = { compilers: [ { - version: '0.8.9', + version: '0.8.17', settings: { optimizer: { enabled: true, - runs: 100, + runs: 2000, }, }, }, ], overrides: { 'src/rollup/RollupUserLogic.sol': { - version: '0.8.9', + version: '0.8.17', settings: { optimizer: { enabled: true, - runs: 0, + runs: 20, + }, + }, + }, + 'src/challengeV2/EdgeChallengeManager.sol': { + version: '0.8.17', + settings: { + optimizer: { + enabled: true, + runs: 200, }, }, }, @@ -48,12 +57,15 @@ if (process.env['INTERFACE_TESTER_SOLC_VERSION']) { }, }) solidity.overrides = { - 'src/test-helpers/InterfaceCompatibilityTester.sol': { - version: process.env['INTERFACE_TESTER_SOLC_VERSION'], - settings: { - optimizer: { - enabled: true, - runs: 100, + ...(solidity.overrides || {}), + ...{ + 'src/test-helpers/InterfaceCompatibilityTester.sol': { + version: process.env['INTERFACE_TESTER_SOLC_VERSION'], + settings: { + optimizer: { + enabled: true, + runs: 100, + }, }, }, }, @@ -98,12 +110,6 @@ module.exports = { ? [process.env['MAINNET_PRIVKEY']] : [], }, - goerli: { - url: 'https://goerli.infura.io/v3/' + process.env['INFURA_KEY'], - accounts: process.env['DEVNET_PRIVKEY'] - ? [process.env['DEVNET_PRIVKEY']] - : [], - }, sepolia: { url: 'https://sepolia.infura.io/v3/' + process.env['INFURA_KEY'], accounts: process.env['DEVNET_PRIVKEY'] @@ -165,13 +171,10 @@ module.exports = { etherscan: { apiKey: { mainnet: process.env['ETHERSCAN_API_KEY'], - goerli: process.env['ETHERSCAN_API_KEY'], sepolia: process.env['ETHERSCAN_API_KEY'], holesky: process.env['ETHERSCAN_API_KEY'], arbitrumOne: process.env['ARBISCAN_API_KEY'], - arbitrumTestnet: process.env['ARBISCAN_API_KEY'], nova: process.env['NOVA_ARBISCAN_API_KEY'], - arbGoerliRollup: process.env['ARBISCAN_API_KEY'], arbSepolia: process.env['ARBISCAN_API_KEY'], base: process.env['BASESCAN_API_KEY'], baseSepolia: process.env['BASESCAN_API_KEY'], @@ -185,14 +188,6 @@ module.exports = { browserURL: 'https://nova.arbiscan.io/', }, }, - { - network: 'arbGoerliRollup', - chainId: 421613, - urls: { - apiURL: 'https://api-goerli.arbiscan.io/api', - browserURL: 'https://goerli.arbiscan.io/', - }, - }, { network: 'arbSepolia', chainId: 421614, diff --git a/package.json b/package.json index fc03e23c..38f1413c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arbitrum/nitro-contracts", - "version": "2.1.0", + "version": "3.0.0-alpha.0", "description": "Layer 2 precompiles and rollup for Arbitrum Nitro", "author": "Offchain Labs, Inc.", "license": "BUSL-1.1", @@ -21,6 +21,7 @@ "audit:ci": "audit-ci --config ./audit-ci.jsonc", "audit:fix": "yarn-audit-fix", "prepublishOnly": "hardhat clean && forge clean && hardhat compile && yarn build:forge:yul", + "coverage": "forge coverage --report lcov --ir-minimum && lcov --remove lcov.info 'node_modules/*' 'test/*' 'script/*' 'src/test-helpers/*' 'challenge/*' --ignore-errors unused -o lcov.info && genhtml lcov.info --branch-coverage --output-dir coverage", "build:all": "yarn build && yarn build:forge", "build": "hardhat compile", "build:forge:sol": "forge build --skip *.yul", @@ -30,7 +31,7 @@ "lint:test": "eslint ./test", "solhint": "solhint -f table src/**/*.sol", "prettier:solidity": "prettier --write src/**/*.sol", - "format": "prettier './**/*.{js,json,ts,yml,sol}' --write && yarn run lint:test --fix", + "format": "forge fmt && prettier './**/*.{js,json,md,ts,yml}' --write && yarn run lint:test --fix", "build:0.6": "INTERFACE_TESTER_SOLC_VERSION=0.6.9 yarn run build", "build:0.7": "INTERFACE_TESTER_SOLC_VERSION=0.7.0 yarn run build", "test": "DISABLE_GAS_REPORTER=true hardhat --network hardhat test test/contract/*.spec.ts", @@ -39,6 +40,8 @@ "test:storage": "./test/storage/test.bash", "test:signatures": "./test/signatures/test-sigs.bash", "test:e2e": "hardhat test test/e2e/*.ts", + "test:upgrade": "./scripts/testUpgrade.bash", + "test:foundry": "forge test --gas-limit 10000000000", "test:update": "yarn run test:signatures || yarn run test:storage", "metadatahash": "yarn build:all && hardhat run scripts/printMetadataHashes.ts", "upload-4bytes": "forge build && find ./out -type f -name \"*.json\" -exec cast upload-signature {} + | grep -v Duplicated:", @@ -47,17 +50,21 @@ "deploy-eth-rollup": "hardhat run scripts/createEthRollup.ts", "deploy-erc20-rollup": "hardhat run scripts/createERC20Rollup.ts", "create-rollup-testnode": "hardhat run scripts/local-deployment/deployCreatorAndCreateRollup.ts", + "script:bold-prepare": "hardhat run ./scripts/prepareBoldUpgrade.ts", + "script:bold-populate-lookup": "hardhat run ./scripts/populateLookup.ts", + "script:bold-local-execute": "hardhat run ./scripts/testLocalExecuteBoldUpgrade.ts", "deploy-cachemanager-testnode": "hardhat run scripts/local-deployment/deployCacheManager.ts" }, "dependencies": { "@offchainlabs/upgrade-executor": "1.1.0-beta.0", - "@openzeppelin/contracts": "4.5.0", - "@openzeppelin/contracts-upgradeable": "4.5.2", + "@openzeppelin/contracts": "4.7.3", + "@openzeppelin/contracts-upgradeable": "4.7.3", "patch-package": "^6.4.7", "solady": "0.0.182" }, "private": false, "devDependencies": { + "@arbitrum/nitro-contracts-2.0.0": "npm:@arbitrum/nitro-contracts@2.0.0-beta.0", "@arbitrum/sdk": "^3.4.1", "@ethersproject/providers": "^5.7.2", "@nomicfoundation/hardhat-verify": "^2.0.9", diff --git a/scripts/boldUpgradeCommon.ts b/scripts/boldUpgradeCommon.ts new file mode 100644 index 00000000..c1b405ac --- /dev/null +++ b/scripts/boldUpgradeCommon.ts @@ -0,0 +1,176 @@ +import { BigNumber, providers } from 'ethers' +import { parseEther } from 'ethers/lib/utils' +import fs from 'fs' + +import { configs } from './files/configs' + +export interface DeployedContracts { + bridge: string + seqInbox: string + rei: string + outbox: string + inbox: string + oldRollupUser: string + newRollupUser: string + newRollupAdmin: string + challengeManager: string + boldAction: string + rollupReader: string + preImageHashLookup: string + prover0: string + proverMem: string + proverMath: string + proverHostIo: string + osp: string +} + +export const getJsonFile = (fileLocation: string) => { + return JSON.parse(fs.readFileSync(fileLocation).toString()) +} + +export const getConfig = async ( + configName: string, + l1Rpc: providers.Provider +): Promise => { + const config = configs[configName as keyof typeof configs] + if (!config) { + throw new Error('config not found') + } + await validateConfig(config, l1Rpc) + return config +} + +export interface Config { + contracts: { + excessStakeReceiver: string + rollup: string + bridge: string + sequencerInbox: string + rollupEventInbox: string + outbox: string + inbox: string + upgradeExecutor: string + } + proxyAdmins: { + outbox: string + inbox: string + bridge: string + rei: string + seqInbox: string + } + settings: { + challengeGracePeriodBlocks: number + confirmPeriodBlocks: number + challengePeriodBlocks: number + stakeToken: string + stakeAmt: BigNumber + miniStakeAmounts: BigNumber[] + chainId: number + disableValidatorWhitelist: boolean + maxDataSize: number + blockLeafSize: number + bigStepLeafSize: number + smallStepLeafSize: number + numBigStepLevel: number + isDelayBufferable: boolean + bufferConfig: { + max: number + threshold: number + replenishRateInBasis: number + } + } + validators: string[] +} + +export type RawConfig = Omit & { + settings: Omit & { + stakeAmt: string + miniStakeAmounts: string[] + } +} + +export const validateConfig = async ( + config: Config, + l1Rpc: providers.Provider +) => { + // check all the config.contracts exist + if ((await l1Rpc.getCode(config.contracts.excessStakeReceiver)).length <= 2) { + throw new Error('excessStakeReceiver address is not a contract') + } + if ((await l1Rpc.getCode(config.contracts.rollup)).length <= 2) { + throw new Error('rollup address is not a contract') + } + if ((await l1Rpc.getCode(config.contracts.bridge)).length <= 2) { + throw new Error('bridge address is not a contract') + } + if ((await l1Rpc.getCode(config.contracts.sequencerInbox)).length <= 2) { + throw new Error('sequencerInbox address is not a contract') + } + if ((await l1Rpc.getCode(config.contracts.rollupEventInbox)).length <= 2) { + throw new Error('rollupEventInbox address is not a contract') + } + if ((await l1Rpc.getCode(config.contracts.outbox)).length <= 2) { + throw new Error('outbox address is not a contract') + } + if ((await l1Rpc.getCode(config.contracts.inbox)).length <= 2) { + throw new Error('inbox address is not a contract') + } + if ((await l1Rpc.getCode(config.contracts.upgradeExecutor)).length <= 2) { + throw new Error('upgradeExecutor address is not a contract') + } + + // check all the config.proxyAdmins exist + if ((await l1Rpc.getCode(config.proxyAdmins.outbox)).length <= 2) { + throw new Error('outbox proxy admin address is not a contract') + } + if ((await l1Rpc.getCode(config.proxyAdmins.bridge)).length <= 2) { + throw new Error('bridge proxy admin address is not a contract') + } + if ((await l1Rpc.getCode(config.proxyAdmins.rei)).length <= 2) { + throw new Error('rei proxy admin address is not a contract') + } + if ((await l1Rpc.getCode(config.proxyAdmins.seqInbox)).length <= 2) { + throw new Error('seqInbox proxy admin address is not a contract') + } + + // check all the settings exist + if (config.settings.confirmPeriodBlocks === 0) { + throw new Error('confirmPeriodBlocks is 0') + } + if (config.settings.stakeToken.length === 0) { + throw new Error('stakeToken address is empty') + } + if (config.settings.chainId === 0) { + throw new Error('chainId is 0') + } + if (config.settings.blockLeafSize === 0) { + throw new Error('blockLeafSize is 0') + } + if (config.settings.bigStepLeafSize === 0) { + throw new Error('bigStepLeafSize is 0') + } + if (config.settings.smallStepLeafSize === 0) { + throw new Error('smallStepLeafSize is 0') + } + if (config.settings.numBigStepLevel === 0) { + throw new Error('numBigStepLevel is 0') + } + + const stakeAmount = BigNumber.from(config.settings.stakeAmt) + // check it's more than 1 eth + if (stakeAmount.lt(parseEther('1'))) { + throw new Error('stakeAmt is less than 1 eth') + } + const miniStakeAmounts = config.settings.miniStakeAmounts.map(BigNumber.from) + + if (miniStakeAmounts.length !== config.settings.numBigStepLevel + 2) { + throw new Error('miniStakeAmts length is not numBigStepLevel + 2') + } + + if ( + !config.settings.disableValidatorWhitelist && + config.validators.length === 0 + ) { + throw new Error('no validators') + } +} diff --git a/scripts/boldUpgradeFunctions.ts b/scripts/boldUpgradeFunctions.ts new file mode 100644 index 00000000..64996ff6 --- /dev/null +++ b/scripts/boldUpgradeFunctions.ts @@ -0,0 +1,342 @@ +import { BigNumber, Contract, ContractFactory, ethers, Signer } from 'ethers' +import { + BOLDUpgradeAction__factory, + Bridge__factory, + EdgeChallengeManager__factory, + OneStepProofEntry__factory, + OneStepProver0__factory, + OneStepProverHostIo__factory, + OneStepProverMath__factory, + OneStepProverMemory__factory, + Outbox__factory, + RollupAdminLogic__factory, + RollupEventInbox__factory, + RollupReader__factory, + RollupUserLogic__factory, + SequencerInbox__factory, + Inbox__factory, + StateHashPreImageLookup__factory, + IReader4844__factory, +} from '../build/types' +import { bytecode as Reader4844Bytecode } from '../out/yul/Reader4844.yul/Reader4844.json' +import { DeployedContracts, Config } from './boldUpgradeCommon' +import { AssertionStateStruct } from '../build/types/src/challengeV2/IAssertionChain' +// taken from https://github.com/OffchainLabs/nitro-contracts/blob/210e5b3bc96a513d276deaba90399130a60131d5/src/rollup/RollupUserLogic.sol +import { + abi as OldRollupAbi, + bytecode as OldRollupBytecode, +} from '@arbitrum/nitro-contracts-2.0.0/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.json' +import { verifyContract } from './deploymentUtils' + +export const deployDependencies = async ( + signer: Signer, + maxDataSize: number, + isUsingFeeToken: boolean, + isDelayBufferable: boolean, + log: boolean = false, + verify: boolean = true +): Promise< + Omit +> => { + const bridgeFac = new Bridge__factory(signer) + const bridge = await bridgeFac.deploy() + if (log) { + console.log(`Bridge implementation deployed at: ${bridge.address}`) + } + if (verify) { + await bridge.deployTransaction.wait(5) + await verifyContract( + 'Bridge', + bridge.address, + [], + 'src/bridge/Bridge.sol:Bridge' + ) + } + + const contractFactory = new ContractFactory( + IReader4844__factory.abi, + Reader4844Bytecode, + signer + ) + const reader4844 = await contractFactory.deploy() + await reader4844.deployed() + console.log(`Reader4844 deployed at ${reader4844.address}`) + + const seqInboxFac = new SequencerInbox__factory(signer) + const seqInbox = await seqInboxFac.deploy( + maxDataSize, + reader4844.address, + isUsingFeeToken, + isDelayBufferable + ) + if (log) { + console.log( + `Sequencer inbox implementation deployed at: ${seqInbox.address}` + ) + } + if (verify) { + await seqInbox.deployTransaction.wait(5) + await verifyContract('SequencerInbox', seqInbox.address, [ + maxDataSize, + reader4844.address, + isUsingFeeToken, + isDelayBufferable, + ]) + } + + const reiFac = new RollupEventInbox__factory(signer) + const rei = await reiFac.deploy() + if (log) { + console.log(`Rollup event inbox implementation deployed at: ${rei.address}`) + } + if (verify) { + await rei.deployTransaction.wait(5) + await verifyContract('RollupEventInbox', rei.address, []) + } + + const outboxFac = new Outbox__factory(signer) + const outbox = await outboxFac.deploy() + if (log) { + console.log(`Outbox implementation deployed at: ${outbox.address}`) + } + if (verify) { + await outbox.deployTransaction.wait(5) + await verifyContract('Outbox', outbox.address, []) + } + + const inboxFac = new Inbox__factory(signer) + const inbox = await inboxFac.deploy(maxDataSize) + if (log) { + console.log(`Inbox implementation deployed at: ${inbox.address}`) + } + if (verify) { + await inbox.deployTransaction.wait(5) + await verifyContract('Inbox', inbox.address, [maxDataSize]) + } + + const oldRollupUserFac = new ContractFactory( + OldRollupAbi, + OldRollupBytecode, + signer + ) + const oldRollupUser = await oldRollupUserFac.deploy() + if (log) { + console.log(`Old rollup user logic deployed at: ${oldRollupUser.address}`) + } + if (verify) { + await oldRollupUser.deployTransaction.wait(5) + await verifyContract('OldRollupUserLogic', oldRollupUser.address, []) + } + + const newRollupUserFac = new RollupUserLogic__factory(signer) + const newRollupUser = await newRollupUserFac.deploy() + if (log) { + console.log(`New rollup user logic deployed at: ${newRollupUser.address}`) + } + if (verify) { + await newRollupUser.deployTransaction.wait(5) + await verifyContract('RollupUserLogic', newRollupUser.address, []) + } + + const newRollupAdminFac = new RollupAdminLogic__factory(signer) + const newRollupAdmin = await newRollupAdminFac.deploy() + if (log) { + console.log(`New rollup admin logic deployed at: ${newRollupAdmin.address}`) + } + if (verify) { + await newRollupAdmin.deployTransaction.wait(5) + await verifyContract('RollupAdminLogic', newRollupAdmin.address, []) + } + + const challengeManagerFac = new EdgeChallengeManager__factory(signer) + const challengeManager = await challengeManagerFac.deploy() + if (log) { + console.log(`Challenge manager deployed at: ${challengeManager.address}`) + } + if (verify) { + await challengeManager.deployTransaction.wait(5) + await verifyContract('EdgeChallengeManager', challengeManager.address, []) + } + + const prover0Fac = new OneStepProver0__factory(signer) + const prover0 = await prover0Fac.deploy() + await prover0.deployed() + if (log) { + console.log(`Prover0 deployed at: ${prover0.address}`) + } + if (verify) { + await prover0.deployTransaction.wait(5) + await verifyContract('OneStepProver0', prover0.address, []) + } + + const proverMemFac = new OneStepProverMemory__factory(signer) + const proverMem = await proverMemFac.deploy() + await proverMem.deployed() + if (log) { + console.log(`Prover mem deployed at: ${proverMem.address}`) + } + if (verify) { + await proverMem.deployTransaction.wait(5) + await verifyContract('OneStepProverMemory', proverMem.address, []) + } + + const proverMathFac = new OneStepProverMath__factory(signer) + const proverMath = await proverMathFac.deploy() + await proverMath.deployed() + if (log) { + console.log(`Prover math deployed at: ${proverMath.address}`) + } + if (verify) { + await proverMath.deployTransaction.wait(5) + await verifyContract('OneStepProverMath', proverMath.address, []) + } + + const proverHostIoFac = new OneStepProverHostIo__factory(signer) + const proverHostIo = await proverHostIoFac.deploy() + await proverHostIo.deployed() + if (log) { + console.log(`Prover host io deployed at: ${proverHostIo.address}`) + } + if (verify) { + await proverHostIo.deployTransaction.wait(5) + await verifyContract('OneStepProverHostIo', proverHostIo.address, []) + } + + const proofEntryFac = new OneStepProofEntry__factory(signer) + const proofEntry = await proofEntryFac.deploy( + prover0.address, + proverMem.address, + proverMath.address, + proverHostIo.address + ) + await proofEntry.deployed() + if (log) { + console.log(`Proof entry deployed at: ${proofEntry.address}`) + } + if (verify) { + await proofEntry.deployTransaction.wait(5) + await verifyContract('OneStepProofEntry', proofEntry.address, [ + prover0.address, + proverMem.address, + proverMath.address, + proverHostIo.address, + ]) + } + + return { + bridge: bridge.address, + seqInbox: seqInbox.address, + rei: rei.address, + outbox: outbox.address, + inbox: inbox.address, + oldRollupUser: oldRollupUser.address, + newRollupUser: newRollupUser.address, + newRollupAdmin: newRollupAdmin.address, + challengeManager: challengeManager.address, + prover0: prover0.address, + proverMem: proverMem.address, + proverMath: proverMath.address, + proverHostIo: proverHostIo.address, + osp: proofEntry.address, + } +} + +export const deployBoldUpgrade = async ( + wallet: Signer, + config: Config, + log: boolean = false, + verify: boolean = true +): Promise => { + const sequencerInbox = SequencerInbox__factory.connect( + config.contracts.sequencerInbox, + wallet + ) + const isUsingFeeToken = await sequencerInbox.isUsingFeeToken() + const deployed = await deployDependencies( + wallet, + config.settings.maxDataSize, + isUsingFeeToken, + config.settings.isDelayBufferable, + log, + verify + ) + const fac = new BOLDUpgradeAction__factory(wallet) + const boldUpgradeAction = await fac.deploy( + { ...config.contracts, osp: deployed.osp }, + config.proxyAdmins, + deployed, + config.settings + ) + if (log) { + console.log(`BOLD upgrade action deployed at: ${boldUpgradeAction.address}`) + } + if (verify) { + await boldUpgradeAction.deployTransaction.wait(5) + await verifyContract('BOLDUpgradeAction', boldUpgradeAction.address, [ + { ...config.contracts, osp: deployed.osp }, + config.proxyAdmins, + deployed, + config.settings, + ]) + } + const deployedAndBold = { + ...deployed, + boldAction: boldUpgradeAction.address, + rollupReader: await boldUpgradeAction.ROLLUP_READER(), + preImageHashLookup: await boldUpgradeAction.PREIMAGE_LOOKUP(), + } + + return deployedAndBold +} + +export const populateLookup = async ( + wallet: Signer, + rollupAddr: string, + preImageHashLookupAddr: string, + rollupReaderAddr: string +) => { + const oldRollup = new Contract(rollupAddr, OldRollupAbi, wallet.provider) + const latestConfirmed: number = await oldRollup.latestConfirmed() + + let latestConfirmedLog + let toBlock = await wallet.provider!.getBlockNumber() + for (let i = 0; i < 100; i++) { + latestConfirmedLog = await wallet.provider!.getLogs({ + address: rollupAddr, + fromBlock: toBlock - 1000, + toBlock: toBlock, + topics: [ + oldRollup.interface.getEventTopic('NodeCreated'), + ethers.utils.hexZeroPad(ethers.utils.hexlify(latestConfirmed), 32), + ], + }) + if (latestConfirmedLog.length == 1) break + toBlock -= 1000 + } + + if (!latestConfirmedLog || latestConfirmedLog.length != 1) { + throw new Error('Could not find latest confirmed node') + } + const latestConfirmedEvent = oldRollup.interface.parseLog( + latestConfirmedLog[0] + ).args + const afterState: AssertionStateStruct = + latestConfirmedEvent.assertion.afterState + const inboxCount: BigNumber = latestConfirmedEvent.inboxMaxCount + + const lookup = StateHashPreImageLookup__factory.connect( + preImageHashLookupAddr, + wallet + ) + const oldRollupReader = RollupReader__factory.connect( + rollupReaderAddr, + wallet + ) + const node = await oldRollupReader.getNode(latestConfirmed) + const stateHash = await lookup.stateHash(afterState, inboxCount) + if (node.stateHash != stateHash) { + throw new Error(`State hash mismatch ${node.stateHash} != ${stateHash}}`) + } + + await lookup.set(stateHash, afterState, inboxCount) +} diff --git a/scripts/config.ts.example b/scripts/config.ts.example index 78d020e0..a1187ed3 100644 --- a/scripts/config.ts.example +++ b/scripts/config.ts.example @@ -4,6 +4,8 @@ import { ethers } from 'ethers' // This need to be adjusted for Orbit chains export const maxDataSize = 117964 +export const isUsingFeeToken = false; + export const config = { rollupConfig: { confirmPeriodBlocks: ethers.BigNumber.from('45818'), @@ -19,16 +21,23 @@ export const config = { '{"chainId":13331370,"homesteadBlock":0,"daoForkBlock":null,"daoForkSupport":true,"eip150Block":0,"eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000","eip155Block":0,"eip158Block":0,"byzantiumBlock":0,"constantinopleBlock":0,"petersburgBlock":0,"istanbulBlock":0,"muirGlacierBlock":0,"berlinBlock":0,"londonBlock":0,"clique":{"period":0,"epoch":0},"arbitrum":{"EnableArbOS":true,"AllowDebugPrecompiles":false,"DataAvailabilityCommittee":false,"InitialArbOSVersion":10,"InitialChainOwner":"0x1234123412341234123412341234123412341234","GenesisBlockNum":0}}', genesisBlockNum: ethers.BigNumber.from('0'), sequencerInboxMaxTimeVariation: { - delayBlocks: ethers.BigNumber.from('5760'), + delayBlocks: ethers.BigNumber.from('7200'), futureBlocks: ethers.BigNumber.from('12'), delaySeconds: ethers.BigNumber.from('86400'), futureSeconds: ethers.BigNumber.from('3600'), }, + bufferConfig: { + threshold: ethers.BigNumber.from('600'), + max: ethers.BigNumber.from('14400'), + replenishRateInBasis: ethers.BigNumber.from('833'), + } }, validators: [ '0x1234123412341234123412341234123412341234', '0x1234512345123451234512345123451234512345', ], - batchPosters: ['0x1234123412341234123412341234123412341234'], - batchPosterManager: '0x1234123412341234123412341234123412341234' + batchPosterManager: '0x1234123412341234123412341234123412341234', + batchPosters: [ + '0x1234123412341234123412341234123412341234' + ] } diff --git a/scripts/createERC20Rollup.ts b/scripts/createERC20Rollup.ts index 49947b27..ef84d9d3 100644 --- a/scripts/createERC20Rollup.ts +++ b/scripts/createERC20Rollup.ts @@ -33,13 +33,18 @@ async function main() { if (!rollupCreatorAddress) { throw new Error('ROLLUP_CREATOR_ADDRESS not set') } + const stakeTokenAddress = process.env.STAKE_TOKEN_ADDRESS + if (!stakeTokenAddress) { + throw new Error('STAKE_TOKEN_ADDRESS not set') + } console.log('Creating new rollup with', customFeeTokenAddress, 'as fee token') await createRollup( deployer, false, rollupCreatorAddress, - customFeeTokenAddress + customFeeTokenAddress, + stakeTokenAddress ) } diff --git a/scripts/createEthRollup.ts b/scripts/createEthRollup.ts index c76af5dd..488e5d8e 100644 --- a/scripts/createEthRollup.ts +++ b/scripts/createEthRollup.ts @@ -9,9 +9,20 @@ async function main() { throw new Error('ROLLUP_CREATOR_ADDRESS not set') } + const stakeTokenAddress = process.env.STAKE_TOKEN_ADDRESS + if (!stakeTokenAddress) { + throw new Error('STAKE_TOKEN_ADDRESS not set') + } + const [signer] = await ethers.getSigners() - await createRollup(signer, false, rollupCreatorAddress, feeToken) + await createRollup( + signer, + false, + rollupCreatorAddress, + feeToken, + stakeTokenAddress + ) } main() diff --git a/scripts/deployment.ts b/scripts/deployment.ts index 5ec530fe..4b25e155 100644 --- a/scripts/deployment.ts +++ b/scripts/deployment.ts @@ -3,20 +3,22 @@ import '@nomiclabs/hardhat-ethers' import { deployAllContracts, _isRunningOnArbitrum } from './deploymentUtils' import { maxDataSize } from './config' -import { - ArbSys__factory -} from '../build/types' +import { ArbSys__factory } from '../build/types' async function main() { const [signer] = await ethers.getSigners() - + console.log('Deploying contracts with maxDataSize:', maxDataSize) if (process.env['IGNORE_MAX_DATA_SIZE_WARNING'] !== 'true') { let isArbitrum = await _isRunningOnArbitrum(signer) - if (isArbitrum && maxDataSize as any !== 104857) { - throw new Error('maxDataSize should be 104857 when the parent chain is Arbitrum (set IGNORE_MAX_DATA_SIZE_WARNING to ignore)') - } else if (!isArbitrum && maxDataSize as any !== 117964) { - throw new Error('maxDataSize should be 117964 when the parent chain is not Arbitrum (set IGNORE_MAX_DATA_SIZE_WARNING to ignore)') + if (isArbitrum && (maxDataSize as any) !== 104857) { + throw new Error( + 'maxDataSize should be 104857 when the parent chain is Arbitrum (set IGNORE_MAX_DATA_SIZE_WARNING to ignore)' + ) + } else if (!isArbitrum && (maxDataSize as any) !== 117964) { + throw new Error( + 'maxDataSize should be 117964 when the parent chain is not Arbitrum (set IGNORE_MAX_DATA_SIZE_WARNING to ignore)' + ) } } else { console.log('Ignoring maxDataSize warning') @@ -39,7 +41,6 @@ async function main() { contracts.rollupAdmin.address, contracts.rollupUser.address, contracts.upgradeExecutor.address, - contracts.validatorUtils.address, contracts.validatorWalletCreator.address, contracts.deployHelper.address ) diff --git a/scripts/deploymentUtils.ts b/scripts/deploymentUtils.ts index cb8f9c4c..3bfa2dc8 100644 --- a/scripts/deploymentUtils.ts +++ b/scripts/deploymentUtils.ts @@ -28,7 +28,7 @@ export async function verifyContract( contractPathAndName?: string // optional ): Promise { try { - if (process.env.DISABLE_VERIFICATION) return + if (process.env.DISABLE_VERIFICATION === 'true') return // Define the verification options with possible 'contract' property const verificationOptions: { contract?: string @@ -129,7 +129,13 @@ export async function deployAllContracts( const ethSequencerInbox = await deployContract( 'SequencerInbox', signer, - [maxDataSize, reader4844, false], + [maxDataSize, reader4844, false, false], + verify + ) + const ethSequencerInboxDelayBufferable = await deployContract( + 'SequencerInbox', + signer, + [maxDataSize, reader4844, false, true], verify ) @@ -146,7 +152,13 @@ export async function deployAllContracts( const erc20SequencerInbox = await deployContract( 'SequencerInbox', signer, - [maxDataSize, reader4844, true], + [maxDataSize, reader4844, true, false], + verify + ) + const erc20SequencerInboxDelayBufferable = await deployContract( + 'SequencerInbox', + signer, + [maxDataSize, reader4844, true, true], verify ) const erc20Inbox = await deployContract( @@ -170,6 +182,7 @@ export async function deployAllContracts( [ ethBridge.address, ethSequencerInbox.address, + ethSequencerInboxDelayBufferable.address, ethInbox.address, ethRollupEventInbox.address, ethOutbox.address, @@ -177,6 +190,7 @@ export async function deployAllContracts( [ erc20Bridge.address, erc20SequencerInbox.address, + erc20SequencerInboxDelayBufferable.address, erc20Inbox.address, erc20RollupEventInbox.address, erc20Outbox.address, @@ -215,7 +229,7 @@ export async function deployAllContracts( verify ) const challengeManager = await deployContract( - 'ChallengeManager', + 'EdgeChallengeManager', signer, [], verify @@ -228,12 +242,6 @@ export async function deployAllContracts( ) const rollupUser = await deployContract('RollupUserLogic', signer, [], verify) const upgradeExecutor = await deployUpgradeExecutor(signer) - const validatorUtils = await deployContract( - 'ValidatorUtils', - signer, - [], - verify - ) const validatorWalletCreator = await deployContract( 'ValidatorWalletCreator', signer, @@ -249,12 +257,7 @@ export async function deployAllContracts( const deployHelper = await deployContract('DeployHelper', signer, [], verify) if (verify && !process.env.DISABLE_VERIFICATION) { // Deploy RollupProxy contract only for verification, should not be used anywhere else - await deployContract( - 'RollupProxy', - signer, - [], - verify - ) + await deployContract('RollupProxy', signer, [], verify) } return { bridgeCreator, @@ -267,7 +270,6 @@ export async function deployAllContracts( rollupAdmin, rollupUser, upgradeExecutor, - validatorUtils, validatorWalletCreator, rollupCreator, deployHelper, diff --git a/scripts/files/configs/arb1.ts b/scripts/files/configs/arb1.ts new file mode 100644 index 00000000..aa6c2a17 --- /dev/null +++ b/scripts/files/configs/arb1.ts @@ -0,0 +1,47 @@ +import { parseEther } from 'ethers/lib/utils' +import { Config } from '../../boldUpgradeCommon' +import { hoursToBlocks } from './utils' + +export const arb1: Config = { + contracts: { + // it both the excess stake receiver and loser stake escrow + excessStakeReceiver: '0x40Cd7D713D7ae463f95cE5d342Ea6E7F5cF7C999', // parent to child router + rollup: '0x5eF0D09d1E6204141B4d37530808eD19f60FBa35', + bridge: '0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a', + sequencerInbox: '0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6', + rollupEventInbox: '0x57Bd336d579A51938619271a7Cc137a46D0501B1', + outbox: '0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840', + inbox: '0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f', + upgradeExecutor: '0x3ffFbAdAF827559da092217e474760E2b2c3CeDd', + }, + proxyAdmins: { + outbox: '0x554723262467f125ac9e1cdfa9ce15cc53822dbd', + inbox: '0x554723262467f125ac9e1cdfa9ce15cc53822dbd', + bridge: '0x554723262467f125ac9e1cdfa9ce15cc53822dbd', + rei: '0x554723262467f125ac9e1cdfa9ce15cc53822dbd', + seqInbox: '0x554723262467f125ac9e1cdfa9ce15cc53822dbd', + }, + settings: { + challengeGracePeriodBlocks: hoursToBlocks(48), + confirmPeriodBlocks: 45818, // same as old rollup, ~6.4 days + challengePeriodBlocks: 45818, // same as confirm period + stakeToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH + stakeAmt: parseEther('3600'), + miniStakeAmounts: [parseEther('0'), parseEther('555'), parseEther('79')], + chainId: 42161, + disableValidatorWhitelist: true, + blockLeafSize: 2 ** 26, + bigStepLeafSize: 2 ** 19, + smallStepLeafSize: 2 ** 23, + numBigStepLevel: 1, + maxDataSize: 117964, + isDelayBufferable: true, + bufferConfig: { + max: hoursToBlocks(48), // 2 days + threshold: hoursToBlocks(0.5), // well above typical posting frequency + replenishRateInBasis: 500, // 5% replenishment rate + }, + }, + // validator whitelist will be disabled + validators: [], +} diff --git a/scripts/files/configs/index.ts b/scripts/files/configs/index.ts new file mode 100644 index 00000000..ecd864a6 --- /dev/null +++ b/scripts/files/configs/index.ts @@ -0,0 +1,11 @@ +import { arb1 } from './arb1' +import { nova } from './nova' +import { sepolia } from './sepolia' +import { local } from './local' + +export const configs = { + arb1, + nova, + sepolia, + local, +} diff --git a/scripts/files/configs/local.ts b/scripts/files/configs/local.ts new file mode 100644 index 00000000..38a6ce55 --- /dev/null +++ b/scripts/files/configs/local.ts @@ -0,0 +1,52 @@ +import { parseEther } from 'ethers/lib/utils' +import { Config } from '../../boldUpgradeCommon' +import { hoursToBlocks } from './utils' + +export const local: Config = { + contracts: { + bridge: '0x5eCF728ffC5C5E802091875f96281B5aeECf6C49', + inbox: '0x9f8c1c641336A371031499e3c362e40d58d0f254', + outbox: '0x50143333b44Ea46255BEb67255C9Afd35551072F', + rollup: '0xC3124dD1FA0e5D6135c25279760DBF9d9286467B', + sequencerInbox: '0x18d19C5d3E685f5be5b9C86E097f0E439285D216', + rollupEventInbox: '0x0e73faf857e1ca53e700856fcf19f31f920a1e3c', + upgradeExecutor: '0x513d9f96d4d0563debae8a0dc307ea0e46b10ed7', + excessStakeReceiver: '0xC3124dD1FA0e5D6135c25279760DBF9d9286467B', + }, + proxyAdmins: { + outbox: '0x2a1f38c9097e7883570e0b02bfbe6869cc25d8a3', + inbox: '0x2a1f38c9097e7883570e0b02bfbe6869cc25d8a3', + bridge: '0x2a1f38c9097e7883570e0b02bfbe6869cc25d8a3', + rei: '0x2a1f38c9097e7883570e0b02bfbe6869cc25d8a3', + seqInbox: '0x2a1f38c9097e7883570e0b02bfbe6869cc25d8a3', + }, + settings: { + challengeGracePeriodBlocks: 10, + confirmPeriodBlocks: 100, + challengePeriodBlocks: 110, + stakeToken: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', + stakeAmt: parseEther('1'), + miniStakeAmounts: [ + parseEther('6'), + parseEther('5'), + parseEther('4'), + parseEther('3'), + parseEther('2'), + parseEther('1'), + ], + chainId: 412346, + disableValidatorWhitelist: true, + blockLeafSize: 1048576, + bigStepLeafSize: 512, + smallStepLeafSize: 128, + numBigStepLevel: 4, + maxDataSize: 117964, + isDelayBufferable: true, + bufferConfig: { + max: 14400, + threshold: 300, + replenishRateInBasis: 500, + }, + }, + validators: ['0xf10EF80c6eF4930A62C5F9661c91339Df4dBB173'], +} diff --git a/scripts/files/configs/nova.ts b/scripts/files/configs/nova.ts new file mode 100644 index 00000000..4a6f57cb --- /dev/null +++ b/scripts/files/configs/nova.ts @@ -0,0 +1,53 @@ +import { parseEther } from 'ethers/lib/utils' +import { Config } from '../../boldUpgradeCommon' +import { hoursToBlocks } from './utils' + +export const nova: Config = { + contracts: { + // it both the excess stake receiver and loser stake escrow + excessStakeReceiver: '0x40Cd7D713D7ae463f95cE5d342Ea6E7F5cF7C999', // parent to child router + rollup: '0xFb209827c58283535b744575e11953DCC4bEAD88', + bridge: '0xC1Ebd02f738644983b6C4B2d440b8e77DdE276Bd', + sequencerInbox: '0x211E1c4c7f1bF5351Ac850Ed10FD68CFfCF6c21b', + rollupEventInbox: '0x304807A7ed6c1296df2128E6ff3836e477329CD2', + outbox: '0xD4B80C3D7240325D18E645B49e6535A3Bf95cc58', + inbox: '0xc4448b71118c9071Bcb9734A0EAc55D18A153949', + upgradeExecutor: '0x3ffFbAdAF827559da092217e474760E2b2c3CeDd', + }, + proxyAdmins: { + outbox: '0x71d78dc7ccc0e037e12de1e50f5470903ce37148', + inbox: '0x71d78dc7ccc0e037e12de1e50f5470903ce37148', + bridge: '0x71d78dc7ccc0e037e12de1e50f5470903ce37148', + rei: '0x71d78dc7ccc0e037e12de1e50f5470903ce37148', + seqInbox: '0x71d78dc7ccc0e037e12de1e50f5470903ce37148', + }, + settings: { + challengeGracePeriodBlocks: hoursToBlocks(48), + confirmPeriodBlocks: 45818, // same as old rollup, ~6.4 days + challengePeriodBlocks: 45818, // same as confirm period + stakeToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH + // TODO: confirm stakes + stakeAmt: parseEther('1'), + miniStakeAmounts: [parseEther('0'), parseEther('1'), parseEther('1')], + chainId: 42170, + disableValidatorWhitelist: false, + blockLeafSize: 2 ** 26, // leaf sizes same as arb1 + bigStepLeafSize: 2 ** 19, + smallStepLeafSize: 2 ** 23, + numBigStepLevel: 1, + maxDataSize: 117964, + isDelayBufferable: true, + bufferConfig: { + max: hoursToBlocks(48), // 2 days + threshold: hoursToBlocks(1), // well above typical posting frequency + replenishRateInBasis: 500, // 5% replenishment rate + }, + }, + // these validators must still be validators on the old rollup during the upgrade, or the upgrade will fail + validators: [ + // current validators + '0xE27d4Ed355e5273A3D4855c8e11BC4a8d3e39b87', + '0x57004b440Cc4eb2FEd8c4d1865FaC907F9150C76', + '0x24ca61c31c7f9af3ab104db6b9a444f28e9071e3', + ], +} diff --git a/scripts/files/configs/sepolia.ts b/scripts/files/configs/sepolia.ts new file mode 100644 index 00000000..9c9879f2 --- /dev/null +++ b/scripts/files/configs/sepolia.ts @@ -0,0 +1,51 @@ +import { parseEther } from 'ethers/lib/utils' +import { Config } from '../../boldUpgradeCommon' +import { hoursToBlocks } from './utils' + +export const sepolia: Config = { + contracts: { + excessStakeReceiver: '0x391611E7bba966000AC6c78aFc673C4AE46f8BCa', // chain owner multisig + rollup: '0xd80810638dbDF9081b72C1B33c65375e807281C8', + bridge: '0x38f918D0E9F1b721EDaA41302E399fa1B79333a9', + sequencerInbox: '0x6c97864CE4bEf387dE0b3310A44230f7E3F1be0D', + rollupEventInbox: '0xD5B196dd7EC4D823ff5F695536c61f7c8E642B94', + outbox: '0x65f07C7D521164a4d5DaC6eB8Fac8DA067A3B78F', + inbox: '0xaAe29B0366299461418F5324a79Afc425BE5ae21', + upgradeExecutor: '0x5FEe78FE9AD96c1d8557C6D6BB22Eb5A61eeD315', + }, + proxyAdmins: { + outbox: '0xdd63bcaa89d7c3199ef220c1dd59c49f821078b8', + inbox: '0xdd63bcaa89d7c3199ef220c1dd59c49f821078b8', + bridge: '0xdd63bcaa89d7c3199ef220c1dd59c49f821078b8', + rei: '0xdd63bcaa89d7c3199ef220c1dd59c49f821078b8', + seqInbox: '0xdd63bcaa89d7c3199ef220c1dd59c49f821078b8', + }, + settings: { + challengeGracePeriodBlocks: hoursToBlocks(48), // same as arb1 + 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('0'), parseEther('5.5'), parseEther('0.79')], + chainId: 421614, + disableValidatorWhitelist: false, + blockLeafSize: 2 ** 26, // leaf sizes same as arb1 + bigStepLeafSize: 2 ** 19, + smallStepLeafSize: 2 ** 23, + numBigStepLevel: 1, + maxDataSize: 117964, + isDelayBufferable: true, + bufferConfig: { + max: hoursToBlocks(24 * 365), // 365 days, effectively disableing and will be enabled later + threshold: hoursToBlocks(24 * 365), // 365 days, effectively disableing and will be enabled later + replenishRateInBasis: 500, // 5% replenishment rate + }, + }, + // these validators must still be validators on the old rollup during the upgrade, or the upgrade will fail + validators: [ + // current validators + '0x8a8f0a24d7e58a76FC8F77bb68C7c902b91e182e', + '0x87630025E63A30eCf9Ca9d580d9D95922Fea6aF0', + '0xC32B93e581db6EBc50C08ce381143A259B92f1ED', + ], +} diff --git a/scripts/files/configs/utils.ts b/scripts/files/configs/utils.ts new file mode 100644 index 00000000..3f2a419a --- /dev/null +++ b/scripts/files/configs/utils.ts @@ -0,0 +1,10 @@ +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') + } + if (x === 0) { + throw new Error('hours must be greater than 0') + } + return x +} diff --git a/scripts/files/sepoliaDeployedContracts.json b/scripts/files/sepoliaDeployedContracts.json new file mode 100644 index 00000000..c676649b --- /dev/null +++ b/scripts/files/sepoliaDeployedContracts.json @@ -0,0 +1,19 @@ +{ + "bridge": "0x723B45e3233652F64a399C260380AFC4a33F3f9D", + "seqInbox": "0x20B2b541f3382BFB11310Bd53D1C76b015E54775", + "rei": "0xB14D2319BABDd03577f3697340323219cCdA2641", + "outbox": "0x5594a90b3d150f06a16dB5866f47B7F528D35D74", + "inbox": "0x66e62BdeBCCEa538bA9938225a885a5c4D59C117", + "oldRollupUser": "0xcBfA2F189DCA8526Ec0266dB79d6F789b1b32e9e", + "newRollupUser": "0xEcfed86caB17269295E76d1906539bbAbbb3F407", + "newRollupAdmin": "0x61aE32e7dD698c719dDa77688f40F20c4dBdf598", + "challengeManager": "0xF69B6B6Db566df9611ddc2A1C3205C6E4E8c1Ba0", + "prover0": "0x6Dd038e1C80CAa19959D7e3CC302762a1788cc04", + "proverMem": "0x545e0dAbE2dA95515563cecED861420Ec60A0244", + "proverMath": "0x71f1904d9018087722fbF8EBB03be149A59405E2", + "proverHostIo": "0x409CcfCeDF546DE7B855191cC5B7f6EF318d406C", + "osp": "0x32362a2884232d05df32feDeb18a9aBb89A8cf7b", + "boldAction": "0xD45D3C6a11a90a6c91c45E8086076a86ACd5d14c", + "rollupReader": "0x59e367A39b8dBF4Db1b3e6FfC8e8294c5029bCaB", + "preImageHashLookup": "0x1b40DFd553145153c6B93B5B17D505d8156baBB6" +} diff --git a/scripts/local-deployment/deployCreatorAndCreateRollup.ts b/scripts/local-deployment/deployCreatorAndCreateRollup.ts index 1a63b2f7..e38ab7de 100644 --- a/scripts/local-deployment/deployCreatorAndCreateRollup.ts +++ b/scripts/local-deployment/deployCreatorAndCreateRollup.ts @@ -42,6 +42,16 @@ async function main() { feeToken = ethers.constants.AddressZero } + /// get stake token address, if undefined deploy WETH and set it as stake token + let stakeToken = process.env.STAKE_TOKEN_ADDRESS as string + if (!stakeToken) { + console.log('Deploying WETH') + const wethFactory = await ethers.getContractFactory('TestWETH9') + const weth = await wethFactory.deploy('Wrapped Ether', 'WETH') + await weth.deployTransaction.wait() + stakeToken = weth.address + } + /// deploy templates and rollup creator console.log('Deploy RollupCreator') const contracts = await deployAllContracts(deployerWallet, maxDataSize, false) @@ -55,7 +65,6 @@ async function main() { contracts.rollupAdmin.address, contracts.rollupUser.address, contracts.upgradeExecutor.address, - contracts.validatorUtils.address, contracts.validatorWalletCreator.address, contracts.deployHelper.address, { gasLimit: BigNumber.from('300000') } @@ -74,7 +83,8 @@ async function main() { deployerWallet, true, contracts.rollupCreator.address, - feeToken + feeToken, + stakeToken ) if (!result) { diff --git a/scripts/populateLookup.ts b/scripts/populateLookup.ts new file mode 100644 index 00000000..414b7b55 --- /dev/null +++ b/scripts/populateLookup.ts @@ -0,0 +1,55 @@ +import { ethers, Wallet } from 'ethers' +import { DeployedContracts, getConfig, getJsonFile } from './boldUpgradeCommon' +import { populateLookup } from './boldUpgradeFunctions' +import dotenv from 'dotenv' +import path from 'path' + +dotenv.config() + +async function main() { + const l1RpcVal = process.env.L1_RPC_URL + if (!l1RpcVal) { + throw new Error('L1_RPC_URL env variable not set') + } + const l1Rpc = new ethers.providers.JsonRpcProvider(l1RpcVal) + + const l1PrivKey = process.env.L1_PRIV_KEY + if (!l1PrivKey) { + throw new Error('L1_PRIV_KEY env variable not set') + } + const wallet = new Wallet(l1PrivKey, l1Rpc) + + const configNetworkName = process.env.CONFIG_NETWORK_NAME + if (!configNetworkName) { + throw new Error('CONFIG_NETWORK_NAME env variable not set') + } + const config = await getConfig(configNetworkName, l1Rpc) + + const deployedContractsDir = process.env.DEPLOYED_CONTRACTS_DIR + if (!deployedContractsDir) { + throw new Error('DEPLOYED_CONTRACTS_DIR env variable not set') + } + const deployedContractsLocation = path.join( + deployedContractsDir, + configNetworkName + 'DeployedContracts.json' + ) + const deployedContracts = getJsonFile( + deployedContractsLocation + ) as DeployedContracts + if (!deployedContracts?.preImageHashLookup) { + throw new Error( + 'preImageHashLookup not found in ' + deployedContractsLocation + ) + } + + await populateLookup( + wallet, + config.contracts.rollup, + deployedContracts.preImageHashLookup, + deployedContracts.rollupReader + ) +} + +// execute this script just prior to execution of the bold upgrade +// it populates the hash lookup contract necessary preimages +main().then(() => console.log('Done.')) diff --git a/scripts/prepareBoldUpgrade.ts b/scripts/prepareBoldUpgrade.ts new file mode 100644 index 00000000..09e2b4e6 --- /dev/null +++ b/scripts/prepareBoldUpgrade.ts @@ -0,0 +1,66 @@ +import { ethers, Wallet } from 'ethers' +import fs from 'fs' +import { DeployedContracts, getConfig, getJsonFile } from './boldUpgradeCommon' +import { deployBoldUpgrade } from './boldUpgradeFunctions' +import dotenv from 'dotenv' +import path from 'path' + +dotenv.config() + +async function main() { + const l1RpcVal = process.env.L1_RPC_URL + if (!l1RpcVal) { + throw new Error('L1_RPC_URL env variable not set') + } + const l1Rpc = new ethers.providers.JsonRpcProvider(l1RpcVal) + + const l1PrivKey = process.env.L1_PRIV_KEY + if (!l1PrivKey) { + throw new Error('L1_PRIV_KEY env variable not set') + } + const wallet = new Wallet(l1PrivKey, l1Rpc) + + const configNetworkName = process.env.CONFIG_NETWORK_NAME + if (!configNetworkName) { + throw new Error('CONFIG_NETWORK_NAME env variable not set') + } + const config = await getConfig(configNetworkName, l1Rpc) + + const deployedContractsDir = process.env.DEPLOYED_CONTRACTS_DIR + if (!deployedContractsDir) { + throw new Error('DEPLOYED_CONTRACTS_DIR env variable not set') + } + const deployedContractsLocation = path.join( + deployedContractsDir, + configNetworkName + 'DeployedContracts.json' + ) + + // if the deployed contracts exists then we load it and combine + // if not, then we just use the newly created item + let existingDeployedContracts = {} + try { + existingDeployedContracts = getJsonFile( + deployedContractsLocation + ) as DeployedContracts + } catch (err) {} + + const disableVerification = process.env.DISABLE_VERIFICATION === 'true' + const deployedAndBold = await deployBoldUpgrade( + wallet, + config, + true, + !disableVerification + ) + + console.log(`Deployed contracts written to: ${deployedContractsLocation}`) + fs.writeFileSync( + deployedContractsLocation, + JSON.stringify( + { ...existingDeployedContracts, ...deployedAndBold }, + null, + 2 + ) + ) +} + +main().then(() => console.log('Done.')) diff --git a/scripts/rollupCreation.ts b/scripts/rollupCreation.ts index ce16290f..14ac66b6 100644 --- a/scripts/rollupCreation.ts +++ b/scripts/rollupCreation.ts @@ -26,7 +26,6 @@ interface RollupCreatedEvent { sequencerInbox: string bridge: string upgradeExecutor: string - validatorUtils: string validatorWalletCreator: string } } @@ -39,7 +38,6 @@ interface RollupCreationResult { rollup: string 'native-token': string 'upgrade-executor': string - 'validator-utils': string 'validator-wallet-creator': string } @@ -61,7 +59,8 @@ export async function createRollup( signer: Signer, isDevDeployment: boolean, rollupCreatorAddress: string, - feeToken: string + feeToken: string, + stakeToken: string ): Promise<{ rollupCreationResult: RollupCreationResult chainInfo: ChainInfo @@ -101,7 +100,7 @@ export async function createRollup( // Call the createRollup function console.log('Calling createRollup to generate a new rollup ...') const deployParams = isDevDeployment - ? await _getDevRollupConfig(feeToken, validatorWalletCreator) + ? await _getDevRollupConfig(feeToken, validatorWalletCreator, stakeToken) : { config: config.rollupConfig, validators: config.validators, @@ -136,7 +135,6 @@ export async function createRollup( const sequencerInbox = rollupCreatedEvent.args?.sequencerInbox const bridge = rollupCreatedEvent.args?.bridge const upgradeExecutor = rollupCreatedEvent.args?.upgradeExecutor - const validatorUtils = rollupCreatedEvent.args?.validatorUtils const validatorWalletCreator = rollupCreatedEvent.args?.validatorWalletCreator @@ -171,7 +169,6 @@ export async function createRollup( console.log('AdminProxy Contract created at address:', adminProxy) console.log('SequencerInbox (proxy) created at address:', sequencerInbox) console.log('Bridge (proxy) Contract created at address:', bridge) - console.log('ValidatorUtils Contract created at address:', validatorUtils) console.log( 'ValidatorWalletCreator Contract created at address:', validatorWalletCreator @@ -188,7 +185,6 @@ export async function createRollup( rollup: rollupAddress, 'native-token': nativeToken, 'upgrade-executor': upgradeExecutor, - 'validator-utils': validatorUtils, 'validator-wallet-creator': validatorWalletCreator, } @@ -222,7 +218,8 @@ export async function createRollup( async function _getDevRollupConfig( feeToken: string, - validatorWalletCreator: string + validatorWalletCreator: string, + stakeToken: string ) { // set up owner address const ownerAddress = @@ -299,14 +296,26 @@ async function _getDevRollupConfig( config: { confirmPeriodBlocks: ethers.BigNumber.from('20'), extraChallengeTimeBlocks: ethers.BigNumber.from('200'), - stakeToken: ethers.constants.AddressZero, + stakeToken: stakeToken, baseStake: ethers.utils.parseEther('1'), wasmModuleRoot: wasmModuleRoot, owner: ownerAddress, loserStakeEscrow: ethers.constants.AddressZero, chainId: JSON.parse(chainConfig)['chainId'], chainConfig: chainConfig, - genesisBlockNum: 0, + 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'), diff --git a/scripts/testLocalExecuteBoldUpgrade.ts b/scripts/testLocalExecuteBoldUpgrade.ts new file mode 100644 index 00000000..58510e96 --- /dev/null +++ b/scripts/testLocalExecuteBoldUpgrade.ts @@ -0,0 +1,643 @@ +import { Contract, ContractReceipt } from 'ethers' +import { ethers } from 'hardhat' +import { + Config, + DeployedContracts, + getConfig, + getJsonFile, +} from './boldUpgradeCommon' +import { + BOLDUpgradeAction__factory, + Bridge, + Bridge__factory, + EdgeChallengeManager, + EdgeChallengeManager__factory, + Outbox__factory, + RollupEventInbox__factory, + RollupUserLogic, + RollupUserLogic__factory, + SequencerInbox__factory, +} from '../build/types' +import { abi as UpgradeExecutorAbi } from '@offchainlabs/upgrade-executor/build/contracts/src/UpgradeExecutor.sol/UpgradeExecutor.json' +import dotenv from 'dotenv' +import { RollupMigratedEvent } from '../build/types/src/rollup/BOLDUpgradeAction.sol/BOLDUpgradeAction' +import { abi as OldRollupAbi } from '@arbitrum/nitro-contracts-2.0.0/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.json' +import { JsonRpcProvider } from '@ethersproject/providers' +import { getAddress } from 'ethers/lib/utils' +import path from 'path' + +dotenv.config() + +type UnwrapPromise = T extends Promise ? U : T + +type VerificationParams = { + l1Rpc: JsonRpcProvider + config: Config + deployedContracts: DeployedContracts + preUpgradeState: UnwrapPromise> + receipt: ContractReceipt +} + +const executors: { [key: string]: string } = { + // DAO L1 Timelocks + arb1: '0xE6841D92B0C345144506576eC13ECf5103aC7f49', + nova: '0xE6841D92B0C345144506576eC13ECf5103aC7f49', + sepolia: '0x6EC62D826aDc24AeA360be9cF2647c42b9Cdb19b', +} + +async function getPreUpgradeState(l1Rpc: JsonRpcProvider, config: Config) { + const oldRollupContract = new Contract( + config.contracts.rollup, + OldRollupAbi, + l1Rpc + ) + + const stakerCount = await oldRollupContract.stakerCount() + + const stakers: string[] = [] + for (let i = 0; i < stakerCount; i++) { + stakers.push(await oldRollupContract.getStakerAddress(i)) + } + + const boxes = await getAllowedInboxesOutboxesFromBridge( + Bridge__factory.connect(config.contracts.bridge, l1Rpc) + ) + + const wasmModuleRoot = await oldRollupContract.wasmModuleRoot() + + return { + stakers, + wasmModuleRoot, + ...boxes, + } +} + +async function perform( + l1Rpc: JsonRpcProvider, + config: Config, + deployedContracts: DeployedContracts +) { + const executor = executors[process.env.CONFIG_NETWORK_NAME!] + if (!executor) { + throw new Error( + 'no executor found for CONFIG_NETWORK_NAME or CONFIG_NETWORK_NAME not set' + ) + } + await l1Rpc.send('hardhat_impersonateAccount', [executor]) + + await l1Rpc.send('hardhat_setBalance', [executor, '0x1000000000000000']) + + const timelockImposter = l1Rpc.getSigner(executor) + + const upExec = new Contract( + config.contracts.upgradeExecutor, + UpgradeExecutorAbi, + timelockImposter + ) + const boldAction = BOLDUpgradeAction__factory.connect( + deployedContracts.boldAction, + timelockImposter + ) + + // what validators did we have in the old rollup? + const boldActionPerformData = boldAction.interface.encodeFunctionData( + 'perform', + [config.validators] + ) + + return (await ( + await upExec.execute(deployedContracts.boldAction, boldActionPerformData) + ).wait()) as ContractReceipt +} + +async function verifyPostUpgrade(params: VerificationParams) { + const { l1Rpc, deployedContracts, receipt } = params + + const boldAction = BOLDUpgradeAction__factory.connect( + deployedContracts.boldAction, + l1Rpc + ) + + const parsedLog = boldAction.interface.parseLog( + receipt.events![receipt.events!.length - 2] + ).args as RollupMigratedEvent['args'] + + const edgeChallengeManager = EdgeChallengeManager__factory.connect( + parsedLog.challengeManager, + l1Rpc + ) + + const newRollup = RollupUserLogic__factory.connect(parsedLog.rollup, l1Rpc) + + await checkSequencerInbox(params, newRollup) + await checkInbox(params) + await checkBridge(params, newRollup) + await checkRollupEventInbox(params, newRollup) + await checkOutbox(params, newRollup) + await checkOldRollup(params) + await checkNewRollup(params, newRollup, edgeChallengeManager) + await checkNewChallengeManager(params, newRollup, edgeChallengeManager) +} + +async function checkSequencerInbox( + params: VerificationParams, + newRollup: RollupUserLogic +) { + const { l1Rpc, config, deployedContracts } = params + + const seqInboxContract = SequencerInbox__factory.connect( + config.contracts.sequencerInbox, + l1Rpc + ) + + // make sure the impl was updated + if ( + (await getProxyImpl(l1Rpc, config.contracts.sequencerInbox)) !== + deployedContracts.seqInbox + ) { + throw new Error('SequencerInbox was not upgraded') + } + + // check delay buffer parameters + const buffer = await seqInboxContract.buffer() + + if (!buffer.bufferBlocks.eq(config.settings.bufferConfig.max)) { + throw new Error('bufferBlocks does not match') + } + if (!buffer.max.eq(config.settings.bufferConfig.max)) { + throw new Error('max does not match') + } + if (!buffer.threshold.eq(config.settings.bufferConfig.threshold)) { + throw new Error('threshold does not match') + } + if ( + !buffer.replenishRateInBasis.eq( + config.settings.bufferConfig.replenishRateInBasis + ) + ) { + throw new Error('replenishRateInBasis does not match') + } + + // check rollup was set + if ((await seqInboxContract.rollup()) !== newRollup.address) { + throw new Error('SequencerInbox rollup address does not match') + } +} + +async function checkInbox(params: VerificationParams) { + const { l1Rpc, config, deployedContracts } = params + + // make sure the impl was updated + if ( + (await getProxyImpl(l1Rpc, config.contracts.inbox)) !== + deployedContracts.inbox + ) { + throw new Error('Inbox was not upgraded') + } +} + +async function checkRollupEventInbox( + params: VerificationParams, + newRollup: RollupUserLogic +) { + const { l1Rpc, config, deployedContracts } = params + + const rollupEventInboxContract = RollupEventInbox__factory.connect( + config.contracts.rollupEventInbox, + l1Rpc + ) + + // make sure the impl was updated + if ( + (await getProxyImpl(l1Rpc, config.contracts.rollupEventInbox)) !== + deployedContracts.rei + ) { + throw new Error('RollupEventInbox was not upgraded') + } + + // make sure rollup was set + if ((await rollupEventInboxContract.rollup()) !== newRollup.address) { + throw new Error('RollupEventInbox rollup address does not match') + } +} + +async function checkOutbox( + params: VerificationParams, + newRollup: RollupUserLogic +) { + const { l1Rpc, config, deployedContracts } = params + + const outboxContract = Outbox__factory.connect(config.contracts.outbox, l1Rpc) + + // make sure the impl was updated + if ( + (await getProxyImpl(l1Rpc, config.contracts.outbox)) !== + deployedContracts.outbox + ) { + throw new Error('Outbox was not upgraded') + } + + // make sure rollup was set + if ((await outboxContract.rollup()) !== newRollup.address) { + throw new Error('Outbox rollup address does not match') + } +} + +async function checkBridge( + params: VerificationParams, + newRollup: RollupUserLogic +) { + const { l1Rpc, config, deployedContracts, preUpgradeState } = params + const bridgeContract = Bridge__factory.connect(config.contracts.bridge, l1Rpc) + + // make sure the impl was updated + if ( + (await getProxyImpl(l1Rpc, config.contracts.bridge)) !== + deployedContracts.bridge + ) { + throw new Error('Bridge was not upgraded') + } + + // make sure rollup was set + if ((await bridgeContract.rollup()) !== newRollup.address) { + throw new Error('Bridge rollup address does not match') + } + + // make sure allowed inbox and outbox list is unchanged + const { inboxes, outboxes } = await getAllowedInboxesOutboxesFromBridge( + bridgeContract + ) + if (JSON.stringify(inboxes) !== JSON.stringify(preUpgradeState.inboxes)) { + throw new Error('Allowed inbox list has changed') + } + if (JSON.stringify(outboxes) !== JSON.stringify(preUpgradeState.outboxes)) { + throw new Error('Allowed outbox list has changed') + } + + // make sure the sequencer inbox is unchanged + if ( + (await bridgeContract.sequencerInbox()) !== config.contracts.sequencerInbox + ) { + throw new Error('Sequencer inbox has changed') + } +} + +async function checkOldRollup(params: VerificationParams) { + const { l1Rpc, config, deployedContracts, preUpgradeState } = params + + const oldRollupContract = new Contract( + config.contracts.rollup, + OldRollupAbi, + l1Rpc + ) + + // ensure the old rollup is paused + if (!(await oldRollupContract.paused())) { + throw new Error('Old rollup is not paused') + } + + // ensure there are no stakers + if (!(await oldRollupContract.stakerCount()).eq(0)) { + throw new Error('Old rollup has stakers') + } + + // ensure that the old stakers are now zombies + for (const staker of preUpgradeState.stakers) { + if (!(await oldRollupContract.isZombie(staker))) { + throw new Error('Old staker is not a zombie') + } + } + + // ensure old rollup was upgraded + if ( + (await getProxyImpl(l1Rpc, config.contracts.rollup, true)) !== + getAddress(deployedContracts.oldRollupUser) + ) { + throw new Error('Old rollup was not upgraded') + } +} + +async function checkInitialAssertion( + params: VerificationParams, + newRollup: RollupUserLogic, + newEdgeChallengeManager: EdgeChallengeManager +) { + const { config, l1Rpc } = params + + const bridgeContract = Bridge__factory.connect(config.contracts.bridge, l1Rpc) + + const latestConfirmed = await newRollup.latestConfirmed() + + await newRollup.validateConfig(latestConfirmed, { + wasmModuleRoot: params.preUpgradeState.wasmModuleRoot, + requiredStake: config.settings.stakeAmt, + challengeManager: newEdgeChallengeManager.address, + confirmPeriodBlocks: config.settings.confirmPeriodBlocks, + nextInboxPosition: await bridgeContract.sequencerMessageCount(), + }) +} + +async function checkNewRollup( + params: VerificationParams, + newRollup: RollupUserLogic, + newEdgeChallengeManager: EdgeChallengeManager +) { + const { config, deployedContracts, preUpgradeState } = params + + // check bridge + if ( + getAddress(await newRollup.bridge()) != getAddress(config.contracts.bridge) + ) { + throw new Error('Bridge address does not match') + } + + // check rei + if ( + getAddress(await newRollup.rollupEventInbox()) != + getAddress(config.contracts.rollupEventInbox) + ) { + throw new Error('RollupEventInbox address does not match') + } + + // check inbox + if ( + getAddress(await newRollup.inbox()) != getAddress(config.contracts.inbox) + ) { + throw new Error('Inbox address does not match') + } + + // check outbox + if ( + getAddress(await newRollup.outbox()) != getAddress(config.contracts.outbox) + ) { + throw new Error('Outbox address does not match') + } + + // check challengeManager + if ( + getAddress(await newRollup.challengeManager()) !== + newEdgeChallengeManager.address + ) { + throw new Error('ChallengeManager address does not match') + } + + // chainId + if (!(await newRollup.chainId()).eq(config.settings.chainId)) { + throw new Error('Chain ID does not match') + } + + // wasmModuleRoot + if ((await newRollup.wasmModuleRoot()) !== preUpgradeState.wasmModuleRoot) { + throw new Error('Wasm module root does not match') + } + + // challengeGracePeriodBlocks + if ( + !(await newRollup.challengeGracePeriodBlocks()).eq( + config.settings.challengeGracePeriodBlocks + ) + ) { + throw new Error('Challenge grace period blocks does not match') + } + + // loserStakeEscrow + if ( + getAddress(await newRollup.loserStakeEscrow()) !== + getAddress(config.contracts.excessStakeReceiver) + ) { + throw new Error('Loser stake escrow address does not match') + } + + // check initial assertion TODO + await checkInitialAssertion(params, newRollup, newEdgeChallengeManager) + + // check validator whitelist disabled + if ( + (await newRollup.validatorWhitelistDisabled()) !== + config.settings.disableValidatorWhitelist + ) { + throw new Error('Validator whitelist disabled does not match') + } + + // make sure all validators are set + for (const val of config.validators) { + if (!(await newRollup.isValidator(val))) { + throw new Error('Validator not set') + } + } + + // check stake token address + if ( + getAddress(await newRollup.stakeToken()) != + getAddress(config.settings.stakeToken) + ) { + throw new Error('Stake token address does not match') + } + + // check confirm period blocks + if ( + !(await newRollup.confirmPeriodBlocks()).eq( + config.settings.confirmPeriodBlocks + ) + ) { + throw new Error('Confirm period blocks does not match') + } + + // check base stake + if (!(await newRollup.baseStake()).eq(config.settings.stakeAmt)) { + throw new Error('Base stake does not match') + } + + // check fast confirmer (must be 0 for the local chain) + if ( + getAddress(await newRollup.anyTrustFastConfirmer()) !== + ethers.constants.AddressZero + ) { + throw new Error('Any trust fast confirmer does not match') + } +} + +async function checkNewChallengeManager( + params: VerificationParams, + newRollup: RollupUserLogic, + edgeChallengeManager: EdgeChallengeManager +) { + const { config, deployedContracts } = params + + // check assertion chain + if ( + getAddress(await edgeChallengeManager.assertionChain()) != + getAddress(newRollup.address) + ) { + throw new Error('Assertion chain address does not match') + } + + // check challenge period blocks + if ( + !(await edgeChallengeManager.challengePeriodBlocks()).eq( + config.settings.challengePeriodBlocks + ) + ) { + throw new Error('Challenge period blocks does not match') + } + + // check osp entry + if ( + getAddress(await edgeChallengeManager.oneStepProofEntry()) != + getAddress(deployedContracts.osp) + ) { + throw new Error('OSP address does not match') + } + + // check level heights + if ( + !(await edgeChallengeManager.LAYERZERO_BLOCKEDGE_HEIGHT()).eq( + config.settings.blockLeafSize + ) + ) { + throw new Error('Block leaf size does not match') + } + + if ( + !(await edgeChallengeManager.LAYERZERO_BIGSTEPEDGE_HEIGHT()).eq( + config.settings.bigStepLeafSize + ) + ) { + throw new Error('Big step leaf size does not match') + } + + if ( + !(await edgeChallengeManager.LAYERZERO_SMALLSTEPEDGE_HEIGHT()).eq( + config.settings.smallStepLeafSize + ) + ) { + throw new Error('Small step leaf size does not match') + } + + // check stake token address + if ( + getAddress(await edgeChallengeManager.stakeToken()) != + getAddress(config.settings.stakeToken) + ) { + throw new Error('Stake token address does not match') + } + + // check mini stake amounts + for (let i = 0; i < config.settings.miniStakeAmounts.length; i++) { + if ( + !(await edgeChallengeManager.stakeAmounts(i)).eq( + config.settings.miniStakeAmounts[i] + ) + ) { + throw new Error('Mini stake amount does not match') + } + } + + // check excess stake receiver + if ( + (await edgeChallengeManager.excessStakeReceiver()) !== + config.contracts.excessStakeReceiver + ) { + throw new Error('Excess stake receiver does not match') + } + + // check num bigstep levels + if ( + (await edgeChallengeManager.NUM_BIGSTEP_LEVEL()) !== + config.settings.numBigStepLevel + ) { + throw new Error('Number of big step level does not match') + } +} + +async function getProxyImpl( + l1Rpc: JsonRpcProvider, + proxyAddr: string, + secondary = false +) { + const primarySlot = + '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' + const secondarySlot = + '0x2b1dbce74324248c222f0ec2d5ed7bd323cfc425b336f0253c5ccfda7265546d' + const val = await l1Rpc.getStorageAt( + proxyAddr, + secondary ? secondarySlot : primarySlot + ) + return getAddress('0x' + val.slice(26)) +} + +async function getAllowedInboxesOutboxesFromBridge(bridge: Bridge) { + const inboxes: string[] = [] + const outboxes: string[] = [] + + for (let i = 0; ; i++) { + try { + inboxes.push(await bridge.allowedDelayedInboxList(i)) + } catch (e: any) { + if (e.code !== 'CALL_EXCEPTION') { + throw e + } + break + } + } + + for (let i = 0; ; i++) { + try { + outboxes.push(await bridge.allowedOutboxList(i)) + } catch (e: any) { + if (e.code !== 'CALL_EXCEPTION') { + throw e + } + break + } + } + + return { + inboxes, + outboxes, + } +} + +async function main() { + const l1RpcVal = process.env.L1_RPC_URL + if (!l1RpcVal) { + throw new Error('L1_RPC_URL env variable not set') + } + const l1Rpc = new ethers.providers.JsonRpcProvider( + l1RpcVal + ) as JsonRpcProvider + + const configNetworkName = process.env.CONFIG_NETWORK_NAME + if (!configNetworkName) { + throw new Error('CONFIG_NETWORK_NAME env variable not set') + } + const config = await getConfig(configNetworkName, l1Rpc) + + const deployedContractsDir = process.env.DEPLOYED_CONTRACTS_DIR + if (!deployedContractsDir) { + throw new Error('DEPLOYED_CONTRACTS_DIR env variable not set') + } + const deployedContractsLocation = path.join( + deployedContractsDir, + configNetworkName + 'DeployedContracts.json' + ) + + const deployedContracts = getJsonFile( + deployedContractsLocation + ) as DeployedContracts + if (!deployedContracts.boldAction) { + throw new Error('No boldAction contract deployed') + } + + const preUpgradeState = await getPreUpgradeState(l1Rpc, config) + const receipt = await perform(l1Rpc, config, deployedContracts) + await verifyPostUpgrade({ + l1Rpc, + config, + deployedContracts, + preUpgradeState, + receipt, + }) +} + +main().then(() => console.log('Done.')) diff --git a/scripts/testUpgrade.bash b/scripts/testUpgrade.bash new file mode 100755 index 00000000..52fd8ff2 --- /dev/null +++ b/scripts/testUpgrade.bash @@ -0,0 +1,15 @@ +#!/bin/bash + +anvil --fork-url $L1_RPC > /dev/null & + +anvil_pid=$! + +yarn script:bold-prepare && \ +yarn script:bold-populate-lookup && \ +yarn script:bold-local-execute + +ecode=$? + +kill $anvil_pid + +exit $ecode \ No newline at end of file diff --git a/slither.db.json b/slither.db.json index fcd01540..2953863f 100644 --- a/slither.db.json +++ b/slither.db.json @@ -1 +1 @@ -[{"elements": [{"type": "function", "name": "fastConfirmNextNode", "source_mapping": {"start": 6765, "length": 327, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [172, 173, 174, 175, 176, 177, 178, 179, 180], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26098, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNextNode(bytes32,bytes32,bytes32)"}}, {"type": "node", "name": "require(bool,string)(nodeHash == getNodeStorage(firstUnresolvedNode()).nodeHash,WH)", "source_mapping": {"start": 6959, "length": 73, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [178], "starting_column": 9, "ending_column": 82}, "type_specific_fields": {"parent": {"type": "function", "name": "fastConfirmNextNode", "source_mapping": {"start": 6765, "length": 327, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [172, 173, 174, 175, 176, 177, 178, 179, 180], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26098, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNextNode(bytes32,bytes32,bytes32)"}}}}], "description": "AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,bytes32) (src/rollup/RollupUserLogic.sol#172-180) uses a dangerous strict equality:\n\t- require(bool,string)(nodeHash == getNodeStorage(firstUnresolvedNode()).nodeHash,WH) (src/rollup/RollupUserLogic.sol#178)\n", "markdown": "[AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,bytes32)](src/rollup/RollupUserLogic.sol#L172-L180) uses a dangerous strict equality:\n\t- [require(bool,string)(nodeHash == getNodeStorage(firstUnresolvedNode()).nodeHash,WH)](src/rollup/RollupUserLogic.sol#L178)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L172-L180", "id": "5f473ab9e03dab343568520a0a4dbeeba01a25e79b6d1a03c351b331a00f4e3b", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "variable", "name": "anyTrustFastConfirmer", "source_mapping": {"start": 2460, "length": 36, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [80], "starting_column": 5, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "fastConfirmNextNode", "source_mapping": {"start": 6793, "length": 334, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [176, 177, 178, 179, 180], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNextNode(bytes32,bytes32,bytes32)"}}], "description": "RollupCore.anyTrustFastConfirmer (src/rollup/RollupCore.sol#80) is never initialized. It is used in:\n\t- AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,bytes32) (src/rollup/RollupUserLogic.sol#176-180)\n", "markdown": "[RollupCore.anyTrustFastConfirmer](src/rollup/RollupCore.sol#L80) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,bytes32)](src/rollup/RollupUserLogic.sol#L176-L180)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L80", "id": "7588d31598e0049c45ba6922d304b0edadbf1308b5a8af9527dffbbc4dc61ac4", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21211, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}, {"type": "node", "name": "multiplier = withNumerator / denominators[periodsPassed % 10]", "source_mapping": {"start": 22554, "length": 69, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [542], "starting_column": 9, "ending_column": 78}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21211, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}, {"type": "node", "name": "baseStake * multiplier", "source_mapping": {"start": 22702, "length": 29, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [546], "starting_column": 9, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21211, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}], "description": "AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#501-547) performs a multiplication on the result of a division:\n\t- multiplier = withNumerator / denominators[periodsPassed % 10] (src/rollup/RollupUserLogic.sol#542)\n\t- baseStake * multiplier (src/rollup/RollupUserLogic.sol#546)\n", "markdown": "[AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L501-L547) performs a multiplication on the result of a division:\n\t- [multiplier = withNumerator / denominators[periodsPassed % 10]](src/rollup/RollupUserLogic.sol#L542)\n\t- [baseStake * multiplier](src/rollup/RollupUserLogic.sol#L546)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L501-L547", "id": "c6b99e53c65770259b3301c94d2bc1a08086bddcc14611a28cdd3ac02bb85aab", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21211, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}, {"type": "node", "name": "multiplier == 0", "source_mapping": {"start": 22637, "length": 15, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [543], "starting_column": 13, "ending_column": 28}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21211, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}], "description": "AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#501-547) uses a dangerous strict equality:\n\t- multiplier == 0 (src/rollup/RollupUserLogic.sol#543)\n", "markdown": "[AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L501-L547) uses a dangerous strict equality:\n\t- [multiplier == 0](src/rollup/RollupUserLogic.sol#L543)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L501-L547", "id": "cd03d61e7b54e2afdbbc53bb1658f1e1bb0ff6071019d4e450c88b97ab1ef062", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "fastConfirmNextNode", "source_mapping": {"start": 6793, "length": 334, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [176, 177, 178, 179, 180], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNextNode(bytes32,bytes32,bytes32)"}}, {"type": "node", "name": "require(bool,string)(nodeHash == getNodeStorage(firstUnresolvedNode()).nodeHash,WRONG_HASH)", "source_mapping": {"start": 6986, "length": 81, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [178], "starting_column": 9, "ending_column": 90}, "type_specific_fields": {"parent": {"type": "function", "name": "fastConfirmNextNode", "source_mapping": {"start": 6793, "length": 334, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [176, 177, 178, 179, 180], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNextNode(bytes32,bytes32,bytes32)"}}}}], "description": "AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,bytes32) (src/rollup/RollupUserLogic.sol#176-180) uses a dangerous strict equality:\n\t- require(bool,string)(nodeHash == getNodeStorage(firstUnresolvedNode()).nodeHash,WRONG_HASH) (src/rollup/RollupUserLogic.sol#178)\n", "markdown": "[AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,bytes32)](src/rollup/RollupUserLogic.sol#L176-L180) uses a dangerous strict equality:\n\t- [require(bool,string)(nodeHash == getNodeStorage(firstUnresolvedNode()).nodeHash,WRONG_HASH)](src/rollup/RollupUserLogic.sol#L178)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L176-L180", "id": "19ca8615fd5f71005c78c7230011930b328c1949f9594bef453bbe022663a85d", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "requireUnchallengedStaker", "source_mapping": {"start": 26420, "length": 212, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [640, 641, 642, 643], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "requireUnchallengedStaker(address)"}}, {"type": "node", "name": "require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL)", "source_mapping": {"start": 26557, "length": 68, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [642], "starting_column": 9, "ending_column": 77}, "type_specific_fields": {"parent": {"type": "function", "name": "requireUnchallengedStaker", "source_mapping": {"start": 26420, "length": 212, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [640, 641, 642, 643], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "requireUnchallengedStaker(address)"}}}}], "description": "AbsRollupUserLogic.requireUnchallengedStaker(address) (src/rollup/RollupUserLogic.sol#640-643) uses a dangerous strict equality:\n\t- require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL) (src/rollup/RollupUserLogic.sol#642)\n", "markdown": "[AbsRollupUserLogic.requireUnchallengedStaker(address)](src/rollup/RollupUserLogic.sol#L640-L643) uses a dangerous strict equality:\n\t- [require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL)](src/rollup/RollupUserLogic.sol#L642)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L640-L643", "id": "5b92a43a048601d647a680d472499f14a3b778f80130e8c058351203f5d5fd5a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "stakeOnExistingNode", "source_mapping": {"start": 7909, "length": 583, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnExistingNode(uint64,bytes32)"}}, {"type": "node", "name": "require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV)", "source_mapping": {"start": 8371, "length": 72, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [213], "starting_column": 9, "ending_column": 81}, "type_specific_fields": {"parent": {"type": "function", "name": "stakeOnExistingNode", "source_mapping": {"start": 7909, "length": 583, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnExistingNode(uint64,bytes32)"}}}}], "description": "AbsRollupUserLogic.stakeOnExistingNode(uint64,bytes32) (src/rollup/RollupUserLogic.sol#200-215) uses a dangerous strict equality:\n\t- require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV) (src/rollup/RollupUserLogic.sol#213)\n", "markdown": "[AbsRollupUserLogic.stakeOnExistingNode(uint64,bytes32)](src/rollup/RollupUserLogic.sol#L200-L215) uses a dangerous strict equality:\n\t- [require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV)](src/rollup/RollupUserLogic.sol#L213)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L200-L215", "id": "ccbd0d521b15fdf53a5989679bae528b0dc5388bbbb4c4fdc19a8b9bd9f86879", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "createChallenge", "source_mapping": {"start": 13265, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}, {"type": "node", "name": "challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME)", "source_mapping": {"start": 15808, "length": 398, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [374, 375, 376, 377, 378, 379, 380, 381, 382, 383], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallenge", "source_mapping": {"start": 13265, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft)", "source_mapping": {"start": 16750, "length": 317, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409], "starting_column": 9, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallengeHelper", "source_mapping": {"start": 16402, "length": 672, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "createChallengeHelper(address[2],MachineStatus[2],GlobalState[2],uint64,bytes32[2],uint256,uint256)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "challengeStarted(stakers[0],stakers[1],challengeIndex)", "source_mapping": {"start": 16242, "length": 56, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [385], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallenge", "source_mapping": {"start": 13265, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26133, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "_stakerMap[staker1].currentChallenge = challenge", "source_mapping": {"start": 13618, "length": 48, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [384], "starting_column": 9, "ending_column": 57}, "type_specific_fields": {"parent": {"type": "function", "name": "challengeStarted", "source_mapping": {"start": 13491, "length": 240, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "challengeStarted(address,address,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "_stakerMap[staker2].currentChallenge = challenge", "source_mapping": {"start": 13676, "length": 48, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [385], "starting_column": 9, "ending_column": 57}, "type_specific_fields": {"parent": {"type": "function", "name": "challengeStarted", "source_mapping": {"start": 13491, "length": 240, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "challengeStarted(address,address,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}], "description": "Reentrancy in AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2]) (src/rollup/RollupUserLogic.sol#315-388):\n\tExternal calls:\n\t- challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME) (src/rollup/RollupUserLogic.sol#374-383)\n\t\t- challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft) (src/rollup/RollupUserLogic.sol#399-409)\n\tState variables written after the call(s):\n\t- challengeStarted(stakers[0],stakers[1],challengeIndex) (src/rollup/RollupUserLogic.sol#385)\n\t\t- _stakerMap[staker1].currentChallenge = challenge (src/rollup/RollupCore.sol#384)\n\t\t- _stakerMap[staker2].currentChallenge = challenge (src/rollup/RollupCore.sol#385)\n\tRollupCore._stakerMap (src/rollup/RollupCore.sol#68) can be used in cross function reentrancies:\n\t- RollupCore._stakerMap (src/rollup/RollupCore.sol#68)\n\t- RollupCore.amountStaked(address) (src/rollup/RollupCore.sol#186-188)\n\t- RollupCore.challengeStarted(address,address,uint64) (src/rollup/RollupCore.sol#379-386)\n\t- RollupCore.clearChallenge(address) (src/rollup/RollupCore.sol#368-371)\n\t- RollupCore.currentChallenge(address) (src/rollup/RollupCore.sol#177-179)\n\t- RollupCore.deleteStaker(address) (src/rollup/RollupCore.sol#543-551)\n\t- RollupCore.getStaker(address) (src/rollup/RollupCore.sol#195-197)\n\t- RollupCore.inChallenge(address,address) (src/rollup/RollupCore.sol#351-362)\n\t- RollupCore.increaseStakeBy(address,uint256) (src/rollup/RollupCore.sol#393-399)\n\t- RollupCore.isStaked(address) (src/rollup/RollupCore.sol#149-151)\n\t- RollupCore.isStakedOnLatestConfirmed(address) (src/rollup/RollupCore.sol#159-161)\n\t- RollupCore.latestStakedNode(address) (src/rollup/RollupCore.sol#168-170)\n\t- RollupCore.reduceStakeTo(address,uint256) (src/rollup/RollupCore.sol#407-416)\n\t- RollupCore.stakeOnNode(address,uint64) (src/rollup/RollupCore.sol#508-512)\n\t- RollupCore.turnIntoZombie(address) (src/rollup/RollupCore.sol#422-426)\n\t- RollupCore.withdrawStaker(address) (src/rollup/RollupCore.sol#489-501)\n", "markdown": "Reentrancy in [AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])](src/rollup/RollupUserLogic.sol#L315-L388):\n\tExternal calls:\n\t- [challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME)](src/rollup/RollupUserLogic.sol#L374-L383)\n\t\t- [challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft)](src/rollup/RollupUserLogic.sol#L399-L409)\n\tState variables written after the call(s):\n\t- [challengeStarted(stakers[0],stakers[1],challengeIndex)](src/rollup/RollupUserLogic.sol#L385)\n\t\t- [_stakerMap[staker1].currentChallenge = challenge](src/rollup/RollupCore.sol#L384)\n\t\t- [_stakerMap[staker2].currentChallenge = challenge](src/rollup/RollupCore.sol#L385)\n\t[RollupCore._stakerMap](src/rollup/RollupCore.sol#L68) can be used in cross function reentrancies:\n\t- [RollupCore._stakerMap](src/rollup/RollupCore.sol#L68)\n\t- [RollupCore.amountStaked(address)](src/rollup/RollupCore.sol#L186-L188)\n\t- [RollupCore.challengeStarted(address,address,uint64)](src/rollup/RollupCore.sol#L379-L386)\n\t- [RollupCore.clearChallenge(address)](src/rollup/RollupCore.sol#L368-L371)\n\t- [RollupCore.currentChallenge(address)](src/rollup/RollupCore.sol#L177-L179)\n\t- [RollupCore.deleteStaker(address)](src/rollup/RollupCore.sol#L543-L551)\n\t- [RollupCore.getStaker(address)](src/rollup/RollupCore.sol#L195-L197)\n\t- [RollupCore.inChallenge(address,address)](src/rollup/RollupCore.sol#L351-L362)\n\t- [RollupCore.increaseStakeBy(address,uint256)](src/rollup/RollupCore.sol#L393-L399)\n\t- [RollupCore.isStaked(address)](src/rollup/RollupCore.sol#L149-L151)\n\t- [RollupCore.isStakedOnLatestConfirmed(address)](src/rollup/RollupCore.sol#L159-L161)\n\t- [RollupCore.latestStakedNode(address)](src/rollup/RollupCore.sol#L168-L170)\n\t- [RollupCore.reduceStakeTo(address,uint256)](src/rollup/RollupCore.sol#L407-L416)\n\t- [RollupCore.stakeOnNode(address,uint64)](src/rollup/RollupCore.sol#L508-L512)\n\t- [RollupCore.turnIntoZombie(address)](src/rollup/RollupCore.sol#L422-L426)\n\t- [RollupCore.withdrawStaker(address)](src/rollup/RollupCore.sol#L489-L501)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L315-L388", "id": "2b29c60586106261585a7463cf78d2dc6e7c2d56072499e590e932df559d24bb", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "anyTrustFastConfirmer", "source_mapping": {"start": 2460, "length": 36, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [80], "starting_column": 5, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "fastConfirmNextNode", "source_mapping": {"start": 6800, "length": 401, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [176, 177, 178, 179, 180, 181], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNextNode(bytes32,bytes32,uint64,bytes32)"}}], "description": "RollupCore.anyTrustFastConfirmer (src/rollup/RollupCore.sol#80) is never initialized. It is used in:\n\t- AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,uint64,bytes32) (src/rollup/RollupUserLogic.sol#176-181)\n", "markdown": "[RollupCore.anyTrustFastConfirmer](src/rollup/RollupCore.sol#L80) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,uint64,bytes32)](src/rollup/RollupUserLogic.sol#L176-L181)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L80", "id": "73f909a3e549c85be9403f39fd73d421a43658f2516798cb75e1788e512992f2", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21285, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}, {"type": "node", "name": "multiplier = withNumerator / denominators[periodsPassed % 10]", "source_mapping": {"start": 22628, "length": 69, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [543], "starting_column": 9, "ending_column": 78}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21285, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}, {"type": "node", "name": "baseStake * multiplier", "source_mapping": {"start": 22776, "length": 29, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [547], "starting_column": 9, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21285, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}], "description": "AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#502-548) performs a multiplication on the result of a division:\n\t- multiplier = withNumerator / denominators[periodsPassed % 10] (src/rollup/RollupUserLogic.sol#543)\n\t- baseStake * multiplier (src/rollup/RollupUserLogic.sol#547)\n", "markdown": "[AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L502-L548) performs a multiplication on the result of a division:\n\t- [multiplier = withNumerator / denominators[periodsPassed % 10]](src/rollup/RollupUserLogic.sol#L543)\n\t- [baseStake * multiplier](src/rollup/RollupUserLogic.sol#L547)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L502-L548", "id": "a06a90d9213a90fab9e69dcb5ff30aff7af9ca537f078f891088bb6e179d0c41", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21285, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}, {"type": "node", "name": "multiplier == 0", "source_mapping": {"start": 22711, "length": 15, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [544], "starting_column": 13, "ending_column": 28}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21285, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}], "description": "AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#502-548) uses a dangerous strict equality:\n\t- multiplier == 0 (src/rollup/RollupUserLogic.sol#544)\n", "markdown": "[AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L502-L548) uses a dangerous strict equality:\n\t- [multiplier == 0](src/rollup/RollupUserLogic.sol#L544)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L502-L548", "id": "f0540633dca6b3c5acc4f012e6533bb6b22a026d8ff3b90b8585b50c348b0d5d", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "fastConfirmNextNode", "source_mapping": {"start": 6800, "length": 401, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [176, 177, 178, 179, 180, 181], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNextNode(bytes32,bytes32,uint64,bytes32)"}}, {"type": "node", "name": "require(bool,string)(nodeHash == getNodeStorage(nodeNum).nodeHash,WRONG_HASH)", "source_mapping": {"start": 7074, "length": 67, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [179], "starting_column": 9, "ending_column": 76}, "type_specific_fields": {"parent": {"type": "function", "name": "fastConfirmNextNode", "source_mapping": {"start": 6800, "length": 401, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [176, 177, 178, 179, 180, 181], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNextNode(bytes32,bytes32,uint64,bytes32)"}}}}], "description": "AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,uint64,bytes32) (src/rollup/RollupUserLogic.sol#176-181) uses a dangerous strict equality:\n\t- require(bool,string)(nodeHash == getNodeStorage(nodeNum).nodeHash,WRONG_HASH) (src/rollup/RollupUserLogic.sol#179)\n", "markdown": "[AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32,uint64,bytes32)](src/rollup/RollupUserLogic.sol#L176-L181) uses a dangerous strict equality:\n\t- [require(bool,string)(nodeHash == getNodeStorage(nodeNum).nodeHash,WRONG_HASH)](src/rollup/RollupUserLogic.sol#L179)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L176-L181", "id": "d81d8afbfd2634a30a7859c5a5e586e9810463b8236da8bf559155d43b58a230", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "requireUnchallengedStaker", "source_mapping": {"start": 26494, "length": 212, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [641, 642, 643, 644], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "requireUnchallengedStaker(address)"}}, {"type": "node", "name": "require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL)", "source_mapping": {"start": 26631, "length": 68, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [643], "starting_column": 9, "ending_column": 77}, "type_specific_fields": {"parent": {"type": "function", "name": "requireUnchallengedStaker", "source_mapping": {"start": 26494, "length": 212, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [641, 642, 643, 644], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "requireUnchallengedStaker(address)"}}}}], "description": "AbsRollupUserLogic.requireUnchallengedStaker(address) (src/rollup/RollupUserLogic.sol#641-644) uses a dangerous strict equality:\n\t- require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL) (src/rollup/RollupUserLogic.sol#643)\n", "markdown": "[AbsRollupUserLogic.requireUnchallengedStaker(address)](src/rollup/RollupUserLogic.sol#L641-L644) uses a dangerous strict equality:\n\t- [require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL)](src/rollup/RollupUserLogic.sol#L643)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L641-L644", "id": "3323048300e79cff852072e2a5dd523379c0c9072bfb004b3ba5bd0d09c86c3f", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "stakeOnExistingNode", "source_mapping": {"start": 7983, "length": 583, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnExistingNode(uint64,bytes32)"}}, {"type": "node", "name": "require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV)", "source_mapping": {"start": 8445, "length": 72, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [214], "starting_column": 9, "ending_column": 81}, "type_specific_fields": {"parent": {"type": "function", "name": "stakeOnExistingNode", "source_mapping": {"start": 7983, "length": 583, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnExistingNode(uint64,bytes32)"}}}}], "description": "AbsRollupUserLogic.stakeOnExistingNode(uint64,bytes32) (src/rollup/RollupUserLogic.sol#201-216) uses a dangerous strict equality:\n\t- require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV) (src/rollup/RollupUserLogic.sol#214)\n", "markdown": "[AbsRollupUserLogic.stakeOnExistingNode(uint64,bytes32)](src/rollup/RollupUserLogic.sol#L201-L216) uses a dangerous strict equality:\n\t- [require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV)](src/rollup/RollupUserLogic.sol#L214)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L201-L216", "id": "45ab4c7ef9266f342edc09390b14e6ebbb5742734ae6570773770ba6b1be22df", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "createChallenge", "source_mapping": {"start": 13339, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}, {"type": "node", "name": "challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME)", "source_mapping": {"start": 15882, "length": 398, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [375, 376, 377, 378, 379, 380, 381, 382, 383, 384], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallenge", "source_mapping": {"start": 13339, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft)", "source_mapping": {"start": 16824, "length": 317, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410], "starting_column": 9, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallengeHelper", "source_mapping": {"start": 16476, "length": 672, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "createChallengeHelper(address[2],MachineStatus[2],GlobalState[2],uint64,bytes32[2],uint256,uint256)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "challengeStarted(stakers[0],stakers[1],challengeIndex)", "source_mapping": {"start": 16316, "length": 56, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [386], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallenge", "source_mapping": {"start": 13339, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 26207, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "_stakerMap[staker1].currentChallenge = challenge", "source_mapping": {"start": 13618, "length": 48, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [384], "starting_column": 9, "ending_column": 57}, "type_specific_fields": {"parent": {"type": "function", "name": "challengeStarted", "source_mapping": {"start": 13491, "length": 240, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "challengeStarted(address,address,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "_stakerMap[staker2].currentChallenge = challenge", "source_mapping": {"start": 13676, "length": 48, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [385], "starting_column": 9, "ending_column": 57}, "type_specific_fields": {"parent": {"type": "function", "name": "challengeStarted", "source_mapping": {"start": 13491, "length": 240, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "challengeStarted(address,address,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}], "description": "Reentrancy in AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2]) (src/rollup/RollupUserLogic.sol#316-389):\n\tExternal calls:\n\t- challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME) (src/rollup/RollupUserLogic.sol#375-384)\n\t\t- challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft) (src/rollup/RollupUserLogic.sol#400-410)\n\tState variables written after the call(s):\n\t- challengeStarted(stakers[0],stakers[1],challengeIndex) (src/rollup/RollupUserLogic.sol#386)\n\t\t- _stakerMap[staker1].currentChallenge = challenge (src/rollup/RollupCore.sol#384)\n\t\t- _stakerMap[staker2].currentChallenge = challenge (src/rollup/RollupCore.sol#385)\n\tRollupCore._stakerMap (src/rollup/RollupCore.sol#68) can be used in cross function reentrancies:\n\t- RollupCore._stakerMap (src/rollup/RollupCore.sol#68)\n\t- RollupCore.amountStaked(address) (src/rollup/RollupCore.sol#186-188)\n\t- RollupCore.challengeStarted(address,address,uint64) (src/rollup/RollupCore.sol#379-386)\n\t- RollupCore.clearChallenge(address) (src/rollup/RollupCore.sol#368-371)\n\t- RollupCore.currentChallenge(address) (src/rollup/RollupCore.sol#177-179)\n\t- RollupCore.deleteStaker(address) (src/rollup/RollupCore.sol#543-551)\n\t- RollupCore.getStaker(address) (src/rollup/RollupCore.sol#195-197)\n\t- RollupCore.inChallenge(address,address) (src/rollup/RollupCore.sol#351-362)\n\t- RollupCore.increaseStakeBy(address,uint256) (src/rollup/RollupCore.sol#393-399)\n\t- RollupCore.isStaked(address) (src/rollup/RollupCore.sol#149-151)\n\t- RollupCore.isStakedOnLatestConfirmed(address) (src/rollup/RollupCore.sol#159-161)\n\t- RollupCore.latestStakedNode(address) (src/rollup/RollupCore.sol#168-170)\n\t- RollupCore.reduceStakeTo(address,uint256) (src/rollup/RollupCore.sol#407-416)\n\t- RollupCore.stakeOnNode(address,uint64) (src/rollup/RollupCore.sol#508-512)\n\t- RollupCore.turnIntoZombie(address) (src/rollup/RollupCore.sol#422-426)\n\t- RollupCore.withdrawStaker(address) (src/rollup/RollupCore.sol#489-501)\n", "markdown": "Reentrancy in [AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])](src/rollup/RollupUserLogic.sol#L316-L389):\n\tExternal calls:\n\t- [challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME)](src/rollup/RollupUserLogic.sol#L375-L384)\n\t\t- [challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft)](src/rollup/RollupUserLogic.sol#L400-L410)\n\tState variables written after the call(s):\n\t- [challengeStarted(stakers[0],stakers[1],challengeIndex)](src/rollup/RollupUserLogic.sol#L386)\n\t\t- [_stakerMap[staker1].currentChallenge = challenge](src/rollup/RollupCore.sol#L384)\n\t\t- [_stakerMap[staker2].currentChallenge = challenge](src/rollup/RollupCore.sol#L385)\n\t[RollupCore._stakerMap](src/rollup/RollupCore.sol#L68) can be used in cross function reentrancies:\n\t- [RollupCore._stakerMap](src/rollup/RollupCore.sol#L68)\n\t- [RollupCore.amountStaked(address)](src/rollup/RollupCore.sol#L186-L188)\n\t- [RollupCore.challengeStarted(address,address,uint64)](src/rollup/RollupCore.sol#L379-L386)\n\t- [RollupCore.clearChallenge(address)](src/rollup/RollupCore.sol#L368-L371)\n\t- [RollupCore.currentChallenge(address)](src/rollup/RollupCore.sol#L177-L179)\n\t- [RollupCore.deleteStaker(address)](src/rollup/RollupCore.sol#L543-L551)\n\t- [RollupCore.getStaker(address)](src/rollup/RollupCore.sol#L195-L197)\n\t- [RollupCore.inChallenge(address,address)](src/rollup/RollupCore.sol#L351-L362)\n\t- [RollupCore.increaseStakeBy(address,uint256)](src/rollup/RollupCore.sol#L393-L399)\n\t- [RollupCore.isStaked(address)](src/rollup/RollupCore.sol#L149-L151)\n\t- [RollupCore.isStakedOnLatestConfirmed(address)](src/rollup/RollupCore.sol#L159-L161)\n\t- [RollupCore.latestStakedNode(address)](src/rollup/RollupCore.sol#L168-L170)\n\t- [RollupCore.reduceStakeTo(address,uint256)](src/rollup/RollupCore.sol#L407-L416)\n\t- [RollupCore.stakeOnNode(address,uint64)](src/rollup/RollupCore.sol#L508-L512)\n\t- [RollupCore.turnIntoZombie(address)](src/rollup/RollupCore.sol#L422-L426)\n\t- [RollupCore.withdrawStaker(address)](src/rollup/RollupCore.sol#L489-L501)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L316-L389", "id": "0c968d1b20454d8fd452f65b003e0966ae923df9d1ef17996b29defd85f3dc9e", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})", "source_mapping": {"start": 10156, "length": 399, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "starting_column": 13, "ending_column": 15}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-100) sends eth to arbitrary user\n\tDangerous calls:\n\t- IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:}) (src/rollup/DeployHelper.sol#87-96)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L100) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})](src/rollup/DeployHelper.sol#L87-L96)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L100", "id": "58b5f7a8d77486bc6173862a853121ecdf5d9979f84cc2e05b66e0f0fd11218c", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "perform", "source_mapping": {"start": 10685, "length": 1095, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}, {"type": "node", "name": "address(msg.sender).transfer(address(this).balance)", "source_mapping": {"start": 11712, "length": 51, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [142], "starting_column": 13, "ending_column": 64}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 10685, "length": 1095, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}}}], "description": "DeployHelper.perform(address,address,uint256) (src/rollup/DeployHelper.sol#102-144) sends eth to arbitrary user\n\tDangerous calls:\n\t- address(msg.sender).transfer(address(this).balance) (src/rollup/DeployHelper.sol#142)\n", "markdown": "[DeployHelper.perform(address,address,uint256)](src/rollup/DeployHelper.sol#L102-L144) sends eth to arbitrary user\n\tDangerous calls:\n\t- [address(msg.sender).transfer(address(this).balance)](src/rollup/DeployHelper.sol#L142)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L102-L144", "id": "ce5c492f55419016b34eb4e4de36fb8212599a42274960d6402d10a63f45ad40", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "anyTrustFastConfirmer", "source_mapping": {"start": 2460, "length": 36, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [80], "starting_column": 5, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "fastConfirmNextNode", "source_mapping": {"start": 6703, "length": 225, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [175, 176, 177, 178], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNextNode(bytes32,bytes32)"}}], "description": "RollupCore.anyTrustFastConfirmer (src/rollup/RollupCore.sol#80) is never initialized. It is used in:\n\t- AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32) (src/rollup/RollupUserLogic.sol#175-178)\n", "markdown": "[RollupCore.anyTrustFastConfirmer](src/rollup/RollupCore.sol#L80) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.fastConfirmNextNode(bytes32,bytes32)](src/rollup/RollupUserLogic.sol#L175-L178)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L80", "id": "18d2bfd017f6e3f4e743eb058275a178a0fd6d2d88265a51e06df0a8d6cd6473", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "feeAmountNativeDenominated = feeAmount / (10 ** (18 - decimals))", "source_mapping": {"start": 9268, "length": 62, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [66], "starting_column": 17, "ending_column": 79}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}, {"type": "node", "name": "feeAmountNativeDenominated * (10 ** (18 - decimals)) < feeAmount", "source_mapping": {"start": 9393, "length": 62, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [68], "starting_column": 21, "ending_column": 83}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-100) performs a multiplication on the result of a division:\n\t- feeAmountNativeDenominated = feeAmount / (10 ** (18 - decimals)) (src/rollup/DeployHelper.sol#66)\n\t- feeAmountNativeDenominated * (10 ** (18 - decimals)) < feeAmount (src/rollup/DeployHelper.sol#68)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L100) performs a multiplication on the result of a division:\n\t- [feeAmountNativeDenominated = feeAmount / (10 ** (18 - decimals))](src/rollup/DeployHelper.sol#L66)\n\t- [feeAmountNativeDenominated * (10 ** (18 - decimals)) < feeAmount](src/rollup/DeployHelper.sol#L68)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L100", "id": "4fb20a676d1f3bfb16ac2bd8d3fe3bbb5a365c9934ae12d86b9b88967edde290", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_scaleDownToNativeDecimals", "source_mapping": {"start": 13092, "length": 449, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 12840, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334], "starting_column": 1, "ending_column": 2}}, "signature": "_scaleDownToNativeDecimals(uint256,uint8)"}}, {"type": "node", "name": "scaledAmount = amount / (10 ** (18 - decimals))", "source_mapping": {"start": 13302, "length": 45, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [326], "starting_column": 13, "ending_column": 58}, "type_specific_fields": {"parent": {"type": "function", "name": "_scaleDownToNativeDecimals", "source_mapping": {"start": 13092, "length": 449, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 12840, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334], "starting_column": 1, "ending_column": 2}}, "signature": "_scaleDownToNativeDecimals(uint256,uint8)"}}}}, {"type": "node", "name": "scaledAmount * (10 ** (18 - decimals)) < amount", "source_mapping": {"start": 13402, "length": 45, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [328], "starting_column": 17, "ending_column": 62}, "type_specific_fields": {"parent": {"type": "function", "name": "_scaleDownToNativeDecimals", "source_mapping": {"start": 13092, "length": 449, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 12840, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334], "starting_column": 1, "ending_column": 2}}, "signature": "_scaleDownToNativeDecimals(uint256,uint8)"}}}}], "description": "RollupCreator._scaleDownToNativeDecimals(uint256,uint8) (src/rollup/RollupCreator.sol#319-333) performs a multiplication on the result of a division:\n\t- scaledAmount = amount / (10 ** (18 - decimals)) (src/rollup/RollupCreator.sol#326)\n\t- scaledAmount * (10 ** (18 - decimals)) < amount (src/rollup/RollupCreator.sol#328)\n", "markdown": "[RollupCreator._scaleDownToNativeDecimals(uint256,uint8)](src/rollup/RollupCreator.sol#L319-L333) performs a multiplication on the result of a division:\n\t- [scaledAmount = amount / (10 ** (18 - decimals))](src/rollup/RollupCreator.sol#L326)\n\t- [scaledAmount * (10 ** (18 - decimals)) < amount](src/rollup/RollupCreator.sol#L328)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L319-L333", "id": "dfee0ddb602c8f74926e48357bc4e6a51a2881e92e8dc12e111f59780c4affb8", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21012, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}, {"type": "node", "name": "multiplier = withNumerator / denominators[periodsPassed % 10]", "source_mapping": {"start": 22355, "length": 69, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [540], "starting_column": 9, "ending_column": 78}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21012, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}, {"type": "node", "name": "baseStake * multiplier", "source_mapping": {"start": 22503, "length": 29, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [544], "starting_column": 9, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21012, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}], "description": "AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#499-545) performs a multiplication on the result of a division:\n\t- multiplier = withNumerator / denominators[periodsPassed % 10] (src/rollup/RollupUserLogic.sol#540)\n\t- baseStake * multiplier (src/rollup/RollupUserLogic.sol#544)\n", "markdown": "[AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L499-L545) performs a multiplication on the result of a division:\n\t- [multiplier = withNumerator / denominators[periodsPassed % 10]](src/rollup/RollupUserLogic.sol#L540)\n\t- [baseStake * multiplier](src/rollup/RollupUserLogic.sol#L544)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L499-L545", "id": "2803a8de725e2165f69c9445b653745db069a7cfd61b8cc7b16da012952dc7f5", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createNewNode", "source_mapping": {"start": 20694, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}, {"type": "node", "name": "require(bool,string)(RollupLib.stateHash(assertion.beforeState,prevNodeInboxMaxCount) == memoryFrame.prevNode.stateHash,PREV_STATE_HASH)", "source_mapping": {"start": 21435, "length": 193, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [583, 584, 585, 586, 587], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "createNewNode", "source_mapping": {"start": 20694, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}}}], "description": "RollupCore.createNewNode(Assertion,uint64,uint256,bytes32) (src/rollup/RollupCore.sol#564-678) uses a dangerous strict equality:\n\t- require(bool,string)(RollupLib.stateHash(assertion.beforeState,prevNodeInboxMaxCount) == memoryFrame.prevNode.stateHash,PREV_STATE_HASH) (src/rollup/RollupCore.sol#583-587)\n", "markdown": "[RollupCore.createNewNode(Assertion,uint64,uint256,bytes32)](src/rollup/RollupCore.sol#L564-L678) uses a dangerous strict equality:\n\t- [require(bool,string)(RollupLib.stateHash(assertion.beforeState,prevNodeInboxMaxCount) == memoryFrame.prevNode.stateHash,PREV_STATE_HASH)](src/rollup/RollupCore.sol#L583-L587)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L564-L678", "id": "a6975dd3860f8b5f0ecafe0488b0b42245ca3c01b6eb97806a28024e4594f214", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "createNewNode", "source_mapping": {"start": 20694, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}, {"type": "node", "name": "require(bool,string)(newNodeHash == expectedNodeHash || expectedNodeHash == bytes32(0),UNEXPECTED_NODE_HASH)", "source_mapping": {"start": 23889, "length": 144, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [636, 637, 638, 639], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "createNewNode", "source_mapping": {"start": 20694, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}}}], "description": "RollupCore.createNewNode(Assertion,uint64,uint256,bytes32) (src/rollup/RollupCore.sol#564-678) uses a dangerous strict equality:\n\t- require(bool,string)(newNodeHash == expectedNodeHash || expectedNodeHash == bytes32(0),UNEXPECTED_NODE_HASH) (src/rollup/RollupCore.sol#636-639)\n", "markdown": "[RollupCore.createNewNode(Assertion,uint64,uint256,bytes32)](src/rollup/RollupCore.sol#L564-L678) uses a dangerous strict equality:\n\t- [require(bool,string)(newNodeHash == expectedNodeHash || expectedNodeHash == bytes32(0),UNEXPECTED_NODE_HASH)](src/rollup/RollupCore.sol#L636-L639)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L564-L678", "id": "3b3dac1beaad095c507198b6bb9f705f811752b33542b85f5e042f86bec5fb00", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21012, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}, {"type": "node", "name": "multiplier == 0", "source_mapping": {"start": 22438, "length": 15, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [541], "starting_column": 13, "ending_column": 28}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 21012, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}], "description": "AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#499-545) uses a dangerous strict equality:\n\t- multiplier == 0 (src/rollup/RollupUserLogic.sol#541)\n", "markdown": "[AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L499-L545) uses a dangerous strict equality:\n\t- [multiplier == 0](src/rollup/RollupUserLogic.sol#L541)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L499-L545", "id": "d6f41cb5c33b4595428f9030c7e4c9a13c4023ba81089f63456a41d8784bd753", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "requireUnchallengedStaker", "source_mapping": {"start": 26221, "length": 212, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [638, 639, 640, 641], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "requireUnchallengedStaker(address)"}}, {"type": "node", "name": "require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL)", "source_mapping": {"start": 26358, "length": 68, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [640], "starting_column": 9, "ending_column": 77}, "type_specific_fields": {"parent": {"type": "function", "name": "requireUnchallengedStaker", "source_mapping": {"start": 26221, "length": 212, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [638, 639, 640, 641], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "requireUnchallengedStaker(address)"}}}}], "description": "AbsRollupUserLogic.requireUnchallengedStaker(address) (src/rollup/RollupUserLogic.sol#638-641) uses a dangerous strict equality:\n\t- require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL) (src/rollup/RollupUserLogic.sol#640)\n", "markdown": "[AbsRollupUserLogic.requireUnchallengedStaker(address)](src/rollup/RollupUserLogic.sol#L638-L641) uses a dangerous strict equality:\n\t- [require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL)](src/rollup/RollupUserLogic.sol#L640)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L638-L641", "id": "7bbbccc60c30858495f1002fa4f96507c8f35e5225b241a5dab5ec293383b044", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "stakeOnExistingNode", "source_mapping": {"start": 7710, "length": 583, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnExistingNode(uint64,bytes32)"}}, {"type": "node", "name": "require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV)", "source_mapping": {"start": 8172, "length": 72, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [211], "starting_column": 9, "ending_column": 81}, "type_specific_fields": {"parent": {"type": "function", "name": "stakeOnExistingNode", "source_mapping": {"start": 7710, "length": 583, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnExistingNode(uint64,bytes32)"}}}}], "description": "AbsRollupUserLogic.stakeOnExistingNode(uint64,bytes32) (src/rollup/RollupUserLogic.sol#198-213) uses a dangerous strict equality:\n\t- require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV) (src/rollup/RollupUserLogic.sol#211)\n", "markdown": "[AbsRollupUserLogic.stakeOnExistingNode(uint64,bytes32)](src/rollup/RollupUserLogic.sol#L198-L213) uses a dangerous strict equality:\n\t- [require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV)](src/rollup/RollupUserLogic.sol#L211)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L198-L213", "id": "8e5cdf0b77d052567cdd55e34a5291c9b1e139a5df0033fdf1de430263047d89", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "node", "name": "_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas)", "source_mapping": {"start": 10820, "length": 198, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [107, 108, 109, 110, 111, 112, 113, 114], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 10685, "length": 1095, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}}}, {"type": "node", "name": "_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas)", "source_mapping": {"start": 10820, "length": 198, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [107, 108, 109, 110, 111, 112, 113, 114], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 10685, "length": 1095, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}}}], "description": "Multiple retryable tickets created in the same function:\n\t -_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas) (src/rollup/DeployHelper.sol#107-114)\n\t -_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas) (src/rollup/DeployHelper.sol#107-114)\n", "markdown": "Multiple retryable tickets created in the same function:\n\t -[_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas)](src/rollup/DeployHelper.sol#L107-L114)\n\t -[_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas)](src/rollup/DeployHelper.sol#L107-L114)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L107-L114", "id": "f31d620e4b82e77afe7ac6649042f283243e9582402f79ba35dacb2026ef6aa7", "check": "out-of-order-retryable", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createChallenge", "source_mapping": {"start": 13066, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}, {"type": "node", "name": "challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME)", "source_mapping": {"start": 15609, "length": 398, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [372, 373, 374, 375, 376, 377, 378, 379, 380, 381], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallenge", "source_mapping": {"start": 13066, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft)", "source_mapping": {"start": 16551, "length": 317, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407], "starting_column": 9, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallengeHelper", "source_mapping": {"start": 16203, "length": 672, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "createChallengeHelper(address[2],MachineStatus[2],GlobalState[2],uint64,bytes32[2],uint256,uint256)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "challengeStarted(stakers[0],stakers[1],challengeIndex)", "source_mapping": {"start": 16043, "length": 56, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [383], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallenge", "source_mapping": {"start": 13066, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25934, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "_stakerMap[staker1].currentChallenge = challenge", "source_mapping": {"start": 13618, "length": 48, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [384], "starting_column": 9, "ending_column": 57}, "type_specific_fields": {"parent": {"type": "function", "name": "challengeStarted", "source_mapping": {"start": 13491, "length": 240, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "challengeStarted(address,address,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "_stakerMap[staker2].currentChallenge = challenge", "source_mapping": {"start": 13676, "length": 48, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [385], "starting_column": 9, "ending_column": 57}, "type_specific_fields": {"parent": {"type": "function", "name": "challengeStarted", "source_mapping": {"start": 13491, "length": 240, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "challengeStarted(address,address,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}], "description": "Reentrancy in AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2]) (src/rollup/RollupUserLogic.sol#313-386):\n\tExternal calls:\n\t- challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME) (src/rollup/RollupUserLogic.sol#372-381)\n\t\t- challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft) (src/rollup/RollupUserLogic.sol#397-407)\n\tState variables written after the call(s):\n\t- challengeStarted(stakers[0],stakers[1],challengeIndex) (src/rollup/RollupUserLogic.sol#383)\n\t\t- _stakerMap[staker1].currentChallenge = challenge (src/rollup/RollupCore.sol#384)\n\t\t- _stakerMap[staker2].currentChallenge = challenge (src/rollup/RollupCore.sol#385)\n\tRollupCore._stakerMap (src/rollup/RollupCore.sol#68) can be used in cross function reentrancies:\n\t- RollupCore._stakerMap (src/rollup/RollupCore.sol#68)\n\t- RollupCore.amountStaked(address) (src/rollup/RollupCore.sol#186-188)\n\t- RollupCore.challengeStarted(address,address,uint64) (src/rollup/RollupCore.sol#379-386)\n\t- RollupCore.clearChallenge(address) (src/rollup/RollupCore.sol#368-371)\n\t- RollupCore.currentChallenge(address) (src/rollup/RollupCore.sol#177-179)\n\t- RollupCore.deleteStaker(address) (src/rollup/RollupCore.sol#543-551)\n\t- RollupCore.getStaker(address) (src/rollup/RollupCore.sol#195-197)\n\t- RollupCore.inChallenge(address,address) (src/rollup/RollupCore.sol#351-362)\n\t- RollupCore.increaseStakeBy(address,uint256) (src/rollup/RollupCore.sol#393-399)\n\t- RollupCore.isStaked(address) (src/rollup/RollupCore.sol#149-151)\n\t- RollupCore.isStakedOnLatestConfirmed(address) (src/rollup/RollupCore.sol#159-161)\n\t- RollupCore.latestStakedNode(address) (src/rollup/RollupCore.sol#168-170)\n\t- RollupCore.reduceStakeTo(address,uint256) (src/rollup/RollupCore.sol#407-416)\n\t- RollupCore.stakeOnNode(address,uint64) (src/rollup/RollupCore.sol#508-512)\n\t- RollupCore.turnIntoZombie(address) (src/rollup/RollupCore.sol#422-426)\n\t- RollupCore.withdrawStaker(address) (src/rollup/RollupCore.sol#489-501)\n", "markdown": "Reentrancy in [AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])](src/rollup/RollupUserLogic.sol#L313-L386):\n\tExternal calls:\n\t- [challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME)](src/rollup/RollupUserLogic.sol#L372-L381)\n\t\t- [challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft)](src/rollup/RollupUserLogic.sol#L397-L407)\n\tState variables written after the call(s):\n\t- [challengeStarted(stakers[0],stakers[1],challengeIndex)](src/rollup/RollupUserLogic.sol#L383)\n\t\t- [_stakerMap[staker1].currentChallenge = challenge](src/rollup/RollupCore.sol#L384)\n\t\t- [_stakerMap[staker2].currentChallenge = challenge](src/rollup/RollupCore.sol#L385)\n\t[RollupCore._stakerMap](src/rollup/RollupCore.sol#L68) can be used in cross function reentrancies:\n\t- [RollupCore._stakerMap](src/rollup/RollupCore.sol#L68)\n\t- [RollupCore.amountStaked(address)](src/rollup/RollupCore.sol#L186-L188)\n\t- [RollupCore.challengeStarted(address,address,uint64)](src/rollup/RollupCore.sol#L379-L386)\n\t- [RollupCore.clearChallenge(address)](src/rollup/RollupCore.sol#L368-L371)\n\t- [RollupCore.currentChallenge(address)](src/rollup/RollupCore.sol#L177-L179)\n\t- [RollupCore.deleteStaker(address)](src/rollup/RollupCore.sol#L543-L551)\n\t- [RollupCore.getStaker(address)](src/rollup/RollupCore.sol#L195-L197)\n\t- [RollupCore.inChallenge(address,address)](src/rollup/RollupCore.sol#L351-L362)\n\t- [RollupCore.increaseStakeBy(address,uint256)](src/rollup/RollupCore.sol#L393-L399)\n\t- [RollupCore.isStaked(address)](src/rollup/RollupCore.sol#L149-L151)\n\t- [RollupCore.isStakedOnLatestConfirmed(address)](src/rollup/RollupCore.sol#L159-L161)\n\t- [RollupCore.latestStakedNode(address)](src/rollup/RollupCore.sol#L168-L170)\n\t- [RollupCore.reduceStakeTo(address,uint256)](src/rollup/RollupCore.sol#L407-L416)\n\t- [RollupCore.stakeOnNode(address,uint64)](src/rollup/RollupCore.sol#L508-L512)\n\t- [RollupCore.turnIntoZombie(address)](src/rollup/RollupCore.sol#L422-L426)\n\t- [RollupCore.withdrawStaker(address)](src/rollup/RollupCore.sol#L489-L501)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L313-L386", "id": "c426748e54bb463a55d94c54cd2dffbe8b77ffd98bce03600799e5fe749a7b1d", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7336, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 698, "length": 12161, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}, {"type": "node", "name": "executeBridgeCall(to,amountToUnlock,data)", "source_mapping": {"start": 8479, "length": 43, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [226], "starting_column": 9, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7336, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 698, "length": 12161, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "(success,returndata) = bridge.executeCall(to,value,data)", "source_mapping": {"start": 10189, "length": 77, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [279], "starting_column": 9, "ending_column": 86}, "type_specific_fields": {"parent": {"type": "function", "name": "executeBridgeCall", "source_mapping": {"start": 10067, "length": 594, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 698, "length": 12161, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335], "starting_column": 1, "ending_column": 2}}, "signature": "executeBridgeCall(address,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "context = prevContext", "source_mapping": {"start": 8533, "length": 21, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [228], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7336, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 698, "length": 12161, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "context"}}], "description": "Reentrancy in AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#196-229):\n\tExternal calls:\n\t- executeBridgeCall(to,amountToUnlock,data) (src/bridge/AbsOutbox.sol#226)\n\t\t- (success,returndata) = bridge.executeCall(to,value,data) (src/bridge/AbsOutbox.sol#279)\n\tState variables written after the call(s):\n\t- context = prevContext (src/bridge/AbsOutbox.sol#228)\n\tAbsOutbox.context (src/bridge/AbsOutbox.sol#51) can be used in cross function reentrancies:\n\t- AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#196-229)\n\t- AbsOutbox.initialize(IBridge) (src/bridge/AbsOutbox.sol#63-79)\n\t- AbsOutbox.l2ToL1Block() (src/bridge/AbsOutbox.sol#118-123)\n\t- AbsOutbox.l2ToL1EthBlock() (src/bridge/AbsOutbox.sol#126-131)\n\t- AbsOutbox.l2ToL1OutputId() (src/bridge/AbsOutbox.sol#147-152)\n\t- AbsOutbox.l2ToL1Sender() (src/bridge/AbsOutbox.sol#110-115)\n\t- AbsOutbox.l2ToL1Timestamp() (src/bridge/AbsOutbox.sol#134-139)\n\t- AbsOutbox.postUpgradeInit() (src/bridge/AbsOutbox.sol#81-92)\n", "markdown": "Reentrancy in [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L196-L229):\n\tExternal calls:\n\t- [executeBridgeCall(to,amountToUnlock,data)](src/bridge/AbsOutbox.sol#L226)\n\t\t- [(success,returndata) = bridge.executeCall(to,value,data)](src/bridge/AbsOutbox.sol#L279)\n\tState variables written after the call(s):\n\t- [context = prevContext](src/bridge/AbsOutbox.sol#L228)\n\t[AbsOutbox.context](src/bridge/AbsOutbox.sol#L51) can be used in cross function reentrancies:\n\t- [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L196-L229)\n\t- [AbsOutbox.initialize(IBridge)](src/bridge/AbsOutbox.sol#L63-L79)\n\t- [AbsOutbox.l2ToL1Block()](src/bridge/AbsOutbox.sol#L118-L123)\n\t- [AbsOutbox.l2ToL1EthBlock()](src/bridge/AbsOutbox.sol#L126-L131)\n\t- [AbsOutbox.l2ToL1OutputId()](src/bridge/AbsOutbox.sol#L147-L152)\n\t- [AbsOutbox.l2ToL1Sender()](src/bridge/AbsOutbox.sol#L110-L115)\n\t- [AbsOutbox.l2ToL1Timestamp()](src/bridge/AbsOutbox.sol#L134-L139)\n\t- [AbsOutbox.postUpgradeInit()](src/bridge/AbsOutbox.sol#L81-L92)\n", "first_markdown_element": "src/bridge/AbsOutbox.sol#L196-L229", "id": "b42ba1855895a9ed1833beaf1f3c481a846ec27a28578623d5aca757932249c1", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "forceResolveChallenge", "source_mapping": {"start": 10412, "length": 631, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 590, "length": 15056, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393], "starting_column": 1, "ending_column": 2}}, "signature": "forceResolveChallenge(address[],address[])"}}, {"type": "node", "name": "challengeManager.clearChallenge(chall)", "source_mapping": {"start": 10950, "length": 38, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [271], "starting_column": 13, "ending_column": 51}, "type_specific_fields": {"parent": {"type": "function", "name": "forceResolveChallenge", "source_mapping": {"start": 10412, "length": 631, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 590, "length": 15056, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393], "starting_column": 1, "ending_column": 2}}, "signature": "forceResolveChallenge(address[],address[])"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "clearChallenge(stakerA[i])", "source_mapping": {"start": 10870, "length": 26, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [269], "starting_column": 13, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "forceResolveChallenge", "source_mapping": {"start": 10412, "length": 631, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 590, "length": 15056, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393], "starting_column": 1, "ending_column": 2}}, "signature": "forceResolveChallenge(address[],address[])"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "staker.currentChallenge = NO_CHAL_INDEX", "source_mapping": {"start": 13178, "length": 39, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [370], "starting_column": 9, "ending_column": 48}, "type_specific_fields": {"parent": {"type": "function", "name": "clearChallenge", "source_mapping": {"start": 13053, "length": 171, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [368, 369, 370, 371], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "clearChallenge(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "clearChallenge(stakerB[i])", "source_mapping": {"start": 10910, "length": 26, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [270], "starting_column": 13, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "forceResolveChallenge", "source_mapping": {"start": 10412, "length": 631, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 590, "length": 15056, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393], "starting_column": 1, "ending_column": 2}}, "signature": "forceResolveChallenge(address[],address[])"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "staker.currentChallenge = NO_CHAL_INDEX", "source_mapping": {"start": 13178, "length": 39, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [370], "starting_column": 9, "ending_column": 48}, "type_specific_fields": {"parent": {"type": "function", "name": "clearChallenge", "source_mapping": {"start": 13053, "length": 171, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [368, 369, 370, 371], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24629, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679], "starting_column": 1, "ending_column": 2}}, "signature": "clearChallenge(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}], "description": "Reentrancy in RollupAdminLogic.forceResolveChallenge(address[],address[]) (src/rollup/RollupAdminLogic.sol#258-274):\n\tExternal calls:\n\t- challengeManager.clearChallenge(chall) (src/rollup/RollupAdminLogic.sol#271)\n\tState variables written after the call(s):\n\t- clearChallenge(stakerA[i]) (src/rollup/RollupAdminLogic.sol#269)\n\t\t- staker.currentChallenge = NO_CHAL_INDEX (src/rollup/RollupCore.sol#370)\n\tRollupCore._stakerMap (src/rollup/RollupCore.sol#68) can be used in cross function reentrancies:\n\t- RollupCore._stakerMap (src/rollup/RollupCore.sol#68)\n\t- RollupCore.amountStaked(address) (src/rollup/RollupCore.sol#186-188)\n\t- RollupCore.clearChallenge(address) (src/rollup/RollupCore.sol#368-371)\n\t- RollupCore.currentChallenge(address) (src/rollup/RollupCore.sol#177-179)\n\t- RollupCore.deleteStaker(address) (src/rollup/RollupCore.sol#543-551)\n\t- RollupAdminLogic.forceRefundStaker(address[]) (src/rollup/RollupAdminLogic.sol#276-284)\n\t- RollupCore.getStaker(address) (src/rollup/RollupCore.sol#195-197)\n\t- RollupCore.inChallenge(address,address) (src/rollup/RollupCore.sol#351-362)\n\t- RollupCore.isStaked(address) (src/rollup/RollupCore.sol#149-151)\n\t- RollupCore.isStakedOnLatestConfirmed(address) (src/rollup/RollupCore.sol#159-161)\n\t- RollupCore.latestStakedNode(address) (src/rollup/RollupCore.sol#168-170)\n\t- RollupCore.reduceStakeTo(address,uint256) (src/rollup/RollupCore.sol#407-416)\n\t- RollupCore.turnIntoZombie(address) (src/rollup/RollupCore.sol#422-426)\n\t- clearChallenge(stakerB[i]) (src/rollup/RollupAdminLogic.sol#270)\n\t\t- staker.currentChallenge = NO_CHAL_INDEX (src/rollup/RollupCore.sol#370)\n\tRollupCore._stakerMap (src/rollup/RollupCore.sol#68) can be used in cross function reentrancies:\n\t- RollupCore._stakerMap (src/rollup/RollupCore.sol#68)\n\t- RollupCore.amountStaked(address) (src/rollup/RollupCore.sol#186-188)\n\t- RollupCore.clearChallenge(address) (src/rollup/RollupCore.sol#368-371)\n\t- RollupCore.currentChallenge(address) (src/rollup/RollupCore.sol#177-179)\n\t- RollupCore.deleteStaker(address) (src/rollup/RollupCore.sol#543-551)\n\t- RollupAdminLogic.forceRefundStaker(address[]) (src/rollup/RollupAdminLogic.sol#276-284)\n\t- RollupCore.getStaker(address) (src/rollup/RollupCore.sol#195-197)\n\t- RollupCore.inChallenge(address,address) (src/rollup/RollupCore.sol#351-362)\n\t- RollupCore.isStaked(address) (src/rollup/RollupCore.sol#149-151)\n\t- RollupCore.isStakedOnLatestConfirmed(address) (src/rollup/RollupCore.sol#159-161)\n\t- RollupCore.latestStakedNode(address) (src/rollup/RollupCore.sol#168-170)\n\t- RollupCore.reduceStakeTo(address,uint256) (src/rollup/RollupCore.sol#407-416)\n\t- RollupCore.turnIntoZombie(address) (src/rollup/RollupCore.sol#422-426)\n", "markdown": "Reentrancy in [RollupAdminLogic.forceResolveChallenge(address[],address[])](src/rollup/RollupAdminLogic.sol#L258-L274):\n\tExternal calls:\n\t- [challengeManager.clearChallenge(chall)](src/rollup/RollupAdminLogic.sol#L271)\n\tState variables written after the call(s):\n\t- [clearChallenge(stakerA[i])](src/rollup/RollupAdminLogic.sol#L269)\n\t\t- [staker.currentChallenge = NO_CHAL_INDEX](src/rollup/RollupCore.sol#L370)\n\t[RollupCore._stakerMap](src/rollup/RollupCore.sol#L68) can be used in cross function reentrancies:\n\t- [RollupCore._stakerMap](src/rollup/RollupCore.sol#L68)\n\t- [RollupCore.amountStaked(address)](src/rollup/RollupCore.sol#L186-L188)\n\t- [RollupCore.clearChallenge(address)](src/rollup/RollupCore.sol#L368-L371)\n\t- [RollupCore.currentChallenge(address)](src/rollup/RollupCore.sol#L177-L179)\n\t- [RollupCore.deleteStaker(address)](src/rollup/RollupCore.sol#L543-L551)\n\t- [RollupAdminLogic.forceRefundStaker(address[])](src/rollup/RollupAdminLogic.sol#L276-L284)\n\t- [RollupCore.getStaker(address)](src/rollup/RollupCore.sol#L195-L197)\n\t- [RollupCore.inChallenge(address,address)](src/rollup/RollupCore.sol#L351-L362)\n\t- [RollupCore.isStaked(address)](src/rollup/RollupCore.sol#L149-L151)\n\t- [RollupCore.isStakedOnLatestConfirmed(address)](src/rollup/RollupCore.sol#L159-L161)\n\t- [RollupCore.latestStakedNode(address)](src/rollup/RollupCore.sol#L168-L170)\n\t- [RollupCore.reduceStakeTo(address,uint256)](src/rollup/RollupCore.sol#L407-L416)\n\t- [RollupCore.turnIntoZombie(address)](src/rollup/RollupCore.sol#L422-L426)\n\t- [clearChallenge(stakerB[i])](src/rollup/RollupAdminLogic.sol#L270)\n\t\t- [staker.currentChallenge = NO_CHAL_INDEX](src/rollup/RollupCore.sol#L370)\n\t[RollupCore._stakerMap](src/rollup/RollupCore.sol#L68) can be used in cross function reentrancies:\n\t- [RollupCore._stakerMap](src/rollup/RollupCore.sol#L68)\n\t- [RollupCore.amountStaked(address)](src/rollup/RollupCore.sol#L186-L188)\n\t- [RollupCore.clearChallenge(address)](src/rollup/RollupCore.sol#L368-L371)\n\t- [RollupCore.currentChallenge(address)](src/rollup/RollupCore.sol#L177-L179)\n\t- [RollupCore.deleteStaker(address)](src/rollup/RollupCore.sol#L543-L551)\n\t- [RollupAdminLogic.forceRefundStaker(address[])](src/rollup/RollupAdminLogic.sol#L276-L284)\n\t- [RollupCore.getStaker(address)](src/rollup/RollupCore.sol#L195-L197)\n\t- [RollupCore.inChallenge(address,address)](src/rollup/RollupCore.sol#L351-L362)\n\t- [RollupCore.isStaked(address)](src/rollup/RollupCore.sol#L149-L151)\n\t- [RollupCore.isStakedOnLatestConfirmed(address)](src/rollup/RollupCore.sol#L159-L161)\n\t- [RollupCore.latestStakedNode(address)](src/rollup/RollupCore.sol#L168-L170)\n\t- [RollupCore.reduceStakeTo(address,uint256)](src/rollup/RollupCore.sol#L407-L416)\n\t- [RollupCore.turnIntoZombie(address)](src/rollup/RollupCore.sol#L422-L426)\n", "first_markdown_element": "src/rollup/RollupAdminLogic.sol#L258-L274", "id": "3a149381278a1de4529bcf77f84d92625154d32ad83406ea2d17142b95cb4a53", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "IERC20Inbox(inbox).createRetryableTicket({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,tokenTotalFeeAmount:feeAmountNativeDenominated,data:})", "source_mapping": {"start": 9674, "length": 451, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85], "starting_column": 13, "ending_column": 15}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-100) ignores return value by IERC20Inbox(inbox).createRetryableTicket({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,tokenTotalFeeAmount:feeAmountNativeDenominated,data:}) (src/rollup/DeployHelper.sol#75-85)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L100) ignores return value by [IERC20Inbox(inbox).createRetryableTicket({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,tokenTotalFeeAmount:feeAmountNativeDenominated,data:})](src/rollup/DeployHelper.sol#L75-L85)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L100", "id": "bc3bd802cf43553ebdde2f5a650bd37e2ba8471fe3f9de0d0bdbfad1fced1d00", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})", "source_mapping": {"start": 10156, "length": 399, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "starting_column": 13, "ending_column": 15}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-100) ignores return value by IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:}) (src/rollup/DeployHelper.sol#87-96)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L100) ignores return value by [IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})](src/rollup/DeployHelper.sol#L87-L96)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L100", "id": "fb1bf81f56dbacb484c41b74ff6b97327ed3ab06f9599b6d9c236b51f9a320ad", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "IInboxBase(inbox).sendL2Message(payload)", "source_mapping": {"start": 10632, "length": 40, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [99], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2154, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11692, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-100) ignores return value by IInboxBase(inbox).sendL2Message(payload) (src/rollup/DeployHelper.sol#99)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L100) ignores return value by [IInboxBase(inbox).sendL2Message(payload)](src/rollup/DeployHelper.sol#L99)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L100", "id": "1c1cb22c16963df7619b9d485774b3c8fbd70bb511ebd2becbfca1ad7bd77e50", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "deploy", "source_mapping": {"start": 660, "length": 435, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "FactoryDeployerHelper", "source_mapping": {"start": 373, "length": 724, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], "starting_column": 1, "ending_column": 2}}, "signature": "deploy(address,uint256)"}}, {"type": "node", "name": "IERC20(feeToken).transferFrom(msg.sender,inbox,amount)", "source_mapping": {"start": 955, "length": 56, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [22], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "deploy", "source_mapping": {"start": 660, "length": 435, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "FactoryDeployerHelper", "source_mapping": {"start": 373, "length": 724, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], "starting_column": 1, "ending_column": 2}}, "signature": "deploy(address,uint256)"}}}}], "description": "FactoryDeployerHelper.deploy(address,uint256) (src/rollup/FactoryDeployerHelper.sol#17-24) ignores return value by IERC20(feeToken).transferFrom(msg.sender,inbox,amount) (src/rollup/FactoryDeployerHelper.sol#22)\n", "markdown": "[FactoryDeployerHelper.deploy(address,uint256)](src/rollup/FactoryDeployerHelper.sol#L17-L24) ignores return value by [IERC20(feeToken).transferFrom(msg.sender,inbox,amount)](src/rollup/FactoryDeployerHelper.sol#L22)\n", "first_markdown_element": "src/rollup/FactoryDeployerHelper.sol#L17-L24", "id": "b61f6cd7e1b9dac16bde231f4604f5082f9d2bb1141b083d7b0c790237076ce2", "check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8665, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}, {"type": "node", "name": "index == entries.length", "source_mapping": {"start": 9123, "length": 23, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [255], "starting_column": 13, "ending_column": 36}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8665, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}}], "description": "CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#240-261) uses a dangerous strict equality:\n\t- index == entries.length (src/chain/CacheManager.sol#255)\n", "markdown": "[CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L240-L261) uses a dangerous strict equality:\n\t- [index == entries.length](src/chain/CacheManager.sol#L255)\n", "first_markdown_element": "src/chain/CacheManager.sol#L240-L261", "id": "d628a546b26bab7d17e51242113a300dee8b63d78108aa14fa547838f7c984b2", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8665, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheProgram(program)", "source_mapping": {"start": 9005, "length": 36, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [252], "starting_column": 9, "ending_column": 45}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8665, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 9092, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [254], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8665, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#240-261):\n\tExternal calls:\n\t- ARB_WASM_CACHE.cacheProgram(program) (src/chain/CacheManager.sol#252)\n\tState variables written after the call(s):\n\t- queueSize += size (src/chain/CacheManager.sol#254)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#27) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#240-261)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#264-270)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#222-237)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#124-152)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#196-205)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#27)\n", "markdown": "Reentrancy in [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L240-L261):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.cacheProgram(program)](src/chain/CacheManager.sol#L252)\n\tState variables written after the call(s):\n\t- [queueSize += size](src/chain/CacheManager.sol#L254)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L27) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L240-L261)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L264-L270)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L222-L237)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L124-L152)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L196-L205)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L27)\n", "first_markdown_element": "src/chain/CacheManager.sol#L240-L261", "id": "e3c59613b5f55bcaed6f72836989cdf48eec69a17bd181502982fefee7611e78", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9356, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [264, 265, 266, 267, 268, 269, 270], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9469, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [266], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9356, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [264, 265, 266, 267, 268, 269, 270], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "delete entries[index]", "source_mapping": {"start": 9605, "length": 21, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [269], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9356, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [264, 265, 266, 267, 268, 269, 270], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#264-270):\n\tExternal calls:\n\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#266)\n\tState variables written after the call(s):\n\t- delete entries[index] (src/chain/CacheManager.sol#269)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#240-261)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#264-270)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#222-237)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#89-92)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#104-106)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#110-120)\n", "markdown": "Reentrancy in [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L264-L270):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L266)\n\tState variables written after the call(s):\n\t- [delete entries[index]](src/chain/CacheManager.sol#L269)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L240-L261)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L264-L270)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L222-L237)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L89-L92)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L104-L106)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L110-L120)\n", "first_markdown_element": "src/chain/CacheManager.sol#L264-L270", "id": "da879b6db94b2d7e9b0b7ac41852a5d4daca51e4947137749f0329b126127352", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "evictAll", "source_mapping": {"start": 2880, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [89, 90, 91, 92], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}, {"type": "node", "name": "evictPrograms(type()(uint256).max)", "source_mapping": {"start": 2929, "length": 32, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [90], "starting_column": 9, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2880, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [89, 90, 91, 92], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9469, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [266], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9356, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [264, 265, 266, 267, 268, 269, 270], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "delete entries", "source_mapping": {"start": 2971, "length": 14, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [91], "starting_column": 9, "ending_column": 23}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2880, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [89, 90, 91, 92], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager.evictAll() (src/chain/CacheManager.sol#89-92):\n\tExternal calls:\n\t- evictPrograms(type()(uint256).max) (src/chain/CacheManager.sol#90)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#266)\n\tState variables written after the call(s):\n\t- delete entries (src/chain/CacheManager.sol#91)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#240-261)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#264-270)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#222-237)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#89-92)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#104-106)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#110-120)\n", "markdown": "Reentrancy in [CacheManager.evictAll()](src/chain/CacheManager.sol#L89-L92):\n\tExternal calls:\n\t- [evictPrograms(type()(uint256).max)](src/chain/CacheManager.sol#L90)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L266)\n\tState variables written after the call(s):\n\t- [delete entries](src/chain/CacheManager.sol#L91)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L240-L261)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L264-L270)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L222-L237)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L89-L92)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L104-L106)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L110-L120)\n", "first_markdown_element": "src/chain/CacheManager.sol#L89-L92", "id": "02366c421ff860e2f8a1d8cd1d277a7c7b74585fbb7afb043f28e6cf527b3d68", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "placeBid", "source_mapping": {"start": 6437, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}, {"type": "node", "name": "(bid,index) = _makeSpace(asm)", "source_mapping": {"start": 6745, "length": 45, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [189], "starting_column": 9, "ending_column": 54}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6437, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9469, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [266], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9356, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [264, 265, 266, 267, 268, 269, 270], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,program,codehash,asm,index)", "source_mapping": {"start": 6800, "length": 50, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [190], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6437, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheProgram(program)", "source_mapping": {"start": 9005, "length": 36, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [252], "starting_column": 9, "ending_column": 45}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8665, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,program,codehash,asm,index)", "source_mapping": {"start": 6800, "length": 50, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [190], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6437, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries.push(entry)", "source_mapping": {"start": 9162, "length": 19, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [256], "starting_column": 13, "ending_column": 32}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8665, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries[index] = entry", "source_mapping": {"start": 9212, "length": 22, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [258], "starting_column": 13, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8665, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "_addBid(bid,program,codehash,asm,index)", "source_mapping": {"start": 6800, "length": 50, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [190], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6437, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 9092, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [254], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8665, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10045, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager.placeBid(address) (src/chain/CacheManager.sol#179-191):\n\tExternal calls:\n\t- (bid,index) = _makeSpace(asm) (src/chain/CacheManager.sol#189)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#266)\n\t- _addBid(bid,program,codehash,asm,index) (src/chain/CacheManager.sol#190)\n\t\t- ARB_WASM_CACHE.cacheProgram(program) (src/chain/CacheManager.sol#252)\n\tState variables written after the call(s):\n\t- _addBid(bid,program,codehash,asm,index) (src/chain/CacheManager.sol#190)\n\t\t- entries.push(entry) (src/chain/CacheManager.sol#256)\n\t\t- entries[index] = entry (src/chain/CacheManager.sol#258)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#240-261)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#264-270)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#222-237)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#89-92)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#104-106)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#110-120)\n\t- _addBid(bid,program,codehash,asm,index) (src/chain/CacheManager.sol#190)\n\t\t- queueSize += size (src/chain/CacheManager.sol#254)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#27) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#240-261)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#264-270)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#222-237)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#124-152)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#196-205)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#27)\n", "markdown": "Reentrancy in [CacheManager.placeBid(address)](src/chain/CacheManager.sol#L179-L191):\n\tExternal calls:\n\t- [(bid,index) = _makeSpace(asm)](src/chain/CacheManager.sol#L189)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L266)\n\t- [_addBid(bid,program,codehash,asm,index)](src/chain/CacheManager.sol#L190)\n\t\t- [ARB_WASM_CACHE.cacheProgram(program)](src/chain/CacheManager.sol#L252)\n\tState variables written after the call(s):\n\t- [_addBid(bid,program,codehash,asm,index)](src/chain/CacheManager.sol#L190)\n\t\t- [entries.push(entry)](src/chain/CacheManager.sol#L256)\n\t\t- [entries[index] = entry](src/chain/CacheManager.sol#L258)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L240-L261)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L264-L270)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L222-L237)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L89-L92)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L104-L106)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L110-L120)\n\t- [_addBid(bid,program,codehash,asm,index)](src/chain/CacheManager.sol#L190)\n\t\t- [queueSize += size](src/chain/CacheManager.sol#L254)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L27) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L240-L261)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L264-L270)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L222-L237)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L124-L152)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L196-L205)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L27)\n", "first_markdown_element": "src/chain/CacheManager.sol#L179-L191", "id": "0c16e4db0a475c13c57a12b678c8c00c11806c69f841246d0fbbc7448bde8935", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8300, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}, {"type": "node", "name": "index == entries.length", "source_mapping": {"start": 8731, "length": 23, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [247], "starting_column": 13, "ending_column": 36}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8300, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}}], "description": "CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#233-253) uses a dangerous strict equality:\n\t- index == entries.length (src/chain/CacheManager.sol#247)\n", "markdown": "[CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L233-L253) uses a dangerous strict equality:\n\t- [index == entries.length](src/chain/CacheManager.sol#L247)\n", "first_markdown_element": "src/chain/CacheManager.sol#L233-L253", "id": "4c098b01c2961dc5b2294e0f72e7cf015b9600b3d18b28ada01a3659da0d5e6f", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8300, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheCodehash(code)", "source_mapping": {"start": 8615, "length": 34, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [244], "starting_column": 9, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8300, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 8700, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [246], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8300, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#233-253):\n\tExternal calls:\n\t- ARB_WASM_CACHE.cacheCodehash(code) (src/chain/CacheManager.sol#244)\n\tState variables written after the call(s):\n\t- queueSize += size (src/chain/CacheManager.sol#246)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#27) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#233-253)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#256-262)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#215-230)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#124-152)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#189-198)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#27)\n", "markdown": "Reentrancy in [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L233-L253):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.cacheCodehash(code)](src/chain/CacheManager.sol#L244)\n\tState variables written after the call(s):\n\t- [queueSize += size](src/chain/CacheManager.sol#L246)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L27) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L233-L253)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L256-L262)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L215-L230)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L124-L152)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L189-L198)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L27)\n", "first_markdown_element": "src/chain/CacheManager.sol#L233-L253", "id": "b9f6ea80a6accee7014dea8d7e8b56ddc8f2ed2255b688758266f20c2bbf230e", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8955, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [256, 257, 258, 259, 260, 261, 262], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9068, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [258], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8955, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [256, 257, 258, 259, 260, 261, 262], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "delete entries[index]", "source_mapping": {"start": 9204, "length": 21, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [261], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8955, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [256, 257, 258, 259, 260, 261, 262], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#256-262):\n\tExternal calls:\n\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#258)\n\tState variables written after the call(s):\n\t- delete entries[index] (src/chain/CacheManager.sol#261)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#233-253)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#256-262)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#215-230)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#89-92)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#104-106)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#110-120)\n", "markdown": "Reentrancy in [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L256-L262):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L258)\n\tState variables written after the call(s):\n\t- [delete entries[index]](src/chain/CacheManager.sol#L261)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L233-L253)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L256-L262)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L215-L230)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L89-L92)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L104-L106)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L110-L120)\n", "first_markdown_element": "src/chain/CacheManager.sol#L256-L262", "id": "4848413594e9f06020a2a4a3b7755e0ac5f0d7f7c22946958b361b50e6ce4a52", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "evictAll", "source_mapping": {"start": 2863, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [89, 90, 91, 92], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}, {"type": "node", "name": "evictPrograms(type()(uint256).max)", "source_mapping": {"start": 2912, "length": 32, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [90], "starting_column": 9, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2863, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [89, 90, 91, 92], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9068, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [258], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8955, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [256, 257, 258, 259, 260, 261, 262], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "delete entries", "source_mapping": {"start": 2954, "length": 14, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [91], "starting_column": 9, "ending_column": 23}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2863, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [89, 90, 91, 92], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager.evictAll() (src/chain/CacheManager.sol#89-92):\n\tExternal calls:\n\t- evictPrograms(type()(uint256).max) (src/chain/CacheManager.sol#90)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#258)\n\tState variables written after the call(s):\n\t- delete entries (src/chain/CacheManager.sol#91)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#233-253)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#256-262)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#215-230)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#89-92)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#104-106)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#110-120)\n", "markdown": "Reentrancy in [CacheManager.evictAll()](src/chain/CacheManager.sol#L89-L92):\n\tExternal calls:\n\t- [evictPrograms(type()(uint256).max)](src/chain/CacheManager.sol#L90)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L258)\n\tState variables written after the call(s):\n\t- [delete entries](src/chain/CacheManager.sol#L91)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L233-L253)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L256-L262)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L215-L230)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L89-L92)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L104-L106)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L110-L120)\n", "first_markdown_element": "src/chain/CacheManager.sol#L89-L92", "id": "bf120df8d715208381d983040d42897d8dcac47177e732ee5496cde132d2f231", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "placeBid", "source_mapping": {"start": 6125, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}, {"type": "node", "name": "(bid,index) = _makeSpace(asm)", "source_mapping": {"start": 6389, "length": 45, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [182], "starting_column": 9, "ending_column": 54}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6125, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9068, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [258], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8955, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [256, 257, 258, 259, 260, 261, 262], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,codehash,asm,index)", "source_mapping": {"start": 6444, "length": 41, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [183], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6125, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheCodehash(code)", "source_mapping": {"start": 8615, "length": 34, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [244], "starting_column": 9, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8300, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,codehash,asm,index)", "source_mapping": {"start": 6444, "length": 41, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [183], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6125, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries.push(entry)", "source_mapping": {"start": 8770, "length": 19, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [248], "starting_column": 13, "ending_column": 32}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8300, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries[index] = entry", "source_mapping": {"start": 8820, "length": 22, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [250], "starting_column": 13, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8300, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "_addBid(bid,codehash,asm,index)", "source_mapping": {"start": 6444, "length": 41, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [183], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6125, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 8700, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [246], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8300, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 9644, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/home/chris/lab/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager.placeBid(bytes32) (src/chain/CacheManager.sol#173-184):\n\tExternal calls:\n\t- (bid,index) = _makeSpace(asm) (src/chain/CacheManager.sol#182)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#258)\n\t- _addBid(bid,codehash,asm,index) (src/chain/CacheManager.sol#183)\n\t\t- ARB_WASM_CACHE.cacheCodehash(code) (src/chain/CacheManager.sol#244)\n\tState variables written after the call(s):\n\t- _addBid(bid,codehash,asm,index) (src/chain/CacheManager.sol#183)\n\t\t- entries.push(entry) (src/chain/CacheManager.sol#248)\n\t\t- entries[index] = entry (src/chain/CacheManager.sol#250)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#233-253)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#256-262)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#215-230)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#89-92)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#104-106)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#110-120)\n\t- _addBid(bid,codehash,asm,index) (src/chain/CacheManager.sol#183)\n\t\t- queueSize += size (src/chain/CacheManager.sol#246)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#27) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#233-253)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#256-262)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#215-230)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#124-152)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#189-198)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#27)\n", "markdown": "Reentrancy in [CacheManager.placeBid(bytes32)](src/chain/CacheManager.sol#L173-L184):\n\tExternal calls:\n\t- [(bid,index) = _makeSpace(asm)](src/chain/CacheManager.sol#L182)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L258)\n\t- [_addBid(bid,codehash,asm,index)](src/chain/CacheManager.sol#L183)\n\t\t- [ARB_WASM_CACHE.cacheCodehash(code)](src/chain/CacheManager.sol#L244)\n\tState variables written after the call(s):\n\t- [_addBid(bid,codehash,asm,index)](src/chain/CacheManager.sol#L183)\n\t\t- [entries.push(entry)](src/chain/CacheManager.sol#L248)\n\t\t- [entries[index] = entry](src/chain/CacheManager.sol#L250)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L233-L253)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L256-L262)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L215-L230)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L89-L92)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L104-L106)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L110-L120)\n\t- [_addBid(bid,codehash,asm,index)](src/chain/CacheManager.sol#L183)\n\t\t- [queueSize += size](src/chain/CacheManager.sol#L246)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L27) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L233-L253)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L256-L262)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L215-L230)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L124-L152)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L189-L198)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L27)\n", "first_markdown_element": "src/chain/CacheManager.sol#L173-L184", "id": "436212c386c26726839a1cf3068734d839e7b01aab9f4594d2df94fcad8587cf", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deployFactories", "source_mapping": {"start": 10566, "length": 1163, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}, {"type": "node", "name": "l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas)", "source_mapping": {"start": 10973, "length": 77, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [268], "starting_column": 13, "ending_column": 90}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployFactories", "source_mapping": {"start": 10566, "length": 1163, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}}}, {"type": "node", "name": "(sent,None) = msg.sender.call{value: address(this).balance}()", "source_mapping": {"start": 11161, "length": 65, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [272], "starting_column": 13, "ending_column": 78}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployFactories", "source_mapping": {"start": 10566, "length": 1163, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}}}], "description": "RollupCreator._deployFactories(address,address,uint256) (src/rollup/RollupCreator.sol#255-285) sends eth to arbitrary user\n\tDangerous calls:\n\t- l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas) (src/rollup/RollupCreator.sol#268)\n\t- (sent,None) = msg.sender.call{value: address(this).balance}() (src/rollup/RollupCreator.sol#272)\n", "markdown": "[RollupCreator._deployFactories(address,address,uint256)](src/rollup/RollupCreator.sol#L255-L285) sends eth to arbitrary user\n\tDangerous calls:\n\t- [l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas)](src/rollup/RollupCreator.sol#L268)\n\t- [(sent,None) = msg.sender.call{value: address(this).balance}()](src/rollup/RollupCreator.sol#L272)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L255-L285", "id": "33e46ab503ffc67db10a32c76db44b3d71085e8ccabf978afab4963ab79410b7", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8100, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}, {"type": "node", "name": "index == entries.length", "source_mapping": {"start": 8531, "length": 23, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [245], "starting_column": 13, "ending_column": 36}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8100, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}}], "description": "CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#231-251) uses a dangerous strict equality:\n\t- index == entries.length (src/chain/CacheManager.sol#245)\n", "markdown": "[CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L231-L251) uses a dangerous strict equality:\n\t- [index == entries.length](src/chain/CacheManager.sol#L245)\n", "first_markdown_element": "src/chain/CacheManager.sol#L231-L251", "id": "3a781781186cbb842796b829845aa7945c024854a5354a602603028bf3bf838a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "executeLinkModule", "source_mapping": {"start": 16420, "length": 1090, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "(userMod,offset,None) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0)", "source_mapping": {"start": 16918, "length": 141, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [448, 449, 450, 451, 452], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "executeLinkModule", "source_mapping": {"start": 16420, "length": 1090, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#433-464) ignores return value by (userMod,offset,None) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0) (src/osp/OneStepProverHostIo.sol#448-452)\n", "markdown": "[OneStepProverHostIo.executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L433-L464) ignores return value by [(userMod,offset,None) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0)](src/osp/OneStepProverHostIo.sol#L448-L452)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L433-L464", "id": "92ac837d702aee6d12fc38548f7f338739ba47bacbb9aa683450dead6b522b68", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1168, "length": 3662, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 10198, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "(err,value,None) = mod.moduleMemory.load(index,readBytes,proof,0)", "source_mapping": {"start": 3641, "length": 79, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [106], "starting_column": 9, "ending_column": 88}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1168, "length": 3662, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 10198, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes) (src/osp/OneStepProverMemory.sol#36-131) ignores return value by (err,value,None) = mod.moduleMemory.load(index,readBytes,proof,0) (src/osp/OneStepProverMemory.sol#106)\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes)](src/osp/OneStepProverMemory.sol#L36-L131) ignores return value by [(err,value,None) = mod.moduleMemory.load(index,readBytes,proof,0)](src/osp/OneStepProverMemory.sol#L106)\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L36-L131", "id": "b002aa15c2eafad3b5923f9ca2204b8ea235c930c19b94647b519331fc1abc4c", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createRollup", "source_mapping": {"start": 4904, "length": 5018, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}, {"type": "node", "name": "(None,ethSequencerInbox,ethInbox,None,None) = bridgeCreator.ethBasedTemplates()", "source_mapping": {"start": 5121, "length": 115, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [117, 118], "starting_column": 13, "ending_column": 37}, "type_specific_fields": {"parent": {"type": "function", "name": "createRollup", "source_mapping": {"start": 4904, "length": 5018, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}}}], "description": "RollupCreator.createRollup(RollupCreator.RollupDeploymentParams) (src/rollup/RollupCreator.sol#110-233) ignores return value by (None,ethSequencerInbox,ethInbox,None,None) = bridgeCreator.ethBasedTemplates() (src/rollup/RollupCreator.sol#117-118)\n", "markdown": "[RollupCreator.createRollup(RollupCreator.RollupDeploymentParams)](src/rollup/RollupCreator.sol#L110-L233) ignores return value by [(None,ethSequencerInbox,ethInbox,None,None) = bridgeCreator.ethBasedTemplates()](src/rollup/RollupCreator.sol#L117-L118)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L110-L233", "id": "6ac2b9112a4ee35d3925d1fe7a7ff08b6979520c84e24a42eba70d56c25bfb49", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createRollup", "source_mapping": {"start": 4904, "length": 5018, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}, {"type": "node", "name": "(None,erc20SequencerInbox,erc20Inbox,None,None) = bridgeCreator.erc20BasedTemplates()", "source_mapping": {"start": 5509, "length": 121, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [125, 126], "starting_column": 13, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "createRollup", "source_mapping": {"start": 4904, "length": 5018, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}}}], "description": "RollupCreator.createRollup(RollupCreator.RollupDeploymentParams) (src/rollup/RollupCreator.sol#110-233) ignores return value by (None,erc20SequencerInbox,erc20Inbox,None,None) = bridgeCreator.erc20BasedTemplates() (src/rollup/RollupCreator.sol#125-126)\n", "markdown": "[RollupCreator.createRollup(RollupCreator.RollupDeploymentParams)](src/rollup/RollupCreator.sol#L110-L233) ignores return value by [(None,erc20SequencerInbox,erc20Inbox,None,None) = bridgeCreator.erc20BasedTemplates()](src/rollup/RollupCreator.sol#L125-L126)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L110-L233", "id": "a4a7309cfe7707c52e24933155fba88b888f432e0f2bd5db4106b9577b09fab3", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "lastProvedLeafContents", "source_mapping": {"start": 7133, "length": 30, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [192], "starting_column": 9, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryStore", "source_mapping": {"start": 4836, "length": 3663, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 10198, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryStore(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).lastProvedLeafContents (src/osp/OneStepProverMemory.sol#192) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).lastProvedLeafContents](src/osp/OneStepProverMemory.sol#L192) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L192", "id": "00c7e5f6fcc242a5d65ca8b940bee5979b1e5fae2dfaad3a0f8f2ba6c6cd7a99", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "extractChallengeSegment", "source_mapping": {"start": 1364, "length": 682, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ChallengeLib", "source_mapping": {"start": 272, "length": 2649, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88], "starting_column": 1, "ending_column": 2}}, "signature": "extractChallengeSegment(ChallengeLib.SegmentSelection)"}}, {"type": "node", "name": "segmentLength = selection.oldSegmentsLength / oldChallengeDegree", "source_mapping": {"start": 1611, "length": 64, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [57], "starting_column": 9, "ending_column": 73}, "type_specific_fields": {"parent": {"type": "function", "name": "extractChallengeSegment", "source_mapping": {"start": 1364, "length": 682, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ChallengeLib", "source_mapping": {"start": 272, "length": 2649, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88], "starting_column": 1, "ending_column": 2}}, "signature": "extractChallengeSegment(ChallengeLib.SegmentSelection)"}}}}, {"type": "node", "name": "segmentStart = selection.oldSegmentsStart + segmentLength * selection.challengePosition", "source_mapping": {"start": 1784, "length": 87, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [59], "starting_column": 9, "ending_column": 96}, "type_specific_fields": {"parent": {"type": "function", "name": "extractChallengeSegment", "source_mapping": {"start": 1364, "length": 682, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ChallengeLib", "source_mapping": {"start": 272, "length": 2649, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88], "starting_column": 1, "ending_column": 2}}, "signature": "extractChallengeSegment(ChallengeLib.SegmentSelection)"}}}}], "description": "ChallengeLib.extractChallengeSegment(ChallengeLib.SegmentSelection) (src/challenge/ChallengeLib.sol#51-63) performs a multiplication on the result of a division:\n\t- segmentLength = selection.oldSegmentsLength / oldChallengeDegree (src/challenge/ChallengeLib.sol#57)\n\t- segmentStart = selection.oldSegmentsStart + segmentLength * selection.challengePosition (src/challenge/ChallengeLib.sol#59)\n", "markdown": "[ChallengeLib.extractChallengeSegment(ChallengeLib.SegmentSelection)](src/challenge/ChallengeLib.sol#L51-L63) performs a multiplication on the result of a division:\n\t- [segmentLength = selection.oldSegmentsLength / oldChallengeDegree](src/challenge/ChallengeLib.sol#L57)\n\t- [segmentStart = selection.oldSegmentsStart + segmentLength * selection.challengePosition](src/challenge/ChallengeLib.sol#L59)\n", "first_markdown_element": "src/challenge/ChallengeLib.sol#L51-L63", "id": "a4b93976a94b1cf6b99dc623ae954b79e816fc108466f521511aaa71a571ee62", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4469, "length": 5772, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "rootOfUnityPower = (1 << 32) / fieldElementsPerBlob", "source_mapping": {"start": 9247, "length": 59, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [229], "starting_column": 17, "ending_column": 76}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4469, "length": 5772, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "rootOfUnityPower *= bitReversedIndex", "source_mapping": {"start": 9474, "length": 36, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [232], "starting_column": 17, "ending_column": 53}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4469, "length": 5772, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#128-250) performs a multiplication on the result of a division:\n\t- rootOfUnityPower = (1 << 32) / fieldElementsPerBlob (src/osp/OneStepProverHostIo.sol#229)\n\t- rootOfUnityPower *= bitReversedIndex (src/osp/OneStepProverHostIo.sol#232)\n", "markdown": "[OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L128-L250) performs a multiplication on the result of a division:\n\t- [rootOfUnityPower = (1 << 32) / fieldElementsPerBlob](src/osp/OneStepProverHostIo.sol#L229)\n\t- [rootOfUnityPower *= bitReversedIndex](src/osp/OneStepProverHostIo.sol#L232)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L128-L250", "id": "f0b43f8c42c636a0a6c208ac9bd013cf20177f73df6cf1ea5ab40b7aec7a50ca", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8100, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheCodehash(code)", "source_mapping": {"start": 8415, "length": 34, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [242], "starting_column": 9, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8100, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 8500, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [244], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8100, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#231-251):\n\tExternal calls:\n\t- ARB_WASM_CACHE.cacheCodehash(code) (src/chain/CacheManager.sol#242)\n\tState variables written after the call(s):\n\t- queueSize += size (src/chain/CacheManager.sol#244)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#25) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#231-251)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#254-260)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#213-228)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#122-150)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#187-196)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#25)\n", "markdown": "Reentrancy in [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L231-L251):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.cacheCodehash(code)](src/chain/CacheManager.sol#L242)\n\tState variables written after the call(s):\n\t- [queueSize += size](src/chain/CacheManager.sol#L244)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L25) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L231-L251)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L254-L260)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L213-L228)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L122-L150)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L187-L196)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L25)\n", "first_markdown_element": "src/chain/CacheManager.sol#L231-L251", "id": "7cafef621b24ce7927bcb6c53b9a6c824466abcd138ed1f43bd4a38e07637b19", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8755, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [254, 255, 256, 257, 258, 259, 260], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 8868, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [256], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8755, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [254, 255, 256, 257, 258, 259, 260], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "delete entries[index]", "source_mapping": {"start": 9004, "length": 21, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [259], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8755, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [254, 255, 256, 257, 258, 259, 260], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#254-260):\n\tExternal calls:\n\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#256)\n\tState variables written after the call(s):\n\t- delete entries[index] (src/chain/CacheManager.sol#259)\n\tCacheManager.entries (src/chain/CacheManager.sol#22) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#231-251)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#254-260)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#213-228)\n\t- CacheManager.entries (src/chain/CacheManager.sol#22)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#87-90)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#102-104)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#108-118)\n", "markdown": "Reentrancy in [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L254-L260):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L256)\n\tState variables written after the call(s):\n\t- [delete entries[index]](src/chain/CacheManager.sol#L259)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L22) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L231-L251)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L254-L260)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L213-L228)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L22)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L87-L90)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L102-L104)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L108-L118)\n", "first_markdown_element": "src/chain/CacheManager.sol#L254-L260", "id": "1400e2c01607b2bdf7010ad99c436ef2db92c4122f6340a3ca3e5664bc80c983", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "evictAll", "source_mapping": {"start": 2663, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [87, 88, 89, 90], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}, {"type": "node", "name": "evictPrograms(type()(uint256).max)", "source_mapping": {"start": 2712, "length": 32, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [88], "starting_column": 9, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2663, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [87, 88, 89, 90], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 8868, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [256], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8755, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [254, 255, 256, 257, 258, 259, 260], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "delete entries", "source_mapping": {"start": 2754, "length": 14, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [89], "starting_column": 9, "ending_column": 23}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2663, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [87, 88, 89, 90], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager.evictAll() (src/chain/CacheManager.sol#87-90):\n\tExternal calls:\n\t- evictPrograms(type()(uint256).max) (src/chain/CacheManager.sol#88)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#256)\n\tState variables written after the call(s):\n\t- delete entries (src/chain/CacheManager.sol#89)\n\tCacheManager.entries (src/chain/CacheManager.sol#22) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#231-251)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#254-260)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#213-228)\n\t- CacheManager.entries (src/chain/CacheManager.sol#22)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#87-90)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#102-104)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#108-118)\n", "markdown": "Reentrancy in [CacheManager.evictAll()](src/chain/CacheManager.sol#L87-L90):\n\tExternal calls:\n\t- [evictPrograms(type()(uint256).max)](src/chain/CacheManager.sol#L88)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L256)\n\tState variables written after the call(s):\n\t- [delete entries](src/chain/CacheManager.sol#L89)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L22) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L231-L251)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L254-L260)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L213-L228)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L22)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L87-L90)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L102-L104)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L108-L118)\n", "first_markdown_element": "src/chain/CacheManager.sol#L87-L90", "id": "e453de7fb42e742ec25db94618c0bc9d52db23aecc625992da375d6e46e61fa8", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "placeBid", "source_mapping": {"start": 5925, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}, {"type": "node", "name": "(bid,index) = _makeSpace(asm)", "source_mapping": {"start": 6189, "length": 45, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [180], "starting_column": 9, "ending_column": 54}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 5925, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 8868, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [256], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 8755, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [254, 255, 256, 257, 258, 259, 260], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,codehash,asm,index)", "source_mapping": {"start": 6244, "length": 41, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [181], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 5925, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheCodehash(code)", "source_mapping": {"start": 8415, "length": 34, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [242], "starting_column": 9, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8100, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,codehash,asm,index)", "source_mapping": {"start": 6244, "length": 41, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [181], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 5925, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries.push(entry)", "source_mapping": {"start": 8570, "length": 19, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [246], "starting_column": 13, "ending_column": 32}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8100, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries[index] = entry", "source_mapping": {"start": 8620, "length": 22, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [248], "starting_column": 13, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8100, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "_addBid(bid,codehash,asm,index)", "source_mapping": {"start": 6244, "length": 41, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [181], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 5925, "length": 367, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(bytes32)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 8500, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [244], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8100, "length": 600, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager.placeBid(bytes32) (src/chain/CacheManager.sol#171-182):\n\tExternal calls:\n\t- (bid,index) = _makeSpace(asm) (src/chain/CacheManager.sol#180)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#256)\n\t- _addBid(bid,codehash,asm,index) (src/chain/CacheManager.sol#181)\n\t\t- ARB_WASM_CACHE.cacheCodehash(code) (src/chain/CacheManager.sol#242)\n\tState variables written after the call(s):\n\t- _addBid(bid,codehash,asm,index) (src/chain/CacheManager.sol#181)\n\t\t- entries.push(entry) (src/chain/CacheManager.sol#246)\n\t\t- entries[index] = entry (src/chain/CacheManager.sol#248)\n\tCacheManager.entries (src/chain/CacheManager.sol#22) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#231-251)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#254-260)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#213-228)\n\t- CacheManager.entries (src/chain/CacheManager.sol#22)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#87-90)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#102-104)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#108-118)\n\t- _addBid(bid,codehash,asm,index) (src/chain/CacheManager.sol#181)\n\t\t- queueSize += size (src/chain/CacheManager.sol#244)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#25) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,bytes32,uint64,uint64) (src/chain/CacheManager.sol#231-251)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#254-260)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#213-228)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#122-150)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#187-196)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#25)\n", "markdown": "Reentrancy in [CacheManager.placeBid(bytes32)](src/chain/CacheManager.sol#L171-L182):\n\tExternal calls:\n\t- [(bid,index) = _makeSpace(asm)](src/chain/CacheManager.sol#L180)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L256)\n\t- [_addBid(bid,codehash,asm,index)](src/chain/CacheManager.sol#L181)\n\t\t- [ARB_WASM_CACHE.cacheCodehash(code)](src/chain/CacheManager.sol#L242)\n\tState variables written after the call(s):\n\t- [_addBid(bid,codehash,asm,index)](src/chain/CacheManager.sol#L181)\n\t\t- [entries.push(entry)](src/chain/CacheManager.sol#L246)\n\t\t- [entries[index] = entry](src/chain/CacheManager.sol#L248)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L22) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L231-L251)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L254-L260)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L213-L228)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L22)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L87-L90)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L102-L104)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L108-L118)\n\t- [_addBid(bid,codehash,asm,index)](src/chain/CacheManager.sol#L181)\n\t\t- [queueSize += size](src/chain/CacheManager.sol#L244)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L25) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L231-L251)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L254-L260)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L213-L228)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L122-L150)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L187-L196)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L25)\n", "first_markdown_element": "src/chain/CacheManager.sol#L171-L182", "id": "1e0701041bd439420af2077b392bf8fa2ccd25ae29d0d785daec5e92d76ecbb8", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "internalStack", "source_mapping": {"start": 1753, "length": 31, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [52], "starting_column": 9, "ending_column": 40}, "type_specific_fields": {"parent": {"type": "function", "name": "getStartMachineHash", "source_mapping": {"start": 1158, "length": 1300, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 7601, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], "starting_column": 1, "ending_column": 2}}, "signature": "getStartMachineHash(bytes32,bytes32)"}}}}], "description": "OneStepProofEntry.getStartMachineHash(bytes32,bytes32).internalStack (src/osp/OneStepProofEntry.sol#52) is a local variable never initialized\n", "markdown": "[OneStepProofEntry.getStartMachineHash(bytes32,bytes32).internalStack](src/osp/OneStepProofEntry.sol#L52) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProofEntry.sol#L52", "id": "fb3b9ad9a22662ab3a9d3f187478b9833041da23c79103d4346a16da071526e9", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "frameStack", "source_mapping": {"start": 1794, "length": 34, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [53], "starting_column": 9, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "function", "name": "getStartMachineHash", "source_mapping": {"start": 1158, "length": 1300, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 7601, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], "starting_column": 1, "ending_column": 2}}, "signature": "getStartMachineHash(bytes32,bytes32)"}}}}], "description": "OneStepProofEntry.getStartMachineHash(bytes32,bytes32).frameStack (src/osp/OneStepProofEntry.sol#53) is a local variable never initialized\n", "markdown": "[OneStepProofEntry.getStartMachineHash(bytes32,bytes32).frameStack](src/osp/OneStepProofEntry.sol#L53) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProofEntry.sol#L53", "id": "2dd21e12ec5d5965b5bd41d82bb252991172e100ac1f78846fb692a07fd06c26", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "lastProvedLeafContents", "source_mapping": {"start": 2178, "length": 30, "filename_relative": "src/state/ModuleMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/ModuleMemory.sol", "filename_short": "src/state/ModuleMemory.sol", "is_dependency": false, "lines": [73], "starting_column": 9, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "load", "source_mapping": {"start": 1729, "length": 1164, "filename_relative": "src/state/ModuleMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/ModuleMemory.sol", "filename_short": "src/state/ModuleMemory.sol", "is_dependency": false, "lines": [53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ModuleMemoryLib", "source_mapping": {"start": 298, "length": 2597, "filename_relative": "src/state/ModuleMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/ModuleMemory.sol", "filename_short": "src/state/ModuleMemory.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92], "starting_column": 1, "ending_column": 2}}, "signature": "load(ModuleMemory,uint256,uint256,bytes,uint256)"}}}}], "description": "ModuleMemoryLib.load(ModuleMemory,uint256,uint256,bytes,uint256).lastProvedLeafContents (src/state/ModuleMemory.sol#73) is a local variable never initialized\n", "markdown": "[ModuleMemoryLib.load(ModuleMemory,uint256,uint256,bytes,uint256).lastProvedLeafContents](src/state/ModuleMemory.sol#L73) is a local variable never initialized\n", "first_markdown_element": "src/state/ModuleMemory.sol#L73", "id": "ddf8f7daccaffa622915e6d24c5497c3801c89f4969af443509e576747d091fe", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "emptyMultiStack", "source_mapping": {"start": 1838, "length": 33, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [54], "starting_column": 9, "ending_column": 42}, "type_specific_fields": {"parent": {"type": "function", "name": "getStartMachineHash", "source_mapping": {"start": 1158, "length": 1300, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 7601, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], "starting_column": 1, "ending_column": 2}}, "signature": "getStartMachineHash(bytes32,bytes32)"}}}}], "description": "OneStepProofEntry.getStartMachineHash(bytes32,bytes32).emptyMultiStack (src/osp/OneStepProofEntry.sol#54) is a local variable never initialized\n", "markdown": "[OneStepProofEntry.getStartMachineHash(bytes32,bytes32).emptyMultiStack](src/osp/OneStepProofEntry.sol#L54) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProofEntry.sol#L54", "id": "5c6acbea6429303780ccb1049265a5d97162a57ddda1d6d332f3201bff526332", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "min", "source_mapping": {"start": 7701, "length": 11, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [218], "starting_column": 9, "ending_column": 20}, "type_specific_fields": {"parent": {"type": "function", "name": "_makeSpace", "source_mapping": {"start": 7478, "length": 592, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 350, "length": 9565, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "starting_column": 1, "ending_column": 2}}, "signature": "_makeSpace(uint64)"}}}}], "description": "CacheManager._makeSpace(uint64).min (src/chain/CacheManager.sol#218) is a local variable never initialized\n", "markdown": "[CacheManager._makeSpace(uint64).min](src/chain/CacheManager.sol#L218) is a local variable never initialized\n", "first_markdown_element": "src/chain/CacheManager.sol#L218", "id": "73850e9ef891d5f054eb989dce18e9362ba7349b4f2237be464bcaeab7c4fe54", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "proveOneStep", "source_mapping": {"start": 3092, "length": 4914, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 7601, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], "starting_column": 1, "ending_column": 2}}, "signature": "proveOneStep(ExecutionContext,uint256,bytes32,bytes)"}}, {"type": "node", "name": "mach.setPcFromRecovery()", "source_mapping": {"start": 7887, "length": 24, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [197], "starting_column": 13, "ending_column": 37}, "type_specific_fields": {"parent": {"type": "function", "name": "proveOneStep", "source_mapping": {"start": 3092, "length": 4914, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 7601, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], "starting_column": 1, "ending_column": 2}}, "signature": "proveOneStep(ExecutionContext,uint256,bytes32,bytes)"}}}}], "description": "OneStepProofEntry.proveOneStep(ExecutionContext,uint256,bytes32,bytes) (src/osp/OneStepProofEntry.sol#91-202) ignores return value by mach.setPcFromRecovery() (src/osp/OneStepProofEntry.sol#197)\n", "markdown": "[OneStepProofEntry.proveOneStep(ExecutionContext,uint256,bytes32,bytes)](src/osp/OneStepProofEntry.sol#L91-L202) ignores return value by [mach.setPcFromRecovery()](src/osp/OneStepProofEntry.sol#L197)\n", "first_markdown_element": "src/osp/OneStepProofEntry.sol#L91-L202", "id": "1e2dda001e02cbbabef97b698cc66ccc8052b4444a6785554ba4d649b6511550", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeDrop", "source_mapping": {"start": 1726, "length": 185, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18300, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538], "starting_column": 1, "ending_column": 2}}, "signature": "executeDrop(Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "mach.valueStack.pop()", "source_mapping": {"start": 1883, "length": 21, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [67], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "executeDrop", "source_mapping": {"start": 1726, "length": 185, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18300, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538], "starting_column": 1, "ending_column": 2}}, "signature": "executeDrop(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeDrop(Machine,Module,Instruction,bytes) (src/osp/OneStepProver0.sol#61-68) ignores return value by mach.valueStack.pop() (src/osp/OneStepProver0.sol#67)\n", "markdown": "[OneStepProver0.executeDrop(Machine,Module,Instruction,bytes)](src/osp/OneStepProver0.sol#L61-L68) ignores return value by [mach.valueStack.pop()](src/osp/OneStepProver0.sol#L67)\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L61-L68", "id": "eba4f716555f696a91fc8ad9e049846421a7a6ad85a83865fb641cf1b9b27c54", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10247, "length": 884, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}, {"type": "node", "name": "(afterDelayedMsg,None) = Deserialize.u64(message,32)", "source_mapping": {"start": 10532, "length": 50, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [260], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10247, "length": 884, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes) (src/osp/OneStepProverHostIo.sol#252-274) ignores return value by (afterDelayedMsg,None) = Deserialize.u64(message,32) (src/osp/OneStepProverHostIo.sol#260)\n", "markdown": "[OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes)](src/osp/OneStepProverHostIo.sol#L252-L274) ignores return value by [(afterDelayedMsg,None) = Deserialize.u64(message,32)](src/osp/OneStepProverHostIo.sol#L260)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L252-L274", "id": "7a935ab3d3995d6dce7a8ceebf4df0c402dd5ffa259ff05c1b75422e65f9a5ed", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "validateDelayedInbox", "source_mapping": {"start": 11137, "length": 916, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "validateDelayedInbox(ExecutionContext,uint64,bytes)"}}, {"type": "node", "name": "(sender,None) = Deserialize.u256(message,1)", "source_mapping": {"start": 11660, "length": 41, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [292], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "validateDelayedInbox", "source_mapping": {"start": 11137, "length": 916, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "validateDelayedInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes) (src/osp/OneStepProverHostIo.sol#276-301) ignores return value by (sender,None) = Deserialize.u256(message,1) (src/osp/OneStepProverHostIo.sol#292)\n", "markdown": "[OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes)](src/osp/OneStepProverHostIo.sol#L276-L301) ignores return value by [(sender,None) = Deserialize.u256(message,1)](src/osp/OneStepProverHostIo.sol#L292)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L276-L301", "id": "81ff5b93f212262122b563d7d9aa8ed5b61e0fe74edfe59c06accd2ae77a46ca", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeLinkModule", "source_mapping": {"start": 16420, "length": 1090, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "(userMod,offset) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0)", "source_mapping": {"start": 16918, "length": 141, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [448, 449, 450, 451, 452], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "executeLinkModule", "source_mapping": {"start": 16420, "length": 1090, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#433-464) ignores return value by (userMod,offset) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0) (src/osp/OneStepProverHostIo.sol#448-452)\n", "markdown": "[OneStepProverHostIo.executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L433-L464) ignores return value by [(userMod,offset) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0)](src/osp/OneStepProverHostIo.sol#L448-L452)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L433-L464", "id": "ca4b4a9a8f6f270a10c0e390a10831708cbcfc0bfa398fc3f21331bfbd5fc479", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeSwitchCoThread", "source_mapping": {"start": 21302, "length": 1074, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "mach.setRecoveryFromPc(uint32(inst.argumentData))", "source_mapping": {"start": 22273, "length": 49, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [597], "starting_column": 13, "ending_column": 62}, "type_specific_fields": {"parent": {"type": "function", "name": "executeSwitchCoThread", "source_mapping": {"start": 21302, "length": 1074, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23583, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649], "starting_column": 1, "ending_column": 2}}, "signature": "executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#572-600) ignores return value by mach.setRecoveryFromPc(uint32(inst.argumentData)) (src/osp/OneStepProverHostIo.sol#597)\n", "markdown": "[OneStepProverHostIo.executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L572-L600) ignores return value by [mach.setRecoveryFromPc(uint32(inst.argumentData))](src/osp/OneStepProverHostIo.sol#L597)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L572-L600", "id": "ac3b6c8d13d7ed575d28aeae91d5e7c25757469f13c56cd8ec10843535deca31", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1168, "length": 3662, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 10198, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "(err,value) = mod.moduleMemory.load(index,readBytes,proof,0)", "source_mapping": {"start": 3641, "length": 79, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [106], "starting_column": 9, "ending_column": 88}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1168, "length": 3662, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 10198, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes) (src/osp/OneStepProverMemory.sol#36-131) ignores return value by (err,value) = mod.moduleMemory.load(index,readBytes,proof,0) (src/osp/OneStepProverMemory.sol#106)\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes)](src/osp/OneStepProverMemory.sol#L36-L131) ignores return value by [(err,value) = mod.moduleMemory.load(index,readBytes,proof,0)](src/osp/OneStepProverMemory.sol#L106)\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L36-L131", "id": "df6a63edce47eb17310486af71173d172b59ec0187bd5f84df01a3e0bbd022c2", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "offset", "source_mapping": {"start": 7752, "length": 18, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [241], "starting_column": 13, "ending_column": 31}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7332, "length": 3565, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18300, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset)", "source_mapping": {"start": 9359, "length": 59, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [277], "starting_column": 13, "ending_column": 72}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7332, "length": 3565, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18300, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "(functionPointer,offset) = Deserialize.value(proof,offset)", "source_mapping": {"start": 9432, "length": 60, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [278], "starting_column": 13, "ending_column": 73}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7332, "length": 3565, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18300, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).offset (src/osp/OneStepProver0.sol#241) is written in both\n\t(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset) (src/osp/OneStepProver0.sol#277)\n\t(functionPointer,offset) = Deserialize.value(proof,offset) (src/osp/OneStepProver0.sol#278)\n", "markdown": "[OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).offset](src/osp/OneStepProver0.sol#L241) is written in both\n\t[(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset)](src/osp/OneStepProver0.sol#L277)\n\t[(functionPointer,offset) = Deserialize.value(proof,offset)](src/osp/OneStepProver0.sol#L278)\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L241", "id": "d6a42f778bdb10ec1cc4e3ae5bd1d2a66edf8c14085e20de930344608bd29bd2", "check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "refundsGas", "source_mapping": {"start": 721, "length": 2143, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2557, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}, {"type": "node", "name": "calldataWords = (calldataSize + 31) / 32", "source_mapping": {"start": 960, "length": 48, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [22], "starting_column": 13, "ending_column": 61}, "type_specific_fields": {"parent": {"type": "function", "name": "refundsGas", "source_mapping": {"start": 721, "length": 2143, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2557, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}}}, {"type": "node", "name": "startGasLeft += calldataWords * 6 + (calldataWords ** 2) / 512", "source_mapping": {"start": 1130, "length": 60, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [24], "starting_column": 13, "ending_column": 73}, "type_specific_fields": {"parent": {"type": "function", "name": "refundsGas", "source_mapping": {"start": 721, "length": 2143, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2557, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}}}], "description": "GasRefundEnabled.refundsGas(IGasRefunder,IReader4844) (src/libraries/GasRefundEnabled.sol#17-51) performs a multiplication on the result of a division:\n\t- calldataWords = (calldataSize + 31) / 32 (src/libraries/GasRefundEnabled.sol#22)\n\t- startGasLeft += calldataWords * 6 + (calldataWords ** 2) / 512 (src/libraries/GasRefundEnabled.sol#24)\n", "markdown": "[GasRefundEnabled.refundsGas(IGasRefunder,IReader4844)](src/libraries/GasRefundEnabled.sol#L17-L51) performs a multiplication on the result of a division:\n\t- [calldataWords = (calldataSize + 31) / 32](src/libraries/GasRefundEnabled.sol#L22)\n\t- [startGasLeft += calldataWords * 6 + (calldataWords ** 2) / 512](src/libraries/GasRefundEnabled.sol#L24)\n", "first_markdown_element": "src/libraries/GasRefundEnabled.sol#L17-L51", "id": "bb26256ad08f6833c6e0395d78c4b8a1182860d966d17803ac727cde7719e8b6", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "node", "name": "_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,isUsingFeeToken,_maxFeePerGas)", "source_mapping": {"start": 10207, "length": 201, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [96, 97, 98, 99, 100, 101, 102, 103], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 10012, "length": 1157, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}}}, {"type": "node", "name": "_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,isUsingFeeToken,_maxFeePerGas)", "source_mapping": {"start": 10207, "length": 201, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [96, 97, 98, 99, 100, 101, 102, 103], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 10012, "length": 1157, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}}}], "description": "Multiple retryable tickets created in the same function:\n\t -_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,isUsingFeeToken,_maxFeePerGas) (src/rollup/DeployHelper.sol#96-103)\n\t -_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,isUsingFeeToken,_maxFeePerGas) (src/rollup/DeployHelper.sol#96-103)\n", "markdown": "Multiple retryable tickets created in the same function:\n\t -[_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,isUsingFeeToken,_maxFeePerGas)](src/rollup/DeployHelper.sol#L96-L103)\n\t -[_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,isUsingFeeToken,_maxFeePerGas)](src/rollup/DeployHelper.sol#L96-L103)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L96-L103", "id": "5d40acc11dbb925c7e8ac930729d7231aea71007192a71ca36b451cad7a17520", "check": "out-of-order-retryable", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_executeLowLevelCall", "source_mapping": {"start": 1379, "length": 299, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [42, 43, 44, 45, 46, 47, 48, 49], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Bridge", "source_mapping": {"start": 702, "length": 1090, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54], "starting_column": 1, "ending_column": 2}}, "signature": "_executeLowLevelCall(address,uint256,bytes)"}}, {"type": "node", "name": "(success,returnData) = to.call{value: value}(data)", "source_mapping": {"start": 1620, "length": 51, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [48], "starting_column": 9, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "_executeLowLevelCall", "source_mapping": {"start": 1379, "length": 299, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [42, 43, 44, 45, 46, 47, 48, 49], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Bridge", "source_mapping": {"start": 702, "length": 1090, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54], "starting_column": 1, "ending_column": 2}}, "signature": "_executeLowLevelCall(address,uint256,bytes)"}}}}], "description": "Bridge._executeLowLevelCall(address,uint256,bytes) (src/bridge/Bridge.sol#42-49) sends eth to arbitrary user\n\tDangerous calls:\n\t- (success,returnData) = to.call{value: value}(data) (src/bridge/Bridge.sol#48)\n", "markdown": "[Bridge._executeLowLevelCall(address,uint256,bytes)](src/bridge/Bridge.sol#L42-L49) sends eth to arbitrary user\n\tDangerous calls:\n\t- [(success,returnData) = to.call{value: value}(data)](src/bridge/Bridge.sol#L48)\n", "first_markdown_element": "src/bridge/Bridge.sol#L42-L49", "id": "52aa149e251bcbda3478032a3845253462c6d80e50cde35746a072dd6dd226a6", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8513, "length": 1493, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,bool,uint256)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})", "source_mapping": {"start": 9483, "length": 399, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [74, 75, 76, 77, 78, 79, 80, 81, 82, 83], "starting_column": 13, "ending_column": 15}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8513, "length": 1493, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,bool,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,bool,uint256) (src/rollup/DeployHelper.sol#46-87) sends eth to arbitrary user\n\tDangerous calls:\n\t- IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:}) (src/rollup/DeployHelper.sol#74-83)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,bool,uint256)](src/rollup/DeployHelper.sol#L46-L87) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})](src/rollup/DeployHelper.sol#L74-L83)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L87", "id": "e0479a62ad4830e7fe86da8c84b5e23beb3117b4fad5a10981cccab1ed4d7fef", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "perform", "source_mapping": {"start": 10012, "length": 1157, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}, {"type": "node", "name": "address(msg.sender).transfer(address(this).balance)", "source_mapping": {"start": 11101, "length": 51, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [131], "starting_column": 13, "ending_column": 64}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 10012, "length": 1157, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}}}], "description": "DeployHelper.perform(address,address,uint256) (src/rollup/DeployHelper.sol#89-133) sends eth to arbitrary user\n\tDangerous calls:\n\t- address(msg.sender).transfer(address(this).balance) (src/rollup/DeployHelper.sol#131)\n", "markdown": "[DeployHelper.perform(address,address,uint256)](src/rollup/DeployHelper.sol#L89-L133) sends eth to arbitrary user\n\tDangerous calls:\n\t- [address(msg.sender).transfer(address(this).balance)](src/rollup/DeployHelper.sol#L131)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L89-L133", "id": "9ffb800c52b7ebc92a4117369762770d49beb52d8f7f0c4c53742745d88e75c4", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deployFactories", "source_mapping": {"start": 10566, "length": 1163, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}, {"type": "node", "name": "l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas)", "source_mapping": {"start": 10973, "length": 77, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [268], "starting_column": 13, "ending_column": 90}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployFactories", "source_mapping": {"start": 10566, "length": 1163, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}}}, {"type": "node", "name": "(sent) = msg.sender.call{value: address(this).balance}()", "source_mapping": {"start": 11161, "length": 65, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [272], "starting_column": 13, "ending_column": 78}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployFactories", "source_mapping": {"start": 10566, "length": 1163, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}}}], "description": "RollupCreator._deployFactories(address,address,uint256) (src/rollup/RollupCreator.sol#255-285) sends eth to arbitrary user\n\tDangerous calls:\n\t- l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas) (src/rollup/RollupCreator.sol#268)\n\t- (sent) = msg.sender.call{value: address(this).balance}() (src/rollup/RollupCreator.sol#272)\n", "markdown": "[RollupCreator._deployFactories(address,address,uint256)](src/rollup/RollupCreator.sol#L255-L285) sends eth to arbitrary user\n\tDangerous calls:\n\t- [l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas)](src/rollup/RollupCreator.sol#L268)\n\t- [(sent) = msg.sender.call{value: address(this).balance}()](src/rollup/RollupCreator.sol#L272)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L255-L285", "id": "76dc4e58fa8c5850af786b5521aa4b4047660ca4b5cfdc3ec6d2b34a27bf414d", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "calculateRoot", "source_mapping": {"start": 987, "length": 872, "filename_relative": "src/libraries/MerkleLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/MerkleLib.sol", "filename_short": "src/libraries/MerkleLib.sol", "is_dependency": false, "lines": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "MerkleLib", "source_mapping": {"start": 254, "length": 1607, "filename_relative": "src/libraries/MerkleLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/MerkleLib.sol", "filename_short": "src/libraries/MerkleLib.sol", "is_dependency": false, "lines": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57], "starting_column": 1, "ending_column": 2}}, "signature": "calculateRoot(bytes32[],uint256,bytes32)"}}, {"type": "node", "name": "(route & (1 << i)) == 0", "source_mapping": {"start": 1371, "length": 23, "filename_relative": "src/libraries/MerkleLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/MerkleLib.sol", "filename_short": "src/libraries/MerkleLib.sol", "is_dependency": false, "lines": [38], "starting_column": 17, "ending_column": 40}, "type_specific_fields": {"parent": {"type": "function", "name": "calculateRoot", "source_mapping": {"start": 987, "length": 872, "filename_relative": "src/libraries/MerkleLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/MerkleLib.sol", "filename_short": "src/libraries/MerkleLib.sol", "is_dependency": false, "lines": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "MerkleLib", "source_mapping": {"start": 254, "length": 1607, "filename_relative": "src/libraries/MerkleLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/MerkleLib.sol", "filename_short": "src/libraries/MerkleLib.sol", "is_dependency": false, "lines": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57], "starting_column": 1, "ending_column": 2}}, "signature": "calculateRoot(bytes32[],uint256,bytes32)"}}}}], "description": "MerkleLib.calculateRoot(bytes32[],uint256,bytes32) (src/libraries/MerkleLib.sol#28-56) contains an incorrect shift operation: (route & (1 << i)) == 0 (src/libraries/MerkleLib.sol#38)\n", "markdown": "[MerkleLib.calculateRoot(bytes32[],uint256,bytes32)](src/libraries/MerkleLib.sol#L28-L56) contains an incorrect shift operation: [(route & (1 << i)) == 0](src/libraries/MerkleLib.sol#L38)\n", "first_markdown_element": "src/libraries/MerkleLib.sol#L28-L56", "id": "5c3db261bcf096a853ed1cbf065868696b577e437b35616c25ee3da2af6bc0d7", "check": "incorrect-shift", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "confirmPeriodBlocks", "source_mapping": {"start": 848, "length": 33, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [30], "starting_column": 5, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "_validatorIsAfk", "source_mapping": {"start": 1426, "length": 349, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [47, 48, 49, 50, 51, 52, 53, 54], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "_validatorIsAfk()"}}, {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 20210, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}, {"type": "function", "name": "addStaker", "source_mapping": {"start": 16226, "length": 666, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "addStaker(uint64,address)"}}, {"type": "function", "name": "createNewNode", "source_mapping": {"start": 20652, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}], "description": "RollupCore.confirmPeriodBlocks (src/rollup/RollupCore.sol#30) is never initialized. It is used in:\n\t- AbsRollupUserLogic._validatorIsAfk() (src/rollup/RollupUserLogic.sol#47-54)\n\t- AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#477-523)\n\t- RollupCore.addStaker(uint64,address) (src/rollup/RollupCore.sol#449-465)\n\t- RollupCore.createNewNode(Assertion,uint64,uint256,bytes32) (src/rollup/RollupCore.sol#563-677)\n", "markdown": "[RollupCore.confirmPeriodBlocks](src/rollup/RollupCore.sol#L30) is never initialized. It is used in:\n\t- [AbsRollupUserLogic._validatorIsAfk()](src/rollup/RollupUserLogic.sol#L47-L54)\n\t- [AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L477-L523)\n\t- [RollupCore.addStaker(uint64,address)](src/rollup/RollupCore.sol#L449-L465)\n\t- [RollupCore.createNewNode(Assertion,uint64,uint256,bytes32)](src/rollup/RollupCore.sol#L563-L677)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L30", "id": "a4b24bce5aba1839e99647d1a79bb6ee736796ffa0b26da1ff6de3bf0cad25a2", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "extraChallengeTimeBlocks", "source_mapping": {"start": 887, "length": 38, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [31], "starting_column": 5, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "createChallenge", "source_mapping": {"start": 12264, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}], "description": "RollupCore.extraChallengeTimeBlocks (src/rollup/RollupCore.sol#31) is never initialized. It is used in:\n\t- AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2]) (src/rollup/RollupUserLogic.sol#291-364)\n", "markdown": "[RollupCore.extraChallengeTimeBlocks](src/rollup/RollupCore.sol#L31) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])](src/rollup/RollupUserLogic.sol#L291-L364)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L31", "id": "da3953abca5cd200b13fe48850b6aa7652681e329be2738fada97e811ccf823c", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "baseStake", "source_mapping": {"start": 959, "length": 24, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [33], "starting_column": 5, "ending_column": 29}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 20210, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}], "description": "RollupCore.baseStake (src/rollup/RollupCore.sol#33) is never initialized. It is used in:\n\t- AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#477-523)\n", "markdown": "[RollupCore.baseStake](src/rollup/RollupCore.sol#L33) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L477-L523)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L33", "id": "e38524abb8244a635c7bb2fbd1c2e3be4f6f4c45b66589d5c431018eaec19736", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "wasmModuleRoot", "source_mapping": {"start": 989, "length": 29, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [34], "starting_column": 5, "ending_column": 34}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "createNewNode", "source_mapping": {"start": 20652, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}], "description": "RollupCore.wasmModuleRoot (src/rollup/RollupCore.sol#34) is never initialized. It is used in:\n\t- RollupCore.createNewNode(Assertion,uint64,uint256,bytes32) (src/rollup/RollupCore.sol#563-677)\n", "markdown": "[RollupCore.wasmModuleRoot](src/rollup/RollupCore.sol#L34) is never initialized. It is used in:\n\t- [RollupCore.createNewNode(Assertion,uint64,uint256,bytes32)](src/rollup/RollupCore.sol#L563-L677)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L34", "id": "ba1b0a9663907f65e34f85d9522781abdfd536250f5ca9c3ce00e5d5fd99e0e5", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "bridge", "source_mapping": {"start": 1054, "length": 21, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [37], "starting_column": 5, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "createNewNode", "source_mapping": {"start": 20652, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}], "description": "RollupCore.bridge (src/rollup/RollupCore.sol#37) is never initialized. It is used in:\n\t- RollupCore.createNewNode(Assertion,uint64,uint256,bytes32) (src/rollup/RollupCore.sol#563-677)\n", "markdown": "[RollupCore.bridge](src/rollup/RollupCore.sol#L37) is never initialized. It is used in:\n\t- [RollupCore.createNewNode(Assertion,uint64,uint256,bytes32)](src/rollup/RollupCore.sol#L563-L677)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L37", "id": "083aba2c7a6498e3f6b62bd57041243e85867ce1e7deb7e73af230c8a3fda57c", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "outbox", "source_mapping": {"start": 1081, "length": 21, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [38], "starting_column": 5, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "confirmNode", "source_mapping": {"start": 10760, "length": 573, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "confirmNode(uint64,bytes32,bytes32)"}}], "description": "RollupCore.outbox (src/rollup/RollupCore.sol#38) is never initialized. It is used in:\n\t- RollupCore.confirmNode(uint64,bytes32,bytes32) (src/rollup/RollupCore.sol#306-322)\n", "markdown": "[RollupCore.outbox](src/rollup/RollupCore.sol#L38) is never initialized. It is used in:\n\t- [RollupCore.confirmNode(uint64,bytes32,bytes32)](src/rollup/RollupCore.sol#L306-L322)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L38", "id": "0e386868f4529a31d9469b3b0f8148977860a53590d8f94171666883bbbe4c3d", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "challengeManager", "source_mapping": {"start": 1198, "length": 50, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [41], "starting_column": 5, "ending_column": 55}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "createChallengeHelper", "source_mapping": {"start": 15401, "length": 672, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "createChallengeHelper(address[2],MachineStatus[2],GlobalState[2],uint64,bytes32[2],uint256,uint256)"}}, {"type": "function", "name": "completeChallenge", "source_mapping": {"start": 16300, "length": 484, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [393, 394, 395, 396, 397, 398, 399, 400, 401, 402], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "completeChallenge(uint256,address,address)"}}], "description": "RollupCore.challengeManager (src/rollup/RollupCore.sol#41) is never initialized. It is used in:\n\t- AbsRollupUserLogic.createChallengeHelper(address[2],MachineStatus[2],GlobalState[2],uint64,bytes32[2],uint256,uint256) (src/rollup/RollupUserLogic.sol#366-386)\n\t- AbsRollupUserLogic.completeChallenge(uint256,address,address) (src/rollup/RollupUserLogic.sol#393-402)\n", "markdown": "[RollupCore.challengeManager](src/rollup/RollupCore.sol#L41) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.createChallengeHelper(address[2],MachineStatus[2],GlobalState[2],uint64,bytes32[2],uint256,uint256)](src/rollup/RollupUserLogic.sol#L366-L386)\n\t- [AbsRollupUserLogic.completeChallenge(uint256,address,address)](src/rollup/RollupUserLogic.sol#L393-L402)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L41", "id": "22c612a6037a18832e2adecba9cb92ae47a8af1b6ad06cd807e2930e95704f7f", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "loserStakeEscrow", "source_mapping": {"start": 1485, "length": 31, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [48], "starting_column": 5, "ending_column": 36}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "completeChallengeImpl", "source_mapping": {"start": 16790, "length": 1104, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "completeChallengeImpl(address,address)"}}], "description": "RollupCore.loserStakeEscrow (src/rollup/RollupCore.sol#48) is never initialized. It is used in:\n\t- AbsRollupUserLogic.completeChallengeImpl(address,address) (src/rollup/RollupUserLogic.sol#404-423)\n", "markdown": "[RollupCore.loserStakeEscrow](src/rollup/RollupCore.sol#L48) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.completeChallengeImpl(address,address)](src/rollup/RollupUserLogic.sol#L404-L423)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L48", "id": "c7bcdadad2017983801efa1f09090e62d03f763f4327a3ff8eae213d33849120", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "stakeToken", "source_mapping": {"start": 1522, "length": 25, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [49], "starting_column": 5, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "isERC20Enabled", "source_mapping": {"start": 2244, "length": 110, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [68, 69, 70], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "isERC20Enabled()"}}], "description": "RollupCore.stakeToken (src/rollup/RollupCore.sol#49) is never initialized. It is used in:\n\t- AbsRollupUserLogic.isERC20Enabled() (src/rollup/RollupUserLogic.sol#68-70)\n", "markdown": "[RollupCore.stakeToken](src/rollup/RollupCore.sol#L49) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.isERC20Enabled()](src/rollup/RollupUserLogic.sol#L68-L70)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L49", "id": "762ea8af9375f2dee07c120ca7a44b367b72fbd357f74ed8397e8540a17d87b6", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "minimumAssertionPeriod", "source_mapping": {"start": 1553, "length": 37, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [50], "starting_column": 5, "ending_column": 42}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "stakeOnNewNode", "source_mapping": {"start": 7704, "length": 1684, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnNewNode(Assertion,bytes32,uint256)"}}], "description": "RollupCore.minimumAssertionPeriod (src/rollup/RollupCore.sol#50) is never initialized. It is used in:\n\t- AbsRollupUserLogic.stakeOnNewNode(Assertion,bytes32,uint256) (src/rollup/RollupUserLogic.sol#198-233)\n", "markdown": "[RollupCore.minimumAssertionPeriod](src/rollup/RollupCore.sol#L50) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.stakeOnNewNode(Assertion,bytes32,uint256)](src/rollup/RollupUserLogic.sol#L198-L233)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L50", "id": "01fe9c1889403593f4723665fd7724b4e31b63dd3689c5816cb6d147d16dbf42", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "isValidator", "source_mapping": {"start": 1597, "length": 43, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [52], "starting_column": 5, "ending_column": 48}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}], "description": "RollupCore.isValidator (src/rollup/RollupCore.sol#52) is never initialized. It is used in:\n", "markdown": "[RollupCore.isValidator](src/rollup/RollupCore.sol#L52) is never initialized. It is used in:\n", "first_markdown_element": "src/rollup/RollupCore.sol#L52", "id": "f316200e22d3febd4d78fe211de5d864b1b65169f67e03191ea884e8b60055ae", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "stakeToken", "source_mapping": {"start": 1522, "length": 25, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [49], "starting_column": 5, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "isERC20Enabled", "source_mapping": {"start": 2244, "length": 110, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [68, 69, 70], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "isERC20Enabled()"}}, {"type": "function", "name": "withdrawStakerFunds", "source_mapping": {"start": 30568, "length": 400, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ERC20RollupUserLogic", "source_mapping": {"start": 28020, "length": 3167, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769], "starting_column": 1, "ending_column": 2}}, "signature": "withdrawStakerFunds()"}}, {"type": "function", "name": "receiveTokens", "source_mapping": {"start": 30974, "length": 211, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [763, 764, 765, 766, 767, 768], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ERC20RollupUserLogic", "source_mapping": {"start": 28020, "length": 3167, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769], "starting_column": 1, "ending_column": 2}}, "signature": "receiveTokens(uint256)"}}], "description": "RollupCore.stakeToken (src/rollup/RollupCore.sol#49) is never initialized. It is used in:\n\t- AbsRollupUserLogic.isERC20Enabled() (src/rollup/RollupUserLogic.sol#68-70)\n\t- ERC20RollupUserLogic.withdrawStakerFunds() (src/rollup/RollupUserLogic.sol#750-761)\n\t- ERC20RollupUserLogic.receiveTokens(uint256) (src/rollup/RollupUserLogic.sol#763-768)\n", "markdown": "[RollupCore.stakeToken](src/rollup/RollupCore.sol#L49) is never initialized. It is used in:\n\t- [AbsRollupUserLogic.isERC20Enabled()](src/rollup/RollupUserLogic.sol#L68-L70)\n\t- [ERC20RollupUserLogic.withdrawStakerFunds()](src/rollup/RollupUserLogic.sol#L750-L761)\n\t- [ERC20RollupUserLogic.receiveTokens(uint256)](src/rollup/RollupUserLogic.sol#L763-L768)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L49", "id": "388304453678fb7cb187225ae4a8eef1f46c80d072185688bad31640b221fb6d", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "function", "name": "extractChallengeSegment", "source_mapping": {"start": 3040, "length": 682, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ChallengeLib", "source_mapping": {"start": 272, "length": 4325, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "starting_column": 1, "ending_column": 2}}, "signature": "extractChallengeSegment(ChallengeLib.SegmentSelection)"}}, {"type": "node", "name": "segmentLength = selection.oldSegmentsLength / oldChallengeDegree", "source_mapping": {"start": 3287, "length": 64, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [102], "starting_column": 9, "ending_column": 73}, "type_specific_fields": {"parent": {"type": "function", "name": "extractChallengeSegment", "source_mapping": {"start": 3040, "length": 682, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ChallengeLib", "source_mapping": {"start": 272, "length": 4325, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "starting_column": 1, "ending_column": 2}}, "signature": "extractChallengeSegment(ChallengeLib.SegmentSelection)"}}}}, {"type": "node", "name": "segmentStart = selection.oldSegmentsStart + segmentLength * selection.challengePosition", "source_mapping": {"start": 3460, "length": 87, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [104], "starting_column": 9, "ending_column": 96}, "type_specific_fields": {"parent": {"type": "function", "name": "extractChallengeSegment", "source_mapping": {"start": 3040, "length": 682, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ChallengeLib", "source_mapping": {"start": 272, "length": 4325, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "starting_column": 1, "ending_column": 2}}, "signature": "extractChallengeSegment(ChallengeLib.SegmentSelection)"}}}}], "description": "ChallengeLib.extractChallengeSegment(ChallengeLib.SegmentSelection) (src/challenge/ChallengeLib.sol#96-108) performs a multiplication on the result of a division:\n\t- segmentLength = selection.oldSegmentsLength / oldChallengeDegree (src/challenge/ChallengeLib.sol#102)\n\t- segmentStart = selection.oldSegmentsStart + segmentLength * selection.challengePosition (src/challenge/ChallengeLib.sol#104)\n", "markdown": "[ChallengeLib.extractChallengeSegment(ChallengeLib.SegmentSelection)](src/challenge/ChallengeLib.sol#L96-L108) performs a multiplication on the result of a division:\n\t- [segmentLength = selection.oldSegmentsLength / oldChallengeDegree](src/challenge/ChallengeLib.sol#L102)\n\t- [segmentStart = selection.oldSegmentsStart + segmentLength * selection.challengePosition](src/challenge/ChallengeLib.sol#L104)\n", "first_markdown_element": "src/challenge/ChallengeLib.sol#L96-L108", "id": "e1c80d5388c10fc3c7985b252a3988308fb524570c5772733ff6da1f68ae3665", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4302, "length": 5772, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "rootOfUnityPower = (1 << 32) / fieldElementsPerBlob", "source_mapping": {"start": 9080, "length": 59, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [224], "starting_column": 17, "ending_column": 76}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4302, "length": 5772, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "rootOfUnityPower *= bitReversedIndex", "source_mapping": {"start": 9307, "length": 36, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [227], "starting_column": 17, "ending_column": 53}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4302, "length": 5772, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#123-245) performs a multiplication on the result of a division:\n\t- rootOfUnityPower = (1 << 32) / fieldElementsPerBlob (src/osp/OneStepProverHostIo.sol#224)\n\t- rootOfUnityPower *= bitReversedIndex (src/osp/OneStepProverHostIo.sol#227)\n", "markdown": "[OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L123-L245) performs a multiplication on the result of a division:\n\t- [rootOfUnityPower = (1 << 32) / fieldElementsPerBlob](src/osp/OneStepProverHostIo.sol#L224)\n\t- [rootOfUnityPower *= bitReversedIndex](src/osp/OneStepProverHostIo.sol#L227)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L123-L245", "id": "544b092c0dd6ff4838cb1cbaa7af3a7e9ba4011548b519524ea1c0f49488ba8a", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 20210, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}, {"type": "node", "name": "multiplier = withNumerator / denominators[periodsPassed % 10]", "source_mapping": {"start": 21553, "length": 69, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [518], "starting_column": 9, "ending_column": 78}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 20210, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}, {"type": "node", "name": "baseStake * multiplier", "source_mapping": {"start": 21701, "length": 29, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [522], "starting_column": 9, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 20210, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}], "description": "AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#477-523) performs a multiplication on the result of a division:\n\t- multiplier = withNumerator / denominators[periodsPassed % 10] (src/rollup/RollupUserLogic.sol#518)\n\t- baseStake * multiplier (src/rollup/RollupUserLogic.sol#522)\n", "markdown": "[AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L477-L523) performs a multiplication on the result of a division:\n\t- [multiplier = withNumerator / denominators[periodsPassed % 10]](src/rollup/RollupUserLogic.sol#L518)\n\t- [baseStake * multiplier](src/rollup/RollupUserLogic.sol#L522)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L477-L523", "id": "d8acf03a6b7c6bb0b8a091fbcc3c5657b15d7180c1edc798c1b2b66b27895d5d", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "onGasSpent", "source_mapping": {"start": 5994, "length": 3002, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefunder", "source_mapping": {"start": 916, "length": 8082, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257], "starting_column": 1, "ending_column": 2}}, "signature": "onGasSpent(address,uint256,uint256)"}}, {"type": "node", "name": "ownBalance == 0", "source_mapping": {"start": 6260, "length": 15, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [183], "starting_column": 13, "ending_column": 28}, "type_specific_fields": {"parent": {"type": "function", "name": "onGasSpent", "source_mapping": {"start": 5994, "length": 3002, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefunder", "source_mapping": {"start": 916, "length": 8082, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257], "starting_column": 1, "ending_column": 2}}, "signature": "onGasSpent(address,uint256,uint256)"}}}}], "description": "GasRefunder.onGasSpent(address,uint256,uint256) (src/bridge/GasRefunder.sol#174-256) uses a dangerous strict equality:\n\t- ownBalance == 0 (src/bridge/GasRefunder.sol#183)\n", "markdown": "[GasRefunder.onGasSpent(address,uint256,uint256)](src/bridge/GasRefunder.sol#L174-L256) uses a dangerous strict equality:\n\t- [ownBalance == 0](src/bridge/GasRefunder.sol#L183)\n", "first_markdown_element": "src/bridge/GasRefunder.sol#L174-L256", "id": "7130559f3bef7fa36dc1a06a74ba5036fede4a8f9a9b7aa15356ff38ae92691a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "getKeysetCreationBlock", "source_mapping": {"start": 30911, "length": 262, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [800, 801, 802, 803, 804], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1909, "length": 29266, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805], "starting_column": 1, "ending_column": 2}}, "signature": "getKeysetCreationBlock(bytes32)"}}, {"type": "node", "name": "ksInfo.creationBlock == 0", "source_mapping": {"start": 31066, "length": 25, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [802], "starting_column": 13, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "getKeysetCreationBlock", "source_mapping": {"start": 30911, "length": 262, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [800, 801, 802, 803, 804], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1909, "length": 29266, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805], "starting_column": 1, "ending_column": 2}}, "signature": "getKeysetCreationBlock(bytes32)"}}}}], "description": "SequencerInbox.getKeysetCreationBlock(bytes32) (src/bridge/SequencerInbox.sol#800-804) uses a dangerous strict equality:\n\t- ksInfo.creationBlock == 0 (src/bridge/SequencerInbox.sol#802)\n", "markdown": "[SequencerInbox.getKeysetCreationBlock(bytes32)](src/bridge/SequencerInbox.sol#L800-L804) uses a dangerous strict equality:\n\t- [ksInfo.creationBlock == 0](src/bridge/SequencerInbox.sol#L802)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L800-L804", "id": "8d08f988c853ddc93c73c73c2ffb4eab98ae44f427249e22931a28dd9e0d9616", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "createNewNode", "source_mapping": {"start": 20652, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}, {"type": "node", "name": "require(bool,string)(RollupLib.stateHash(assertion.beforeState,prevNodeInboxMaxCount) == memoryFrame.prevNode.stateHash,PREV_STATE_HASH)", "source_mapping": {"start": 21393, "length": 193, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [582, 583, 584, 585, 586], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "createNewNode", "source_mapping": {"start": 20652, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}}}], "description": "RollupCore.createNewNode(Assertion,uint64,uint256,bytes32) (src/rollup/RollupCore.sol#563-677) uses a dangerous strict equality:\n\t- require(bool,string)(RollupLib.stateHash(assertion.beforeState,prevNodeInboxMaxCount) == memoryFrame.prevNode.stateHash,PREV_STATE_HASH) (src/rollup/RollupCore.sol#582-586)\n", "markdown": "[RollupCore.createNewNode(Assertion,uint64,uint256,bytes32)](src/rollup/RollupCore.sol#L563-L677) uses a dangerous strict equality:\n\t- [require(bool,string)(RollupLib.stateHash(assertion.beforeState,prevNodeInboxMaxCount) == memoryFrame.prevNode.stateHash,PREV_STATE_HASH)](src/rollup/RollupCore.sol#L582-L586)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L563-L677", "id": "d127dddc177369c36ad1c5bef7eb43c1a61fc683b55406bc72a59dc5596e864b", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "createNewNode", "source_mapping": {"start": 20652, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}, {"type": "node", "name": "require(bool,string)(newNodeHash == expectedNodeHash || expectedNodeHash == bytes32(0),UNEXPECTED_NODE_HASH)", "source_mapping": {"start": 23847, "length": 144, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [635, 636, 637, 638], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "createNewNode", "source_mapping": {"start": 20652, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}}}], "description": "RollupCore.createNewNode(Assertion,uint64,uint256,bytes32) (src/rollup/RollupCore.sol#563-677) uses a dangerous strict equality:\n\t- require(bool,string)(newNodeHash == expectedNodeHash || expectedNodeHash == bytes32(0),UNEXPECTED_NODE_HASH) (src/rollup/RollupCore.sol#635-638)\n", "markdown": "[RollupCore.createNewNode(Assertion,uint64,uint256,bytes32)](src/rollup/RollupCore.sol#L563-L677) uses a dangerous strict equality:\n\t- [require(bool,string)(newNodeHash == expectedNodeHash || expectedNodeHash == bytes32(0),UNEXPECTED_NODE_HASH)](src/rollup/RollupCore.sol#L635-L638)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L563-L677", "id": "dfac2423a21baf2a37b1dd8b95efc0128475cfb15a4f40d0cc542e69ff413c79", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "_validatorIsAfk", "source_mapping": {"start": 1426, "length": 349, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [47, 48, 49, 50, 51, 52, 53, 54], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "_validatorIsAfk()"}}, {"type": "node", "name": "latestNode.createdAtBlock == 0", "source_mapping": {"start": 1566, "length": 30, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [49], "starting_column": 13, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "function", "name": "_validatorIsAfk", "source_mapping": {"start": 1426, "length": 349, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [47, 48, 49, 50, 51, 52, 53, 54], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "_validatorIsAfk()"}}}}], "description": "AbsRollupUserLogic._validatorIsAfk() (src/rollup/RollupUserLogic.sol#47-54) uses a dangerous strict equality:\n\t- latestNode.createdAtBlock == 0 (src/rollup/RollupUserLogic.sol#49)\n", "markdown": "[AbsRollupUserLogic._validatorIsAfk()](src/rollup/RollupUserLogic.sol#L47-L54) uses a dangerous strict equality:\n\t- [latestNode.createdAtBlock == 0](src/rollup/RollupUserLogic.sol#L49)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L47-L54", "id": "27da8dd2563854302dbb23b92013f4ff6bae23b8f09a7843b7bd073905bc04e7", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 20210, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}, {"type": "node", "name": "multiplier == 0", "source_mapping": {"start": 21636, "length": 15, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [519], "starting_column": 13, "ending_column": 28}, "type_specific_fields": {"parent": {"type": "function", "name": "currentRequiredStake", "source_mapping": {"start": 20210, "length": 1527, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "currentRequiredStake(uint256,uint64,uint256)"}}}}], "description": "AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256) (src/rollup/RollupUserLogic.sol#477-523) uses a dangerous strict equality:\n\t- multiplier == 0 (src/rollup/RollupUserLogic.sol#519)\n", "markdown": "[AbsRollupUserLogic.currentRequiredStake(uint256,uint64,uint256)](src/rollup/RollupUserLogic.sol#L477-L523) uses a dangerous strict equality:\n\t- [multiplier == 0](src/rollup/RollupUserLogic.sol#L519)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L477-L523", "id": "46c10604345612b1526f352cacc87cc039daedff5beba654f8f07a5fdc228a45", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "requireUnchallengedStaker", "source_mapping": {"start": 25419, "length": 212, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [616, 617, 618, 619], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "requireUnchallengedStaker(address)"}}, {"type": "node", "name": "require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL)", "source_mapping": {"start": 25556, "length": 68, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [618], "starting_column": 9, "ending_column": 77}, "type_specific_fields": {"parent": {"type": "function", "name": "requireUnchallengedStaker", "source_mapping": {"start": 25419, "length": 212, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [616, 617, 618, 619], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "requireUnchallengedStaker(address)"}}}}], "description": "AbsRollupUserLogic.requireUnchallengedStaker(address) (src/rollup/RollupUserLogic.sol#616-619) uses a dangerous strict equality:\n\t- require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL) (src/rollup/RollupUserLogic.sol#618)\n", "markdown": "[AbsRollupUserLogic.requireUnchallengedStaker(address)](src/rollup/RollupUserLogic.sol#L616-L619) uses a dangerous strict equality:\n\t- [require(bool,string)(currentChallenge(stakerAddress) == NO_CHAL_INDEX,IN_CHAL)](src/rollup/RollupUserLogic.sol#L618)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L616-L619", "id": "1e95eacfdcf4026b8e9c94f14922ed3f0a0ec1b366b7d354316a8dbcdb09add8", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "stakeOnExistingNode", "source_mapping": {"start": 6908, "length": 583, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnExistingNode(uint64,bytes32)"}}, {"type": "node", "name": "require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV)", "source_mapping": {"start": 7370, "length": 72, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [189], "starting_column": 9, "ending_column": 81}, "type_specific_fields": {"parent": {"type": "function", "name": "stakeOnExistingNode", "source_mapping": {"start": 6908, "length": 583, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnExistingNode(uint64,bytes32)"}}}}], "description": "AbsRollupUserLogic.stakeOnExistingNode(uint64,bytes32) (src/rollup/RollupUserLogic.sol#176-191) uses a dangerous strict equality:\n\t- require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV) (src/rollup/RollupUserLogic.sol#189)\n", "markdown": "[AbsRollupUserLogic.stakeOnExistingNode(uint64,bytes32)](src/rollup/RollupUserLogic.sol#L176-L191) uses a dangerous strict equality:\n\t- [require(bool,string)(latestStakedNode(msg.sender) == node.prevNum,NOT_STAKED_PREV)](src/rollup/RollupUserLogic.sol#L189)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L176-L191", "id": "4507b4ce50a7c39ed1ba1cdbee0a87e257d071a80d56ccf457734f2c8f166b64", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 26211, "length": 1103, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1909, "length": 29266, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}, {"type": "node", "name": "(seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount)", "source_mapping": {"start": 26792, "length": 207, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [692, 693, 694, 695, 696, 697], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 26211, "length": 1103, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1909, "length": 29266, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "totalDelayedMessagesRead = afterDelayedMessagesRead", "source_mapping": {"start": 27010, "length": 51, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [699], "starting_column": 9, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 26211, "length": 1103, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1909, "length": 29266, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "totalDelayedMessagesRead"}}], "description": "Reentrancy in SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#674-705):\n\tExternal calls:\n\t- (seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount) (src/bridge/SequencerInbox.sol#692-697)\n\tState variables written after the call(s):\n\t- totalDelayedMessagesRead = afterDelayedMessagesRead (src/bridge/SequencerInbox.sol#699)\n\tSequencerInbox.totalDelayedMessagesRead (src/bridge/SequencerInbox.sol#58) can be used in cross function reentrancies:\n\t- SequencerInbox.addSequencerL2Batch(uint256,bytes,uint256,IGasRefunder,uint256,uint256) (src/bridge/SequencerInbox.sol#468-519)\n\t- SequencerInbox.addSequencerL2BatchFromBlobs(uint256,uint256,IGasRefunder,uint256,uint256) (src/bridge/SequencerInbox.sol#407-466)\n\t- SequencerInbox.addSequencerL2BatchFromOrigin(uint256,bytes,uint256,IGasRefunder,uint256,uint256) (src/bridge/SequencerInbox.sol#355-405)\n\t- SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#674-705)\n\t- SequencerInbox.forceInclusion(uint256,uint8,uint64[2],uint256,address,bytes32) (src/bridge/SequencerInbox.sol#284-343)\n\t- SequencerInbox.totalDelayedMessagesRead (src/bridge/SequencerInbox.sol#58)\n", "markdown": "Reentrancy in [SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L674-L705):\n\tExternal calls:\n\t- [(seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount)](src/bridge/SequencerInbox.sol#L692-L697)\n\tState variables written after the call(s):\n\t- [totalDelayedMessagesRead = afterDelayedMessagesRead](src/bridge/SequencerInbox.sol#L699)\n\t[SequencerInbox.totalDelayedMessagesRead](src/bridge/SequencerInbox.sol#L58) can be used in cross function reentrancies:\n\t- [SequencerInbox.addSequencerL2Batch(uint256,bytes,uint256,IGasRefunder,uint256,uint256)](src/bridge/SequencerInbox.sol#L468-L519)\n\t- [SequencerInbox.addSequencerL2BatchFromBlobs(uint256,uint256,IGasRefunder,uint256,uint256)](src/bridge/SequencerInbox.sol#L407-L466)\n\t- [SequencerInbox.addSequencerL2BatchFromOrigin(uint256,bytes,uint256,IGasRefunder,uint256,uint256)](src/bridge/SequencerInbox.sol#L355-L405)\n\t- [SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L674-L705)\n\t- [SequencerInbox.forceInclusion(uint256,uint8,uint64[2],uint256,address,bytes32)](src/bridge/SequencerInbox.sol#L284-L343)\n\t- [SequencerInbox.totalDelayedMessagesRead](src/bridge/SequencerInbox.sol#L58)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L674-L705", "id": "b38d9bf0df554a08cf1b8bb6d468b87dd156690f340b399262fff373086c5825", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createChallenge", "source_mapping": {"start": 12264, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}, {"type": "node", "name": "challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME)", "source_mapping": {"start": 14807, "length": 398, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [350, 351, 352, 353, 354, 355, 356, 357, 358, 359], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallenge", "source_mapping": {"start": 12264, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft)", "source_mapping": {"start": 15749, "length": 317, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385], "starting_column": 9, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallengeHelper", "source_mapping": {"start": 15401, "length": 672, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "createChallengeHelper(address[2],MachineStatus[2],GlobalState[2],uint64,bytes32[2],uint256,uint256)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "challengeStarted(stakers[0],stakers[1],challengeIndex)", "source_mapping": {"start": 15241, "length": 56, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [361], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "createChallenge", "source_mapping": {"start": 12264, "length": 3131, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsRollupUserLogic", "source_mapping": {"start": 501, "length": 25132, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "_stakerMap[staker1].currentChallenge = challenge", "source_mapping": {"start": 13576, "length": 48, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [383], "starting_column": 9, "ending_column": 57}, "type_specific_fields": {"parent": {"type": "function", "name": "challengeStarted", "source_mapping": {"start": 13449, "length": 240, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [378, 379, 380, 381, 382, 383, 384, 385], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "challengeStarted(address,address,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "_stakerMap[staker2].currentChallenge = challenge", "source_mapping": {"start": 13634, "length": 48, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [384], "starting_column": 9, "ending_column": 57}, "type_specific_fields": {"parent": {"type": "function", "name": "challengeStarted", "source_mapping": {"start": 13449, "length": 240, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [378, 379, 380, 381, 382, 383, 384, 385], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "challengeStarted(address,address,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}], "description": "Reentrancy in AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2]) (src/rollup/RollupUserLogic.sol#291-364):\n\tExternal calls:\n\t- challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME) (src/rollup/RollupUserLogic.sol#350-359)\n\t\t- challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft) (src/rollup/RollupUserLogic.sol#375-385)\n\tState variables written after the call(s):\n\t- challengeStarted(stakers[0],stakers[1],challengeIndex) (src/rollup/RollupUserLogic.sol#361)\n\t\t- _stakerMap[staker1].currentChallenge = challenge (src/rollup/RollupCore.sol#383)\n\t\t- _stakerMap[staker2].currentChallenge = challenge (src/rollup/RollupCore.sol#384)\n\tRollupCore._stakerMap (src/rollup/RollupCore.sol#68) can be used in cross function reentrancies:\n\t- RollupCore._stakerMap (src/rollup/RollupCore.sol#68)\n\t- RollupCore.amountStaked(address) (src/rollup/RollupCore.sol#185-187)\n\t- RollupCore.challengeStarted(address,address,uint64) (src/rollup/RollupCore.sol#378-385)\n\t- RollupCore.clearChallenge(address) (src/rollup/RollupCore.sol#367-370)\n\t- RollupCore.currentChallenge(address) (src/rollup/RollupCore.sol#176-178)\n\t- RollupCore.deleteStaker(address) (src/rollup/RollupCore.sol#542-550)\n\t- RollupCore.getStaker(address) (src/rollup/RollupCore.sol#194-196)\n\t- RollupCore.inChallenge(address,address) (src/rollup/RollupCore.sol#350-361)\n\t- RollupCore.increaseStakeBy(address,uint256) (src/rollup/RollupCore.sol#392-398)\n\t- RollupCore.isStaked(address) (src/rollup/RollupCore.sol#148-150)\n\t- RollupCore.isStakedOnLatestConfirmed(address) (src/rollup/RollupCore.sol#158-160)\n\t- RollupCore.latestStakedNode(address) (src/rollup/RollupCore.sol#167-169)\n\t- RollupCore.reduceStakeTo(address,uint256) (src/rollup/RollupCore.sol#406-415)\n\t- RollupCore.stakeOnNode(address,uint64) (src/rollup/RollupCore.sol#507-511)\n\t- RollupCore.turnIntoZombie(address) (src/rollup/RollupCore.sol#421-425)\n\t- RollupCore.withdrawStaker(address) (src/rollup/RollupCore.sol#488-500)\n", "markdown": "Reentrancy in [AbsRollupUserLogic.createChallenge(address[2],uint64[2],MachineStatus[2],GlobalState[2],uint64,bytes32,uint256[2],bytes32[2])](src/rollup/RollupUserLogic.sol#L291-L364):\n\tExternal calls:\n\t- [challengeIndex = createChallengeHelper(stakers,machineStatuses,globalStates,numBlocks,wasmModuleRoots,(commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME,(commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME)](src/rollup/RollupUserLogic.sol#L350-L359)\n\t\t- [challengeManager.createChallenge(wasmModuleRoots[0],machineStatuses,globalStates,numBlocks,stakers[0],stakers[1],asserterTimeLeft,challengerTimeLeft)](src/rollup/RollupUserLogic.sol#L375-L385)\n\tState variables written after the call(s):\n\t- [challengeStarted(stakers[0],stakers[1],challengeIndex)](src/rollup/RollupUserLogic.sol#L361)\n\t\t- [_stakerMap[staker1].currentChallenge = challenge](src/rollup/RollupCore.sol#L383)\n\t\t- [_stakerMap[staker2].currentChallenge = challenge](src/rollup/RollupCore.sol#L384)\n\t[RollupCore._stakerMap](src/rollup/RollupCore.sol#L68) can be used in cross function reentrancies:\n\t- [RollupCore._stakerMap](src/rollup/RollupCore.sol#L68)\n\t- [RollupCore.amountStaked(address)](src/rollup/RollupCore.sol#L185-L187)\n\t- [RollupCore.challengeStarted(address,address,uint64)](src/rollup/RollupCore.sol#L378-L385)\n\t- [RollupCore.clearChallenge(address)](src/rollup/RollupCore.sol#L367-L370)\n\t- [RollupCore.currentChallenge(address)](src/rollup/RollupCore.sol#L176-L178)\n\t- [RollupCore.deleteStaker(address)](src/rollup/RollupCore.sol#L542-L550)\n\t- [RollupCore.getStaker(address)](src/rollup/RollupCore.sol#L194-L196)\n\t- [RollupCore.inChallenge(address,address)](src/rollup/RollupCore.sol#L350-L361)\n\t- [RollupCore.increaseStakeBy(address,uint256)](src/rollup/RollupCore.sol#L392-L398)\n\t- [RollupCore.isStaked(address)](src/rollup/RollupCore.sol#L148-L150)\n\t- [RollupCore.isStakedOnLatestConfirmed(address)](src/rollup/RollupCore.sol#L158-L160)\n\t- [RollupCore.latestStakedNode(address)](src/rollup/RollupCore.sol#L167-L169)\n\t- [RollupCore.reduceStakeTo(address,uint256)](src/rollup/RollupCore.sol#L406-L415)\n\t- [RollupCore.stakeOnNode(address,uint64)](src/rollup/RollupCore.sol#L507-L511)\n\t- [RollupCore.turnIntoZombie(address)](src/rollup/RollupCore.sol#L421-L425)\n\t- [RollupCore.withdrawStaker(address)](src/rollup/RollupCore.sol#L488-L500)\n", "first_markdown_element": "src/rollup/RollupUserLogic.sol#L291-L364", "id": "af65892a907a109b6f58d5895c29425a5794647abc20793593b6461989e07fb6", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7336, "length": 990, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 698, "length": 11504, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}, {"type": "node", "name": "executeBridgeCall(to,value,data)", "source_mapping": {"start": 8253, "length": 34, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [222], "starting_column": 9, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7336, "length": 990, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 698, "length": 11504, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "(success,returndata) = bridge.executeCall(to,value,data)", "source_mapping": {"start": 9954, "length": 77, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [275], "starting_column": 9, "ending_column": 86}, "type_specific_fields": {"parent": {"type": "function", "name": "executeBridgeCall", "source_mapping": {"start": 9832, "length": 594, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 698, "length": 11504, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326], "starting_column": 1, "ending_column": 2}}, "signature": "executeBridgeCall(address,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "context = prevContext", "source_mapping": {"start": 8298, "length": 21, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [224], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7336, "length": 990, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 698, "length": 11504, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "context"}}], "description": "Reentrancy in AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#196-225):\n\tExternal calls:\n\t- executeBridgeCall(to,value,data) (src/bridge/AbsOutbox.sol#222)\n\t\t- (success,returndata) = bridge.executeCall(to,value,data) (src/bridge/AbsOutbox.sol#275)\n\tState variables written after the call(s):\n\t- context = prevContext (src/bridge/AbsOutbox.sol#224)\n\tAbsOutbox.context (src/bridge/AbsOutbox.sol#51) can be used in cross function reentrancies:\n\t- AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#196-225)\n\t- AbsOutbox.initialize(IBridge) (src/bridge/AbsOutbox.sol#63-79)\n\t- AbsOutbox.l2ToL1Block() (src/bridge/AbsOutbox.sol#118-123)\n\t- AbsOutbox.l2ToL1EthBlock() (src/bridge/AbsOutbox.sol#126-131)\n\t- AbsOutbox.l2ToL1OutputId() (src/bridge/AbsOutbox.sol#147-152)\n\t- AbsOutbox.l2ToL1Sender() (src/bridge/AbsOutbox.sol#110-115)\n\t- AbsOutbox.l2ToL1Timestamp() (src/bridge/AbsOutbox.sol#134-139)\n\t- AbsOutbox.postUpgradeInit() (src/bridge/AbsOutbox.sol#81-92)\n", "markdown": "Reentrancy in [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L196-L225):\n\tExternal calls:\n\t- [executeBridgeCall(to,value,data)](src/bridge/AbsOutbox.sol#L222)\n\t\t- [(success,returndata) = bridge.executeCall(to,value,data)](src/bridge/AbsOutbox.sol#L275)\n\tState variables written after the call(s):\n\t- [context = prevContext](src/bridge/AbsOutbox.sol#L224)\n\t[AbsOutbox.context](src/bridge/AbsOutbox.sol#L51) can be used in cross function reentrancies:\n\t- [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L196-L225)\n\t- [AbsOutbox.initialize(IBridge)](src/bridge/AbsOutbox.sol#L63-L79)\n\t- [AbsOutbox.l2ToL1Block()](src/bridge/AbsOutbox.sol#L118-L123)\n\t- [AbsOutbox.l2ToL1EthBlock()](src/bridge/AbsOutbox.sol#L126-L131)\n\t- [AbsOutbox.l2ToL1OutputId()](src/bridge/AbsOutbox.sol#L147-L152)\n\t- [AbsOutbox.l2ToL1Sender()](src/bridge/AbsOutbox.sol#L110-L115)\n\t- [AbsOutbox.l2ToL1Timestamp()](src/bridge/AbsOutbox.sol#L134-L139)\n\t- [AbsOutbox.postUpgradeInit()](src/bridge/AbsOutbox.sol#L81-L92)\n", "first_markdown_element": "src/bridge/AbsOutbox.sol#L196-L225", "id": "426e61b097c321e642232d0d55da1f37bdf8bba9a4d0f425a61dc187192ef9ed", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "forceResolveChallenge", "source_mapping": {"start": 10412, "length": 631, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 590, "length": 14555, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382], "starting_column": 1, "ending_column": 2}}, "signature": "forceResolveChallenge(address[],address[])"}}, {"type": "node", "name": "challengeManager.clearChallenge(chall)", "source_mapping": {"start": 10950, "length": 38, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [271], "starting_column": 13, "ending_column": 51}, "type_specific_fields": {"parent": {"type": "function", "name": "forceResolveChallenge", "source_mapping": {"start": 10412, "length": 631, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 590, "length": 14555, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382], "starting_column": 1, "ending_column": 2}}, "signature": "forceResolveChallenge(address[],address[])"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "clearChallenge(stakerA[i])", "source_mapping": {"start": 10870, "length": 26, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [269], "starting_column": 13, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "forceResolveChallenge", "source_mapping": {"start": 10412, "length": 631, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 590, "length": 14555, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382], "starting_column": 1, "ending_column": 2}}, "signature": "forceResolveChallenge(address[],address[])"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "staker.currentChallenge = NO_CHAL_INDEX", "source_mapping": {"start": 13136, "length": 39, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [369], "starting_column": 9, "ending_column": 48}, "type_specific_fields": {"parent": {"type": "function", "name": "clearChallenge", "source_mapping": {"start": 13011, "length": 171, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [367, 368, 369, 370], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "clearChallenge(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "clearChallenge(stakerB[i])", "source_mapping": {"start": 10910, "length": 26, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [270], "starting_column": 13, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "forceResolveChallenge", "source_mapping": {"start": 10412, "length": 631, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 590, "length": 14555, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382], "starting_column": 1, "ending_column": 2}}, "signature": "forceResolveChallenge(address[],address[])"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}, {"type": "node", "name": "staker.currentChallenge = NO_CHAL_INDEX", "source_mapping": {"start": 13136, "length": 39, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [369], "starting_column": 9, "ending_column": 48}, "type_specific_fields": {"parent": {"type": "function", "name": "clearChallenge", "source_mapping": {"start": 13011, "length": 171, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [367, 368, 369, 370], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "clearChallenge(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "_stakerMap"}}], "description": "Reentrancy in RollupAdminLogic.forceResolveChallenge(address[],address[]) (src/rollup/RollupAdminLogic.sol#258-274):\n\tExternal calls:\n\t- challengeManager.clearChallenge(chall) (src/rollup/RollupAdminLogic.sol#271)\n\tState variables written after the call(s):\n\t- clearChallenge(stakerA[i]) (src/rollup/RollupAdminLogic.sol#269)\n\t\t- staker.currentChallenge = NO_CHAL_INDEX (src/rollup/RollupCore.sol#369)\n\tRollupCore._stakerMap (src/rollup/RollupCore.sol#68) can be used in cross function reentrancies:\n\t- RollupCore._stakerMap (src/rollup/RollupCore.sol#68)\n\t- RollupCore.amountStaked(address) (src/rollup/RollupCore.sol#185-187)\n\t- RollupCore.clearChallenge(address) (src/rollup/RollupCore.sol#367-370)\n\t- RollupCore.currentChallenge(address) (src/rollup/RollupCore.sol#176-178)\n\t- RollupCore.deleteStaker(address) (src/rollup/RollupCore.sol#542-550)\n\t- RollupAdminLogic.forceRefundStaker(address[]) (src/rollup/RollupAdminLogic.sol#276-284)\n\t- RollupCore.getStaker(address) (src/rollup/RollupCore.sol#194-196)\n\t- RollupCore.inChallenge(address,address) (src/rollup/RollupCore.sol#350-361)\n\t- RollupCore.isStaked(address) (src/rollup/RollupCore.sol#148-150)\n\t- RollupCore.isStakedOnLatestConfirmed(address) (src/rollup/RollupCore.sol#158-160)\n\t- RollupCore.latestStakedNode(address) (src/rollup/RollupCore.sol#167-169)\n\t- RollupCore.reduceStakeTo(address,uint256) (src/rollup/RollupCore.sol#406-415)\n\t- RollupCore.turnIntoZombie(address) (src/rollup/RollupCore.sol#421-425)\n\t- clearChallenge(stakerB[i]) (src/rollup/RollupAdminLogic.sol#270)\n\t\t- staker.currentChallenge = NO_CHAL_INDEX (src/rollup/RollupCore.sol#369)\n\tRollupCore._stakerMap (src/rollup/RollupCore.sol#68) can be used in cross function reentrancies:\n\t- RollupCore._stakerMap (src/rollup/RollupCore.sol#68)\n\t- RollupCore.amountStaked(address) (src/rollup/RollupCore.sol#185-187)\n\t- RollupCore.clearChallenge(address) (src/rollup/RollupCore.sol#367-370)\n\t- RollupCore.currentChallenge(address) (src/rollup/RollupCore.sol#176-178)\n\t- RollupCore.deleteStaker(address) (src/rollup/RollupCore.sol#542-550)\n\t- RollupAdminLogic.forceRefundStaker(address[]) (src/rollup/RollupAdminLogic.sol#276-284)\n\t- RollupCore.getStaker(address) (src/rollup/RollupCore.sol#194-196)\n\t- RollupCore.inChallenge(address,address) (src/rollup/RollupCore.sol#350-361)\n\t- RollupCore.isStaked(address) (src/rollup/RollupCore.sol#148-150)\n\t- RollupCore.isStakedOnLatestConfirmed(address) (src/rollup/RollupCore.sol#158-160)\n\t- RollupCore.latestStakedNode(address) (src/rollup/RollupCore.sol#167-169)\n\t- RollupCore.reduceStakeTo(address,uint256) (src/rollup/RollupCore.sol#406-415)\n\t- RollupCore.turnIntoZombie(address) (src/rollup/RollupCore.sol#421-425)\n", "markdown": "Reentrancy in [RollupAdminLogic.forceResolveChallenge(address[],address[])](src/rollup/RollupAdminLogic.sol#L258-L274):\n\tExternal calls:\n\t- [challengeManager.clearChallenge(chall)](src/rollup/RollupAdminLogic.sol#L271)\n\tState variables written after the call(s):\n\t- [clearChallenge(stakerA[i])](src/rollup/RollupAdminLogic.sol#L269)\n\t\t- [staker.currentChallenge = NO_CHAL_INDEX](src/rollup/RollupCore.sol#L369)\n\t[RollupCore._stakerMap](src/rollup/RollupCore.sol#L68) can be used in cross function reentrancies:\n\t- [RollupCore._stakerMap](src/rollup/RollupCore.sol#L68)\n\t- [RollupCore.amountStaked(address)](src/rollup/RollupCore.sol#L185-L187)\n\t- [RollupCore.clearChallenge(address)](src/rollup/RollupCore.sol#L367-L370)\n\t- [RollupCore.currentChallenge(address)](src/rollup/RollupCore.sol#L176-L178)\n\t- [RollupCore.deleteStaker(address)](src/rollup/RollupCore.sol#L542-L550)\n\t- [RollupAdminLogic.forceRefundStaker(address[])](src/rollup/RollupAdminLogic.sol#L276-L284)\n\t- [RollupCore.getStaker(address)](src/rollup/RollupCore.sol#L194-L196)\n\t- [RollupCore.inChallenge(address,address)](src/rollup/RollupCore.sol#L350-L361)\n\t- [RollupCore.isStaked(address)](src/rollup/RollupCore.sol#L148-L150)\n\t- [RollupCore.isStakedOnLatestConfirmed(address)](src/rollup/RollupCore.sol#L158-L160)\n\t- [RollupCore.latestStakedNode(address)](src/rollup/RollupCore.sol#L167-L169)\n\t- [RollupCore.reduceStakeTo(address,uint256)](src/rollup/RollupCore.sol#L406-L415)\n\t- [RollupCore.turnIntoZombie(address)](src/rollup/RollupCore.sol#L421-L425)\n\t- [clearChallenge(stakerB[i])](src/rollup/RollupAdminLogic.sol#L270)\n\t\t- [staker.currentChallenge = NO_CHAL_INDEX](src/rollup/RollupCore.sol#L369)\n\t[RollupCore._stakerMap](src/rollup/RollupCore.sol#L68) can be used in cross function reentrancies:\n\t- [RollupCore._stakerMap](src/rollup/RollupCore.sol#L68)\n\t- [RollupCore.amountStaked(address)](src/rollup/RollupCore.sol#L185-L187)\n\t- [RollupCore.clearChallenge(address)](src/rollup/RollupCore.sol#L367-L370)\n\t- [RollupCore.currentChallenge(address)](src/rollup/RollupCore.sol#L176-L178)\n\t- [RollupCore.deleteStaker(address)](src/rollup/RollupCore.sol#L542-L550)\n\t- [RollupAdminLogic.forceRefundStaker(address[])](src/rollup/RollupAdminLogic.sol#L276-L284)\n\t- [RollupCore.getStaker(address)](src/rollup/RollupCore.sol#L194-L196)\n\t- [RollupCore.inChallenge(address,address)](src/rollup/RollupCore.sol#L350-L361)\n\t- [RollupCore.isStaked(address)](src/rollup/RollupCore.sol#L148-L150)\n\t- [RollupCore.isStakedOnLatestConfirmed(address)](src/rollup/RollupCore.sol#L158-L160)\n\t- [RollupCore.latestStakedNode(address)](src/rollup/RollupCore.sol#L167-L169)\n\t- [RollupCore.reduceStakeTo(address,uint256)](src/rollup/RollupCore.sol#L406-L415)\n\t- [RollupCore.turnIntoZombie(address)](src/rollup/RollupCore.sol#L421-L425)\n", "first_markdown_element": "src/rollup/RollupAdminLogic.sol#L258-L274", "id": "2e21893be44131693ea2dfb272622853fa44deea082e4c78e0bbd132c84af93e", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "u64Vals", "source_mapping": {"start": 6924, "length": 24, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [226], "starting_column": 9, "ending_column": 33}, "type_specific_fields": {"parent": {"type": "function", "name": "globalState", "source_mapping": {"start": 6617, "length": 684, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Deserialize", "source_mapping": {"start": 450, "length": 9161, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302], "starting_column": 1, "ending_column": 2}}, "signature": "globalState(bytes,uint256)"}}}}], "description": "Deserialize.globalState(bytes,uint256).u64Vals (src/state/Deserialize.sol#226) is a local variable never initialized\n", "markdown": "[Deserialize.globalState(bytes,uint256).u64Vals](src/state/Deserialize.sol#L226) is a local variable never initialized\n", "first_markdown_element": "src/state/Deserialize.sol#L226", "id": "b49e20832cf227724d4b048fc859ce00efa36bda00bb2d354df6861b1e5b65c8", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "funcIdx", "source_mapping": {"start": 6151, "length": 14, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [194], "starting_column": 9, "ending_column": 23}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 5971, "length": 3565, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 16704, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).funcIdx (src/osp/OneStepProver0.sol#194) is a local variable never initialized\n", "markdown": "[OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).funcIdx](src/osp/OneStepProver0.sol#L194) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L194", "id": "0b3ea27e34dd552b3d33e544c7732699f56da1be9d675526040264c6f35cf115", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "sourceBits", "source_mapping": {"start": 12021, "length": 16, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [400], "starting_column": 9, "ending_column": 25}, "type_specific_fields": {"parent": {"type": "function", "name": "executeExtendSameType", "source_mapping": {"start": 11827, "length": 1476, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16325, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524], "starting_column": 1, "ending_column": 2}}, "signature": "executeExtendSameType(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeExtendSameType(Machine,Module,Instruction,bytes).sourceBits (src/osp/OneStepProverMath.sol#400) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeExtendSameType(Machine,Module,Instruction,bytes).sourceBits](src/osp/OneStepProverMath.sol#L400) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L400", "id": "7e6b4db4655b21a377a13a4c03fdcc62f8c4e56c5ecdf979c82afb0985a1fac5", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "part", "source_mapping": {"start": 1123, "length": 17, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [38], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "proveWithFullPreimage", "source_mapping": {"start": 954, "length": 572, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "HashProofHelper", "source_mapping": {"start": 388, "length": 5264, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154], "starting_column": 1, "ending_column": 2}}, "signature": "proveWithFullPreimage(bytes,uint64)"}}}}], "description": "HashProofHelper.proveWithFullPreimage(bytes,uint64).part (src/osp/HashProofHelper.sol#38) is a local variable never initialized\n", "markdown": "[HashProofHelper.proveWithFullPreimage(bytes,uint64).part](src/osp/HashProofHelper.sol#L38) is a local variable never initialized\n", "first_markdown_element": "src/osp/HashProofHelper.sol#L38", "id": "9f6b190b96895f4cfb0f3db956545a55f4132aa16c8af057e7257d7fd2c5de43", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "ty", "source_mapping": {"start": 1685, "length": 12, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [49], "starting_column": 9, "ending_column": 21}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1507, "length": 4594, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).ty (src/osp/OneStepProverMemory.sol#49) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).ty](src/osp/OneStepProverMemory.sol#L49) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L49", "id": "d44b109a885f9f18431fcbd810bf7f45b9f86b4749430739056c0786ab2d150e", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "impl", "source_mapping": {"start": 11151, "length": 120, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [296, 297, 298], "starting_column": 9, "ending_column": 22}, "type_specific_fields": {"parent": {"type": "function", "name": "executeOneStep", "source_mapping": {"start": 10780, "length": 1055, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl (src/osp/OneStepProverMemory.sol#296-298) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl](src/osp/OneStepProverMemory.sol#L296-L298) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L296-L298", "id": "c0081c68be4899b530be0e0720e9713a3d42b71364ad4392c42fd165ec162d1e", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "beforeAcc", "source_mapping": {"start": 11222, "length": 17, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [278], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "validateDelayedInbox", "source_mapping": {"start": 10970, "length": 916, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "validateDelayedInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes).beforeAcc (src/osp/OneStepProverHostIo.sol#278) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes).beforeAcc](src/osp/OneStepProverHostIo.sol#L278) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L278", "id": "dab8df6b27e88ad0e415842d20e13cd455e0d5f0c84fa74d2906eefd6d1e06f0", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "impl", "source_mapping": {"start": 14734, "length": 120, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [477, 478, 479], "starting_column": 9, "ending_column": 22}, "type_specific_fields": {"parent": {"type": "function", "name": "executeOneStep", "source_mapping": {"start": 14363, "length": 2322, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16325, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524], "starting_column": 1, "ending_column": 2}}, "signature": "executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl (src/osp/OneStepProverMath.sol#477-479) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl](src/osp/OneStepProverMath.sol#L477-L479) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L477-L479", "id": "7bb129f3bd93db0e9c1579c8ab353fe86d0d54b40d421f4a568ab9279ce8b6cb", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "internalStack", "source_mapping": {"start": 1959, "length": 31, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [63], "starting_column": 9, "ending_column": 40}, "type_specific_fields": {"parent": {"type": "function", "name": "getStartMachineHash", "source_mapping": {"start": 1364, "length": 1078, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ChallengeLib", "source_mapping": {"start": 272, "length": 4325, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "starting_column": 1, "ending_column": 2}}, "signature": "getStartMachineHash(bytes32,bytes32)"}}}}], "description": "ChallengeLib.getStartMachineHash(bytes32,bytes32).internalStack (src/challenge/ChallengeLib.sol#63) is a local variable never initialized\n", "markdown": "[ChallengeLib.getStartMachineHash(bytes32,bytes32).internalStack](src/challenge/ChallengeLib.sol#L63) is a local variable never initialized\n", "first_markdown_element": "src/challenge/ChallengeLib.sol#L63", "id": "2b6e1af0735464f525ca02dac16210c75f5e60fdd4f5020e646e82eccdf94e2a", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "frameStack", "source_mapping": {"start": 2000, "length": 34, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [64], "starting_column": 9, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "function", "name": "getStartMachineHash", "source_mapping": {"start": 1364, "length": 1078, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ChallengeLib", "source_mapping": {"start": 272, "length": 4325, "filename_relative": "src/challenge/ChallengeLib.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/challenge/ChallengeLib.sol", "filename_short": "src/challenge/ChallengeLib.sol", "is_dependency": false, "lines": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "starting_column": 1, "ending_column": 2}}, "signature": "getStartMachineHash(bytes32,bytes32)"}}}}], "description": "ChallengeLib.getStartMachineHash(bytes32,bytes32).frameStack (src/challenge/ChallengeLib.sol#64) is a local variable never initialized\n", "markdown": "[ChallengeLib.getStartMachineHash(bytes32,bytes32).frameStack](src/challenge/ChallengeLib.sol#L64) is a local variable never initialized\n", "first_markdown_element": "src/challenge/ChallengeLib.sol#L64", "id": "e2c13e88a674b7d15f66c38811493b28e3d768158293153c3761365faf8e45c7", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "signed", "source_mapping": {"start": 1734, "length": 11, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [51], "starting_column": 9, "ending_column": 20}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1507, "length": 4594, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).signed (src/osp/OneStepProverMemory.sol#51) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).signed](src/osp/OneStepProverMemory.sol#L51) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L51", "id": "494ad26e42522ed318b7143deadf6e22863a94ac35e1bc7e431f680c09e99249", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "extracted", "source_mapping": {"start": 5123, "length": 22, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [147], "starting_column": 9, "ending_column": 31}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4302, "length": 5772, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes).extracted (src/osp/OneStepProverHostIo.sol#147) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes).extracted](src/osp/OneStepProverHostIo.sol#L147) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L147", "id": "b8f149ef07d9b5bf6a4fd2772d951ef00e1136d5728509097c74a6d35fb7419a", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "delayedAcc", "source_mapping": {"start": 10502, "length": 18, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [258], "starting_column": 9, "ending_column": 27}, "type_specific_fields": {"parent": {"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10080, "length": 884, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes).delayedAcc (src/osp/OneStepProverHostIo.sol#258) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes).delayedAcc](src/osp/OneStepProverHostIo.sol#L258) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L258", "id": "a4af275d7732b756f493da186504395ee7b6705d359094ed504be4cb2382a71f", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "state256", "source_mapping": {"start": 4683, "length": 27, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [127], "starting_column": 13, "ending_column": 40}, "type_specific_fields": {"parent": {"type": "function", "name": "keccakUpdate", "source_mapping": {"start": 3663, "length": 1486, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "HashProofHelper", "source_mapping": {"start": 388, "length": 5264, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154], "starting_column": 1, "ending_column": 2}}, "signature": "keccakUpdate(HashProofHelper.KeccakState,bytes,bool)"}}}}], "description": "HashProofHelper.keccakUpdate(HashProofHelper.KeccakState,bytes,bool).state256 (src/osp/HashProofHelper.sol#127) is a local variable never initialized\n", "markdown": "[HashProofHelper.keccakUpdate(HashProofHelper.KeccakState,bytes,bool).state256](src/osp/HashProofHelper.sol#L127) is a local variable never initialized\n", "first_markdown_element": "src/osp/HashProofHelper.sol#L127", "id": "b10eafcd668276e8f081740d67fa003ef0534d1520e371c18e96833214fc3ff2", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "beforeAcc", "source_mapping": {"start": 10475, "length": 17, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [257], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10080, "length": 884, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes).beforeAcc (src/osp/OneStepProverHostIo.sol#257) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes).beforeAcc](src/osp/OneStepProverHostIo.sol#L257) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L257", "id": "93458ecce4030168b57a5b4b9bddf11e556bda0b87b21572901703776f8a4a4d", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "memoryFrame", "source_mapping": {"start": 21082, "length": 38, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [575], "starting_column": 9, "ending_column": 47}, "type_specific_fields": {"parent": {"type": "function", "name": "createNewNode", "source_mapping": {"start": 20652, "length": 4618, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 685, "length": 24587, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678], "starting_column": 1, "ending_column": 2}}, "signature": "createNewNode(Assertion,uint64,uint256,bytes32)"}}}}], "description": "RollupCore.createNewNode(Assertion,uint64,uint256,bytes32).memoryFrame (src/rollup/RollupCore.sol#575) is a local variable never initialized\n", "markdown": "[RollupCore.createNewNode(Assertion,uint64,uint256,bytes32).memoryFrame](src/rollup/RollupCore.sol#L575) is a local variable never initialized\n", "first_markdown_element": "src/rollup/RollupCore.sol#L575", "id": "22d3572f5fd9e44b1a0e455ebf3a57c571e31a392c713a5313ed78cdb5bdd79d", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "bounds", "source_mapping": {"start": 7906, "length": 32, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [214], "starting_column": 9, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "function", "name": "getTimeBounds", "source_mapping": {"start": 7813, "length": 740, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1909, "length": 29266, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805], "starting_column": 1, "ending_column": 2}}, "signature": "getTimeBounds()"}}}}], "description": "SequencerInbox.getTimeBounds().bounds (src/bridge/SequencerInbox.sol#214) is a local variable never initialized\n", "markdown": "[SequencerInbox.getTimeBounds().bounds](src/bridge/SequencerInbox.sol#L214) is a local variable never initialized\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L214", "id": "a9ab2d44723c17809429f069881bb97a07e53966e1c848cc3083baebb7d26ceb", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "ty", "source_mapping": {"start": 6351, "length": 12, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [171], "starting_column": 13, "ending_column": 25}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryStore", "source_mapping": {"start": 6107, "length": 3663, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryStore(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).ty (src/osp/OneStepProverMemory.sol#171) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).ty](src/osp/OneStepProverMemory.sol#L171) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L171", "id": "565f5e19fbe1a69065e4ef47ec789739a56008570ac09324d5995e298652f2be", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "ty", "source_mapping": {"start": 1158, "length": 12, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [44], "starting_column": 9, "ending_column": 21}, "type_specific_fields": {"parent": {"type": "function", "name": "executeConstPush", "source_mapping": {"start": 954, "length": 732, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 16704, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494], "starting_column": 1, "ending_column": 2}}, "signature": "executeConstPush(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeConstPush(Machine,Module,Instruction,bytes).ty (src/osp/OneStepProver0.sol#44) is a local variable never initialized\n", "markdown": "[OneStepProver0.executeConstPush(Machine,Module,Instruction,bytes).ty](src/osp/OneStepProver0.sol#L44) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L44", "id": "f3a4bd8740f9565ecd548a3027588ef6a9ab1fab50a47ee9989dff0a450c0d81", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "emptyGlobalState", "source_mapping": {"start": 3120, "length": 35, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [78], "starting_column": 9, "ending_column": 44}, "type_specific_fields": {"parent": {"type": "function", "name": "createInitialNode", "source_mapping": {"start": 3046, "length": 662, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 590, "length": 14555, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382], "starting_column": 1, "ending_column": 2}}, "signature": "createInitialNode()"}}}}], "description": "RollupAdminLogic.createInitialNode().emptyGlobalState (src/rollup/RollupAdminLogic.sol#78) is a local variable never initialized\n", "markdown": "[RollupAdminLogic.createInitialNode().emptyGlobalState](src/rollup/RollupAdminLogic.sol#L78) is a local variable never initialized\n", "first_markdown_element": "src/rollup/RollupAdminLogic.sol#L78", "id": "b104a1c9b21db741f0eff33cad88bcd28b01251cf7cb2ac69372f55f19cc56b2", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "lastProvedLeafContents", "source_mapping": {"start": 4304, "length": 30, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [121], "starting_column": 9, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1507, "length": 4594, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).lastProvedLeafContents (src/osp/OneStepProverMemory.sol#121) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).lastProvedLeafContents](src/osp/OneStepProverMemory.sol#L121) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L121", "id": "162cb33b9534bc21104309b21e51a798ebe240718727aed3b174e3802daec4c1", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "bytes32Vals", "source_mapping": {"start": 6885, "length": 29, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [225], "starting_column": 9, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "globalState", "source_mapping": {"start": 6617, "length": 684, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Deserialize", "source_mapping": {"start": 450, "length": 9161, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302], "starting_column": 1, "ending_column": 2}}, "signature": "globalState(bytes,uint256)"}}}}], "description": "Deserialize.globalState(bytes,uint256).bytes32Vals (src/state/Deserialize.sol#225) is a local variable never initialized\n", "markdown": "[Deserialize.globalState(bytes,uint256).bytes32Vals](src/state/Deserialize.sol#L225) is a local variable never initialized\n", "first_markdown_element": "src/state/Deserialize.sol#L225", "id": "347c23c28d92854b0181184cb13878043e27048bb6b0d14e6f9f24d733477f80", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "status", "source_mapping": {"start": 7495, "length": 20, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [243], "starting_column": 9, "ending_column": 29}, "type_specific_fields": {"parent": {"type": "function", "name": "machine", "source_mapping": {"start": 7307, "length": 1811, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Deserialize", "source_mapping": {"start": 450, "length": 9161, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302], "starting_column": 1, "ending_column": 2}}, "signature": "machine(bytes,uint256)"}}}}], "description": "Deserialize.machine(bytes,uint256).status (src/state/Deserialize.sol#243) is a local variable never initialized\n", "markdown": "[Deserialize.machine(bytes,uint256).status](src/state/Deserialize.sol#L243) is a local variable never initialized\n", "first_markdown_element": "src/state/Deserialize.sol#L243", "id": "b0bb66b3aaa5e859564fcf69ddd9c518a2dff55461b2e23469e57954ece88023", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "sourceTy", "source_mapping": {"start": 13504, "length": 18, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [443], "starting_column": 9, "ending_column": 27}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReinterpret", "source_mapping": {"start": 13309, "length": 1048, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16325, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524], "starting_column": 1, "ending_column": 2}}, "signature": "executeReinterpret(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeReinterpret(Machine,Module,Instruction,bytes).sourceTy (src/osp/OneStepProverMath.sol#443) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeReinterpret(Machine,Module,Instruction,bytes).sourceTy](src/osp/OneStepProverMath.sol#L443) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L443", "id": "19cc2967641f968047d8174e2ba3152038af798b63c42b1bb55dd59287a923a7", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "writeBytes", "source_mapping": {"start": 6286, "length": 17, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [168], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryStore", "source_mapping": {"start": 6107, "length": 3663, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryStore(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).writeBytes (src/osp/OneStepProverMemory.sol#168) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).writeBytes](src/osp/OneStepProverMemory.sol#L168) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L168", "id": "f573681c354f3fdccf310c43fad70c2f0994cf3b3de20432e01071bd6a3981de", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "destTy", "source_mapping": {"start": 13478, "length": 16, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [442], "starting_column": 9, "ending_column": 25}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReinterpret", "source_mapping": {"start": 13309, "length": 1048, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16325, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524], "starting_column": 1, "ending_column": 2}}, "signature": "executeReinterpret(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeReinterpret(Machine,Module,Instruction,bytes).destTy (src/osp/OneStepProverMath.sol#442) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeReinterpret(Machine,Module,Instruction,bytes).destTy](src/osp/OneStepProverMath.sol#L442) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L442", "id": "0c40a87502e42085a3fc0a61f202e687aed2386c6fe161376f0f0b2f16a4c9c5", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "ty", "source_mapping": {"start": 11999, "length": 12, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [399], "starting_column": 9, "ending_column": 21}, "type_specific_fields": {"parent": {"type": "function", "name": "executeExtendSameType", "source_mapping": {"start": 11827, "length": 1476, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16325, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524], "starting_column": 1, "ending_column": 2}}, "signature": "executeExtendSameType(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeExtendSameType(Machine,Module,Instruction,bytes).ty (src/osp/OneStepProverMath.sol#399) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeExtendSameType(Machine,Module,Instruction,bytes).ty](src/osp/OneStepProverMath.sol#L399) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L399", "id": "d5801e7c2f23eb0d6bc004590ab2e75879037d149be714c34ab3b066e1c4b819", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "readBytes", "source_mapping": {"start": 1707, "length": 17, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [50], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1507, "length": 4594, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).readBytes (src/osp/OneStepProverMemory.sol#50) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).readBytes](src/osp/OneStepProverMemory.sol#L50) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L50", "id": "09c1e38d961440cc644e890e7e165ecd2073dd96901441ae9b2b9c939257cc6f", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "frame", "source_mapping": {"start": 1824, "length": 28, "filename_relative": "src/rollup/BridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/BridgeCreator.sol", "filename_short": "src/rollup/BridgeCreator.sol", "is_dependency": false, "lines": [58], "starting_column": 9, "ending_column": 37}, "type_specific_fields": {"parent": {"type": "function", "name": "_createBridge", "source_mapping": {"start": 1674, "length": 1017, "filename_relative": "src/rollup/BridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/BridgeCreator.sol", "filename_short": "src/rollup/BridgeCreator.sol", "is_dependency": false, "lines": [54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "BridgeCreator", "source_mapping": {"start": 676, "length": 3074, "filename_relative": "src/rollup/BridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/BridgeCreator.sol", "filename_short": "src/rollup/BridgeCreator.sol", "is_dependency": false, "lines": [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106], "starting_column": 1, "ending_column": 2}}, "signature": "_createBridge(address,BridgeCreator.BridgeContracts)"}}}}], "description": "BridgeCreator._createBridge(address,BridgeCreator.BridgeContracts).frame (src/rollup/BridgeCreator.sol#58) is a local variable never initialized\n", "markdown": "[BridgeCreator._createBridge(address,BridgeCreator.BridgeContracts).frame](src/rollup/BridgeCreator.sol#L58) is a local variable never initialized\n", "first_markdown_element": "src/rollup/BridgeCreator.sol#L58", "id": "4c4998aea345771ab95ff74b35dc261d24cfbcc254dff7368e71dcded4e6b088", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "impl", "source_mapping": {"start": 14921, "length": 120, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [444, 445, 446], "starting_column": 9, "ending_column": 22}, "type_specific_fields": {"parent": {"type": "function", "name": "executeOneStep", "source_mapping": {"start": 14550, "length": 2514, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 16704, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494], "starting_column": 1, "ending_column": 2}}, "signature": "executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl (src/osp/OneStepProver0.sol#444-446) is a local variable never initialized\n", "markdown": "[OneStepProver0.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl](src/osp/OneStepProver0.sol#L444-L446) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L444-L446", "id": "bf9df19313618417269a105ecd5b4cf0c22530264701877ed554d77b7886b033", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "impl", "source_mapping": {"start": 16165, "length": 193, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [425, 426, 427, 428, 429, 430, 431], "starting_column": 9, "ending_column": 29}, "type_specific_fields": {"parent": {"type": "function", "name": "executeOneStep", "source_mapping": {"start": 15786, "length": 1210, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl (src/osp/OneStepProverHostIo.sol#425-431) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl](src/osp/OneStepProverHostIo.sol#L425-L431) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L425-L431", "id": "fd4baa84dfad7402f9c850b2abb8c959fa89f0a0f27d7a4d985504eafa596460", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "node", "source_mapping": {"start": 2394, "length": 16, "filename_relative": "src/rollup/Node.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/Node.sol", "filename_short": "src/rollup/Node.sol", "is_dependency": false, "lines": [69], "starting_column": 9, "ending_column": 25}, "type_specific_fields": {"parent": {"type": "function", "name": "createNode", "source_mapping": {"start": 2149, "length": 636, "filename_relative": "src/rollup/Node.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/Node.sol", "filename_short": "src/rollup/Node.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "NodeLib", "source_mapping": {"start": 1752, "length": 2186, "filename_relative": "src/rollup/Node.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/Node.sol", "filename_short": "src/rollup/Node.sol", "is_dependency": false, "lines": [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113], "starting_column": 1, "ending_column": 2}}, "signature": "createNode(bytes32,bytes32,bytes32,uint64,uint64,bytes32)"}}}}], "description": "NodeLib.createNode(bytes32,bytes32,bytes32,uint64,uint64,bytes32).node (src/rollup/Node.sol#69) is a local variable never initialized\n", "markdown": "[NodeLib.createNode(bytes32,bytes32,bytes32,uint64,uint64,bytes32).node](src/rollup/Node.sol#L69) is a local variable never initialized\n", "first_markdown_element": "src/rollup/Node.sol#L69", "id": "2fbc6226a17bd364563caa94e1c97858f74f9cd682e6c1096bb46cf3ce114daf", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "lastProvedMerkle", "source_mapping": {"start": 8359, "length": 35, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [220], "starting_column": 9, "ending_column": 44}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryStore", "source_mapping": {"start": 6107, "length": 3663, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryStore(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).lastProvedMerkle (src/osp/OneStepProverMemory.sol#220) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).lastProvedMerkle](src/osp/OneStepProverMemory.sol#L220) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L220", "id": "970df6569838c064f8c23181f94aa7553a41b5a23c53e802d29cd0162f7d4f2b", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "initialize", "source_mapping": {"start": 969, "length": 447, "filename_relative": "src/bridge/ERC20Inbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/ERC20Inbox.sol", "filename_short": "src/bridge/ERC20Inbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ERC20Inbox", "source_mapping": {"start": 789, "length": 4172, "filename_relative": "src/bridge/ERC20Inbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/ERC20Inbox.sol", "filename_short": "src/bridge/ERC20Inbox.sol", "is_dependency": false, "lines": [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144], "starting_column": 1, "ending_column": 2}}, "signature": "initialize(IBridge,ISequencerInbox)"}}, {"type": "node", "name": "IERC20(nativeToken).approve(address(bridge),type()(uint256).max)", "source_mapping": {"start": 1346, "length": 63, "filename_relative": "src/bridge/ERC20Inbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/ERC20Inbox.sol", "filename_short": "src/bridge/ERC20Inbox.sol", "is_dependency": false, "lines": [36], "starting_column": 9, "ending_column": 72}, "type_specific_fields": {"parent": {"type": "function", "name": "initialize", "source_mapping": {"start": 969, "length": 447, "filename_relative": "src/bridge/ERC20Inbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/ERC20Inbox.sol", "filename_short": "src/bridge/ERC20Inbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ERC20Inbox", "source_mapping": {"start": 789, "length": 4172, "filename_relative": "src/bridge/ERC20Inbox.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/ERC20Inbox.sol", "filename_short": "src/bridge/ERC20Inbox.sol", "is_dependency": false, "lines": [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144], "starting_column": 1, "ending_column": 2}}, "signature": "initialize(IBridge,ISequencerInbox)"}}}}], "description": "ERC20Inbox.initialize(IBridge,ISequencerInbox) (src/bridge/ERC20Inbox.sol#27-37) ignores return value by IERC20(nativeToken).approve(address(bridge),type()(uint256).max) (src/bridge/ERC20Inbox.sol#36)\n", "markdown": "[ERC20Inbox.initialize(IBridge,ISequencerInbox)](src/bridge/ERC20Inbox.sol#L27-L37) ignores return value by [IERC20(nativeToken).approve(address(bridge),type()(uint256).max)](src/bridge/ERC20Inbox.sol#L36)\n", "first_markdown_element": "src/bridge/ERC20Inbox.sol#L27-L37", "id": "02a7ce9e0718ec474776a6c6466ec2120335f60d5d537c682d2d0b48b02e328e", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "refundsGas", "source_mapping": {"start": 721, "length": 2143, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2557, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}, {"type": "node", "name": "gasRefunder.onGasSpent(address(msg.sender),startGasLeft - gasleft()(),calldataSize)", "source_mapping": {"start": 2764, "length": 83, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [49], "starting_column": 13, "ending_column": 96}, "type_specific_fields": {"parent": {"type": "function", "name": "refundsGas", "source_mapping": {"start": 721, "length": 2143, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2557, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}}}], "description": "GasRefundEnabled.refundsGas(IGasRefunder,IReader4844) (src/libraries/GasRefundEnabled.sol#17-51) ignores return value by gasRefunder.onGasSpent(address(msg.sender),startGasLeft - gasleft()(),calldataSize) (src/libraries/GasRefundEnabled.sol#49)\n", "markdown": "[GasRefundEnabled.refundsGas(IGasRefunder,IReader4844)](src/libraries/GasRefundEnabled.sol#L17-L51) ignores return value by [gasRefunder.onGasSpent(address(msg.sender),startGasLeft - gasleft()(),calldataSize)](src/libraries/GasRefundEnabled.sol#L49)\n", "first_markdown_element": "src/libraries/GasRefundEnabled.sol#L17-L51", "id": "dd7d7f9070537fa235923aa2a3f52a440202d201a28033828f3cfb6418df3676", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeDrop", "source_mapping": {"start": 1692, "length": 185, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [60, 61, 62, 63, 64, 65, 66, 67], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 16704, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494], "starting_column": 1, "ending_column": 2}}, "signature": "executeDrop(Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "mach.valueStack.pop()", "source_mapping": {"start": 1849, "length": 21, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [66], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "executeDrop", "source_mapping": {"start": 1692, "length": 185, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [60, 61, 62, 63, 64, 65, 66, 67], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 16704, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494], "starting_column": 1, "ending_column": 2}}, "signature": "executeDrop(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeDrop(Machine,Module,Instruction,bytes) (src/osp/OneStepProver0.sol#60-67) ignores return value by mach.valueStack.pop() (src/osp/OneStepProver0.sol#66)\n", "markdown": "[OneStepProver0.executeDrop(Machine,Module,Instruction,bytes)](src/osp/OneStepProver0.sol#L60-L67) ignores return value by [mach.valueStack.pop()](src/osp/OneStepProver0.sol#L66)\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L60-L67", "id": "12bf5611aeaa1ce8c4037f42705c38eef1245905dff7bc27604a5c8290de634b", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10080, "length": 884, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}, {"type": "node", "name": "(afterDelayedMsg,None) = Deserialize.u64(message,32)", "source_mapping": {"start": 10365, "length": 50, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [255], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10080, "length": 884, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes) (src/osp/OneStepProverHostIo.sol#247-269) ignores return value by (afterDelayedMsg,None) = Deserialize.u64(message,32) (src/osp/OneStepProverHostIo.sol#255)\n", "markdown": "[OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes)](src/osp/OneStepProverHostIo.sol#L247-L269) ignores return value by [(afterDelayedMsg,None) = Deserialize.u64(message,32)](src/osp/OneStepProverHostIo.sol#L255)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L247-L269", "id": "8e9dac288df9bcd5afd57ce5afd7d08f223411c09b70bf9486fbdce8c99e8a4e", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "validateDelayedInbox", "source_mapping": {"start": 10970, "length": 916, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "validateDelayedInbox(ExecutionContext,uint64,bytes)"}}, {"type": "node", "name": "(sender,None) = Deserialize.u256(message,1)", "source_mapping": {"start": 11493, "length": 41, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [287], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "validateDelayedInbox", "source_mapping": {"start": 10970, "length": 916, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 433, "length": 16565, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450], "starting_column": 1, "ending_column": 2}}, "signature": "validateDelayedInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes) (src/osp/OneStepProverHostIo.sol#271-296) ignores return value by (sender,None) = Deserialize.u256(message,1) (src/osp/OneStepProverHostIo.sol#287)\n", "markdown": "[OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes)](src/osp/OneStepProverHostIo.sol#L271-L296) ignores return value by [(sender,None) = Deserialize.u256(message,1)](src/osp/OneStepProverHostIo.sol#L287)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L271-L296", "id": "06e60ad1cf7b2c761d007d2174aab9de589f5fb917c2547582fac31386b8bf17", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1507, "length": 4594, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "(lastProvedLeafContents,proofOffset,None) = ModuleMemoryLib.proveLeaf(mod.moduleMemory,leafIdx,proof,proofOffset)", "source_mapping": {"start": 4658, "length": 212, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [128, 129, 130, 131, 132, 133], "starting_column": 17, "ending_column": 18}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1507, "length": 4594, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 11469, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes) (src/osp/OneStepProverMemory.sol#43-160) ignores return value by (lastProvedLeafContents,proofOffset,None) = ModuleMemoryLib.proveLeaf(mod.moduleMemory,leafIdx,proof,proofOffset) (src/osp/OneStepProverMemory.sol#128-133)\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes)](src/osp/OneStepProverMemory.sol#L43-L160) ignores return value by [(lastProvedLeafContents,proofOffset,None) = ModuleMemoryLib.proveLeaf(mod.moduleMemory,leafIdx,proof,proofOffset)](src/osp/OneStepProverMemory.sol#L128-L133)\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L43-L160", "id": "ab8910cb7fbab9ad8b4fcabf66567df3327f36c637f318ceaf3df0ea258b2a1d", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8513, "length": 1493, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,bool,uint256)"}}, {"type": "node", "name": "IERC20Inbox(inbox).createRetryableTicket({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,tokenTotalFeeAmount:feeAmount,data:})", "source_mapping": {"start": 9018, "length": 434, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72], "starting_column": 13, "ending_column": 15}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8513, "length": 1493, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,bool,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,bool,uint256) (src/rollup/DeployHelper.sol#46-87) ignores return value by IERC20Inbox(inbox).createRetryableTicket({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,tokenTotalFeeAmount:feeAmount,data:}) (src/rollup/DeployHelper.sol#62-72)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,bool,uint256)](src/rollup/DeployHelper.sol#L46-L87) ignores return value by [IERC20Inbox(inbox).createRetryableTicket({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,tokenTotalFeeAmount:feeAmount,data:})](src/rollup/DeployHelper.sol#L62-L72)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L87", "id": "b577066c87e9c3fd8db423a41c6f80870945020f8f55d5dd38041b1894b9af5a", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8513, "length": 1493, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,bool,uint256)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})", "source_mapping": {"start": 9483, "length": 399, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [74, 75, 76, 77, 78, 79, 80, 81, 82, 83], "starting_column": 13, "ending_column": 15}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8513, "length": 1493, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,bool,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,bool,uint256) (src/rollup/DeployHelper.sol#46-87) ignores return value by IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:}) (src/rollup/DeployHelper.sol#74-83)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,bool,uint256)](src/rollup/DeployHelper.sol#L46-L87) ignores return value by [IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})](src/rollup/DeployHelper.sol#L74-L83)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L87", "id": "08d31a6c6d79a1ee2e015f8b5e35c4ed5b9293c91824de95a577f6e382ac73bd", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8513, "length": 1493, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,bool,uint256)"}}, {"type": "node", "name": "IInboxBase(inbox).sendL2Message(payload)", "source_mapping": {"start": 9959, "length": 40, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [86], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8513, "length": 1493, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 513, "length": 11093, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,bool,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,bool,uint256) (src/rollup/DeployHelper.sol#46-87) ignores return value by IInboxBase(inbox).sendL2Message(payload) (src/rollup/DeployHelper.sol#86)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,bool,uint256)](src/rollup/DeployHelper.sol#L46-L87) ignores return value by [IInboxBase(inbox).sendL2Message(payload)](src/rollup/DeployHelper.sol#L86)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L87", "id": "b4a84cbb13a9ec2260cb5bdf5bf9641492e27e04195d23e819c7abac1a906e14", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_upgradeSecondaryToAndCall", "source_mapping": {"start": 2306, "length": 313, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [60, 61, 62, 63, 64, 65, 66, 67, 68, 69], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DoubleLogicERC1967Upgrade", "source_mapping": {"start": 525, "length": 3364, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98], "starting_column": 1, "ending_column": 2}}, "signature": "_upgradeSecondaryToAndCall(address,bytes,bool)"}}, {"type": "node", "name": "Address.functionDelegateCall(newImplementation,data)", "source_mapping": {"start": 2549, "length": 53, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [67], "starting_column": 13, "ending_column": 66}, "type_specific_fields": {"parent": {"type": "function", "name": "_upgradeSecondaryToAndCall", "source_mapping": {"start": 2306, "length": 313, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [60, 61, 62, 63, 64, 65, 66, 67, 68, 69], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DoubleLogicERC1967Upgrade", "source_mapping": {"start": 525, "length": 3364, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98], "starting_column": 1, "ending_column": 2}}, "signature": "_upgradeSecondaryToAndCall(address,bytes,bool)"}}}}], "description": "DoubleLogicERC1967Upgrade._upgradeSecondaryToAndCall(address,bytes,bool) (src/libraries/AdminFallbackProxy.sol#60-69) ignores return value by Address.functionDelegateCall(newImplementation,data) (src/libraries/AdminFallbackProxy.sol#67)\n", "markdown": "[DoubleLogicERC1967Upgrade._upgradeSecondaryToAndCall(address,bytes,bool)](src/libraries/AdminFallbackProxy.sol#L60-L69) ignores return value by [Address.functionDelegateCall(newImplementation,data)](src/libraries/AdminFallbackProxy.sol#L67)\n", "first_markdown_element": "src/libraries/AdminFallbackProxy.sol#L60-L69", "id": "47e0b452924c566df231e1282a84ce0091600869b7eac2442aebf277bfcb6455", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createRollup", "source_mapping": {"start": 4904, "length": 5018, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}, {"type": "node", "name": "(ethSequencerInbox,ethInbox) = bridgeCreator.ethBasedTemplates()", "source_mapping": {"start": 5121, "length": 115, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [117, 118], "starting_column": 13, "ending_column": 37}, "type_specific_fields": {"parent": {"type": "function", "name": "createRollup", "source_mapping": {"start": 4904, "length": 5018, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}}}], "description": "RollupCreator.createRollup(RollupCreator.RollupDeploymentParams) (src/rollup/RollupCreator.sol#110-233) ignores return value by (ethSequencerInbox,ethInbox) = bridgeCreator.ethBasedTemplates() (src/rollup/RollupCreator.sol#117-118)\n", "markdown": "[RollupCreator.createRollup(RollupCreator.RollupDeploymentParams)](src/rollup/RollupCreator.sol#L110-L233) ignores return value by [(ethSequencerInbox,ethInbox) = bridgeCreator.ethBasedTemplates()](src/rollup/RollupCreator.sol#L117-L118)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L110-L233", "id": "ab1f7532bdfa2da03ac0035addb1594f2610bdbf697232a9b6207e2345bfd5a7", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createRollup", "source_mapping": {"start": 4904, "length": 5018, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}, {"type": "node", "name": "(erc20SequencerInbox,erc20Inbox) = bridgeCreator.erc20BasedTemplates()", "source_mapping": {"start": 5509, "length": 121, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [125, 126], "starting_column": 13, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "createRollup", "source_mapping": {"start": 4904, "length": 5018, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 11028, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}}}], "description": "RollupCreator.createRollup(RollupCreator.RollupDeploymentParams) (src/rollup/RollupCreator.sol#110-233) ignores return value by (erc20SequencerInbox,erc20Inbox) = bridgeCreator.erc20BasedTemplates() (src/rollup/RollupCreator.sol#125-126)\n", "markdown": "[RollupCreator.createRollup(RollupCreator.RollupDeploymentParams)](src/rollup/RollupCreator.sol#L110-L233) ignores return value by [(erc20SequencerInbox,erc20Inbox) = bridgeCreator.erc20BasedTemplates()](src/rollup/RollupCreator.sol#L125-L126)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L110-L233", "id": "66c2e2cbe1d68bc0695a2c75ad2b2ad0c7a15d7d1455bb4ae31a64aeece91d52", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "_activeOutbox", "source_mapping": {"start": 1410, "length": 30, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [45], "starting_column": 5, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsBridge", "source_mapping": {"start": 995, "length": 9716, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308], "starting_column": 1, "ending_column": 2}}}}, {"type": "node", "name": "_activeOutbox = msg.sender", "source_mapping": {"start": 6961, "length": 26, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [218], "starting_column": 9, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCall", "source_mapping": {"start": 6606, "length": 870, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsBridge", "source_mapping": {"start": 995, "length": 9716, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308], "starting_column": 1, "ending_column": 2}}, "signature": "executeCall(address,uint256,bytes)"}}}}, {"type": "node", "name": "_activeOutbox = prevOutbox", "source_mapping": {"start": 7380, "length": 26, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [225], "starting_column": 9, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCall", "source_mapping": {"start": 6606, "length": 870, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsBridge", "source_mapping": {"start": 995, "length": 9716, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308], "starting_column": 1, "ending_column": 2}}, "signature": "executeCall(address,uint256,bytes)"}}}}], "description": "AbsBridge._activeOutbox (src/bridge/AbsBridge.sol#45) is written in both\n\t_activeOutbox = msg.sender (src/bridge/AbsBridge.sol#218)\n\t_activeOutbox = prevOutbox (src/bridge/AbsBridge.sol#225)\n", "markdown": "[AbsBridge._activeOutbox](src/bridge/AbsBridge.sol#L45) is written in both\n\t[_activeOutbox = msg.sender](src/bridge/AbsBridge.sol#L218)\n\t[_activeOutbox = prevOutbox](src/bridge/AbsBridge.sol#L225)\n", "first_markdown_element": "src/bridge/AbsBridge.sol#L45", "id": "b37c58023a3ec214b040ae7619219597fa970084995f29f74c24648d6f1ba59f", "check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "variable", "name": "offset", "source_mapping": {"start": 6391, "length": 18, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [201], "starting_column": 13, "ending_column": 31}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 5971, "length": 3565, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 16704, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset)", "source_mapping": {"start": 7998, "length": 59, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [237], "starting_column": 13, "ending_column": 72}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 5971, "length": 3565, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 16704, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "(functionPointer,offset) = Deserialize.value(proof,offset)", "source_mapping": {"start": 8071, "length": 60, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [238], "starting_column": 13, "ending_column": 73}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 5971, "length": 3565, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 16704, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/goran/repos/offchain/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).offset (src/osp/OneStepProver0.sol#201) is written in both\n\t(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset) (src/osp/OneStepProver0.sol#237)\n\t(functionPointer,offset) = Deserialize.value(proof,offset) (src/osp/OneStepProver0.sol#238)\n", "markdown": "[OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).offset](src/osp/OneStepProver0.sol#L201) is written in both\n\t[(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset)](src/osp/OneStepProver0.sol#L237)\n\t[(functionPointer,offset) = Deserialize.value(proof,offset)](src/osp/OneStepProver0.sol#L238)\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L201", "id": "a2b254b166a5aad9092374dafd67aae05d0d84bd0d8079074f9addfc91926e56", "check": "write-after-write", "impact": "Medium", "confidence": "High"}] \ No newline at end of file +[{"elements": [{"type": "function", "name": "nextEdgeLevel", "source_mapping": {"start": 35310, "length": 297, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [751, 752, 753, 754, 755, 756, 757, 758], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManagerLib", "source_mapping": {"start": 6320, "length": 37885, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930], "starting_column": 1, "ending_column": 2}}, "signature": "nextEdgeLevel(uint8,uint8)"}}, {"type": "node", "name": "ChallengeEdgeLib.levelToType(nextLevel,numBigStepLevel)", "source_mapping": {"start": 35517, "length": 56, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [755], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "nextEdgeLevel", "source_mapping": {"start": 35310, "length": 297, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [751, 752, 753, 754, 755, 756, 757, 758], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManagerLib", "source_mapping": {"start": 6320, "length": 37885, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930], "starting_column": 1, "ending_column": 2}}, "signature": "nextEdgeLevel(uint8,uint8)"}}}}], "description": "EdgeChallengeManagerLib.nextEdgeLevel(uint8,uint8) (src/challengeV2/libraries/EdgeChallengeManagerLib.sol#751-758) ignores return value by ChallengeEdgeLib.levelToType(nextLevel,numBigStepLevel) (src/challengeV2/libraries/EdgeChallengeManagerLib.sol#755)\n", "markdown": "[EdgeChallengeManagerLib.nextEdgeLevel(uint8,uint8)](src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L751-L758) ignores return value by [ChallengeEdgeLib.levelToType(nextLevel,numBigStepLevel)](src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L755)\n", "first_markdown_element": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L751-L758", "id": "1aa6b9c48c7357b70bea1e892994bf8272b36a8eea3f0a486c82c578b83161bb", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_executeLowLevelCall", "source_mapping": {"start": 1326, "length": 299, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Bridge", "source_mapping": {"start": 621, "length": 1118, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56], "starting_column": 1, "ending_column": 2}}, "signature": "_executeLowLevelCall(address,uint256,bytes)"}}, {"type": "node", "name": "(success,returnData) = to.call{value: value}(data)", "source_mapping": {"start": 1567, "length": 51, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [50], "starting_column": 9, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "_executeLowLevelCall", "source_mapping": {"start": 1326, "length": 299, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Bridge", "source_mapping": {"start": 621, "length": 1118, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56], "starting_column": 1, "ending_column": 2}}, "signature": "_executeLowLevelCall(address,uint256,bytes)"}}}}], "description": "Bridge._executeLowLevelCall(address,uint256,bytes) (src/bridge/Bridge.sol#44-51) sends eth to arbitrary user\n\tDangerous calls:\n\t- (success,returnData) = to.call{value: value}(data) (src/bridge/Bridge.sol#50)\n", "markdown": "[Bridge._executeLowLevelCall(address,uint256,bytes)](src/bridge/Bridge.sol#L44-L51) sends eth to arbitrary user\n\tDangerous calls:\n\t- [(success,returnData) = to.call{value: value}(data)](src/bridge/Bridge.sol#L50)\n", "first_markdown_element": "src/bridge/Bridge.sol#L44-L51", "id": "d2aae908b5f6b272fbfd33c9ae81fad2c62301fe23f4cc18fe9ad9b2ba70f1ef", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "deploy", "source_mapping": {"start": 674, "length": 435, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [19, 20, 21, 22, 23, 24, 25, 26], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "FactoryDeployerHelper", "source_mapping": {"start": 373, "length": 738, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], "starting_column": 1, "ending_column": 2}}, "signature": "deploy(address,uint256)"}}, {"type": "node", "name": "IERC20(feeToken).transferFrom(msg.sender,inbox,amount)", "source_mapping": {"start": 969, "length": 56, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [24], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "deploy", "source_mapping": {"start": 674, "length": 435, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [19, 20, 21, 22, 23, 24, 25, 26], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "FactoryDeployerHelper", "source_mapping": {"start": 373, "length": 738, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], "starting_column": 1, "ending_column": 2}}, "signature": "deploy(address,uint256)"}}}}], "description": "FactoryDeployerHelper.deploy(address,uint256) (src/rollup/FactoryDeployerHelper.sol#19-26) ignores return value by IERC20(feeToken).transferFrom(msg.sender,inbox,amount) (src/rollup/FactoryDeployerHelper.sol#24)\n", "markdown": "[FactoryDeployerHelper.deploy(address,uint256)](src/rollup/FactoryDeployerHelper.sol#L19-L26) ignores return value by [IERC20(feeToken).transferFrom(msg.sender,inbox,amount)](src/rollup/FactoryDeployerHelper.sol#L24)\n", "first_markdown_element": "src/rollup/FactoryDeployerHelper.sol#L19-L26", "id": "5eed907bacfba2ff1e6a01aa225ea8c1152262f096b2cfca7d65ac9f435be944", "check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "onGasSpent", "source_mapping": {"start": 6147, "length": 2881, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefunder", "source_mapping": {"start": 916, "length": 8114, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271], "starting_column": 1, "ending_column": 2}}, "signature": "onGasSpent(address,uint256,uint256)"}}, {"type": "node", "name": "ownBalance == 0", "source_mapping": {"start": 6413, "length": 15, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [205], "starting_column": 13, "ending_column": 28}, "type_specific_fields": {"parent": {"type": "function", "name": "onGasSpent", "source_mapping": {"start": 6147, "length": 2881, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefunder", "source_mapping": {"start": 916, "length": 8114, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271], "starting_column": 1, "ending_column": 2}}, "signature": "onGasSpent(address,uint256,uint256)"}}}}], "description": "GasRefunder.onGasSpent(address,uint256,uint256) (src/bridge/GasRefunder.sol#196-270) uses a dangerous strict equality:\n\t- ownBalance == 0 (src/bridge/GasRefunder.sol#205)\n", "markdown": "[GasRefunder.onGasSpent(address,uint256,uint256)](src/bridge/GasRefunder.sol#L196-L270) uses a dangerous strict equality:\n\t- [ownBalance == 0](src/bridge/GasRefunder.sol#L205)\n", "first_markdown_element": "src/bridge/GasRefunder.sol#L196-L270", "id": "dc8f636ebd924b9e82e219587e815185f94c793bce78723764c458e97a789f9a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8887, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}, {"type": "node", "name": "index == entries.length", "source_mapping": {"start": 9345, "length": 23, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [280], "starting_column": 13, "ending_column": 36}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8887, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}}], "description": "CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#265-286) uses a dangerous strict equality:\n\t- index == entries.length (src/chain/CacheManager.sol#280)\n", "markdown": "[CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L265-L286) uses a dangerous strict equality:\n\t- [index == entries.length](src/chain/CacheManager.sol#L280)\n", "first_markdown_element": "src/chain/CacheManager.sol#L265-L286", "id": "e3002e2651a7a5aa9ffa6bb2c7ff8b4edc96aa256584145f29cb59896d9c6319", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "getKeysetCreationBlock", "source_mapping": {"start": 34500, "length": 276, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [863, 864, 865, 866, 867, 868, 869], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1947, "length": 32831, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870], "starting_column": 1, "ending_column": 2}}, "signature": "getKeysetCreationBlock(bytes32)"}}, {"type": "node", "name": "ksInfo.creationBlock == 0", "source_mapping": {"start": 34669, "length": 25, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [867], "starting_column": 13, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "getKeysetCreationBlock", "source_mapping": {"start": 34500, "length": 276, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [863, 864, 865, 866, 867, 868, 869], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1947, "length": 32831, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870], "starting_column": 1, "ending_column": 2}}, "signature": "getKeysetCreationBlock(bytes32)"}}}}], "description": "SequencerInbox.getKeysetCreationBlock(bytes32) (src/bridge/SequencerInbox.sol#863-869) uses a dangerous strict equality:\n\t- ksInfo.creationBlock == 0 (src/bridge/SequencerInbox.sol#867)\n", "markdown": "[SequencerInbox.getKeysetCreationBlock(bytes32)](src/bridge/SequencerInbox.sol#L863-L869) uses a dangerous strict equality:\n\t- [ksInfo.creationBlock == 0](src/bridge/SequencerInbox.sol#L867)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L863-L869", "id": "15cde7618c1ed97fefea0e004705e4ccc20ed0d3e1838e2f1db93255ee2125b0", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8887, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheProgram(program)", "source_mapping": {"start": 9227, "length": 36, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [277], "starting_column": 9, "ending_column": 45}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8887, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 9314, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [279], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8887, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#265-286):\n\tExternal calls:\n\t- ARB_WASM_CACHE.cacheProgram(program) (src/chain/CacheManager.sol#277)\n\tState variables written after the call(s):\n\t- queueSize += size (src/chain/CacheManager.sol#279)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#27) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#265-286)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#289-295)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#245-262)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#135-165)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#215-226)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#27)\n", "markdown": "Reentrancy in [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L265-L286):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.cacheProgram(program)](src/chain/CacheManager.sol#L277)\n\tState variables written after the call(s):\n\t- [queueSize += size](src/chain/CacheManager.sol#L279)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L27) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L265-L286)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L289-L295)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L245-L262)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L135-L165)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L215-L226)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L27)\n", "first_markdown_element": "src/chain/CacheManager.sol#L265-L286", "id": "e56b87534f08659c99ab3e7da1ce959e5efe2857793b8d26533afbec3b4f28e5", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9578, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [289, 290, 291, 292, 293, 294, 295], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9691, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [291], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9578, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [289, 290, 291, 292, 293, 294, 295], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "delete entries[index]", "source_mapping": {"start": 9827, "length": 21, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [294], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9578, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [289, 290, 291, 292, 293, 294, 295], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#289-295):\n\tExternal calls:\n\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#291)\n\tState variables written after the call(s):\n\t- delete entries[index] (src/chain/CacheManager.sol#294)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#265-286)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#289-295)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#245-262)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#96-99)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#113-115)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#119-131)\n", "markdown": "Reentrancy in [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L289-L295):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L291)\n\tState variables written after the call(s):\n\t- [delete entries[index]](src/chain/CacheManager.sol#L294)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L265-L286)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L289-L295)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L245-L262)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L96-L99)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L113-L115)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L119-L131)\n", "first_markdown_element": "src/chain/CacheManager.sol#L289-L295", "id": "e69ce1db264876299080d9dcd13b0df3a8a6ac7675977459e20993f46af3e0f8", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 27959, "length": 1009, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1947, "length": 32831, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}, {"type": "node", "name": "(seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount)", "source_mapping": {"start": 28482, "length": 171, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [699, 700, 701], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 27959, "length": 1009, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1947, "length": 32831, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "totalDelayedMessagesRead = afterDelayedMessagesRead", "source_mapping": {"start": 28664, "length": 51, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [703], "starting_column": 9, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 27959, "length": 1009, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 1947, "length": 32831, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "totalDelayedMessagesRead"}}], "description": "Reentrancy in SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#686-709):\n\tExternal calls:\n\t- (seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount) (src/bridge/SequencerInbox.sol#699-701)\n\tState variables written after the call(s):\n\t- totalDelayedMessagesRead = afterDelayedMessagesRead (src/bridge/SequencerInbox.sol#703)\n\tSequencerInbox.totalDelayedMessagesRead (src/bridge/SequencerInbox.sol#62) can be used in cross function reentrancies:\n\t- SequencerInbox._setBufferConfig(BufferConfig) (src/bridge/SequencerInbox.sol#740-760)\n\t- SequencerInbox.addSequencerL2BatchFromBlobsImpl(uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#401-445)\n\t- SequencerInbox.addSequencerL2BatchFromCalldataImpl(uint256,bytes,uint256,uint256,uint256,bool) (src/bridge/SequencerInbox.sol#447-486)\n\t- SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#686-709)\n\t- SequencerInbox.delayProofImpl(uint256,DelayProof) (src/bridge/SequencerInbox.sol#524-544)\n\t- SequencerInbox.forceInclusion(uint256,uint8,uint64[2],uint256,address,bytes32) (src/bridge/SequencerInbox.sol#258-315)\n\t- SequencerInbox.isDelayProofRequired(uint256) (src/bridge/SequencerInbox.sol#546-553)\n\t- SequencerInbox.totalDelayedMessagesRead (src/bridge/SequencerInbox.sol#62)\n", "markdown": "Reentrancy in [SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L686-L709):\n\tExternal calls:\n\t- [(seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount)](src/bridge/SequencerInbox.sol#L699-L701)\n\tState variables written after the call(s):\n\t- [totalDelayedMessagesRead = afterDelayedMessagesRead](src/bridge/SequencerInbox.sol#L703)\n\t[SequencerInbox.totalDelayedMessagesRead](src/bridge/SequencerInbox.sol#L62) can be used in cross function reentrancies:\n\t- [SequencerInbox._setBufferConfig(BufferConfig)](src/bridge/SequencerInbox.sol#L740-L760)\n\t- [SequencerInbox.addSequencerL2BatchFromBlobsImpl(uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L401-L445)\n\t- [SequencerInbox.addSequencerL2BatchFromCalldataImpl(uint256,bytes,uint256,uint256,uint256,bool)](src/bridge/SequencerInbox.sol#L447-L486)\n\t- [SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L686-L709)\n\t- [SequencerInbox.delayProofImpl(uint256,DelayProof)](src/bridge/SequencerInbox.sol#L524-L544)\n\t- [SequencerInbox.forceInclusion(uint256,uint8,uint64[2],uint256,address,bytes32)](src/bridge/SequencerInbox.sol#L258-L315)\n\t- [SequencerInbox.isDelayProofRequired(uint256)](src/bridge/SequencerInbox.sol#L546-L553)\n\t- [SequencerInbox.totalDelayedMessagesRead](src/bridge/SequencerInbox.sol#L62)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L686-L709", "id": "34153c0c8552171d9bb9eb3e93390a0ea99874984c2f85d128d0d8001defa521", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "evictAll", "source_mapping": {"start": 2930, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [96, 97, 98, 99], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}, {"type": "node", "name": "evictPrograms(type()(uint256).max)", "source_mapping": {"start": 2979, "length": 32, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [97], "starting_column": 9, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2930, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [96, 97, 98, 99], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9691, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [291], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9578, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [289, 290, 291, 292, 293, 294, 295], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "delete entries", "source_mapping": {"start": 3021, "length": 14, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [98], "starting_column": 9, "ending_column": 23}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2930, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [96, 97, 98, 99], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager.evictAll() (src/chain/CacheManager.sol#96-99):\n\tExternal calls:\n\t- evictPrograms(type()(uint256).max) (src/chain/CacheManager.sol#97)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#291)\n\tState variables written after the call(s):\n\t- delete entries (src/chain/CacheManager.sol#98)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#265-286)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#289-295)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#245-262)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#96-99)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#113-115)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#119-131)\n", "markdown": "Reentrancy in [CacheManager.evictAll()](src/chain/CacheManager.sol#L96-L99):\n\tExternal calls:\n\t- [evictPrograms(type()(uint256).max)](src/chain/CacheManager.sol#L97)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L291)\n\tState variables written after the call(s):\n\t- [delete entries](src/chain/CacheManager.sol#L98)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L265-L286)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L289-L295)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L245-L262)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L96-L99)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L113-L115)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L119-L131)\n", "first_markdown_element": "src/chain/CacheManager.sol#L96-L99", "id": "36acab85cfca658fd94ea8aa436eba9c113715b3bbcd56f88d722e53782016b3", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7289, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 12007, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}, {"type": "node", "name": "executeBridgeCall(to,amountToUnlock,data)", "source_mapping": {"start": 8432, "length": 43, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [221], "starting_column": 9, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7289, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 12007, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "(success,returndata) = bridge.executeCall(to,value,data)", "source_mapping": {"start": 10040, "length": 77, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [262], "starting_column": 9, "ending_column": 86}, "type_specific_fields": {"parent": {"type": "function", "name": "executeBridgeCall", "source_mapping": {"start": 9948, "length": 564, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 12007, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321], "starting_column": 1, "ending_column": 2}}, "signature": "executeBridgeCall(address,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "context = prevContext", "source_mapping": {"start": 8486, "length": 21, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [223], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7289, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 12007, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "context"}}], "description": "Reentrancy in AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#191-224):\n\tExternal calls:\n\t- executeBridgeCall(to,amountToUnlock,data) (src/bridge/AbsOutbox.sol#221)\n\t\t- (success,returndata) = bridge.executeCall(to,value,data) (src/bridge/AbsOutbox.sol#262)\n\tState variables written after the call(s):\n\t- context = prevContext (src/bridge/AbsOutbox.sol#223)\n\tAbsOutbox.context (src/bridge/AbsOutbox.sol#51) can be used in cross function reentrancies:\n\t- AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#191-224)\n\t- AbsOutbox.initialize(IBridge) (src/bridge/AbsOutbox.sol#63-81)\n\t- AbsOutbox.l2ToL1Block() (src/bridge/AbsOutbox.sol#121-126)\n\t- AbsOutbox.l2ToL1EthBlock() (src/bridge/AbsOutbox.sol#129-134)\n\t- AbsOutbox.l2ToL1OutputId() (src/bridge/AbsOutbox.sol#150-155)\n\t- AbsOutbox.l2ToL1Sender() (src/bridge/AbsOutbox.sol#113-118)\n\t- AbsOutbox.l2ToL1Timestamp() (src/bridge/AbsOutbox.sol#137-142)\n\t- AbsOutbox.postUpgradeInit() (src/bridge/AbsOutbox.sol#83-94)\n", "markdown": "Reentrancy in [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L191-L224):\n\tExternal calls:\n\t- [executeBridgeCall(to,amountToUnlock,data)](src/bridge/AbsOutbox.sol#L221)\n\t\t- [(success,returndata) = bridge.executeCall(to,value,data)](src/bridge/AbsOutbox.sol#L262)\n\tState variables written after the call(s):\n\t- [context = prevContext](src/bridge/AbsOutbox.sol#L223)\n\t[AbsOutbox.context](src/bridge/AbsOutbox.sol#L51) can be used in cross function reentrancies:\n\t- [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L191-L224)\n\t- [AbsOutbox.initialize(IBridge)](src/bridge/AbsOutbox.sol#L63-L81)\n\t- [AbsOutbox.l2ToL1Block()](src/bridge/AbsOutbox.sol#L121-L126)\n\t- [AbsOutbox.l2ToL1EthBlock()](src/bridge/AbsOutbox.sol#L129-L134)\n\t- [AbsOutbox.l2ToL1OutputId()](src/bridge/AbsOutbox.sol#L150-L155)\n\t- [AbsOutbox.l2ToL1Sender()](src/bridge/AbsOutbox.sol#L113-L118)\n\t- [AbsOutbox.l2ToL1Timestamp()](src/bridge/AbsOutbox.sol#L137-L142)\n\t- [AbsOutbox.postUpgradeInit()](src/bridge/AbsOutbox.sol#L83-L94)\n", "first_markdown_element": "src/bridge/AbsOutbox.sol#L191-L224", "id": "3bc69ba16f551e58c67b531970ea8a3bacba0c33789f27ee1a37f54eb7e22b84", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "placeBid", "source_mapping": {"start": 6603, "length": 434, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}, {"type": "node", "name": "(bid,index) = _makeSpace(asm)", "source_mapping": {"start": 6925, "length": 45, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [208], "starting_column": 9, "ending_column": 54}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6603, "length": 434, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9691, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [291], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9578, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [289, 290, 291, 292, 293, 294, 295], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,program,codehash,asm,index)", "source_mapping": {"start": 6980, "length": 50, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [209], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6603, "length": 434, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheProgram(program)", "source_mapping": {"start": 9227, "length": 36, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [277], "starting_column": 9, "ending_column": 45}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8887, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,program,codehash,asm,index)", "source_mapping": {"start": 6980, "length": 50, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [209], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6603, "length": 434, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries.push(entry)", "source_mapping": {"start": 9384, "length": 19, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [281], "starting_column": 13, "ending_column": 32}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8887, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries[index] = entry", "source_mapping": {"start": 9434, "length": 22, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [283], "starting_column": 13, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8887, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "_addBid(bid,program,codehash,asm,index)", "source_mapping": {"start": 6980, "length": 50, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [209], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6603, "length": 434, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 9314, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [279], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8887, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10309, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager.placeBid(address) (src/chain/CacheManager.sol#196-210):\n\tExternal calls:\n\t- (bid,index) = _makeSpace(asm) (src/chain/CacheManager.sol#208)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#291)\n\t- _addBid(bid,program,codehash,asm,index) (src/chain/CacheManager.sol#209)\n\t\t- ARB_WASM_CACHE.cacheProgram(program) (src/chain/CacheManager.sol#277)\n\tState variables written after the call(s):\n\t- _addBid(bid,program,codehash,asm,index) (src/chain/CacheManager.sol#209)\n\t\t- entries.push(entry) (src/chain/CacheManager.sol#281)\n\t\t- entries[index] = entry (src/chain/CacheManager.sol#283)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#265-286)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#289-295)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#245-262)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#96-99)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#113-115)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#119-131)\n\t- _addBid(bid,program,codehash,asm,index) (src/chain/CacheManager.sol#209)\n\t\t- queueSize += size (src/chain/CacheManager.sol#279)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#27) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#265-286)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#289-295)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#245-262)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#135-165)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#215-226)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#27)\n", "markdown": "Reentrancy in [CacheManager.placeBid(address)](src/chain/CacheManager.sol#L196-L210):\n\tExternal calls:\n\t- [(bid,index) = _makeSpace(asm)](src/chain/CacheManager.sol#L208)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L291)\n\t- [_addBid(bid,program,codehash,asm,index)](src/chain/CacheManager.sol#L209)\n\t\t- [ARB_WASM_CACHE.cacheProgram(program)](src/chain/CacheManager.sol#L277)\n\tState variables written after the call(s):\n\t- [_addBid(bid,program,codehash,asm,index)](src/chain/CacheManager.sol#L209)\n\t\t- [entries.push(entry)](src/chain/CacheManager.sol#L281)\n\t\t- [entries[index] = entry](src/chain/CacheManager.sol#L283)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L265-L286)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L289-L295)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L245-L262)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L96-L99)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L113-L115)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L119-L131)\n\t- [_addBid(bid,program,codehash,asm,index)](src/chain/CacheManager.sol#L209)\n\t\t- [queueSize += size](src/chain/CacheManager.sol#L279)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L27) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L265-L286)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L289-L295)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L245-L262)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L135-L165)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L215-L226)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L27)\n", "first_markdown_element": "src/chain/CacheManager.sol#L196-L210", "id": "051b07b7663dbd1827d193c4f341a4e92cea6732edc0f28f0b1a15be3e6187a9", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "withdrawStakeBackIntoPool", "source_mapping": {"start": 2463, "length": 102, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [61, 62, 63], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AssertionStakingPool", "source_mapping": {"start": 899, "length": 1858, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70], "starting_column": 1, "ending_column": 2}}, "signature": "withdrawStakeBackIntoPool()"}}, {"type": "node", "name": "IRollupUser(rollup).withdrawStakerFunds()", "source_mapping": {"start": 2517, "length": 41, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [62], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "withdrawStakeBackIntoPool", "source_mapping": {"start": 2463, "length": 102, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [61, 62, 63], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AssertionStakingPool", "source_mapping": {"start": 899, "length": 1858, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70], "starting_column": 1, "ending_column": 2}}, "signature": "withdrawStakeBackIntoPool()"}}}}], "description": "AssertionStakingPool.withdrawStakeBackIntoPool() (src/assertionStakingPool/AssertionStakingPool.sol#61-63) ignores return value by IRollupUser(rollup).withdrawStakerFunds() (src/assertionStakingPool/AssertionStakingPool.sol#62)\n", "markdown": "[AssertionStakingPool.withdrawStakeBackIntoPool()](src/assertionStakingPool/AssertionStakingPool.sol#L61-L63) ignores return value by [IRollupUser(rollup).withdrawStakerFunds()](src/assertionStakingPool/AssertionStakingPool.sol#L62)\n", "first_markdown_element": "src/assertionStakingPool/AssertionStakingPool.sol#L61-L63", "id": "1653d37d19ca1e129d271e5ff4efccc4861c33885bd7877fa44b09210b608ac9", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "multiUpdateTimeCacheByChildren", "source_mapping": {"start": 26741, "length": 474, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManager", "source_mapping": {"start": 13341, "length": 21133, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783], "starting_column": 1, "ending_column": 2}}, "signature": "multiUpdateTimeCacheByChildren(bytes32[],uint256)"}}, {"type": "node", "name": "store.validateCurrentTimer(edgeIds[edgeIds.length - 1],maximumCachedTime)", "source_mapping": {"start": 26998, "length": 74, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [561], "starting_column": 9, "ending_column": 83}, "type_specific_fields": {"parent": {"type": "function", "name": "multiUpdateTimeCacheByChildren", "source_mapping": {"start": 26741, "length": 474, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManager", "source_mapping": {"start": 13341, "length": 21133, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783], "starting_column": 1, "ending_column": 2}}, "signature": "multiUpdateTimeCacheByChildren(bytes32[],uint256)"}}}}], "description": "EdgeChallengeManager.multiUpdateTimeCacheByChildren(bytes32[],uint256) (src/challengeV2/EdgeChallengeManager.sol#555-565) ignores return value by store.validateCurrentTimer(edgeIds[edgeIds.length - 1],maximumCachedTime) (src/challengeV2/EdgeChallengeManager.sol#561)\n", "markdown": "[EdgeChallengeManager.multiUpdateTimeCacheByChildren(bytes32[],uint256)](src/challengeV2/EdgeChallengeManager.sol#L555-L565) ignores return value by [store.validateCurrentTimer(edgeIds[edgeIds.length - 1],maximumCachedTime)](src/challengeV2/EdgeChallengeManager.sol#L561)\n", "first_markdown_element": "src/challengeV2/EdgeChallengeManager.sol#L555-L565", "id": "1f3d629d04c18344de2501d01c0fe450a214ef2db5b694ad83bf2cdace57e3f7", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "nextEdgeLevel", "source_mapping": {"start": 35212, "length": 297, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [750, 751, 752, 753, 754, 755, 756, 757], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManagerLib", "source_mapping": {"start": 6309, "length": 37776, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929], "starting_column": 1, "ending_column": 2}}, "signature": "nextEdgeLevel(uint8,uint8)"}}, {"type": "node", "name": "ChallengeEdgeLib.levelToType(nextLevel,numBigStepLevel)", "source_mapping": {"start": 35419, "length": 56, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [754], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "nextEdgeLevel", "source_mapping": {"start": 35212, "length": 297, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [750, 751, 752, 753, 754, 755, 756, 757], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManagerLib", "source_mapping": {"start": 6309, "length": 37776, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929], "starting_column": 1, "ending_column": 2}}, "signature": "nextEdgeLevel(uint8,uint8)"}}}}], "description": "EdgeChallengeManagerLib.nextEdgeLevel(uint8,uint8) (src/challengeV2/libraries/EdgeChallengeManagerLib.sol#750-757) ignores return value by ChallengeEdgeLib.levelToType(nextLevel,numBigStepLevel) (src/challengeV2/libraries/EdgeChallengeManagerLib.sol#754)\n", "markdown": "[EdgeChallengeManagerLib.nextEdgeLevel(uint8,uint8)](src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L750-L757) ignores return value by [ChallengeEdgeLib.levelToType(nextLevel,numBigStepLevel)](src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L754)\n", "first_markdown_element": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L750-L757", "id": "0faf2a87ca3d22ba217d9e01283e5c705c8568abfc1c4022f90242db5c10ad25", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeLinkModule", "source_mapping": {"start": 16152, "length": 1054, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23286, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622], "starting_column": 1, "ending_column": 2}}, "signature": "executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "(userMod,offset,None) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0)", "source_mapping": {"start": 16650, "length": 106, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [424, 425], "starting_column": 9, "ending_column": 70}, "type_specific_fields": {"parent": {"type": "function", "name": "executeLinkModule", "source_mapping": {"start": 16152, "length": 1054, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23286, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622], "starting_column": 1, "ending_column": 2}}, "signature": "executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#409-437) ignores return value by (userMod,offset,None) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0) (src/osp/OneStepProverHostIo.sol#424-425)\n", "markdown": "[OneStepProverHostIo.executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L409-L437) ignores return value by [(userMod,offset,None) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0)](src/osp/OneStepProverHostIo.sol#L424-L425)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L409-L437", "id": "f8da615989cee91c4568976defb28c696f68a4ccf7b3bb041d52a8c7f0cefe07", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeSwitchCoThread", "source_mapping": {"start": 21001, "length": 1074, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23286, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622], "starting_column": 1, "ending_column": 2}}, "signature": "executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "mach.setRecoveryFromPc(uint32(inst.argumentData))", "source_mapping": {"start": 21972, "length": 49, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [570], "starting_column": 13, "ending_column": 62}, "type_specific_fields": {"parent": {"type": "function", "name": "executeSwitchCoThread", "source_mapping": {"start": 21001, "length": 1074, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23286, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622], "starting_column": 1, "ending_column": 2}}, "signature": "executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#545-573) ignores return value by mach.setRecoveryFromPc(uint32(inst.argumentData)) (src/osp/OneStepProverHostIo.sol#570)\n", "markdown": "[OneStepProverHostIo.executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L545-L573) ignores return value by [mach.setRecoveryFromPc(uint32(inst.argumentData))](src/osp/OneStepProverHostIo.sol#L570)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L545-L573", "id": "8da22c8736079995225c5d3e50b7fa6d8dcfb41d916b9cd69f6db4335e9afae1", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_upgradeSecondaryToAndCall", "source_mapping": {"start": 2334, "length": 313, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DoubleLogicERC1967Upgrade", "source_mapping": {"start": 525, "length": 3392, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102], "starting_column": 1, "ending_column": 2}}, "signature": "_upgradeSecondaryToAndCall(address,bytes,bool)"}}, {"type": "node", "name": "Address.functionDelegateCall(newImplementation,data)", "source_mapping": {"start": 2577, "length": 53, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [71], "starting_column": 13, "ending_column": 66}, "type_specific_fields": {"parent": {"type": "function", "name": "_upgradeSecondaryToAndCall", "source_mapping": {"start": 2334, "length": 313, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DoubleLogicERC1967Upgrade", "source_mapping": {"start": 525, "length": 3392, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102], "starting_column": 1, "ending_column": 2}}, "signature": "_upgradeSecondaryToAndCall(address,bytes,bool)"}}}}], "description": "DoubleLogicERC1967Upgrade._upgradeSecondaryToAndCall(address,bytes,bool) (src/libraries/AdminFallbackProxy.sol#64-73) ignores return value by Address.functionDelegateCall(newImplementation,data) (src/libraries/AdminFallbackProxy.sol#71)\n", "markdown": "[DoubleLogicERC1967Upgrade._upgradeSecondaryToAndCall(address,bytes,bool)](src/libraries/AdminFallbackProxy.sol#L64-L73) ignores return value by [Address.functionDelegateCall(newImplementation,data)](src/libraries/AdminFallbackProxy.sol#L71)\n", "first_markdown_element": "src/libraries/AdminFallbackProxy.sol#L64-L73", "id": "34d59e254eee16319938e6af2711f242163921685abd002b67bdcef1aa736b38", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "setValidator", "source_mapping": {"start": 8198, "length": 497, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 486, "length": 16252, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414], "starting_column": 1, "ending_column": 2}}, "signature": "setValidator(address[],bool[])"}}, {"type": "node", "name": "validators.add(_validator[i])", "source_mapping": {"start": 8499, "length": 29, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [205], "starting_column": 26, "ending_column": 55}, "type_specific_fields": {"parent": {"type": "function", "name": "setValidator", "source_mapping": {"start": 8198, "length": 497, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 486, "length": 16252, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414], "starting_column": 1, "ending_column": 2}}, "signature": "setValidator(address[],bool[])"}}}}], "description": "RollupAdminLogic.setValidator(address[],bool[]) (src/rollup/RollupAdminLogic.sol#200-211) ignores return value by validators.add(_validator[i]) (src/rollup/RollupAdminLogic.sol#205)\n", "markdown": "[RollupAdminLogic.setValidator(address[],bool[])](src/rollup/RollupAdminLogic.sol#L200-L211) ignores return value by [validators.add(_validator[i])](src/rollup/RollupAdminLogic.sol#L205)\n", "first_markdown_element": "src/rollup/RollupAdminLogic.sol#L200-L211", "id": "e804653ba90e1833c35909fdc74515f93a6c8a53dae63362162d19b191357aa4", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "setValidator", "source_mapping": {"start": 8198, "length": 497, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 486, "length": 16252, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414], "starting_column": 1, "ending_column": 2}}, "signature": "setValidator(address[],bool[])"}}, {"type": "node", "name": "validators.remove(_validator[i])", "source_mapping": {"start": 8547, "length": 32, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [206], "starting_column": 18, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "setValidator", "source_mapping": {"start": 8198, "length": 497, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 486, "length": 16252, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414], "starting_column": 1, "ending_column": 2}}, "signature": "setValidator(address[],bool[])"}}}}], "description": "RollupAdminLogic.setValidator(address[],bool[]) (src/rollup/RollupAdminLogic.sol#200-211) ignores return value by validators.remove(_validator[i]) (src/rollup/RollupAdminLogic.sol#206)\n", "markdown": "[RollupAdminLogic.setValidator(address[],bool[])](src/rollup/RollupAdminLogic.sol#L200-L211) ignores return value by [validators.remove(_validator[i])](src/rollup/RollupAdminLogic.sol#L206)\n", "first_markdown_element": "src/rollup/RollupAdminLogic.sol#L200-L211", "id": "1ae70fa9cc50d3b562becc5bd1497bd496426bf1adb2a222e29aa43388bc7f27", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "_activeOutbox", "source_mapping": {"start": 1431, "length": 30, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [45], "starting_column": 5, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsBridge", "source_mapping": {"start": 1016, "length": 9518, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298], "starting_column": 1, "ending_column": 2}}}}, {"type": "node", "name": "_activeOutbox = msg.sender", "source_mapping": {"start": 6756, "length": 26, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [203], "starting_column": 9, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCall", "source_mapping": {"start": 6401, "length": 870, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsBridge", "source_mapping": {"start": 1016, "length": 9518, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298], "starting_column": 1, "ending_column": 2}}, "signature": "executeCall(address,uint256,bytes)"}}}}, {"type": "node", "name": "_activeOutbox = prevOutbox", "source_mapping": {"start": 7175, "length": 26, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [210], "starting_column": 9, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCall", "source_mapping": {"start": 6401, "length": 870, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsBridge", "source_mapping": {"start": 1016, "length": 9518, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298], "starting_column": 1, "ending_column": 2}}, "signature": "executeCall(address,uint256,bytes)"}}}}], "description": "AbsBridge._activeOutbox (src/bridge/AbsBridge.sol#45) is written in both\n\t_activeOutbox = msg.sender (src/bridge/AbsBridge.sol#203)\n\t_activeOutbox = prevOutbox (src/bridge/AbsBridge.sol#210)\n", "markdown": "[AbsBridge._activeOutbox](src/bridge/AbsBridge.sol#L45) is written in both\n\t[_activeOutbox = msg.sender](src/bridge/AbsBridge.sol#L203)\n\t[_activeOutbox = prevOutbox](src/bridge/AbsBridge.sol#L210)\n", "first_markdown_element": "src/bridge/AbsBridge.sol#L45", "id": "1429c66a7ef6604ab613ab75ad90b05e995db303ea73e2ad90d7418606553557", "check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "variable", "name": "offset", "source_mapping": {"start": 7766, "length": 18, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [243], "starting_column": 13, "ending_column": 31}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7346, "length": 3437, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18098, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset)", "source_mapping": {"start": 9277, "length": 59, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [274], "starting_column": 13, "ending_column": 72}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7346, "length": 3437, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18098, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "(functionPointer,offset) = Deserialize.value(proof,offset)", "source_mapping": {"start": 9350, "length": 60, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [275], "starting_column": 13, "ending_column": 73}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7346, "length": 3437, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18098, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).offset (src/osp/OneStepProver0.sol#243) is written in both\n\t(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset) (src/osp/OneStepProver0.sol#274)\n\t(functionPointer,offset) = Deserialize.value(proof,offset) (src/osp/OneStepProver0.sol#275)\n", "markdown": "[OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).offset](src/osp/OneStepProver0.sol#L243) is written in both\n\t[(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset)](src/osp/OneStepProver0.sol#L274)\n\t[(functionPointer,offset) = Deserialize.value(proof,offset)](src/osp/OneStepProver0.sol#L275)\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L243", "id": "119f8bb1f7cf5b025a17014fbcbfa276b55a0da31d2dbbb3e829175015ac8d95", "check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "_deployFactories", "source_mapping": {"start": 11739, "length": 2321, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}, {"type": "node", "name": "l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas)", "source_mapping": {"start": 12116, "length": 77, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [291], "starting_column": 13, "ending_column": 90}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployFactories", "source_mapping": {"start": 11739, "length": 2321, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}}}, {"type": "node", "name": "(sent,None) = msg.sender.call{value: address(this).balance}()", "source_mapping": {"start": 12304, "length": 64, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [295], "starting_column": 13, "ending_column": 77}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployFactories", "source_mapping": {"start": 11739, "length": 2321, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}}}], "description": "RollupCreator._deployFactories(address,address,uint256) (src/rollup/RollupCreator.sol#280-331) sends eth to arbitrary user\n\tDangerous calls:\n\t- l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas) (src/rollup/RollupCreator.sol#291)\n\t- (sent,None) = msg.sender.call{value: address(this).balance}() (src/rollup/RollupCreator.sol#295)\n", "markdown": "[RollupCreator._deployFactories(address,address,uint256)](src/rollup/RollupCreator.sol#L280-L331) sends eth to arbitrary user\n\tDangerous calls:\n\t- [l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas)](src/rollup/RollupCreator.sol#L291)\n\t- [(sent,None) = msg.sender.call{value: address(this).balance}()](src/rollup/RollupCreator.sol#L295)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L280-L331", "id": "fdf8b3ce52054c46faba8c975edb6b1c154a35b93000ba6e1c7004a6c4a77603", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_scaleDownToNativeDecimals", "source_mapping": {"start": 14066, "length": 447, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "_scaleDownToNativeDecimals(uint256,uint8)"}}, {"type": "node", "name": "scaledAmount = amount / (10 ** (18 - decimals))", "source_mapping": {"start": 14270, "length": 47, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [339], "starting_column": 13, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "_scaleDownToNativeDecimals", "source_mapping": {"start": 14066, "length": 447, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "_scaleDownToNativeDecimals(uint256,uint8)"}}}}, {"type": "node", "name": "scaledAmount * (10 ** (18 - decimals)) < amount", "source_mapping": {"start": 14372, "length": 47, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [341], "starting_column": 17, "ending_column": 64}, "type_specific_fields": {"parent": {"type": "function", "name": "_scaleDownToNativeDecimals", "source_mapping": {"start": 14066, "length": 447, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "_scaleDownToNativeDecimals(uint256,uint8)"}}}}], "description": "RollupCreator._scaleDownToNativeDecimals(uint256,uint8) (src/rollup/RollupCreator.sol#333-346) performs a multiplication on the result of a division:\n\t- scaledAmount = amount / (10 ** (18 - decimals)) (src/rollup/RollupCreator.sol#339)\n\t- scaledAmount * (10 ** (18 - decimals)) < amount (src/rollup/RollupCreator.sol#341)\n", "markdown": "[RollupCreator._scaleDownToNativeDecimals(uint256,uint8)](src/rollup/RollupCreator.sol#L333-L346) performs a multiplication on the result of a division:\n\t- [scaledAmount = amount / (10 ** (18 - decimals))](src/rollup/RollupCreator.sol#L339)\n\t- [scaledAmount * (10 ** (18 - decimals)) < amount](src/rollup/RollupCreator.sol#L341)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L333-L346", "id": "0e0f6d2066b98446d69e24946cd12898b97e656837797aa71c1b5028f78eb3e8", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "getKeysetCreationBlock", "source_mapping": {"start": 34450, "length": 262, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [843, 844, 845, 846, 847], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2051, "length": 32663, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848], "starting_column": 1, "ending_column": 2}}, "signature": "getKeysetCreationBlock(bytes32)"}}, {"type": "node", "name": "ksInfo.creationBlock == 0", "source_mapping": {"start": 34605, "length": 25, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [845], "starting_column": 13, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "getKeysetCreationBlock", "source_mapping": {"start": 34450, "length": 262, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [843, 844, 845, 846, 847], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2051, "length": 32663, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848], "starting_column": 1, "ending_column": 2}}, "signature": "getKeysetCreationBlock(bytes32)"}}}}], "description": "SequencerInbox.getKeysetCreationBlock(bytes32) (src/bridge/SequencerInbox.sol#843-847) uses a dangerous strict equality:\n\t- ksInfo.creationBlock == 0 (src/bridge/SequencerInbox.sol#845)\n", "markdown": "[SequencerInbox.getKeysetCreationBlock(bytes32)](src/bridge/SequencerInbox.sol#L843-L847) uses a dangerous strict equality:\n\t- [ksInfo.creationBlock == 0](src/bridge/SequencerInbox.sol#L845)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L843-L847", "id": "6be16db84d75c882c456a14b9fa120d50a80eb6e347917493afd89d52f8804e6", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "packHeader", "source_mapping": {"start": 21069, "length": 605, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2051, "length": 32663, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848], "starting_column": 1, "ending_column": 2}}, "signature": "packHeader(uint256)"}}, {"type": "node", "name": "assert(bool)(header.length == HEADER_LENGTH)", "source_mapping": {"start": 21592, "length": 38, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [567], "starting_column": 9, "ending_column": 47}, "type_specific_fields": {"parent": {"type": "function", "name": "packHeader", "source_mapping": {"start": 21069, "length": 605, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2051, "length": 32663, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848], "starting_column": 1, "ending_column": 2}}, "signature": "packHeader(uint256)"}}}}], "description": "SequencerInbox.packHeader(uint256) (src/bridge/SequencerInbox.sol#555-569) uses a dangerous strict equality:\n\t- assert(bool)(header.length == HEADER_LENGTH) (src/bridge/SequencerInbox.sol#567)\n", "markdown": "[SequencerInbox.packHeader(uint256)](src/bridge/SequencerInbox.sol#L555-L569) uses a dangerous strict equality:\n\t- [assert(bool)(header.length == HEADER_LENGTH)](src/bridge/SequencerInbox.sol#L567)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L555-L569", "id": "b75e5f9ba9a2521ee252211683919b7797c84d6c832cfeb55ffb8907dcf89f5f", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 28035, "length": 1009, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2051, "length": 32663, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}, {"type": "node", "name": "(seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount)", "source_mapping": {"start": 28558, "length": 171, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [697, 698, 699], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 28035, "length": 1009, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2051, "length": 32663, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "totalDelayedMessagesRead = afterDelayedMessagesRead", "source_mapping": {"start": 28740, "length": 51, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [701], "starting_column": 9, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 28035, "length": 1009, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2051, "length": 32663, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "totalDelayedMessagesRead"}}], "description": "Reentrancy in SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#684-707):\n\tExternal calls:\n\t- (seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount) (src/bridge/SequencerInbox.sol#697-699)\n\tState variables written after the call(s):\n\t- totalDelayedMessagesRead = afterDelayedMessagesRead (src/bridge/SequencerInbox.sol#701)\n\tSequencerInbox.totalDelayedMessagesRead (src/bridge/SequencerInbox.sol#64) can be used in cross function reentrancies:\n\t- SequencerInbox._setBufferConfig(BufferConfig) (src/bridge/SequencerInbox.sol#732-750)\n\t- SequencerInbox.addSequencerL2BatchFromBlobsImpl(uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#403-447)\n\t- SequencerInbox.addSequencerL2BatchFromCalldataImpl(uint256,bytes,uint256,uint256,uint256,bool) (src/bridge/SequencerInbox.sol#449-488)\n\t- SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#684-707)\n\t- SequencerInbox.delayProofImpl(uint256,DelayProof) (src/bridge/SequencerInbox.sol#526-546)\n\t- SequencerInbox.forceInclusion(uint256,uint8,uint64[2],uint256,address,bytes32) (src/bridge/SequencerInbox.sol#260-317)\n\t- SequencerInbox.isDelayProofRequired(uint256) (src/bridge/SequencerInbox.sol#548-553)\n\t- SequencerInbox.totalDelayedMessagesRead (src/bridge/SequencerInbox.sol#64)\n", "markdown": "Reentrancy in [SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L684-L707):\n\tExternal calls:\n\t- [(seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount)](src/bridge/SequencerInbox.sol#L697-L699)\n\tState variables written after the call(s):\n\t- [totalDelayedMessagesRead = afterDelayedMessagesRead](src/bridge/SequencerInbox.sol#L701)\n\t[SequencerInbox.totalDelayedMessagesRead](src/bridge/SequencerInbox.sol#L64) can be used in cross function reentrancies:\n\t- [SequencerInbox._setBufferConfig(BufferConfig)](src/bridge/SequencerInbox.sol#L732-L750)\n\t- [SequencerInbox.addSequencerL2BatchFromBlobsImpl(uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L403-L447)\n\t- [SequencerInbox.addSequencerL2BatchFromCalldataImpl(uint256,bytes,uint256,uint256,uint256,bool)](src/bridge/SequencerInbox.sol#L449-L488)\n\t- [SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L684-L707)\n\t- [SequencerInbox.delayProofImpl(uint256,DelayProof)](src/bridge/SequencerInbox.sol#L526-L546)\n\t- [SequencerInbox.forceInclusion(uint256,uint8,uint64[2],uint256,address,bytes32)](src/bridge/SequencerInbox.sol#L260-L317)\n\t- [SequencerInbox.isDelayProofRequired(uint256)](src/bridge/SequencerInbox.sol#L548-L553)\n\t- [SequencerInbox.totalDelayedMessagesRead](src/bridge/SequencerInbox.sol#L64)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L684-L707", "id": "1f90fe41ac5d8bdfebe9e0bceec9b16262c17d7be9bde6e4eaf8ad0ff20c7234", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7275, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 11951, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}, {"type": "node", "name": "executeBridgeCall(to,amountToUnlock,data)", "source_mapping": {"start": 8418, "length": 43, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [219], "starting_column": 9, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7275, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 11951, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "(success,returndata) = bridge.executeCall(to,value,data)", "source_mapping": {"start": 10012, "length": 77, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [258], "starting_column": 9, "ending_column": 86}, "type_specific_fields": {"parent": {"type": "function", "name": "executeBridgeCall", "source_mapping": {"start": 9920, "length": 564, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 11951, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeBridgeCall(address,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "context = prevContext", "source_mapping": {"start": 8472, "length": 21, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [221], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7275, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 11951, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "context"}}], "description": "Reentrancy in AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#189-222):\n\tExternal calls:\n\t- executeBridgeCall(to,amountToUnlock,data) (src/bridge/AbsOutbox.sol#219)\n\t\t- (success,returndata) = bridge.executeCall(to,value,data) (src/bridge/AbsOutbox.sol#258)\n\tState variables written after the call(s):\n\t- context = prevContext (src/bridge/AbsOutbox.sol#221)\n\tAbsOutbox.context (src/bridge/AbsOutbox.sol#51) can be used in cross function reentrancies:\n\t- AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#189-222)\n\t- AbsOutbox.initialize(IBridge) (src/bridge/AbsOutbox.sol#63-79)\n\t- AbsOutbox.l2ToL1Block() (src/bridge/AbsOutbox.sol#119-124)\n\t- AbsOutbox.l2ToL1EthBlock() (src/bridge/AbsOutbox.sol#127-132)\n\t- AbsOutbox.l2ToL1OutputId() (src/bridge/AbsOutbox.sol#148-153)\n\t- AbsOutbox.l2ToL1Sender() (src/bridge/AbsOutbox.sol#111-116)\n\t- AbsOutbox.l2ToL1Timestamp() (src/bridge/AbsOutbox.sol#135-140)\n\t- AbsOutbox.postUpgradeInit() (src/bridge/AbsOutbox.sol#81-92)\n", "markdown": "Reentrancy in [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L189-L222):\n\tExternal calls:\n\t- [executeBridgeCall(to,amountToUnlock,data)](src/bridge/AbsOutbox.sol#L219)\n\t\t- [(success,returndata) = bridge.executeCall(to,value,data)](src/bridge/AbsOutbox.sol#L258)\n\tState variables written after the call(s):\n\t- [context = prevContext](src/bridge/AbsOutbox.sol#L221)\n\t[AbsOutbox.context](src/bridge/AbsOutbox.sol#L51) can be used in cross function reentrancies:\n\t- [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L189-L222)\n\t- [AbsOutbox.initialize(IBridge)](src/bridge/AbsOutbox.sol#L63-L79)\n\t- [AbsOutbox.l2ToL1Block()](src/bridge/AbsOutbox.sol#L119-L124)\n\t- [AbsOutbox.l2ToL1EthBlock()](src/bridge/AbsOutbox.sol#L127-L132)\n\t- [AbsOutbox.l2ToL1OutputId()](src/bridge/AbsOutbox.sol#L148-L153)\n\t- [AbsOutbox.l2ToL1Sender()](src/bridge/AbsOutbox.sol#L111-L116)\n\t- [AbsOutbox.l2ToL1Timestamp()](src/bridge/AbsOutbox.sol#L135-L140)\n\t- [AbsOutbox.postUpgradeInit()](src/bridge/AbsOutbox.sol#L81-L92)\n", "first_markdown_element": "src/bridge/AbsOutbox.sol#L189-L222", "id": "0a0e436466b038ce944fbdeaa8d71ae2f396fa1601b487933c6d90cbe62677e1", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "proveOneStep", "source_mapping": {"start": 3030, "length": 5687, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 8312, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212], "starting_column": 1, "ending_column": 2}}, "signature": "proveOneStep(ExecutionContext,uint256,bytes32,bytes)"}}, {"type": "node", "name": "mach.setPcFromRecovery()", "source_mapping": {"start": 8598, "length": 24, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [206], "starting_column": 13, "ending_column": 37}, "type_specific_fields": {"parent": {"type": "function", "name": "proveOneStep", "source_mapping": {"start": 3030, "length": 5687, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 8312, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212], "starting_column": 1, "ending_column": 2}}, "signature": "proveOneStep(ExecutionContext,uint256,bytes32,bytes)"}}}}], "description": "OneStepProofEntry.proveOneStep(ExecutionContext,uint256,bytes32,bytes) (src/osp/OneStepProofEntry.sol#86-211) ignores return value by mach.setPcFromRecovery() (src/osp/OneStepProofEntry.sol#206)\n", "markdown": "[OneStepProofEntry.proveOneStep(ExecutionContext,uint256,bytes32,bytes)](src/osp/OneStepProofEntry.sol#L86-L211) ignores return value by [mach.setPcFromRecovery()](src/osp/OneStepProofEntry.sol#L206)\n", "first_markdown_element": "src/osp/OneStepProofEntry.sol#L86-L211", "id": "8ae8ed1d98c1dcf14535982abaf745e46c8d80b38b135d0edec8a083f97d5a70", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createRollup", "source_mapping": {"start": 5935, "length": 5198, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}, {"type": "node", "name": "(None,ethSequencerInbox,ethDelayBufferableSequencerInbox,ethInbox,None,None) = bridgeCreator.ethBasedTemplates()", "source_mapping": {"start": 6138, "length": 241, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [141, 142, 143, 144, 145, 146, 147], "starting_column": 13, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "createRollup", "source_mapping": {"start": 5935, "length": 5198, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}}}], "description": "RollupCreator.createRollup(RollupCreator.RollupDeploymentParams) (src/rollup/RollupCreator.sol#136-260) ignores return value by (None,ethSequencerInbox,ethDelayBufferableSequencerInbox,ethInbox,None,None) = bridgeCreator.ethBasedTemplates() (src/rollup/RollupCreator.sol#141-147)\n", "markdown": "[RollupCreator.createRollup(RollupCreator.RollupDeploymentParams)](src/rollup/RollupCreator.sol#L136-L260) ignores return value by [(None,ethSequencerInbox,ethDelayBufferableSequencerInbox,ethInbox,None,None) = bridgeCreator.ethBasedTemplates()](src/rollup/RollupCreator.sol#L141-L147)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L136-L260", "id": "c1a40e3f2c95e13f7a1718f0d7369763b095908255084336d078e8b3575da281", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createRollup", "source_mapping": {"start": 5935, "length": 5198, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}, {"type": "node", "name": "(None,erc20SequencerInbox,erc20DelayBufferableSequencerInbox,erc20Inbox,None,None) = bridgeCreator.erc20BasedTemplates()", "source_mapping": {"start": 6824, "length": 249, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [158, 159, 160, 161, 162, 163, 164], "starting_column": 13, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "createRollup", "source_mapping": {"start": 5935, "length": 5198, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13812, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}}}], "description": "RollupCreator.createRollup(RollupCreator.RollupDeploymentParams) (src/rollup/RollupCreator.sol#136-260) ignores return value by (None,erc20SequencerInbox,erc20DelayBufferableSequencerInbox,erc20Inbox,None,None) = bridgeCreator.erc20BasedTemplates() (src/rollup/RollupCreator.sol#158-164)\n", "markdown": "[RollupCreator.createRollup(RollupCreator.RollupDeploymentParams)](src/rollup/RollupCreator.sol#L136-L260) ignores return value by [(None,erc20SequencerInbox,erc20DelayBufferableSequencerInbox,erc20Inbox,None,None) = bridgeCreator.erc20BasedTemplates()](src/rollup/RollupCreator.sol#L158-L164)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L136-L260", "id": "74ea23f631d692749801bd6a119fbd7990d03e58c05083b695543c3ba1711376", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "state256", "source_mapping": {"start": 4655, "length": 27, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [123], "starting_column": 13, "ending_column": 40}, "type_specific_fields": {"parent": {"type": "function", "name": "keccakUpdate", "source_mapping": {"start": 3665, "length": 1456, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "HashProofHelper", "source_mapping": {"start": 388, "length": 5258, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153], "starting_column": 1, "ending_column": 2}}, "signature": "keccakUpdate(HashProofHelper.KeccakState,bytes,bool)"}}}}], "description": "HashProofHelper.keccakUpdate(HashProofHelper.KeccakState,bytes,bool).state256 (src/osp/HashProofHelper.sol#123) is a local variable never initialized\n", "markdown": "[HashProofHelper.keccakUpdate(HashProofHelper.KeccakState,bytes,bool).state256](src/osp/HashProofHelper.sol#L123) is a local variable never initialized\n", "first_markdown_element": "src/osp/HashProofHelper.sol#L123", "id": "b10eafcd668276e8f081740d67fa003ef0534d1520e371c18e96833214fc3ff2", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_executeLowLevelCall", "source_mapping": {"start": 1379, "length": 299, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [42, 43, 44, 45, 46, 47, 48, 49], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Bridge", "source_mapping": {"start": 702, "length": 1090, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54], "starting_column": 1, "ending_column": 2}}, "signature": "_executeLowLevelCall(address,uint256,bytes)"}}, {"type": "node", "name": "(success,returnData) = to.call{value: value}(data)", "source_mapping": {"start": 1620, "length": 51, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [48], "starting_column": 9, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "_executeLowLevelCall", "source_mapping": {"start": 1379, "length": 299, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [42, 43, 44, 45, 46, 47, 48, 49], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Bridge", "source_mapping": {"start": 702, "length": 1090, "filename_relative": "src/bridge/Bridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/Bridge.sol", "filename_short": "src/bridge/Bridge.sol", "is_dependency": false, "lines": [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54], "starting_column": 1, "ending_column": 2}}, "signature": "_executeLowLevelCall(address,uint256,bytes)"}}}}], "description": "Bridge._executeLowLevelCall(address,uint256,bytes) (src/bridge/Bridge.sol#42-49) sends eth to arbitrary user\n\tDangerous calls:\n\t- (success,returnData) = to.call{value: value}(data) (src/bridge/Bridge.sol#48)\n", "markdown": "[Bridge._executeLowLevelCall(address,uint256,bytes)](src/bridge/Bridge.sol#L42-L49) sends eth to arbitrary user\n\tDangerous calls:\n\t- [(success,returnData) = to.call{value: value}(data)](src/bridge/Bridge.sol#L48)\n", "first_markdown_element": "src/bridge/Bridge.sol#L42-L49", "id": "52aa149e251bcbda3478032a3845253462c6d80e50cde35746a072dd6dd226a6", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})", "source_mapping": {"start": 10128, "length": 399, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [84, 85, 86, 87, 88, 89, 90, 91, 92, 93], "starting_column": 13, "ending_column": 15}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-97) sends eth to arbitrary user\n\tDangerous calls:\n\t- IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:}) (src/rollup/DeployHelper.sol#84-93)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L97) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})](src/rollup/DeployHelper.sol#L84-L93)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L97", "id": "d1ec2b644352e75b94e09d65fd713f55694a4ceacca0e6fb874bdee5efc53bb2", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "perform", "source_mapping": {"start": 10657, "length": 975, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}, {"type": "node", "name": "address(msg.sender).transfer(address(this).balance)", "source_mapping": {"start": 11564, "length": 51, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [129], "starting_column": 13, "ending_column": 64}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 10657, "length": 975, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}}}], "description": "DeployHelper.perform(address,address,uint256) (src/rollup/DeployHelper.sol#99-131) sends eth to arbitrary user\n\tDangerous calls:\n\t- address(msg.sender).transfer(address(this).balance) (src/rollup/DeployHelper.sol#129)\n", "markdown": "[DeployHelper.perform(address,address,uint256)](src/rollup/DeployHelper.sol#L99-L131) sends eth to arbitrary user\n\tDangerous calls:\n\t- [address(msg.sender).transfer(address(this).balance)](src/rollup/DeployHelper.sol#L129)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L99-L131", "id": "fb617afd931bd700d3e06b33ba5e20239e5549a2054dedabe3ad0ed7d0dfae81", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deployFactories", "source_mapping": {"start": 11753, "length": 2321, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}, {"type": "node", "name": "l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas)", "source_mapping": {"start": 12130, "length": 77, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [293], "starting_column": 13, "ending_column": 90}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployFactories", "source_mapping": {"start": 11753, "length": 2321, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}}}, {"type": "node", "name": "(sent,None) = msg.sender.call{value: address(this).balance}()", "source_mapping": {"start": 12318, "length": 64, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [297], "starting_column": 13, "ending_column": 77}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployFactories", "source_mapping": {"start": 11753, "length": 2321, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "_deployFactories(address,address,uint256)"}}}}], "description": "RollupCreator._deployFactories(address,address,uint256) (src/rollup/RollupCreator.sol#282-333) sends eth to arbitrary user\n\tDangerous calls:\n\t- l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas) (src/rollup/RollupCreator.sol#293)\n\t- (sent,None) = msg.sender.call{value: address(this).balance}() (src/rollup/RollupCreator.sol#297)\n", "markdown": "[RollupCreator._deployFactories(address,address,uint256)](src/rollup/RollupCreator.sol#L282-L333) sends eth to arbitrary user\n\tDangerous calls:\n\t- [l2FactoriesDeployer.perform{value: cost}(_inbox,_nativeToken,_maxFeePerGas)](src/rollup/RollupCreator.sol#L293)\n\t- [(sent,None) = msg.sender.call{value: address(this).balance}()](src/rollup/RollupCreator.sol#L297)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L282-L333", "id": "73b83bb8325dfedb22fb8e52d3834ac78e1dc2429c003506e285f217a5b42ecd", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "deploy", "source_mapping": {"start": 660, "length": 435, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "FactoryDeployerHelper", "source_mapping": {"start": 373, "length": 724, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], "starting_column": 1, "ending_column": 2}}, "signature": "deploy(address,uint256)"}}, {"type": "node", "name": "IERC20(feeToken).transferFrom(msg.sender,inbox,amount)", "source_mapping": {"start": 955, "length": 56, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [22], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "deploy", "source_mapping": {"start": 660, "length": 435, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "FactoryDeployerHelper", "source_mapping": {"start": 373, "length": 724, "filename_relative": "src/rollup/FactoryDeployerHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/FactoryDeployerHelper.sol", "filename_short": "src/rollup/FactoryDeployerHelper.sol", "is_dependency": false, "lines": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], "starting_column": 1, "ending_column": 2}}, "signature": "deploy(address,uint256)"}}}}], "description": "FactoryDeployerHelper.deploy(address,uint256) (src/rollup/FactoryDeployerHelper.sol#17-24) ignores return value by IERC20(feeToken).transferFrom(msg.sender,inbox,amount) (src/rollup/FactoryDeployerHelper.sol#22)\n", "markdown": "[FactoryDeployerHelper.deploy(address,uint256)](src/rollup/FactoryDeployerHelper.sol#L17-L24) ignores return value by [IERC20(feeToken).transferFrom(msg.sender,inbox,amount)](src/rollup/FactoryDeployerHelper.sol#L22)\n", "first_markdown_element": "src/rollup/FactoryDeployerHelper.sol#L17-L24", "id": "b61f6cd7e1b9dac16bde231f4604f5082f9d2bb1141b083d7b0c790237076ce2", "check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "confirmPeriodBlocks", "source_mapping": {"start": 1167, "length": 33, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [33], "starting_column": 5, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "createNewAssertion", "source_mapping": {"start": 16738, "length": 9004, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}, "signature": "createNewAssertion(AssertionInputs,bytes32,bytes32)"}}], "description": "RollupCore.confirmPeriodBlocks (src/rollup/RollupCore.sol#33) is never initialized. It is used in:\n\t- RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32) (src/rollup/RollupCore.sol#400-565)\n", "markdown": "[RollupCore.confirmPeriodBlocks](src/rollup/RollupCore.sol#L33) is never initialized. It is used in:\n\t- [RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32)](src/rollup/RollupCore.sol#L400-L565)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L33", "id": "1c37a6aadb6971fe6e3c1b847380a4532a0e4c5e2dc0bd82aa28ab054b8cfd2f", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "validatorAfkBlocks", "source_mapping": {"start": 1357, "length": 32, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [35], "starting_column": 5, "ending_column": 37}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "_validatorIsAfk", "source_mapping": {"start": 1419, "length": 870, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "_validatorIsAfk()"}}], "description": "RollupCore.validatorAfkBlocks (src/rollup/RollupCore.sol#35) is never initialized. It is used in:\n\t- RollupUserLogic._validatorIsAfk() (src/rollup/RollupUserLogic.sol#38-49)\n", "markdown": "[RollupCore.validatorAfkBlocks](src/rollup/RollupCore.sol#L35) is never initialized. It is used in:\n\t- [RollupUserLogic._validatorIsAfk()](src/rollup/RollupUserLogic.sol#L38-L49)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L35", "id": "95e4bc5cceda098b9964b9d8686838f261e17090c782b4d3bfdab9eb97329697", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "baseStake", "source_mapping": {"start": 4218, "length": 24, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [78], "starting_column": 5, "ending_column": 29}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "createNewAssertion", "source_mapping": {"start": 16738, "length": 9004, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}, "signature": "createNewAssertion(AssertionInputs,bytes32,bytes32)"}}], "description": "RollupCore.baseStake (src/rollup/RollupCore.sol#78) is never initialized. It is used in:\n\t- RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32) (src/rollup/RollupCore.sol#400-565)\n", "markdown": "[RollupCore.baseStake](src/rollup/RollupCore.sol#L78) is never initialized. It is used in:\n\t- [RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32)](src/rollup/RollupCore.sol#L400-L565)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L78", "id": "de37c556b60ef133228362e77e70f0db5a5c225400a8d5024ccbcf67a406d08b", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "wasmModuleRoot", "source_mapping": {"start": 4249, "length": 29, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [80], "starting_column": 5, "ending_column": 34}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "createNewAssertion", "source_mapping": {"start": 16738, "length": 9004, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}, "signature": "createNewAssertion(AssertionInputs,bytes32,bytes32)"}}], "description": "RollupCore.wasmModuleRoot (src/rollup/RollupCore.sol#80) is never initialized. It is used in:\n\t- RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32) (src/rollup/RollupCore.sol#400-565)\n", "markdown": "[RollupCore.wasmModuleRoot](src/rollup/RollupCore.sol#L80) is never initialized. It is used in:\n\t- [RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32)](src/rollup/RollupCore.sol#L400-L565)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L80", "id": "8f79b8c8f36a1b0a5d892390641c5b1c28b934e1f18e0107a0858372e11100b8", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "challengeManager", "source_mapping": {"start": 4373, "length": 45, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [82], "starting_column": 5, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "createNewAssertion", "source_mapping": {"start": 16738, "length": 9004, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}, "signature": "createNewAssertion(AssertionInputs,bytes32,bytes32)"}}], "description": "RollupCore.challengeManager (src/rollup/RollupCore.sol#82) is never initialized. It is used in:\n\t- RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32) (src/rollup/RollupCore.sol#400-565)\n", "markdown": "[RollupCore.challengeManager](src/rollup/RollupCore.sol#L82) is never initialized. It is used in:\n\t- [RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32)](src/rollup/RollupCore.sol#L400-L565)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L82", "id": "8e9227cb773e5c776a930243bd0d86f9cc194ddad6fea08fa17922c7f3fcd9ec", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "challengeGracePeriodBlocks", "source_mapping": {"start": 4631, "length": 40, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [86], "starting_column": 5, "ending_column": 45}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "confirmAssertion", "source_mapping": {"start": 3042, "length": 2843, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "confirmAssertion(bytes32,bytes32,AssertionState,bytes32,ConfigData,bytes32)"}}], "description": "RollupCore.challengeGracePeriodBlocks (src/rollup/RollupCore.sol#86) is never initialized. It is used in:\n\t- RollupUserLogic.confirmAssertion(bytes32,bytes32,AssertionState,bytes32,ConfigData,bytes32) (src/rollup/RollupUserLogic.sol#71-124)\n", "markdown": "[RollupCore.challengeGracePeriodBlocks](src/rollup/RollupCore.sol#L86) is never initialized. It is used in:\n\t- [RollupUserLogic.confirmAssertion(bytes32,bytes32,AssertionState,bytes32,ConfigData,bytes32)](src/rollup/RollupUserLogic.sol#L71-L124)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L86", "id": "92b6fe61eac85569f2e0fcc87827330d6ed2d7a75695884dc26cb8c539e95a46", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "bridge", "source_mapping": {"start": 4707, "length": 21, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [89], "starting_column": 5, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "sequencerInbox", "source_mapping": {"start": 5884, "length": 136, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [120, 121, 122], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}, "signature": "sequencerInbox()"}}, {"type": "function", "name": "createNewAssertion", "source_mapping": {"start": 16738, "length": 9004, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}, "signature": "createNewAssertion(AssertionInputs,bytes32,bytes32)"}}, {"type": "function", "name": "fastConfirmNewAssertion", "source_mapping": {"start": 13855, "length": 1744, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNewAssertion(AssertionInputs,bytes32)"}}], "description": "RollupCore.bridge (src/rollup/RollupCore.sol#89) is never initialized. It is used in:\n\t- RollupCore.sequencerInbox() (src/rollup/RollupCore.sol#120-122)\n\t- RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32) (src/rollup/RollupCore.sol#400-565)\n\t- RollupUserLogic.fastConfirmNewAssertion(AssertionInputs,bytes32) (src/rollup/RollupUserLogic.sol#303-339)\n", "markdown": "[RollupCore.bridge](src/rollup/RollupCore.sol#L89) is never initialized. It is used in:\n\t- [RollupCore.sequencerInbox()](src/rollup/RollupCore.sol#L120-L122)\n\t- [RollupCore.createNewAssertion(AssertionInputs,bytes32,bytes32)](src/rollup/RollupCore.sol#L400-L565)\n\t- [RollupUserLogic.fastConfirmNewAssertion(AssertionInputs,bytes32)](src/rollup/RollupUserLogic.sol#L303-L339)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L89", "id": "227437d54d7c8a08d17319e938cf7a2d5d9e8dbcce2e3178ceac51a07766fd9d", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "outbox", "source_mapping": {"start": 4734, "length": 21, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [90], "starting_column": 5, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "confirmAssertionInternal", "source_mapping": {"start": 11114, "length": 1189, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}, "signature": "confirmAssertionInternal(bytes32,bytes32,AssertionState,bytes32)"}}], "description": "RollupCore.outbox (src/rollup/RollupCore.sol#90) is never initialized. It is used in:\n\t- RollupCore.confirmAssertionInternal(bytes32,bytes32,AssertionState,bytes32) (src/rollup/RollupCore.sol#266-297)\n", "markdown": "[RollupCore.outbox](src/rollup/RollupCore.sol#L90) is never initialized. It is used in:\n\t- [RollupCore.confirmAssertionInternal(bytes32,bytes32,AssertionState,bytes32)](src/rollup/RollupCore.sol#L266-L297)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L90", "id": "ab6f7e2618db3a2b41d963015ad7784feb766fe6d55eb440d4389246405d2781", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "loserStakeEscrow", "source_mapping": {"start": 4943, "length": 31, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [96], "starting_column": 5, "ending_column": 36}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "stakeOnNewAssertion", "source_mapping": {"start": 7198, "length": 2956, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnNewAssertion(AssertionInputs,bytes32)"}}, {"type": "function", "name": "fastConfirmNewAssertion", "source_mapping": {"start": 13855, "length": 1744, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNewAssertion(AssertionInputs,bytes32)"}}], "description": "RollupCore.loserStakeEscrow (src/rollup/RollupCore.sol#96) is never initialized. It is used in:\n\t- RollupUserLogic.stakeOnNewAssertion(AssertionInputs,bytes32) (src/rollup/RollupUserLogic.sol#160-218)\n\t- RollupUserLogic.fastConfirmNewAssertion(AssertionInputs,bytes32) (src/rollup/RollupUserLogic.sol#303-339)\n", "markdown": "[RollupCore.loserStakeEscrow](src/rollup/RollupCore.sol#L96) is never initialized. It is used in:\n\t- [RollupUserLogic.stakeOnNewAssertion(AssertionInputs,bytes32)](src/rollup/RollupUserLogic.sol#L160-L218)\n\t- [RollupUserLogic.fastConfirmNewAssertion(AssertionInputs,bytes32)](src/rollup/RollupUserLogic.sol#L303-L339)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L96", "id": "c551db048e8e09a4bc404561c03bae2d6824a7e0cc132ffec35cb7143b040eec", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "stakeToken", "source_mapping": {"start": 4980, "length": 25, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [97], "starting_column": 5, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "stakeOnNewAssertion", "source_mapping": {"start": 7198, "length": 2956, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnNewAssertion(AssertionInputs,bytes32)"}}, {"type": "function", "name": "fastConfirmNewAssertion", "source_mapping": {"start": 13855, "length": 1744, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmNewAssertion(AssertionInputs,bytes32)"}}, {"type": "function", "name": "withdrawStakerFunds", "source_mapping": {"start": 18781, "length": 348, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [411, 412, 413, 414, 415, 416, 417], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "withdrawStakerFunds()"}}, {"type": "function", "name": "receiveTokens", "source_mapping": {"start": 19135, "length": 144, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [419, 420, 421], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "receiveTokens(uint256)"}}], "description": "RollupCore.stakeToken (src/rollup/RollupCore.sol#97) is never initialized. It is used in:\n\t- RollupUserLogic.stakeOnNewAssertion(AssertionInputs,bytes32) (src/rollup/RollupUserLogic.sol#160-218)\n\t- RollupUserLogic.fastConfirmNewAssertion(AssertionInputs,bytes32) (src/rollup/RollupUserLogic.sol#303-339)\n\t- RollupUserLogic.withdrawStakerFunds() (src/rollup/RollupUserLogic.sol#411-417)\n\t- RollupUserLogic.receiveTokens(uint256) (src/rollup/RollupUserLogic.sol#419-421)\n", "markdown": "[RollupCore.stakeToken](src/rollup/RollupCore.sol#L97) is never initialized. It is used in:\n\t- [RollupUserLogic.stakeOnNewAssertion(AssertionInputs,bytes32)](src/rollup/RollupUserLogic.sol#L160-L218)\n\t- [RollupUserLogic.fastConfirmNewAssertion(AssertionInputs,bytes32)](src/rollup/RollupUserLogic.sol#L303-L339)\n\t- [RollupUserLogic.withdrawStakerFunds()](src/rollup/RollupUserLogic.sol#L411-L417)\n\t- [RollupUserLogic.receiveTokens(uint256)](src/rollup/RollupUserLogic.sol#L419-L421)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L97", "id": "2c82d0f621af0d146f6e5ccccf7d553dceb5e5ba1b970260b3c9c43d62aff334", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "minimumAssertionPeriod", "source_mapping": {"start": 5011, "length": 37, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [98], "starting_column": 5, "ending_column": 42}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "stakeOnNewAssertion", "source_mapping": {"start": 7198, "length": 2956, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "stakeOnNewAssertion(AssertionInputs,bytes32)"}}], "description": "RollupCore.minimumAssertionPeriod (src/rollup/RollupCore.sol#98) is never initialized. It is used in:\n\t- RollupUserLogic.stakeOnNewAssertion(AssertionInputs,bytes32) (src/rollup/RollupUserLogic.sol#160-218)\n", "markdown": "[RollupCore.minimumAssertionPeriod](src/rollup/RollupCore.sol#L98) is never initialized. It is used in:\n\t- [RollupUserLogic.stakeOnNewAssertion(AssertionInputs,bytes32)](src/rollup/RollupUserLogic.sol#L160-L218)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L98", "id": "082aebc9dd45c730e43a71e0e7155db870d28b7ecad69fac91bba4a939a85c1c", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "variable", "name": "anyTrustFastConfirmer", "source_mapping": {"start": 5491, "length": 36, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [113], "starting_column": 5, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "fastConfirmAssertion", "source_mapping": {"start": 12686, "length": 433, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [282, 283, 284, 285, 286, 287, 288, 289, 290, 291], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupUserLogic", "source_mapping": {"start": 477, "length": 18804, "filename_relative": "src/rollup/RollupUserLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupUserLogic.sol", "filename_short": "src/rollup/RollupUserLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422], "starting_column": 1, "ending_column": 2}}, "signature": "fastConfirmAssertion(bytes32,bytes32,AssertionState,bytes32)"}}], "description": "RollupCore.anyTrustFastConfirmer (src/rollup/RollupCore.sol#113) is never initialized. It is used in:\n\t- RollupUserLogic.fastConfirmAssertion(bytes32,bytes32,AssertionState,bytes32) (src/rollup/RollupUserLogic.sol#282-291)\n", "markdown": "[RollupCore.anyTrustFastConfirmer](src/rollup/RollupCore.sol#L113) is never initialized. It is used in:\n\t- [RollupUserLogic.fastConfirmAssertion(bytes32,bytes32,AssertionState,bytes32)](src/rollup/RollupUserLogic.sol#L282-L291)\n", "first_markdown_element": "src/rollup/RollupCore.sol#L113", "id": "a0c6e32b77dec8b9a1fb41ffdae062d1e32f17355e66df0962f2e35c10bfb10a", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "function", "name": "refundsGas", "source_mapping": {"start": 723, "length": 2113, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2529, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}, {"type": "node", "name": "calldataWords = (calldataSize + 31) / 32", "source_mapping": {"start": 962, "length": 48, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [22], "starting_column": 13, "ending_column": 61}, "type_specific_fields": {"parent": {"type": "function", "name": "refundsGas", "source_mapping": {"start": 723, "length": 2113, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2529, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}}}, {"type": "node", "name": "startGasLeft += calldataWords * 6 + (calldataWords ** 2) / 512", "source_mapping": {"start": 1132, "length": 62, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [24], "starting_column": 13, "ending_column": 75}, "type_specific_fields": {"parent": {"type": "function", "name": "refundsGas", "source_mapping": {"start": 723, "length": 2113, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2529, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}}}], "description": "GasRefundEnabled.refundsGas(IGasRefunder,IReader4844) (src/libraries/GasRefundEnabled.sol#17-50) performs a multiplication on the result of a division:\n\t- calldataWords = (calldataSize + 31) / 32 (src/libraries/GasRefundEnabled.sol#22)\n\t- startGasLeft += calldataWords * 6 + (calldataWords ** 2) / 512 (src/libraries/GasRefundEnabled.sol#24)\n", "markdown": "[GasRefundEnabled.refundsGas(IGasRefunder,IReader4844)](src/libraries/GasRefundEnabled.sol#L17-L50) performs a multiplication on the result of a division:\n\t- [calldataWords = (calldataSize + 31) / 32](src/libraries/GasRefundEnabled.sol#L22)\n\t- [startGasLeft += calldataWords * 6 + (calldataWords ** 2) / 512](src/libraries/GasRefundEnabled.sol#L24)\n", "first_markdown_element": "src/libraries/GasRefundEnabled.sol#L17-L50", "id": "bb26256ad08f6833c6e0395d78c4b8a1182860d966d17803ac727cde7719e8b6", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4345, "length": 5738, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "rootOfUnityPower = (1 << 32) / fieldElementsPerBlob", "source_mapping": {"start": 9089, "length": 59, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [213], "starting_column": 17, "ending_column": 76}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4345, "length": 5738, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "rootOfUnityPower *= bitReversedIndex", "source_mapping": {"start": 9316, "length": 36, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [216], "starting_column": 17, "ending_column": 53}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4345, "length": 5738, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#115-234) performs a multiplication on the result of a division:\n\t- rootOfUnityPower = (1 << 32) / fieldElementsPerBlob (src/osp/OneStepProverHostIo.sol#213)\n\t- rootOfUnityPower *= bitReversedIndex (src/osp/OneStepProverHostIo.sol#216)\n", "markdown": "[OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L115-L234) performs a multiplication on the result of a division:\n\t- [rootOfUnityPower = (1 << 32) / fieldElementsPerBlob](src/osp/OneStepProverHostIo.sol#L213)\n\t- [rootOfUnityPower *= bitReversedIndex](src/osp/OneStepProverHostIo.sol#L216)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L115-L234", "id": "fb1ea8520c5a7f9e2aee6d6a9b6b1c788670e16ae67ce22f331218b0b7b07f44", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "feeAmountNativeDenominated = feeAmount / (10 ** (18 - decimals))", "source_mapping": {"start": 9234, "length": 64, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [63], "starting_column": 17, "ending_column": 81}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}, {"type": "node", "name": "feeAmountNativeDenominated * (10 ** (18 - decimals)) < feeAmount", "source_mapping": {"start": 9361, "length": 64, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [65], "starting_column": 21, "ending_column": 85}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-97) performs a multiplication on the result of a division:\n\t- feeAmountNativeDenominated = feeAmount / (10 ** (18 - decimals)) (src/rollup/DeployHelper.sol#63)\n\t- feeAmountNativeDenominated * (10 ** (18 - decimals)) < feeAmount (src/rollup/DeployHelper.sol#65)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L97) performs a multiplication on the result of a division:\n\t- [feeAmountNativeDenominated = feeAmount / (10 ** (18 - decimals))](src/rollup/DeployHelper.sol#L63)\n\t- [feeAmountNativeDenominated * (10 ** (18 - decimals)) < feeAmount](src/rollup/DeployHelper.sol#L65)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L97", "id": "421b8fc6dadb497b24de698bca203b68a7f158f3a03b72c621a1f0bb0050317f", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_scaleDownToNativeDecimals", "source_mapping": {"start": 14080, "length": 447, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "_scaleDownToNativeDecimals(uint256,uint8)"}}, {"type": "node", "name": "scaledAmount = amount / (10 ** (18 - decimals))", "source_mapping": {"start": 14284, "length": 47, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [341], "starting_column": 13, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "_scaleDownToNativeDecimals", "source_mapping": {"start": 14080, "length": 447, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "_scaleDownToNativeDecimals(uint256,uint8)"}}}}, {"type": "node", "name": "scaledAmount * (10 ** (18 - decimals)) < amount", "source_mapping": {"start": 14386, "length": 47, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [343], "starting_column": 17, "ending_column": 64}, "type_specific_fields": {"parent": {"type": "function", "name": "_scaleDownToNativeDecimals", "source_mapping": {"start": 14080, "length": 447, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "_scaleDownToNativeDecimals(uint256,uint8)"}}}}], "description": "RollupCreator._scaleDownToNativeDecimals(uint256,uint8) (src/rollup/RollupCreator.sol#335-348) performs a multiplication on the result of a division:\n\t- scaledAmount = amount / (10 ** (18 - decimals)) (src/rollup/RollupCreator.sol#341)\n\t- scaledAmount * (10 ** (18 - decimals)) < amount (src/rollup/RollupCreator.sol#343)\n", "markdown": "[RollupCreator._scaleDownToNativeDecimals(uint256,uint8)](src/rollup/RollupCreator.sol#L335-L348) performs a multiplication on the result of a division:\n\t- [scaledAmount = amount / (10 ** (18 - decimals))](src/rollup/RollupCreator.sol#L341)\n\t- [scaledAmount * (10 ** (18 - decimals)) < amount](src/rollup/RollupCreator.sol#L343)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L335-L348", "id": "c156f6066fa432c1bad401b1eba83e1ecc527862348685e9b707f2c0a59cab31", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "onGasSpent", "source_mapping": {"start": 5993, "length": 2881, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefunder", "source_mapping": {"start": 916, "length": 7960, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249], "starting_column": 1, "ending_column": 2}}, "signature": "onGasSpent(address,uint256,uint256)"}}, {"type": "node", "name": "ownBalance == 0", "source_mapping": {"start": 6259, "length": 15, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [183], "starting_column": 13, "ending_column": 28}, "type_specific_fields": {"parent": {"type": "function", "name": "onGasSpent", "source_mapping": {"start": 5993, "length": 2881, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefunder", "source_mapping": {"start": 916, "length": 7960, "filename_relative": "src/bridge/GasRefunder.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/GasRefunder.sol", "filename_short": "src/bridge/GasRefunder.sol", "is_dependency": false, "lines": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249], "starting_column": 1, "ending_column": 2}}, "signature": "onGasSpent(address,uint256,uint256)"}}}}], "description": "GasRefunder.onGasSpent(address,uint256,uint256) (src/bridge/GasRefunder.sol#174-248) uses a dangerous strict equality:\n\t- ownBalance == 0 (src/bridge/GasRefunder.sol#183)\n", "markdown": "[GasRefunder.onGasSpent(address,uint256,uint256)](src/bridge/GasRefunder.sol#L174-L248) uses a dangerous strict equality:\n\t- [ownBalance == 0](src/bridge/GasRefunder.sol#L183)\n", "first_markdown_element": "src/bridge/GasRefunder.sol#L174-L248", "id": "7130559f3bef7fa36dc1a06a74ba5036fede4a8f9a9b7aa15356ff38ae92691a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8733, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}, {"type": "node", "name": "index == entries.length", "source_mapping": {"start": 9191, "length": 23, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [258], "starting_column": 13, "ending_column": 36}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8733, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}}], "description": "CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#243-264) uses a dangerous strict equality:\n\t- index == entries.length (src/chain/CacheManager.sol#258)\n", "markdown": "[CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L243-L264) uses a dangerous strict equality:\n\t- [index == entries.length](src/chain/CacheManager.sol#L258)\n", "first_markdown_element": "src/chain/CacheManager.sol#L243-L264", "id": "87ae93aa2d7c39f221c53c53fe98a4da04537499a1d562fc97b0855c15551801", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "getKeysetCreationBlock", "source_mapping": {"start": 34547, "length": 262, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [854, 855, 856, 857, 858], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2080, "length": 32731, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859], "starting_column": 1, "ending_column": 2}}, "signature": "getKeysetCreationBlock(bytes32)"}}, {"type": "node", "name": "ksInfo.creationBlock == 0", "source_mapping": {"start": 34702, "length": 25, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [856], "starting_column": 13, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "getKeysetCreationBlock", "source_mapping": {"start": 34547, "length": 262, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [854, 855, 856, 857, 858], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2080, "length": 32731, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859], "starting_column": 1, "ending_column": 2}}, "signature": "getKeysetCreationBlock(bytes32)"}}}}], "description": "SequencerInbox.getKeysetCreationBlock(bytes32) (src/bridge/SequencerInbox.sol#854-858) uses a dangerous strict equality:\n\t- ksInfo.creationBlock == 0 (src/bridge/SequencerInbox.sol#856)\n", "markdown": "[SequencerInbox.getKeysetCreationBlock(bytes32)](src/bridge/SequencerInbox.sol#L854-L858) uses a dangerous strict equality:\n\t- [ksInfo.creationBlock == 0](src/bridge/SequencerInbox.sol#L856)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L854-L858", "id": "41dc81aba6ba0a967432f8cbd46ce6c9f7b44857dc91369d1099332597890838", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "function", "name": "packHeader", "source_mapping": {"start": 21112, "length": 619, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2080, "length": 32731, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859], "starting_column": 1, "ending_column": 2}}, "signature": "packHeader(uint256)"}}, {"type": "node", "name": "assert(bool)(header.length == HEADER_LENGTH)", "source_mapping": {"start": 21649, "length": 38, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [572], "starting_column": 9, "ending_column": 47}, "type_specific_fields": {"parent": {"type": "function", "name": "packHeader", "source_mapping": {"start": 21112, "length": 619, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2080, "length": 32731, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859], "starting_column": 1, "ending_column": 2}}, "signature": "packHeader(uint256)"}}}}], "description": "SequencerInbox.packHeader(uint256) (src/bridge/SequencerInbox.sol#558-574) uses a dangerous strict equality:\n\t- assert(bool)(header.length == HEADER_LENGTH) (src/bridge/SequencerInbox.sol#572)\n", "markdown": "[SequencerInbox.packHeader(uint256)](src/bridge/SequencerInbox.sol#L558-L574) uses a dangerous strict equality:\n\t- [assert(bool)(header.length == HEADER_LENGTH)](src/bridge/SequencerInbox.sol#L572)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L558-L574", "id": "f69543eb5b1ae0960ebc854332c401ce9ea96e8428623a47efb955f97f03ea0a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "node", "name": "_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas)", "source_mapping": {"start": 10792, "length": 198, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [104, 105, 106, 107, 108, 109, 110, 111], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 10657, "length": 975, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}}}, {"type": "node", "name": "_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas)", "source_mapping": {"start": 10792, "length": 198, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [104, 105, 106, 107, 108, 109, 110, 111], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 10657, "length": 975, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "perform(address,address,uint256)"}}}}], "description": "Multiple retryable tickets created in the same function:\n\t -_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas) (src/rollup/DeployHelper.sol#104-111)\n\t -_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas) (src/rollup/DeployHelper.sol#104-111)\n", "markdown": "Multiple retryable tickets created in the same function:\n\t -[_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas)](src/rollup/DeployHelper.sol#L104-L111)\n\t -[_fundAndDeploy(_inbox,NICK_CREATE2_VALUE,NICK_CREATE2_DEPLOYER,NICK_CREATE2_PAYLOAD,_nativeToken,_maxFeePerGas)](src/rollup/DeployHelper.sol#L104-L111)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L104-L111", "id": "57dee80d265d734de94504cc75914f43c66f7b20d070b37c69f116a3fb467b9a", "check": "out-of-order-retryable", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_addBid", "source_mapping": {"start": 8733, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheProgram(program)", "source_mapping": {"start": 9073, "length": 36, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [255], "starting_column": 9, "ending_column": 45}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8733, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 9160, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [257], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8733, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#243-264):\n\tExternal calls:\n\t- ARB_WASM_CACHE.cacheProgram(program) (src/chain/CacheManager.sol#255)\n\tState variables written after the call(s):\n\t- queueSize += size (src/chain/CacheManager.sol#257)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#27) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#243-264)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#267-273)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#225-240)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#127-155)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#199-208)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#27)\n", "markdown": "Reentrancy in [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L243-L264):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.cacheProgram(program)](src/chain/CacheManager.sol#L255)\n\tState variables written after the call(s):\n\t- [queueSize += size](src/chain/CacheManager.sol#L257)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L27) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L243-L264)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L267-L273)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L225-L240)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L127-L155)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L199-L208)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L27)\n", "first_markdown_element": "src/chain/CacheManager.sol#L243-L264", "id": "81799dff67f06d5aeaafeb033980e926b40b9ae7cc5702a20ba6f8539d50ea88", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9424, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [267, 268, 269, 270, 271, 272, 273], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9537, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [269], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9424, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [267, 268, 269, 270, 271, 272, 273], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "delete entries[index]", "source_mapping": {"start": 9673, "length": 21, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [272], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9424, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [267, 268, 269, 270, 271, 272, 273], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#267-273):\n\tExternal calls:\n\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#269)\n\tState variables written after the call(s):\n\t- delete entries[index] (src/chain/CacheManager.sol#272)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#243-264)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#267-273)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#225-240)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#92-95)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#107-109)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#113-123)\n", "markdown": "Reentrancy in [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L267-L273):\n\tExternal calls:\n\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L269)\n\tState variables written after the call(s):\n\t- [delete entries[index]](src/chain/CacheManager.sol#L272)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L243-L264)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L267-L273)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L225-L240)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L92-L95)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L107-L109)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L113-L123)\n", "first_markdown_element": "src/chain/CacheManager.sol#L267-L273", "id": "90fe78f9db3532395232f24809c37cd379c3775a86cb88933f2a54717f9d2593", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 28128, "length": 1009, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2080, "length": 32731, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}, {"type": "node", "name": "(seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount)", "source_mapping": {"start": 28651, "length": 171, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [707, 708, 709], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 28128, "length": 1009, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2080, "length": 32731, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "totalDelayedMessagesRead = afterDelayedMessagesRead", "source_mapping": {"start": 28833, "length": 51, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [711], "starting_column": 9, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "addSequencerL2BatchImpl", "source_mapping": {"start": 28128, "length": 1009, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2080, "length": 32731, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859], "starting_column": 1, "ending_column": 2}}, "signature": "addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "totalDelayedMessagesRead"}}], "description": "Reentrancy in SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#694-717):\n\tExternal calls:\n\t- (seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount) (src/bridge/SequencerInbox.sol#707-709)\n\tState variables written after the call(s):\n\t- totalDelayedMessagesRead = afterDelayedMessagesRead (src/bridge/SequencerInbox.sol#711)\n\tSequencerInbox.totalDelayedMessagesRead (src/bridge/SequencerInbox.sol#65) can be used in cross function reentrancies:\n\t- SequencerInbox._setBufferConfig(BufferConfig) (src/bridge/SequencerInbox.sol#742-760)\n\t- SequencerInbox.addSequencerL2BatchFromBlobsImpl(uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#406-450)\n\t- SequencerInbox.addSequencerL2BatchFromCalldataImpl(uint256,bytes,uint256,uint256,uint256,bool) (src/bridge/SequencerInbox.sol#452-491)\n\t- SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256) (src/bridge/SequencerInbox.sol#694-717)\n\t- SequencerInbox.delayProofImpl(uint256,DelayProof) (src/bridge/SequencerInbox.sol#529-549)\n\t- SequencerInbox.forceInclusion(uint256,uint8,uint64[2],uint256,address,bytes32) (src/bridge/SequencerInbox.sol#263-320)\n\t- SequencerInbox.isDelayProofRequired(uint256) (src/bridge/SequencerInbox.sol#551-556)\n\t- SequencerInbox.totalDelayedMessagesRead (src/bridge/SequencerInbox.sol#65)\n", "markdown": "Reentrancy in [SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L694-L717):\n\tExternal calls:\n\t- [(seqMessageIndex,beforeAcc,delayedAcc,acc) = bridge.enqueueSequencerMessage(dataHash,afterDelayedMessagesRead,prevMessageCount,newMessageCount)](src/bridge/SequencerInbox.sol#L707-L709)\n\tState variables written after the call(s):\n\t- [totalDelayedMessagesRead = afterDelayedMessagesRead](src/bridge/SequencerInbox.sol#L711)\n\t[SequencerInbox.totalDelayedMessagesRead](src/bridge/SequencerInbox.sol#L65) can be used in cross function reentrancies:\n\t- [SequencerInbox._setBufferConfig(BufferConfig)](src/bridge/SequencerInbox.sol#L742-L760)\n\t- [SequencerInbox.addSequencerL2BatchFromBlobsImpl(uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L406-L450)\n\t- [SequencerInbox.addSequencerL2BatchFromCalldataImpl(uint256,bytes,uint256,uint256,uint256,bool)](src/bridge/SequencerInbox.sol#L452-L491)\n\t- [SequencerInbox.addSequencerL2BatchImpl(bytes32,uint256,uint256,uint256,uint256)](src/bridge/SequencerInbox.sol#L694-L717)\n\t- [SequencerInbox.delayProofImpl(uint256,DelayProof)](src/bridge/SequencerInbox.sol#L529-L549)\n\t- [SequencerInbox.forceInclusion(uint256,uint8,uint64[2],uint256,address,bytes32)](src/bridge/SequencerInbox.sol#L263-L320)\n\t- [SequencerInbox.isDelayProofRequired(uint256)](src/bridge/SequencerInbox.sol#L551-L556)\n\t- [SequencerInbox.totalDelayedMessagesRead](src/bridge/SequencerInbox.sol#L65)\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L694-L717", "id": "d53ebf211554345e9218b4c6ddecd42fbe3b1f9679878fd46e1812611f6646c5", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "evictAll", "source_mapping": {"start": 2902, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [92, 93, 94, 95], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}, {"type": "node", "name": "evictPrograms(type()(uint256).max)", "source_mapping": {"start": 2951, "length": 32, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [93], "starting_column": 9, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2902, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [92, 93, 94, 95], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9537, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [269], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9424, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [267, 268, 269, 270, 271, 272, 273], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "delete entries", "source_mapping": {"start": 2993, "length": 14, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [94], "starting_column": 9, "ending_column": 23}, "type_specific_fields": {"parent": {"type": "function", "name": "evictAll", "source_mapping": {"start": 2902, "length": 112, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [92, 93, 94, 95], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "evictAll()"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}], "description": "Reentrancy in CacheManager.evictAll() (src/chain/CacheManager.sol#92-95):\n\tExternal calls:\n\t- evictPrograms(type()(uint256).max) (src/chain/CacheManager.sol#93)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#269)\n\tState variables written after the call(s):\n\t- delete entries (src/chain/CacheManager.sol#94)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#243-264)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#267-273)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#225-240)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#92-95)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#107-109)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#113-123)\n", "markdown": "Reentrancy in [CacheManager.evictAll()](src/chain/CacheManager.sol#L92-L95):\n\tExternal calls:\n\t- [evictPrograms(type()(uint256).max)](src/chain/CacheManager.sol#L93)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L269)\n\tState variables written after the call(s):\n\t- [delete entries](src/chain/CacheManager.sol#L94)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L243-L264)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L267-L273)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L225-L240)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L92-L95)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L107-L109)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L113-L123)\n", "first_markdown_element": "src/chain/CacheManager.sol#L92-L95", "id": "69833f17a5fa1a6eb3422e7a7966d48be12d1a86b909c450580f1a92c708b295", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7275, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 11965, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}, {"type": "node", "name": "executeBridgeCall(to,amountToUnlock,data)", "source_mapping": {"start": 8418, "length": 43, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [219], "starting_column": 9, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7275, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 11965, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "(success,returndata) = bridge.executeCall(to,value,data)", "source_mapping": {"start": 10026, "length": 77, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [260], "starting_column": 9, "ending_column": 86}, "type_specific_fields": {"parent": {"type": "function", "name": "executeBridgeCall", "source_mapping": {"start": 9934, "length": 564, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 11965, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315], "starting_column": 1, "ending_column": 2}}, "signature": "executeBridgeCall(address,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "context = prevContext", "source_mapping": {"start": 8472, "length": 21, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [221], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "executeTransactionImpl", "source_mapping": {"start": 7275, "length": 1225, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsOutbox", "source_mapping": {"start": 719, "length": 11965, "filename_relative": "src/bridge/AbsOutbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsOutbox.sol", "filename_short": "src/bridge/AbsOutbox.sol", "is_dependency": false, "lines": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315], "starting_column": 1, "ending_column": 2}}, "signature": "executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "context"}}], "description": "Reentrancy in AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#189-222):\n\tExternal calls:\n\t- executeBridgeCall(to,amountToUnlock,data) (src/bridge/AbsOutbox.sol#219)\n\t\t- (success,returndata) = bridge.executeCall(to,value,data) (src/bridge/AbsOutbox.sol#260)\n\tState variables written after the call(s):\n\t- context = prevContext (src/bridge/AbsOutbox.sol#221)\n\tAbsOutbox.context (src/bridge/AbsOutbox.sol#51) can be used in cross function reentrancies:\n\t- AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes) (src/bridge/AbsOutbox.sol#189-222)\n\t- AbsOutbox.initialize(IBridge) (src/bridge/AbsOutbox.sol#63-79)\n\t- AbsOutbox.l2ToL1Block() (src/bridge/AbsOutbox.sol#119-124)\n\t- AbsOutbox.l2ToL1EthBlock() (src/bridge/AbsOutbox.sol#127-132)\n\t- AbsOutbox.l2ToL1OutputId() (src/bridge/AbsOutbox.sol#148-153)\n\t- AbsOutbox.l2ToL1Sender() (src/bridge/AbsOutbox.sol#111-116)\n\t- AbsOutbox.l2ToL1Timestamp() (src/bridge/AbsOutbox.sol#135-140)\n\t- AbsOutbox.postUpgradeInit() (src/bridge/AbsOutbox.sol#81-92)\n", "markdown": "Reentrancy in [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L189-L222):\n\tExternal calls:\n\t- [executeBridgeCall(to,amountToUnlock,data)](src/bridge/AbsOutbox.sol#L219)\n\t\t- [(success,returndata) = bridge.executeCall(to,value,data)](src/bridge/AbsOutbox.sol#L260)\n\tState variables written after the call(s):\n\t- [context = prevContext](src/bridge/AbsOutbox.sol#L221)\n\t[AbsOutbox.context](src/bridge/AbsOutbox.sol#L51) can be used in cross function reentrancies:\n\t- [AbsOutbox.executeTransactionImpl(uint256,address,address,uint256,uint256,uint256,uint256,bytes)](src/bridge/AbsOutbox.sol#L189-L222)\n\t- [AbsOutbox.initialize(IBridge)](src/bridge/AbsOutbox.sol#L63-L79)\n\t- [AbsOutbox.l2ToL1Block()](src/bridge/AbsOutbox.sol#L119-L124)\n\t- [AbsOutbox.l2ToL1EthBlock()](src/bridge/AbsOutbox.sol#L127-L132)\n\t- [AbsOutbox.l2ToL1OutputId()](src/bridge/AbsOutbox.sol#L148-L153)\n\t- [AbsOutbox.l2ToL1Sender()](src/bridge/AbsOutbox.sol#L111-L116)\n\t- [AbsOutbox.l2ToL1Timestamp()](src/bridge/AbsOutbox.sol#L135-L140)\n\t- [AbsOutbox.postUpgradeInit()](src/bridge/AbsOutbox.sol#L81-L92)\n", "first_markdown_element": "src/bridge/AbsOutbox.sol#L189-L222", "id": "47a76f3f2f12009f1cd3b264f9ad2e68953b37d50ed823e70bd020cb20d80955", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "placeBid", "source_mapping": {"start": 6505, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}, {"type": "node", "name": "(bid,index) = _makeSpace(asm)", "source_mapping": {"start": 6813, "length": 45, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [192], "starting_column": 9, "ending_column": 54}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6505, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.evictCodehash(entry.code)", "source_mapping": {"start": 9537, "length": 40, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [269], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_deleteEntry", "source_mapping": {"start": 9424, "length": 277, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [267, 268, 269, 270, 271, 272, 273], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_deleteEntry(uint192,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,program,codehash,asm,index)", "source_mapping": {"start": 6868, "length": 50, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [193], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6505, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "external_calls"}}, {"type": "node", "name": "ARB_WASM_CACHE.cacheProgram(program)", "source_mapping": {"start": 9073, "length": 36, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [255], "starting_column": 9, "ending_column": 45}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8733, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "external_calls_sending_eth"}}, {"type": "node", "name": "_addBid(bid,program,codehash,asm,index)", "source_mapping": {"start": 6868, "length": 50, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [193], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6505, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries.push(entry)", "source_mapping": {"start": 9230, "length": 19, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [259], "starting_column": 13, "ending_column": 32}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8733, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "entries[index] = entry", "source_mapping": {"start": 9280, "length": 22, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [261], "starting_column": 13, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8733, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "entries"}}, {"type": "node", "name": "_addBid(bid,program,codehash,asm,index)", "source_mapping": {"start": 6868, "length": 50, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [193], "starting_column": 9, "ending_column": 59}, "type_specific_fields": {"parent": {"type": "function", "name": "placeBid", "source_mapping": {"start": 6505, "length": 420, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "placeBid(address)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}, {"type": "node", "name": "queueSize += size", "source_mapping": {"start": 9160, "length": 17, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [257], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "_addBid", "source_mapping": {"start": 8733, "length": 636, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_addBid(uint192,address,bytes32,uint64,uint64)"}}}, "additional_fields": {"underlying_type": "variables_written", "variable_name": "queueSize"}}], "description": "Reentrancy in CacheManager.placeBid(address) (src/chain/CacheManager.sol#182-194):\n\tExternal calls:\n\t- (bid,index) = _makeSpace(asm) (src/chain/CacheManager.sol#192)\n\t\t- ARB_WASM_CACHE.evictCodehash(entry.code) (src/chain/CacheManager.sol#269)\n\t- _addBid(bid,program,codehash,asm,index) (src/chain/CacheManager.sol#193)\n\t\t- ARB_WASM_CACHE.cacheProgram(program) (src/chain/CacheManager.sol#255)\n\tState variables written after the call(s):\n\t- _addBid(bid,program,codehash,asm,index) (src/chain/CacheManager.sol#193)\n\t\t- entries.push(entry) (src/chain/CacheManager.sol#259)\n\t\t- entries[index] = entry (src/chain/CacheManager.sol#261)\n\tCacheManager.entries (src/chain/CacheManager.sol#24) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#243-264)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#267-273)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#225-240)\n\t- CacheManager.entries (src/chain/CacheManager.sol#24)\n\t- CacheManager.evictAll() (src/chain/CacheManager.sol#92-95)\n\t- CacheManager.getEntries() (src/chain/CacheManager.sol#107-109)\n\t- CacheManager.getSmallestEntries(uint256) (src/chain/CacheManager.sol#113-123)\n\t- _addBid(bid,program,codehash,asm,index) (src/chain/CacheManager.sol#193)\n\t\t- queueSize += size (src/chain/CacheManager.sol#257)\n\tCacheManager.queueSize (src/chain/CacheManager.sol#27) can be used in cross function reentrancies:\n\t- CacheManager._addBid(uint192,address,bytes32,uint64,uint64) (src/chain/CacheManager.sol#243-264)\n\t- CacheManager._deleteEntry(uint192,uint64) (src/chain/CacheManager.sol#267-273)\n\t- CacheManager._makeSpace(uint64) (src/chain/CacheManager.sol#225-240)\n\t- CacheManager.getMinBid(uint64) (src/chain/CacheManager.sol#127-155)\n\t- CacheManager.makeSpace(uint64) (src/chain/CacheManager.sol#199-208)\n\t- CacheManager.queueSize (src/chain/CacheManager.sol#27)\n", "markdown": "Reentrancy in [CacheManager.placeBid(address)](src/chain/CacheManager.sol#L182-L194):\n\tExternal calls:\n\t- [(bid,index) = _makeSpace(asm)](src/chain/CacheManager.sol#L192)\n\t\t- [ARB_WASM_CACHE.evictCodehash(entry.code)](src/chain/CacheManager.sol#L269)\n\t- [_addBid(bid,program,codehash,asm,index)](src/chain/CacheManager.sol#L193)\n\t\t- [ARB_WASM_CACHE.cacheProgram(program)](src/chain/CacheManager.sol#L255)\n\tState variables written after the call(s):\n\t- [_addBid(bid,program,codehash,asm,index)](src/chain/CacheManager.sol#L193)\n\t\t- [entries.push(entry)](src/chain/CacheManager.sol#L259)\n\t\t- [entries[index] = entry](src/chain/CacheManager.sol#L261)\n\t[CacheManager.entries](src/chain/CacheManager.sol#L24) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L243-L264)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L267-L273)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L225-L240)\n\t- [CacheManager.entries](src/chain/CacheManager.sol#L24)\n\t- [CacheManager.evictAll()](src/chain/CacheManager.sol#L92-L95)\n\t- [CacheManager.getEntries()](src/chain/CacheManager.sol#L107-L109)\n\t- [CacheManager.getSmallestEntries(uint256)](src/chain/CacheManager.sol#L113-L123)\n\t- [_addBid(bid,program,codehash,asm,index)](src/chain/CacheManager.sol#L193)\n\t\t- [queueSize += size](src/chain/CacheManager.sol#L257)\n\t[CacheManager.queueSize](src/chain/CacheManager.sol#L27) can be used in cross function reentrancies:\n\t- [CacheManager._addBid(uint192,address,bytes32,uint64,uint64)](src/chain/CacheManager.sol#L243-L264)\n\t- [CacheManager._deleteEntry(uint192,uint64)](src/chain/CacheManager.sol#L267-L273)\n\t- [CacheManager._makeSpace(uint64)](src/chain/CacheManager.sol#L225-L240)\n\t- [CacheManager.getMinBid(uint64)](src/chain/CacheManager.sol#L127-L155)\n\t- [CacheManager.makeSpace(uint64)](src/chain/CacheManager.sol#L199-L208)\n\t- [CacheManager.queueSize](src/chain/CacheManager.sol#L27)\n", "first_markdown_element": "src/chain/CacheManager.sol#L182-L194", "id": "dbdb2c4b969b76af23e754869bf06a8cc648a720c90304c57a2f99d03391a0a2", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "impl", "source_mapping": {"start": 9679, "length": 120, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [253, 254, 255], "starting_column": 9, "ending_column": 22}, "type_specific_fields": {"parent": {"type": "function", "name": "executeOneStep", "source_mapping": {"start": 9308, "length": 1055, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 9997, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 1, "ending_column": 2}}, "signature": "executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl (src/osp/OneStepProverMemory.sol#253-255) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl](src/osp/OneStepProverMemory.sol#L253-L255) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L253-L255", "id": "c0081c68be4899b530be0e0720e9713a3d42b71364ad4392c42fd165ec162d1e", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "impl", "source_mapping": {"start": 22446, "length": 193, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [585, 586, 587, 588, 589, 590, 591], "starting_column": 9, "ending_column": 29}, "type_specific_fields": {"parent": {"type": "function", "name": "executeOneStep", "source_mapping": {"start": 22067, "length": 1705, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl (src/osp/OneStepProverHostIo.sol#585-591) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl](src/osp/OneStepProverHostIo.sol#L585-L591) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L585-L591", "id": "fd4baa84dfad7402f9c850b2abb8c959fa89f0a0f27d7a4d985504eafa596460", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "ty", "source_mapping": {"start": 5049, "length": 12, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [138], "starting_column": 13, "ending_column": 25}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryStore", "source_mapping": {"start": 4805, "length": 3493, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 9997, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryStore(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).ty (src/osp/OneStepProverMemory.sol#138) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).ty](src/osp/OneStepProverMemory.sol#L138) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L138", "id": "565f5e19fbe1a69065e4ef47ec789739a56008570ac09324d5995e298652f2be", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "assertionInputs", "source_mapping": {"start": 4305, "length": 38, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [97], "starting_column": 9, "ending_column": 47}, "type_specific_fields": {"parent": {"type": "function", "name": "initialize", "source_mapping": {"start": 699, "length": 4237, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 486, "length": 16014, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380], "starting_column": 1, "ending_column": 2}}, "signature": "initialize(Config,ContractDependencies)"}}}}], "description": "RollupAdminLogic.initialize(Config,ContractDependencies).assertionInputs (src/rollup/RollupAdminLogic.sol#97) is a local variable never initialized\n", "markdown": "[RollupAdminLogic.initialize(Config,ContractDependencies).assertionInputs](src/rollup/RollupAdminLogic.sol#L97) is a local variable never initialized\n", "first_markdown_element": "src/rollup/RollupAdminLogic.sol#L97", "id": "7f0e77bb04fa81d499dd33c66c9e6390c96bf6c2fcf5042913a190a5fc091b3f", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "lastProvedLeafContents", "source_mapping": {"start": 2030, "length": 30, "filename_relative": "src/state/ModuleMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/ModuleMemory.sol", "filename_short": "src/state/ModuleMemory.sol", "is_dependency": false, "lines": [57], "starting_column": 9, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "load", "source_mapping": {"start": 1655, "length": 991, "filename_relative": "src/state/ModuleMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/ModuleMemory.sol", "filename_short": "src/state/ModuleMemory.sol", "is_dependency": false, "lines": [45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "ModuleMemoryLib", "source_mapping": {"start": 298, "length": 2350, "filename_relative": "src/state/ModuleMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/ModuleMemory.sol", "filename_short": "src/state/ModuleMemory.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71], "starting_column": 1, "ending_column": 2}}, "signature": "load(ModuleMemory,uint256,uint256,bytes,uint256)"}}}}], "description": "ModuleMemoryLib.load(ModuleMemory,uint256,uint256,bytes,uint256).lastProvedLeafContents (src/state/ModuleMemory.sol#57) is a local variable never initialized\n", "markdown": "[ModuleMemoryLib.load(ModuleMemory,uint256,uint256,bytes,uint256).lastProvedLeafContents](src/state/ModuleMemory.sol#L57) is a local variable never initialized\n", "first_markdown_element": "src/state/ModuleMemory.sol#L57", "id": "ddf8f7daccaffa622915e6d24c5497c3801c89f4969af443509e576747d091fe", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "impl", "source_mapping": {"start": 16062, "length": 120, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [469, 470, 471], "starting_column": 9, "ending_column": 22}, "type_specific_fields": {"parent": {"type": "function", "name": "executeOneStep", "source_mapping": {"start": 15691, "length": 2753, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18084, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 1, "ending_column": 2}}, "signature": "executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl (src/osp/OneStepProver0.sol#469-471) is a local variable never initialized\n", "markdown": "[OneStepProver0.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl](src/osp/OneStepProver0.sol#L469-L471) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L469-L471", "id": "bf9df19313618417269a105ecd5b4cf0c22530264701877ed554d77b7886b033", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "genesisAssertionState", "source_mapping": {"start": 15359, "length": 43, "filename_relative": "src/rollup/BOLDUpgradeAction.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BOLDUpgradeAction.sol", "filename_short": "src/rollup/BOLDUpgradeAction.sol", "is_dependency": false, "lines": [391], "starting_column": 9, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "createConfig", "source_mapping": {"start": 14883, "length": 2347, "filename_relative": "src/rollup/BOLDUpgradeAction.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BOLDUpgradeAction.sol", "filename_short": "src/rollup/BOLDUpgradeAction.sol", "is_dependency": false, "lines": [383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "BOLDUpgradeAction", "source_mapping": {"start": 7300, "length": 17302, "filename_relative": "src/rollup/BOLDUpgradeAction.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BOLDUpgradeAction.sol", "filename_short": "src/rollup/BOLDUpgradeAction.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594], "starting_column": 1, "ending_column": 2}}, "signature": "createConfig()"}}}}], "description": "BOLDUpgradeAction.createConfig().genesisAssertionState (src/rollup/BOLDUpgradeAction.sol#391) is a local variable never initialized\n", "markdown": "[BOLDUpgradeAction.createConfig().genesisAssertionState](src/rollup/BOLDUpgradeAction.sol#L391) is a local variable never initialized\n", "first_markdown_element": "src/rollup/BOLDUpgradeAction.sol#L391", "id": "76703c23dccdb24dfa44f49b80f5d261029d9586a52c4accda8eca640d3ff674", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "internalStack", "source_mapping": {"start": 1790, "length": 31, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [52], "starting_column": 9, "ending_column": 40}, "type_specific_fields": {"parent": {"type": "function", "name": "getStartMachineHash", "source_mapping": {"start": 1203, "length": 1292, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 8334, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215], "starting_column": 1, "ending_column": 2}}, "signature": "getStartMachineHash(bytes32,bytes32)"}}}}], "description": "OneStepProofEntry.getStartMachineHash(bytes32,bytes32).internalStack (src/osp/OneStepProofEntry.sol#52) is a local variable never initialized\n", "markdown": "[OneStepProofEntry.getStartMachineHash(bytes32,bytes32).internalStack](src/osp/OneStepProofEntry.sol#L52) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProofEntry.sol#L52", "id": "fb3b9ad9a22662ab3a9d3f187478b9833041da23c79103d4346a16da071526e9", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "extracted", "source_mapping": {"start": 5132, "length": 22, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [136], "starting_column": 9, "ending_column": 31}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReadPreImage", "source_mapping": {"start": 4345, "length": 5738, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes).extracted (src/osp/OneStepProverHostIo.sol#136) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.executeReadPreImage(ExecutionContext,Machine,Module,Instruction,bytes).extracted](src/osp/OneStepProverHostIo.sol#L136) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L136", "id": "b8f149ef07d9b5bf6a4fd2772d951ef00e1136d5728509097c74a6d35fb7419a", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "bytes32Vals", "source_mapping": {"start": 7861, "length": 29, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [243], "starting_column": 9, "ending_column": 38}, "type_specific_fields": {"parent": {"type": "function", "name": "globalState", "source_mapping": {"start": 7599, "length": 678, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Deserialize", "source_mapping": {"start": 477, "length": 10499, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321], "starting_column": 1, "ending_column": 2}}, "signature": "globalState(bytes,uint256)"}}}}], "description": "Deserialize.globalState(bytes,uint256).bytes32Vals (src/state/Deserialize.sol#243) is a local variable never initialized\n", "markdown": "[Deserialize.globalState(bytes,uint256).bytes32Vals](src/state/Deserialize.sol#L243) is a local variable never initialized\n", "first_markdown_element": "src/state/Deserialize.sol#L243", "id": "347c23c28d92854b0181184cb13878043e27048bb6b0d14e6f9f24d733477f80", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "ty", "source_mapping": {"start": 1316, "length": 12, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [38], "starting_column": 9, "ending_column": 21}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1138, "length": 3661, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 9997, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).ty (src/osp/OneStepProverMemory.sol#38) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).ty](src/osp/OneStepProverMemory.sol#L38) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L38", "id": "d44b109a885f9f18431fcbd810bf7f45b9f86b4749430739056c0786ab2d150e", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "frameStack", "source_mapping": {"start": 1831, "length": 34, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [53], "starting_column": 9, "ending_column": 43}, "type_specific_fields": {"parent": {"type": "function", "name": "getStartMachineHash", "source_mapping": {"start": 1203, "length": 1292, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 8334, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215], "starting_column": 1, "ending_column": 2}}, "signature": "getStartMachineHash(bytes32,bytes32)"}}}}], "description": "OneStepProofEntry.getStartMachineHash(bytes32,bytes32).frameStack (src/osp/OneStepProofEntry.sol#53) is a local variable never initialized\n", "markdown": "[OneStepProofEntry.getStartMachineHash(bytes32,bytes32).frameStack](src/osp/OneStepProofEntry.sol#L53) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProofEntry.sol#L53", "id": "2dd21e12ec5d5965b5bd41d82bb252991172e100ac1f78846fb692a07fd06c26", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "assertion", "source_mapping": {"start": 2925, "length": 30, "filename_relative": "src/rollup/Assertion.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/Assertion.sol", "filename_short": "src/rollup/Assertion.sol", "is_dependency": false, "lines": [74], "starting_column": 9, "ending_column": 39}, "type_specific_fields": {"parent": {"type": "function", "name": "createAssertion", "source_mapping": {"start": 2782, "length": 407, "filename_relative": "src/rollup/Assertion.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/Assertion.sol", "filename_short": "src/rollup/Assertion.sol", "is_dependency": false, "lines": [70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AssertionNodeLib", "source_mapping": {"start": 2697, "length": 997, "filename_relative": "src/rollup/Assertion.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/Assertion.sol", "filename_short": "src/rollup/Assertion.sol", "is_dependency": false, "lines": [66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "starting_column": 1, "ending_column": 2}}, "signature": "createAssertion(bool,bytes32)"}}}}], "description": "AssertionNodeLib.createAssertion(bool,bytes32).assertion (src/rollup/Assertion.sol#74) is a local variable never initialized\n", "markdown": "[AssertionNodeLib.createAssertion(bool,bytes32).assertion](src/rollup/Assertion.sol#L74) is a local variable never initialized\n", "first_markdown_element": "src/rollup/Assertion.sol#L74", "id": "779ac8202ebcd49fb793bd69ed116aa0c770615dc202738dd7966081a4d6362c", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "beforeAcc", "source_mapping": {"start": 11230, "length": 17, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [267], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "validateDelayedInbox", "source_mapping": {"start": 10978, "length": 915, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "validateDelayedInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes).beforeAcc (src/osp/OneStepProverHostIo.sol#267) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes).beforeAcc](src/osp/OneStepProverHostIo.sol#L267) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L267", "id": "dab8df6b27e88ad0e415842d20e13cd455e0d5f0c84fa74d2906eefd6d1e06f0", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "lastProvedMerkle", "source_mapping": {"start": 7057, "length": 35, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [187], "starting_column": 9, "ending_column": 44}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryStore", "source_mapping": {"start": 4805, "length": 3493, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 9997, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryStore(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).lastProvedMerkle (src/osp/OneStepProverMemory.sol#187) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).lastProvedMerkle](src/osp/OneStepProverMemory.sol#L187) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L187", "id": "970df6569838c064f8c23181f94aa7553a41b5a23c53e802d29cd0162f7d4f2b", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "u64Vals", "source_mapping": {"start": 7900, "length": 24, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [244], "starting_column": 9, "ending_column": 33}, "type_specific_fields": {"parent": {"type": "function", "name": "globalState", "source_mapping": {"start": 7599, "length": 678, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Deserialize", "source_mapping": {"start": 477, "length": 10499, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321], "starting_column": 1, "ending_column": 2}}, "signature": "globalState(bytes,uint256)"}}}}], "description": "Deserialize.globalState(bytes,uint256).u64Vals (src/state/Deserialize.sol#244) is a local variable never initialized\n", "markdown": "[Deserialize.globalState(bytes,uint256).u64Vals](src/state/Deserialize.sol#L244) is a local variable never initialized\n", "first_markdown_element": "src/state/Deserialize.sol#L244", "id": "b49e20832cf227724d4b048fc859ce00efa36bda00bb2d354df6861b1e5b65c8", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "emptyMultiStack", "source_mapping": {"start": 1875, "length": 33, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [54], "starting_column": 9, "ending_column": 42}, "type_specific_fields": {"parent": {"type": "function", "name": "getStartMachineHash", "source_mapping": {"start": 1203, "length": 1292, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 8334, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215], "starting_column": 1, "ending_column": 2}}, "signature": "getStartMachineHash(bytes32,bytes32)"}}}}], "description": "OneStepProofEntry.getStartMachineHash(bytes32,bytes32).emptyMultiStack (src/osp/OneStepProofEntry.sol#54) is a local variable never initialized\n", "markdown": "[OneStepProofEntry.getStartMachineHash(bytes32,bytes32).emptyMultiStack](src/osp/OneStepProofEntry.sol#L54) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProofEntry.sol#L54", "id": "5c6acbea6429303780ccb1049265a5d97162a57ddda1d6d332f3201bff526332", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "ard", "source_mapping": {"start": 21636, "length": 33, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [409], "starting_column": 9, "ending_column": 42}, "type_specific_fields": {"parent": {"type": "function", "name": "createLayerZeroEdge", "source_mapping": {"start": 21001, "length": 3963, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManager", "source_mapping": {"start": 13173, "length": 20965, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735], "starting_column": 1, "ending_column": 2}}, "signature": "createLayerZeroEdge(CreateEdgeArgs)"}}}}], "description": "EdgeChallengeManager.createLayerZeroEdge(CreateEdgeArgs).ard (src/challengeV2/EdgeChallengeManager.sol#409) is a local variable never initialized\n", "markdown": "[EdgeChallengeManager.createLayerZeroEdge(CreateEdgeArgs).ard](src/challengeV2/EdgeChallengeManager.sol#L409) is a local variable never initialized\n", "first_markdown_element": "src/challengeV2/EdgeChallengeManager.sol#L409", "id": "e7ede52122adee6ac5ffaf51caccffee5f1266754da9a1cf77fdf8a79a04b2ba", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "sourceTy", "source_mapping": {"start": 13424, "length": 18, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [433], "starting_column": 9, "ending_column": 27}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReinterpret", "source_mapping": {"start": 13229, "length": 1048, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16261, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514], "starting_column": 1, "ending_column": 2}}, "signature": "executeReinterpret(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeReinterpret(Machine,Module,Instruction,bytes).sourceTy (src/osp/OneStepProverMath.sol#433) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeReinterpret(Machine,Module,Instruction,bytes).sourceTy](src/osp/OneStepProverMath.sol#L433) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L433", "id": "19cc2967641f968047d8174e2ba3152038af798b63c42b1bb55dd59287a923a7", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "readBytes", "source_mapping": {"start": 1338, "length": 17, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [39], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1138, "length": 3661, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 9997, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).readBytes (src/osp/OneStepProverMemory.sol#39) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).readBytes](src/osp/OneStepProverMemory.sol#L39) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L39", "id": "09c1e38d961440cc644e890e7e165ecd2073dd96901441ae9b2b9c939257cc6f", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "status", "source_mapping": {"start": 8479, "length": 20, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [261], "starting_column": 13, "ending_column": 33}, "type_specific_fields": {"parent": {"type": "function", "name": "machine", "source_mapping": {"start": 8283, "length": 2206, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "Deserialize", "source_mapping": {"start": 477, "length": 10499, "filename_relative": "src/state/Deserialize.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/state/Deserialize.sol", "filename_short": "src/state/Deserialize.sol", "is_dependency": false, "lines": [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321], "starting_column": 1, "ending_column": 2}}, "signature": "machine(bytes,uint256)"}}}}], "description": "Deserialize.machine(bytes,uint256).status (src/state/Deserialize.sol#261) is a local variable never initialized\n", "markdown": "[Deserialize.machine(bytes,uint256).status](src/state/Deserialize.sol#L261) is a local variable never initialized\n", "first_markdown_element": "src/state/Deserialize.sol#L261", "id": "b0bb66b3aaa5e859564fcf69ddd9c518a2dff55461b2e23469e57954ece88023", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "emptyGlobalState", "source_mapping": {"start": 25822, "length": 35, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [568], "starting_column": 9, "ending_column": 44}, "type_specific_fields": {"parent": {"type": "function", "name": "genesisAssertionHash", "source_mapping": {"start": 25748, "length": 522, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCore", "source_mapping": {"start": 719, "length": 27728, "filename_relative": "src/rollup/RollupCore.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCore.sol", "filename_short": "src/rollup/RollupCore.sol", "is_dependency": false, "lines": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634], "starting_column": 1, "ending_column": 2}}, "signature": "genesisAssertionHash()"}}}}], "description": "RollupCore.genesisAssertionHash().emptyGlobalState (src/rollup/RollupCore.sol#568) is a local variable never initialized\n", "markdown": "[RollupCore.genesisAssertionHash().emptyGlobalState](src/rollup/RollupCore.sol#L568) is a local variable never initialized\n", "first_markdown_element": "src/rollup/RollupCore.sol#L568", "id": "0460f5fd4884d3ec020798d5fff80246af0e024567d01f970722e7ffc970b71e", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "frame", "source_mapping": {"start": 2106, "length": 28, "filename_relative": "src/rollup/BridgeCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BridgeCreator.sol", "filename_short": "src/rollup/BridgeCreator.sol", "is_dependency": false, "lines": [68], "starting_column": 9, "ending_column": 37}, "type_specific_fields": {"parent": {"type": "function", "name": "_createBridge", "source_mapping": {"start": 1923, "length": 1292, "filename_relative": "src/rollup/BridgeCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BridgeCreator.sol", "filename_short": "src/rollup/BridgeCreator.sol", "is_dependency": false, "lines": [63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "BridgeCreator", "source_mapping": {"start": 676, "length": 3826, "filename_relative": "src/rollup/BridgeCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BridgeCreator.sol", "filename_short": "src/rollup/BridgeCreator.sol", "is_dependency": false, "lines": [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129], "starting_column": 1, "ending_column": 2}}, "signature": "_createBridge(address,BridgeCreator.BridgeTemplates,bool)"}}}}], "description": "BridgeCreator._createBridge(address,BridgeCreator.BridgeTemplates,bool).frame (src/rollup/BridgeCreator.sol#68) is a local variable never initialized\n", "markdown": "[BridgeCreator._createBridge(address,BridgeCreator.BridgeTemplates,bool).frame](src/rollup/BridgeCreator.sol#L68) is a local variable never initialized\n", "first_markdown_element": "src/rollup/BridgeCreator.sol#L68", "id": "7ab4ad2255a2c0b79acd7d414b27ea6c19224c70a3a794ed8de2ed5c151a8de3", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "beforeAcc", "source_mapping": {"start": 10483, "length": 17, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [246], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10089, "length": 883, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes).beforeAcc (src/osp/OneStepProverHostIo.sol#246) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes).beforeAcc](src/osp/OneStepProverHostIo.sol#L246) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L246", "id": "93458ecce4030168b57a5b4b9bddf11e556bda0b87b21572901703776f8a4a4d", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "signed", "source_mapping": {"start": 1365, "length": 11, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [40], "starting_column": 9, "ending_column": 20}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1138, "length": 3661, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 9997, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).signed (src/osp/OneStepProverMemory.sol#40) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes).signed](src/osp/OneStepProverMemory.sol#L40) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L40", "id": "494ad26e42522ed318b7143deadf6e22863a94ac35e1bc7e431f680c09e99249", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "impl", "source_mapping": {"start": 14654, "length": 120, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [467, 468, 469], "starting_column": 9, "ending_column": 22}, "type_specific_fields": {"parent": {"type": "function", "name": "executeOneStep", "source_mapping": {"start": 14283, "length": 2338, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16261, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514], "starting_column": 1, "ending_column": 2}}, "signature": "executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl (src/osp/OneStepProverMath.sol#467-469) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeOneStep(ExecutionContext,Machine,Module,Instruction,bytes).impl](src/osp/OneStepProverMath.sol#L467-L469) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L467-L469", "id": "7bb129f3bd93db0e9c1579c8ab353fe86d0d54b40d421f4a568ab9279ce8b6cb", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "lowerChildAdded", "source_mapping": {"start": 33019, "length": 36, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [694], "starting_column": 9, "ending_column": 45}, "type_specific_fields": {"parent": {"type": "function", "name": "bisectEdge", "source_mapping": {"start": 31685, "length": 2678, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManagerLib", "source_mapping": {"start": 6309, "length": 37762, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927], "starting_column": 1, "ending_column": 2}}, "signature": "bisectEdge(EdgeStore,bytes32,bytes32,bytes)"}}}}], "description": "EdgeChallengeManagerLib.bisectEdge(EdgeStore,bytes32,bytes32,bytes).lowerChildAdded (src/challengeV2/libraries/EdgeChallengeManagerLib.sol#694) is a local variable never initialized\n", "markdown": "[EdgeChallengeManagerLib.bisectEdge(EdgeStore,bytes32,bytes32,bytes).lowerChildAdded](src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L694) is a local variable never initialized\n", "first_markdown_element": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L694", "id": "e3e0bf0dd0aa78968bc62d87a22130a956201e76b709c3f8ebbdd58978210578", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "destTy", "source_mapping": {"start": 13398, "length": 16, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [432], "starting_column": 9, "ending_column": 25}, "type_specific_fields": {"parent": {"type": "function", "name": "executeReinterpret", "source_mapping": {"start": 13229, "length": 1048, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16261, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514], "starting_column": 1, "ending_column": 2}}, "signature": "executeReinterpret(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeReinterpret(Machine,Module,Instruction,bytes).destTy (src/osp/OneStepProverMath.sol#432) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeReinterpret(Machine,Module,Instruction,bytes).destTy](src/osp/OneStepProverMath.sol#L432) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L432", "id": "0c40a87502e42085a3fc0a61f202e687aed2386c6fe161376f0f0b2f16a4c9c5", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "bufferConfig", "source_mapping": {"start": 15951, "length": 32, "filename_relative": "src/rollup/BOLDUpgradeAction.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BOLDUpgradeAction.sol", "filename_short": "src/rollup/BOLDUpgradeAction.sol", "is_dependency": false, "lines": [404], "starting_column": 9, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "function", "name": "createConfig", "source_mapping": {"start": 14883, "length": 2347, "filename_relative": "src/rollup/BOLDUpgradeAction.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BOLDUpgradeAction.sol", "filename_short": "src/rollup/BOLDUpgradeAction.sol", "is_dependency": false, "lines": [383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "BOLDUpgradeAction", "source_mapping": {"start": 7300, "length": 17302, "filename_relative": "src/rollup/BOLDUpgradeAction.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BOLDUpgradeAction.sol", "filename_short": "src/rollup/BOLDUpgradeAction.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594], "starting_column": 1, "ending_column": 2}}, "signature": "createConfig()"}}}}], "description": "BOLDUpgradeAction.createConfig().bufferConfig (src/rollup/BOLDUpgradeAction.sol#404) is a local variable never initialized\n", "markdown": "[BOLDUpgradeAction.createConfig().bufferConfig](src/rollup/BOLDUpgradeAction.sol#L404) is a local variable never initialized\n", "first_markdown_element": "src/rollup/BOLDUpgradeAction.sol#L404", "id": "c5cd52d22fe5ac3c15278b965fa47d1fd94543917e30d7ffbef417517989d187", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "ty", "source_mapping": {"start": 11919, "length": 12, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [389], "starting_column": 9, "ending_column": 21}, "type_specific_fields": {"parent": {"type": "function", "name": "executeExtendSameType", "source_mapping": {"start": 11747, "length": 1476, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16261, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514], "starting_column": 1, "ending_column": 2}}, "signature": "executeExtendSameType(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeExtendSameType(Machine,Module,Instruction,bytes).ty (src/osp/OneStepProverMath.sol#389) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeExtendSameType(Machine,Module,Instruction,bytes).ty](src/osp/OneStepProverMath.sol#L389) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L389", "id": "d5801e7c2f23eb0d6bc004590ab2e75879037d149be714c34ab3b066e1c4b819", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "delayedAcc", "source_mapping": {"start": 10510, "length": 18, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [247], "starting_column": 9, "ending_column": 27}, "type_specific_fields": {"parent": {"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10089, "length": 883, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes).delayedAcc (src/osp/OneStepProverHostIo.sol#247) is a local variable never initialized\n", "markdown": "[OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes).delayedAcc](src/osp/OneStepProverHostIo.sol#L247) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L247", "id": "a4af275d7732b756f493da186504395ee7b6705d359094ed504be4cb2382a71f", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "ty", "source_mapping": {"start": 1192, "length": 12, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [45], "starting_column": 9, "ending_column": 21}, "type_specific_fields": {"parent": {"type": "function", "name": "executeConstPush", "source_mapping": {"start": 988, "length": 732, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18084, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 1, "ending_column": 2}}, "signature": "executeConstPush(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeConstPush(Machine,Module,Instruction,bytes).ty (src/osp/OneStepProver0.sol#45) is a local variable never initialized\n", "markdown": "[OneStepProver0.executeConstPush(Machine,Module,Instruction,bytes).ty](src/osp/OneStepProver0.sol#L45) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L45", "id": "f3a4bd8740f9565ecd548a3027588ef6a9ab1fab50a47ee9989dff0a450c0d81", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "funcIdx", "source_mapping": {"start": 7512, "length": 14, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [234], "starting_column": 9, "ending_column": 23}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7332, "length": 3437, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18084, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).funcIdx (src/osp/OneStepProver0.sol#234) is a local variable never initialized\n", "markdown": "[OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).funcIdx](src/osp/OneStepProver0.sol#L234) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L234", "id": "0b3ea27e34dd552b3d33e544c7732699f56da1be9d675526040264c6f35cf115", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "maxTimeVariation", "source_mapping": {"start": 15885, "length": 56, "filename_relative": "src/rollup/BOLDUpgradeAction.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BOLDUpgradeAction.sol", "filename_short": "src/rollup/BOLDUpgradeAction.sol", "is_dependency": false, "lines": [403], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "createConfig", "source_mapping": {"start": 14883, "length": 2347, "filename_relative": "src/rollup/BOLDUpgradeAction.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BOLDUpgradeAction.sol", "filename_short": "src/rollup/BOLDUpgradeAction.sol", "is_dependency": false, "lines": [383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "BOLDUpgradeAction", "source_mapping": {"start": 7300, "length": 17302, "filename_relative": "src/rollup/BOLDUpgradeAction.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/BOLDUpgradeAction.sol", "filename_short": "src/rollup/BOLDUpgradeAction.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594], "starting_column": 1, "ending_column": 2}}, "signature": "createConfig()"}}}}], "description": "BOLDUpgradeAction.createConfig().maxTimeVariation (src/rollup/BOLDUpgradeAction.sol#403) is a local variable never initialized\n", "markdown": "[BOLDUpgradeAction.createConfig().maxTimeVariation](src/rollup/BOLDUpgradeAction.sol#L403) is a local variable never initialized\n", "first_markdown_element": "src/rollup/BOLDUpgradeAction.sol#L403", "id": "e937c8d6c3281874cfb3a27564ca1447e18fafcf234e68bd4017703b2c3bf0cf", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "sourceBits", "source_mapping": {"start": 11941, "length": 16, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [390], "starting_column": 9, "ending_column": 25}, "type_specific_fields": {"parent": {"type": "function", "name": "executeExtendSameType", "source_mapping": {"start": 11747, "length": 1476, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMath", "source_mapping": {"start": 362, "length": 16261, "filename_relative": "src/osp/OneStepProverMath.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMath.sol", "filename_short": "src/osp/OneStepProverMath.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514], "starting_column": 1, "ending_column": 2}}, "signature": "executeExtendSameType(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMath.executeExtendSameType(Machine,Module,Instruction,bytes).sourceBits (src/osp/OneStepProverMath.sol#390) is a local variable never initialized\n", "markdown": "[OneStepProverMath.executeExtendSameType(Machine,Module,Instruction,bytes).sourceBits](src/osp/OneStepProverMath.sol#L390) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMath.sol#L390", "id": "7e6b4db4655b21a377a13a4c03fdcc62f8c4e56c5ecdf979c82afb0985a1fac5", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "part", "source_mapping": {"start": 1125, "length": 17, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [38], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "proveWithFullPreimage", "source_mapping": {"start": 954, "length": 574, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "HashProofHelper", "source_mapping": {"start": 388, "length": 5258, "filename_relative": "src/osp/HashProofHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/HashProofHelper.sol", "filename_short": "src/osp/HashProofHelper.sol", "is_dependency": false, "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153], "starting_column": 1, "ending_column": 2}}, "signature": "proveWithFullPreimage(bytes,uint64)"}}}}], "description": "HashProofHelper.proveWithFullPreimage(bytes,uint64).part (src/osp/HashProofHelper.sol#38) is a local variable never initialized\n", "markdown": "[HashProofHelper.proveWithFullPreimage(bytes,uint64).part](src/osp/HashProofHelper.sol#L38) is a local variable never initialized\n", "first_markdown_element": "src/osp/HashProofHelper.sol#L38", "id": "9f6b190b96895f4cfb0f3db956545a55f4132aa16c8af057e7257d7fd2c5de43", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "writeBytes", "source_mapping": {"start": 4984, "length": 17, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [135], "starting_column": 9, "ending_column": 26}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryStore", "source_mapping": {"start": 4805, "length": 3493, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 9997, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryStore(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).writeBytes (src/osp/OneStepProverMemory.sol#135) is a local variable never initialized\n", "markdown": "[OneStepProverMemory.executeMemoryStore(Machine,Module,Instruction,bytes).writeBytes](src/osp/OneStepProverMemory.sol#L135) is a local variable never initialized\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L135", "id": "f573681c354f3fdccf310c43fad70c2f0994cf3b3de20432e01071bd6a3981de", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "bounds", "source_mapping": {"start": 7525, "length": 32, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [219], "starting_column": 9, "ending_column": 41}, "type_specific_fields": {"parent": {"type": "function", "name": "getTimeBounds", "source_mapping": {"start": 7432, "length": 694, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "SequencerInbox", "source_mapping": {"start": 2080, "length": 32731, "filename_relative": "src/bridge/SequencerInbox.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/SequencerInbox.sol", "filename_short": "src/bridge/SequencerInbox.sol", "is_dependency": false, "lines": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859], "starting_column": 1, "ending_column": 2}}, "signature": "getTimeBounds()"}}}}], "description": "SequencerInbox.getTimeBounds().bounds (src/bridge/SequencerInbox.sol#219) is a local variable never initialized\n", "markdown": "[SequencerInbox.getTimeBounds().bounds](src/bridge/SequencerInbox.sol#L219) is a local variable never initialized\n", "first_markdown_element": "src/bridge/SequencerInbox.sol#L219", "id": "a9ab2d44723c17809429f069881bb97a07e53966e1c848cc3083baebb7d26ceb", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "min", "source_mapping": {"start": 8334, "length": 11, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [230], "starting_column": 9, "ending_column": 20}, "type_specific_fields": {"parent": {"type": "function", "name": "_makeSpace", "source_mapping": {"start": 8111, "length": 592, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "CacheManager", "source_mapping": {"start": 471, "length": 10113, "filename_relative": "src/chain/CacheManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/chain/CacheManager.sol", "filename_short": "src/chain/CacheManager.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296], "starting_column": 1, "ending_column": 2}}, "signature": "_makeSpace(uint64)"}}}}], "description": "CacheManager._makeSpace(uint64).min (src/chain/CacheManager.sol#230) is a local variable never initialized\n", "markdown": "[CacheManager._makeSpace(uint64).min](src/chain/CacheManager.sol#L230) is a local variable never initialized\n", "first_markdown_element": "src/chain/CacheManager.sol#L230", "id": "73850e9ef891d5f054eb989dce18e9362ba7349b4f2237be464bcaeab7c4fe54", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "withdrawStakeBackIntoPool", "source_mapping": {"start": 2449, "length": 102, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [59, 60, 61], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AssertionStakingPool", "source_mapping": {"start": 899, "length": 1844, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68], "starting_column": 1, "ending_column": 2}}, "signature": "withdrawStakeBackIntoPool()"}}, {"type": "node", "name": "IRollupUser(rollup).withdrawStakerFunds()", "source_mapping": {"start": 2503, "length": 41, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [60], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "withdrawStakeBackIntoPool", "source_mapping": {"start": 2449, "length": 102, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [59, 60, 61], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AssertionStakingPool", "source_mapping": {"start": 899, "length": 1844, "filename_relative": "src/assertionStakingPool/AssertionStakingPool.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/assertionStakingPool/AssertionStakingPool.sol", "filename_short": "src/assertionStakingPool/AssertionStakingPool.sol", "is_dependency": false, "lines": [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68], "starting_column": 1, "ending_column": 2}}, "signature": "withdrawStakeBackIntoPool()"}}}}], "description": "AssertionStakingPool.withdrawStakeBackIntoPool() (src/assertionStakingPool/AssertionStakingPool.sol#59-61) ignores return value by IRollupUser(rollup).withdrawStakerFunds() (src/assertionStakingPool/AssertionStakingPool.sol#60)\n", "markdown": "[AssertionStakingPool.withdrawStakeBackIntoPool()](src/assertionStakingPool/AssertionStakingPool.sol#L59-L61) ignores return value by [IRollupUser(rollup).withdrawStakerFunds()](src/assertionStakingPool/AssertionStakingPool.sol#L60)\n", "first_markdown_element": "src/assertionStakingPool/AssertionStakingPool.sol#L59-L61", "id": "2904940ba553f9ee7edd49b224250d4a42487d2377fdae5d040d365a690678a8", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "multiUpdateTimeCacheByChildren", "source_mapping": {"start": 26559, "length": 474, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManager", "source_mapping": {"start": 13173, "length": 20965, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735], "starting_column": 1, "ending_column": 2}}, "signature": "multiUpdateTimeCacheByChildren(bytes32[],uint256)"}}, {"type": "node", "name": "store.validateCurrentTimer(edgeIds[edgeIds.length - 1],maximumCachedTime)", "source_mapping": {"start": 26816, "length": 74, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [535], "starting_column": 9, "ending_column": 83}, "type_specific_fields": {"parent": {"type": "function", "name": "multiUpdateTimeCacheByChildren", "source_mapping": {"start": 26559, "length": 474, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManager", "source_mapping": {"start": 13173, "length": 20965, "filename_relative": "src/challengeV2/EdgeChallengeManager.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/EdgeChallengeManager.sol", "filename_short": "src/challengeV2/EdgeChallengeManager.sol", "is_dependency": false, "lines": [225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735], "starting_column": 1, "ending_column": 2}}, "signature": "multiUpdateTimeCacheByChildren(bytes32[],uint256)"}}}}], "description": "EdgeChallengeManager.multiUpdateTimeCacheByChildren(bytes32[],uint256) (src/challengeV2/EdgeChallengeManager.sol#529-539) ignores return value by store.validateCurrentTimer(edgeIds[edgeIds.length - 1],maximumCachedTime) (src/challengeV2/EdgeChallengeManager.sol#535)\n", "markdown": "[EdgeChallengeManager.multiUpdateTimeCacheByChildren(bytes32[],uint256)](src/challengeV2/EdgeChallengeManager.sol#L529-L539) ignores return value by [store.validateCurrentTimer(edgeIds[edgeIds.length - 1],maximumCachedTime)](src/challengeV2/EdgeChallengeManager.sol#L535)\n", "first_markdown_element": "src/challengeV2/EdgeChallengeManager.sol#L529-L539", "id": "94fb823693582f210dc70d8928b9bf8005755dc0b1d95e55b46aac3cb7cb8ed0", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "nextEdgeLevel", "source_mapping": {"start": 35198, "length": 297, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [748, 749, 750, 751, 752, 753, 754, 755], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManagerLib", "source_mapping": {"start": 6309, "length": 37762, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927], "starting_column": 1, "ending_column": 2}}, "signature": "nextEdgeLevel(uint8,uint8)"}}, {"type": "node", "name": "ChallengeEdgeLib.levelToType(nextLevel,numBigStepLevel)", "source_mapping": {"start": 35405, "length": 56, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [752], "starting_column": 9, "ending_column": 65}, "type_specific_fields": {"parent": {"type": "function", "name": "nextEdgeLevel", "source_mapping": {"start": 35198, "length": 297, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [748, 749, 750, 751, 752, 753, 754, 755], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "EdgeChallengeManagerLib", "source_mapping": {"start": 6309, "length": 37762, "filename_relative": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "filename_short": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol", "is_dependency": false, "lines": [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927], "starting_column": 1, "ending_column": 2}}, "signature": "nextEdgeLevel(uint8,uint8)"}}}}], "description": "EdgeChallengeManagerLib.nextEdgeLevel(uint8,uint8) (src/challengeV2/libraries/EdgeChallengeManagerLib.sol#748-755) ignores return value by ChallengeEdgeLib.levelToType(nextLevel,numBigStepLevel) (src/challengeV2/libraries/EdgeChallengeManagerLib.sol#752)\n", "markdown": "[EdgeChallengeManagerLib.nextEdgeLevel(uint8,uint8)](src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L748-L755) ignores return value by [ChallengeEdgeLib.levelToType(nextLevel,numBigStepLevel)](src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L752)\n", "first_markdown_element": "src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L748-L755", "id": "f76024f34131ac8f1298ec25c4e8270328473b61c61c609c1f36f6ab6a1ae647", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "refundsGas", "source_mapping": {"start": 723, "length": 2113, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2529, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}, {"type": "node", "name": "gasRefunder.onGasSpent(address(msg.sender),startGasLeft - gasleft()(),calldataSize)", "source_mapping": {"start": 2736, "length": 83, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [48], "starting_column": 13, "ending_column": 96}, "type_specific_fields": {"parent": {"type": "function", "name": "refundsGas", "source_mapping": {"start": 723, "length": 2113, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "GasRefundEnabled", "source_mapping": {"start": 309, "length": 2529, "filename_relative": "src/libraries/GasRefundEnabled.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/GasRefundEnabled.sol", "filename_short": "src/libraries/GasRefundEnabled.sol", "is_dependency": false, "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "starting_column": 1, "ending_column": 2}}, "signature": "refundsGas(IGasRefunder,IReader4844)"}}}}], "description": "GasRefundEnabled.refundsGas(IGasRefunder,IReader4844) (src/libraries/GasRefundEnabled.sol#17-50) ignores return value by gasRefunder.onGasSpent(address(msg.sender),startGasLeft - gasleft()(),calldataSize) (src/libraries/GasRefundEnabled.sol#48)\n", "markdown": "[GasRefundEnabled.refundsGas(IGasRefunder,IReader4844)](src/libraries/GasRefundEnabled.sol#L17-L50) ignores return value by [gasRefunder.onGasSpent(address(msg.sender),startGasLeft - gasleft()(),calldataSize)](src/libraries/GasRefundEnabled.sol#L48)\n", "first_markdown_element": "src/libraries/GasRefundEnabled.sol#L17-L50", "id": "ac9f733c27578e78be607ba3f6af5370b5edf605db1f23bd2defadf4b88fe035", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "proveOneStep", "source_mapping": {"start": 3052, "length": 5687, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 8334, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215], "starting_column": 1, "ending_column": 2}}, "signature": "proveOneStep(ExecutionContext,uint256,bytes32,bytes)"}}, {"type": "node", "name": "mach.setPcFromRecovery()", "source_mapping": {"start": 8620, "length": 24, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [209], "starting_column": 13, "ending_column": 37}, "type_specific_fields": {"parent": {"type": "function", "name": "proveOneStep", "source_mapping": {"start": 3052, "length": 5687, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProofEntry", "source_mapping": {"start": 407, "length": 8334, "filename_relative": "src/osp/OneStepProofEntry.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProofEntry.sol", "filename_short": "src/osp/OneStepProofEntry.sol", "is_dependency": false, "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215], "starting_column": 1, "ending_column": 2}}, "signature": "proveOneStep(ExecutionContext,uint256,bytes32,bytes)"}}}}], "description": "OneStepProofEntry.proveOneStep(ExecutionContext,uint256,bytes32,bytes) (src/osp/OneStepProofEntry.sol#89-214) ignores return value by mach.setPcFromRecovery() (src/osp/OneStepProofEntry.sol#209)\n", "markdown": "[OneStepProofEntry.proveOneStep(ExecutionContext,uint256,bytes32,bytes)](src/osp/OneStepProofEntry.sol#L89-L214) ignores return value by [mach.setPcFromRecovery()](src/osp/OneStepProofEntry.sol#L209)\n", "first_markdown_element": "src/osp/OneStepProofEntry.sol#L89-L214", "id": "6b3bffd425d6fbf30074480e3a2cc69b44fd4d908b6c8189672dade04ca97000", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeDrop", "source_mapping": {"start": 1726, "length": 185, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18084, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 1, "ending_column": 2}}, "signature": "executeDrop(Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "mach.valueStack.pop()", "source_mapping": {"start": 1883, "length": 21, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [67], "starting_column": 9, "ending_column": 30}, "type_specific_fields": {"parent": {"type": "function", "name": "executeDrop", "source_mapping": {"start": 1726, "length": 185, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [61, 62, 63, 64, 65, 66, 67, 68], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18084, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 1, "ending_column": 2}}, "signature": "executeDrop(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeDrop(Machine,Module,Instruction,bytes) (src/osp/OneStepProver0.sol#61-68) ignores return value by mach.valueStack.pop() (src/osp/OneStepProver0.sol#67)\n", "markdown": "[OneStepProver0.executeDrop(Machine,Module,Instruction,bytes)](src/osp/OneStepProver0.sol#L61-L68) ignores return value by [mach.valueStack.pop()](src/osp/OneStepProver0.sol#L67)\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L61-L68", "id": "eba4f716555f696a91fc8ad9e049846421a7a6ad85a83865fb641cf1b9b27c54", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10089, "length": 883, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}, {"type": "node", "name": "(afterDelayedMsg,None) = Deserialize.u64(message,32)", "source_mapping": {"start": 10374, "length": 49, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [244], "starting_column": 9, "ending_column": 58}, "type_specific_fields": {"parent": {"type": "function", "name": "validateSequencerInbox", "source_mapping": {"start": 10089, "length": 883, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "validateSequencerInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes) (src/osp/OneStepProverHostIo.sol#236-258) ignores return value by (afterDelayedMsg,None) = Deserialize.u64(message,32) (src/osp/OneStepProverHostIo.sol#244)\n", "markdown": "[OneStepProverHostIo.validateSequencerInbox(ExecutionContext,uint64,bytes)](src/osp/OneStepProverHostIo.sol#L236-L258) ignores return value by [(afterDelayedMsg,None) = Deserialize.u64(message,32)](src/osp/OneStepProverHostIo.sol#L244)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L236-L258", "id": "bad74a54fcd7212f05582a7260345fda7e0c881afc41b529924f39206efc7ef0", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "validateDelayedInbox", "source_mapping": {"start": 10978, "length": 915, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "validateDelayedInbox(ExecutionContext,uint64,bytes)"}}, {"type": "node", "name": "(sender,None) = Deserialize.u256(message,1)", "source_mapping": {"start": 11501, "length": 40, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [276], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "validateDelayedInbox", "source_mapping": {"start": 10978, "length": 915, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "validateDelayedInbox(ExecutionContext,uint64,bytes)"}}}}], "description": "OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes) (src/osp/OneStepProverHostIo.sol#260-285) ignores return value by (sender,None) = Deserialize.u256(message,1) (src/osp/OneStepProverHostIo.sol#276)\n", "markdown": "[OneStepProverHostIo.validateDelayedInbox(ExecutionContext,uint64,bytes)](src/osp/OneStepProverHostIo.sol#L260-L285) ignores return value by [(sender,None) = Deserialize.u256(message,1)](src/osp/OneStepProverHostIo.sol#L276)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L260-L285", "id": "0afb87bafe1a6f22b1455d93aba33da37b3cf46669a20a5730ad51b1d86842ba", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeLinkModule", "source_mapping": {"start": 16138, "length": 1054, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "(userMod,offset,None) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0)", "source_mapping": {"start": 16636, "length": 106, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [422, 423], "starting_column": 9, "ending_column": 70}, "type_specific_fields": {"parent": {"type": "function", "name": "executeLinkModule", "source_mapping": {"start": 16138, "length": 1054, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#407-435) ignores return value by (userMod,offset,None) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0) (src/osp/OneStepProverHostIo.sol#422-423)\n", "markdown": "[OneStepProverHostIo.executeLinkModule(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L407-L435) ignores return value by [(userMod,offset,None) = mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE,proof,0)](src/osp/OneStepProverHostIo.sol#L422-L423)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L407-L435", "id": "9e3cd14f7bf29e21693a396fc8a7ef8f13e8bd544b4f28cd33cf69ec9bce2307", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeSwitchCoThread", "source_mapping": {"start": 20987, "length": 1074, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "mach.setRecoveryFromPc(uint32(inst.argumentData))", "source_mapping": {"start": 21958, "length": 49, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [568], "starting_column": 13, "ending_column": 62}, "type_specific_fields": {"parent": {"type": "function", "name": "executeSwitchCoThread", "source_mapping": {"start": 20987, "length": 1074, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverHostIo", "source_mapping": {"start": 502, "length": 23272, "filename_relative": "src/osp/OneStepProverHostIo.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverHostIo.sol", "filename_short": "src/osp/OneStepProverHostIo.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620], "starting_column": 1, "ending_column": 2}}, "signature": "executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverHostIo.executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes) (src/osp/OneStepProverHostIo.sol#543-571) ignores return value by mach.setRecoveryFromPc(uint32(inst.argumentData)) (src/osp/OneStepProverHostIo.sol#568)\n", "markdown": "[OneStepProverHostIo.executeSwitchCoThread(ExecutionContext,Machine,Module,Instruction,bytes)](src/osp/OneStepProverHostIo.sol#L543-L571) ignores return value by [mach.setRecoveryFromPc(uint32(inst.argumentData))](src/osp/OneStepProverHostIo.sol#L568)\n", "first_markdown_element": "src/osp/OneStepProverHostIo.sol#L543-L571", "id": "54c33a35d6000982dc3c16d3614a0d6ca11ed8d0c7f8b1c3e20cfb8ab4c7ce78", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1138, "length": 3661, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 9997, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}, {"type": "node", "name": "(err,value,None) = mod.moduleMemory.load(index,readBytes,proof,0)", "source_mapping": {"start": 3611, "length": 78, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [102], "starting_column": 9, "ending_column": 87}, "type_specific_fields": {"parent": {"type": "function", "name": "executeMemoryLoad", "source_mapping": {"start": 1138, "length": 3661, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProverMemory", "source_mapping": {"start": 368, "length": 9997, "filename_relative": "src/osp/OneStepProverMemory.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProverMemory.sol", "filename_short": "src/osp/OneStepProverMemory.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270], "starting_column": 1, "ending_column": 2}}, "signature": "executeMemoryLoad(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes) (src/osp/OneStepProverMemory.sol#32-127) ignores return value by (err,value,None) = mod.moduleMemory.load(index,readBytes,proof,0) (src/osp/OneStepProverMemory.sol#102)\n", "markdown": "[OneStepProverMemory.executeMemoryLoad(Machine,Module,Instruction,bytes)](src/osp/OneStepProverMemory.sol#L32-L127) ignores return value by [(err,value,None) = mod.moduleMemory.load(index,readBytes,proof,0)](src/osp/OneStepProverMemory.sol#L102)\n", "first_markdown_element": "src/osp/OneStepProverMemory.sol#L32-L127", "id": "ceafdbd4578530988cdb377c0175b01b634b24c07a3e0e4fa4b499de82996cd3", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "IERC20Inbox(inbox).createRetryableTicket({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,tokenTotalFeeAmount:feeAmountNativeDenominated,data:})", "source_mapping": {"start": 9646, "length": 451, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82], "starting_column": 13, "ending_column": 15}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-97) ignores return value by IERC20Inbox(inbox).createRetryableTicket({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,tokenTotalFeeAmount:feeAmountNativeDenominated,data:}) (src/rollup/DeployHelper.sol#72-82)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L97) ignores return value by [IERC20Inbox(inbox).createRetryableTicket({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,tokenTotalFeeAmount:feeAmountNativeDenominated,data:})](src/rollup/DeployHelper.sol#L72-L82)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L97", "id": "2a04231e83905cdd672bfa401f070ff7ec9717f2a6c7a4560459056f7052cd48", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})", "source_mapping": {"start": 10128, "length": 399, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [84, 85, 86, 87, 88, 89, 90, 91, 92, 93], "starting_column": 13, "ending_column": 15}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-97) ignores return value by IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:}) (src/rollup/DeployHelper.sol#84-93)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L97) ignores return value by [IInbox(inbox).createRetryableTicket{value: feeAmount}({to:_l2Address,l2CallValue:_value,maxSubmissionCost:submissionCost,excessFeeRefundAddress:msg.sender,callValueRefundAddress:msg.sender,gasLimit:GASLIMIT,maxFeePerGas:maxFeePerGas,data:})](src/rollup/DeployHelper.sol#L84-L93)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L97", "id": "90ecb1364bb034d2f19943d5838c579c4df80bb3f4af3c21228b3940d31ebcd4", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}, {"type": "node", "name": "IInboxBase(inbox).sendL2Message(payload)", "source_mapping": {"start": 10604, "length": 40, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [96], "starting_column": 9, "ending_column": 49}, "type_specific_fields": {"parent": {"type": "function", "name": "_fundAndDeploy", "source_mapping": {"start": 8525, "length": 2126, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DeployHelper", "source_mapping": {"start": 525, "length": 11478, "filename_relative": "src/rollup/DeployHelper.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/DeployHelper.sol", "filename_short": "src/rollup/DeployHelper.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], "starting_column": 1, "ending_column": 2}}, "signature": "_fundAndDeploy(address,uint256,address,bytes,address,uint256)"}}}}], "description": "DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256) (src/rollup/DeployHelper.sol#46-97) ignores return value by IInboxBase(inbox).sendL2Message(payload) (src/rollup/DeployHelper.sol#96)\n", "markdown": "[DeployHelper._fundAndDeploy(address,uint256,address,bytes,address,uint256)](src/rollup/DeployHelper.sol#L46-L97) ignores return value by [IInboxBase(inbox).sendL2Message(payload)](src/rollup/DeployHelper.sol#L96)\n", "first_markdown_element": "src/rollup/DeployHelper.sol#L46-L97", "id": "a697be3c1fc1aa0b34c735eb8ee38f840660e286890e7444aa41641d499793cf", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_upgradeSecondaryToAndCall", "source_mapping": {"start": 2306, "length": 313, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [60, 61, 62, 63, 64, 65, 66, 67, 68, 69], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DoubleLogicERC1967Upgrade", "source_mapping": {"start": 525, "length": 3364, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98], "starting_column": 1, "ending_column": 2}}, "signature": "_upgradeSecondaryToAndCall(address,bytes,bool)"}}, {"type": "node", "name": "Address.functionDelegateCall(newImplementation,data)", "source_mapping": {"start": 2549, "length": 53, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [67], "starting_column": 13, "ending_column": 66}, "type_specific_fields": {"parent": {"type": "function", "name": "_upgradeSecondaryToAndCall", "source_mapping": {"start": 2306, "length": 313, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [60, 61, 62, 63, 64, 65, 66, 67, 68, 69], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "DoubleLogicERC1967Upgrade", "source_mapping": {"start": 525, "length": 3364, "filename_relative": "src/libraries/AdminFallbackProxy.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/libraries/AdminFallbackProxy.sol", "filename_short": "src/libraries/AdminFallbackProxy.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98], "starting_column": 1, "ending_column": 2}}, "signature": "_upgradeSecondaryToAndCall(address,bytes,bool)"}}}}], "description": "DoubleLogicERC1967Upgrade._upgradeSecondaryToAndCall(address,bytes,bool) (src/libraries/AdminFallbackProxy.sol#60-69) ignores return value by Address.functionDelegateCall(newImplementation,data) (src/libraries/AdminFallbackProxy.sol#67)\n", "markdown": "[DoubleLogicERC1967Upgrade._upgradeSecondaryToAndCall(address,bytes,bool)](src/libraries/AdminFallbackProxy.sol#L60-L69) ignores return value by [Address.functionDelegateCall(newImplementation,data)](src/libraries/AdminFallbackProxy.sol#L67)\n", "first_markdown_element": "src/libraries/AdminFallbackProxy.sol#L60-L69", "id": "47e0b452924c566df231e1282a84ce0091600869b7eac2442aebf277bfcb6455", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "setValidator", "source_mapping": {"start": 8142, "length": 497, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 486, "length": 16014, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380], "starting_column": 1, "ending_column": 2}}, "signature": "setValidator(address[],bool[])"}}, {"type": "node", "name": "validators.add(_validator[i])", "source_mapping": {"start": 8443, "length": 29, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [197], "starting_column": 26, "ending_column": 55}, "type_specific_fields": {"parent": {"type": "function", "name": "setValidator", "source_mapping": {"start": 8142, "length": 497, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 486, "length": 16014, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380], "starting_column": 1, "ending_column": 2}}, "signature": "setValidator(address[],bool[])"}}}}], "description": "RollupAdminLogic.setValidator(address[],bool[]) (src/rollup/RollupAdminLogic.sol#192-203) ignores return value by validators.add(_validator[i]) (src/rollup/RollupAdminLogic.sol#197)\n", "markdown": "[RollupAdminLogic.setValidator(address[],bool[])](src/rollup/RollupAdminLogic.sol#L192-L203) ignores return value by [validators.add(_validator[i])](src/rollup/RollupAdminLogic.sol#L197)\n", "first_markdown_element": "src/rollup/RollupAdminLogic.sol#L192-L203", "id": "056a26c9446d5532db3cc984a31adebc92496f212dff455a470093abdf218b61", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "setValidator", "source_mapping": {"start": 8142, "length": 497, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 486, "length": 16014, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380], "starting_column": 1, "ending_column": 2}}, "signature": "setValidator(address[],bool[])"}}, {"type": "node", "name": "validators.remove(_validator[i])", "source_mapping": {"start": 8491, "length": 32, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [198], "starting_column": 18, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "setValidator", "source_mapping": {"start": 8142, "length": 497, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupAdminLogic", "source_mapping": {"start": 486, "length": 16014, "filename_relative": "src/rollup/RollupAdminLogic.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupAdminLogic.sol", "filename_short": "src/rollup/RollupAdminLogic.sol", "is_dependency": false, "lines": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380], "starting_column": 1, "ending_column": 2}}, "signature": "setValidator(address[],bool[])"}}}}], "description": "RollupAdminLogic.setValidator(address[],bool[]) (src/rollup/RollupAdminLogic.sol#192-203) ignores return value by validators.remove(_validator[i]) (src/rollup/RollupAdminLogic.sol#198)\n", "markdown": "[RollupAdminLogic.setValidator(address[],bool[])](src/rollup/RollupAdminLogic.sol#L192-L203) ignores return value by [validators.remove(_validator[i])](src/rollup/RollupAdminLogic.sol#L198)\n", "first_markdown_element": "src/rollup/RollupAdminLogic.sol#L192-L203", "id": "a8036d0b7477daae67781719013d58fc811c69fbb9e554184db13e2e82a49b66", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createRollup", "source_mapping": {"start": 5935, "length": 5212, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}, {"type": "node", "name": "(None,ethSequencerInbox,ethDelayBufferableSequencerInbox,ethInbox,None,None) = bridgeCreator.ethBasedTemplates()", "source_mapping": {"start": 6152, "length": 241, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [143, 144, 145, 146, 147, 148, 149], "starting_column": 13, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "createRollup", "source_mapping": {"start": 5935, "length": 5212, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}}}], "description": "RollupCreator.createRollup(RollupCreator.RollupDeploymentParams) (src/rollup/RollupCreator.sol#136-262) ignores return value by (None,ethSequencerInbox,ethDelayBufferableSequencerInbox,ethInbox,None,None) = bridgeCreator.ethBasedTemplates() (src/rollup/RollupCreator.sol#143-149)\n", "markdown": "[RollupCreator.createRollup(RollupCreator.RollupDeploymentParams)](src/rollup/RollupCreator.sol#L136-L262) ignores return value by [(None,ethSequencerInbox,ethDelayBufferableSequencerInbox,ethInbox,None,None) = bridgeCreator.ethBasedTemplates()](src/rollup/RollupCreator.sol#L143-L149)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L136-L262", "id": "40f169f08fd26f8054603f19453ed7b0496536445e17fa3ba148dfe8b2d25fff", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "createRollup", "source_mapping": {"start": 5935, "length": 5212, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}, {"type": "node", "name": "(None,erc20SequencerInbox,erc20DelayBufferableSequencerInbox,erc20Inbox,None,None) = bridgeCreator.erc20BasedTemplates()", "source_mapping": {"start": 6838, "length": 249, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [160, 161, 162, 163, 164, 165, 166], "starting_column": 13, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "createRollup", "source_mapping": {"start": 5935, "length": 5212, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RollupCreator", "source_mapping": {"start": 703, "length": 13826, "filename_relative": "src/rollup/RollupCreator.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/rollup/RollupCreator.sol", "filename_short": "src/rollup/RollupCreator.sol", "is_dependency": false, "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349], "starting_column": 1, "ending_column": 2}}, "signature": "createRollup(RollupCreator.RollupDeploymentParams)"}}}}], "description": "RollupCreator.createRollup(RollupCreator.RollupDeploymentParams) (src/rollup/RollupCreator.sol#136-262) ignores return value by (None,erc20SequencerInbox,erc20DelayBufferableSequencerInbox,erc20Inbox,None,None) = bridgeCreator.erc20BasedTemplates() (src/rollup/RollupCreator.sol#160-166)\n", "markdown": "[RollupCreator.createRollup(RollupCreator.RollupDeploymentParams)](src/rollup/RollupCreator.sol#L136-L262) ignores return value by [(None,erc20SequencerInbox,erc20DelayBufferableSequencerInbox,erc20Inbox,None,None) = bridgeCreator.erc20BasedTemplates()](src/rollup/RollupCreator.sol#L160-L166)\n", "first_markdown_element": "src/rollup/RollupCreator.sol#L136-L262", "id": "ae3469f3b6667194b6c69894d8a4f2fcf03c45c6b8ce5f1922c20f350bf30396", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "_activeOutbox", "source_mapping": {"start": 1431, "length": 30, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [45], "starting_column": 5, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsBridge", "source_mapping": {"start": 1016, "length": 9434, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}}}, {"type": "node", "name": "_activeOutbox = msg.sender", "source_mapping": {"start": 6714, "length": 26, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [197], "starting_column": 9, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCall", "source_mapping": {"start": 6359, "length": 870, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsBridge", "source_mapping": {"start": 1016, "length": 9434, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "executeCall(address,uint256,bytes)"}}}}, {"type": "node", "name": "_activeOutbox = prevOutbox", "source_mapping": {"start": 7133, "length": 26, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [204], "starting_column": 9, "ending_column": 35}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCall", "source_mapping": {"start": 6359, "length": 870, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "AbsBridge", "source_mapping": {"start": 1016, "length": 9434, "filename_relative": "src/bridge/AbsBridge.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/bridge/AbsBridge.sol", "filename_short": "src/bridge/AbsBridge.sol", "is_dependency": false, "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286], "starting_column": 1, "ending_column": 2}}, "signature": "executeCall(address,uint256,bytes)"}}}}], "description": "AbsBridge._activeOutbox (src/bridge/AbsBridge.sol#45) is written in both\n\t_activeOutbox = msg.sender (src/bridge/AbsBridge.sol#197)\n\t_activeOutbox = prevOutbox (src/bridge/AbsBridge.sol#204)\n", "markdown": "[AbsBridge._activeOutbox](src/bridge/AbsBridge.sol#L45) is written in both\n\t[_activeOutbox = msg.sender](src/bridge/AbsBridge.sol#L197)\n\t[_activeOutbox = prevOutbox](src/bridge/AbsBridge.sol#L204)\n", "first_markdown_element": "src/bridge/AbsBridge.sol#L45", "id": "be9ea6f83c154faca9e0ec54e54ecb0325225f50f7961aa656c1bd24992e0bba", "check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"elements": [{"type": "variable", "name": "offset", "source_mapping": {"start": 7752, "length": 18, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [241], "starting_column": 13, "ending_column": 31}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7332, "length": 3437, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18084, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset)", "source_mapping": {"start": 9263, "length": 59, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [272], "starting_column": 13, "ending_column": 72}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7332, "length": 3437, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18084, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}, {"type": "node", "name": "(functionPointer,offset) = Deserialize.value(proof,offset)", "source_mapping": {"start": 9336, "length": 60, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [273], "starting_column": 13, "ending_column": 73}, "type_specific_fields": {"parent": {"type": "function", "name": "executeCallIndirect", "source_mapping": {"start": 7332, "length": 3437, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "OneStepProver0", "source_mapping": {"start": 362, "length": 18084, "filename_relative": "src/osp/OneStepProver0.sol", "filename_absolute": "/Users/user/src/nitro-contracts/src/osp/OneStepProver0.sol", "filename_short": "src/osp/OneStepProver0.sol", "is_dependency": false, "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523], "starting_column": 1, "ending_column": 2}}, "signature": "executeCallIndirect(Machine,Module,Instruction,bytes)"}}}}], "description": "OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).offset (src/osp/OneStepProver0.sol#241) is written in both\n\t(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset) (src/osp/OneStepProver0.sol#272)\n\t(functionPointer,offset) = Deserialize.value(proof,offset) (src/osp/OneStepProver0.sol#273)\n", "markdown": "[OneStepProver0.executeCallIndirect(Machine,Module,Instruction,bytes).offset](src/osp/OneStepProver0.sol#L241) is written in both\n\t[(elemFuncTypeHash,offset) = Deserialize.b32(proof,offset)](src/osp/OneStepProver0.sol#L272)\n\t[(functionPointer,offset) = Deserialize.value(proof,offset)](src/osp/OneStepProver0.sol#L273)\n", "first_markdown_element": "src/osp/OneStepProver0.sol#L241", "id": "9167315f08a2c960426f5823d4f28329e5f444c8b3b2464b144adb267f74aaa8", "check": "write-after-write", "impact": "Medium", "confidence": "High"}] \ No newline at end of file diff --git a/src/assertionStakingPool/AbsBoldStakingPool.sol b/src/assertionStakingPool/AbsBoldStakingPool.sol new file mode 100644 index 00000000..14d37c5e --- /dev/null +++ b/src/assertionStakingPool/AbsBoldStakingPool.sol @@ -0,0 +1,66 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {IAbsBoldStakingPool} from "./interfaces/IAbsBoldStakingPool.sol"; + +/// @notice Abstract contract for handling deposits and withdrawals of trustless edge/assertion staking pools. +/// @dev The total deposited amount can exceed the required stake amount. +/// If the total deposited amount exceeds the required amount, any depositor can withdraw some stake early even after the protocol move has been made. +/// This is okay because the protocol move will still be created once the required stake amount is reached, +/// and all depositors will still be eventually refunded. +abstract contract AbsBoldStakingPool is IAbsBoldStakingPool { + using SafeERC20 for IERC20; + + /// @inheritdoc IAbsBoldStakingPool + address public immutable stakeToken; + /// @inheritdoc IAbsBoldStakingPool + mapping(address => uint256) public depositBalance; + + constructor( + address _stakeToken + ) { + stakeToken = _stakeToken; + } + + /// @inheritdoc IAbsBoldStakingPool + function depositIntoPool( + uint256 amount + ) external { + if (amount == 0) { + revert ZeroAmount(); + } + + depositBalance[msg.sender] += amount; + IERC20(stakeToken).safeTransferFrom(msg.sender, address(this), amount); + + emit StakeDeposited(msg.sender, amount); + } + + /// @inheritdoc IAbsBoldStakingPool + function withdrawFromPool( + uint256 amount + ) public { + if (amount == 0) { + revert ZeroAmount(); + } + uint256 balance = depositBalance[msg.sender]; + if (amount > balance) { + revert AmountExceedsBalance(msg.sender, amount, balance); + } + + depositBalance[msg.sender] = balance - amount; + IERC20(stakeToken).safeTransfer(msg.sender, amount); + + emit StakeWithdrawn(msg.sender, amount); + } + + /// @inheritdoc IAbsBoldStakingPool + function withdrawFromPool() external { + withdrawFromPool(depositBalance[msg.sender]); + } +} diff --git a/src/assertionStakingPool/AssertionStakingPool.sol b/src/assertionStakingPool/AssertionStakingPool.sol new file mode 100644 index 00000000..72ed830c --- /dev/null +++ b/src/assertionStakingPool/AssertionStakingPool.sol @@ -0,0 +1,70 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "../rollup/IRollupLogic.sol"; +import "./AbsBoldStakingPool.sol"; +import "./interfaces/IAssertionStakingPool.sol"; + +/// @notice Staking pool contract for target assertion. +/// +/// Allows users to deposit stake, create assertion once required stake amount is reached, +/// and reclaim their stake when and if the assertion is confirmed. +/// +/// Tokens sent directly to this contract will be lost. +/// It is assumed that the rollup will not return more tokens than the amount deposited by the pool. +/// Any tokens exceeding the deposited amount to the pool will be stuck in the pool forever. +contract AssertionStakingPool is AbsBoldStakingPool, IAssertionStakingPool { + using SafeERC20 for IERC20; + + /// @inheritdoc IAssertionStakingPool + address public immutable rollup; + /// @inheritdoc IAssertionStakingPool + bytes32 public immutable assertionHash; + + /// @param _rollup Rollup contract of target chain + /// @param _assertionHash Assertion hash to be passed into Rollup.stakeOnNewAssertion + constructor( + address _rollup, + bytes32 _assertionHash + ) AbsBoldStakingPool(IRollupCore(_rollup).stakeToken()) { + if (_assertionHash == bytes32(0)) { + revert EmptyAssertionId(); + } + rollup = _rollup; + assertionHash = _assertionHash; + } + + /// @inheritdoc IAssertionStakingPool + function createAssertion( + AssertionInputs calldata assertionInputs + ) external { + uint256 requiredStake = assertionInputs.beforeStateData.configData.requiredStake; + // approve spending from rollup for newStakeOnNewAssertion call + IERC20(stakeToken).safeIncreaseAllowance(rollup, requiredStake); + // reverts if pool doesn't have enough stake and if assertion has already been asserted + IRollupUser(rollup).newStakeOnNewAssertion( + requiredStake, assertionInputs, assertionHash, address(this) + ); + } + + /// @inheritdoc IAssertionStakingPool + function makeStakeWithdrawable() public { + // this checks for active staker + IRollupUser(rollup).returnOldDeposit(); + } + + /// @inheritdoc IAssertionStakingPool + function withdrawStakeBackIntoPool() public { + IRollupUser(rollup).withdrawStakerFunds(); + } + + /// @inheritdoc IAssertionStakingPool + function makeStakeWithdrawableAndWithdrawBackIntoPool() external { + makeStakeWithdrawable(); + withdrawStakeBackIntoPool(); + } +} diff --git a/src/assertionStakingPool/AssertionStakingPoolCreator.sol b/src/assertionStakingPool/AssertionStakingPoolCreator.sol new file mode 100644 index 00000000..6240b804 --- /dev/null +++ b/src/assertionStakingPool/AssertionStakingPoolCreator.sol @@ -0,0 +1,35 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.0; + +import "./AssertionStakingPool.sol"; +import "./StakingPoolCreatorUtils.sol"; +import "./interfaces/IAssertionStakingPoolCreator.sol"; + +/// @notice Creates staking pool contract for a target assertion. Can be used for any child Arbitrum chain running on top of the deployed AssertionStakingPoolCreator's chain. +contract AssertionStakingPoolCreator is IAssertionStakingPoolCreator { + /// @inheritdoc IAssertionStakingPoolCreator + function createPool( + address _rollup, + bytes32 _assertionHash + ) external returns (IAssertionStakingPool) { + AssertionStakingPool assertionPool = + new AssertionStakingPool{salt: 0}(_rollup, _assertionHash); + emit NewAssertionPoolCreated(_rollup, _assertionHash, address(assertionPool)); + return assertionPool; + } + + /// @inheritdoc IAssertionStakingPoolCreator + function getPool( + address _rollup, + bytes32 _assertionHash + ) public view returns (IAssertionStakingPool) { + return IAssertionStakingPool( + StakingPoolCreatorUtils.getPool( + type(AssertionStakingPool).creationCode, abi.encode(_rollup, _assertionHash) + ) + ); + } +} diff --git a/src/assertionStakingPool/EdgeStakingPool.sol b/src/assertionStakingPool/EdgeStakingPool.sol new file mode 100644 index 00000000..5bc06478 --- /dev/null +++ b/src/assertionStakingPool/EdgeStakingPool.sol @@ -0,0 +1,57 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "./AbsBoldStakingPool.sol"; +import "./interfaces/IEdgeStakingPool.sol"; +import "../challengeV2/EdgeChallengeManager.sol"; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +/// @notice Trustless staking pool contract for creating layer zero edges. +/// +/// Allows users to deposit stake, create an edge once required stake amount is reached, +/// and reclaim their stake when and if the edge is confirmed. +/// +/// Tokens sent directly to this contract will be lost. +/// It is assumed that the challenge manager will not return more tokens than the amount deposited by the pool. +/// Any tokens exceeding the deposited amount to the pool will be stuck in the pool forever. +/// +/// @dev Unlike the assertion staking pool, there is no need for a function to claim the stake back into the pool. +/// (see `EdgeChallengeManager.refundStake(bytes32 edgeId)`) +contract EdgeStakingPool is AbsBoldStakingPool, IEdgeStakingPool { + using SafeERC20 for IERC20; + + /// @inheritdoc IEdgeStakingPool + address public immutable challengeManager; + /// @inheritdoc IEdgeStakingPool + bytes32 public immutable edgeId; + + /// @param _challengeManager EdgeChallengeManager contract + /// @param _edgeId The ID of the edge to be created (see ChallengeEdgeLib.id) + constructor( + address _challengeManager, + bytes32 _edgeId + ) AbsBoldStakingPool(address(EdgeChallengeManager(_challengeManager).stakeToken())) { + if (_edgeId == bytes32(0)) { + revert EmptyEdgeId(); + } + challengeManager = _challengeManager; + edgeId = _edgeId; + } + + /// @inheritdoc IEdgeStakingPool + function createEdge( + CreateEdgeArgs calldata args + ) external { + uint256 requiredStake = EdgeChallengeManager(challengeManager).stakeAmounts(args.level); + IERC20(stakeToken).safeIncreaseAllowance(address(challengeManager), requiredStake); + bytes32 newEdgeId = EdgeChallengeManager(challengeManager).createLayerZeroEdge(args); + if (newEdgeId != edgeId) { + revert IncorrectEdgeId(newEdgeId, edgeId); + } + } +} diff --git a/src/assertionStakingPool/EdgeStakingPoolCreator.sol b/src/assertionStakingPool/EdgeStakingPoolCreator.sol new file mode 100644 index 00000000..3bca041a --- /dev/null +++ b/src/assertionStakingPool/EdgeStakingPoolCreator.sol @@ -0,0 +1,34 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.0; + +import "./EdgeStakingPool.sol"; +import "./StakingPoolCreatorUtils.sol"; +import "./interfaces/IEdgeStakingPoolCreator.sol"; + +/// @notice Creates EdgeStakingPool contracts. +contract EdgeStakingPoolCreator is IEdgeStakingPoolCreator { + /// @inheritdoc IEdgeStakingPoolCreator + function createPool( + address challengeManager, + bytes32 edgeId + ) external returns (IEdgeStakingPool) { + EdgeStakingPool pool = new EdgeStakingPool{salt: 0}(challengeManager, edgeId); + emit NewEdgeStakingPoolCreated(challengeManager, edgeId); + return pool; + } + + /// @inheritdoc IEdgeStakingPoolCreator + function getPool( + address challengeManager, + bytes32 edgeId + ) public view returns (IEdgeStakingPool) { + return IEdgeStakingPool( + StakingPoolCreatorUtils.getPool( + type(EdgeStakingPool).creationCode, abi.encode(challengeManager, edgeId) + ) + ); + } +} diff --git a/src/assertionStakingPool/StakingPoolCreatorUtils.sol b/src/assertionStakingPool/StakingPoolCreatorUtils.sol new file mode 100644 index 00000000..f6e7a4f2 --- /dev/null +++ b/src/assertionStakingPool/StakingPoolCreatorUtils.sol @@ -0,0 +1,25 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/utils/Create2.sol"; +import "@openzeppelin/contracts/utils/Address.sol"; + +library StakingPoolCreatorUtils { + error PoolDoesntExist(); + + function getPool( + bytes memory creationCode, + bytes memory args + ) internal view returns (address) { + bytes32 bytecodeHash = keccak256(abi.encodePacked(creationCode, args)); + address pool = Create2.computeAddress(0, bytecodeHash, address(this)); + if (Address.isContract(pool)) { + return pool; + } else { + revert PoolDoesntExist(); + } + } +} diff --git a/src/assertionStakingPool/interfaces/IAbsBoldStakingPool.sol b/src/assertionStakingPool/interfaces/IAbsBoldStakingPool.sol new file mode 100644 index 00000000..46a47872 --- /dev/null +++ b/src/assertionStakingPool/interfaces/IAbsBoldStakingPool.sol @@ -0,0 +1,41 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +interface IAbsBoldStakingPool { + /// @notice Emitted when stake is deposited + event StakeDeposited(address indexed sender, uint256 amount); + /// @notice Emitted when stake is withdrawn + event StakeWithdrawn(address indexed sender, uint256 amount); + + /// @notice Cannot deposit or withdraw zero amount + error ZeroAmount(); + /// @notice Withdraw amount exceeds balance + error AmountExceedsBalance(address account, uint256 amount, uint256 balance); + + /// @notice Deposit stake into pool contract. + /// @param amount amount of stake token to deposit + function depositIntoPool( + uint256 amount + ) external; + + /// @notice Send supplied amount of stake from this contract back to its depositor. + /// @param amount stake amount to withdraw + function withdrawFromPool( + uint256 amount + ) external; + + /// @notice Send full balance of stake from this contract back to its depositor. + function withdrawFromPool() external; + + /// @notice The token that is used for staking + function stakeToken() external view returns (address); + + /// @notice The balance of the given account + /// @param account The account to check the balance of + function depositBalance( + address account + ) external view returns (uint256); +} diff --git a/src/assertionStakingPool/interfaces/IAssertionStakingPool.sol b/src/assertionStakingPool/interfaces/IAssertionStakingPool.sol new file mode 100644 index 00000000..470f9677 --- /dev/null +++ b/src/assertionStakingPool/interfaces/IAssertionStakingPool.sol @@ -0,0 +1,36 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "../../rollup/IRollupLogic.sol"; +import "./IAbsBoldStakingPool.sol"; + +interface IAssertionStakingPool is IAbsBoldStakingPool { + /// @notice Thrown when assertion id is empty + error EmptyAssertionId(); + + /// @notice Create assertion. Callable only if required stake has been reached and assertion has not been asserted yet. + function createAssertion( + AssertionInputs calldata assertionInputs + ) external; + + /// @notice Make stake withdrawable. + /// @dev Separate call from withdrawStakeBackIntoPool since returnOldDeposit reverts with 0 balance (in e.g., case of admin forceRefundStaker) + function makeStakeWithdrawable() external; + + /// @notice Move stake back from rollup contract to this contract. + /// Callable only if this contract has already created an assertion and it's now inactive. + /// @dev Separate call from makeStakeWithdrawable since returnOldDeposit reverts with 0 balance (in e.g., case of admin forceRefundStaker) + function withdrawStakeBackIntoPool() external; + + /// @notice Combines makeStakeWithdrawable and withdrawStakeBackIntoPool into single call + function makeStakeWithdrawableAndWithdrawBackIntoPool() external; + + /// @notice The targeted rollup contract + function rollup() external view returns (address); + + /// @notice The assertion hash that this pool creates + function assertionHash() external view returns (bytes32); +} diff --git a/src/assertionStakingPool/interfaces/IAssertionStakingPoolCreator.sol b/src/assertionStakingPool/interfaces/IAssertionStakingPoolCreator.sol new file mode 100644 index 00000000..15e9d2e0 --- /dev/null +++ b/src/assertionStakingPool/interfaces/IAssertionStakingPoolCreator.sol @@ -0,0 +1,31 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "../../rollup/IRollupLogic.sol"; +import "./IAssertionStakingPool.sol"; + +interface IAssertionStakingPoolCreator { + /// @notice Event emitted when a new staking pool is created + event NewAssertionPoolCreated( + address indexed rollup, bytes32 indexed _assertionHash, address assertionPool + ); + + /// @notice Create a staking pool contract + /// @param _rollup Rollup contract of target chain + /// @param _assertionHash Assertion hash to be passed into Rollup.stakeOnNewAssertion + function createPool( + address _rollup, + bytes32 _assertionHash + ) external returns (IAssertionStakingPool); + + /// @notice get staking pool deployed with provided inputs; reverts if pool contract doesn't exist. + /// @param _rollup Rollup contract of target chain + /// @param _assertionHash Assertion hash to be passed into Rollup.stakeOnNewAssertion + function getPool( + address _rollup, + bytes32 _assertionHash + ) external view returns (IAssertionStakingPool); +} diff --git a/src/assertionStakingPool/interfaces/IEdgeStakingPool.sol b/src/assertionStakingPool/interfaces/IEdgeStakingPool.sol new file mode 100644 index 00000000..fa2a40c3 --- /dev/null +++ b/src/assertionStakingPool/interfaces/IEdgeStakingPool.sol @@ -0,0 +1,27 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "../../challengeV2/EdgeChallengeManager.sol"; +import "./IAbsBoldStakingPool.sol"; + +interface IEdgeStakingPool is IAbsBoldStakingPool { + /// @notice The resulting edge does not match the expected edge + error IncorrectEdgeId(bytes32 actual, bytes32 expected); + + /// @notice Thrown when edge id is empty + error EmptyEdgeId(); + + /// @notice Create the edge. Callable only if required stake has been reached and edge has not been created yet. + function createEdge( + CreateEdgeArgs calldata args + ) external; + + /// @notice The targeted challenge manager contract + function challengeManager() external view returns (address); + + /// @notice The edge that this pool will create + function edgeId() external view returns (bytes32); +} diff --git a/src/assertionStakingPool/interfaces/IEdgeStakingPoolCreator.sol b/src/assertionStakingPool/interfaces/IEdgeStakingPoolCreator.sol new file mode 100644 index 00000000..8cfe8660 --- /dev/null +++ b/src/assertionStakingPool/interfaces/IEdgeStakingPoolCreator.sol @@ -0,0 +1,28 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "./IEdgeStakingPool.sol"; + +interface IEdgeStakingPoolCreator { + /// @notice Event emitted when a new staking pool is created + event NewEdgeStakingPoolCreated(address indexed challengeManager, bytes32 indexed edgeId); + + /// @notice Create an edge staking pool contract + /// @param challengeManager EdgeChallengeManager contract + /// @param edgeId The ID of the edge to be created (see ChallengeEdgeLib.id) + function createPool( + address challengeManager, + bytes32 edgeId + ) external returns (IEdgeStakingPool); + + /// @notice get staking pool deployed with provided inputs; reverts if pool contract doesn't exist. + /// @param challengeManager EdgeChallengeManager contract + /// @param edgeId The ID of the edge to be created (see ChallengeEdgeLib.id) + function getPool( + address challengeManager, + bytes32 edgeId + ) external view returns (IEdgeStakingPool); +} diff --git a/src/bridge/AbsBridge.sol b/src/bridge/AbsBridge.sol index bafd56f9..2979a760 100644 --- a/src/bridge/AbsBridge.sol +++ b/src/bridge/AbsBridge.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; @@ -68,7 +68,9 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { } /// @notice Allows the rollup owner to set another rollup address - function updateRollupAddress(IOwnable _rollup) external onlyRollupOrOwner { + function updateRollupAddress( + IOwnable _rollup + ) external onlyRollupOrOwner { rollup = _rollup; emit RollupUpdated(address(_rollup)); } @@ -84,11 +86,15 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { return outbox; } - function allowedDelayedInboxes(address inbox) public view returns (bool) { + function allowedDelayedInboxes( + address inbox + ) public view returns (bool) { return allowedDelayedInboxesMap[inbox].allowed; } - function allowedOutboxes(address outbox) public view returns (bool) { + function allowedOutboxes( + address outbox + ) public view returns (bool) { return allowedOutboxesMap[outbox].allowed; } @@ -105,17 +111,11 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { ) external onlySequencerInbox - returns ( - uint256 seqMessageIndex, - bytes32 beforeAcc, - bytes32 delayedAcc, - bytes32 acc - ) + returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc) { if ( - sequencerReportedSubMessageCount != prevMessageCount && - prevMessageCount != 0 && - sequencerReportedSubMessageCount != 0 + sequencerReportedSubMessageCount != prevMessageCount && prevMessageCount != 0 + && sequencerReportedSubMessageCount != 0 ) { revert BadSequencerMessageNumber(sequencerReportedSubMessageCount, prevMessageCount); } @@ -132,20 +132,18 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { } /// @inheritdoc IBridge - function submitBatchSpendingReport(address sender, bytes32 messageDataHash) - external - onlySequencerInbox - returns (uint256) - { - return - addMessageToDelayedAccumulator( - L1MessageType_batchPostingReport, - sender, - uint64(block.number), - uint64(block.timestamp), // solhint-disable-line not-rely-on-time, - block.basefee, - messageDataHash - ); + function submitBatchSpendingReport( + address sender, + bytes32 messageDataHash + ) external onlySequencerInbox returns (uint256) { + return addMessageToDelayedAccumulator( + L1MessageType_batchPostingReport, + sender, + uint64(block.number), + uint64(block.timestamp), // solhint-disable-line not-rely-on-time, + block.basefee, + messageDataHash + ); } function _enqueueDelayedMessage( @@ -180,13 +178,7 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { ) internal returns (uint256) { uint256 count = delayedInboxAccs.length; bytes32 messageHash = Messages.messageHash( - kind, - sender, - blockNumber, - blockTimestamp, - count, - baseFeeL1, - messageDataHash + kind, sender, blockNumber, blockTimestamp, count, baseFeeL1, messageDataHash ); bytes32 prevAcc = 0; if (count > 0) { @@ -194,14 +186,7 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { } delayedInboxAccs.push(Messages.accumulateInboxMessage(prevAcc, messageHash)); emit MessageDelivered( - count, - prevAcc, - msg.sender, - kind, - sender, - messageDataHash, - baseFeeL1, - blockTimestamp + count, prevAcc, msg.sender, kind, sender, messageDataHash, baseFeeL1, blockTimestamp ); return count; } @@ -226,7 +211,9 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { emit BridgeCallTriggered(msg.sender, to, value, data); } - function setSequencerInbox(address _sequencerInbox) external onlyRollupOrOwner { + function setSequencerInbox( + address _sequencerInbox + ) external onlyRollupOrOwner { sequencerInbox = _sequencerInbox; emit SequencerInboxUpdated(_sequencerInbox); } @@ -242,9 +229,8 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { allowedDelayedInboxesMap[inbox] = InOutInfo(allowedDelayedInboxList.length, true); allowedDelayedInboxList.push(inbox); } else { - allowedDelayedInboxList[info.index] = allowedDelayedInboxList[ - allowedDelayedInboxList.length - 1 - ]; + allowedDelayedInboxList[info.index] = + allowedDelayedInboxList[allowedDelayedInboxList.length - 1]; allowedDelayedInboxesMap[allowedDelayedInboxList[info.index]].index = info.index; allowedDelayedInboxList.pop(); delete allowedDelayedInboxesMap[inbox]; @@ -271,7 +257,9 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { } } - function setSequencerReportedSubMessageCount(uint256 newMsgCount) external onlyRollupOrOwner { + function setSequencerReportedSubMessageCount( + uint256 newMsgCount + ) external onlyRollupOrOwner { sequencerReportedSubMessageCount = newMsgCount; } @@ -287,7 +275,9 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge { function acceptFundsFromOldBridge() external payable {} /// @dev transfer funds provided to pay for crosschain msg - function _transferFunds(uint256 amount) internal virtual; + function _transferFunds( + uint256 amount + ) internal virtual; function _executeLowLevelCall( address to, diff --git a/src/bridge/AbsInbox.sol b/src/bridge/AbsInbox.sol index 1078f0cf..95c0fbcf 100644 --- a/src/bridge/AbsInbox.sol +++ b/src/bridge/AbsInbox.sol @@ -1,17 +1,17 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; import { DataTooLarge, + Deprecated, GasLimitTooLarge, InsufficientValue, InsufficientSubmissionCost, L1Forked, NotAllowedOrigin, - NotOrigin, NotRollupOrOwner, RetryableData } from "../libraries/Error.sol"; @@ -68,7 +68,9 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase } /// @inheritdoc IInboxBase - function setAllowListEnabled(bool _allowListEnabled) external onlyRollupOrOwner { + function setAllowListEnabled( + bool _allowListEnabled + ) external onlyRollupOrOwner { require(_allowListEnabled != allowListEnabled, "ALREADY_SET"); allowListEnabled = _allowListEnabled; emit AllowListEnabledUpdated(_allowListEnabled); @@ -101,7 +103,9 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase uint256 public immutable maxDataSize; uint256 internal immutable deployTimeChainId = block.chainid; - constructor(uint256 _maxDataSize) { + constructor( + uint256 _maxDataSize + ) { maxDataSize = _maxDataSize; } @@ -120,10 +124,10 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase } /* solhint-disable func-name-mixedcase */ - function __AbsInbox_init(IBridge _bridge, ISequencerInbox _sequencerInbox) - internal - onlyInitializing - { + function __AbsInbox_init( + IBridge _bridge, + ISequencerInbox _sequencerInbox + ) internal onlyInitializing { bridge = _bridge; sequencerInbox = _sequencerInbox; allowListEnabled = false; @@ -131,28 +135,16 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase } /// @inheritdoc IInboxBase - function sendL2MessageFromOrigin(bytes calldata messageData) - external - whenNotPaused - onlyAllowed - returns (uint256) - { - if (_chainIdChanged()) revert L1Forked(); - // solhint-disable-next-line avoid-tx-origin - if (msg.sender != tx.origin) revert NotOrigin(); - if (messageData.length > maxDataSize) revert DataTooLarge(messageData.length, maxDataSize); - uint256 msgNum = _deliverToBridge(L2_MSG, msg.sender, keccak256(messageData), 0); - emit InboxMessageDeliveredFromOrigin(msgNum); - return msgNum; + function sendL2MessageFromOrigin( + bytes calldata + ) external pure returns (uint256) { + revert Deprecated(); } /// @inheritdoc IInboxBase - function sendL2Message(bytes calldata messageData) - external - whenNotPaused - onlyAllowed - returns (uint256) - { + function sendL2Message( + bytes calldata messageData + ) external whenNotPaused onlyAllowed returns (uint256) { if (_chainIdChanged()) revert L1Forked(); return _deliverMessage(L2_MSG, msg.sender, messageData, 0); } @@ -170,21 +162,20 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase if (gasLimit > type(uint64).max) { revert GasLimitTooLarge(); } - return - _deliverMessage( - L2_MSG, - msg.sender, - abi.encodePacked( - L2MessageType_unsignedEOATx, - gasLimit, - maxFeePerGas, - nonce, - uint256(uint160(to)), - value, - data - ), - 0 - ); + return _deliverMessage( + L2_MSG, + msg.sender, + abi.encodePacked( + L2MessageType_unsignedEOATx, + gasLimit, + maxFeePerGas, + nonce, + uint256(uint160(to)), + value, + data + ), + 0 + ); } /// @inheritdoc IInboxBase @@ -199,20 +190,19 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase if (gasLimit > type(uint64).max) { revert GasLimitTooLarge(); } - return - _deliverMessage( - L2_MSG, - msg.sender, - abi.encodePacked( - L2MessageType_unsignedContractTx, - gasLimit, - maxFeePerGas, - uint256(uint160(to)), - value, - data - ), - 0 - ); + return _deliverMessage( + L2_MSG, + msg.sender, + abi.encodePacked( + L2MessageType_unsignedContractTx, + gasLimit, + maxFeePerGas, + uint256(uint160(to)), + value, + data + ), + 0 + ); } /// @inheritdoc IInboxBase @@ -237,8 +227,7 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase uint256 amountToBeMintedOnL2 = _fromNativeTo18Decimals(amount); if (amountToBeMintedOnL2 < (maxSubmissionCost + l2CallValue + gasLimit * maxFeePerGas)) { revert InsufficientValue( - maxSubmissionCost + l2CallValue + gasLimit * maxFeePerGas, - amountToBeMintedOnL2 + maxSubmissionCost + l2CallValue + gasLimit * maxFeePerGas, amountToBeMintedOnL2 ); } @@ -254,18 +243,17 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase } // gas limit is validated to be within uint64 in unsafeCreateRetryableTicket - return - _unsafeCreateRetryableTicket( - to, - l2CallValue, - maxSubmissionCost, - excessFeeRefundAddress, - callValueRefundAddress, - gasLimit, - maxFeePerGas, - amount, - data - ); + return _unsafeCreateRetryableTicket( + to, + l2CallValue, + maxSubmissionCost, + excessFeeRefundAddress, + callValueRefundAddress, + gasLimit, + maxFeePerGas, + amount, + data + ); } function _unsafeCreateRetryableTicket( @@ -281,7 +269,7 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase ) internal returns (uint256) { // gas price and limit of 1 should never be a valid input, so instead they are used as // magic values to trigger a revert in eth calls that surface data without requiring a tx trace - if (gasLimit == 1 || maxFeePerGas == 1) + if (gasLimit == 1 || maxFeePerGas == 1) { revert RetryableData( msg.sender, to, @@ -294,6 +282,7 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase maxFeePerGas, data ); + } // arbos will discard retryable with gas limit too large if (gasLimit > type(uint64).max) { @@ -301,27 +290,27 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase } uint256 submissionFee = calculateRetryableSubmissionFee(data.length, block.basefee); - if (maxSubmissionCost < submissionFee) + if (maxSubmissionCost < submissionFee) { revert InsufficientSubmissionCost(submissionFee, maxSubmissionCost); + } - return - _deliverMessage( - L1MessageType_submitRetryableTx, - msg.sender, - abi.encodePacked( - uint256(uint160(to)), - l2CallValue, - _fromNativeTo18Decimals(amount), - maxSubmissionCost, - uint256(uint160(excessFeeRefundAddress)), - uint256(uint160(callValueRefundAddress)), - gasLimit, - maxFeePerGas, - data.length, - data - ), - amount - ); + return _deliverMessage( + L1MessageType_submitRetryableTx, + msg.sender, + abi.encodePacked( + uint256(uint160(to)), + l2CallValue, + _fromNativeTo18Decimals(amount), + maxSubmissionCost, + uint256(uint160(excessFeeRefundAddress)), + uint256(uint160(callValueRefundAddress)), + gasLimit, + maxFeePerGas, + data.length, + data + ), + amount + ); } function _deliverMessage( @@ -330,8 +319,9 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase bytes memory _messageData, uint256 amount ) internal returns (uint256) { - if (_messageData.length > maxDataSize) + if (_messageData.length > maxDataSize) { revert DataTooLarge(_messageData.length, maxDataSize); + } uint256 msgNum = _deliverToBridge(_kind, _sender, keccak256(_messageData), amount); emit InboxMessageDelivered(msgNum, _messageData); return msgNum; @@ -344,11 +334,10 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase uint256 amount ) internal virtual returns (uint256); - function calculateRetryableSubmissionFee(uint256 dataLength, uint256 baseFee) - public - view - virtual - returns (uint256); + function calculateRetryableSubmissionFee( + uint256 dataLength, + uint256 baseFee + ) public view virtual returns (uint256); /// @notice get amount of ETH/token to mint on child chain based on provided value. /// In case of ETH-based rollup this amount will always equal the provided @@ -357,7 +346,9 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase /// decimals used for native currency on child chain. /// @dev provided value has to be less than 'type(uint256).max/10**(18-decimalsIn)' /// or otherwise it will overflow. - function _fromNativeTo18Decimals(uint256 value) internal view virtual returns (uint256); + function _fromNativeTo18Decimals( + uint256 value + ) internal view virtual returns (uint256); /** * @dev This empty reserved space is put in place to allow future versions to add new diff --git a/src/bridge/AbsOutbox.sol b/src/bridge/AbsOutbox.sol index a5d18601..173b0a05 100644 --- a/src/bridge/AbsOutbox.sol +++ b/src/bridge/AbsOutbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; @@ -60,7 +60,9 @@ abstract contract AbsOutbox is DelegateCallAware, IOutbox { uint128 public constant OUTBOX_VERSION = 2; - function initialize(IBridge _bridge) external onlyDelegated { + function initialize( + IBridge _bridge + ) external onlyDelegated { if (address(_bridge) == address(0)) revert HadZeroInit(); if (address(bridge) != address(0)) revert AlreadyInit(); // address zero is returned if no context is set, but the values used in storage @@ -93,8 +95,9 @@ abstract contract AbsOutbox is DelegateCallAware, IOutbox { /// @notice Allows the rollup owner to sync the rollup address function updateRollupAddress() external { - if (msg.sender != IOwnable(rollup).owner()) + if (msg.sender != IOwnable(rollup).owner()) { revert NotOwner(msg.sender, IOwnable(rollup).owner()); + } address newRollup = address(bridge.rollup()); if (rollup == newRollup) revert RollupNotChanged(); rollup = newRollup; @@ -163,15 +166,7 @@ abstract contract AbsOutbox is DelegateCallAware, IOutbox { uint256 value, bytes calldata data ) external { - bytes32 userTx = calculateItemHash( - l2Sender, - to, - l2Block, - l1Block, - l2Timestamp, - value, - data - ); + bytes32 userTx = calculateItemHash(l2Sender, to, l2Block, l1Block, l2Timestamp, value, data); recordOutputAsSpent(proof, index, userTx); @@ -228,15 +223,9 @@ abstract contract AbsOutbox is DelegateCallAware, IOutbox { context = prevContext; } - function _calcSpentIndexOffset(uint256 index) - internal - view - returns ( - uint256, - uint256, - bytes32 - ) - { + function _calcSpentIndexOffset( + uint256 index + ) internal view returns (uint256, uint256, bytes32) { uint256 spentIndex = index / 255; // Note: Reserves the MSB. uint256 bitOffset = index % 255; bytes32 replay = spent[spentIndex]; @@ -248,18 +237,16 @@ abstract contract AbsOutbox is DelegateCallAware, IOutbox { } /// @inheritdoc IOutbox - function isSpent(uint256 index) external view returns (bool) { + function isSpent( + uint256 index + ) external view returns (bool) { (, uint256 bitOffset, bytes32 replay) = _calcSpentIndexOffset(index); return _isSpent(bitOffset, replay); } - function recordOutputAsSpent( - bytes32[] memory proof, - uint256 index, - bytes32 item - ) internal { + function recordOutputAsSpent(bytes32[] memory proof, uint256 index, bytes32 item) internal { if (proof.length >= 256) revert ProofTooLong(proof.length); - if (index >= 2**proof.length) revert PathNotMinimal(index, 2**proof.length); + if (index >= 2 ** proof.length) revert PathNotMinimal(index, 2 ** proof.length); // Hash the leaf an extra time to prove it's a leaf bytes32 calcRoot = calculateMerkleRoot(proof, index, item); @@ -271,11 +258,7 @@ abstract contract AbsOutbox is DelegateCallAware, IOutbox { spent[spentIndex] = (replay | bytes32(1 << bitOffset)); } - function executeBridgeCall( - address to, - uint256 value, - bytes memory data - ) internal { + function executeBridgeCall(address to, uint256 value, bytes memory data) internal { (bool success, bytes memory returndata) = bridge.executeCall(to, value, data); if (!success) { if (returndata.length > 0) { @@ -299,8 +282,7 @@ abstract contract AbsOutbox is DelegateCallAware, IOutbox { uint256 value, bytes calldata data ) public pure returns (bytes32) { - return - keccak256(abi.encodePacked(l2Sender, to, l2Block, l1Block, l2Timestamp, value, data)); + return keccak256(abi.encodePacked(l2Sender, to, l2Block, l1Block, l2Timestamp, value, data)); } function calculateMerkleRoot( @@ -318,13 +300,17 @@ abstract contract AbsOutbox is DelegateCallAware, IOutbox { /// @notice based on provided value, get amount of ETH/token to unlock. In case of ETH-based rollup this amount /// will always equal the provided value. In case of ERC20-based rollup, amount will be re-adjusted to /// reflect the number of decimals used by native token, in case it is different than 18. - function _getAmountToUnlock(uint256 value) internal view virtual returns (uint256); + function _getAmountToUnlock( + uint256 value + ) internal view virtual returns (uint256); /// @notice value to be set for 'amount' field in L2ToL1Context during L2 to L1 transaction execution. /// In case of ERC20-based rollup this is the amount of native token being withdrawn. In case of standard ETH-based /// rollup this amount shall always be 0, because amount of ETH being withdrawn can be read from msg.value. /// @return amount of native token being withdrawn in case of ERC20-based rollup, or 0 in case of ETH-based rollup - function _amountToSetInContext(uint256 value) internal pure virtual returns (uint256); + function _amountToSetInContext( + uint256 value + ) internal pure virtual returns (uint256); /** * @dev This empty reserved space is put in place to allow future versions to add new diff --git a/src/bridge/Bridge.sol b/src/bridge/Bridge.sol index d46fa4ed..1688321f 100644 --- a/src/bridge/Bridge.sol +++ b/src/bridge/Bridge.sol @@ -11,8 +11,6 @@ import "./IEthBridge.sol"; import "./Messages.sol"; import "../libraries/DelegateCallAware.sol"; -import {L1MessageType_batchPostingReport} from "../libraries/MessageTypes.sol"; - /** * @title Staging ground for incoming and outgoing messages * @notice It is also the ETH escrow for value sent with these messages. @@ -21,7 +19,9 @@ contract Bridge is AbsBridge, IEthBridge { using AddressUpgradeable for address; /// @inheritdoc IEthBridge - function initialize(IOwnable rollup_) external initializer onlyDelegated { + function initialize( + IOwnable rollup_ + ) external initializer onlyDelegated { _activeOutbox = EMPTY_ACTIVEOUTBOX; rollup = rollup_; } @@ -35,7 +35,9 @@ contract Bridge is AbsBridge, IEthBridge { return _enqueueDelayedMessage(kind, sender, messageDataHash, msg.value); } - function _transferFunds(uint256) internal override { + function _transferFunds( + uint256 + ) internal override { // do nothing as Eth transfer is part of TX execution } diff --git a/src/bridge/DelayBuffer.sol b/src/bridge/DelayBuffer.sol new file mode 100644 index 00000000..a059e3e3 --- /dev/null +++ b/src/bridge/DelayBuffer.sol @@ -0,0 +1,123 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "./Messages.sol"; +import "./DelayBufferTypes.sol"; + +/** + * @title Manages the delay buffer for the sequencer (SequencerInbox.sol) + * @notice Messages are expected to be delayed up to a threshold, beyond which they are unexpected + * and deplete a delay buffer. Buffer depletion is preveneted from decreasing too quickly by only + * depleting by as many blocks as elapsed in the delayed message queue. + */ +library DelayBuffer { + uint256 public constant BASIS = 10000; + + /// @dev Depletion is limited by the elapsed blocks in the delayed message queue to avoid double counting and potential L2 reorgs. + /// Eg. 2 simultaneous batches sequencing multiple delayed messages with the same 100 blocks delay each + /// should count once as a single 100 block delay, not twice as a 200 block delay. This also prevents L2 reorg risk in edge cases. + /// Eg. If the buffer is 300 blocks, decrementing the buffer when processing the first batch would allow the second delay message to be force included before the sequencer could add the second batch. + /// Buffer depletion also saturates at the threshold instead of zero to allow a recovery margin. + /// Eg. when the sequencer recovers from an outage, it is able to wait threshold > finality time before queueing delayed messages to avoid L1 reorgs. + /// @notice Conditionally updates the buffer. Replenishes the buffer and depletes if delay is unexpected. + /// @param start The beginning reference point + /// @param end The ending reference point + /// @param buffer The buffer to be updated + /// @param sequenced The reference point when messages were sequenced + /// @param threshold The threshold to saturate at + /// @param max The maximum buffer + /// @param replenishRateInBasis The amount to replenish the buffer per block in basis points. + function calcBuffer( + uint256 start, + uint256 end, + uint256 buffer, + uint256 sequenced, + uint256 threshold, + uint256 max, + uint256 replenishRateInBasis + ) internal pure returns (uint256) { + uint256 elapsed = end > start ? end - start : 0; + uint256 delay = sequenced > start ? sequenced - start : 0; + // replenishment rounds down and will not overflow since all inputs including + // replenishRateInBasis are cast from uint64 in calcPendingBuffer + buffer += (elapsed * replenishRateInBasis) / BASIS; + + uint256 unexpectedDelay = delay > threshold ? delay - threshold : 0; + if (unexpectedDelay > elapsed) { + unexpectedDelay = elapsed; + } + + // decrease the buffer + if (buffer > unexpectedDelay) { + buffer -= unexpectedDelay; + if (buffer > threshold) { + // saturating above at the max + return buffer > max ? max : buffer; + } + } + // saturating below at the threshold + return threshold; + } + + /// @notice Applies update to buffer data + /// @param self The delay buffer data + /// @param blockNumber The update block number + function update(BufferData storage self, uint64 blockNumber) internal { + self.bufferBlocks = calcPendingBuffer(self, blockNumber); + + // store a new starting reference point + // any buffer updates will be applied retroactively in the next batch post + self.prevBlockNumber = blockNumber; + self.prevSequencedBlockNumber = uint64(block.number); + } + + /// @dev The delay buffer can change due to pending depletion / replenishment due to previous delays. + /// This function applies pending buffer changes to calculate buffer updates. + /// @notice Calculates the buffer changes up to the requested block number + /// @param self The delay buffer data + /// @param blockNumber The block number to process the delay up to + function calcPendingBuffer( + BufferData storage self, + uint64 blockNumber + ) internal view returns (uint64) { + // bufferUpdate will not overflow since inputs are uint64 + return uint64( + calcBuffer({ + start: self.prevBlockNumber, + end: blockNumber, + buffer: self.bufferBlocks, + threshold: self.threshold, + sequenced: self.prevSequencedBlockNumber, + max: self.max, + replenishRateInBasis: self.replenishRateInBasis + }) + ); + } + + /// @dev This is the `sync validity window` during which no proofs are required. + /// @notice Returns true if the inbox is in a synced state (no unexpected delays are possible) + function isSynced( + BufferData storage self + ) internal view returns (bool) { + return block.number - self.prevBlockNumber <= self.threshold; + } + + function isUpdatable( + BufferData storage self + ) internal view returns (bool) { + // if synced, the buffer can't be depleted + // if full, the buffer can't be replenished + // if neither synced nor full, the buffer updatable (depletable / replenishable) + return !isSynced(self) || self.bufferBlocks < self.max; + } + + function isValidBufferConfig( + BufferConfig memory config + ) internal pure returns (bool) { + return config.threshold != 0 && config.max != 0 && config.replenishRateInBasis <= BASIS + && config.threshold <= config.max; + } +} diff --git a/src/bridge/DelayBufferTypes.sol b/src/bridge/DelayBufferTypes.sol new file mode 100644 index 00000000..9a5c3674 --- /dev/null +++ b/src/bridge/DelayBufferTypes.sol @@ -0,0 +1,38 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +import "./Messages.sol"; + +pragma solidity >=0.6.9 <0.9.0; + +/// @notice Delay buffer and delay threshold settings +/// @param threshold The maximum amount of blocks that a message is expected to be delayed +/// @param max The maximum buffer in blocks +/// @param replenishRateInBasis The amount to replenish the buffer per block in basis points. +struct BufferConfig { + uint64 threshold; + uint64 max; + uint64 replenishRateInBasis; +} + +/// @notice The delay buffer data. +/// @param bufferBlocks The buffer in blocks. +/// @param max The maximum buffer in blocks +/// @param threshold The maximum amount of blocks that a message is expected to be delayed +/// @param prevBlockNumber The blocknumber of the last included delay message. +/// @param replenishRateInBasis The amount to replenish the buffer per block in basis points. +/// @param prevSequencedBlockNumber The blocknumber when last included delay message was sequenced. +struct BufferData { + uint64 bufferBlocks; + uint64 max; + uint64 threshold; + uint64 prevBlockNumber; + uint64 replenishRateInBasis; + uint64 prevSequencedBlockNumber; +} + +struct DelayProof { + bytes32 beforeDelayedAcc; + Messages.Message delayedMessage; +} diff --git a/src/bridge/ERC20Bridge.sol b/src/bridge/ERC20Bridge.sol index d2d3bffc..559bd7b0 100644 --- a/src/bridge/ERC20Bridge.sol +++ b/src/bridge/ERC20Bridge.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; @@ -13,7 +13,6 @@ import { CallNotAllowed, NativeTokenDecimalsTooLarge } from "../libraries/Error.sol"; -import {DecimalsConverterHelper} from "../libraries/DecimalsConverterHelper.sol"; import {MAX_ALLOWED_NATIVE_TOKEN_DECIMALS} from "../libraries/Constants.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; @@ -42,7 +41,10 @@ contract ERC20Bridge is AbsBridge, IERC20Bridge { uint8 public nativeTokenDecimals; /// @inheritdoc IERC20Bridge - function initialize(IOwnable rollup_, address nativeToken_) external initializer onlyDelegated { + function initialize( + IOwnable rollup_, + address nativeToken_ + ) external initializer onlyDelegated { if (nativeToken_ == address(0)) revert InvalidTokenSet(nativeToken_); nativeToken = nativeToken_; _activeOutbox = EMPTY_ACTIVEOUTBOX; @@ -72,7 +74,9 @@ contract ERC20Bridge is AbsBridge, IERC20Bridge { return _enqueueDelayedMessage(kind, sender, messageDataHash, tokenFeeAmount); } - function _transferFunds(uint256 amount) internal override { + function _transferFunds( + uint256 amount + ) internal override { // fetch native token from Inbox IERC20(nativeToken).safeTransferFrom(msg.sender, address(this), amount); } diff --git a/src/bridge/ERC20Inbox.sol b/src/bridge/ERC20Inbox.sol index b42ce5db..303397f2 100644 --- a/src/bridge/ERC20Inbox.sol +++ b/src/bridge/ERC20Inbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; @@ -26,14 +26,15 @@ import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol contract ERC20Inbox is AbsInbox, IERC20Inbox { using SafeERC20 for IERC20; - constructor(uint256 _maxDataSize) AbsInbox(_maxDataSize) {} + constructor( + uint256 _maxDataSize + ) AbsInbox(_maxDataSize) {} /// @inheritdoc IInboxBase - function initialize(IBridge _bridge, ISequencerInbox _sequencerInbox) - external - initializer - onlyDelegated - { + function initialize( + IBridge _bridge, + ISequencerInbox _sequencerInbox + ) external initializer onlyDelegated { __AbsInbox_init(_bridge, _sequencerInbox); // inbox holds native token in transit used to pay for retryable tickets, approve bridge to use it @@ -42,7 +43,9 @@ contract ERC20Inbox is AbsInbox, IERC20Inbox { } /// @inheritdoc IERC20Inbox - function depositERC20(uint256 amount) public whenNotPaused onlyAllowed returns (uint256) { + function depositERC20( + uint256 amount + ) public whenNotPaused onlyAllowed returns (uint256) { address dest = msg.sender; // solhint-disable-next-line avoid-tx-origin @@ -52,13 +55,9 @@ contract ERC20Inbox is AbsInbox, IERC20Inbox { } uint256 amountToMintOnL2 = _fromNativeTo18Decimals(amount); - return - _deliverMessage( - L1MessageType_ethDeposit, - msg.sender, - abi.encodePacked(dest, amountToMintOnL2), - amount - ); + return _deliverMessage( + L1MessageType_ethDeposit, msg.sender, abi.encodePacked(dest, amountToMintOnL2), amount + ); } /// @inheritdoc IERC20Inbox @@ -73,18 +72,17 @@ contract ERC20Inbox is AbsInbox, IERC20Inbox { uint256 tokenTotalFeeAmount, bytes calldata data ) external whenNotPaused onlyAllowed returns (uint256) { - return - _createRetryableTicket( - to, - l2CallValue, - maxSubmissionCost, - excessFeeRefundAddress, - callValueRefundAddress, - gasLimit, - maxFeePerGas, - tokenTotalFeeAmount, - data - ); + return _createRetryableTicket( + to, + l2CallValue, + maxSubmissionCost, + excessFeeRefundAddress, + callValueRefundAddress, + gasLimit, + maxFeePerGas, + tokenTotalFeeAmount, + data + ); } /// @inheritdoc IERC20Inbox @@ -99,27 +97,24 @@ contract ERC20Inbox is AbsInbox, IERC20Inbox { uint256 tokenTotalFeeAmount, bytes calldata data ) public whenNotPaused onlyAllowed returns (uint256) { - return - _unsafeCreateRetryableTicket( - to, - l2CallValue, - maxSubmissionCost, - excessFeeRefundAddress, - callValueRefundAddress, - gasLimit, - maxFeePerGas, - tokenTotalFeeAmount, - data - ); + return _unsafeCreateRetryableTicket( + to, + l2CallValue, + maxSubmissionCost, + excessFeeRefundAddress, + callValueRefundAddress, + gasLimit, + maxFeePerGas, + tokenTotalFeeAmount, + data + ); } /// @inheritdoc IInboxBase - function calculateRetryableSubmissionFee(uint256, uint256) - public - pure - override(AbsInbox, IInboxBase) - returns (uint256) - { + function calculateRetryableSubmissionFee( + uint256, + uint256 + ) public pure override(AbsInbox, IInboxBase) returns (uint256) { // retryable ticket's submission fee is not charged when ERC20 token is used to pay for fees return 0; } @@ -139,17 +134,15 @@ contract ERC20Inbox is AbsInbox, IERC20Inbox { IERC20(nativeToken).safeTransferFrom(msg.sender, address(this), diff); } - return - IERC20Bridge(address(bridge)).enqueueDelayedMessage( - kind, - AddressAliasHelper.applyL1ToL2Alias(sender), - messageDataHash, - tokenAmount - ); + return IERC20Bridge(address(bridge)).enqueueDelayedMessage( + kind, AddressAliasHelper.applyL1ToL2Alias(sender), messageDataHash, tokenAmount + ); } /// @inheritdoc AbsInbox - function _fromNativeTo18Decimals(uint256 value) internal view override returns (uint256) { + function _fromNativeTo18Decimals( + uint256 value + ) internal view override returns (uint256) { // In order to keep compatibility of child chain's native currency with external 3rd party tooling we // expect 18 decimals to be always used for native currency. If native token uses different number of // decimals then here it will be normalized to 18. Keep in mind, when withdrawing from child chain back diff --git a/src/bridge/ERC20Outbox.sol b/src/bridge/ERC20Outbox.sol index e8541775..b8f82c57 100644 --- a/src/bridge/ERC20Outbox.sol +++ b/src/bridge/ERC20Outbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; @@ -25,14 +25,18 @@ contract ERC20Outbox is AbsOutbox { } /// @inheritdoc AbsOutbox - function _getAmountToUnlock(uint256 value) internal view override returns (uint256) { + function _getAmountToUnlock( + uint256 value + ) internal view override returns (uint256) { uint8 nativeTokenDecimals = IERC20Bridge(address(bridge)).nativeTokenDecimals(); // this might revert due to overflow, but we assume the token supply is less than 2^256 return DecimalsConverterHelper.adjustDecimals(value, 18, nativeTokenDecimals); } /// @inheritdoc AbsOutbox - function _amountToSetInContext(uint256 value) internal pure override returns (uint256) { + function _amountToSetInContext( + uint256 value + ) internal pure override returns (uint256) { // native token withdrawal amount which can be fetched from context return value; } diff --git a/src/bridge/GasRefunder.sol b/src/bridge/GasRefunder.sol index 5f85e9f2..2c29cba6 100644 --- a/src/bridge/GasRefunder.sol +++ b/src/bridge/GasRefunder.sol @@ -90,16 +90,22 @@ contract GasRefunder is IGasRefunder, Ownable { }); } - function setDisallower(address addr) external onlyOwner { + function setDisallower( + address addr + ) external onlyOwner { disallower = addr; emit DisallowerSet(addr); } - function allowContracts(address[] calldata addresses) external onlyOwner { + function allowContracts( + address[] calldata addresses + ) external onlyOwner { setContractsAllowedImpl(addresses, true); } - function disallowContracts(address[] calldata addresses) external { + function disallowContracts( + address[] calldata addresses + ) external { require(msg.sender == owner() || msg.sender == disallower, "NOT_AUTHORIZED"); setContractsAllowedImpl(addresses, false); } @@ -112,11 +118,15 @@ contract GasRefunder is IGasRefunder, Ownable { } } - function allowRefundees(address[] calldata addresses) external onlyOwner { + function allowRefundees( + address[] calldata addresses + ) external onlyOwner { setRefundeesAllowedImpl(addresses, true); } - function disallowRefundees(address[] calldata addresses) external { + function disallowRefundees( + address[] calldata addresses + ) external { require(msg.sender == owner() || msg.sender == disallower, "NOT_AUTHORIZED"); setRefundeesAllowedImpl(addresses, false); } @@ -129,32 +139,44 @@ contract GasRefunder is IGasRefunder, Ownable { } } - function setMaxRefundeeBalance(uint128 newValue) external onlyOwner { + function setMaxRefundeeBalance( + uint128 newValue + ) external onlyOwner { commonParams.maxRefundeeBalance = newValue; emit CommonParameterSet(CommonParameterKey.MAX_REFUNDEE_BALANCE, newValue); } - function setExtraGasMargin(uint32 newValue) external onlyOwner { + function setExtraGasMargin( + uint32 newValue + ) external onlyOwner { commonParams.extraGasMargin = newValue; emit CommonParameterSet(CommonParameterKey.EXTRA_GAS_MARGIN, newValue); } - function setCalldataCost(uint8 newValue) external onlyOwner { + function setCalldataCost( + uint8 newValue + ) external onlyOwner { commonParams.calldataCost = newValue; emit CommonParameterSet(CommonParameterKey.CALLDATA_COST, newValue); } - function setMaxGasTip(uint64 newValue) external onlyOwner { + function setMaxGasTip( + uint64 newValue + ) external onlyOwner { commonParams.maxGasTip = newValue; emit CommonParameterSet(CommonParameterKey.MAX_GAS_TIP, newValue); } - function setMaxGasCost(uint64 newValue) external onlyOwner { + function setMaxGasCost( + uint64 newValue + ) external onlyOwner { commonParams.maxGasCost = newValue; emit CommonParameterSet(CommonParameterKey.MAX_GAS_COST, newValue); } - function setMaxSingleGasUsage(uint32 newValue) external onlyOwner { + function setMaxSingleGasUsage( + uint32 newValue + ) external onlyOwner { commonParams.maxSingleGasUsage = newValue; emit CommonParameterSet(CommonParameterKey.MAX_SINGLE_GAS_USAGE, newValue); } @@ -166,7 +188,7 @@ contract GasRefunder is IGasRefunder, Ownable { function withdraw(address payable destination, uint256 amount) external onlyOwner { // It's expected that destination is an EOA // solhint-disable-next-line avoid-low-level-calls - (bool success, ) = destination.call{value: amount}(""); + (bool success,) = destination.call{value: amount}(""); require(success, "WITHDRAW_FAILED"); emit Withdrawn(msg.sender, destination, amount); } @@ -187,19 +209,13 @@ contract GasRefunder is IGasRefunder, Ownable { if (!allowedContracts[msg.sender]) { emit RefundGasCostsDenied( - refundee, - msg.sender, - RefundDenyReason.CONTRACT_NOT_ALLOWED, - gasUsed + refundee, msg.sender, RefundDenyReason.CONTRACT_NOT_ALLOWED, gasUsed ); return false; } if (!allowedRefundees[refundee]) { emit RefundGasCostsDenied( - refundee, - msg.sender, - RefundDenyReason.REFUNDEE_NOT_ALLOWED, - gasUsed + refundee, msg.sender, RefundDenyReason.REFUNDEE_NOT_ALLOWED, gasUsed ); return false; } @@ -219,9 +235,7 @@ contract GasRefunder is IGasRefunder, Ownable { // Add in a bit of a buffer for the tx costs not measured with gasleft gasUsed += - startGasLeft + - commonParams.extraGasMargin + - (calldataSize * commonParams.calldataCost); + startGasLeft + commonParams.extraGasMargin + (calldataSize * commonParams.calldataCost); // Split this up into two statements so that gasleft() comes after the storage loads gasUsed -= gasleft(); @@ -251,7 +265,7 @@ contract GasRefunder is IGasRefunder, Ownable { // It's expected that refundee is an EOA // solhint-disable-next-line avoid-low-level-calls - (success, ) = refundee.call{value: refundAmount}(""); + (success,) = refundee.call{value: refundAmount}(""); emit RefundedGasCosts(refundee, msg.sender, success, gasUsed, estGasPrice, refundAmount); } } diff --git a/src/bridge/IBridge.sol b/src/bridge/IBridge.sol index 1137fcd3..3b2dcdc4 100644 --- a/src/bridge/IBridge.sol +++ b/src/bridge/IBridge.sol @@ -42,10 +42,7 @@ interface IBridge { ); event BridgeCallTriggered( - address indexed outbox, - address indexed to, - uint256 value, - bytes data + address indexed outbox, address indexed to, uint256 value, bytes data ); event InboxToggle(address indexed inbox, bool enabled); @@ -56,15 +53,23 @@ interface IBridge { event RollupUpdated(address rollup); - function allowedDelayedInboxList(uint256) external returns (address); + function allowedDelayedInboxList( + uint256 + ) external returns (address); - function allowedOutboxList(uint256) external returns (address); + function allowedOutboxList( + uint256 + ) external returns (address); /// @dev Accumulator for delayed inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. - function delayedInboxAccs(uint256) external view returns (bytes32); + function delayedInboxAccs( + uint256 + ) external view returns (bytes32); /// @dev Accumulator for sequencer inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. - function sequencerInboxAccs(uint256) external view returns (bytes32); + function sequencerInboxAccs( + uint256 + ) external view returns (bytes32); function rollup() external view returns (IOwnable); @@ -72,9 +77,13 @@ interface IBridge { function activeOutbox() external view returns (address); - function allowedDelayedInboxes(address inbox) external view returns (bool); + function allowedDelayedInboxes( + address inbox + ) external view returns (bool); - function allowedOutboxes(address outbox) external view returns (bool); + function allowedOutboxes( + address outbox + ) external view returns (bool); function sequencerReportedSubMessageCount() external view returns (uint256); @@ -97,12 +106,7 @@ interface IBridge { uint256 newMessageCount ) external - returns ( - uint256 seqMessageIndex, - bytes32 beforeAcc, - bytes32 delayedAcc, - bytes32 acc - ); + returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc); /** * @dev Allows the sequencer inbox to submit a delayed message of the batchPostingReport type @@ -110,17 +114,22 @@ interface IBridge { * to call `enqueueDelayedMessage` to avoid the gas overhead of an extra SLOAD in either * every delayed inbox or every sequencer inbox call. */ - function submitBatchSpendingReport(address batchPoster, bytes32 dataHash) - external - returns (uint256 msgNum); + function submitBatchSpendingReport( + address batchPoster, + bytes32 dataHash + ) external returns (uint256 msgNum); // ---------- onlyRollupOrOwner functions ---------- - function setSequencerInbox(address _sequencerInbox) external; + function setSequencerInbox( + address _sequencerInbox + ) external; function setDelayedInbox(address inbox, bool enabled) external; function setOutbox(address inbox, bool enabled) external; - function updateRollupAddress(IOwnable _rollup) external; + function updateRollupAddress( + IOwnable _rollup + ) external; } diff --git a/src/bridge/IERC20Bridge.sol b/src/bridge/IERC20Bridge.sol index d3cda081..264c620d 100644 --- a/src/bridge/IERC20Bridge.sol +++ b/src/bridge/IERC20Bridge.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version diff --git a/src/bridge/IERC20Inbox.sol b/src/bridge/IERC20Inbox.sol index ddc94a27..d13f159d 100644 --- a/src/bridge/IERC20Inbox.sol +++ b/src/bridge/IERC20Inbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version @@ -14,7 +14,9 @@ interface IERC20Inbox is IInboxBase { * Look into retryable tickets if you are interested in this functionality. * @dev This function should not be called inside contract constructors */ - function depositERC20(uint256 amount) external returns (uint256); + function depositERC20( + uint256 amount + ) external returns (uint256); /** * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts diff --git a/src/bridge/IEthBridge.sol b/src/bridge/IEthBridge.sol index aa52d75c..d1ea6b3b 100644 --- a/src/bridge/IEthBridge.sol +++ b/src/bridge/IEthBridge.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version @@ -22,5 +22,7 @@ interface IEthBridge is IBridge { // ---------- initializer ---------- - function initialize(IOwnable rollup_) external; + function initialize( + IOwnable rollup_ + ) external; } diff --git a/src/bridge/IInbox.sol b/src/bridge/IInbox.sol index fb0f1cc3..cea3bea3 100644 --- a/src/bridge/IInbox.sol +++ b/src/bridge/IInbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version @@ -129,5 +129,7 @@ interface IInbox is IInboxBase { * @dev function to be called one time during the inbox upgrade process * this is used to fix the storage slots */ - function postUpgradeInit(IBridge _bridge) external; + function postUpgradeInit( + IBridge _bridge + ) external; } diff --git a/src/bridge/IInboxBase.sol b/src/bridge/IInboxBase.sol index c9775a36..0c8b836b 100644 --- a/src/bridge/IInboxBase.sol +++ b/src/bridge/IInboxBase.sol @@ -16,19 +16,19 @@ interface IInboxBase is IDelayedMessageProvider { function maxDataSize() external view returns (uint256); - /** - * @notice Send a generic L2 message to the chain - * @dev This method is an optimization to avoid having to emit the entirety of the messageData in a log. Instead validators are expected to be able to parse the data from the transaction's input - * @param messageData Data of the message being sent - */ - function sendL2MessageFromOrigin(bytes calldata messageData) external returns (uint256); + /// @dev Deprecated due to EIP-3074 + function sendL2MessageFromOrigin( + bytes calldata + ) external returns (uint256); /** * @notice Send a generic L2 message to the chain * @dev This method can be used to send any type of message that doesn't require L1 validation * @param messageData Data of the message being sent */ - function sendL2Message(bytes calldata messageData) external returns (uint256); + function sendL2Message( + bytes calldata messageData + ) external returns (uint256); function sendUnsignedTransaction( uint256 gasLimit, @@ -54,10 +54,10 @@ interface IInboxBase is IDelayedMessageProvider { * @param dataLength The length of the retryable's calldata, in bytes * @param baseFee The block basefee when the retryable is included in the chain, if 0 current block.basefee will be used */ - function calculateRetryableSubmissionFee(uint256 dataLength, uint256 baseFee) - external - view - returns (uint256); + function calculateRetryableSubmissionFee( + uint256 dataLength, + uint256 baseFee + ) external view returns (uint256); // ---------- onlyRollupOrOwner functions ---------- @@ -71,10 +71,14 @@ interface IInboxBase is IDelayedMessageProvider { function setAllowList(address[] memory user, bool[] memory val) external; /// @notice enable or disable allowList - function setAllowListEnabled(bool _allowListEnabled) external; + function setAllowListEnabled( + bool _allowListEnabled + ) external; /// @notice check if user is in allowList - function isAllowed(address user) external view returns (bool); + function isAllowed( + address user + ) external view returns (bool); /// @notice check if allowList is enabled function allowListEnabled() external view returns (bool); diff --git a/src/bridge/IOutbox.sol b/src/bridge/IOutbox.sol index 41d0b594..0491159c 100644 --- a/src/bridge/IOutbox.sol +++ b/src/bridge/IOutbox.sol @@ -10,21 +10,24 @@ import "./IBridge.sol"; interface IOutbox { event SendRootUpdated(bytes32 indexed outputRoot, bytes32 indexed l2BlockHash); event OutBoxTransactionExecuted( - address indexed to, - address indexed l2Sender, - uint256 indexed zero, - uint256 transactionIndex + address indexed to, address indexed l2Sender, uint256 indexed zero, uint256 transactionIndex ); - function initialize(IBridge _bridge) external; + function initialize( + IBridge _bridge + ) external; function rollup() external view returns (address); // the rollup contract function bridge() external view returns (IBridge); // the bridge contract - function spent(uint256) external view returns (bytes32); // packed spent bitmap + function spent( + uint256 + ) external view returns (bytes32); // packed spent bitmap - function roots(bytes32) external view returns (bytes32); // maps root hashes => L2 block hash + function roots( + bytes32 + ) external view returns (bytes32); // maps root hashes => L2 block hash // solhint-disable-next-line func-name-mixedcase function OUTBOX_VERSION() external view returns (uint128); // the outbox version @@ -104,7 +107,9 @@ interface IOutbox { * @param index Merkle path to message * @return true if the message has been spent */ - function isSpent(uint256 index) external view returns (bool); + function isSpent( + uint256 index + ) external view returns (bool); function calculateItemHash( address l2Sender, diff --git a/src/bridge/ISequencerInbox.sol b/src/bridge/ISequencerInbox.sol index 47db30f0..291ee87f 100644 --- a/src/bridge/ISequencerInbox.sol +++ b/src/bridge/ISequencerInbox.sol @@ -9,8 +9,15 @@ pragma experimental ABIEncoderV2; import "../libraries/IGasRefunder.sol"; import "./IDelayedMessageProvider.sol"; import "./IBridge.sol"; +import "./Messages.sol"; +import "./DelayBufferTypes.sol"; interface ISequencerInbox is IDelayedMessageProvider { + /// @notice The maximum amount of time variatin between a message being posted on the L1 and being executed on the L2 + /// @param delayBlocks The max amount of blocks in the past that a message can be received on L2 + /// @param futureBlocks The max amount of blocks in the future that a message can be received on L2 + /// @param delaySeconds The max amount of seconds in the past that a message can be received on L2 + /// @param futureSeconds The max amount of seconds in the future that a message can be received on L2 struct MaxTimeVariation { uint256 delayBlocks; uint256 futureBlocks; @@ -39,6 +46,29 @@ interface ISequencerInbox is IDelayedMessageProvider { /// @dev a keyset was invalidated event InvalidateKeyset(bytes32 indexed keysetHash); + /// @dev Owner set max time variation. + /// This event may have been introduced in an upgrade and therefore might not give the full history. + /// To get the full history, search for `OwnerFunctionCalled(0)` events. + event MaxTimeVariationSet(MaxTimeVariation maxTimeVariation); + + /// @dev Owner set a batch poster. + /// This event may have been introduced in an upgrade and therefore might not give the full history. + /// To get the full history, search for `OwnerFunctionCalled(1)` events. + event BatchPosterSet(address batchPoster, bool isBatchPoster); + + /// @dev Owner or batch poster manager set a sequencer. + /// This event may have been introduced in an upgrade and therefore might not give the full history. + /// To get the full history, search for `OwnerFunctionCalled(4)` events. + event SequencerSet(address addr, bool isSequencer); + + /// @dev Owner set the batch poster manager. + /// This event may have been introduced in an upgrade and therefore might not give the full history. + /// To get the full history, search for `OwnerFunctionCalled(5)` events. + event BatchPosterManagerSet(address newBatchPosterManager); + + /// @dev Owner set the buffer config. + event BufferConfigSet(BufferConfig bufferConfig); + function totalDelayedMessagesRead() external view returns (uint256); function bridge() external view returns (IBridge); @@ -85,9 +115,16 @@ interface ISequencerInbox is IDelayedMessageProvider { function rollup() external view returns (IOwnable); - function isBatchPoster(address) external view returns (bool); + function isBatchPoster( + address + ) external view returns (bool); + + function isSequencer( + address + ) external view returns (bool); - function isSequencer(address) external view returns (bool); + /// @notice True is the sequencer inbox is delay bufferable + function isDelayBufferable() external view returns (bool); function maxDataSize() external view returns (uint256); @@ -111,14 +148,16 @@ interface ISequencerInbox is IDelayedMessageProvider { uint256 futureSeconds ); - function dasKeySetInfo(bytes32) external view returns (bool, uint64); + function dasKeySetInfo( + bytes32 + ) external view returns (bool, uint64); /// @notice Remove force inclusion delay after a L1 chainId fork function removeDelayAfterFork() external; /// @notice Force messages from the delayed inbox to be included in the chain - /// Callable by any address, but message can only be force-included after maxTimeVariation.delayBlocks and - /// maxTimeVariation.delaySeconds has elapsed. As part of normal behaviour the sequencer will include these + /// Callable by any address, but message can only be force-included after maxTimeVariation.delayBlocks + /// has elapsed. As part of normal behaviour the sequencer will include these /// messages so it's only necessary to call this if the sequencer is down, or not including any delayed messages. /// @param _totalDelayedMessagesRead The total number of messages to read up to /// @param kind The kind of the last message to be included @@ -135,17 +174,34 @@ interface ISequencerInbox is IDelayedMessageProvider { bytes32 messageDataHash ) external; - function inboxAccs(uint256 index) external view returns (bytes32); + function inboxAccs( + uint256 index + ) external view returns (bytes32); function batchCount() external view returns (uint256); - function isValidKeysetHash(bytes32 ksHash) external view returns (bool); + function isValidKeysetHash( + bytes32 ksHash + ) external view returns (bool); /// @notice the creation block is intended to still be available after a keyset is deleted - function getKeysetCreationBlock(bytes32 ksHash) external view returns (uint256); + function getKeysetCreationBlock( + bytes32 ksHash + ) external view returns (uint256); + + /// @dev The delay buffer can change due to pending depletion/replenishment. + /// This function applies pending buffer changes to proactively calculate the force inclusion deadline. + /// This is only relevant when the buffer is less than the delayBlocks (unhappy case), otherwise force inclusion deadline is fixed at delayBlocks. + /// @notice Calculates the upper bounds of the delay buffer + /// @param blockNumber The block number when a delayed message was created + /// @return blockNumberDeadline The block number at when the message can be force included + function forceInclusionDeadline( + uint64 blockNumber + ) external view returns (uint64 blockNumberDeadline); // ---------- BatchPoster functions ---------- + /// @dev Deprecated, kept for abi generation and will be removed in the future function addSequencerL2BatchFromOrigin( uint256 sequenceNumber, bytes calldata data, @@ -153,6 +209,7 @@ interface ISequencerInbox is IDelayedMessageProvider { IGasRefunder gasRefunder ) external; + /// @dev Will be deprecated due to EIP-3074, use `addSequencerL2Batch` instead function addSequencerL2BatchFromOrigin( uint256 sequenceNumber, bytes calldata data, @@ -179,13 +236,51 @@ interface ISequencerInbox is IDelayedMessageProvider { uint256 newMessageCount ) external; + /// @dev Proves message delays, updates delay buffers, and posts an L2 batch with blob data. + /// DelayProof proves the delay of the message and syncs the delay buffer. + function addSequencerL2BatchFromBlobsDelayProof( + uint256 sequenceNumber, + uint256 afterDelayedMessagesRead, + IGasRefunder gasRefunder, + uint256 prevMessageCount, + uint256 newMessageCount, + DelayProof calldata delayProof + ) external; + + /// @dev Proves message delays, updates delay buffers, and posts an L2 batch with calldata posted from an EOA. + /// DelayProof proves the delay of the message and syncs the delay buffer. + /// Will be deprecated due to EIP-3074, use `addSequencerL2BatchDelayProof` instead + function addSequencerL2BatchFromOriginDelayProof( + uint256 sequenceNumber, + bytes calldata data, + uint256 afterDelayedMessagesRead, + IGasRefunder gasRefunder, + uint256 prevMessageCount, + uint256 newMessageCount, + DelayProof calldata delayProof + ) external; + + /// @dev Proves message delays, updates delay buffers, and posts an L2 batch with calldata. + /// delayProof is used to prove the delay of the message and syncs the delay buffer. + function addSequencerL2BatchDelayProof( + uint256 sequenceNumber, + bytes calldata data, + uint256 afterDelayedMessagesRead, + IGasRefunder gasRefunder, + uint256 prevMessageCount, + uint256 newMessageCount, + DelayProof calldata delayProof + ) external; + // ---------- onlyRollupOrOwner functions ---------- /** * @notice Set max delay for sequencer inbox * @param maxTimeVariation_ the maximum time variation parameters */ - function setMaxTimeVariation(MaxTimeVariation memory maxTimeVariation_) external; + function setMaxTimeVariation( + MaxTimeVariation memory maxTimeVariation_ + ) external; /** * @notice Updates whether an address is authorized to be a batch poster at the sequencer inbox @@ -198,13 +293,17 @@ interface ISequencerInbox is IDelayedMessageProvider { * @notice Makes Data Availability Service keyset valid * @param keysetBytes bytes of the serialized keyset */ - function setValidKeyset(bytes calldata keysetBytes) external; + function setValidKeyset( + bytes calldata keysetBytes + ) external; /** * @notice Invalidates a Data Availability Service keyset * @param ksHash hash of the keyset */ - function invalidateKeysetHash(bytes32 ksHash) external; + function invalidateKeysetHash( + bytes32 ksHash + ) external; /** * @notice Updates whether an address is authorized to be a sequencer. @@ -218,12 +317,18 @@ interface ISequencerInbox is IDelayedMessageProvider { * @notice Updates the batch poster manager, the address which has the ability to rotate batch poster keys * @param newBatchPosterManager The new batch poster manager to be set */ - function setBatchPosterManager(address newBatchPosterManager) external; + function setBatchPosterManager( + address newBatchPosterManager + ) external; /// @notice Allows the rollup owner to sync the rollup address function updateRollupAddress() external; // ---------- initializer ---------- - function initialize(IBridge bridge_, MaxTimeVariation calldata maxTimeVariation_) external; + function initialize( + IBridge bridge_, + MaxTimeVariation calldata maxTimeVariation_, + BufferConfig calldata bufferConfig_ + ) external; } diff --git a/src/bridge/Inbox.sol b/src/bridge/Inbox.sol index 51b3d247..8559bf21 100644 --- a/src/bridge/Inbox.sol +++ b/src/bridge/Inbox.sol @@ -4,16 +4,7 @@ pragma solidity ^0.8.4; -import { - NotOrigin, - DataTooLarge, - InsufficientValue, - InsufficientSubmissionCost, - RetryableData, - L1Forked, - NotForked, - GasLimitTooLarge -} from "../libraries/Error.sol"; +import {NotOrigin, NotForked, GasLimitTooLarge} from "../libraries/Error.sol"; import "./AbsInbox.sol"; import "./IInbox.sol"; import "./IBridge.sol"; @@ -22,7 +13,6 @@ import "../libraries/AddressAliasHelper.sol"; import { L2_MSG, L1MessageType_L2FundedByL1, - L1MessageType_submitRetryableTx, L1MessageType_ethDeposit, L2MessageType_unsignedEOATx, L2MessageType_unsignedContractTx @@ -37,19 +27,22 @@ import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; * to await inclusion in the SequencerInbox */ contract Inbox is AbsInbox, IInbox { - constructor(uint256 _maxDataSize) AbsInbox(_maxDataSize) {} + constructor( + uint256 _maxDataSize + ) AbsInbox(_maxDataSize) {} /// @inheritdoc IInboxBase - function initialize(IBridge _bridge, ISequencerInbox _sequencerInbox) - external - initializer - onlyDelegated - { + function initialize( + IBridge _bridge, + ISequencerInbox _sequencerInbox + ) external initializer onlyDelegated { __AbsInbox_init(_bridge, _sequencerInbox); } /// @inheritdoc IInbox - function postUpgradeInit(IBridge) external onlyDelegated onlyProxyOwner {} + function postUpgradeInit( + IBridge + ) external onlyDelegated onlyProxyOwner {} /// @inheritdoc IInbox function sendL1FundedUnsignedTransaction( @@ -63,21 +56,20 @@ contract Inbox is AbsInbox, IInbox { if (gasLimit > type(uint64).max) { revert GasLimitTooLarge(); } - return - _deliverMessage( - L1MessageType_L2FundedByL1, - msg.sender, - abi.encodePacked( - L2MessageType_unsignedEOATx, - gasLimit, - maxFeePerGas, - nonce, - uint256(uint160(to)), - msg.value, - data - ), - msg.value - ); + return _deliverMessage( + L1MessageType_L2FundedByL1, + msg.sender, + abi.encodePacked( + L2MessageType_unsignedEOATx, + gasLimit, + maxFeePerGas, + nonce, + uint256(uint160(to)), + msg.value, + data + ), + msg.value + ); } /// @inheritdoc IInbox @@ -91,20 +83,19 @@ contract Inbox is AbsInbox, IInbox { if (gasLimit > type(uint64).max) { revert GasLimitTooLarge(); } - return - _deliverMessage( - L1MessageType_L2FundedByL1, - msg.sender, - abi.encodePacked( - L2MessageType_unsignedContractTx, - gasLimit, - maxFeePerGas, - uint256(uint160(to)), - msg.value, - data - ), - msg.value - ); + return _deliverMessage( + L1MessageType_L2FundedByL1, + msg.sender, + abi.encodePacked( + L2MessageType_unsignedContractTx, + gasLimit, + maxFeePerGas, + uint256(uint160(to)), + msg.value, + data + ), + msg.value + ); } /// @inheritdoc IInbox @@ -122,22 +113,21 @@ contract Inbox is AbsInbox, IInbox { if (gasLimit > type(uint64).max) { revert GasLimitTooLarge(); } - return - _deliverMessage( - L1MessageType_L2FundedByL1, - // undoing sender alias here to cancel out the aliasing - AddressAliasHelper.undoL1ToL2Alias(msg.sender), - abi.encodePacked( - L2MessageType_unsignedEOATx, - gasLimit, - maxFeePerGas, - nonce, - uint256(uint160(to)), - msg.value, - data - ), - msg.value - ); + return _deliverMessage( + L1MessageType_L2FundedByL1, + // undoing sender alias here to cancel out the aliasing + AddressAliasHelper.undoL1ToL2Alias(msg.sender), + abi.encodePacked( + L2MessageType_unsignedEOATx, + gasLimit, + maxFeePerGas, + nonce, + uint256(uint160(to)), + msg.value, + data + ), + msg.value + ); } /// @inheritdoc IInbox @@ -156,22 +146,21 @@ contract Inbox is AbsInbox, IInbox { if (gasLimit > type(uint64).max) { revert GasLimitTooLarge(); } - return - _deliverMessage( - L2_MSG, - // undoing sender alias here to cancel out the aliasing - AddressAliasHelper.undoL1ToL2Alias(msg.sender), - abi.encodePacked( - L2MessageType_unsignedEOATx, - gasLimit, - maxFeePerGas, - nonce, - uint256(uint160(to)), - value, - data - ), - 0 - ); + return _deliverMessage( + L2_MSG, + // undoing sender alias here to cancel out the aliasing + AddressAliasHelper.undoL1ToL2Alias(msg.sender), + abi.encodePacked( + L2MessageType_unsignedEOATx, + gasLimit, + maxFeePerGas, + nonce, + uint256(uint160(to)), + value, + data + ), + 0 + ); } /// @inheritdoc IInbox @@ -189,22 +178,21 @@ contract Inbox is AbsInbox, IInbox { if (gasLimit > type(uint64).max) { revert GasLimitTooLarge(); } - return - _deliverMessage( - L2_MSG, - // undoing sender alias here to cancel out the aliasing - AddressAliasHelper.undoL1ToL2Alias(msg.sender), - abi.encodePacked( - L2MessageType_unsignedEOATx, - gasLimit, - maxFeePerGas, - nonce, - uint256(uint160(address(100))), // ArbSys address - value, - abi.encodeWithSelector(ArbSys.withdrawEth.selector, withdrawTo) - ), - 0 - ); + return _deliverMessage( + L2_MSG, + // undoing sender alias here to cancel out the aliasing + AddressAliasHelper.undoL1ToL2Alias(msg.sender), + abi.encodePacked( + L2MessageType_unsignedEOATx, + gasLimit, + maxFeePerGas, + nonce, + uint256(uint160(address(100))), // ArbSys address + value, + abi.encodeWithSelector(ArbSys.withdrawEth.selector, withdrawTo) + ), + 0 + ); } /// @inheritdoc IInbox @@ -217,17 +205,15 @@ contract Inbox is AbsInbox, IInbox { dest = AddressAliasHelper.applyL1ToL2Alias(msg.sender); } - return - _deliverMessage( - L1MessageType_ethDeposit, - msg.sender, - abi.encodePacked(dest, msg.value), - msg.value - ); + return _deliverMessage( + L1MessageType_ethDeposit, msg.sender, abi.encodePacked(dest, msg.value), msg.value + ); } /// @notice deprecated in favour of depositEth with no parameters - function depositEth(uint256) external payable whenNotPaused onlyAllowed returns (uint256) { + function depositEth( + uint256 + ) external payable whenNotPaused onlyAllowed returns (uint256) { return depositEth(); } @@ -256,17 +242,16 @@ contract Inbox is AbsInbox, IInbox { bytes calldata data ) external payable whenNotPaused onlyAllowed returns (uint256) { // gas limit is validated to be within uint64 in unsafeCreateRetryableTicket - return - unsafeCreateRetryableTicket( - to, - l2CallValue, - maxSubmissionCost, - excessFeeRefundAddress, - callValueRefundAddress, - gasLimit, - maxFeePerGas, - data - ); + return unsafeCreateRetryableTicket( + to, + l2CallValue, + maxSubmissionCost, + excessFeeRefundAddress, + callValueRefundAddress, + gasLimit, + maxFeePerGas, + data + ); } /// @inheritdoc IInbox @@ -280,18 +265,17 @@ contract Inbox is AbsInbox, IInbox { uint256 maxFeePerGas, bytes calldata data ) external payable whenNotPaused onlyAllowed returns (uint256) { - return - _createRetryableTicket( - to, - l2CallValue, - maxSubmissionCost, - excessFeeRefundAddress, - callValueRefundAddress, - gasLimit, - maxFeePerGas, - msg.value, - data - ); + return _createRetryableTicket( + to, + l2CallValue, + maxSubmissionCost, + excessFeeRefundAddress, + callValueRefundAddress, + gasLimit, + maxFeePerGas, + msg.value, + data + ); } /// @inheritdoc IInbox @@ -305,27 +289,24 @@ contract Inbox is AbsInbox, IInbox { uint256 maxFeePerGas, bytes calldata data ) public payable whenNotPaused onlyAllowed returns (uint256) { - return - _unsafeCreateRetryableTicket( - to, - l2CallValue, - maxSubmissionCost, - excessFeeRefundAddress, - callValueRefundAddress, - gasLimit, - maxFeePerGas, - msg.value, - data - ); + return _unsafeCreateRetryableTicket( + to, + l2CallValue, + maxSubmissionCost, + excessFeeRefundAddress, + callValueRefundAddress, + gasLimit, + maxFeePerGas, + msg.value, + data + ); } /// @inheritdoc IInboxBase - function calculateRetryableSubmissionFee(uint256 dataLength, uint256 baseFee) - public - view - override(AbsInbox, IInboxBase) - returns (uint256) - { + function calculateRetryableSubmissionFee( + uint256 dataLength, + uint256 baseFee + ) public view override(AbsInbox, IInboxBase) returns (uint256) { // Use current block basefee if baseFee parameter is 0 return (1400 + 6 * dataLength) * (baseFee == 0 ? block.basefee : baseFee); } @@ -336,16 +317,15 @@ contract Inbox is AbsInbox, IInbox { bytes32 messageDataHash, uint256 amount ) internal override returns (uint256) { - return - IEthBridge(address(bridge)).enqueueDelayedMessage{value: amount}( - kind, - AddressAliasHelper.applyL1ToL2Alias(sender), - messageDataHash - ); + return IEthBridge(address(bridge)).enqueueDelayedMessage{value: amount}( + kind, AddressAliasHelper.applyL1ToL2Alias(sender), messageDataHash + ); } /// @inheritdoc AbsInbox - function _fromNativeTo18Decimals(uint256 value) internal pure override returns (uint256) { + function _fromNativeTo18Decimals( + uint256 value + ) internal pure override returns (uint256) { return value; } } diff --git a/src/bridge/Messages.sol b/src/bridge/Messages.sol index 07731c51..0067c353 100644 --- a/src/bridge/Messages.sol +++ b/src/bridge/Messages.sol @@ -2,9 +2,35 @@ // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 -pragma solidity ^0.8.0; +// solhint-disable-next-line compiler-version +pragma solidity >=0.6.9 <0.9.0; +pragma experimental ABIEncoderV2; library Messages { + struct Message { + uint8 kind; + address sender; + uint64 blockNumber; + uint64 timestamp; + uint256 inboxSeqNum; + uint256 baseFeeL1; + bytes32 messageDataHash; + } + + function messageHash( + Message memory message + ) internal pure returns (bytes32) { + return messageHash( + message.kind, + message.sender, + message.blockNumber, + message.timestamp, + message.inboxSeqNum, + message.baseFeeL1, + message.messageDataHash + ); + } + function messageHash( uint8 kind, address sender, @@ -14,25 +40,29 @@ library Messages { uint256 baseFeeL1, bytes32 messageDataHash ) internal pure returns (bytes32) { - return - keccak256( - abi.encodePacked( - kind, - sender, - blockNumber, - timestamp, - inboxSeqNum, - baseFeeL1, - messageDataHash - ) - ); + return keccak256( + abi.encodePacked( + kind, sender, blockNumber, timestamp, inboxSeqNum, baseFeeL1, messageDataHash + ) + ); } - function accumulateInboxMessage(bytes32 prevAcc, bytes32 message) - internal - pure - returns (bytes32) - { + function accumulateInboxMessage( + bytes32 prevAcc, + bytes32 message + ) internal pure returns (bytes32) { return keccak256(abi.encodePacked(prevAcc, message)); } + + /// @dev Validates a delayed accumulator preimage + /// @param delayedAcc The delayed accumulator to validate against + /// @param beforeDelayedAcc The previous delayed accumulator + /// @param message The message to validate + function isValidDelayedAccPreimage( + bytes32 delayedAcc, + bytes32 beforeDelayedAcc, + Message memory message + ) internal pure returns (bool) { + return delayedAcc == accumulateInboxMessage(beforeDelayedAcc, messageHash(message)); + } } diff --git a/src/bridge/Outbox.sol b/src/bridge/Outbox.sol index 17d95445..8eade0da 100644 --- a/src/bridge/Outbox.sol +++ b/src/bridge/Outbox.sol @@ -15,12 +15,16 @@ contract Outbox is AbsOutbox { } /// @inheritdoc AbsOutbox - function _getAmountToUnlock(uint256 value) internal pure override returns (uint256) { + function _getAmountToUnlock( + uint256 value + ) internal pure override returns (uint256) { return value; } /// @inheritdoc AbsOutbox - function _amountToSetInContext(uint256) internal pure override returns (uint256) { + function _amountToSetInContext( + uint256 + ) internal pure override returns (uint256) { // In ETH-based chains withdrawal amount can be read from msg.value. For that reason // amount slot in context will never be accessed, we keep it as 0 all the time return 0; diff --git a/src/bridge/SequencerInbox.sol b/src/bridge/SequencerInbox.sol index 16a65e77..808de701 100644 --- a/src/bridge/SequencerInbox.sol +++ b/src/bridge/SequencerInbox.sol @@ -7,13 +7,11 @@ pragma solidity ^0.8.0; import { AlreadyInit, HadZeroInit, - BadPostUpgradeInit, NotOrigin, DataTooLarge, DelayedBackwards, DelayedTooFar, ForceIncludeBlockTooSoon, - ForceIncludeTimeTooSoon, IncorrectMessagePreimage, NotBatchPoster, BadSequencerNumber, @@ -29,7 +27,13 @@ import { InvalidHeaderFlag, NativeTokenMismatch, BadMaxTimeVariation, - Deprecated + Deprecated, + NotDelayBufferable, + InvalidDelayedAccPreimage, + DelayProofRequired, + BadBufferConfig, + ExtraGasNotUint64, + KeysetTooLarge } from "../libraries/Error.sol"; import "./IBridge.sol"; import "./IInboxBase.sol"; @@ -40,12 +44,12 @@ import "../precompiles/ArbGasInfo.sol"; import "../precompiles/ArbSys.sol"; import "../libraries/IReader4844.sol"; -import {L1MessageType_batchPostingReport} from "../libraries/MessageTypes.sol"; import "../libraries/DelegateCallAware.sol"; import {IGasRefunder} from "../libraries/IGasRefunder.sol"; import {GasRefundEnabled} from "../libraries/GasRefundEnabled.sol"; import "../libraries/ArbitrumChecker.sol"; import {IERC20Bridge} from "./IERC20Bridge.sol"; +import "./DelayBuffer.sol"; /** * @title Accepts batches from the sequencer and adds them to the rollup inbox. @@ -124,11 +128,18 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox bool internal immutable hostChainIsArbitrum = ArbitrumChecker.runningOnArbitrum(); // True if the chain this SequencerInbox is deployed on uses custom fee token bool public immutable isUsingFeeToken; + // True if the SequencerInbox is delay bufferable + bool public immutable isDelayBufferable; + + using DelayBuffer for BufferData; + + BufferData public buffer; constructor( uint256 _maxDataSize, IReader4844 reader4844_, - bool _isUsingFeeToken + bool _isUsingFeeToken, + bool _isDelayBufferable ) { maxDataSize = _maxDataSize; if (hostChainIsArbitrum) { @@ -138,47 +149,31 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox } reader4844 = reader4844_; isUsingFeeToken = _isUsingFeeToken; + isDelayBufferable = _isDelayBufferable; } function _chainIdChanged() internal view returns (bool) { return deployTimeChainId != block.chainid; } - function postUpgradeInit() external onlyDelegated onlyProxyOwner { - // Assuming we would not upgrade from a version that have MaxTimeVariation all set to zero + function postUpgradeInit( + BufferConfig memory bufferConfig_ + ) external onlyDelegated onlyProxyOwner { + if (!isDelayBufferable) revert NotDelayBufferable(); + + // Assuming we would not upgrade from a version that does not have the buffer initialized // If that is the case, postUpgradeInit do not need to be called - if ( - __LEGACY_MAX_TIME_VARIATION.delayBlocks == 0 && - __LEGACY_MAX_TIME_VARIATION.futureBlocks == 0 && - __LEGACY_MAX_TIME_VARIATION.delaySeconds == 0 && - __LEGACY_MAX_TIME_VARIATION.futureSeconds == 0 - ) { + if (buffer.bufferBlocks != 0) { revert AlreadyInit(); } - if ( - __LEGACY_MAX_TIME_VARIATION.delayBlocks > type(uint64).max || - __LEGACY_MAX_TIME_VARIATION.futureBlocks > type(uint64).max || - __LEGACY_MAX_TIME_VARIATION.delaySeconds > type(uint64).max || - __LEGACY_MAX_TIME_VARIATION.futureSeconds > type(uint64).max - ) { - revert BadPostUpgradeInit(); - } - - delayBlocks = uint64(__LEGACY_MAX_TIME_VARIATION.delayBlocks); - futureBlocks = uint64(__LEGACY_MAX_TIME_VARIATION.futureBlocks); - delaySeconds = uint64(__LEGACY_MAX_TIME_VARIATION.delaySeconds); - futureSeconds = uint64(__LEGACY_MAX_TIME_VARIATION.futureSeconds); - - __LEGACY_MAX_TIME_VARIATION.delayBlocks = 0; - __LEGACY_MAX_TIME_VARIATION.futureBlocks = 0; - __LEGACY_MAX_TIME_VARIATION.delaySeconds = 0; - __LEGACY_MAX_TIME_VARIATION.futureSeconds = 0; + _setBufferConfig(bufferConfig_); } function initialize( IBridge bridge_, - ISequencerInbox.MaxTimeVariation calldata maxTimeVariation_ + ISequencerInbox.MaxTimeVariation calldata maxTimeVariation_, + BufferConfig memory bufferConfig_ ) external onlyDelegated { if (bridge != IBridge(address(0))) revert AlreadyInit(); if (bridge_ == IBridge(address(0))) revert HadZeroInit(); @@ -199,12 +194,17 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox rollup = bridge_.rollup(); _setMaxTimeVariation(maxTimeVariation_); + + if (isDelayBufferable) { + _setBufferConfig(bufferConfig_); + } } /// @notice Allows the rollup owner to sync the rollup address function updateRollupAddress() external { - if (msg.sender != IOwnable(rollup).owner()) + if (msg.sender != IOwnable(rollup).owner()) { revert NotOwner(msg.sender, IOwnable(rollup).owner()); + } IOwnable newRollup = bridge.rollup(); if (rollup == newRollup) revert RollupNotChanged(); rollup = newRollup; @@ -212,12 +212,8 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox function getTimeBounds() internal view virtual returns (IBridge.TimeBounds memory) { IBridge.TimeBounds memory bounds; - ( - uint64 delayBlocks_, - uint64 futureBlocks_, - uint64 delaySeconds_, - uint64 futureSeconds_ - ) = maxTimeVariationInternal(); + (uint64 delayBlocks_, uint64 futureBlocks_, uint64 delaySeconds_, uint64 futureSeconds_) = + maxTimeVariationInternal(); if (block.timestamp > delaySeconds_) { bounds.minTimestamp = uint64(block.timestamp) - delaySeconds_; } @@ -238,22 +234,9 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox futureSeconds = 1; } - function maxTimeVariation() - external - view - returns ( - uint256, - uint256, - uint256, - uint256 - ) - { - ( - uint64 delayBlocks_, - uint64 futureBlocks_, - uint64 delaySeconds_, - uint64 futureSeconds_ - ) = maxTimeVariationInternal(); + function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256) { + (uint64 delayBlocks_, uint64 futureBlocks_, uint64 delaySeconds_, uint64 futureSeconds_) = + maxTimeVariationInternal(); return ( uint256(delayBlocks_), @@ -263,16 +246,7 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox ); } - function maxTimeVariationInternal() - internal - view - returns ( - uint64, - uint64, - uint64, - uint64 - ) - { + function maxTimeVariationInternal() internal view returns (uint64, uint64, uint64, uint64) { if (_chainIdChanged()) { return (1, 1, 1, 1); } else { @@ -299,9 +273,16 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox baseFeeL1, messageDataHash ); + + uint256 delayBlocks_ = delayBlocks; + + if (isDelayBufferable) { + // proactively apply any pending delay buffer updates before the force included message l1BlockAndTime + buffer.update(l1BlockAndTime[0]); + delayBlocks_ = delayBufferableBlocks(buffer.bufferBlocks); + } // Can only force-include after the Sequencer-only window has expired. - if (l1BlockAndTime[0] + delayBlocks >= block.number) revert ForceIncludeBlockTooSoon(); - if (l1BlockAndTime[1] + delaySeconds >= block.timestamp) revert ForceIncludeTimeTooSoon(); + if (l1BlockAndTime[0] + delayBlocks_ >= block.number) revert ForceIncludeBlockTooSoon(); // Verify that message hash represents the last message sequence of delayed message to be included bytes32 prevDelayedAcc = 0; @@ -309,28 +290,19 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox prevDelayedAcc = bridge.delayedInboxAccs(_totalDelayedMessagesRead - 2); } if ( - bridge.delayedInboxAccs(_totalDelayedMessagesRead - 1) != - Messages.accumulateInboxMessage(prevDelayedAcc, messageHash) + bridge.delayedInboxAccs(_totalDelayedMessagesRead - 1) + != Messages.accumulateInboxMessage(prevDelayedAcc, messageHash) ) revert IncorrectMessagePreimage(); - (bytes32 dataHash, IBridge.TimeBounds memory timeBounds) = formEmptyDataHash( - _totalDelayedMessagesRead - ); + (bytes32 dataHash, IBridge.TimeBounds memory timeBounds) = + formEmptyDataHash(_totalDelayedMessagesRead); uint256 __totalDelayedMessagesRead = _totalDelayedMessagesRead; uint256 prevSeqMsgCount = bridge.sequencerReportedSubMessageCount(); uint256 newSeqMsgCount = prevSeqMsgCount; // force inclusion should not modify sequencer message count - ( - uint256 seqMessageIndex, - bytes32 beforeAcc, - bytes32 delayedAcc, - bytes32 afterAcc - ) = addSequencerL2BatchImpl( - dataHash, - __totalDelayedMessagesRead, - 0, - prevSeqMsgCount, - newSeqMsgCount - ); + (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 afterAcc) = + addSequencerL2BatchImpl( + dataHash, __totalDelayedMessagesRead, 0, prevSeqMsgCount, newSeqMsgCount + ); emit SequencerBatchDelivered( seqMessageIndex, beforeAcc, @@ -342,7 +314,7 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox ); } - /// @dev Deprecated, kept for abi generation and will be removed in the future + /// @inheritdoc ISequencerInbox function addSequencerL2BatchFromOrigin( uint256, bytes calldata, @@ -352,6 +324,7 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox revert Deprecated(); } + /// @inheritdoc ISequencerInbox function addSequencerL2BatchFromOrigin( uint256 sequenceNumber, bytes calldata data, @@ -363,47 +336,14 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox // solhint-disable-next-line avoid-tx-origin if (msg.sender != tx.origin) revert NotOrigin(); if (!isBatchPoster[msg.sender]) revert NotBatchPoster(); - (bytes32 dataHash, IBridge.TimeBounds memory timeBounds) = formCallDataHash( - data, - afterDelayedMessagesRead - ); - // Reformat the stack to prevent "Stack too deep" - uint256 sequenceNumber_ = sequenceNumber; - IBridge.TimeBounds memory timeBounds_ = timeBounds; - bytes32 dataHash_ = dataHash; - uint256 dataLength = data.length; - uint256 afterDelayedMessagesRead_ = afterDelayedMessagesRead; - uint256 prevMessageCount_ = prevMessageCount; - uint256 newMessageCount_ = newMessageCount; - ( - uint256 seqMessageIndex, - bytes32 beforeAcc, - bytes32 delayedAcc, - bytes32 afterAcc - ) = addSequencerL2BatchImpl( - dataHash_, - afterDelayedMessagesRead_, - dataLength, - prevMessageCount_, - newMessageCount_ - ); - - // ~uint256(0) is type(uint256).max, but ever so slightly cheaper - if (seqMessageIndex != sequenceNumber_ && sequenceNumber_ != ~uint256(0)) { - revert BadSequencerNumber(seqMessageIndex, sequenceNumber_); - } + if (isDelayProofRequired(afterDelayedMessagesRead)) revert DelayProofRequired(); - emit SequencerBatchDelivered( - seqMessageIndex, - beforeAcc, - afterAcc, - delayedAcc, - totalDelayedMessagesRead, - timeBounds_, - IBridge.BatchDataLocation.TxInput + addSequencerL2BatchFromCalldataImpl( + sequenceNumber, data, afterDelayedMessagesRead, prevMessageCount, newMessageCount, true ); } + /// @inheritdoc ISequencerInbox function addSequencerL2BatchFromBlobs( uint256 sequenceNumber, uint256 afterDelayedMessagesRead, @@ -412,37 +352,76 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox uint256 newMessageCount ) external refundsGas(gasRefunder, reader4844) { if (!isBatchPoster[msg.sender]) revert NotBatchPoster(); - ( - bytes32 dataHash, - IBridge.TimeBounds memory timeBounds, - uint256 blobGas - ) = formBlobDataHash(afterDelayedMessagesRead); + if (isDelayProofRequired(afterDelayedMessagesRead)) revert DelayProofRequired(); + + addSequencerL2BatchFromBlobsImpl( + sequenceNumber, afterDelayedMessagesRead, prevMessageCount, newMessageCount + ); + } + + /// @inheritdoc ISequencerInbox + function addSequencerL2BatchFromBlobsDelayProof( + uint256 sequenceNumber, + uint256 afterDelayedMessagesRead, + IGasRefunder gasRefunder, + uint256 prevMessageCount, + uint256 newMessageCount, + DelayProof calldata delayProof + ) external refundsGas(gasRefunder, reader4844) { + if (!isBatchPoster[msg.sender]) revert NotBatchPoster(); + if (!isDelayBufferable) revert NotDelayBufferable(); + + delayProofImpl(afterDelayedMessagesRead, delayProof); + addSequencerL2BatchFromBlobsImpl( + sequenceNumber, afterDelayedMessagesRead, prevMessageCount, newMessageCount + ); + } + + /// @inheritdoc ISequencerInbox + function addSequencerL2BatchFromOriginDelayProof( + uint256 sequenceNumber, + bytes calldata data, + uint256 afterDelayedMessagesRead, + IGasRefunder gasRefunder, + uint256 prevMessageCount, + uint256 newMessageCount, + DelayProof calldata delayProof + ) external refundsGas(gasRefunder, IReader4844(address(0))) { + // solhint-disable-next-line avoid-tx-origin + if (msg.sender != tx.origin) revert NotOrigin(); + if (!isBatchPoster[msg.sender]) revert NotBatchPoster(); + if (!isDelayBufferable) revert NotDelayBufferable(); + + delayProofImpl(afterDelayedMessagesRead, delayProof); + addSequencerL2BatchFromCalldataImpl( + sequenceNumber, data, afterDelayedMessagesRead, prevMessageCount, newMessageCount, true + ); + } + + function addSequencerL2BatchFromBlobsImpl( + uint256 sequenceNumber, + uint256 afterDelayedMessagesRead, + uint256 prevMessageCount, + uint256 newMessageCount + ) internal { + (bytes32 dataHash, IBridge.TimeBounds memory timeBounds, uint256 blobGas) = + formBlobDataHash(afterDelayedMessagesRead); // we use addSequencerL2BatchImpl for submitting the message // normally this would also submit a batch spending report but that is skipped if we pass // an empty call data size, then we submit a separate batch spending report later - ( - uint256 seqMessageIndex, - bytes32 beforeAcc, - bytes32 delayedAcc, - bytes32 afterAcc - ) = addSequencerL2BatchImpl( - dataHash, - afterDelayedMessagesRead, - 0, - prevMessageCount, - newMessageCount - ); - - uint256 _sequenceNumber = sequenceNumber; // stack workaround + (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 afterAcc) = + addSequencerL2BatchImpl( + dataHash, afterDelayedMessagesRead, 0, prevMessageCount, newMessageCount + ); // ~uint256(0) is type(uint256).max, but ever so slightly cheaper - if (seqMessageIndex != _sequenceNumber && _sequenceNumber != ~uint256(0)) { - revert BadSequencerNumber(seqMessageIndex, _sequenceNumber); + if (seqMessageIndex != sequenceNumber && sequenceNumber != ~uint256(0)) { + revert BadSequencerNumber(seqMessageIndex, sequenceNumber); } emit SequencerBatchDelivered( - _sequenceNumber, + sequenceNumber, beforeAcc, afterAcc, delayedAcc, @@ -465,6 +444,48 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox } } + function addSequencerL2BatchFromCalldataImpl( + uint256 sequenceNumber, + bytes calldata data, + uint256 afterDelayedMessagesRead, + uint256 prevMessageCount, + uint256 newMessageCount, + bool isFromOrigin + ) internal { + (bytes32 dataHash, IBridge.TimeBounds memory timeBounds) = + formCallDataHash(data, afterDelayedMessagesRead); + (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 afterAcc) = + addSequencerL2BatchImpl( + dataHash, + afterDelayedMessagesRead, + isFromOrigin ? data.length : 0, + prevMessageCount, + newMessageCount + ); + + // ~uint256(0) is type(uint256).max, but ever so slightly cheaper + if (seqMessageIndex != sequenceNumber && sequenceNumber != ~uint256(0)) { + revert BadSequencerNumber(seqMessageIndex, sequenceNumber); + } + + emit SequencerBatchDelivered( + seqMessageIndex, + beforeAcc, + afterAcc, + delayedAcc, + totalDelayedMessagesRead, + timeBounds, + isFromOrigin + ? IBridge.BatchDataLocation.TxInput + : IBridge.BatchDataLocation.SeparateBatchEvent + ); + + if (!isFromOrigin) { + emit SequencerBatchData(seqMessageIndex, data); + } + } + + /// @inheritdoc ISequencerInbox function addSequencerL2Batch( uint256 sequenceNumber, bytes calldata data, @@ -474,55 +495,66 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox uint256 newMessageCount ) external override refundsGas(gasRefunder, IReader4844(address(0))) { if (!isBatchPoster[msg.sender] && msg.sender != address(rollup)) revert NotBatchPoster(); - (bytes32 dataHash, IBridge.TimeBounds memory timeBounds) = formCallDataHash( - data, - afterDelayedMessagesRead + if (isDelayProofRequired(afterDelayedMessagesRead)) revert DelayProofRequired(); + + addSequencerL2BatchFromCalldataImpl( + sequenceNumber, data, afterDelayedMessagesRead, prevMessageCount, newMessageCount, false ); - uint256 seqMessageIndex; - { - // Reformat the stack to prevent "Stack too deep" - uint256 sequenceNumber_ = sequenceNumber; - IBridge.TimeBounds memory timeBounds_ = timeBounds; - bytes32 dataHash_ = dataHash; - uint256 afterDelayedMessagesRead_ = afterDelayedMessagesRead; - uint256 prevMessageCount_ = prevMessageCount; - uint256 newMessageCount_ = newMessageCount; - // we set the calldata length posted to 0 here since the caller isn't the origin - // of the tx, so they might have not paid tx input cost for the calldata - bytes32 beforeAcc; - bytes32 delayedAcc; - bytes32 afterAcc; - (seqMessageIndex, beforeAcc, delayedAcc, afterAcc) = addSequencerL2BatchImpl( - dataHash_, - afterDelayedMessagesRead_, - 0, - prevMessageCount_, - newMessageCount_ - ); - - // ~uint256(0) is type(uint256).max, but ever so slightly cheaper - if (seqMessageIndex != sequenceNumber_ && sequenceNumber_ != ~uint256(0)) { - revert BadSequencerNumber(seqMessageIndex, sequenceNumber_); - } + } - emit SequencerBatchDelivered( - seqMessageIndex, - beforeAcc, - afterAcc, - delayedAcc, - totalDelayedMessagesRead, - timeBounds_, - IBridge.BatchDataLocation.SeparateBatchEvent - ); + /// @inheritdoc ISequencerInbox + function addSequencerL2BatchDelayProof( + uint256 sequenceNumber, + bytes calldata data, + uint256 afterDelayedMessagesRead, + IGasRefunder gasRefunder, + uint256 prevMessageCount, + uint256 newMessageCount, + DelayProof calldata delayProof + ) external refundsGas(gasRefunder, IReader4844(address(0))) { + if (!isBatchPoster[msg.sender] && msg.sender != address(rollup)) revert NotBatchPoster(); + if (!isDelayBufferable) revert NotDelayBufferable(); + + delayProofImpl(afterDelayedMessagesRead, delayProof); + addSequencerL2BatchFromCalldataImpl( + sequenceNumber, data, afterDelayedMessagesRead, prevMessageCount, newMessageCount, false + ); + } + + function delayProofImpl( + uint256 afterDelayedMessagesRead, + DelayProof memory delayProof + ) internal { + // buffer update depends on new delayed messages. if none are read, no buffer update is proccessed + if (afterDelayedMessagesRead > totalDelayedMessagesRead) { + if (buffer.isUpdatable()) { + // delayedAcc of the 1st new delayed message + bytes32 delayedAcc = bridge.delayedInboxAccs(totalDelayedMessagesRead); + // validate delayProof against the delayed accumulator + if ( + !Messages.isValidDelayedAccPreimage( + delayedAcc, delayProof.beforeDelayedAcc, delayProof.delayedMessage + ) + ) { + revert InvalidDelayedAccPreimage(); + } + buffer.update(delayProof.delayedMessage.blockNumber); + } } - emit SequencerBatchData(seqMessageIndex, data); } - function packHeader(uint256 afterDelayedMessagesRead) - internal - view - returns (bytes memory, IBridge.TimeBounds memory) - { + function isDelayProofRequired( + uint256 afterDelayedMessagesRead + ) internal view returns (bool) { + // if no new delayed messages are read, no buffer updates can be applied, so no proof required + // if the buffer is synced, the buffer cannot be depleted, so no proof is required + return isDelayBufferable && afterDelayedMessagesRead > totalDelayedMessagesRead + && !buffer.isSynced(); + } + + function packHeader( + uint256 afterDelayedMessagesRead + ) internal view returns (bytes memory, IBridge.TimeBounds memory) { IBridge.TimeBounds memory timeBounds = getTimeBounds(); bytes memory header = abi.encodePacked( timeBounds.minTimestamp, @@ -540,14 +572,11 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox /// @param afterDelayedMessagesRead The delayed messages count read up to /// @return The data hash /// @return The timebounds within which the message should be processed - function formEmptyDataHash(uint256 afterDelayedMessagesRead) - internal - view - returns (bytes32, IBridge.TimeBounds memory) - { - (bytes memory header, IBridge.TimeBounds memory timeBounds) = packHeader( - afterDelayedMessagesRead - ); + function formEmptyDataHash( + uint256 afterDelayedMessagesRead + ) internal view returns (bytes32, IBridge.TimeBounds memory) { + (bytes memory header, IBridge.TimeBounds memory timeBounds) = + packHeader(afterDelayedMessagesRead); return (keccak256(header), timeBounds); } @@ -556,12 +585,12 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox /// therefore we restrict which flags can be provided as a header in this field /// This also safe guards unused flags for future use, as we know they would have been disallowed up until this point /// @param headerByte The first byte in the calldata - function isValidCallDataFlag(bytes1 headerByte) internal pure returns (bool) { - return - headerByte == BROTLI_MESSAGE_HEADER_FLAG || - headerByte == DAS_MESSAGE_HEADER_FLAG || - (headerByte == (DAS_MESSAGE_HEADER_FLAG | TREE_DAS_MESSAGE_HEADER_FLAG)) || - headerByte == ZERO_HEAVY_MESSAGE_HEADER_FLAG; + function isValidCallDataFlag( + bytes1 headerByte + ) internal pure returns (bool) { + return headerByte == BROTLI_MESSAGE_HEADER_FLAG || headerByte == DAS_MESSAGE_HEADER_FLAG + || (headerByte == (DAS_MESSAGE_HEADER_FLAG | TREE_DAS_MESSAGE_HEADER_FLAG)) + || headerByte == ZERO_HEAVY_MESSAGE_HEADER_FLAG; } /// @dev Form a hash of the data taken from the calldata @@ -569,17 +598,15 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox /// @param afterDelayedMessagesRead The delayed messages count read up to /// @return The data hash /// @return The timebounds within which the message should be processed - function formCallDataHash(bytes calldata data, uint256 afterDelayedMessagesRead) - internal - view - returns (bytes32, IBridge.TimeBounds memory) - { + function formCallDataHash( + bytes calldata data, + uint256 afterDelayedMessagesRead + ) internal view returns (bytes32, IBridge.TimeBounds memory) { uint256 fullDataLen = HEADER_LENGTH + data.length; if (fullDataLen > maxDataSize) revert DataTooLarge(fullDataLen, maxDataSize); - (bytes memory header, IBridge.TimeBounds memory timeBounds) = packHeader( - afterDelayedMessagesRead - ); + (bytes memory header, IBridge.TimeBounds memory timeBounds) = + packHeader(afterDelayedMessagesRead); // the batch poster is allowed to submit an empty batch, they can use this to progress the // delayed inbox without providing extra batch data @@ -606,21 +633,14 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox /// @return The data hash /// @return The timebounds within which the message should be processed /// @return The normalized amount of gas used for blob posting - function formBlobDataHash(uint256 afterDelayedMessagesRead) - internal - view - returns ( - bytes32, - IBridge.TimeBounds memory, - uint256 - ) - { + function formBlobDataHash( + uint256 afterDelayedMessagesRead + ) internal view virtual returns (bytes32, IBridge.TimeBounds memory, uint256) { bytes32[] memory dataHashes = reader4844.getDataHashes(); if (dataHashes.length == 0) revert MissingDataHashes(); - (bytes memory header, IBridge.TimeBounds memory timeBounds) = packHeader( - afterDelayedMessagesRead - ); + (bytes memory header, IBridge.TimeBounds memory timeBounds) = + packHeader(afterDelayedMessagesRead); uint256 blobCost = reader4844.getBlobBaseFee() * GAS_PER_BLOB * dataHashes.length; return ( @@ -653,20 +673,12 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox uint256 l1Fees = ArbGasInfo(address(0x6c)).getCurrentTxL1GasFees(); extraGas += l1Fees / block.basefee; } - require(extraGas <= type(uint64).max, "EXTRA_GAS_NOT_UINT64"); + if (extraGas > type(uint64).max) revert ExtraGasNotUint64(); bytes memory spendingReportMsg = abi.encodePacked( - block.timestamp, - batchPoster, - dataHash, - seqMessageIndex, - gasPrice, - uint64(extraGas) + block.timestamp, batchPoster, dataHash, seqMessageIndex, gasPrice, uint64(extraGas) ); - uint256 msgNum = bridge.submitBatchSpendingReport( - batchPoster, - keccak256(spendingReportMsg) - ); + uint256 msgNum = bridge.submitBatchSpendingReport(batchPoster, keccak256(spendingReportMsg)); // this is the same event used by Inbox.sol after including a message to the delayed message accumulator emit InboxMessageDelivered(msgNum, spendingReportMsg); } @@ -679,21 +691,13 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox uint256 newMessageCount ) internal - returns ( - uint256 seqMessageIndex, - bytes32 beforeAcc, - bytes32 delayedAcc, - bytes32 acc - ) + returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc) { if (afterDelayedMessagesRead < totalDelayedMessagesRead) revert DelayedBackwards(); if (afterDelayedMessagesRead > bridge.delayedMessageCount()) revert DelayedTooFar(); (seqMessageIndex, beforeAcc, delayedAcc, acc) = bridge.enqueueSequencerMessage( - dataHash, - afterDelayedMessagesRead, - prevMessageCount, - newMessageCount + dataHash, afterDelayedMessagesRead, prevMessageCount, newMessageCount ); totalDelayedMessagesRead = afterDelayedMessagesRead; @@ -704,7 +708,9 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox } } - function inboxAccs(uint256 index) external view returns (bytes32) { + function inboxAccs( + uint256 index + ) external view returns (bytes32) { return bridge.sequencerInboxAccs(index); } @@ -712,14 +718,55 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox return bridge.sequencerMessageCount(); } - function _setMaxTimeVariation(ISequencerInbox.MaxTimeVariation memory maxTimeVariation_) - internal - { + /// @inheritdoc ISequencerInbox + function forceInclusionDeadline( + uint64 blockNumber + ) external view returns (uint64) { + uint64 _delayBlocks = delayBlocks; + if (isDelayBufferable) { + uint64 _buffer = buffer.calcPendingBuffer(blockNumber); + _delayBlocks = delayBufferableBlocks(_buffer); + } + return blockNumber + _delayBlocks; + } + + /// @notice Calculates the buffer dependent delay blocks + function delayBufferableBlocks( + uint64 _buffer + ) internal view returns (uint64) { + return _buffer < delayBlocks ? _buffer : delayBlocks; + } + + function _setBufferConfig( + BufferConfig memory bufferConfig_ + ) internal { + if (!isDelayBufferable) revert NotDelayBufferable(); + if (!DelayBuffer.isValidBufferConfig(bufferConfig_)) revert BadBufferConfig(); + + if (buffer.bufferBlocks == 0 || buffer.bufferBlocks > bufferConfig_.max) { + buffer.bufferBlocks = bufferConfig_.max; + } + if (buffer.bufferBlocks < bufferConfig_.threshold) { + buffer.bufferBlocks = bufferConfig_.threshold; + } + buffer.max = bufferConfig_.max; + buffer.threshold = bufferConfig_.threshold; + buffer.replenishRateInBasis = bufferConfig_.replenishRateInBasis; + + // if all delayed messages are read, the buffer is considered synced + if (bridge.delayedMessageCount() == totalDelayedMessagesRead) { + buffer.update(uint64(block.number)); + } + } + + function _setMaxTimeVariation( + ISequencerInbox.MaxTimeVariation memory maxTimeVariation_ + ) internal { if ( - maxTimeVariation_.delayBlocks > type(uint64).max || - maxTimeVariation_.futureBlocks > type(uint64).max || - maxTimeVariation_.delaySeconds > type(uint64).max || - maxTimeVariation_.futureSeconds > type(uint64).max + maxTimeVariation_.delayBlocks > type(uint64).max + || maxTimeVariation_.futureBlocks > type(uint64).max + || maxTimeVariation_.delaySeconds > type(uint64).max + || maxTimeVariation_.futureSeconds > type(uint64).max ) { revert BadMaxTimeVariation(); } @@ -730,44 +777,47 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox } /// @inheritdoc ISequencerInbox - function setMaxTimeVariation(ISequencerInbox.MaxTimeVariation memory maxTimeVariation_) - external - onlyRollupOwner - { + function setMaxTimeVariation( + ISequencerInbox.MaxTimeVariation memory maxTimeVariation_ + ) external onlyRollupOwner { _setMaxTimeVariation(maxTimeVariation_); + emit MaxTimeVariationSet(maxTimeVariation_); emit OwnerFunctionCalled(0); } /// @inheritdoc ISequencerInbox - function setIsBatchPoster(address addr, bool isBatchPoster_) - external - onlyRollupOwnerOrBatchPosterManager - { + function setIsBatchPoster( + address addr, + bool isBatchPoster_ + ) external onlyRollupOwnerOrBatchPosterManager { isBatchPoster[addr] = isBatchPoster_; + emit BatchPosterSet(addr, isBatchPoster_); emit OwnerFunctionCalled(1); } /// @inheritdoc ISequencerInbox - function setValidKeyset(bytes calldata keysetBytes) external onlyRollupOwner { + function setValidKeyset( + bytes calldata keysetBytes + ) external onlyRollupOwner { uint256 ksWord = uint256(keccak256(bytes.concat(hex"fe", keccak256(keysetBytes)))); bytes32 ksHash = bytes32(ksWord ^ (1 << 255)); - require(keysetBytes.length < 64 * 1024, "keyset is too large"); + if (keysetBytes.length >= 64 * 1024) revert KeysetTooLarge(); if (dasKeySetInfo[ksHash].isValidKeyset) revert AlreadyValidDASKeyset(ksHash); uint256 creationBlock = block.number; if (hostChainIsArbitrum) { creationBlock = ArbSys(address(100)).arbBlockNumber(); } - dasKeySetInfo[ksHash] = DasKeySetInfo({ - isValidKeyset: true, - creationBlock: uint64(creationBlock) - }); + dasKeySetInfo[ksHash] = + DasKeySetInfo({isValidKeyset: true, creationBlock: uint64(creationBlock)}); emit SetValidKeyset(ksHash, keysetBytes); emit OwnerFunctionCalled(2); } /// @inheritdoc ISequencerInbox - function invalidateKeysetHash(bytes32 ksHash) external onlyRollupOwner { + function invalidateKeysetHash( + bytes32 ksHash + ) external onlyRollupOwner { if (!dasKeySetInfo[ksHash].isValidKeyset) revert NoSuchKeyset(ksHash); // we don't delete the block creation value since its used to fetch the SetValidKeyset // event efficiently. The event provides the hash preimage of the key. @@ -778,26 +828,41 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox } /// @inheritdoc ISequencerInbox - function setIsSequencer(address addr, bool isSequencer_) - external - onlyRollupOwnerOrBatchPosterManager - { + function setIsSequencer( + address addr, + bool isSequencer_ + ) external onlyRollupOwnerOrBatchPosterManager { isSequencer[addr] = isSequencer_; - emit OwnerFunctionCalled(4); // Owner in this context can also be batch poster manager + emit SequencerSet(addr, isSequencer_); + emit OwnerFunctionCalled(4); } /// @inheritdoc ISequencerInbox - function setBatchPosterManager(address newBatchPosterManager) external onlyRollupOwner { + function setBatchPosterManager( + address newBatchPosterManager + ) external onlyRollupOwner { batchPosterManager = newBatchPosterManager; + emit BatchPosterManagerSet(newBatchPosterManager); emit OwnerFunctionCalled(5); } - function isValidKeysetHash(bytes32 ksHash) external view returns (bool) { + function setBufferConfig( + BufferConfig memory bufferConfig_ + ) external onlyRollupOwner { + _setBufferConfig(bufferConfig_); + emit BufferConfigSet(bufferConfig_); + } + + function isValidKeysetHash( + bytes32 ksHash + ) external view returns (bool) { return dasKeySetInfo[ksHash].isValidKeyset; } /// @inheritdoc ISequencerInbox - function getKeysetCreationBlock(bytes32 ksHash) external view returns (uint256) { + function getKeysetCreationBlock( + bytes32 ksHash + ) external view returns (uint256) { DasKeySetInfo memory ksInfo = dasKeySetInfo[ksHash]; if (ksInfo.creationBlock == 0) revert NoSuchKeyset(ksHash); return uint256(ksInfo.creationBlock); diff --git a/src/chain/CacheManager.sol b/src/chain/CacheManager.sol index 76fca637..beffbf3a 100644 --- a/src/chain/CacheManager.sol +++ b/src/chain/CacheManager.sol @@ -49,7 +49,10 @@ contract CacheManager is Initializable, DelegateCallAware { uint192 bid; } - function initialize(uint64 initCacheSize, uint64 initDecay) external initializer onlyDelegated { + function initialize( + uint64 initCacheSize, + uint64 initDecay + ) external initializer onlyDelegated { cacheSize = initCacheSize; decay = initDecay; } @@ -62,13 +65,17 @@ contract CacheManager is Initializable, DelegateCallAware { } /// @notice Sets the intended cache size. Note that the queue may temporarily be larger. - function setCacheSize(uint64 newSize) external onlyOwner { + function setCacheSize( + uint64 newSize + ) external onlyOwner { cacheSize = newSize; emit SetCacheSize(newSize); } /// @notice Sets the intended decay factor. Does not modify existing bids. - function setDecayRate(uint64 newDecay) external onlyOwner { + function setDecayRate( + uint64 newDecay + ) external onlyOwner { decay = newDecay; emit SetDecayRate(newDecay); } @@ -92,7 +99,9 @@ contract CacheManager is Initializable, DelegateCallAware { } /// @notice Evicts up to `count` programs from the cache. - function evictPrograms(uint256 count) public onlyOwner { + function evictPrograms( + uint256 count + ) public onlyOwner { while (bids.length() != 0 && count > 0) { (uint192 bid, uint64 index) = _getBid(bids.pop()); _deleteEntry(bid, index); @@ -107,7 +116,9 @@ contract CacheManager is Initializable, DelegateCallAware { /// @notice Returns the `k` smallest entries in the cache sorted in ascending order. /// If the cache have less than `k` entries, returns all entries. - function getSmallestEntries(uint256 k) public view returns (Entry[] memory result) { + function getSmallestEntries( + uint256 k + ) public view returns (Entry[] memory result) { if (bids.length() < k) { k = bids.length(); } @@ -121,7 +132,9 @@ contract CacheManager is Initializable, DelegateCallAware { /// @notice Returns the minimum bid required to cache a program of the given size. /// Value returned here is the minimum bid that you can send with msg.value - function getMinBid(uint64 size) public view returns (uint192 min) { + function getMinBid( + uint64 size + ) public view returns (uint192 min) { if (size > cacheSize) { revert AsmTooLarge(size, 0, cacheSize); } @@ -153,21 +166,25 @@ contract CacheManager is Initializable, DelegateCallAware { /// @notice Returns the minimum bid required to cache the program with given codehash. /// Value returned here is the minimum bid that you can send with msg.value - function getMinBid(bytes32 codehash) public view returns (uint192 min) { + function getMinBid( + bytes32 codehash + ) public view returns (uint192 min) { return getMinBid(_asmSize(codehash)); } /// @notice Returns the minimum bid required to cache the program at given address. /// Value returned here is the minimum bid that you can send with msg.value - function getMinBid(address program) external view returns (uint192 min) { + function getMinBid( + address program + ) external view returns (uint192 min) { return getMinBid(program.codehash); } /// @notice Sends all revenue to the network fee account. function sweepFunds() external { - (bool success, bytes memory data) = ARB_OWNER_PUBLIC.getNetworkFeeAccount().call{ - value: address(this).balance - }(""); + (bool success, bytes memory data) = + // solhint-disable-next-line avoid-low-level-calls + ARB_OWNER_PUBLIC.getNetworkFeeAccount().call{value: address(this).balance}(""); if (!success) { assembly { revert(add(data, 32), mload(data)) @@ -176,7 +193,9 @@ contract CacheManager is Initializable, DelegateCallAware { } /// Places a bid, reverting if payment is insufficient. - function placeBid(address program) external payable { + function placeBid( + address program + ) external payable { if (isPaused) { revert BidsArePaused(); } @@ -193,7 +212,9 @@ contract CacheManager is Initializable, DelegateCallAware { /// @notice Evicts entries until enough space exists in the cache, reverting if payment is insufficient. /// Returns the new amount of space available on success. /// @dev Will revert for requests larger than 5Mb. Call repeatedly for more. - function makeSpace(uint64 size) external payable returns (uint64 space) { + function makeSpace( + uint64 size + ) external payable returns (uint64 space) { if (isPaused) { revert BidsArePaused(); } @@ -209,7 +230,9 @@ contract CacheManager is Initializable, DelegateCallAware { } /// @dev Converts a value to a bid by adding the time decay term. - function _toBid(uint256 value) internal view returns (uint192 bid) { + function _toBid( + uint256 value + ) internal view returns (uint192 bid) { uint256 _bid = value + _calcDecay(); if (_bid > type(uint192).max) { revert BidTooLarge(_bid); @@ -219,7 +242,9 @@ contract CacheManager is Initializable, DelegateCallAware { /// @dev Evicts entries until enough space exists in the cache, reverting if payment is insufficient. /// Returns the bid and the index to use for insertion. - function _makeSpace(uint64 size) internal returns (uint192 bid, uint64 index) { + function _makeSpace( + uint64 size + ) internal returns (uint192 bid, uint64 index) { // discount historical bids by the number of seconds bid = _toBid(msg.value); index = uint64(entries.length); @@ -270,7 +295,9 @@ contract CacheManager is Initializable, DelegateCallAware { } /// @dev Gets the bid and index from a packed bid item - function _getBid(uint256 info) internal pure returns (uint192 bid, uint64 index) { + function _getBid( + uint256 info + ) internal pure returns (uint192 bid, uint64 index) { bid = uint192(info >> 64); index = uint64(info); } @@ -281,13 +308,17 @@ contract CacheManager is Initializable, DelegateCallAware { } /// @dev Gets the size of the given program in bytes - function _asmSize(bytes32 codehash) internal view returns (uint64) { + function _asmSize( + bytes32 codehash + ) internal view returns (uint64) { uint32 size = ARB_WASM.codehashAsmSize(codehash); return uint64(size >= MIN_CODESIZE ? size : MIN_CODESIZE); // pretend it's at least 4Kb } /// @dev Determines whether a program is cached - function _isCached(bytes32 codehash) internal view returns (bool) { + function _isCached( + bytes32 codehash + ) internal view returns (bool) { return ARB_WASM_CACHE.codehashIsCached(codehash); } } diff --git a/src/challenge/ChallengeLib.sol b/src/challenge/ChallengeLib.sol deleted file mode 100644 index 6aaa3579..00000000 --- a/src/challenge/ChallengeLib.sol +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE -// SPDX-License-Identifier: BUSL-1.1 - -pragma solidity ^0.8.0; - -import "../state/Machine.sol"; -import "../state/GlobalState.sol"; - -library ChallengeLib { - using MachineLib for Machine; - using ChallengeLib for Challenge; - - /// @dev It's assumed that that uninitialzed challenges have mode NONE - enum ChallengeMode { - NONE, - BLOCK, - EXECUTION - } - - struct Participant { - address addr; - uint256 timeLeft; - } - - struct Challenge { - Participant current; - Participant next; - uint256 lastMoveTimestamp; - bytes32 wasmModuleRoot; - bytes32 challengeStateHash; - uint64 maxInboxMessages; - ChallengeMode mode; - } - - struct SegmentSelection { - uint256 oldSegmentsStart; - uint256 oldSegmentsLength; - bytes32[] oldSegments; - uint256 challengePosition; - } - - function timeUsedSinceLastMove(Challenge storage challenge) internal view returns (uint256) { - return block.timestamp - challenge.lastMoveTimestamp; - } - - function isTimedOut(Challenge storage challenge) internal view returns (bool) { - return challenge.timeUsedSinceLastMove() > challenge.current.timeLeft; - } - - function extractChallengeSegment(SegmentSelection calldata selection) - internal - pure - returns (uint256 segmentStart, uint256 segmentLength) - { - uint256 oldChallengeDegree = selection.oldSegments.length - 1; - segmentLength = selection.oldSegmentsLength / oldChallengeDegree; - // Intentionally done before challengeLength is potentially added to for the final segment - segmentStart = selection.oldSegmentsStart + segmentLength * selection.challengePosition; - if (selection.challengePosition == selection.oldSegments.length - 2) { - segmentLength += selection.oldSegmentsLength % oldChallengeDegree; - } - } - - function hashChallengeState( - uint256 segmentsStart, - uint256 segmentsLength, - bytes32[] memory segments - ) internal pure returns (bytes32) { - return keccak256(abi.encodePacked(segmentsStart, segmentsLength, segments)); - } - - function blockStateHash(MachineStatus status, bytes32 globalStateHash) - internal - pure - returns (bytes32) - { - if (status == MachineStatus.FINISHED) { - return keccak256(abi.encodePacked("Block state:", globalStateHash)); - } else if (status == MachineStatus.ERRORED) { - return keccak256(abi.encodePacked("Block state, errored:", globalStateHash)); - } else if (status == MachineStatus.TOO_FAR) { - return keccak256(abi.encodePacked("Block state, too far:")); - } else { - revert("BAD_BLOCK_STATUS"); - } - } -} diff --git a/src/challenge/ChallengeManager.sol b/src/challenge/ChallengeManager.sol deleted file mode 100644 index fc57b5eb..00000000 --- a/src/challenge/ChallengeManager.sol +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE -// SPDX-License-Identifier: BUSL-1.1 - -pragma solidity ^0.8.0; - -import "../libraries/DelegateCallAware.sol"; -import "../osp/IOneStepProofEntry.sol"; -import "../state/GlobalState.sol"; -import "./IChallengeResultReceiver.sol"; -import "./ChallengeLib.sol"; -import "./IChallengeManager.sol"; - -import {NO_CHAL_INDEX} from "../libraries/Constants.sol"; - -contract ChallengeManager is DelegateCallAware, IChallengeManager { - using GlobalStateLib for GlobalState; - using MachineLib for Machine; - using ChallengeLib for ChallengeLib.Challenge; - - enum ChallengeModeRequirement { - ANY, - BLOCK, - EXECUTION - } - - string private constant NO_CHAL = "NO_CHAL"; - uint256 private constant MAX_CHALLENGE_DEGREE = 40; - - uint64 public totalChallengesCreated; - mapping(uint256 => ChallengeLib.Challenge) public challenges; - - IChallengeResultReceiver public resultReceiver; - - ISequencerInbox public sequencerInbox; - IBridge public bridge; - IOneStepProofEntry public osp; - mapping(bytes32 => IOneStepProofEntry) public ospCond; - - function challengeInfo(uint64 challengeIndex) - external - view - override - returns (ChallengeLib.Challenge memory) - { - return challenges[challengeIndex]; - } - - modifier takeTurn( - uint64 challengeIndex, - ChallengeLib.SegmentSelection calldata selection, - ChallengeModeRequirement expectedMode - ) { - ChallengeLib.Challenge storage challenge = challenges[challengeIndex]; - require(msg.sender == currentResponder(challengeIndex), "CHAL_SENDER"); - require(!isTimedOut(challengeIndex), "CHAL_DEADLINE"); - - if (expectedMode == ChallengeModeRequirement.ANY) { - require(challenge.mode != ChallengeLib.ChallengeMode.NONE, NO_CHAL); - } else if (expectedMode == ChallengeModeRequirement.BLOCK) { - require(challenge.mode == ChallengeLib.ChallengeMode.BLOCK, "CHAL_NOT_BLOCK"); - } else if (expectedMode == ChallengeModeRequirement.EXECUTION) { - require(challenge.mode == ChallengeLib.ChallengeMode.EXECUTION, "CHAL_NOT_EXECUTION"); - } else { - assert(false); - } - - require( - challenge.challengeStateHash == - ChallengeLib.hashChallengeState( - selection.oldSegmentsStart, - selection.oldSegmentsLength, - selection.oldSegments - ), - "BIS_STATE" - ); - if ( - selection.oldSegments.length < 2 || - selection.challengePosition >= selection.oldSegments.length - 1 - ) { - revert("BAD_CHALLENGE_POS"); - } - - _; - - if (challenge.mode == ChallengeLib.ChallengeMode.NONE) { - // Early return since challenge must have terminated - return; - } - - ChallengeLib.Participant memory current = challenge.current; - current.timeLeft -= block.timestamp - challenge.lastMoveTimestamp; - - challenge.current = challenge.next; - challenge.next = current; - - challenge.lastMoveTimestamp = block.timestamp; - } - - function initialize( - IChallengeResultReceiver resultReceiver_, - ISequencerInbox sequencerInbox_, - IBridge bridge_, - IOneStepProofEntry osp_ - ) external override onlyDelegated { - require(address(resultReceiver) == address(0), "ALREADY_INIT"); - require(address(resultReceiver_) != address(0), "NO_RESULT_RECEIVER"); - resultReceiver = resultReceiver_; - sequencerInbox = sequencerInbox_; - bridge = bridge_; - osp = osp_; - } - - /// @dev A osp breaking change is introduced as part of Stylus upgrade, where the new osp would not support - /// pre-Stylus legacy wasmModuleRoot. To ensure that the new osp is not used for legacy wasmModuleRoot, - /// we introduce a conditional OSP where condRoot should be set to the pre-Stylus root and condOsp should - /// be set to the pre-Stylus osp. The correct value should be handled by the upgrade action contract. - function postUpgradeInit( - IOneStepProofEntry osp_, - bytes32 condRoot, - IOneStepProofEntry condOsp - ) external onlyDelegated onlyProxyOwner { - ospCond[condRoot] = condOsp; - osp = osp_; - } - - function getOsp(bytes32 wasmModuleRoot) public view returns (IOneStepProofEntry) { - IOneStepProofEntry t = ospCond[wasmModuleRoot]; - if (address(t) == address(0)) { - return osp; - } else { - return t; - } - } - - function createChallenge( - bytes32 wasmModuleRoot_, - MachineStatus[2] calldata startAndEndMachineStatuses_, - GlobalState[2] calldata startAndEndGlobalStates_, - uint64 numBlocks, - address asserter_, - address challenger_, - uint256 asserterTimeLeft_, - uint256 challengerTimeLeft_ - ) external override returns (uint64) { - require(msg.sender == address(resultReceiver), "ONLY_ROLLUP_CHAL"); - bytes32[] memory segments = new bytes32[](2); - segments[0] = ChallengeLib.blockStateHash( - startAndEndMachineStatuses_[0], - startAndEndGlobalStates_[0].hash() - ); - segments[1] = ChallengeLib.blockStateHash( - startAndEndMachineStatuses_[1], - startAndEndGlobalStates_[1].hash() - ); - - uint64 challengeIndex = ++totalChallengesCreated; - // The following is an assertion since it should never be possible, but it's an important invariant - assert(challengeIndex != NO_CHAL_INDEX); - ChallengeLib.Challenge storage challenge = challenges[challengeIndex]; - challenge.wasmModuleRoot = wasmModuleRoot_; - - // See validator/assertion.go ExecutionState RequiredBatches() for reasoning - uint64 maxInboxMessagesRead = startAndEndGlobalStates_[1].getInboxPosition(); - if ( - startAndEndMachineStatuses_[1] == MachineStatus.ERRORED || - startAndEndGlobalStates_[1].getPositionInMessage() > 0 - ) { - maxInboxMessagesRead++; - } - challenge.maxInboxMessages = maxInboxMessagesRead; - challenge.next = ChallengeLib.Participant({addr: asserter_, timeLeft: asserterTimeLeft_}); - challenge.current = ChallengeLib.Participant({ - addr: challenger_, - timeLeft: challengerTimeLeft_ - }); - challenge.lastMoveTimestamp = block.timestamp; - challenge.mode = ChallengeLib.ChallengeMode.BLOCK; - - emit InitiatedChallenge( - challengeIndex, - startAndEndGlobalStates_[0], - startAndEndGlobalStates_[1] - ); - completeBisection(challengeIndex, 0, numBlocks, segments); - return challengeIndex; - } - - /** - * @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection - * of an execution segment with the same length but a different endpoint. This is either the initial move - * or follows another execution objection - */ - function bisectExecution( - uint64 challengeIndex, - ChallengeLib.SegmentSelection calldata selection, - bytes32[] calldata newSegments - ) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) { - (uint256 challengeStart, uint256 challengeLength) = ChallengeLib.extractChallengeSegment( - selection - ); - require(challengeLength > 1, "TOO_SHORT"); - { - uint256 expectedDegree = challengeLength; - if (expectedDegree > MAX_CHALLENGE_DEGREE) { - expectedDegree = MAX_CHALLENGE_DEGREE; - } - require(newSegments.length == expectedDegree + 1, "WRONG_DEGREE"); - } - - requireValidBisection(selection, newSegments[0], newSegments[newSegments.length - 1]); - - completeBisection(challengeIndex, challengeStart, challengeLength, newSegments); - } - - function challengeExecution( - uint64 challengeIndex, - ChallengeLib.SegmentSelection calldata selection, - MachineStatus[2] calldata machineStatuses, - bytes32[2] calldata globalStateHashes, - uint256 numSteps - ) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) { - require(numSteps >= 1, "CHALLENGE_TOO_SHORT"); - require(numSteps <= OneStepProofEntryLib.MAX_STEPS, "CHALLENGE_TOO_LONG"); - requireValidBisection( - selection, - ChallengeLib.blockStateHash(machineStatuses[0], globalStateHashes[0]), - ChallengeLib.blockStateHash(machineStatuses[1], globalStateHashes[1]) - ); - - ChallengeLib.Challenge storage challenge = challenges[challengeIndex]; - (uint256 executionChallengeAtSteps, uint256 challengeLength) = ChallengeLib - .extractChallengeSegment(selection); - require(challengeLength == 1, "TOO_LONG"); - - if (machineStatuses[0] != MachineStatus.FINISHED) { - // If the machine is in a halted state, it can't change - require( - machineStatuses[0] == machineStatuses[1] && - globalStateHashes[0] == globalStateHashes[1], - "HALTED_CHANGE" - ); - _currentWin(challengeIndex, ChallengeTerminationType.BLOCK_PROOF); - return; - } - - if (machineStatuses[1] == MachineStatus.ERRORED) { - // If the machine errors, it must return to the previous global state - require(globalStateHashes[0] == globalStateHashes[1], "ERROR_CHANGE"); - } - - bytes32[] memory segments = new bytes32[](2); - IOneStepProofEntry _osp = getOsp(challenge.wasmModuleRoot); - segments[0] = _osp.getStartMachineHash(globalStateHashes[0], challenge.wasmModuleRoot); - segments[1] = _osp.getEndMachineHash(machineStatuses[1], globalStateHashes[1]); - - challenge.mode = ChallengeLib.ChallengeMode.EXECUTION; - - completeBisection(challengeIndex, 0, numSteps, segments); - - emit ExecutionChallengeBegun(challengeIndex, executionChallengeAtSteps); - } - - function oneStepProveExecution( - uint64 challengeIndex, - ChallengeLib.SegmentSelection calldata selection, - bytes calldata proof - ) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) { - ChallengeLib.Challenge storage challenge = challenges[challengeIndex]; - uint256 challengeStart; - { - uint256 challengeLength; - (challengeStart, challengeLength) = ChallengeLib.extractChallengeSegment(selection); - require(challengeLength == 1, "TOO_LONG"); - } - - bytes32 afterHash = getOsp(challenge.wasmModuleRoot).proveOneStep( - ExecutionContext({maxInboxMessagesRead: challenge.maxInboxMessages, bridge: bridge}), - challengeStart, - selection.oldSegments[selection.challengePosition], - proof - ); - require( - afterHash != selection.oldSegments[selection.challengePosition + 1], - "SAME_OSP_END" - ); - - emit OneStepProofCompleted(challengeIndex); - _currentWin(challengeIndex, ChallengeTerminationType.EXECUTION_PROOF); - } - - function timeout(uint64 challengeIndex) external override { - require(challenges[challengeIndex].mode != ChallengeLib.ChallengeMode.NONE, NO_CHAL); - require(isTimedOut(challengeIndex), "TIMEOUT_DEADLINE"); - _nextWin(challengeIndex, ChallengeTerminationType.TIMEOUT); - } - - function clearChallenge(uint64 challengeIndex) external override { - require(msg.sender == address(resultReceiver), "NOT_RES_RECEIVER"); - require(challenges[challengeIndex].mode != ChallengeLib.ChallengeMode.NONE, NO_CHAL); - delete challenges[challengeIndex]; - emit ChallengeEnded(challengeIndex, ChallengeTerminationType.CLEARED); - } - - function currentResponder(uint64 challengeIndex) public view override returns (address) { - return challenges[challengeIndex].current.addr; - } - - function isTimedOut(uint64 challengeIndex) public view virtual override returns (bool) { - return challenges[challengeIndex].isTimedOut(); - } - - function requireValidBisection( - ChallengeLib.SegmentSelection calldata selection, - bytes32 startHash, - bytes32 endHash - ) private pure { - require(selection.oldSegments[selection.challengePosition] == startHash, "WRONG_START"); - require(selection.oldSegments[selection.challengePosition + 1] != endHash, "SAME_END"); - } - - function completeBisection( - uint64 challengeIndex, - uint256 challengeStart, - uint256 challengeLength, - bytes32[] memory newSegments - ) private { - assert(challengeLength >= 1); - assert(newSegments.length >= 2); - - bytes32 challengeStateHash = ChallengeLib.hashChallengeState( - challengeStart, - challengeLength, - newSegments - ); - challenges[challengeIndex].challengeStateHash = challengeStateHash; - - emit Bisected( - challengeIndex, - challengeStateHash, - challengeStart, - challengeLength, - newSegments - ); - } - - /// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge - function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private { - ChallengeLib.Challenge storage challenge = challenges[challengeIndex]; - address next = challenge.next.addr; - address current = challenge.current.addr; - delete challenges[challengeIndex]; - resultReceiver.completeChallenge(challengeIndex, next, current); - emit ChallengeEnded(challengeIndex, reason); - } - - /** - * @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the - * state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party - * to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta. - */ - function _currentWin( - uint64 challengeIndex, - ChallengeTerminationType /* reason */ - ) private { - ChallengeLib.Challenge storage challenge = challenges[challengeIndex]; - challenge.challengeStateHash = bytes32(0); - - // address next = challenge.next.addr; - // address current = challenge.current.addr; - // delete challenges[challengeIndex]; - // resultReceiver.completeChallenge(challengeIndex, current, next); - // emit ChallengeEnded(challengeIndex, reason); - } -} diff --git a/src/challenge/IChallengeManager.sol b/src/challenge/IChallengeManager.sol deleted file mode 100644 index 236829b1..00000000 --- a/src/challenge/IChallengeManager.sol +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE -// SPDX-License-Identifier: BUSL-1.1 - -pragma solidity ^0.8.0; - -import "../state/Machine.sol"; -import "../bridge/IBridge.sol"; -import "../bridge/ISequencerInbox.sol"; -import "../osp/IOneStepProofEntry.sol"; - -import "./IChallengeResultReceiver.sol"; - -import "./ChallengeLib.sol"; - -interface IChallengeManager { - enum ChallengeTerminationType { - TIMEOUT, - BLOCK_PROOF, - EXECUTION_PROOF, - CLEARED - } - - event InitiatedChallenge( - uint64 indexed challengeIndex, - GlobalState startState, - GlobalState endState - ); - - event Bisected( - uint64 indexed challengeIndex, - bytes32 indexed challengeRoot, - uint256 challengedSegmentStart, - uint256 challengedSegmentLength, - bytes32[] chainHashes - ); - - event ExecutionChallengeBegun(uint64 indexed challengeIndex, uint256 blockSteps); - event OneStepProofCompleted(uint64 indexed challengeIndex); - - event ChallengeEnded(uint64 indexed challengeIndex, ChallengeTerminationType kind); - - function initialize( - IChallengeResultReceiver resultReceiver_, - ISequencerInbox sequencerInbox_, - IBridge bridge_, - IOneStepProofEntry osp_ - ) external; - - function postUpgradeInit( - IOneStepProofEntry osp_, - bytes32 condRoot, - IOneStepProofEntry condOsp - ) external; - - /// @notice Get the default osp, which is used for all wasm module roots that don't have a conditional OSP set - /// Use getOsp(wasmModuleRoot) to get the OSP for a specific wasm module root - function osp() external view returns (IOneStepProofEntry); - - /// @notice Get the OSP for a given wasm module root - function getOsp(bytes32 wasmModuleRoot) external view returns (IOneStepProofEntry); - - function createChallenge( - bytes32 wasmModuleRoot_, - MachineStatus[2] calldata startAndEndMachineStatuses_, - GlobalState[2] calldata startAndEndGlobalStates_, - uint64 numBlocks, - address asserter_, - address challenger_, - uint256 asserterTimeLeft_, - uint256 challengerTimeLeft_ - ) external returns (uint64); - - function challengeInfo(uint64 challengeIndex_) - external - view - returns (ChallengeLib.Challenge memory); - - function currentResponder(uint64 challengeIndex) external view returns (address); - - function isTimedOut(uint64 challengeIndex) external view returns (bool); - - function clearChallenge(uint64 challengeIndex_) external; - - function timeout(uint64 challengeIndex_) external; -} diff --git a/src/challenge/IChallengeResultReceiver.sol b/src/challenge/IChallengeResultReceiver.sol deleted file mode 100644 index 264a0ae2..00000000 --- a/src/challenge/IChallengeResultReceiver.sol +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE -// SPDX-License-Identifier: BUSL-1.1 - -pragma solidity ^0.8.0; - -interface IChallengeResultReceiver { - function completeChallenge( - uint256 challengeIndex, - address winner, - address loser - ) external; -} diff --git a/src/challengeV2/EdgeChallengeManager.sol b/src/challengeV2/EdgeChallengeManager.sol new file mode 100644 index 00000000..42a6fb31 --- /dev/null +++ b/src/challengeV2/EdgeChallengeManager.sol @@ -0,0 +1,783 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "../rollup/Assertion.sol"; +import "./libraries/UintUtilsLib.sol"; +import "./IAssertionChain.sol"; +import "./libraries/EdgeChallengeManagerLib.sol"; +import "../libraries/Constants.sol"; +import "../state/Machine.sol"; + +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +/// @title EdgeChallengeManager interface +interface IEdgeChallengeManager { + /// @notice Initialize the EdgeChallengeManager. EdgeChallengeManagers are upgradeable + /// so use the initializer paradigm + /// @param _assertionChain The assertion chain contract + /// @param _challengePeriodBlocks The amount of cumulative time an edge must spend unrivaled before it can be confirmed + /// This should be the censorship period + the cumulative amount of time needed to do any + /// offchain calculation. We currently estimate around 10 mins for each layer zero edge and 1 + /// one minute for each other edge. + /// @param _oneStepProofEntry The one step proof logic + /// @param layerZeroBlockEdgeHeight The end height of layer zero edges of type Block + /// @param layerZeroBigStepEdgeHeight The end height of layer zero edges of type BigStep + /// @param layerZeroSmallStepEdgeHeight The end height of layer zero edges of type SmallStep + /// @param _stakeToken The token that stake will be provided in when creating zero layer block edges + /// @param _excessStakeReceiver The address that excess stake will be sent to when 2nd+ block edge is created + /// @param _numBigStepLevel The number of bigstep levels + /// @param _stakeAmounts The stake amount for each level. (first element is for block level) + function initialize( + IAssertionChain _assertionChain, + uint64 _challengePeriodBlocks, + IOneStepProofEntry _oneStepProofEntry, + uint256 layerZeroBlockEdgeHeight, + uint256 layerZeroBigStepEdgeHeight, + uint256 layerZeroSmallStepEdgeHeight, + IERC20 _stakeToken, + address _excessStakeReceiver, + uint8 _numBigStepLevel, + uint256[] calldata _stakeAmounts + ) external; + + function challengePeriodBlocks() external view returns (uint64); + + /// @notice The one step proof resolver used to decide between rival SmallStep edges of length 1 + function oneStepProofEntry() external view returns (IOneStepProofEntry); + + /// @notice Performs necessary checks and creates a new layer zero edge + /// @param args Edge creation args + function createLayerZeroEdge( + CreateEdgeArgs calldata args + ) external returns (bytes32); + + /// @notice Bisect an edge. This creates two child edges: + /// lowerChild: has the same start root and height as this edge, but a different end root and height + /// upperChild: has the same end root and height as this edge, but a different start root and height + /// The lower child end root and height are equal to the upper child start root and height. This height + /// is the mandatoryBisectionHeight. + /// The lower child may already exist, however it's not possible for the upper child to exist as that would + /// mean that the edge has already been bisected + /// @param edgeId Edge to bisect + /// @param bisectionHistoryRoot The new history root to be used in the lower and upper children + /// @param prefixProof A proof to show that the bisectionHistoryRoot commits to a prefix of the current endHistoryRoot + /// @return lowerChildId The id of the newly created lower child edge + /// @return upperChildId The id of the newly created upper child edge + function bisectEdge( + bytes32 edgeId, + bytes32 bisectionHistoryRoot, + bytes calldata prefixProof + ) external returns (bytes32, bytes32); + + /// @notice An edge can be confirmed if the total amount of time it and a single chain of its direct ancestors + /// has spent unrivaled is greater than the challenge period. + /// @dev Edges inherit time from their parents, so the sum of unrivaled timers is compared against the threshold. + /// Given that an edge cannot become unrivaled after becoming rivaled, once the threshold is passed + /// it will always remain passed. The direct ancestors of an edge are linked by parent-child links for edges + /// of the same level, and claimId-edgeId links for zero layer edges that claim an edge in the level below. + /// This method also includes the amount of time the assertion being claimed spent without a sibling + /// @param edgeId The id of the edge to confirm + function confirmEdgeByTime( + bytes32 edgeId, + AssertionStateData calldata claimStateData + ) external; + + /// @notice Update multiple edges' timer cache by their children. Equivalent to calling updateTimerCacheByChildren for each edge. + /// May update timer cache above maximum if the last edge's timer cache was below maximumCachedTime. + /// Revert when the last edge's timer cache is already equal to or above maximumCachedTime. + /// @param edgeIds The ids of the edges to update + /// @param maximumCachedTime The maximum amount of cached time allowed on the last edge (β∗) + function multiUpdateTimeCacheByChildren( + bytes32[] calldata edgeIds, + uint256 maximumCachedTime + ) external; + + /// @notice Update an edge's timer cache by its children. + /// Sets the edge's timer cache to its timeUnrivaled + (minimum timer cache of its children). + /// May update timer cache above maximum if the last edge's timer cache was below maximumCachedTime. + /// Revert when the edge's timer cache is already equal to or above maximumCachedTime. + /// @param edgeId The id of the edge to update + /// @param maximumCachedTime The maximum amount of cached time allowed on the edge (β∗) + function updateTimerCacheByChildren(bytes32 edgeId, uint256 maximumCachedTime) external; + + /// @notice Given a one step fork edge and an edge with matching claim id, + /// set the one step fork edge's timer cache to its timeUnrivaled + claiming edge's timer cache. + /// May update timer cache above maximum if the last edge's timer cache was below maximumCachedTime. + /// Revert when the edge's timer cache is already equal to or above maximumCachedTime. + /// @param edgeId The id of the edge to update + /// @param claimingEdgeId The id of the edge which has a claimId equal to edgeId + /// @param maximumCachedTime The maximum amount of cached time allowed on the edge (β∗) + function updateTimerCacheByClaim( + bytes32 edgeId, + bytes32 claimingEdgeId, + uint256 maximumCachedTime + ) external; + + /// @notice Confirm an edge by executing a one step proof + /// @dev One step proofs can only be executed against edges that have length one and of type SmallStep + /// @param edgeId The id of the edge to confirm + /// @param oneStepData Input data to the one step proof + /// @param prevConfig Data about the config set in prev + /// @param beforeHistoryInclusionProof Proof that the state which is the start of the edge is committed to by the startHistoryRoot + /// @param afterHistoryInclusionProof Proof that the state which is the end of the edge is committed to by the endHistoryRoot + function confirmEdgeByOneStepProof( + bytes32 edgeId, + OneStepData calldata oneStepData, + ConfigData calldata prevConfig, + bytes32[] calldata beforeHistoryInclusionProof, + bytes32[] calldata afterHistoryInclusionProof + ) external; + + /// @notice When zero layer block edges are created a stake is also provided + /// The stake on this edge can be refunded if the edge is confirme + function refundStake( + bytes32 edgeId + ) external; + + /// @notice Zero layer edges have to be a fixed height. + /// This function returns the end height for a given edge type + function getLayerZeroEndHeight( + EdgeType eType + ) external view returns (uint256); + + /// @notice Calculate the unique id of an edge + /// @param level The level of the edge + /// @param originId The origin id of the edge + /// @param startHeight The start height of the edge + /// @param startHistoryRoot The start history root of the edge + /// @param endHeight The end height of the edge + /// @param endHistoryRoot The end history root of the edge + function calculateEdgeId( + uint8 level, + bytes32 originId, + uint256 startHeight, + bytes32 startHistoryRoot, + uint256 endHeight, + bytes32 endHistoryRoot + ) external pure returns (bytes32); + + /// @notice Calculate the mutual id of the edge + /// Edges that are rivals share the same mutual id + /// @param level The level of the edge + /// @param originId The origin id of the edge + /// @param startHeight The start height of the edge + /// @param startHistoryRoot The start history root of the edge + /// @param endHeight The end height of the edge + function calculateMutualId( + uint8 level, + bytes32 originId, + uint256 startHeight, + bytes32 startHistoryRoot, + uint256 endHeight + ) external pure returns (bytes32); + + /// @notice Has the edge already been stored in the manager + function edgeExists( + bytes32 edgeId + ) external view returns (bool); + + /// @notice Get full edge data for an edge + function getEdge( + bytes32 edgeId + ) external view returns (ChallengeEdge memory); + + /// @notice The length of the edge, from start height to end height + function edgeLength( + bytes32 edgeId + ) external view returns (uint256); + + /// @notice Does this edge currently have one or more rivals + /// Rival edges share the same mutual id + function hasRival( + bytes32 edgeId + ) external view returns (bool); + + /// @notice The confirmed rival of this mutual id + /// Returns 0 if one does not exist + function confirmedRival( + bytes32 mutualId + ) external view returns (bytes32); + + /// @notice Does the edge have at least one rival, and it has length one + function hasLengthOneRival( + bytes32 edgeId + ) external view returns (bool); + + /// @notice The amount of time this edge has spent without rivals + /// This value is increasing whilst an edge is unrivaled, once a rival is created + /// it is fixed. If an edge has rivals from the moment it is created then it will have + /// a zero time unrivaled + function timeUnrivaled( + bytes32 edgeId + ) external view returns (uint256); + + /// @notice Get the id of the prev assertion that this edge is originates from + /// @dev Uses the parent chain to traverse upwards SmallStep->BigStep->Block->Assertion + /// until it gets to the origin assertion + function getPrevAssertionHash( + bytes32 edgeId + ) external view returns (bytes32); + + /// @notice Fetch the raw first rival record for the given mutual id + /// @dev Returns 0 if there is no edge with the given mutual id + /// Returns a magic value if there is one edge but it is unrivaled + /// Returns the id of the second edge created with the mutual id, if > 1 exists + function firstRival( + bytes32 mutualId + ) external view returns (bytes32); + + /// @notice True if an account has made a layer zero edge with the given mutual id. + /// This is only tracked when the validator whitelist is enabled + function hasMadeLayerZeroRival( + address account, + bytes32 mutualId + ) external view returns (bool); +} + +/// @title A challenge manager that uses edge structures to decide between Assertions +/// @notice When two assertions are created that have the same predecessor the protocol needs to decide which of the two is correct +/// This challenge manager allows the staker who has created the valid assertion to enforce that it will be confirmed, and all +/// other rival assertions will be rejected. The challenge is all-vs-all in that all assertions with the same +/// predecessor will vie for succession against each other. Stakers compete by creating edges that reference the assertion they +/// believe in. These edges are then bisected, reducing the size of the disagreement with each bisection, and narrowing in on the +/// exact point of disagreement. Eventually, at step size 1, the step can be proved on-chain directly proving that the related assertion +/// must be invalid. +contract EdgeChallengeManager is IEdgeChallengeManager, Initializable { + using EdgeChallengeManagerLib for EdgeStore; + using ChallengeEdgeLib for ChallengeEdge; + using SafeERC20 for IERC20; + + /// @notice A new edge has been added to the challenge manager + /// @param edgeId The id of the newly added edge + /// @param mutualId The mutual id of the added edge - all rivals share the same mutual id + /// @param originId The origin id of the added edge - origin ids link an edge to the level below + /// @param hasRival Does the newly added edge have a rival upon creation + /// @param length The length of the new edge + /// @param level The level of the new edge + /// @param isLayerZero Whether the new edge was added at layer zero - has a claim and a staker + event EdgeAdded( + bytes32 indexed edgeId, + bytes32 indexed mutualId, + bytes32 indexed originId, + bytes32 claimId, + uint256 length, + uint8 level, + bool hasRival, + bool isLayerZero + ); + + /// @notice An edge has been bisected + /// @param edgeId The id of the edge that was bisected + /// @param lowerChildId The id of the lower child created during bisection + /// @param upperChildId The id of the upper child created during bisection + /// @param lowerChildAlreadyExists When an edge is bisected the lower child may already exist - created by a rival. + event EdgeBisected( + bytes32 indexed edgeId, + bytes32 indexed lowerChildId, + bytes32 indexed upperChildId, + bool lowerChildAlreadyExists + ); + + /// @notice An edge can be confirmed if the cumulative time (in blocks) unrivaled of it and a direct chain of ancestors is greater than a threshold + /// @param edgeId The edge that was confirmed + /// @param mutualId The mutual id of the confirmed edge + /// @param totalTimeUnrivaled The cumulative amount of time (in blocks) this edge spent unrivaled + event EdgeConfirmedByTime( + bytes32 indexed edgeId, bytes32 indexed mutualId, uint256 totalTimeUnrivaled + ); + + /// @notice A SmallStep edge of length 1 can be confirmed via a one step proof + /// @param edgeId The edge that was confirmed + /// @param mutualId The mutual id of the confirmed edge + event EdgeConfirmedByOneStepProof(bytes32 indexed edgeId, bytes32 indexed mutualId); + + /// @notice An edge's timer cache has been updated + /// @param edgeId The edge that was updated + /// @param newValue The new value of its timer cache + event TimerCacheUpdated(bytes32 indexed edgeId, uint256 newValue); + + /// @notice A stake has been refunded for a confirmed layer zero block edge + /// @param edgeId The edge that was confirmed + /// @param mutualId The mutual id of the confirmed edge + /// @param stakeToken The ERC20 being refunded + /// @param stakeAmount The amount of tokens being refunded + event EdgeRefunded( + bytes32 indexed edgeId, bytes32 indexed mutualId, address stakeToken, uint256 stakeAmount + ); + + /// @dev Store for all edges and rival data + /// All edges, including edges from different challenges, are stored together in the same store + /// Since edge ids include the origin id, which is unique for each challenge, we can be sure that + /// edges from different challenges cannot have the same id, and so can be stored in the same store + EdgeStore internal store; + + /// @notice When creating a zero layer block edge a stake must be supplied. However since we know that only + /// one edge in a group of rivals can ever be confirmed, we only need to keep one stake in this contract + /// to later refund for that edge. Other stakes can immediately be sent to an excess stake receiver. + /// This excess stake receiver can then choose to refund the gas of participants who aided in the confirmation + /// of the winning edge + address public excessStakeReceiver; + + /// @notice The token to supply stake in + IERC20 public stakeToken; + + /// @notice The amount of stake token to be supplied when creating a zero layer block edge at a given level + uint256[] public stakeAmounts; + + /// @notice The number of blocks accumulated on an edge before it can be confirmed by time + uint64 public challengePeriodBlocks; + + /// @notice The assertion chain about which challenges are created + IAssertionChain public assertionChain; + + /// @inheritdoc IEdgeChallengeManager + IOneStepProofEntry public override oneStepProofEntry; + + /// @notice The end height of layer zero Block edges + uint256 public LAYERZERO_BLOCKEDGE_HEIGHT; + /// @notice The end height of layer zero BigStep edges + uint256 public LAYERZERO_BIGSTEPEDGE_HEIGHT; + /// @notice The end height of layer zero SmallStep edges + uint256 public LAYERZERO_SMALLSTEPEDGE_HEIGHT; + /// @notice The number of big step levels configured for this challenge manager + /// There is 1 block level, 1 small step level and N big step levels + uint8 public NUM_BIGSTEP_LEVEL; + + constructor() { + _disableInitializers(); + } + + /// @inheritdoc IEdgeChallengeManager + function initialize( + IAssertionChain _assertionChain, + uint64 _challengePeriodBlocks, + IOneStepProofEntry _oneStepProofEntry, + uint256 layerZeroBlockEdgeHeight, + uint256 layerZeroBigStepEdgeHeight, + uint256 layerZeroSmallStepEdgeHeight, + IERC20 _stakeToken, + address _excessStakeReceiver, + uint8 _numBigStepLevel, + uint256[] calldata _stakeAmounts + ) public initializer { + if (address(_assertionChain) == address(0)) { + revert EmptyAssertionChain(); + } + assertionChain = _assertionChain; + if (address(_oneStepProofEntry) == address(0)) { + revert EmptyOneStepProofEntry(); + } + oneStepProofEntry = _oneStepProofEntry; + if (_challengePeriodBlocks == 0) { + revert EmptyChallengePeriod(); + } + challengePeriodBlocks = _challengePeriodBlocks; + + stakeToken = _stakeToken; + if (_excessStakeReceiver == address(0)) { + revert EmptyStakeReceiver(); + } + excessStakeReceiver = _excessStakeReceiver; + + if (!EdgeChallengeManagerLib.isPowerOfTwo(layerZeroBlockEdgeHeight)) { + revert NotPowerOfTwo(layerZeroBlockEdgeHeight); + } + LAYERZERO_BLOCKEDGE_HEIGHT = layerZeroBlockEdgeHeight; + if (!EdgeChallengeManagerLib.isPowerOfTwo(layerZeroBigStepEdgeHeight)) { + revert NotPowerOfTwo(layerZeroBigStepEdgeHeight); + } + LAYERZERO_BIGSTEPEDGE_HEIGHT = layerZeroBigStepEdgeHeight; + if (!EdgeChallengeManagerLib.isPowerOfTwo(layerZeroSmallStepEdgeHeight)) { + revert NotPowerOfTwo(layerZeroSmallStepEdgeHeight); + } + LAYERZERO_SMALLSTEPEDGE_HEIGHT = layerZeroSmallStepEdgeHeight; + + // ensure that there is at least on of each type of level + if (_numBigStepLevel == 0) { + revert ZeroBigStepLevels(); + } + // ensure there's also space for the block level and the small step level + // in total level parameters + if (_numBigStepLevel > 253) { + revert BigStepLevelsTooMany(_numBigStepLevel); + } + NUM_BIGSTEP_LEVEL = _numBigStepLevel; + + if (_numBigStepLevel + 2 != _stakeAmounts.length) { + revert StakeAmountsMismatch(_stakeAmounts.length, _numBigStepLevel + 2); + } + stakeAmounts = _stakeAmounts; + } + + ///////////////////////////// + // STATE MUTATING SECTIION // + ///////////////////////////// + + /// @inheritdoc IEdgeChallengeManager + function createLayerZeroEdge( + CreateEdgeArgs calldata args + ) external returns (bytes32) { + // Check if whitelist is enabled in the Rollup + // We only enforce whitelist in this function as it may exhaust resources + bool whitelistEnabled = !assertionChain.validatorWhitelistDisabled(); + + if (whitelistEnabled && !assertionChain.isValidator(msg.sender)) { + revert NotValidator(msg.sender); + } + + EdgeAddedData memory edgeAdded; + EdgeType eType = ChallengeEdgeLib.levelToType(args.level, NUM_BIGSTEP_LEVEL); + uint256 expectedEndHeight = getLayerZeroEndHeight(eType); + AssertionReferenceData memory ard; + + if (eType == EdgeType.Block) { + // for block type edges we need to provide some extra assertion data context + if (args.proof.length == 0) { + revert EmptyEdgeSpecificProof(); + } + ( + , + AssertionStateData memory predecessorStateData, + AssertionStateData memory claimStateData + ) = abi.decode(args.proof, (bytes32[], AssertionStateData, AssertionStateData)); + + assertionChain.validateAssertionHash( + args.claimId, + claimStateData.assertionState, + claimStateData.prevAssertionHash, + claimStateData.inboxAcc + ); + + assertionChain.validateAssertionHash( + claimStateData.prevAssertionHash, + predecessorStateData.assertionState, + predecessorStateData.prevAssertionHash, + predecessorStateData.inboxAcc + ); + + if (args.endHistoryRoot != claimStateData.assertionState.endHistoryRoot) { + revert EndHistoryRootMismatch( + args.endHistoryRoot, claimStateData.assertionState.endHistoryRoot + ); + } + + ard = AssertionReferenceData( + args.claimId, + claimStateData.prevAssertionHash, + assertionChain.isPending(args.claimId), + assertionChain.getSecondChildCreationBlock(claimStateData.prevAssertionHash) > 0, + predecessorStateData.assertionState, + claimStateData.assertionState + ); + } + edgeAdded = store.createLayerZeroEdge( + args, ard, oneStepProofEntry, expectedEndHeight, NUM_BIGSTEP_LEVEL, whitelistEnabled + ); + + IERC20 st = stakeToken; + uint256 sa = stakeAmounts[args.level]; + // when a zero layer edge is created it must include stake amount. Each time a zero layer + // edge is created it forces the honest participants to do some work, so we want to disincentive + // their creation. The amount should also be enough to pay for the gas costs incurred by the honest + // participant. This can be arranged out of bound by the excess stake receiver. + // The contract initializer can disable staking by setting zeros for token or amount, to change + // this a new challenge manager needs to be deployed and its address updated in the assertion chain + if (address(st) != address(0) && sa != 0) { + // since only one edge in a group of rivals can ever be confirmed, we know that we + // will never need to refund more than one edge. Therefore we can immediately send + // all stakes provided after the first one to an excess stake receiver. + address receiver = edgeAdded.hasRival ? excessStakeReceiver : address(this); + st.safeTransferFrom(msg.sender, receiver, sa); + } + + emit EdgeAdded( + edgeAdded.edgeId, + edgeAdded.mutualId, + edgeAdded.originId, + edgeAdded.claimId, + edgeAdded.length, + edgeAdded.level, + edgeAdded.hasRival, + edgeAdded.isLayerZero + ); + return edgeAdded.edgeId; + } + + /// @inheritdoc IEdgeChallengeManager + function bisectEdge( + bytes32 edgeId, + bytes32 bisectionHistoryRoot, + bytes calldata prefixProof + ) external returns (bytes32, bytes32) { + ( + bytes32 lowerChildId, + EdgeAddedData memory lowerChildAdded, + EdgeAddedData memory upperChildAdded + ) = store.bisectEdge(edgeId, bisectionHistoryRoot, prefixProof); + + bool lowerChildAlreadyExists = lowerChildAdded.edgeId == 0; + // the lower child might already exist, if it didnt then a new + // edge was added + if (!lowerChildAlreadyExists) { + emit EdgeAdded( + lowerChildAdded.edgeId, + lowerChildAdded.mutualId, + lowerChildAdded.originId, + lowerChildAdded.claimId, + lowerChildAdded.length, + lowerChildAdded.level, + lowerChildAdded.hasRival, + lowerChildAdded.isLayerZero + ); + } + // upper child is always added + emit EdgeAdded( + upperChildAdded.edgeId, + upperChildAdded.mutualId, + upperChildAdded.originId, + upperChildAdded.claimId, + upperChildAdded.length, + upperChildAdded.level, + upperChildAdded.hasRival, + upperChildAdded.isLayerZero + ); + + emit EdgeBisected(edgeId, lowerChildId, upperChildAdded.edgeId, lowerChildAlreadyExists); + + return (lowerChildId, upperChildAdded.edgeId); + } + + /// @inheritdoc IEdgeChallengeManager + function multiUpdateTimeCacheByChildren( + bytes32[] calldata edgeIds, + uint256 maximumCachedTime + ) public { + if (edgeIds.length == 0) revert EmptyArray(); + // revert early if the last edge already has sufficient time + store.validateCurrentTimer(edgeIds[edgeIds.length - 1], maximumCachedTime); + for (uint256 i = 0; i < edgeIds.length; i++) { + updateTimerCacheByChildren(edgeIds[i], type(uint256).max); + } + } + + /// @inheritdoc IEdgeChallengeManager + function updateTimerCacheByChildren(bytes32 edgeId, uint256 maximumCachedTime) public { + (bool updated, uint256 newValue) = + store.updateTimerCacheByChildren(edgeId, maximumCachedTime); + if (updated) emit TimerCacheUpdated(edgeId, newValue); + } + + /// @inheritdoc IEdgeChallengeManager + function updateTimerCacheByClaim( + bytes32 edgeId, + bytes32 claimingEdgeId, + uint256 maximumCachedTime + ) public { + (bool updated, uint256 newValue) = store.updateTimerCacheByClaim( + edgeId, claimingEdgeId, NUM_BIGSTEP_LEVEL, maximumCachedTime + ); + if (updated) emit TimerCacheUpdated(edgeId, newValue); + } + + /// @inheritdoc IEdgeChallengeManager + function confirmEdgeByTime(bytes32 edgeId, AssertionStateData calldata claimStateData) public { + ChallengeEdge storage topEdge = store.get(edgeId); + if (!topEdge.isLayerZero()) { + revert EdgeNotLayerZero(topEdge.id(), topEdge.staker, topEdge.claimId); + } + + uint64 assertionBlocks = 0; + // if the edge is block level and the assertion being claimed against was the first child of its predecessor + // then we are able to count the time between the first and second child as time towards + // the this edge + bool isBlockLevel = + ChallengeEdgeLib.levelToType(topEdge.level, NUM_BIGSTEP_LEVEL) == EdgeType.Block; + if (isBlockLevel && assertionChain.isFirstChild(topEdge.claimId)) { + assertionChain.validateAssertionHash( + topEdge.claimId, + claimStateData.assertionState, + claimStateData.prevAssertionHash, + claimStateData.inboxAcc + ); + assertionBlocks = assertionChain.getSecondChildCreationBlock( + claimStateData.prevAssertionHash + ) - assertionChain.getFirstChildCreationBlock(claimStateData.prevAssertionHash); + } + + uint256 totalTimeUnrivaled = + store.confirmEdgeByTime(edgeId, assertionBlocks, challengePeriodBlocks); + + emit EdgeConfirmedByTime(edgeId, store.edges[edgeId].mutualId(), totalTimeUnrivaled); + } + + /// @inheritdoc IEdgeChallengeManager + function confirmEdgeByOneStepProof( + bytes32 edgeId, + OneStepData calldata oneStepData, + ConfigData calldata prevConfig, + bytes32[] calldata beforeHistoryInclusionProof, + bytes32[] calldata afterHistoryInclusionProof + ) public { + bytes32 prevAssertionHash = store.getPrevAssertionHash(edgeId); + + assertionChain.validateConfig(prevAssertionHash, prevConfig); + + ExecutionContext memory execCtx = ExecutionContext({ + maxInboxMessagesRead: prevConfig.nextInboxPosition, + bridge: assertionChain.bridge(), + initialWasmModuleRoot: prevConfig.wasmModuleRoot + }); + + store.confirmEdgeByOneStepProof( + edgeId, + oneStepProofEntry, + oneStepData, + execCtx, + beforeHistoryInclusionProof, + afterHistoryInclusionProof, + NUM_BIGSTEP_LEVEL, + LAYERZERO_BIGSTEPEDGE_HEIGHT, + LAYERZERO_SMALLSTEPEDGE_HEIGHT + ); + + emit EdgeConfirmedByOneStepProof(edgeId, store.edges[edgeId].mutualId()); + } + + /// @inheritdoc IEdgeChallengeManager + function refundStake( + bytes32 edgeId + ) public { + ChallengeEdge storage edge = store.get(edgeId); + // setting refunded also do checks that the edge cannot be refunded twice + edge.setRefunded(); + + IERC20 st = stakeToken; + uint256 sa = stakeAmounts[edge.level]; + // no need to refund with the token or amount where zero'd out + if (address(st) != address(0) && sa != 0) { + st.safeTransfer(edge.staker, sa); + } + + emit EdgeRefunded(edgeId, store.edges[edgeId].mutualId(), address(st), sa); + } + + /////////////////////// + // VIEW ONLY SECTION // + /////////////////////// + /// @inheritdoc IEdgeChallengeManager + function getLayerZeroEndHeight( + EdgeType eType + ) public view returns (uint256) { + if (eType == EdgeType.Block) { + return LAYERZERO_BLOCKEDGE_HEIGHT; + } else if (eType == EdgeType.BigStep) { + return LAYERZERO_BIGSTEPEDGE_HEIGHT; + } else if (eType == EdgeType.SmallStep) { + return LAYERZERO_SMALLSTEPEDGE_HEIGHT; + } else { + revert InvalidEdgeType(eType); + } + } + + /// @inheritdoc IEdgeChallengeManager + function calculateEdgeId( + uint8 level, + bytes32 originId, + uint256 startHeight, + bytes32 startHistoryRoot, + uint256 endHeight, + bytes32 endHistoryRoot + ) public pure returns (bytes32) { + return ChallengeEdgeLib.idComponent( + level, originId, startHeight, startHistoryRoot, endHeight, endHistoryRoot + ); + } + + /// @inheritdoc IEdgeChallengeManager + function calculateMutualId( + uint8 level, + bytes32 originId, + uint256 startHeight, + bytes32 startHistoryRoot, + uint256 endHeight + ) public pure returns (bytes32) { + return ChallengeEdgeLib.mutualIdComponent( + level, originId, startHeight, startHistoryRoot, endHeight + ); + } + + /// @inheritdoc IEdgeChallengeManager + function edgeExists( + bytes32 edgeId + ) public view returns (bool) { + return store.edges[edgeId].exists(); + } + + /// @inheritdoc IEdgeChallengeManager + function getEdge( + bytes32 edgeId + ) public view returns (ChallengeEdge memory) { + return store.get(edgeId); + } + + /// @inheritdoc IEdgeChallengeManager + function edgeLength( + bytes32 edgeId + ) public view returns (uint256) { + return store.get(edgeId).length(); + } + + /// @inheritdoc IEdgeChallengeManager + function hasRival( + bytes32 edgeId + ) public view returns (bool) { + return store.hasRival(edgeId); + } + + /// @inheritdoc IEdgeChallengeManager + function confirmedRival( + bytes32 mutualId + ) public view returns (bytes32) { + return store.confirmedRivals[mutualId]; + } + + /// @inheritdoc IEdgeChallengeManager + function hasLengthOneRival( + bytes32 edgeId + ) public view returns (bool) { + return store.hasLengthOneRival(edgeId); + } + + /// @inheritdoc IEdgeChallengeManager + function timeUnrivaled( + bytes32 edgeId + ) public view returns (uint256) { + return store.timeUnrivaled(edgeId); + } + + /// @inheritdoc IEdgeChallengeManager + function getPrevAssertionHash( + bytes32 edgeId + ) public view returns (bytes32) { + return store.getPrevAssertionHash(edgeId); + } + + /// @inheritdoc IEdgeChallengeManager + function firstRival( + bytes32 mutualId + ) public view returns (bytes32) { + return store.firstRivals[mutualId]; + } + + /// @inheritdoc IEdgeChallengeManager + function hasMadeLayerZeroRival( + address account, + bytes32 mutualId + ) external view returns (bool) { + return store.hasMadeLayerZeroRival[account][mutualId]; + } +} diff --git a/src/challengeV2/IAssertionChain.sol b/src/challengeV2/IAssertionChain.sol new file mode 100644 index 00000000..b21d4221 --- /dev/null +++ b/src/challengeV2/IAssertionChain.sol @@ -0,0 +1,39 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "../bridge/IBridge.sol"; +import "../osp/IOneStepProofEntry.sol"; +import "../rollup/Assertion.sol"; + +/// @title Assertion chain interface +/// @notice The interface required by the EdgeChallengeManager for requesting assertion data from the AssertionChain +interface IAssertionChain { + function bridge() external view returns (IBridge); + function validateAssertionHash( + bytes32 assertionHash, + AssertionState calldata state, + bytes32 prevAssertionHash, + bytes32 inboxAcc + ) external view; + function validateConfig(bytes32 assertionHash, ConfigData calldata configData) external view; + function getFirstChildCreationBlock( + bytes32 assertionHash + ) external view returns (uint64); + function getSecondChildCreationBlock( + bytes32 assertionHash + ) external view returns (uint64); + function isFirstChild( + bytes32 assertionHash + ) external view returns (bool); + function isPending( + bytes32 assertionHash + ) external view returns (bool); + function isValidator( + address + ) external view returns (bool); + function getValidators() external view returns (address[] memory); + function validatorWhitelistDisabled() external view returns (bool); +} diff --git a/src/challengeV2/libraries/ArrayUtilsLib.sol b/src/challengeV2/libraries/ArrayUtilsLib.sol new file mode 100644 index 00000000..f8c38b9a --- /dev/null +++ b/src/challengeV2/libraries/ArrayUtilsLib.sol @@ -0,0 +1,61 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +/// @title Array utils library +/// @notice Utils for working with bytes32 arrays +library ArrayUtilsLib { + /// @notice Append an item to the end of an array + /// @param arr The array to append to + /// @param newItem The item to append + function append( + bytes32[] memory arr, + bytes32 newItem + ) internal pure returns (bytes32[] memory) { + bytes32[] memory clone = new bytes32[](arr.length + 1); + for (uint256 i = 0; i < arr.length; i++) { + clone[i] = arr[i]; + } + clone[clone.length - 1] = newItem; + return clone; + } + + /// @notice Get a slice of an existing array + /// @dev End index exlusive so slice(arr, 0, 5) gets the first 5 elements of arr + /// @param arr Array to slice + /// @param startIndex The start index of the slice in the original array - inclusive + /// @param endIndex The end index of the slice in the original array - exlusive + function slice( + bytes32[] memory arr, + uint256 startIndex, + uint256 endIndex + ) internal pure returns (bytes32[] memory) { + require(startIndex < endIndex, "Start not less than end"); + require(endIndex <= arr.length, "End not less or equal than length"); + + bytes32[] memory newArr = new bytes32[](endIndex - startIndex); + for (uint256 i = startIndex; i < endIndex; i++) { + newArr[i - startIndex] = arr[i]; + } + return newArr; + } + + /// @notice Concatenated to arrays + /// @param arr1 First array + /// @param arr1 Second array + function concat( + bytes32[] memory arr1, + bytes32[] memory arr2 + ) internal pure returns (bytes32[] memory) { + bytes32[] memory full = new bytes32[](arr1.length + arr2.length); + for (uint256 i = 0; i < arr1.length; i++) { + full[i] = arr1[i]; + } + for (uint256 i = 0; i < arr2.length; i++) { + full[arr1.length + i] = arr2[i]; + } + return full; + } +} diff --git a/src/challengeV2/libraries/ChallengeEdgeLib.sol b/src/challengeV2/libraries/ChallengeEdgeLib.sol new file mode 100644 index 00000000..af4e9293 --- /dev/null +++ b/src/challengeV2/libraries/ChallengeEdgeLib.sol @@ -0,0 +1,333 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "./Enums.sol"; +import "./ChallengeErrors.sol"; + +/// @notice An edge committing to a range of states. These edges will be bisected, slowly +/// reducing them in length until they reach length one. At that point new edges of a different +/// level will be added that claim the result of this edge, or a one step proof will be calculated +/// if the edge level is already of type SmallStep. +struct ChallengeEdge { + /// @notice The origin id is a link from the edge to an edge or assertion at a lower level. + /// Intuitively all edges with the same origin id agree on the information committed to in the origin id + /// For a SmallStep edge the origin id is the 'mutual' id of the length one BigStep edge being claimed by the zero layer ancestors of this edge + /// For a BigStep edge the origin id is the 'mutual' id of the length one Block edge being claimed by the zero layer ancestors of this edge + /// For a Block edge the origin id is the assertion hash of the assertion that is the root of the challenge - all edges in this challenge agree + /// that that assertion hash is valid. + /// The purpose of the origin id is to ensure that only edges that agree on a common start position + /// are being compared against one another. + bytes32 originId; + /// @notice A root of all the states in the history up to the startHeight + bytes32 startHistoryRoot; + /// @notice The height of the start history root + uint256 startHeight; + /// @notice A root of all the states in the history up to the endHeight. Since endHeight > startHeight, the startHistoryRoot must + /// commit to a prefix of the states committed to by the endHistoryRoot + bytes32 endHistoryRoot; + /// @notice The height of the end history root + uint256 endHeight; + /// @notice Edges can be bisected into two children. If this edge has been bisected the id of the + /// lower child is populated here, until that time this value is 0. The lower child has startHistoryRoot and startHeight + /// equal to this edge, but endHistoryRoot and endHeight equal to some prefix of the endHistoryRoot of this edge + bytes32 lowerChildId; + /// @notice Edges can be bisected into two children. If this edge has been bisected the id of the + /// upper child is populated here, until that time this value is 0. The upper child has startHistoryRoot and startHeight + /// equal to some prefix of the endHistoryRoot of this edge, and endHistoryRoot and endHeight equal to this edge + bytes32 upperChildId; + /// @notice The edge or assertion in the upper level that this edge claims to be true. + /// Only populated on zero layer edges + bytes32 claimId; + /// @notice The entity that supplied a mini-stake accompanying this edge + /// Only populated on zero layer edges + address staker; + /// @notice The block number when this edge was created + uint64 createdAtBlock; + /// @notice The block number at which this edge was confirmed + /// Zero if not confirmed + uint64 confirmedAtBlock; + /// @notice Current status of this edge. All edges are created Pending, and may be updated to Confirmed + /// Once Confirmed they cannot transition back to Pending + EdgeStatus status; + /// @notice The level of this edge. + /// Level 0 is type Block + /// Last level (defined by NUM_BIGSTEP_LEVEL + 1) is type SmallStep + /// All levels in between are of type BigStep + uint8 level; + /// @notice Set to true when the staker has been refunded. Can only be set to true if the status is Confirmed + /// and the staker is non zero. + bool refunded; + /// @notice TODO + uint64 totalTimeUnrivaledCache; +} + +library ChallengeEdgeLib { + /// @notice Common checks to do when adding an edge + function newEdgeChecks( + bytes32 originId, + bytes32 startHistoryRoot, + uint256 startHeight, + bytes32 endHistoryRoot, + uint256 endHeight + ) internal pure { + if (originId == 0) { + revert EmptyOriginId(); + } + if (endHeight <= startHeight) { + revert InvalidHeights(startHeight, endHeight); + } + if (startHistoryRoot == 0) { + revert EmptyStartRoot(); + } + if (endHistoryRoot == 0) { + revert EmptyEndRoot(); + } + } + + /// @notice Create a new layer zero edge. These edges make claims about length one edges in the level + /// below. Creating a layer zero edge also requires placing a mini stake, so information + /// about that staker is also stored on this edge. + function newLayerZeroEdge( + bytes32 originId, + bytes32 startHistoryRoot, + uint256 startHeight, + bytes32 endHistoryRoot, + uint256 endHeight, + bytes32 claimId, + address staker, + uint8 level + ) internal view returns (ChallengeEdge memory) { + if (staker == address(0)) { + revert EmptyStaker(); + } + if (claimId == 0) { + revert EmptyClaimId(); + } + + newEdgeChecks(originId, startHistoryRoot, startHeight, endHistoryRoot, endHeight); + + return ChallengeEdge({ + originId: originId, + startHeight: startHeight, + startHistoryRoot: startHistoryRoot, + endHeight: endHeight, + endHistoryRoot: endHistoryRoot, + lowerChildId: 0, + upperChildId: 0, + createdAtBlock: uint64(block.number), + claimId: claimId, + staker: staker, + status: EdgeStatus.Pending, + level: level, + refunded: false, + confirmedAtBlock: 0, + totalTimeUnrivaledCache: 0 + }); + } + + /// @notice Creates a new child edge. All edges except layer zero edges are child edges. + /// These are edges that are created by bisection, and have parents rather than claims. + function newChildEdge( + bytes32 originId, + bytes32 startHistoryRoot, + uint256 startHeight, + bytes32 endHistoryRoot, + uint256 endHeight, + uint8 level + ) internal view returns (ChallengeEdge memory) { + newEdgeChecks(originId, startHistoryRoot, startHeight, endHistoryRoot, endHeight); + + return ChallengeEdge({ + originId: originId, + startHeight: startHeight, + startHistoryRoot: startHistoryRoot, + endHeight: endHeight, + endHistoryRoot: endHistoryRoot, + lowerChildId: 0, + upperChildId: 0, + createdAtBlock: uint64(block.number), + claimId: 0, + staker: address(0), + status: EdgeStatus.Pending, + level: level, + refunded: false, + confirmedAtBlock: 0, + totalTimeUnrivaledCache: 0 + }); + } + + /// @notice The "mutualId" of an edge. A mutual id is a hash of all the data that is shared by rivals. + /// Rivals have the same start height, start history root and end height. They also have the same origin id and level. + /// The difference between rivals is that they have a different endHistoryRoot, so that information + /// is not included in this hash. + function mutualIdComponent( + uint8 level, + bytes32 originId, + uint256 startHeight, + bytes32 startHistoryRoot, + uint256 endHeight + ) internal pure returns (bytes32) { + return + keccak256(abi.encodePacked(level, originId, startHeight, startHistoryRoot, endHeight)); + } + + /// @notice The "mutualId" of an edge. A mutual id is a hash of all the data that is shared by rivals. + /// Rivals have the same start height, start history root and end height. They also have the same origin id and level. + /// The difference between rivals is that they have a different endHistoryRoot, so that information + /// is not included in this hash. + function mutualId( + ChallengeEdge storage ce + ) internal view returns (bytes32) { + return mutualIdComponent( + ce.level, ce.originId, ce.startHeight, ce.startHistoryRoot, ce.endHeight + ); + } + + function mutualIdMem( + ChallengeEdge memory ce + ) internal pure returns (bytes32) { + return mutualIdComponent( + ce.level, ce.originId, ce.startHeight, ce.startHistoryRoot, ce.endHeight + ); + } + + /// @notice The id of an edge. Edges are uniquely identified by their id, and commit to the same information + function idComponent( + uint8 level, + bytes32 originId, + uint256 startHeight, + bytes32 startHistoryRoot, + uint256 endHeight, + bytes32 endHistoryRoot + ) internal pure returns (bytes32) { + return keccak256( + abi.encodePacked( + mutualIdComponent(level, originId, startHeight, startHistoryRoot, endHeight), + endHistoryRoot + ) + ); + } + + /// @notice The id of an edge. Edges are uniquely identified by their id, and commit to the same information + /// @dev This separate idMem method is to be explicit about when ChallengeEdges are copied into memory. It is + /// possible to pass a storage edge to this method and the id be computed correctly, but that would load + /// the whole struct into memory, so we're explicit here that this should be used for edges already in memory. + function idMem( + ChallengeEdge memory edge + ) internal pure returns (bytes32) { + return idComponent( + edge.level, + edge.originId, + edge.startHeight, + edge.startHistoryRoot, + edge.endHeight, + edge.endHistoryRoot + ); + } + + /// @notice The id of an edge. Edges are uniquely identified by their id, and commit to the same information + function id( + ChallengeEdge storage edge + ) internal view returns (bytes32) { + return idComponent( + edge.level, + edge.originId, + edge.startHeight, + edge.startHistoryRoot, + edge.endHeight, + edge.endHistoryRoot + ); + } + + /// @notice Does this edge exist in storage + function exists( + ChallengeEdge storage edge + ) internal view returns (bool) { + // All edges have a createdAtBlock number + return edge.createdAtBlock != 0; + } + + /// @notice The length of this edge - difference between the start and end heights + function length( + ChallengeEdge storage edge + ) internal view returns (uint256) { + uint256 len = edge.endHeight - edge.startHeight; + // It's impossible for a zero length edge to exist + if (len == 0) { + revert EdgeNotExists(ChallengeEdgeLib.id(edge)); + } + return len; + } + + /// @notice Set the children of an edge + /// @dev Children can only be set once + function setChildren( + ChallengeEdge storage edge, + bytes32 lowerChildId, + bytes32 upperChildId + ) internal { + if (edge.lowerChildId != 0 || edge.upperChildId != 0) { + revert ChildrenAlreadySet( + ChallengeEdgeLib.id(edge), edge.lowerChildId, edge.upperChildId + ); + } + edge.lowerChildId = lowerChildId; + edge.upperChildId = upperChildId; + } + + /// @notice Set the status of an edge to Confirmed + /// @dev Only Pending edges can be confirmed + function setConfirmed( + ChallengeEdge storage edge + ) internal { + if (edge.status != EdgeStatus.Pending) { + revert EdgeNotPending(ChallengeEdgeLib.id(edge), edge.status); + } + edge.status = EdgeStatus.Confirmed; + edge.confirmedAtBlock = uint64(block.number); + } + + /// @notice Is the edge a layer zero edge. + function isLayerZero( + ChallengeEdge storage edge + ) internal view returns (bool) { + return edge.claimId != 0 && edge.staker != address(0); + } + + /// @notice Set the refunded flag of an edge + /// @dev Checks internally that edge is confirmed, layer zero edge and hasnt been refunded already + function setRefunded( + ChallengeEdge storage edge + ) internal { + if (edge.status != EdgeStatus.Confirmed) { + revert EdgeNotConfirmed(ChallengeEdgeLib.id(edge), edge.status); + } + if (!isLayerZero(edge)) { + revert EdgeNotLayerZero(ChallengeEdgeLib.id(edge), edge.staker, edge.claimId); + } + if (edge.refunded == true) { + revert EdgeAlreadyRefunded(ChallengeEdgeLib.id(edge)); + } + + edge.refunded = true; + } + + /// @notice Returns the edge type for a given level, given the total number of big step levels + function levelToType( + uint8 level, + uint8 numBigStepLevels + ) internal pure returns (EdgeType eType) { + if (level == 0) { + return EdgeType.Block; + } else if (level <= numBigStepLevels) { + return EdgeType.BigStep; + } else if (level == numBigStepLevels + 1) { + return EdgeType.SmallStep; + } else { + revert LevelTooHigh(level, numBigStepLevels); + } + } +} diff --git a/src/challengeV2/libraries/ChallengeErrors.sol b/src/challengeV2/libraries/ChallengeErrors.sol new file mode 100644 index 00000000..812406ab --- /dev/null +++ b/src/challengeV2/libraries/ChallengeErrors.sol @@ -0,0 +1,108 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "./Enums.sol"; + +/// @dev The edge is not currently stored +error EdgeNotExists(bytes32 edgeId); +/// @dev The edge has already been stored +error EdgeAlreadyExists(bytes32 edgeId); +/// @dev The provided assertion hash was empty +error AssertionHashEmpty(); +/// @dev The assertion hashes are not the same, but should have been +error AssertionHashMismatch(bytes32 h1, bytes32 h2); +/// @dev The assertion is not currently pending +error AssertionNotPending(); +/// @dev The assertion has no sibling +error AssertionNoSibling(); +/// @dev The edge type specific proof data is empty +error EmptyEdgeSpecificProof(); +/// @dev The start machine status is empty +error EmptyStartMachineStatus(); +/// @dev The end machine status is empty +error EmptyEndMachineStatus(); +/// @dev The claim edge is not pending +error ClaimEdgeNotPending(); +/// @dev The claim edge does not have a length one rival +error ClaimEdgeNotLengthOneRival(bytes32 claimId); +/// @dev The claim edge has an invalid level +error ClaimEdgeInvalidLevel(uint8 argLevel, uint8 claimLevel); +/// @dev The val is not a power of two +error NotPowerOfTwo(uint256 val); +/// @dev The height has an unexpected value +error InvalidEndHeight(uint256 actualHeight, uint256 expectedHeight); +/// @dev The prefix proof is empty +error EmptyPrefixProof(); +/// @dev The edge is not of type SmallStep +error EdgeTypeNotSmallStep(uint8 level); +/// @dev The first rival record is empty +error EmptyFirstRival(); +/// @dev The difference between two heights is less than 2 +error HeightDiffLtTwo(uint256 h1, uint256 h2); +/// @dev The edge is not pending +error EdgeNotPending(bytes32 edgeId, EdgeStatus status); +/// @dev The edge is unrivaled +error EdgeUnrivaled(bytes32 edgeId); +/// @dev The edge is not confirmed +error EdgeNotConfirmed(bytes32 edgeId, EdgeStatus); +/// @dev The edge level is unexpected +error EdgeLevelInvalid(bytes32 edgeId1, bytes32 edgeId2, uint8 level1, uint8 level2); +/// @dev The claim id on the claimingEdge does not match the provided edge id +error EdgeClaimMismatch(bytes32 edgeId, bytes32 claimingEdgeId); +/// @dev The origin id is not equal to the mutual id +error OriginIdMutualIdMismatch(bytes32 mutualId, bytes32 originId); +/// @dev The total number of blocks is not above the threshold +error InsufficientConfirmationBlocks(uint256 totalBlocks, uint256 thresholdBlocks); +/// @dev The edge is not of length one +error EdgeNotLengthOne(uint256 length); +/// @dev No origin id supplied when creating an edge +error EmptyOriginId(); +/// @dev Invalid heights supplied when creating an edge +error InvalidHeights(uint256 start, uint256 end); +/// @dev No start root supplied when creating an edge +error EmptyStartRoot(); +/// @dev No end root supplied when creating an edge +error EmptyEndRoot(); +/// @dev No staker supplied when creating a layer zero edge +error EmptyStaker(); +/// @dev No claim id supplied when creating a layer zero edge +error EmptyClaimId(); +/// @dev Children already set on edge +error ChildrenAlreadySet(bytes32 edgeId, bytes32 lowerChildId, bytes32 upperChildId); +/// @dev Edge is not a layer zero edge +error EdgeNotLayerZero(bytes32 edgeId, address staker, bytes32 claimId); +/// @dev The edge staker has already been refunded +error EdgeAlreadyRefunded(bytes32 edgeId); +/// @dev No assertion chain address supplied +error EmptyAssertionChain(); +/// @dev No one step proof entry address supplied +error EmptyOneStepProofEntry(); +/// @dev No challenge period supplied +error EmptyChallengePeriod(); +/// @dev No stake receiver address supplied +error EmptyStakeReceiver(); +/// @dev Stake amounts does not match number of levels +error StakeAmountsMismatch(uint256 stakeLevels, uint256 numLevels); +/// @dev A rival edge is already confirmed +error RivalEdgeConfirmed(bytes32 edgeId, bytes32 confirmedRivalId); +/// @dev Thrown when big step levels is set to 0 +error ZeroBigStepLevels(); +/// @dev Thrown when there are too many big step levels requested +error BigStepLevelsTooMany(uint8 levels); +/// @dev Thrown when the level does not correspond to a valid type +error LevelTooHigh(uint8 level, uint8 numBigStepLevels); +/// @dev Thrown for unrecognised edge types +error InvalidEdgeType(EdgeType edgeType); +/// @dev Thrown when endHistoryRoot not matching the assertion +error EndHistoryRootMismatch(bytes32 endHistoryRoot, bytes32 assertionEndRoot); +/// @dev Thrown when the validator whitelist is enabled and the account attempting to create a layer zero edge is not whitelisted +error NotValidator(address account); +/// @dev Thrown when an account has already created a rivalling layer zero edge +error AccountHasMadeLayerZeroRival(address account, bytes32 mutualId); +/// @dev Thrown when the cached time is already sufficient +error CachedTimeSufficient(uint256 actual, uint256 expected); +/// @dev Thrown when the input is an empty array +error EmptyArray(); diff --git a/src/challengeV2/libraries/EdgeChallengeManagerLib.sol b/src/challengeV2/libraries/EdgeChallengeManagerLib.sol new file mode 100644 index 00000000..52695f2b --- /dev/null +++ b/src/challengeV2/libraries/EdgeChallengeManagerLib.sol @@ -0,0 +1,930 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "./UintUtilsLib.sol"; +import "./MerkleTreeAccumulatorLib.sol"; +import "./ChallengeEdgeLib.sol"; +import "../../osp/IOneStepProofEntry.sol"; +import "../../rollup/AssertionState.sol"; +import "../../libraries/Constants.sol"; +import "./ChallengeErrors.sol"; + +/// @notice An execution state and proof to show that it's valid +struct AssertionStateData { + /// @notice An execution state + AssertionState assertionState; + /// @notice assertion Hash of the prev assertion + bytes32 prevAssertionHash; + /// @notice Inbox accumulator of the assertion + bytes32 inboxAcc; +} + +/// @notice Data for creating a layer zero edge +struct CreateEdgeArgs { + /// @notice The level of edge to be created. Challenges are decomposed into multiple levels. + /// The first (level 0) being of type Block, followed by n (set by NUM_BIGSTEP_LEVEL) levels of type BigStep, and finally + /// followed by a single level of type SmallStep. Each level is bisected until an edge + /// of length one is reached before proceeding to the next level. The first edge in each level (the layer zero edge) + /// makes a claim about an assertion or assertion in the lower level. + /// Finally in the last level, a SmallStep edge is added that claims a lower level length one BigStep edge, and these + /// SmallStep edges are bisected until they reach length one. A length one small step edge + /// can then be directly executed using a one-step proof. + uint8 level; + /// @notice The end history root of the edge to be created + bytes32 endHistoryRoot; + /// @notice The end height of the edge to be created. + /// @dev End height is deterministic for different levels but supplying it here gives the + /// caller a bit of extra security that they are supplying data for the correct level of edge + uint256 endHeight; + /// @notice The edge, or assertion, that is being claimed correct by the newly created edge. + bytes32 claimId; + /// @notice Proof that the start history root commits to a prefix of the states that + /// end history root commits to + bytes prefixProof; + /// @notice Edge type specific data + /// For Block type edges this is the abi encoding of: + /// bytes32[]: Inclusion proof - proof to show that the end state is the last state in the end history root + /// AssertionStateData: the before state of the edge + /// AssertionStateData: the after state of the edge + /// bytes32 predecessorId: id of the prev assertion + /// bytes32 inboxAcc: the inbox accumulator of the assertion + /// For BigStep and SmallStep edges this is the abi encoding of: + /// bytes32: Start state - first state the edge commits to + /// bytes32: End state - last state the edge commits to + /// bytes32[]: Claim start inclusion proof - proof to show the start state is the first state in the claim edge + /// bytes32[]: Claim end inclusion proof - proof to show the end state is the last state in the claim edge + /// bytes32[]: Inclusion proof - proof to show that the end state is the last state in the end history root + bytes proof; +} + +/// @notice Data parsed raw proof data +struct ProofData { + /// @notice The first state being committed to by an edge + bytes32 startState; + /// @notice The last state being committed to by an edge + bytes32 endState; + /// @notice A proof that the end state is included in the edge + bytes32[] inclusionProof; +} + +/// @notice Stores all edges and their rival status +struct EdgeStore { + /// @notice A mapping of edge id to edges. Edges are never deleted, only created, and potentially confirmed. + mapping(bytes32 => ChallengeEdge) edges; + /// @notice A mapping of mutualId to edge id. Rivals share the same mutual id, and here we + /// store the edge id of the second edge that was created with the same mutual id - the first rival + /// When only one edge exists for a specific mutual id then a special magic string hash is stored instead + /// of the first rival id, to signify that a single edge does exist with this mutual id + mapping(bytes32 => bytes32) firstRivals; + /// @notice A mapping of mutualId to the edge id of the confirmed rival with that mutualId + /// @dev Each group of rivals (edges sharing mutual id) can only have at most one confirmed edge + mapping(bytes32 => bytes32) confirmedRivals; + /// @notice A mapping of account -> mutualId -> bool indicating if the account has created a layer zero edge with a mutual id + mapping(address => mapping(bytes32 => bool)) hasMadeLayerZeroRival; +} + +/// @notice Input data to a one step proof +struct OneStepData { + /// @notice The hash of the state that's being executed from + bytes32 beforeHash; + /// @notice Proof data to accompany the execution context + bytes proof; +} + +/// @notice Data about a recently added edge +struct EdgeAddedData { + bytes32 edgeId; + bytes32 mutualId; + bytes32 originId; + bytes32 claimId; + uint256 length; + uint8 level; + bool hasRival; + bool isLayerZero; +} + +/// @notice Data about an assertion that is being claimed by an edge +/// @dev This extra information that is needed in order to verify that a block edge can be created +struct AssertionReferenceData { + /// @notice The id of the assertion - will be used in a sanity check + bytes32 assertionHash; + /// @notice The predecessor of the assertion + bytes32 predecessorId; + /// @notice Is the assertion pending + bool isPending; + /// @notice Does the assertion have a sibling + bool hasSibling; + /// @notice The execution state of the predecessor assertion + AssertionState startState; + /// @notice The execution state of the assertion being claimed + AssertionState endState; +} + +/// @title Core functionality for the Edge Challenge Manager +/// @notice The edge manager library allows edges to be added and bisected, and keeps track of the amount +/// of time an edge remained unrivaled. +library EdgeChallengeManagerLib { + using ChallengeEdgeLib for ChallengeEdge; + using GlobalStateLib for GlobalState; + using AssertionStateLib for AssertionState; + + /// @dev Magic string hash to represent that a edges with a given mutual id have no rivals + bytes32 public constant UNRIVALED = keccak256(abi.encodePacked("UNRIVALED")); + + /// @notice Get an edge from the store + /// @dev Throws if the edge does not exist in the store + /// @param store The edge store to fetch an id from + /// @param edgeId The id of the edge to fetch + function get( + EdgeStore storage store, + bytes32 edgeId + ) internal view returns (ChallengeEdge storage) { + if (!store.edges[edgeId].exists()) { + revert EdgeNotExists(edgeId); + } + return store.edges[edgeId]; + } + + /// @notice Gets an edge from the store without checking if it exists + /// @dev Useful where you already know the edge exists in the store - avoid a storage lookup + /// @param store The edge store to fetch an id from + /// @param edgeId The id of the edge to fetch + function getNoCheck( + EdgeStore storage store, + bytes32 edgeId + ) internal view returns (ChallengeEdge storage) { + return store.edges[edgeId]; + } + + /// @notice Adds a new edge to the store + /// @dev Updates first rival info for later use in calculating time unrivaled + /// @param store The store to add the edge to + /// @param edge The edge to add + function add( + EdgeStore storage store, + ChallengeEdge memory edge + ) internal returns (EdgeAddedData memory) { + bytes32 eId = edge.idMem(); + // add the edge if it doesnt exist already + if (store.edges[eId].exists()) { + revert EdgeAlreadyExists(eId); + } + store.edges[eId] = edge; + + // edges that are rivals share the same mutual id + // we use records of whether a mutual id has ever been added to decide if + // the new edge is a rival. This will later allow us to calculate time an edge + // stayed unrivaled + bytes32 mutualId = ChallengeEdgeLib.mutualIdComponent( + edge.level, edge.originId, edge.startHeight, edge.startHistoryRoot, edge.endHeight + ); + bytes32 firstRival = store.firstRivals[mutualId]; + + // the first time we add a mutual id we store a magic string hash against it + // We do this to distinguish from there being no edges + // with this mutual. And to distinguish it from the first rival, where we + // will use an actual edge id so that we can look up the created when time + // of the first rival, and use it for calculating time unrivaled + if (firstRival == 0) { + store.firstRivals[mutualId] = UNRIVALED; + } else if (firstRival == UNRIVALED) { + store.firstRivals[mutualId] = eId; + } else { + // after we've stored the first rival we dont need to keep a record of any + // other rival edges - they will all have a zero time unrivaled + } + + return EdgeAddedData( + eId, + mutualId, + edge.originId, + edge.claimId, + store.edges[eId].length(), + edge.level, + firstRival != 0, + edge.claimId != 0 + ); + } + + /// @notice Conduct checks that are specific to the edge type. + /// @dev Since different edge types also require different proofs, we also include the specific + /// proof parsing logic and return the common parts for later use. + /// @param store The store containing current edges + /// @param args The edge creation args + /// @param ard Data about the assertion data is is also need to when creating a Block edge type + /// The created edge must be shown to be consistent with the states in the assertion chain + /// Empty for non block edge type edges + /// @param oneStepProofEntry The one step proof contract that defines how machine states are hashed + /// @return Data parsed from the proof, or fetched from elsewhere. Also the origin id for the edge to be created. + function layerZeroTypeSpecificChecks( + EdgeStore storage store, + CreateEdgeArgs calldata args, + AssertionReferenceData memory ard, + IOneStepProofEntry oneStepProofEntry, + uint8 numBigStepLevel + ) private view returns (ProofData memory, bytes32) { + if (ChallengeEdgeLib.levelToType(args.level, numBigStepLevel) == EdgeType.Block) { + // origin id is the assertion which is the root of challenge + // all rivals and their children share the same origin id - it is a link to the information + // they agree on + bytes32 originId = ard.predecessorId; + + // Sanity check: The assertion reference data should be related to the claim + // Of course the caller can provide whatever args they wish, so this is really just a helpful + // check to avoid mistakes + if (ard.assertionHash == 0) { + revert AssertionHashEmpty(); + } + if (ard.assertionHash != args.claimId) { + revert AssertionHashMismatch(ard.assertionHash, args.claimId); + } + + // if the assertion is already confirmed or rejected then it cant be referenced as a claim + if (!ard.isPending) { + revert AssertionNotPending(); + } + + // if the claim doesnt have a sibling then it is undisputed, there's no need + // to open challenge edges for it + if (!ard.hasSibling) { + revert AssertionNoSibling(); + } + + // parse the inclusion proof for later use + if (args.proof.length == 0) { + revert EmptyEdgeSpecificProof(); + } + (bytes32[] memory inclusionProof,,) = + abi.decode(args.proof, (bytes32[], AssertionStateData, AssertionStateData)); + + // check the start and end execution states exist, the block hash entry should be non zero + if (ard.startState.machineStatus == MachineStatus.RUNNING) { + revert EmptyStartMachineStatus(); + } + if (ard.endState.machineStatus == MachineStatus.RUNNING) { + revert EmptyEndMachineStatus(); + } + + // Create machine hashes out of the proven state + bytes32 startStateHash = + oneStepProofEntry.getMachineHash(ard.startState.toExecutionState()); + bytes32 endStateHash = oneStepProofEntry.getMachineHash(ard.endState.toExecutionState()); + + return (ProofData(startStateHash, endStateHash, inclusionProof), originId); + } else { + // Claim must be length one. If it is unrivaled then its unrivaled time is ticking up, so there's + // no need to create claims against it + if (!hasLengthOneRival(store, args.claimId)) { + revert ClaimEdgeNotLengthOneRival(args.claimId); + } + + // hasLengthOneRival checks existance, so we can use getNoCheck + ChallengeEdge storage claimEdge = getNoCheck(store, args.claimId); + + // origin id is the mutual id of the claim + // all rivals and their children share the same origin id - it is a link to the information + // they agree on + bytes32 originId = claimEdge.mutualId(); + + // once a claim is confirmed it's status can never become pending again, so there is no point + // opening a challenge that references it + if (claimEdge.status != EdgeStatus.Pending) { + revert ClaimEdgeNotPending(); + } + + // the edge must be a level up from the claim + if (args.level != nextEdgeLevel(claimEdge.level, numBigStepLevel)) { + revert ClaimEdgeInvalidLevel(args.level, claimEdge.level); + } + + // parse the proofs + if (args.proof.length == 0) { + revert EmptyEdgeSpecificProof(); + } + ( + bytes32 startState, + bytes32 endState, + bytes32[] memory claimStartInclusionProof, + bytes32[] memory claimEndInclusionProof, + bytes32[] memory edgeInclusionProof + ) = abi.decode(args.proof, (bytes32, bytes32, bytes32[], bytes32[], bytes32[])); + + // if the start and end states are consistent with the claim edge + // this guarantees that the edge we're creating is a 'continuation' of the claim edge, it is + // a commitment to the states that between start and end states of the claim + MerkleTreeAccumulatorLib.verifyInclusionProof( + claimEdge.startHistoryRoot, + startState, + claimEdge.startHeight, + claimStartInclusionProof + ); + + // it's doubly important to check the end state since if the end state since the claim id is + // not part of the edge id, so we need to ensure that it's not possible to create two edges of the + // same id, but with different claim id. Ensuring that the end state is linked to the claim, + // and later ensuring that the end state is part of the history commitment of the new edge ensures + // that the end history root of the new edge will be different for different claim ids, and therefore + // the edge ids will be different + MerkleTreeAccumulatorLib.verifyInclusionProof( + claimEdge.endHistoryRoot, endState, claimEdge.endHeight, claimEndInclusionProof + ); + + return (ProofData(startState, endState, edgeInclusionProof), originId); + } + } + + /// @notice Check that a uint is a power of 2 + function isPowerOfTwo( + uint256 x + ) internal pure returns (bool) { + // zero is not a power of 2 + if (x == 0) { + return false; + } + + // if x is a power of 2, then this will be 0111111 + uint256 y = x - 1; + + // if x is a power of 2 then y will share no bits with x + return ((x & y) == 0); + } + + /// @notice Common checks that apply to all layer zero edges + /// @param proofData Data extracted from supplied proof + /// @param args The edge creation args + /// @param expectedEndHeight Edges have a deterministic end height dependent on their level + function layerZeroCommonChecks( + ProofData memory proofData, + CreateEdgeArgs calldata args, + uint256 expectedEndHeight + ) private pure returns (bytes32) { + // since zero layer edges have a start height of zero, we know that they are a size + // one tree containing only the start state. We can then compute the history root directly + bytes32 startHistoryRoot = MerkleTreeAccumulatorLib.root( + MerkleTreeAccumulatorLib.appendLeaf(new bytes32[](0), proofData.startState) + ); + + // all end heights are expected to be a power of 2, the specific power is defined by the + // edge challenge manager itself + if (!isPowerOfTwo(expectedEndHeight)) { + revert NotPowerOfTwo(expectedEndHeight); + } + + // It isnt strictly necessary to pass in the end height, we know what it + // should be so we could just use the end height that we get from getLayerZeroEndHeight + // However it's a nice sanity check for the calling code to check that their local edge + // will have the same height as the one created here + if (args.endHeight != expectedEndHeight) { + revert InvalidEndHeight(args.endHeight, expectedEndHeight); + } + + // the end state is checked/determined as part of the specific edge level + // We then ensure that that same end state is part of the end history root we're creating + // This ensures continuity of states between levels - the state is present in both this + // level and the one below + MerkleTreeAccumulatorLib.verifyInclusionProof( + args.endHistoryRoot, proofData.endState, args.endHeight, proofData.inclusionProof + ); + + // start root must always be a prefix of end root, we ensure that + // this new edge adheres to this. Future bisections will ensure that this + // property is conserved + if (args.prefixProof.length == 0) { + revert EmptyPrefixProof(); + } + (bytes32[] memory preExpansion, bytes32[] memory preProof) = + abi.decode(args.prefixProof, (bytes32[], bytes32[])); + MerkleTreeAccumulatorLib.verifyPrefixProof( + startHistoryRoot, 1, args.endHistoryRoot, args.endHeight + 1, preExpansion, preProof + ); + + return (startHistoryRoot); + } + + /// @notice Creates a new layer zero edges from edge creation args + function toLayerZeroEdge( + bytes32 originId, + bytes32 startHistoryRoot, + CreateEdgeArgs calldata args + ) private view returns (ChallengeEdge memory) { + return ChallengeEdgeLib.newLayerZeroEdge( + originId, + startHistoryRoot, + 0, + args.endHistoryRoot, + args.endHeight, + args.claimId, + msg.sender, + args.level + ); + } + + /// @notice Performs necessary checks and creates a new layer zero edge + /// @param store The store containing existing edges + /// @param args Edge data + /// @param ard If the edge being added is of Block type then additional assertion data is required + /// to check if the edge can be added. Empty if edge is not of type Block. + /// The supplied assertion data must be related to the assertion that is being claimed + /// by the supplied edge args + /// @param oneStepProofEntry The one step proof contract that defines how machine states are hashed + /// @param expectedEndHeight The expected end height of an edge. Layer zero block edges have predefined heights. + /// @param numBigStepLevel The number of big step levels in this challenge + function createLayerZeroEdge( + EdgeStore storage store, + CreateEdgeArgs calldata args, + AssertionReferenceData memory ard, + IOneStepProofEntry oneStepProofEntry, + uint256 expectedEndHeight, + uint8 numBigStepLevel, + bool whitelistEnabled + ) internal returns (EdgeAddedData memory) { + // each edge type requires some specific checks + (ProofData memory proofData, bytes32 originId) = + layerZeroTypeSpecificChecks(store, args, ard, oneStepProofEntry, numBigStepLevel); + // all edge types share some common checks + (bytes32 startHistoryRoot) = layerZeroCommonChecks(proofData, args, expectedEndHeight); + // we only wrap the struct creation in a function as doing so with exceeds the stack limit + ChallengeEdge memory ce = toLayerZeroEdge(originId, startHistoryRoot, args); + + // if the validator whitelist is enabled, we can enforce that a single party cannot create two layer zero edges that rival each other + // if the validator whitelist is disabled, this check serves no purpose since an attacker can create new accounts + if (whitelistEnabled) { + bytes32 mutualId = ce.mutualIdMem(); + if (store.hasMadeLayerZeroRival[msg.sender][mutualId]) { + revert AccountHasMadeLayerZeroRival(msg.sender, mutualId); + } + store.hasMadeLayerZeroRival[msg.sender][mutualId] = true; + } + + return add(store, ce); + } + + /// @notice From any given edge, get the id of the previous assertion + /// @param edgeId The edge to get the prev assertion hash + function getPrevAssertionHash( + EdgeStore storage store, + bytes32 edgeId + ) internal view returns (bytes32) { + ChallengeEdge storage edge = get(store, edgeId); + while (edge.level > 0) { + // the origin id gives us a link to the lower level + // we know a first rival must exist, since otherwise we would not have had a one step fork + // and we wouldnt be able to go to the next level + // we can use the first rival to get an edge id, and from there get the next origin id + bytes32 lowerLevelId = store.firstRivals[edge.originId]; + edge = get(store, lowerLevelId); + } + + // For Block type edges the origin id is the assertion hash of claim prev + return edge.originId; + } + + /// @notice Does this edge currently have one or more rivals + /// Rival edges share the same startHeight, startHistoryCommitment and the same endHeight, + /// but they have a different endHistoryRoot. Rival edges have the same mutualId + /// @param store The edge store containing the edge + /// @param edgeId The edge if to test if it is unrivaled + function hasRival(EdgeStore storage store, bytes32 edgeId) internal view returns (bool) { + if (!store.edges[edgeId].exists()) { + revert EdgeNotExists(edgeId); + } + + // rivals have the same mutual id + bytes32 mutualId = store.edges[edgeId].mutualId(); + bytes32 firstRival = store.firstRivals[mutualId]; + // Sanity check: it should never be possible to create an edge without having an entry in firstRivals + if (firstRival == 0) { + revert EmptyFirstRival(); + } + + // can only have no rival if the firstRival is the UNRIVALED magic hash + return firstRival != UNRIVALED; + } + + /// @notice Is the edge a single step in length, and does it have at least one rival. + /// @param store The edge store containing the edge + /// @param edgeId The edge id to test for single step and rivaled + function hasLengthOneRival( + EdgeStore storage store, + bytes32 edgeId + ) internal view returns (bool) { + // must be length 1 and have rivals - all rivals have the same length + return (hasRival(store, edgeId) && store.edges[edgeId].length() == 1); + } + + function timeUnrivaledTotal( + EdgeStore storage store, + bytes32 edgeId + ) internal view returns (uint256) { + uint256 totalTimeUnrivaled = timeUnrivaled(store, edgeId); + if (store.edges[edgeId].lowerChildId != bytes32(0)) { + uint256 lowerTimer = + store.edges[store.edges[edgeId].lowerChildId].totalTimeUnrivaledCache; + uint256 upperTimer = + store.edges[store.edges[edgeId].upperChildId].totalTimeUnrivaledCache; + totalTimeUnrivaled += lowerTimer < upperTimer ? lowerTimer : upperTimer; + } + return totalTimeUnrivaled; + } + + /// @dev revert if the current totalTimeUnrivaledCache on the edge is greater than or equal to maximumCachedTime + /// @return the current totalTimeUnrivaledCache on the edge + function validateCurrentTimer( + EdgeStore storage store, + bytes32 edgeId, + uint256 maximumCachedTime + ) internal view returns (uint256) { + uint256 currentAccuTimer = store.edges[edgeId].totalTimeUnrivaledCache; + if (currentAccuTimer >= maximumCachedTime) { + revert CachedTimeSufficient(currentAccuTimer, maximumCachedTime); + } + return currentAccuTimer; + } + + /// @notice Update the timer cache for an edge + /// @dev The cache is only updated if the new value is greater than the current value. + /// If the new value is greater than uint64 max then the cache is set to uint64 max + /// @return (bool, uint256) A boolean indicating if the cache was updated, and the value of the cache + function updateTimerCache( + EdgeStore storage store, + bytes32 edgeId, + uint256 newValue, + uint256 maximumCachedTime + ) internal returns (bool, uint256) { + uint256 currentAccuTimer = validateCurrentTimer(store, edgeId, maximumCachedTime); + newValue = newValue > type(uint64).max ? type(uint64).max : newValue; + // only update when increased + if (newValue > currentAccuTimer) { + store.edges[edgeId].totalTimeUnrivaledCache = uint64(newValue); + return (true, newValue); + } + return (false, currentAccuTimer); + } + + function updateTimerCacheByChildren( + EdgeStore storage store, + bytes32 edgeId, + uint256 maximumCachedTime + ) internal returns (bool, uint256) { + return updateTimerCache(store, edgeId, timeUnrivaledTotal(store, edgeId), maximumCachedTime); + } + + function updateTimerCacheByClaim( + EdgeStore storage store, + bytes32 edgeId, + bytes32 claimingEdgeId, + uint8 numBigStepLevel, + uint256 maximumCachedTime + ) internal returns (bool, uint256) { + // calculate the time unrivaled without inheritance + uint256 totalTimeUnrivaled = timeUnrivaled(store, edgeId); + checkClaimIdLink(store, edgeId, claimingEdgeId, numBigStepLevel); + totalTimeUnrivaled += store.edges[claimingEdgeId].totalTimeUnrivaledCache; + return updateTimerCache(store, edgeId, totalTimeUnrivaled, maximumCachedTime); + } + + /// @notice The amount of time (in blocks) this edge has spent without rivals + /// This value is increasing whilst an edge is unrivaled, once a rival is created + /// it is fixed. If an edge has rivals from the moment it is created then it will have + /// a zero time unrivaled + function timeUnrivaled( + EdgeStore storage store, + bytes32 edgeId + ) internal view returns (uint256) { + if (!store.edges[edgeId].exists()) { + revert EdgeNotExists(edgeId); + } + + bytes32 mutualId = store.edges[edgeId].mutualId(); + bytes32 firstRival = store.firstRivals[mutualId]; + // Sanity check: it's not possible to have a 0 first rival for an edge that exists + if (firstRival == 0) { + revert EmptyFirstRival(); + } + + // this edge has no rivals, the time is still going up + // we give the current amount of time unrivaled + if (firstRival == UNRIVALED) { + return block.number - store.edges[edgeId].createdAtBlock; + } else { + // Sanity check: it's not possible an edge does not exist for a first rival record + if (!store.edges[firstRival].exists()) { + revert EdgeNotExists(firstRival); + } + + // rivals exist for this edge + uint256 firstRivalCreatedAtBlock = store.edges[firstRival].createdAtBlock; + uint256 edgeCreatedAtBlock = store.edges[edgeId].createdAtBlock; + if (firstRivalCreatedAtBlock > edgeCreatedAtBlock) { + // if this edge was created before the first rival then we return the difference + // in createdAtBlock number + return firstRivalCreatedAtBlock - edgeCreatedAtBlock; + } else { + // if this was created at the same time as, or after the the first rival + // then we return 0 + return 0; + } + } + } + + /// @notice Given a start and an endpoint determine the bisection height + /// @dev Returns the highest power of 2 in the differing lower bits of start and end + function mandatoryBisectionHeight(uint256 start, uint256 end) internal pure returns (uint256) { + if (end - start < 2) { + revert HeightDiffLtTwo(start, end); + } + if (end - start == 2) { + return start + 1; + } + + uint256 diff = (end - 1) ^ start; + uint256 mostSignificantSharedBit = UintUtilsLib.mostSignificantBit(diff); + uint256 mask = type(uint256).max << mostSignificantSharedBit; + return ((end - 1) & mask); + } + + /// @notice Bisect and edge. This creates two child edges: + /// lowerChild: has the same start root and height as this edge, but a different end root and height + /// upperChild: has the same end root and height as this edge, but a different start root and height + /// The lower child end root and height are equal to the upper child start root and height. This height + /// is the mandatoryBisectionHeight. + /// The lower child may already exist, however it's not possible for the upper child to exist as that would + /// mean that the edge has already been bisected + /// @param store The edge store containing the edge to bisect + /// @param edgeId Edge to bisect + /// @param bisectionHistoryRoot The new history root to be used in the lower and upper children + /// @param prefixProof A proof to show that the bisectionHistoryRoot commits to a prefix of the current endHistoryRoot + /// @return lowerChildId The id of the newly created lower child edge + /// @return lowerChildAdded Data about the lower child edge, empty if the lower child already existed + /// @return upperChildAdded Data about the upper child edge, never empty + function bisectEdge( + EdgeStore storage store, + bytes32 edgeId, + bytes32 bisectionHistoryRoot, + bytes memory prefixProof + ) internal returns (bytes32, EdgeAddedData memory, EdgeAddedData memory) { + if (store.edges[edgeId].status != EdgeStatus.Pending) { + revert EdgeNotPending(edgeId, store.edges[edgeId].status); + } + if (!hasRival(store, edgeId)) { + revert EdgeUnrivaled(edgeId); + } + + // cannot bisect an edge twice + // has rival above checks the edge - so no need to check again + ChallengeEdge memory ce = getNoCheck(store, edgeId); + + // bisections occur at deterministic heights, this ensures that + // rival edges bisect at the same height, and create the same child if they agree + uint256 middleHeight = mandatoryBisectionHeight(ce.startHeight, ce.endHeight); + { + (bytes32[] memory preExpansion, bytes32[] memory proof) = + abi.decode(prefixProof, (bytes32[], bytes32[])); + MerkleTreeAccumulatorLib.verifyPrefixProof( + bisectionHistoryRoot, + middleHeight + 1, + ce.endHistoryRoot, + ce.endHeight + 1, + preExpansion, + proof + ); + } + + bytes32 lowerChildId; + EdgeAddedData memory lowerChildAdded; + { + // midpoint proof it valid, create and store the children + ChallengeEdge memory lowerChild = ChallengeEdgeLib.newChildEdge( + ce.originId, + ce.startHistoryRoot, + ce.startHeight, + bisectionHistoryRoot, + middleHeight, + ce.level + ); + lowerChildId = lowerChild.idMem(); + // it's possible that the store already has the lower child if it was created by a rival + // (aka a merge move) + if (!store.edges[lowerChildId].exists()) { + lowerChildAdded = add(store, lowerChild); + } + } + + EdgeAddedData memory upperChildAdded; + { + ChallengeEdge memory upperChild = ChallengeEdgeLib.newChildEdge( + ce.originId, + bisectionHistoryRoot, + middleHeight, + ce.endHistoryRoot, + ce.endHeight, + ce.level + ); + + // add checks existence and throws if the id already exists + upperChildAdded = add(store, upperChild); + } + + store.edges[edgeId].setChildren(lowerChildId, upperChildAdded.edgeId); + + return (lowerChildId, lowerChildAdded, upperChildAdded); + } + + /// @notice Store that an edge has been confirmed. Recorded against the mutual id + /// so that rivals can look up rival confirmed edges + /// @dev Checks that a rival edge has not already been confirmed + function setConfirmedRival(EdgeStore storage store, bytes32 edgeId) internal { + bytes32 mutualId = store.edges[edgeId].mutualId(); + bytes32 confirmedRivalId = store.confirmedRivals[mutualId]; + if (confirmedRivalId != bytes32(0)) { + revert RivalEdgeConfirmed(edgeId, confirmedRivalId); + } + store.confirmedRivals[mutualId] = edgeId; + } + + /// @notice Returns the sub edge level of the provided edge level + /// @param level The edge level to fetch the next of + /// @param numBigStepLevel The number of big step levels in this challenge + function nextEdgeLevel(uint8 level, uint8 numBigStepLevel) internal pure returns (uint8) { + uint8 nextLevel = level + 1; + + // levelToType throws an error when level is not a valid type + ChallengeEdgeLib.levelToType(nextLevel, numBigStepLevel); + + return nextLevel; + } + + /// @notice Check that the originId of a claiming edge matched the mutualId() of a supplied edge + /// @dev Does some additional sanity checks to ensure that the claim id link is valid + /// @param store The store containing all edges and rivals + /// @param edgeId The edge being claimed + /// @param claimingEdgeId The edge with a claim id equal to edge id + /// @param numBigStepLevel The number of big step levels in this challenge + function checkClaimIdLink( + EdgeStore storage store, + bytes32 edgeId, + bytes32 claimingEdgeId, + uint8 numBigStepLevel + ) private view { + if (edgeId != store.edges[claimingEdgeId].claimId) { + revert EdgeClaimMismatch(edgeId, store.edges[claimingEdgeId].claimId); + } + // we do some extra checks that edge being claimed is eligible to be claimed by the claiming edge + // these shouldn't be necessary since it should be impossible to add layer zero edges that do not + // satisfy the checks below, but we conduct these checks anyway for double safety + + // the origin id of an edge should be the mutual id of the edge in the level below + if (store.edges[edgeId].mutualId() != store.edges[claimingEdgeId].originId) { + revert OriginIdMutualIdMismatch( + store.edges[edgeId].mutualId(), store.edges[claimingEdgeId].originId + ); + } + // the claiming edge must be exactly one level below + if ( + nextEdgeLevel(store.edges[edgeId].level, numBigStepLevel) + != store.edges[claimingEdgeId].level + ) { + revert EdgeLevelInvalid( + edgeId, + claimingEdgeId, + nextEdgeLevel(store.edges[edgeId].level, numBigStepLevel), + store.edges[claimingEdgeId].level + ); + } + } + + /// @notice An edge can be confirmed if the total amount of time (in blocks) it and a single chain of its direct ancestors + /// has spent unrivaled is greater than the challenge period. + /// @dev Edges inherit time from their parents, so the sum of unrivaled timer is compared against the threshold. + /// Given that an edge cannot become unrivaled after becoming rivaled, once the threshold is passed + /// it will always remain passed. The direct ancestors of an edge are linked by parent-child links for edges + /// of the same level, and claimId-edgeId links for zero layer edges that claim an edge in the level below. + /// @param store The edge store containing all edges and rival data + /// @param edgeId The id of the edge to confirm + /// @param claimedAssertionUnrivaledBlocks The number of blocks that the assertion ultimately being claimed by this edge spent unrivaled + /// @param confirmationThresholdBlock The number of blocks that the total unrivaled time of an ancestor chain needs to exceed in + /// order to be confirmed + function confirmEdgeByTime( + EdgeStore storage store, + bytes32 edgeId, + uint64 claimedAssertionUnrivaledBlocks, + uint64 confirmationThresholdBlock + ) internal returns (uint256) { + if (!store.edges[edgeId].exists()) { + revert EdgeNotExists(edgeId); + } + + uint256 totalTimeUnrivaled = timeUnrivaledTotal(store, edgeId); + + // since sibling assertions have the same predecessor, they can be viewed as + // rival edges. Adding the assertion unrivaled time allows us to start the confirmation + // timer from the moment the first assertion is made, rather than having to wait until the + // second assertion is made. + totalTimeUnrivaled += claimedAssertionUnrivaledBlocks; + + if (totalTimeUnrivaled < confirmationThresholdBlock) { + revert InsufficientConfirmationBlocks(totalTimeUnrivaled, confirmationThresholdBlock); + } + + // we also check the edge is pending in setConfirmed() + store.edges[edgeId].setConfirmed(); + + // also checks that no other rival has been confirmed + setConfirmedRival(store, edgeId); + + return totalTimeUnrivaled; + } + + /// @notice Confirm an edge by executing a one step proof + /// @dev One step proofs can only be executed against edges that have length one and of type SmallStep + /// @param store The edge store containing all edges and rival data + /// @param edgeId The id of the edge to confirm + /// @param oneStepProofEntry The one step proof contract + /// @param oneStepData Input data to the one step proof + /// @param execCtx The execution context to be supplied to the one step proof entry + /// @param beforeHistoryInclusionProof Proof that the state which is the start of the edge is committed to by the startHistoryRoot + /// @param afterHistoryInclusionProof Proof that the state which is the end of the edge is committed to by the endHistoryRoot + /// @param numBigStepLevel The number of big step levels in this challenge + /// @param bigStepHeight The height of the zero layer levels of big step type + /// @param smallStepHeight The height of the zero layer levels of big step type + function confirmEdgeByOneStepProof( + EdgeStore storage store, + bytes32 edgeId, + IOneStepProofEntry oneStepProofEntry, + OneStepData calldata oneStepData, + ExecutionContext memory execCtx, + bytes32[] calldata beforeHistoryInclusionProof, + bytes32[] calldata afterHistoryInclusionProof, + uint8 numBigStepLevel, + uint256 bigStepHeight, + uint256 smallStepHeight + ) internal { + if (!store.edges[edgeId].exists()) { + revert EdgeNotExists(edgeId); + } + + // edge must of type SmallStep + if ( + ChallengeEdgeLib.levelToType(store.edges[edgeId].level, numBigStepLevel) + != EdgeType.SmallStep + ) { + revert EdgeTypeNotSmallStep(store.edges[edgeId].level); + } + + // edge must be length one to execute one step proofs against + if (store.edges[edgeId].length() != 1) { + revert EdgeNotLengthOne(store.edges[edgeId].length()); + } + + // Get the machine step that corresponds to the start height of this edge + // To do this we sum the machine steps of the edges in each of the preceeding levels. + // We do not include the block height, since each step at the block level is a new block + // and new blocks reset the machine step to 0. + uint256 machineStep = store.edges[edgeId].startHeight; + { + bytes32 cursor = edgeId; + uint256 stepSize = smallStepHeight; + while (store.edges[cursor].level > 1) { + bytes32 nextEdgeId = store.edges[cursor].originId; + // We can traverse to previous levels using the origin id + cursor = store.firstRivals[nextEdgeId]; + // sum the stepSize * offset from 0 at this level + machineStep += stepSize * store.edges[cursor].startHeight; + // the step size at each level is the product of the heights at all succeeding levels + stepSize *= bigStepHeight; + } + } + + // the state in the onestep data must be committed to by the startHistoryRoot + MerkleTreeAccumulatorLib.verifyInclusionProof( + store.edges[edgeId].startHistoryRoot, + oneStepData.beforeHash, + machineStep, + beforeHistoryInclusionProof + ); + + // execute the single step to produce the after state + bytes32 afterHash = oneStepProofEntry.proveOneStep( + execCtx, machineStep, oneStepData.beforeHash, oneStepData.proof + ); + + // check that the after state was indeed committed to by the endHistoryRoot + MerkleTreeAccumulatorLib.verifyInclusionProof( + store.edges[edgeId].endHistoryRoot, + afterHash, + machineStep + 1, + afterHistoryInclusionProof + ); + + // we also check the edge is pending in setConfirmed() + store.edges[edgeId].setConfirmed(); + + // also checks that no other rival has been confirmed + setConfirmedRival(store, edgeId); + + store.edges[edgeId].totalTimeUnrivaledCache = type(uint64).max; + } +} diff --git a/src/challengeV2/libraries/Enums.sol b/src/challengeV2/libraries/Enums.sol new file mode 100644 index 00000000..b5df37fc --- /dev/null +++ b/src/challengeV2/libraries/Enums.sol @@ -0,0 +1,26 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +/// @notice The status of the edge +/// - Pending: Yet to be confirmed. Not all edges can be confirmed. +/// - Confirmed: Once confirmed it cannot transition back to pending +enum EdgeStatus { + Pending, + Confirmed +} + +/// @notice The type of the edge. Challenges are decomposed into 3 types of subchallenge +/// represented here by the edge type. Edges are initially created of type Block +/// and are then bisected until they have length one. After that new BigStep edges are +/// added that claim a Block type edge, and are then bisected until they have length one. +/// Then a SmallStep edge is added that claims a length one BigStep edge, and these +/// SmallStep edges are bisected until they reach length one. A length one small step edge +/// can then be directly executed using a one-step proof. +enum EdgeType { + Block, + BigStep, + SmallStep +} diff --git a/src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol b/src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol new file mode 100644 index 00000000..31f6ad19 --- /dev/null +++ b/src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol @@ -0,0 +1,390 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "../../libraries/MerkleLib.sol"; +import "./ArrayUtilsLib.sol"; +import "./UintUtilsLib.sol"; + +/// @title Merkle tree accumulator utilities +/// @notice +/// This library provides utilities for manipulating, and verifying proofs about, a kind of +/// merkle tree accumulator. +/// +/// -------------------------------------------------------------------------------------------- +/// The accumulator is composed of a number of complete merkle trees. +/// A complete tree is a tree with a leaf size of a power of 2 +/// One or zero complete trees at each power of 2 is enough to define any size of accumulator. +/// The root of the accumulator is defined as the cumulative hashing of all of the +/// roots of each of its complete trees, substituting a zero where no tree is necessary at that power of 2 +/// Where we refer to "level" in this documentation we mean the power of 2 used at the level: 2^level +/// Where we refer to a subtree we mean one of the complete trees which makes up the accumulator. +/// --------- +/// eg. Below are 3 leaves (A, B, C) which can be represented as an accumulator made up of the +/// composition of 2 complete subtrees, one of level=1: 2^1=2 (AB) and one of level=0: 2^0=1 (C). +/// AB +/// / \ +/// A B C +/// +/// +/// Merkle expansions and roots +/// -------------------------------------------------------------------------------------------- +/// The minimal amount of information we need to keep in order to compute the accumulator +/// is the roots of each of its complete subtrees, and the levels of each of those subtrees +/// A "merkle expansion" (ME) is a representation of this information - it is a vector of roots of each complete subtree, +/// the level of the tree being the index in the vector, the subtree root being the value. +/// The accumulator root is calculated by hashing each of the levels of the subtree together, adding zero hashes +/// where relevant to make a balanced tree. +/// --------- +/// +/// ME Example 1 - 1 leaf C +/// +/// C => (C) +/// +/// ME of the C tree = (C), accumulator=(C) +/// The merkle expansion of an accumulator consisting of a single leaf is vector of size one with the +/// zeroth index being the leaf C. The zeroth index of the vector represents the presence of a size +/// one complete subtree in the accumulator. So if an accumulator has a size one complete subtree as part +/// of its composition, the root of that size one accumulator will be present in the zeroth index. +/// +/// ME Example 2 - 2 leaves A and B +/// +/// AB +/// / \ +/// A B +/// +/// ME of the AB tree = (0, AB), accumulator=AB +/// The merkle expansion of an accumulator consisting of a single size 2 complete subtree is a vector +/// of size 2, with the zeroth index value being 0, and the 1st index value being the root of the size +/// 2 subtree. The zero in the zeroth index indicated that there is not a size 1 subtree in the accumulators's +/// composition. If an accumulator has a size 2 subtree in its composition the root of the subtree will be present in the +/// 1st index. +/// +/// ME Example 3 - 3 leaves A, B, C +/// +/// AB +/// / \ +/// A B C +/// +/// ME of the composed ABC tree = (C, AB), accumulator=hash(AB, hash(C, 0)). +/// When a accumulator size is not a power of 2, a composition of subtrees is used to calculate it's value. +/// The lowest level sub tree is hashed with zero, to form the initial accumulator. The accumulator is then +/// hashed with the value (including zeros) at each level of the expansion. +/// The merkle expansion of this composed tree is a vector of size two. Since it has a size one tree in +/// its composition, the root of which goes in the zeroth index of the expansion - C, and since it has a +/// size two tree in its composition the root of that goes in the 1st index, to give (C, AB). +/// +/// Tree operations +/// -------------------------------------------------------------------------------------------- +/// Accumulators are modified by adding or subtracting complete subtrees, however this library +/// supports additive only accumulators since we dont have a specific use for subtraction at the moment. +/// We call adding a complete subtree to an accumulator "appending", appending has the following +/// rules: +/// 1. Only a complete sub trees can be appended +/// 2. Complete sub trees can only be appended at the level of the lowest complete subtree in the tree, or below +/// 3. If the existing accumulator is empty a sub tree can be appended at any level +/// When appending a sub tree we may increase the size of the merkle expansion vector, in the same +/// way that adding 1 to a binary number may increase the index of its most significant bit +/// --------- +/// eg. A complete subtree can only be appended to the ABC accumulator at level 0, since the its lowest complete +/// subtree (C) is at level 0. Doing so would create a complete sub tree at level 1, which would in turn +/// cause the creation of new size 4 sub tree +/// +/// ABCD +/// / \ +/// AB AB CD +/// / \ + = / \ / \ +/// A B C D A B C D +/// +/// ME of ABCD = (0, AB) + (C) + (D) +/// = (C, AB) + (D) +/// = (0, 0, ABCD) +/// accumulator of ABCD = hash(AB, CD) +/// -------------------------------------------------------------------------------------------- +library MerkleTreeAccumulatorLib { + // the go code uses uint64, so we ensure we never go above that here + uint256 public constant MAX_LEVEL = 64; + + /// @notice The accumulator root of the a merkle expansion. + /// @dev The accumulator root is defined as the cumulative hashing of the + /// roots of all of its subtrees. Throws error for an empty merkle expansion + /// @param me The merkle expansion to calculate the root of + function root( + bytes32[] memory me + ) internal pure returns (bytes32) { + require(me.length > 0, "Empty merkle expansion"); + require(me.length <= MAX_LEVEL, "Merkle expansion too large"); + + bytes32 accum = 0; + for (uint256 i = 0; i < me.length; i++) { + bytes32 val = me[i]; + if (accum == 0) { + if (val != 0) { + accum = val; + + // the tree is balanced if the only non zero entry in the merkle extension + // is the last entry + // otherwise the lowest level entry needs to be combined with a zero to balance the bottom + // level, after which zeros in the merkle extension above that will balance the rest + if (i != me.length - 1) { + accum = keccak256(abi.encodePacked(accum, bytes32(0))); + } + } + } else if (val != 0) { + // accum represents the smaller sub trees, since it is earlier in the expansion + // we put the larger subtrees on the left + accum = keccak256(abi.encodePacked(val, accum)); + } else { + // by definition we always complete trees by appending zeros to the right + accum = keccak256(abi.encodePacked(accum, bytes32(0))); + } + } + + return accum; + } + + /// @notice Append a complete subtree to an existing accumulator + /// @dev See above description of the accumulator for rules on how appending can occur. + /// Briefly, appending works like binary addition only that the value being added must be an + /// exact power of two (complete), and must equal to or less than the least significant bit + /// in the existing tree. + /// If the me is empty, will just append directly. + /// @param me The merkle expansion to append a complete sub tree to + /// @param level The level at which to append the complete subtree + /// @param subtreeRoot The root of the complete subtree to be appended + function appendCompleteSubTree( + bytes32[] memory me, + uint256 level, + bytes32 subtreeRoot + ) internal pure returns (bytes32[] memory) { + // we use number representations of the levels elsewhere, so we need to ensure we're appending a leve + // that's too high to use in uint + require(level < MAX_LEVEL, "Level too high"); + require(subtreeRoot != 0, "Cannot append empty subtree"); + require(me.length <= MAX_LEVEL, "Merkle expansion too large"); + + if (me.length == 0) { + bytes32[] memory empty = new bytes32[](level + 1); + empty[level] = subtreeRoot; + return empty; + } + + // This technically isn't necessary since it would be caught by the i < level check + // on the last loop of the for-loop below, but we add it for a clearer error message + require(level < me.length, "Level greater than highest level of current expansion"); + + bytes32 accumHash = subtreeRoot; + uint256 meSize = treeSize(me); + uint256 postSize = meSize + 2 ** level; + + // if by appending the sub tree we increase the numbe of most sig bits of the size, that means + // we'll need more space in the expansion to describe the tree, so we enlarge by one + bytes32[] memory next = UintUtilsLib.mostSignificantBit(postSize) + > UintUtilsLib.mostSignificantBit(meSize) + ? new bytes32[](me.length + 1) + : new bytes32[](me.length); + + // ensure we're never creating an expansion that's too big + require(next.length <= MAX_LEVEL, "Append creates oversize tree"); + + // loop through all the levels in self and try to append the new subtree + // since each node has two children by appending a subtree we may complete another one + // in the level above. So we move through the levels updating the result at each level + for (uint256 i = 0; i < me.length; i++) { + // we can only append at the level of the smallest complete sub tree or below + // appending above this level would mean create "holes" in the tree + // we can find the smallest complete sub tree by looking for the first entry in the merkle expansion + if (i < level) { + // we're below the level we want to append - no complete sub trees allowed down here + // if the level is 0 there are no complete subtrees, and we therefore cannot be too low + require(me[i] == 0, "Append above least significant bit"); + } else { + // we're at or above the level + if (accumHash == 0) { + // no more changes to propagate upwards - just fill the tree + next[i] = me[i]; + } else { + // we have a change to propagate + if (me[i] == 0) { + // if the level is currently empty we can just add the change + next[i] = accumHash; + // and then there's nothing more to propagate + accumHash = 0; + } else { + // if the level is not currently empty then we combine it with propagation + // change, and propagate that to the level above. This level is now part of a complete subtree + // so we zero it out + next[i] = 0; + accumHash = keccak256(abi.encodePacked(me[i], accumHash)); + } + } + } + } + + // we had a final change to propagate above the existing highest complete sub tree + // so we have a new highest complete sub tree in the level above - this was why we + // increased the storeage above + if (accumHash != 0) { + next[next.length - 1] = accumHash; + } + + // it should never be possible to achieve this ever we sized the array correctly + // so this is just a sanity check + require(next[next.length - 1] != 0, "Last entry zero"); + + return next; + } + + /// @notice Append a leaf to a merkle expansion + /// @dev Leaves are just complete subtrees at level 0, however we hash the leaf before putting it + /// into the tree to avoid root collisions. + /// @param me The merkle expansion to append a leaf to + /// @param leaf The leaf to append - will be hashed in here before appending + function appendLeaf( + bytes32[] memory me, + bytes32 leaf + ) internal pure returns (bytes32[] memory) { + // it's important that we hash the leaf, this ensures that this leaf cannot be a collision with any other non leaf + // or root node, since these are always the hash of 64 bytes of data, and we're hashing 32 bytes + return appendCompleteSubTree(me, 0, keccak256(abi.encodePacked(leaf))); + } + + /// @notice Find the highest level which can be appended to an accumulator of size startSize without + /// creating a tree with size greater than end size (inclusive) + /// @dev Subtrees can only be appended according to certain rules, see tree description at top of file + /// for details. A subtree can only be appended if it is at the same level, or below, the current lowest + /// subtree in the expansion + /// @param startSize The size of the start tree to find the maximum append to + /// @param endSize The size of the end tree to find a maximum append under + function maximumAppendBetween( + uint256 startSize, + uint256 endSize + ) internal pure returns (uint256) { + // The accumulator can be represented in the same way as a binary representation of a number + // As described above, subtrees can only be appended to a tree if they are at the same level, or below, + // the current lowest subtree. + // In this function we want to find the level of the highest tree that can be appended to the current + // accumulator, without the resulting accumulator size surpassing the end point. We do this by looking at the difference + // between the start and end size, and iteratively reducing it in the maximal way. + + // The start and end size will share some higher order bits, below that they differ, and it is this + // difference that we need to fill in the minimum number of appends + // startSize looks like: xxxxxxyyyy + // endSize looks like: xxxxxxzzzz + // where x are the complete sub trees they share, and y and z are the subtrees they dont + + require(startSize < endSize, "Start not less than end"); + + // remove the high order bits that are shared + uint256 msb = UintUtilsLib.mostSignificantBit(startSize ^ endSize); + uint256 mask = (1 << (msb) + 1) - 1; + uint256 y = startSize & mask; + uint256 z = endSize & mask; + + // Since in the verification we will be appending at start size, the highest level at which we + // can append is the lowest complete subtree - the least significant bit + if (y != 0) { + return UintUtilsLib.leastSignificantBit(y); + } + + // y == 0, therefore we can append at any of levels where start and end differ + // The highest level that we can append at without surpassing the end, is the most significant + // bit of the end + if (z != 0) { + return UintUtilsLib.mostSignificantBit(z); + } + + // since we enforce that start < end, we know that y and z cannot both be 0 + revert("Both y and z cannot be zero"); + } + + /// @notice Calculate the full tree size represented by a merkle expansion + /// @param me The merkle expansion to calculate the tree size of + function treeSize( + bytes32[] memory me + ) internal pure returns (uint256) { + uint256 sum = 0; + for (uint256 i = 0; i < me.length; i++) { + if (me[i] != 0) { + sum += 2 ** i; + } + } + return sum; + } + + /// @notice Verify that a pre-accumulator-root commits to a prefix of the leaves committed by a post-accumulator-root + /// @dev Verifies by appending sub trees to the pre accumulator until we get to the size of the post accumulator + /// and then checking that the root of the calculated post accumulator is equal to the supplied one + /// @param preRoot The root of the accumulator which is a prefix of the post accumulator + /// @param preSize The size of the pre-accumulator + /// @param postRoot The root the post-accumulator - the accumulator which we're proving pre is a prefix of + /// @param postSize The size of the post-accumulator + /// @param preExpansion The merkle expansion of the pre-accumulator + /// @param proof The proof is the minimum set of complete subtree hashes that can be appended to + /// the accumulator-tree in order to form the post accumulator + /// The first entry in the proof will be appended at the level of the first non-zero entry in the pre-expansion. + /// The second entry will then be appended to the the first non zero entry in the resulting expansion and so on, until + /// appending a sub tree will create a tree of greater that the post size. Then, starting at the highest level, + /// the next entry in the proof is attempted to be appended to the expansion, but the result is only accepted if has a size + /// less than or equal the post-size. This continues until all proof entries have been used up. + /// The resulting expansion is then checked to see if it equals the provided post-root + function verifyPrefixProof( + bytes32 preRoot, + uint256 preSize, + bytes32 postRoot, + uint256 postSize, + bytes32[] memory preExpansion, + bytes32[] memory proof + ) internal pure { + require(preSize > 0, "Pre-size cannot be 0"); + require(root(preExpansion) == preRoot, "Pre expansion root mismatch"); + require(treeSize(preExpansion) == preSize, "Pre size does not match expansion"); + require(preSize < postSize, "Pre size not less than post size"); + + uint256 size = preSize; + uint256 proofIndex = 0; + // we clone here to avoid mutating the input arguments + // which could be unexpected for callers + bytes32[] memory exp = ArrayUtilsLib.slice(preExpansion, 0, preExpansion.length); + + // Iteratively append a tree at the maximum possible level until we get to the post size + while (size < postSize) { + uint256 level = maximumAppendBetween(size, postSize); + + require(proofIndex < proof.length, "Index out of range"); + exp = appendCompleteSubTree(exp, level, proof[proofIndex]); + + uint256 numLeaves = 1 << level; + size += numLeaves; + assert(size <= postSize); + proofIndex++; + } + + // Check that the calculated root is equal to the provided post root + require(root(exp) == postRoot, "Post expansion root not equal post"); + + // ensure that we consumed the full proof + // this is just a safety check to guard against mistakenly supplied args + require(proofIndex == proof.length, "Incomplete proof usage"); + } + + /// @notice Using the provided proof verify that the provided leaf is included in the roothash of a complete tree at + /// the specified index. Note that here we use a 0-indexed value for the leaf number, whereas + /// elsewhere we use size. + /// @param rootHash The root hash to prove inclusion in + /// @param leaf The leaf preimage to prove inclusion - will be hashed in here before checking inclusion + /// @param index The index of the leaf in the tree + /// @param proof The path from the leaf to the root + function verifyInclusionProof( + bytes32 rootHash, + bytes32 leaf, + uint256 index, + bytes32[] memory proof + ) internal pure { + bytes32 calculatedRoot = + MerkleLib.calculateRoot(proof, index, keccak256(abi.encodePacked(leaf))); + require(rootHash == calculatedRoot, "Invalid inclusion proof"); + } +} diff --git a/src/challengeV2/libraries/UintUtilsLib.sol b/src/challengeV2/libraries/UintUtilsLib.sol new file mode 100644 index 00000000..840fcf44 --- /dev/null +++ b/src/challengeV2/libraries/UintUtilsLib.sol @@ -0,0 +1,74 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +/// @title Uint utils library +/// @notice Some additional bit inspection tools +library UintUtilsLib { + /// @notice The least significant bit in the bit representation of a uint + /// @dev Zero indexed from the least sig bit. Eg 1010 => 1, 1100 => 2, 1001 => 0 + /// Finds lsb in linear (uint size) time + /// @param x Cannot be zero, since zero that has no signficant bits + function leastSignificantBit( + uint256 x + ) internal pure returns (uint256 msb) { + require(x > 0, "Zero has no significant bits"); + + // isolate the least sig bit + uint256 isolated = ((x - 1) & x) ^ x; + + // since we removed all higher bits, least sig == most sig + return mostSignificantBit(isolated); + } + + /// @notice The most significant bit in the bit representation of a uint + /// @dev Zero indexed from the least sig bit. Eg 1010 => 3, 110 => 2, 1 => 0 + /// Taken from https://solidity-by-example.org/bitwise/ + /// Finds msb in log (uint size) time + /// @param x Cannot be zero, since zero has no sigificant bits + function mostSignificantBit( + uint256 x + ) internal pure returns (uint256 msb) { + require(x != 0, "Zero has no significant bits"); + + // x >= 2 ** 128 + if (x >= 0x100000000000000000000000000000000) { + x >>= 128; + msb += 128; + } + // x >= 2 ** 64 + if (x >= 0x10000000000000000) { + x >>= 64; + msb += 64; + } + // x >= 2 ** 32 + if (x >= 0x100000000) { + x >>= 32; + msb += 32; + } + // x >= 2 ** 16 + if (x >= 0x10000) { + x >>= 16; + msb += 16; + } + // x >= 2 ** 8 + if (x >= 0x100) { + x >>= 8; + msb += 8; + } + // x >= 2 ** 4 + if (x >= 0x10) { + x >>= 4; + msb += 4; + } + // x >= 2 ** 2 + if (x >= 0x4) { + x >>= 2; + msb += 2; + } + // x >= 2 ** 1 + if (x >= 0x2) msb += 1; + } +} diff --git a/src/libraries/AddressAliasHelper.sol b/src/libraries/AddressAliasHelper.sol index 9320fe3e..aede9b19 100644 --- a/src/libraries/AddressAliasHelper.sol +++ b/src/libraries/AddressAliasHelper.sol @@ -11,7 +11,9 @@ library AddressAliasHelper { /// the inbox to the msg.sender viewed in the L2 /// @param l1Address the address in the L1 that triggered the tx to L2 /// @return l2Address L2 address as viewed in msg.sender - function applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) { + function applyL1ToL2Alias( + address l1Address + ) internal pure returns (address l2Address) { unchecked { l2Address = address(uint160(l1Address) + OFFSET); } @@ -21,7 +23,9 @@ library AddressAliasHelper { /// address in the L1 that submitted a tx to the inbox /// @param l2Address L2 address as viewed in msg.sender /// @return l1Address the address in the L1 that triggered the tx to L2 - function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) { + function undoL1ToL2Alias( + address l2Address + ) internal pure returns (address l1Address) { unchecked { l1Address = address(uint160(l2Address) - OFFSET); } diff --git a/src/libraries/AdminFallbackProxy.sol b/src/libraries/AdminFallbackProxy.sol index 7f1bb511..1888f610 100644 --- a/src/libraries/AdminFallbackProxy.sol +++ b/src/libraries/AdminFallbackProxy.sol @@ -34,7 +34,9 @@ abstract contract DoubleLogicERC1967Upgrade is ERC1967Upgrade { /** * @dev Stores a new address in the EIP1967 implementation slot. */ - function _setSecondaryImplementation(address newImplementation) private { + function _setSecondaryImplementation( + address newImplementation + ) private { require( Address.isContract(newImplementation), "ERC1967: new secondary implementation is not a contract" @@ -47,7 +49,9 @@ abstract contract DoubleLogicERC1967Upgrade is ERC1967Upgrade { * * Emits an {UpgradedSecondary} event. */ - function _upgradeSecondaryTo(address newImplementation) internal { + function _upgradeSecondaryTo( + address newImplementation + ) internal { _setSecondaryImplementation(newImplementation); emit UpgradedSecondary(newImplementation); } @@ -119,8 +123,8 @@ contract AdminFallbackProxy is Proxy, DoubleLogicERC1967Upgrade { _IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1) ); assert( - _IMPLEMENTATION_SECONDARY_SLOT == - bytes32(uint256(keccak256("eip1967.proxy.implementation.secondary")) - 1) + _IMPLEMENTATION_SECONDARY_SLOT + == bytes32(uint256(keccak256("eip1967.proxy.implementation.secondary")) - 1) ); _changeAdmin(adminAddr); _upgradeToAndCall(adminLogic, adminData, false); diff --git a/src/libraries/ArbitrumChecker.sol b/src/libraries/ArbitrumChecker.sol index 714c4e75..b218c794 100644 --- a/src/libraries/ArbitrumChecker.sol +++ b/src/libraries/ArbitrumChecker.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; @@ -8,9 +8,8 @@ import "../precompiles/ArbSys.sol"; library ArbitrumChecker { function runningOnArbitrum() internal view returns (bool) { - (bool ok, bytes memory data) = address(100).staticcall( - abi.encodeWithSelector(ArbSys.arbOSVersion.selector) - ); + (bool ok, bytes memory data) = + address(100).staticcall(abi.encodeWithSelector(ArbSys.arbOSVersion.selector)); return ok && data.length == 32; } } diff --git a/src/libraries/CryptographyPrimitives.sol b/src/libraries/CryptographyPrimitives.sol index c77ad7c1..93c46296 100644 --- a/src/libraries/CryptographyPrimitives.sol +++ b/src/libraries/CryptographyPrimitives.sol @@ -9,7 +9,9 @@ library CryptographyPrimitives { // WARNING: This function has the keccak state in a weird order. // If the normal Keccak state is [0, 1, 2, 3, 4, 5, 6, ..., 24] // this function has its state as [0, 5, 10, 15, 20, 1, 6, 11, ..., 24] - function keccakF(uint256[25] memory a) internal pure returns (uint256[25] memory) { + function keccakF( + uint256[25] memory a + ) internal pure returns (uint256[25] memory) { uint256[5] memory c; uint256[5] memory d; //uint D_0; uint D_1; uint D_2; uint D_3; uint D_4; @@ -60,11 +62,11 @@ library CryptographyPrimitives { D[x] = C[(x+4)%5]^((C[(x+1)%5] * 2)&0xffffffffffffffff | (C[(x+1)%5]/(2**63))); }*/ - d[0] = c[4] ^ (((c[1] * 2) & 0xffffffffffffffff) | (c[1] / (2**63))); - d[1] = c[0] ^ (((c[2] * 2) & 0xffffffffffffffff) | (c[2] / (2**63))); - d[2] = c[1] ^ (((c[3] * 2) & 0xffffffffffffffff) | (c[3] / (2**63))); - d[3] = c[2] ^ (((c[4] * 2) & 0xffffffffffffffff) | (c[4] / (2**63))); - d[4] = c[3] ^ (((c[0] * 2) & 0xffffffffffffffff) | (c[0] / (2**63))); + d[0] = c[4] ^ (((c[1] * 2) & 0xffffffffffffffff) | (c[1] / (2 ** 63))); + d[1] = c[0] ^ (((c[2] * 2) & 0xffffffffffffffff) | (c[2] / (2 ** 63))); + d[2] = c[1] ^ (((c[3] * 2) & 0xffffffffffffffff) | (c[3] / (2 ** 63))); + d[3] = c[2] ^ (((c[4] * 2) & 0xffffffffffffffff) | (c[4] / (2 ** 63))); + d[4] = c[3] ^ (((c[0] * 2) & 0xffffffffffffffff) | (c[0] / (2 ** 63))); /* for( x = 0 ; x < 5 ; x++ ) { @@ -101,30 +103,30 @@ library CryptographyPrimitives { /*Rho and pi steps*/ b[0] = a[0]; - b[8] = (((a[1] * (2**36)) & 0xffffffffffffffff) | (a[1] / (2**28))); - b[11] = (((a[2] * (2**3)) & 0xffffffffffffffff) | (a[2] / (2**61))); - b[19] = (((a[3] * (2**41)) & 0xffffffffffffffff) | (a[3] / (2**23))); - b[22] = (((a[4] * (2**18)) & 0xffffffffffffffff) | (a[4] / (2**46))); - b[2] = (((a[5] * (2**1)) & 0xffffffffffffffff) | (a[5] / (2**63))); - b[5] = (((a[6] * (2**44)) & 0xffffffffffffffff) | (a[6] / (2**20))); - b[13] = (((a[7] * (2**10)) & 0xffffffffffffffff) | (a[7] / (2**54))); - b[16] = (((a[8] * (2**45)) & 0xffffffffffffffff) | (a[8] / (2**19))); - b[24] = (((a[9] * (2**2)) & 0xffffffffffffffff) | (a[9] / (2**62))); - b[4] = (((a[10] * (2**62)) & 0xffffffffffffffff) | (a[10] / (2**2))); - b[7] = (((a[11] * (2**6)) & 0xffffffffffffffff) | (a[11] / (2**58))); - b[10] = (((a[12] * (2**43)) & 0xffffffffffffffff) | (a[12] / (2**21))); - b[18] = (((a[13] * (2**15)) & 0xffffffffffffffff) | (a[13] / (2**49))); - b[21] = (((a[14] * (2**61)) & 0xffffffffffffffff) | (a[14] / (2**3))); - b[1] = (((a[15] * (2**28)) & 0xffffffffffffffff) | (a[15] / (2**36))); - b[9] = (((a[16] * (2**55)) & 0xffffffffffffffff) | (a[16] / (2**9))); - b[12] = (((a[17] * (2**25)) & 0xffffffffffffffff) | (a[17] / (2**39))); - b[15] = (((a[18] * (2**21)) & 0xffffffffffffffff) | (a[18] / (2**43))); - b[23] = (((a[19] * (2**56)) & 0xffffffffffffffff) | (a[19] / (2**8))); - b[3] = (((a[20] * (2**27)) & 0xffffffffffffffff) | (a[20] / (2**37))); - b[6] = (((a[21] * (2**20)) & 0xffffffffffffffff) | (a[21] / (2**44))); - b[14] = (((a[22] * (2**39)) & 0xffffffffffffffff) | (a[22] / (2**25))); - b[17] = (((a[23] * (2**8)) & 0xffffffffffffffff) | (a[23] / (2**56))); - b[20] = (((a[24] * (2**14)) & 0xffffffffffffffff) | (a[24] / (2**50))); + b[8] = (((a[1] * (2 ** 36)) & 0xffffffffffffffff) | (a[1] / (2 ** 28))); + b[11] = (((a[2] * (2 ** 3)) & 0xffffffffffffffff) | (a[2] / (2 ** 61))); + b[19] = (((a[3] * (2 ** 41)) & 0xffffffffffffffff) | (a[3] / (2 ** 23))); + b[22] = (((a[4] * (2 ** 18)) & 0xffffffffffffffff) | (a[4] / (2 ** 46))); + b[2] = (((a[5] * (2 ** 1)) & 0xffffffffffffffff) | (a[5] / (2 ** 63))); + b[5] = (((a[6] * (2 ** 44)) & 0xffffffffffffffff) | (a[6] / (2 ** 20))); + b[13] = (((a[7] * (2 ** 10)) & 0xffffffffffffffff) | (a[7] / (2 ** 54))); + b[16] = (((a[8] * (2 ** 45)) & 0xffffffffffffffff) | (a[8] / (2 ** 19))); + b[24] = (((a[9] * (2 ** 2)) & 0xffffffffffffffff) | (a[9] / (2 ** 62))); + b[4] = (((a[10] * (2 ** 62)) & 0xffffffffffffffff) | (a[10] / (2 ** 2))); + b[7] = (((a[11] * (2 ** 6)) & 0xffffffffffffffff) | (a[11] / (2 ** 58))); + b[10] = (((a[12] * (2 ** 43)) & 0xffffffffffffffff) | (a[12] / (2 ** 21))); + b[18] = (((a[13] * (2 ** 15)) & 0xffffffffffffffff) | (a[13] / (2 ** 49))); + b[21] = (((a[14] * (2 ** 61)) & 0xffffffffffffffff) | (a[14] / (2 ** 3))); + b[1] = (((a[15] * (2 ** 28)) & 0xffffffffffffffff) | (a[15] / (2 ** 36))); + b[9] = (((a[16] * (2 ** 55)) & 0xffffffffffffffff) | (a[16] / (2 ** 9))); + b[12] = (((a[17] * (2 ** 25)) & 0xffffffffffffffff) | (a[17] / (2 ** 39))); + b[15] = (((a[18] * (2 ** 21)) & 0xffffffffffffffff) | (a[18] / (2 ** 43))); + b[23] = (((a[19] * (2 ** 56)) & 0xffffffffffffffff) | (a[19] / (2 ** 8))); + b[3] = (((a[20] * (2 ** 27)) & 0xffffffffffffffff) | (a[20] / (2 ** 37))); + b[6] = (((a[21] * (2 ** 20)) & 0xffffffffffffffff) | (a[21] / (2 ** 44))); + b[14] = (((a[22] * (2 ** 39)) & 0xffffffffffffffff) | (a[22] / (2 ** 25))); + b[17] = (((a[23] * (2 ** 8)) & 0xffffffffffffffff) | (a[23] / (2 ** 56))); + b[20] = (((a[24] * (2 ** 14)) & 0xffffffffffffffff) | (a[24] / (2 ** 50))); /*Xi state*/ /* @@ -172,11 +174,7 @@ library CryptographyPrimitives { return ((x) >> (n)) | ((x) << (32 - (n))); } - function ch( - uint32 e, - uint32 f, - uint32 g - ) internal pure returns (uint32) { + function ch(uint32 e, uint32 f, uint32 g) internal pure returns (uint32) { return ((e & f) ^ ((~e) & g)); } @@ -184,11 +182,10 @@ library CryptographyPrimitives { // Note that the input must be padded by the caller // For the initial chunk, the initial values from the SHA256 spec should be passed in as hashState // For subsequent rounds, hashState is the output from the previous round - function sha256Block(uint256[2] memory inputChunk, uint256 hashState) - internal - pure - returns (uint256) - { + function sha256Block( + uint256[2] memory inputChunk, + uint256 hashState + ) internal pure returns (uint256) { unchecked { uint32[64] memory k = [ 0x428a2f98, @@ -285,14 +282,10 @@ library CryptographyPrimitives { for (i = 0; i < 64; i++) { s1 = - rightRotate(state[4], 6) ^ - rightRotate(state[4], 11) ^ - rightRotate(state[4], 25); + rightRotate(state[4], 6) ^ rightRotate(state[4], 11) ^ rightRotate(state[4], 25); temp1 = state[7] + s1 + ch(state[4], state[5], state[6]) + k[i] + w[i]; s0 = - rightRotate(state[0], 2) ^ - rightRotate(state[0], 13) ^ - rightRotate(state[0], 22); + rightRotate(state[0], 2) ^ rightRotate(state[0], 13) ^ rightRotate(state[0], 22); maj = (state[0] & (state[1] ^ state[2])) ^ (state[1] & state[2]); temp2 = s0 + maj; diff --git a/src/libraries/DecimalsConverterHelper.sol b/src/libraries/DecimalsConverterHelper.sol index 2d89d6b3..89dcee17 100644 --- a/src/libraries/DecimalsConverterHelper.sol +++ b/src/libraries/DecimalsConverterHelper.sol @@ -4,8 +4,6 @@ pragma solidity ^0.8.0; -import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - library DecimalsConverterHelper { /// @notice generic function for mapping amount from one decimal denomination to another /// @dev Ie. let's say amount is 752. If token has 16 decimals and is being adjusted to @@ -25,9 +23,9 @@ library DecimalsConverterHelper { if (decimalsIn == decimalsOut) { return amount; } else if (decimalsIn < decimalsOut) { - return amount * 10**(decimalsOut - decimalsIn); + return amount * 10 ** (decimalsOut - decimalsIn); } else { - return amount / 10**(decimalsIn - decimalsOut); + return amount / 10 ** (decimalsIn - decimalsOut); } } } diff --git a/src/libraries/DoubleLogicUUPSUpgradeable.sol b/src/libraries/DoubleLogicUUPSUpgradeable.sol index c9bf3040..a2536718 100644 --- a/src/libraries/DoubleLogicUUPSUpgradeable.sol +++ b/src/libraries/DoubleLogicUUPSUpgradeable.sol @@ -26,7 +26,9 @@ abstract contract DoubleLogicUUPSUpgradeable is UUPSUpgradeable, DoubleLogicERC1 * function _authorizeSecondaryUpgrade(address) internal override onlyOwner {} * ``` */ - function _authorizeSecondaryUpgrade(address newImplementation) internal virtual; + function _authorizeSecondaryUpgrade( + address newImplementation + ) internal virtual; /** * @dev Upgrade the secondary implementation of the proxy to `newImplementation`. @@ -35,7 +37,9 @@ abstract contract DoubleLogicUUPSUpgradeable is UUPSUpgradeable, DoubleLogicERC1 * * Emits an {UpgradedSecondary} event. */ - function upgradeSecondaryTo(address newImplementation) external onlyProxy { + function upgradeSecondaryTo( + address newImplementation + ) external onlyProxy { _authorizeSecondaryUpgrade(newImplementation); _upgradeSecondaryToAndCallUUPS(newImplementation, new bytes(0), false); } @@ -48,11 +52,10 @@ abstract contract DoubleLogicUUPSUpgradeable is UUPSUpgradeable, DoubleLogicERC1 * * Emits an {UpgradedSecondary} event. */ - function upgradeSecondaryToAndCall(address newImplementation, bytes memory data) - external - payable - onlyProxy - { + function upgradeSecondaryToAndCall( + address newImplementation, + bytes memory data + ) external payable onlyProxy { _authorizeSecondaryUpgrade(newImplementation); _upgradeSecondaryToAndCallUUPS(newImplementation, data, true); } diff --git a/src/libraries/Error.sol b/src/libraries/Error.sol index 2eb496e7..a0267b8e 100644 --- a/src/libraries/Error.sol +++ b/src/libraries/Error.sol @@ -149,9 +149,6 @@ error DelayedTooFar(); /// @dev Force include can only read messages more blocks old than the delay period error ForceIncludeBlockTooSoon(); -/// @dev Force include can only read messages more seconds old than the delay period -error ForceIncludeTimeTooSoon(); - /// @dev The message provided did not match the hash in the delayed inbox error IncorrectMessagePreimage(); @@ -176,6 +173,15 @@ error NotBatchPosterManager(address); /// @dev Thrown when a data blob feature is attempted to be used on a chain that doesnt support it error DataBlobsNotSupported(); +/// @dev Thrown when batches are posted without buffer proof, this is only allowed in a sync state or when no new delayed messages are read +error DelayProofRequired(); + +/// @dev The DelayedAccPreimage is invalid +error InvalidDelayedAccPreimage(); + +/// @dev Thrown when the sequencer attempts to post a batch with delay / sync proofs without delay bufferability enabled +error NotDelayBufferable(); + /// @dev Thrown when an init param was supplied as empty error InitParamZero(string name); @@ -196,3 +202,12 @@ error Deprecated(); /// @dev Thrown when any component of maxTimeVariation is over uint64 error BadMaxTimeVariation(); + +/// @dev Thrown when any component of bufferConfig is zero +error BadBufferConfig(); + +/// @dev Thrown when extra gas is not a uint64 +error ExtraGasNotUint64(); + +/// @dev Thrown when keysetBytes is too large +error KeysetTooLarge(); diff --git a/src/libraries/GasRefundEnabled.sol b/src/libraries/GasRefundEnabled.sol index 63a5bbfe..4242fb75 100644 --- a/src/libraries/GasRefundEnabled.sol +++ b/src/libraries/GasRefundEnabled.sol @@ -9,7 +9,7 @@ import "./IReader4844.sol"; import "./IGasRefunder.sol"; abstract contract GasRefundEnabled { - uint256 internal immutable gasPerBlob = 2**17; + uint256 internal immutable gasPerBlob = 2 ** 17; /// @dev this refunds the sender for execution costs of the tx /// calldata costs are only refunded if `msg.sender == tx.origin` to guarantee the value refunded relates to charging @@ -21,7 +21,7 @@ abstract contract GasRefundEnabled { uint256 calldataSize = msg.data.length; uint256 calldataWords = (calldataSize + 31) / 32; // account for the CALLDATACOPY cost of the proxy contract, including the memory expansion cost - startGasLeft += calldataWords * 6 + (calldataWords**2) / 512; + startGasLeft += calldataWords * 6 + (calldataWords ** 2) / 512; // if triggered in a contract call, the spender may be overrefunded by appending dummy data to the call // so we check if it is a top level call, which would mean the sender paid calldata as part of tx.input // solhint-disable-next-line avoid-tx-origin @@ -39,8 +39,7 @@ abstract contract GasRefundEnabled { if (dataHashes.length != 0) { uint256 blobBasefee = reader4844.getBlobBaseFee(); startGasLeft += - (dataHashes.length * gasPerBlob * blobBasefee) / - block.basefee; + (dataHashes.length * gasPerBlob * blobBasefee) / block.basefee; } } catch {} } diff --git a/src/libraries/MerkleLib.sol b/src/libraries/MerkleLib.sol index fd80196f..6b7d29bc 100644 --- a/src/libraries/MerkleLib.sol +++ b/src/libraries/MerkleLib.sol @@ -7,15 +7,16 @@ pragma solidity ^0.8.4; import {MerkleProofTooLong} from "./Error.sol"; library MerkleLib { - function generateRoot(bytes32[] memory _hashes) internal pure returns (bytes32) { + function generateRoot( + bytes32[] memory _hashes + ) internal pure returns (bytes32) { bytes32[] memory prevLayer = _hashes; while (prevLayer.length > 1) { bytes32[] memory nextLayer = new bytes32[]((prevLayer.length + 1) / 2); for (uint256 i = 0; i < nextLayer.length; i++) { if (2 * i + 1 < prevLayer.length) { - nextLayer[i] = keccak256( - abi.encodePacked(prevLayer[2 * i], prevLayer[2 * i + 1]) - ); + nextLayer[i] = + keccak256(abi.encodePacked(prevLayer[2 * i], prevLayer[2 * i + 1])); } else { nextLayer[i] = prevLayer[2 * i]; } @@ -33,7 +34,7 @@ library MerkleLib { uint256 proofItems = nodes.length; if (proofItems > 256) revert MerkleProofTooLong(proofItems, 256); bytes32 h = item; - for (uint256 i = 0; i < proofItems; ) { + for (uint256 i = 0; i < proofItems;) { bytes32 node = nodes[i]; if ((route & (1 << i)) == 0) { assembly { diff --git a/src/libraries/UUPSNotUpgradeable.sol b/src/libraries/UUPSNotUpgradeable.sol index 228f1c4c..15e51f98 100644 --- a/src/libraries/UUPSNotUpgradeable.sol +++ b/src/libraries/UUPSNotUpgradeable.sol @@ -24,8 +24,7 @@ abstract contract UUPSNotUpgradeable is IERC1822Proxiable, DoubleLogicERC1967Upg modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require( - _getSecondaryImplementation() == __self, - "Function must be called through active proxy" + _getSecondaryImplementation() == __self, "Function must be called through active proxy" ); _; } @@ -36,8 +35,7 @@ abstract contract UUPSNotUpgradeable is IERC1822Proxiable, DoubleLogicERC1967Upg */ modifier notDelegated() { require( - address(this) == __self, - "UUPSNotUpgradeable: must not be called through delegatecall" + address(this) == __self, "UUPSNotUpgradeable: must not be called through delegatecall" ); _; } diff --git a/src/mocks/BridgeStub.sol b/src/mocks/BridgeStub.sol index 51d5ceb9..3c449795 100644 --- a/src/mocks/BridgeStub.sol +++ b/src/mocks/BridgeStub.sol @@ -35,20 +35,28 @@ contract BridgeStub is IBridge, IEthBridge { address public nativeToken; uint8 public nativeTokenDecimals; - function setSequencerInbox(address _sequencerInbox) external override { + function setSequencerInbox( + address _sequencerInbox + ) external override { sequencerInbox = _sequencerInbox; emit SequencerInboxUpdated(_sequencerInbox); } - function allowedDelayedInboxes(address inbox) external view override returns (bool) { + function allowedDelayedInboxes( + address inbox + ) external view override returns (bool) { return allowedDelayedInboxesMap[inbox].allowed; } - function allowedOutboxes(address) external pure override returns (bool) { + function allowedOutboxes( + address + ) external pure override returns (bool) { revert("NOT_IMPLEMENTED"); } - function updateRollupAddress(IOwnable) external pure { + function updateRollupAddress( + IOwnable + ) external pure { revert("NOT_IMPLEMENTED"); } @@ -58,15 +66,14 @@ contract BridgeStub is IBridge, IEthBridge { bytes32 messageDataHash ) external payable override returns (uint256) { require(allowedDelayedInboxesMap[msg.sender].allowed, "NOT_FROM_INBOX"); - return - addMessageToDelayedAccumulator( - kind, - sender, - block.number, - block.timestamp, // solhint-disable-line not-rely-on-time - block.basefee, - messageDataHash - ); + return addMessageToDelayedAccumulator( + kind, + sender, + block.number, + block.timestamp, // solhint-disable-line not-rely-on-time + block.basefee, + messageDataHash + ); } function enqueueSequencerMessage( @@ -76,17 +83,11 @@ contract BridgeStub is IBridge, IEthBridge { uint256 newMessageCount ) external - returns ( - uint256 seqMessageIndex, - bytes32 beforeAcc, - bytes32 delayedAcc, - bytes32 acc - ) + returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc) { if ( - sequencerReportedSubMessageCount != prevMessageCount && - prevMessageCount != 0 && - sequencerReportedSubMessageCount != 0 + sequencerReportedSubMessageCount != prevMessageCount && prevMessageCount != 0 + && sequencerReportedSubMessageCount != 0 ) { revert BadSequencerMessageNumber(sequencerReportedSubMessageCount, prevMessageCount); } @@ -102,10 +103,10 @@ contract BridgeStub is IBridge, IEthBridge { sequencerInboxAccs.push(acc); } - function submitBatchSpendingReport(address batchPoster, bytes32 dataHash) - external - returns (uint256) - { + function submitBatchSpendingReport( + address batchPoster, + bytes32 dataHash + ) external returns (uint256) { // TODO: implement stub } @@ -118,15 +119,8 @@ contract BridgeStub is IBridge, IEthBridge { bytes32 messageDataHash ) internal returns (uint256) { uint256 count = delayedInboxAccs.length; - bytes32 messageHash = Messages.messageHash( - 0, - address(uint160(0)), - 0, - 0, - 0, - 0, - messageDataHash - ); + bytes32 messageHash = + Messages.messageHash(0, address(uint160(0)), 0, 0, 0, 0, messageDataHash); bytes32 prevAcc = 0; if (count > 0) { prevAcc = delayedInboxAccs[count - 1]; @@ -136,11 +130,21 @@ contract BridgeStub is IBridge, IEthBridge { } function executeCall( - address, - uint256, - bytes calldata - ) external pure override returns (bool, bytes memory) { - revert("NOT_IMPLEMENTED"); + address to, + uint256 value, + bytes calldata data + ) external override returns (bool success, bytes memory returnData) { + (success, returnData) = _executeLowLevelCall(to, value, data); + emit BridgeCallTriggered(msg.sender, to, value, data); + } + + function _executeLowLevelCall( + address to, + uint256 value, + bytes memory data + ) internal returns (bool success, bytes memory returnData) { + // solhint-disable-next-line avoid-low-level-calls + (success, returnData) = to.call{value: value}(data); } function setDelayedInbox(address inbox, bool enabled) external override { @@ -154,19 +158,15 @@ contract BridgeStub is IBridge, IEthBridge { allowedDelayedInboxesMap[inbox] = InOutInfo(allowedDelayedInboxList.length, true); allowedDelayedInboxList.push(inbox); } else { - allowedDelayedInboxList[info.index] = allowedDelayedInboxList[ - allowedDelayedInboxList.length - 1 - ]; + allowedDelayedInboxList[info.index] = + allowedDelayedInboxList[allowedDelayedInboxList.length - 1]; allowedDelayedInboxesMap[allowedDelayedInboxList[info.index]].index = info.index; allowedDelayedInboxList.pop(); delete allowedDelayedInboxesMap[inbox]; } } - function setOutbox( - address, /* outbox */ - bool /* enabled*/ - ) external pure override { + function setOutbox(address, /* outbox */ bool /* enabled*/ ) external pure override { revert("NOT_IMPLEMENTED"); } @@ -184,7 +184,9 @@ contract BridgeStub is IBridge, IEthBridge { function acceptFundsFromOldBridge() external payable {} - function initialize(IOwnable) external pure { + function initialize( + IOwnable + ) external pure { revert("NOT_IMPLEMENTED"); } } diff --git a/src/mocks/InboxStub.sol b/src/mocks/InboxStub.sol index 182dda67..ca56de31 100644 --- a/src/mocks/InboxStub.sol +++ b/src/mocks/InboxStub.sol @@ -48,7 +48,9 @@ contract InboxStub is IInboxBase, IInbox { * @dev This method is an optimization to avoid having to emit the entirety of the messageData in a log. Instead validators are expected to be able to parse the data from the transaction's input * @param messageData Data of the message being sent */ - function sendL2MessageFromOrigin(bytes calldata messageData) external returns (uint256) { + function sendL2MessageFromOrigin( + bytes calldata messageData + ) external returns (uint256) { // solhint-disable-next-line avoid-tx-origin require(msg.sender == tx.origin, "origin only"); uint256 msgNum = deliverToBridge(L2_MSG, msg.sender, keccak256(messageData)); @@ -61,7 +63,9 @@ contract InboxStub is IInboxBase, IInbox { * @dev This method can be used to send any type of message that doesn't require L1 validation * @param messageData Data of the message being sent */ - function sendL2Message(bytes calldata messageData) external override returns (uint256) { + function sendL2Message( + bytes calldata messageData + ) external override returns (uint256) { uint256 msgNum = deliverToBridge(L2_MSG, msg.sender, keccak256(messageData)); emit InboxMessageDelivered(msgNum, messageData); return msgNum; @@ -72,12 +76,9 @@ contract InboxStub is IInboxBase, IInbox { address sender, bytes32 messageDataHash ) internal returns (uint256) { - return - IEthBridge(address(bridge)).enqueueDelayedMessage{value: msg.value}( - kind, - sender, - messageDataHash - ); + return IEthBridge(address(bridge)).enqueueDelayedMessage{value: msg.value}( + kind, sender, messageDataHash + ); } function sendUnsignedTransaction( @@ -181,14 +182,14 @@ contract InboxStub is IInboxBase, IInbox { revert("NOT_IMPLEMENTED"); } - function postUpgradeInit(IBridge _bridge) external {} + function postUpgradeInit( + IBridge _bridge + ) external {} - function calculateRetryableSubmissionFee(uint256, uint256) - external - pure - override - returns (uint256) - { + function calculateRetryableSubmissionFee( + uint256, + uint256 + ) external pure override returns (uint256) { revert("NOT_IMPLEMENTED"); } @@ -196,11 +197,15 @@ contract InboxStub is IInboxBase, IInbox { revert("NOT_IMPLEMENTED"); } - function setAllowListEnabled(bool) external pure { + function setAllowListEnabled( + bool + ) external pure { revert("NOT_IMPLEMENTED"); } - function isAllowed(address) external pure returns (bool) { + function isAllowed( + address + ) external pure returns (bool) { revert("NOT_IMPLEMENTED"); } diff --git a/src/mocks/MerkleTreeAccess.sol b/src/mocks/MerkleTreeAccess.sol new file mode 100644 index 00000000..14afbd90 --- /dev/null +++ b/src/mocks/MerkleTreeAccess.sol @@ -0,0 +1,72 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "../challengeV2/libraries/MerkleTreeAccumulatorLib.sol"; +import "../challengeV2/libraries/UintUtilsLib.sol"; + +contract MerkleTreeAccess { + function mostSignificantBit( + uint256 x + ) external pure returns (uint256) { + return UintUtilsLib.mostSignificantBit(x); + } + + function leastSignificantBit( + uint256 x + ) external pure returns (uint256) { + return UintUtilsLib.leastSignificantBit(x); + } + + function root( + bytes32[] memory me + ) external pure returns (bytes32) { + return MerkleTreeAccumulatorLib.root(me); + } + + function appendCompleteSubTree( + bytes32[] memory me, + uint256 level, + bytes32 subtreeRoot + ) external pure returns (bytes32[] memory) { + return MerkleTreeAccumulatorLib.appendCompleteSubTree(me, level, subtreeRoot); + } + + function appendLeaf( + bytes32[] memory me, + bytes32 leaf + ) external pure returns (bytes32[] memory) { + return MerkleTreeAccumulatorLib.appendLeaf(me, leaf); + } + + function maximumAppendBetween( + uint256 startSize, + uint256 endSize + ) external pure returns (uint256) { + return MerkleTreeAccumulatorLib.maximumAppendBetween(startSize, endSize); + } + + function verifyPrefixProof( + bytes32 preRoot, + uint256 preSize, + bytes32 postRoot, + uint256 postSize, + bytes32[] memory preExpansion, + bytes32[] memory proof + ) external pure { + return MerkleTreeAccumulatorLib.verifyPrefixProof( + preRoot, preSize, postRoot, postSize, preExpansion, proof + ); + } + + function verifyInclusionProof( + bytes32 rootHash, + bytes32 leaf, + uint256 index, + bytes32[] memory proof + ) external pure { + MerkleTreeAccumulatorLib.verifyInclusionProof(rootHash, leaf, index, proof); + } +} diff --git a/src/mocks/MockResultReceiver.sol b/src/mocks/MockResultReceiver.sol deleted file mode 100644 index 46a4dd11..00000000 --- a/src/mocks/MockResultReceiver.sol +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE -// SPDX-License-Identifier: BUSL-1.1 - -pragma solidity ^0.8.0; - -import "../challenge/IChallengeResultReceiver.sol"; -import "../challenge/IChallengeManager.sol"; - -contract MockResultReceiver is IChallengeResultReceiver { - IChallengeManager public manager; - address public winner; - address public loser; - uint256 public challengeIndex; - - event ChallengeCompleted( - uint256 indexed challengeIndex, - address indexed winner, - address indexed loser - ); - - constructor(IChallengeManager manager_) { - manager = manager_; - } - - function createChallenge( - bytes32 wasmModuleRoot_, - MachineStatus[2] calldata startAndEndMachineStatuses_, - GlobalState[2] calldata startAndEndGlobalStates_, - uint64 numBlocks, - address asserter_, - address challenger_, - uint256 asserterTimeLeft_, - uint256 challengerTimeLeft_ - ) external returns (uint64) { - return - manager.createChallenge( - wasmModuleRoot_, - startAndEndMachineStatuses_, - startAndEndGlobalStates_, - numBlocks, - asserter_, - challenger_, - asserterTimeLeft_, - challengerTimeLeft_ - ); - } - - function completeChallenge( - uint256 challengeIndex_, - address winner_, - address loser_ - ) external override { - winner = winner_; - loser = loser_; - challengeIndex = challengeIndex_; - emit ChallengeCompleted(challengeIndex, winner_, loser_); - } -} diff --git a/src/mocks/MockRollupEventInbox.sol b/src/mocks/MockRollupEventInbox.sol new file mode 100644 index 00000000..e3d0da31 --- /dev/null +++ b/src/mocks/MockRollupEventInbox.sol @@ -0,0 +1,59 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "../rollup/IRollupEventInbox.sol"; +import "../bridge/IEthBridge.sol"; +import "../bridge/IDelayedMessageProvider.sol"; +import "../precompiles/ArbGasInfo.sol"; +import "../libraries/DelegateCallAware.sol"; +import "../libraries/ArbitrumChecker.sol"; +import {INITIALIZATION_MSG_TYPE} from "../libraries/MessageTypes.sol"; +import {AlreadyInit, HadZeroInit} from "../libraries/Error.sol"; + +/** + * @title The inbox for rollup protocol events + */ +contract MockRollupEventInbox is IRollupEventInbox, IDelayedMessageProvider, DelegateCallAware { + IBridge public override bridge; + address public override rollup; + + modifier onlyRollup() { + require(msg.sender == rollup, "ONLY_ROLLUP"); + _; + } + + function initialize( + IBridge _bridge + ) external override onlyDelegated { + if (address(bridge) != address(0)) revert AlreadyInit(); + if (address(_bridge) == address(0)) revert HadZeroInit(); + bridge = _bridge; + rollup = address(_bridge.rollup()); + } + + /// @notice Allows the proxy owner to set the rollup address + function updateRollupAddress() external onlyDelegated onlyProxyOwner { + rollup = address(bridge.rollup()); + } + + function rollupInitialized( + uint256 chainId, + string calldata chainConfig + ) external override onlyRollup { + require(bytes(chainConfig).length > 0, "EMPTY_CHAIN_CONFIG"); + uint8 initMsgVersion = 1; + uint256 currentDataCost = 1; // Set to a base fee of 1. + if (ArbitrumChecker.runningOnArbitrum()) { + currentDataCost += ArbGasInfo(address(0x6c)).getL1BaseFeeEstimate(); + } + bytes memory initMsg = + abi.encodePacked(chainId, initMsgVersion, currentDataCost, chainConfig); + uint256 num = IEthBridge(address(bridge)).enqueueDelayedMessage( + INITIALIZATION_MSG_TYPE, address(0), keccak256(initMsg) + ); + emit InboxMessageDelivered(num, initMsg); + } +} diff --git a/src/mocks/MultiCallTest.sol b/src/mocks/MultiCallTest.sol index f5cedd31..8b538c72 100644 --- a/src/mocks/MultiCallTest.sol +++ b/src/mocks/MultiCallTest.sol @@ -26,7 +26,9 @@ contract MultiCallTest { // solhint-disable reason-string // solhint-disable avoid-low-level-calls // solhint-disable-next-line prettier/prettier - fallback(bytes calldata input) external payable returns (bytes memory) { + fallback( + bytes calldata input + ) external payable returns (bytes memory) { require(input.length > 0); uint8 count = uint8(input[0]); input = input[1:]; diff --git a/src/mocks/PendingBlkTimeAndNrAdvanceCheck.sol b/src/mocks/PendingBlkTimeAndNrAdvanceCheck.sol index 0676845a..58dd966a 100644 --- a/src/mocks/PendingBlkTimeAndNrAdvanceCheck.sol +++ b/src/mocks/PendingBlkTimeAndNrAdvanceCheck.sol @@ -21,7 +21,9 @@ contract PendingBlkTimeAndNrAdvanceCheck { require(ARB_SYS.arbBlockNumber() > deployedAtBlock, "Block didn't advance"); } - function checkArbBlockHashReturnsLatest(bytes32 expected) external { + function checkArbBlockHashReturnsLatest( + bytes32 expected + ) external { bytes32 gotBlockHash = ARB_SYS.arbBlockHash(ARB_SYS.arbBlockNumber() - 1); require(gotBlockHash != bytes32(0), "ZERO_BLOCK_HASH"); require(gotBlockHash == expected, "WRONG_BLOCK_HASH"); diff --git a/src/mocks/Program.sol b/src/mocks/Program.sol index 3966196d..ea674679 100644 --- a/src/mocks/Program.sol +++ b/src/mocks/Program.sol @@ -3,6 +3,7 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; + import "../precompiles/ArbSys.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; @@ -20,11 +21,10 @@ contract ProgramTest { require(hash == keccak256(data[1:])); } - function staticcallProgram(address program, bytes calldata data) - external - view - returns (bytes memory) - { + function staticcallProgram( + address program, + bytes calldata data + ) external view returns (bytes memory) { (bool success, bytes memory result) = address(program).staticcall(data); require(success, "call failed"); return result; @@ -101,7 +101,9 @@ contract ProgramTest { return result; } - function mathTest(address program) external { + function mathTest( + address program + ) external { uint256 value = 0xeddecf107b5740cef7f5a01e3ea7e287665c4e75a8eb6afae2fda2e3d4367786; value = mulmod( value, @@ -115,7 +117,7 @@ contract ProgramTest { ); unchecked { value /= 0xeddecf107b5740ce; - value = value**0xfffffffefffffc2f; + value = value ** 0xfffffffefffffc2f; value = value % 0xc6178c2de1078cd3; } diff --git a/src/mocks/SequencerInboxBlobMock.sol b/src/mocks/SequencerInboxBlobMock.sol new file mode 100644 index 00000000..1ef0a613 --- /dev/null +++ b/src/mocks/SequencerInboxBlobMock.sol @@ -0,0 +1,38 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "../bridge/SequencerInbox.sol"; + +contract SequencerInboxBlobMock is SequencerInbox { + constructor( + uint256 maxDataSize_, + IReader4844 reader_, + bool isUsingFeeToken_, + bool isDelayBufferable_ + ) SequencerInbox(maxDataSize_, reader_, isUsingFeeToken_, isDelayBufferable_) {} + + /// @dev Form a hash of the data being provided in 4844 data blobs + /// @param afterDelayedMessagesRead The delayed messages count read up to + /// @return The data hash + /// @return The timebounds within which the message should be processed + /// @return The normalized amount of gas used for blob posting + function formBlobDataHash( + uint256 afterDelayedMessagesRead + ) internal view override returns (bytes32, IBridge.TimeBounds memory, uint256) { + bytes32[3] memory dataHashes = [bytes32(0), bytes32(0), bytes32(0)]; + if (dataHashes.length == 0) revert MissingDataHashes(); + + (bytes memory header, IBridge.TimeBounds memory timeBounds) = + packHeader(afterDelayedMessagesRead); + uint256 BLOB_BASE_FEE = 1 gwei; + uint256 blobCost = BLOB_BASE_FEE * GAS_PER_BLOB * dataHashes.length; + return ( + keccak256(bytes.concat(header, DATA_BLOB_HEADER_FLAG, abi.encodePacked(dataHashes))), + timeBounds, + block.basefee > 0 ? blobCost / block.basefee : 0 + ); + } +} diff --git a/src/mocks/SequencerInboxStub.sol b/src/mocks/SequencerInboxStub.sol index 49b31702..43b143cb 100644 --- a/src/mocks/SequencerInboxStub.sol +++ b/src/mocks/SequencerInboxStub.sol @@ -15,8 +15,9 @@ contract SequencerInboxStub is SequencerInbox { ISequencerInbox.MaxTimeVariation memory maxTimeVariation_, uint256 maxDataSize_, IReader4844 reader4844_, - bool isUsingFeeToken_ - ) SequencerInbox(maxDataSize_, reader4844_, isUsingFeeToken_) { + bool isUsingFeeToken_, + bool isDelayBufferable_ + ) SequencerInbox(maxDataSize_, reader4844_, isUsingFeeToken_, isDelayBufferable_) { bridge = bridge_; rollup = IOwnable(msg.sender); delayBlocks = uint64(maxTimeVariation_.delayBlocks); @@ -26,22 +27,18 @@ contract SequencerInboxStub is SequencerInbox { isBatchPoster[sequencer_] = true; } - function addInitMessage(uint256 chainId) external { + function addInitMessage( + uint256 chainId + ) external { bytes memory initMsg = abi.encodePacked(chainId); uint256 num = IEthBridge(address(bridge)).enqueueDelayedMessage( - INITIALIZATION_MSG_TYPE, - address(0), - keccak256(initMsg) + INITIALIZATION_MSG_TYPE, address(0), keccak256(initMsg) ); require(num == 0, "ALREADY_DELAYED_INIT"); emit InboxMessageDelivered(num, initMsg); (bytes32 dataHash, IBridge.TimeBounds memory timeBounds) = formEmptyDataHash(1); - ( - uint256 sequencerMessageCount, - bytes32 beforeAcc, - bytes32 delayedAcc, - bytes32 afterAcc - ) = addSequencerL2BatchImpl(dataHash, 1, 0, 0, 1); + (uint256 sequencerMessageCount, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 afterAcc) = + addSequencerL2BatchImpl(dataHash, 1, 0, 0, 1); require(sequencerMessageCount == 0, "ALREADY_SEQ_INIT"); emit SequencerBatchDelivered( sequencerMessageCount, diff --git a/src/mocks/Simple.sol b/src/mocks/Simple.sol index b9aafc74..b8b4c680 100644 --- a/src/mocks/Simple.sol +++ b/src/mocks/Simple.sol @@ -21,7 +21,9 @@ contract Simple { counter++; } - function logAndIncrement(uint256 expected) external { + function logAndIncrement( + uint256 expected + ) external { emit LogAndIncrementCalled(expected, counter); counter++; } @@ -67,8 +69,7 @@ contract Simple { require(ArbSys(address(100)).isTopLevelCall() == expected, "UNEXPECTED_RESULT"); } else { require( - ArbSys(address(100)).wasMyCallersAddressAliased() == expected, - "UNEXPECTED_RESULT" + ArbSys(address(100)).wasMyCallersAddressAliased() == expected, "UNEXPECTED_RESULT" ); } } @@ -86,8 +87,7 @@ contract Simple { require(ArbSys(address(100)).isTopLevelCall() == directCase, "UNEXPECTED_RESULT"); } else { require( - ArbSys(address(100)).wasMyCallersAddressAliased() == directCase, - "UNEXPECTED_RESULT" + ArbSys(address(100)).wasMyCallersAddressAliased() == directCase, "UNEXPECTED_RESULT" ); } @@ -96,19 +96,15 @@ contract Simple { // DELEGATE CALL bytes memory data = abi.encodeWithSelector( - this.checkIsTopLevelOrWasAliased.selector, - useTopLevel, - delegateCase + this.checkIsTopLevelOrWasAliased.selector, useTopLevel, delegateCase ); // solhint-disable-next-line avoid-low-level-calls - (bool success, ) = address(this).delegatecall(data); + (bool success,) = address(this).delegatecall(data); require(success, "DELEGATE_CALL_FAILED"); // CALLCODE data = abi.encodeWithSelector( - this.checkIsTopLevelOrWasAliased.selector, - useTopLevel, - callcodeCase + this.checkIsTopLevelOrWasAliased.selector, useTopLevel, callcodeCase ); assembly { success := callcode(gas(), address(), 0, add(data, 32), mload(data), 0, 0) @@ -116,13 +112,10 @@ contract Simple { require(success, "CALLCODE_FAILED"); // CALL - data = abi.encodeWithSelector( - this.checkIsTopLevelOrWasAliased.selector, - useTopLevel, - callCase - ); + data = + abi.encodeWithSelector(this.checkIsTopLevelOrWasAliased.selector, useTopLevel, callCase); // solhint-disable-next-line avoid-low-level-calls - (success, ) = address(this).call(data); + (success,) = address(this).call(data); require(success, "CALL_FAILED"); } @@ -132,7 +125,7 @@ contract Simple { // so we ignore the result of this call. // solhint-disable-next-line avoid-low-level-calls // solc-ignore-next-line unused-call-retval - to.staticcall{gas: before - 10000}(input); + to.staticcall{gas: before - 10000}(input);// forgefmt: disable-line return before - gasleft(); } @@ -145,12 +138,7 @@ contract Simple { uint256 delayedMessagesRead = sequencerInbox.totalDelayedMessagesRead(); for (uint256 i = 0; i < numberToPost; i++) { sequencerInbox.addSequencerL2Batch( - sequenceNumber, - batchData, - delayedMessagesRead, - IGasRefunder(address(0)), - 0, - 0 + sequenceNumber, batchData, delayedMessagesRead, IGasRefunder(address(0)), 0, 0 ); sequenceNumber++; } diff --git a/src/mocks/SimpleCacheManager.sol b/src/mocks/SimpleCacheManager.sol index 4ae17ed5..20d5e30f 100644 --- a/src/mocks/SimpleCacheManager.sol +++ b/src/mocks/SimpleCacheManager.sol @@ -3,18 +3,25 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; + import "../precompiles/ArbWasmCache.sol"; contract SimpleCacheManager { - function cacheProgram(address program) external { + function cacheProgram( + address program + ) external { ArbWasmCache(address(0x72)).cacheProgram(program); } - function evictProgram(address program) external { + function evictProgram( + address program + ) external { ArbWasmCache(address(0x72)).evictCodehash(codehash(program)); } - function codehash(address program) internal view returns (bytes32 hash) { + function codehash( + address program + ) internal view returns (bytes32 hash) { assembly { hash := extcodehash(program) } diff --git a/src/mocks/SimpleOneStepProofEntry.sol b/src/mocks/SimpleOneStepProofEntry.sol new file mode 100644 index 00000000..cae42455 --- /dev/null +++ b/src/mocks/SimpleOneStepProofEntry.sol @@ -0,0 +1,60 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "../challengeV2/EdgeChallengeManager.sol"; +import "../state/Deserialize.sol"; + +contract SimpleOneStepProofEntry is IOneStepProofEntry { + using GlobalStateLib for GlobalState; + + // End the batch after 2000 steps. This results in 11 blocks for an honest validator. + // This constant must be synchronized with the one in execution/engine.go + uint64 public constant STEPS_PER_BATCH = 2000; + + function getStartMachineHash( + bytes32 globalStateHash, + bytes32 wasmModuleRoot + ) external pure returns (bytes32) { + return keccak256(abi.encodePacked("Machine:", globalStateHash, wasmModuleRoot)); + } + + function proveOneStep( + ExecutionContext calldata execCtx, + uint256 step, + bytes32 beforeHash, + bytes calldata proof + ) external view returns (bytes32 afterHash) { + if (proof.length == 0) { + revert("EMPTY_PROOF"); + } + GlobalState memory globalState; + uint256 offset; + (globalState.u64Vals[0], offset) = Deserialize.u64(proof, offset); + (globalState.u64Vals[1], offset) = Deserialize.u64(proof, offset); + if (step > 0 && (beforeHash[0] == 0 || globalState.getPositionInMessage() == 0)) { + // We end the block when the first byte of the hash hits 0 or we advance a batch + return beforeHash; + } + if (globalState.getInboxPosition() >= execCtx.maxInboxMessagesRead) { + // We can't continue further because we've hit the max inbox messages read + return beforeHash; + } + require(globalState.hash() == beforeHash, "BAD_PROOF"); + globalState.u64Vals[1]++; + if (globalState.u64Vals[1] % STEPS_PER_BATCH == 0) { + globalState.u64Vals[0]++; + globalState.u64Vals[1] = 0; + } + return globalState.hash(); + } + + function getMachineHash( + ExecutionState calldata execState + ) external pure override returns (bytes32) { + require(execState.machineStatus == MachineStatus.FINISHED, "BAD_MACHINE_STATUS"); + return execState.globalState.hash(); + } +} diff --git a/src/mocks/SimpleProxy.sol b/src/mocks/SimpleProxy.sol index e69f891c..4e46e96c 100644 --- a/src/mocks/SimpleProxy.sol +++ b/src/mocks/SimpleProxy.sol @@ -9,7 +9,9 @@ import "@openzeppelin/contracts/proxy/Proxy.sol"; contract SimpleProxy is Proxy { address private immutable impl; - constructor(address impl_) { + constructor( + address impl_ + ) { impl = impl_; } diff --git a/src/mocks/SingleExecutionChallenge.sol b/src/mocks/SingleExecutionChallenge.sol deleted file mode 100644 index cd44ce1e..00000000 --- a/src/mocks/SingleExecutionChallenge.sol +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE -// SPDX-License-Identifier: BUSL-1.1 - -pragma solidity ^0.8.0; - -import "../challenge/ChallengeManager.sol"; - -contract SingleExecutionChallenge is ChallengeManager { - constructor( - IOneStepProofEntry osp_, - IChallengeResultReceiver resultReceiver_, - uint64 maxInboxMessagesRead_, - bytes32[2] memory startAndEndHashes, - uint256 numSteps_, - address asserter_, - address challenger_, - uint256 asserterTimeLeft_, - uint256 challengerTimeLeft_ - ) { - osp = osp_; - resultReceiver = resultReceiver_; - uint64 challengeIndex = ++totalChallengesCreated; - ChallengeLib.Challenge storage challenge = challenges[challengeIndex]; - challenge.maxInboxMessages = maxInboxMessagesRead_; - bytes32[] memory segments = new bytes32[](2); - segments[0] = startAndEndHashes[0]; - segments[1] = startAndEndHashes[1]; - bytes32 challengeStateHash = ChallengeLib.hashChallengeState(0, numSteps_, segments); - challenge.challengeStateHash = challengeStateHash; - challenge.next = ChallengeLib.Participant({addr: asserter_, timeLeft: asserterTimeLeft_}); - challenge.current = ChallengeLib.Participant({ - addr: challenger_, - timeLeft: challengerTimeLeft_ - }); - challenge.lastMoveTimestamp = block.timestamp; - challenge.mode = ChallengeLib.ChallengeMode.EXECUTION; - - emit Bisected(challengeIndex, challengeStateHash, 0, numSteps_, segments); - } -} diff --git a/src/mocks/TestWETH9.sol b/src/mocks/TestWETH9.sol new file mode 100644 index 00000000..d4ff18cb --- /dev/null +++ b/src/mocks/TestWETH9.sol @@ -0,0 +1,30 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +interface IWETH9 { + function deposit() external payable; + + function withdraw( + uint256 _amount + ) external; +} + +contract TestWETH9 is ERC20, IWETH9 { + constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {} + + function deposit() external payable override { + _mint(msg.sender, msg.value); + } + + function withdraw( + uint256 _amount + ) external override { + _burn(msg.sender, _amount); + payable(address(msg.sender)).transfer(_amount); + } +} diff --git a/src/mocks/TimedOutChallengeManager.sol b/src/mocks/TimedOutChallengeManager.sol deleted file mode 100644 index 83e0457f..00000000 --- a/src/mocks/TimedOutChallengeManager.sol +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE -// SPDX-License-Identifier: BUSL-1.1 - -pragma solidity ^0.8.0; - -import "../challenge/ChallengeManager.sol"; - -contract TimedOutChallengeManager is ChallengeManager { - function isTimedOut(uint64) public pure override returns (bool) { - return true; - } -} diff --git a/src/mocks/UpgradeExecutorMock.sol b/src/mocks/UpgradeExecutorMock.sol index 6b7ca9db..fc66d0da 100644 --- a/src/mocks/UpgradeExecutorMock.sol +++ b/src/mocks/UpgradeExecutorMock.sol @@ -47,16 +47,13 @@ contract UpgradeExecutorMock is /// @dev Only executor can call this. Since we're using a delegatecall here the Upgrade contract /// will have access to the state of this contract - including the roles. Only upgrade contracts /// that do not touch local state should be used. - function execute(address upgrade, bytes memory upgradeCallData) - public - payable - onlyRole(EXECUTOR_ROLE) - nonReentrant - { + function execute( + address upgrade, + bytes memory upgradeCallData + ) public payable onlyRole(EXECUTOR_ROLE) nonReentrant { // OZ Address library check if the address is a contract and bubble up inner revert reason address(upgrade).functionDelegateCall( - upgradeCallData, - "UpgradeExecutor: inner delegate call failed without reason" + upgradeCallData, "UpgradeExecutor: inner delegate call failed without reason" ); emit UpgradeExecuted(upgrade, msg.value, upgradeCallData); @@ -64,17 +61,13 @@ contract UpgradeExecutorMock is /// @notice Execute an upgrade by directly calling target contract /// @dev Only executor can call this. - function executeCall(address target, bytes memory targetCallData) - public - payable - onlyRole(EXECUTOR_ROLE) - nonReentrant - { + function executeCall( + address target, + bytes memory targetCallData + ) public payable onlyRole(EXECUTOR_ROLE) nonReentrant { // OZ Address library check if the address is a contract and bubble up inner revert reason address(target).functionCallWithValue( - targetCallData, - msg.value, - "UpgradeExecutor: inner call failed without reason" + targetCallData, msg.value, "UpgradeExecutor: inner call failed without reason" ); emit TargetCallExecuted(target, msg.value, targetCallData); diff --git a/src/node-interface/NodeInterface.sol b/src/node-interface/NodeInterface.sol index 7633b287..c1c692e2 100644 --- a/src/node-interface/NodeInterface.sol +++ b/src/node-interface/NodeInterface.sol @@ -4,7 +4,8 @@ pragma solidity >=0.4.21 <0.9.0; -/** @title Interface for providing gas estimation for retryable auto-redeems and constructing outbox proofs +/** + * @title Interface for providing gas estimation for retryable auto-redeems and constructing outbox proofs * @notice This contract doesn't exist on-chain. Instead it is a virtual interface accessible at * 0x00000000000000000000000000000000000000C8 * This is a cute trick to allow an Arbitrum node to provide data without us having to implement additional RPCs @@ -41,14 +42,10 @@ interface NodeInterface { * @return root the root of the outbox accumulator * @return proof level-by-level branch hashes constituting a proof of the send's membership at the given size */ - function constructOutboxProof(uint64 size, uint64 leaf) - external - view - returns ( - bytes32 send, - bytes32 root, - bytes32[] memory proof - ); + function constructOutboxProof( + uint64 size, + uint64 leaf + ) external view returns (bytes32 send, bytes32 root, bytes32[] memory proof); /** * @notice Finds the L1 batch containing a requested L2 block, reverting if none does. @@ -57,7 +54,9 @@ interface NodeInterface { * @param blockNum The L2 block being queried * @return batch The sequencer batch number containing the requested L2 block */ - function findBatchContainingBlock(uint64 blockNum) external view returns (uint64 batch); + function findBatchContainingBlock( + uint64 blockNum + ) external view returns (uint64 batch); /** * @notice Gets the number of L1 confirmations of the sequencer batch producing the requested L2 block @@ -68,7 +67,9 @@ interface NodeInterface { * @param blockHash The hash of the L2 block being queried * @return confirmations The number of L1 confirmations the sequencer batch has. Returns 0 if block not yet included in an L1 batch. */ - function getL1Confirmations(bytes32 blockHash) external view returns (uint64 confirmations); + function getL1Confirmations( + bytes32 blockHash + ) external view returns (uint64 confirmations); /** * @notice Same as native gas estimation, but with additional info on the l1 costs. @@ -116,11 +117,7 @@ interface NodeInterface { ) external payable - returns ( - uint64 gasEstimateForL1, - uint256 baseFee, - uint256 l1BaseFeeEstimate - ); + returns (uint64 gasEstimateForL1, uint256 baseFee, uint256 l1BaseFeeEstimate); /** * @notice Returns the proof necessary to redeem a message @@ -136,7 +133,10 @@ interface NodeInterface { * @return amount value in L1 message in wei * @return calldataForL1 abi-encoded L1 message data */ - function legacyLookupMessageBatchProof(uint256 batchNum, uint64 index) + function legacyLookupMessageBatchProof( + uint256 batchNum, + uint64 index + ) external view returns ( @@ -158,7 +158,9 @@ interface NodeInterface { // @notice Returns the L1 block number of the L2 block // @return l1BlockNum The L1 block number - function blockL1Num(uint64 l2BlockNum) external view returns (uint64 l1BlockNum); + function blockL1Num( + uint64 l2BlockNum + ) external view returns (uint64 l1BlockNum); /** * @notice Finds the L2 block number range that has the given L1 block number @@ -167,8 +169,7 @@ interface NodeInterface { * @return firstBlock The first L2 block number with the given L1 block number * @return lastBlock The last L2 block number with the given L1 block number */ - function l2BlockRangeForL1(uint64 blockNum) - external - view - returns (uint64 firstBlock, uint64 lastBlock); + function l2BlockRangeForL1( + uint64 blockNum + ) external view returns (uint64 firstBlock, uint64 lastBlock); } diff --git a/src/node-interface/NodeInterfaceDebug.sol b/src/node-interface/NodeInterfaceDebug.sol index faeacb74..13d6ae96 100644 --- a/src/node-interface/NodeInterfaceDebug.sol +++ b/src/node-interface/NodeInterfaceDebug.sol @@ -4,12 +4,12 @@ pragma solidity >=0.4.21 <0.9.0; -/** @title An extension to NodeInterface not meant for public consumption. Do not call. +/** + * @title An extension to NodeInterface not meant for public consumption. Do not call. * @notice This contract doesn't exist on-chain. Instead it is a virtual interface accessible at 0xc9. * These methods add additional debugging and network monitoring instruments not intended for end users and * as such may change without notice. */ - interface NodeInterfaceDebug { struct RetryableInfo { uint64 timeout; @@ -26,5 +26,7 @@ interface NodeInterfaceDebug { * @param ticket the retryable's id * @return retryable the serialized retryable */ - function getRetryable(bytes32 ticket) external view returns (RetryableInfo memory retryable); + function getRetryable( + bytes32 ticket + ) external view returns (RetryableInfo memory retryable); } diff --git a/src/osp/HashProofHelper.sol b/src/osp/HashProofHelper.sol index b211908f..12c88873 100644 --- a/src/osp/HashProofHelper.sol +++ b/src/osp/HashProofHelper.sol @@ -30,10 +30,10 @@ contract HashProofHelper { uint256 private constant MAX_PART_LENGTH = 32; uint256 private constant KECCAK_ROUND_INPUT = 136; - function proveWithFullPreimage(bytes calldata data, uint64 offset) - external - returns (bytes32 fullHash) - { + function proveWithFullPreimage( + bytes calldata data, + uint64 offset + ) external returns (bytes32 fullHash) { fullHash = keccak256(data); bytes memory part; if (data.length > offset) { @@ -96,11 +96,7 @@ contract HashProofHelper { delete keccakStates[msg.sender]; } - function keccakUpdate( - KeccakState storage state, - bytes calldata data, - bool isFinal - ) internal { + function keccakUpdate(KeccakState storage state, bytes calldata data, bool isFinal) internal { state.length += data.length; while (true) { if (data.length == 0 && !isFinal) { @@ -144,7 +140,10 @@ contract HashProofHelper { } /// Retrieves up to 32 bytes of the preimage of fullHash at the given offset, reverting if it hasn't been proven yet. - function getPreimagePart(bytes32 fullHash, uint64 offset) external view returns (bytes memory) { + function getPreimagePart( + bytes32 fullHash, + uint64 offset + ) external view returns (bytes memory) { PreimagePart storage part = preimageParts[fullHash][offset]; if (!part.proven) { revert NotProven(fullHash, offset); diff --git a/src/osp/IOneStepProofEntry.sol b/src/osp/IOneStepProofEntry.sol index 552819cf..2c4b62cc 100644 --- a/src/osp/IOneStepProofEntry.sol +++ b/src/osp/IOneStepProofEntry.sol @@ -5,21 +5,22 @@ pragma solidity ^0.8.0; import "./IOneStepProver.sol"; +import "../state/Machine.sol"; library OneStepProofEntryLib { uint256 internal constant MAX_STEPS = 1 << 43; } -interface IOneStepProofEntry { - function getStartMachineHash(bytes32 globalStateHash, bytes32 wasmModuleRoot) - external - pure - returns (bytes32); +struct ExecutionState { + GlobalState globalState; + MachineStatus machineStatus; +} - function getEndMachineHash(MachineStatus status, bytes32 globalStateHash) - external - pure - returns (bytes32); +interface IOneStepProofEntry { + function getStartMachineHash( + bytes32 globalStateHash, + bytes32 wasmModuleRoot + ) external pure returns (bytes32); function proveOneStep( ExecutionContext calldata execCtx, @@ -27,4 +28,8 @@ interface IOneStepProofEntry { bytes32 beforeHash, bytes calldata proof ) external view returns (bytes32 afterHash); + + function getMachineHash( + ExecutionState calldata execState + ) external pure returns (bytes32); } diff --git a/src/osp/IOneStepProver.sol b/src/osp/IOneStepProver.sol index 2e11e657..6fbc7422 100644 --- a/src/osp/IOneStepProver.sol +++ b/src/osp/IOneStepProver.sol @@ -14,6 +14,7 @@ import "../bridge/IBridge.sol"; struct ExecutionContext { uint256 maxInboxMessagesRead; IBridge bridge; + bytes32 initialWasmModuleRoot; } abstract contract IOneStepProver { diff --git a/src/osp/OneStepProofEntry.sol b/src/osp/OneStepProofEntry.sol index 7fbacc2a..a669d458 100644 --- a/src/osp/OneStepProofEntry.sol +++ b/src/osp/OneStepProofEntry.sol @@ -1,4 +1,4 @@ -// Copyright 2021-2023, Offchain Labs, Inc. +// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 @@ -14,6 +14,7 @@ import "./IOneStepProofEntry.sol"; contract OneStepProofEntry is IOneStepProofEntry { using MerkleProofLib for MerkleProof; using MachineLib for Machine; + using GlobalStateLib for GlobalState; using MultiStackLib for MultiStack; using ValueStackLib for ValueStack; @@ -36,12 +37,11 @@ contract OneStepProofEntry is IOneStepProofEntry { proverHostIo = proverHostIo_; } - // Copied from ChallengeLib.sol - function getStartMachineHash(bytes32 globalStateHash, bytes32 wasmModuleRoot) - external - pure - returns (bytes32) - { + // Copied from OldChallengeLib.sol + function getStartMachineHash( + bytes32 globalStateHash, + bytes32 wasmModuleRoot + ) public pure returns (bytes32) { // Start the value stack with the function call ABI for the entrypoint Value[] memory startingValues = new Value[](3); startingValues[0] = ValueLib.newRefNull(); @@ -71,20 +71,15 @@ contract OneStepProofEntry is IOneStepProofEntry { return mach.hash(); } - // Copied from ChallengeLib.sol - function getEndMachineHash(MachineStatus status, bytes32 globalStateHash) - external - pure - returns (bytes32) - { - if (status == MachineStatus.FINISHED) { - return keccak256(abi.encodePacked("Machine finished:", globalStateHash)); - } else if (status == MachineStatus.ERRORED) { - return keccak256(abi.encodePacked("Machine errored:")); - } else if (status == MachineStatus.TOO_FAR) { - return keccak256(abi.encodePacked("Machine too far:")); + function getMachineHash( + ExecutionState calldata execState + ) external pure override returns (bytes32) { + if (execState.machineStatus == MachineStatus.FINISHED) { + return keccak256(abi.encodePacked("Machine finished:", execState.globalState.hash())); + } else if (execState.machineStatus == MachineStatus.ERRORED) { + return keccak256(abi.encodePacked("Machine errored:", execState.globalState.hash())); } else { - revert("BAD_BLOCK_STATUS"); + revert("BAD_MACHINE_STATUS"); } } @@ -106,6 +101,16 @@ contract OneStepProofEntry is IOneStepProofEntry { if (mach.status != MachineStatus.RUNNING) { // Machine is halted. // WARNING: at this point, most machine fields are unconstrained. + GlobalState memory globalState; + (globalState, offset) = Deserialize.globalState(proof, offset); + require(globalState.hash() == mach.globalStateHash, "BAD_GLOBAL_STATE"); + if ( + mach.status == MachineStatus.FINISHED && machineStep == 0 + && globalState.getInboxPosition() < execCtx.maxInboxMessagesRead + ) { + // Kickstart the machine + return getStartMachineHash(mach.globalStateHash, execCtx.initialWasmModuleRoot); + } return mach.hash(); } @@ -128,14 +133,10 @@ contract OneStepProofEntry is IOneStepProofEntry { (codeChunk, offset) = Deserialize.instructions(proof, offset); (codeProof, offset) = Deserialize.merkleProof(proof, offset); (funcProof, offset) = Deserialize.merkleProof(proof, offset); - bytes32 codeHash = codeProof.computeRootFromInstructions( - mach.functionPc / 64, - codeChunk - ); - bytes32 recomputedRoot = funcProof.computeRootFromFunction( - mach.functionIdx, - codeHash - ); + bytes32 codeHash = + codeProof.computeRootFromInstructions(mach.functionPc / 64, codeChunk); + bytes32 recomputedRoot = + funcProof.computeRootFromFunction(mach.functionIdx, codeHash); require(recomputedRoot == mod.functionsMerkleRoot, "BAD_FUNCTIONS_ROOT"); inst = codeChunk[mach.functionPc % 64]; } @@ -147,36 +148,44 @@ contract OneStepProofEntry is IOneStepProofEntry { uint16 opcode = inst.opcode; IOneStepProver prover; if ( - (opcode >= Instructions.I32_LOAD && opcode <= Instructions.I64_LOAD32_U) || - (opcode >= Instructions.I32_STORE && opcode <= Instructions.I64_STORE32) || - opcode == Instructions.MEMORY_SIZE || - opcode == Instructions.MEMORY_GROW + (opcode >= Instructions.I32_LOAD && opcode <= Instructions.I64_LOAD32_U) + || (opcode >= Instructions.I32_STORE && opcode <= Instructions.I64_STORE32) + || opcode == Instructions.MEMORY_SIZE || opcode == Instructions.MEMORY_GROW ) { prover = proverMem; } else if ( - (opcode == Instructions.I32_EQZ || opcode == Instructions.I64_EQZ) || - (opcode >= Instructions.I32_RELOP_BASE && - opcode <= Instructions.I32_RELOP_BASE + Instructions.IRELOP_LAST) || - (opcode >= Instructions.I32_UNOP_BASE && - opcode <= Instructions.I32_UNOP_BASE + Instructions.IUNOP_LAST) || - (opcode >= Instructions.I32_ADD && opcode <= Instructions.I32_ROTR) || - (opcode >= Instructions.I64_RELOP_BASE && - opcode <= Instructions.I64_RELOP_BASE + Instructions.IRELOP_LAST) || - (opcode >= Instructions.I64_UNOP_BASE && - opcode <= Instructions.I64_UNOP_BASE + Instructions.IUNOP_LAST) || - (opcode >= Instructions.I64_ADD && opcode <= Instructions.I64_ROTR) || - (opcode == Instructions.I32_WRAP_I64) || - (opcode == Instructions.I64_EXTEND_I32_S || opcode == Instructions.I64_EXTEND_I32_U) || - (opcode >= Instructions.I32_EXTEND_8S && opcode <= Instructions.I64_EXTEND_32S) || - (opcode >= Instructions.I32_REINTERPRET_F32 && - opcode <= Instructions.F64_REINTERPRET_I64) + (opcode == Instructions.I32_EQZ || opcode == Instructions.I64_EQZ) + || ( + opcode >= Instructions.I32_RELOP_BASE + && opcode <= Instructions.I32_RELOP_BASE + Instructions.IRELOP_LAST + ) + || ( + opcode >= Instructions.I32_UNOP_BASE + && opcode <= Instructions.I32_UNOP_BASE + Instructions.IUNOP_LAST + ) || (opcode >= Instructions.I32_ADD && opcode <= Instructions.I32_ROTR) + || ( + opcode >= Instructions.I64_RELOP_BASE + && opcode <= Instructions.I64_RELOP_BASE + Instructions.IRELOP_LAST + ) + || ( + opcode >= Instructions.I64_UNOP_BASE + && opcode <= Instructions.I64_UNOP_BASE + Instructions.IUNOP_LAST + ) || (opcode >= Instructions.I64_ADD && opcode <= Instructions.I64_ROTR) + || (opcode == Instructions.I32_WRAP_I64) + || (opcode == Instructions.I64_EXTEND_I32_S || opcode == Instructions.I64_EXTEND_I32_U) + || (opcode >= Instructions.I32_EXTEND_8S && opcode <= Instructions.I64_EXTEND_32S) + || ( + opcode >= Instructions.I32_REINTERPRET_F32 + && opcode <= Instructions.F64_REINTERPRET_I64 + ) ) { prover = proverMath; } else if ( - (opcode >= Instructions.GET_GLOBAL_STATE_BYTES32 && - opcode <= Instructions.SET_GLOBAL_STATE_U64) || - (opcode >= Instructions.READ_PRE_IMAGE && opcode <= Instructions.UNLINK_MODULE) || - (opcode >= Instructions.NEW_COTHREAD && opcode <= Instructions.SWITCH_COTHREAD) + ( + opcode >= Instructions.GET_GLOBAL_STATE_BYTES32 + && opcode <= Instructions.SET_GLOBAL_STATE_U64 + ) || (opcode >= Instructions.READ_PRE_IMAGE && opcode <= Instructions.UNLINK_MODULE) + || (opcode >= Instructions.NEW_COTHREAD && opcode <= Instructions.SWITCH_COTHREAD) ) { prover = proverHostIo; } else { @@ -185,8 +194,8 @@ contract OneStepProofEntry is IOneStepProofEntry { (mach, mod) = prover.executeOneStep(execCtx, mach, mod, inst, proof); - bool updateRoot = !(opcode == Instructions.LINK_MODULE || - opcode == Instructions.UNLINK_MODULE); + bool updateRoot = + !(opcode == Instructions.LINK_MODULE || opcode == Instructions.UNLINK_MODULE); if (updateRoot) { mach.modulesRoot = modProof.computeRootFromModule(oldModIdx, mod); } diff --git a/src/osp/OneStepProver0.sol b/src/osp/OneStepProver0.sol index 671ff074..d94381ba 100644 --- a/src/osp/OneStepProver0.sol +++ b/src/osp/OneStepProver0.sol @@ -94,7 +94,9 @@ contract OneStepProver0 is IOneStepProver { mach.setPc(frame.returnPc); } - function createReturnValue(Machine memory mach) internal pure returns (Value memory) { + function createReturnValue( + Machine memory mach + ) internal pure returns (Value memory) { return ValueLib.newPc(mach.functionPc, mach.functionIdx, mach.moduleIdx); } @@ -252,16 +254,11 @@ contract OneStepProver0 is IOneStepProver { (tableMerkleProof, offset) = Deserialize.merkleProof(proof, offset); // Validate the information by recomputing known hashes - bytes32 recomputed = keccak256( - abi.encodePacked("Call indirect:", tableIdx, wantedFuncTypeHash) - ); + bytes32 recomputed = + keccak256(abi.encodePacked("Call indirect:", tableIdx, wantedFuncTypeHash)); require(recomputed == bytes32(inst.argumentData), "BAD_CALL_INDIRECT_DATA"); - recomputed = tableMerkleProof.computeRootFromTable( - tableIdx, - tableType, - tableSize, - elemsRoot - ); + recomputed = + tableMerkleProof.computeRootFromTable(tableIdx, tableType, tableSize, elemsRoot); require(recomputed == mod.tablesMerkleRoot, "BAD_TABLES_ROOT"); // Check if the table access is out of bounds @@ -278,9 +275,7 @@ contract OneStepProver0 is IOneStepProver { (functionPointer, offset) = Deserialize.value(proof, offset); (elementMerkleProof, offset) = Deserialize.merkleProof(proof, offset); bytes32 recomputedElemRoot = elementMerkleProof.computeRootFromElement( - elementIdx, - elemFuncTypeHash, - functionPointer + elementIdx, elemFuncTypeHash, functionPointer ); require(recomputedElemRoot == elemsRoot, "BAD_ELEMENTS_ROOT"); @@ -390,12 +385,8 @@ contract OneStepProver0 is IOneStepProver { ) internal pure { Value memory newVal = mach.valueStack.pop(); StackFrame memory frame = mach.frameStack.peek(); - frame.localsMerkleRoot = merkleProveSetValue( - frame.localsMerkleRoot, - inst.argumentData, - newVal, - proof - ); + frame.localsMerkleRoot = + merkleProveSetValue(frame.localsMerkleRoot, inst.argumentData, newVal, proof); } function executeGlobalGet( @@ -415,12 +406,8 @@ contract OneStepProver0 is IOneStepProver { bytes calldata proof ) internal pure { Value memory newVal = mach.valueStack.pop(); - mod.globalsMerkleRoot = merkleProveSetValue( - mod.globalsMerkleRoot, - inst.argumentData, - newVal, - proof - ); + mod.globalsMerkleRoot = + merkleProveSetValue(mod.globalsMerkleRoot, inst.argumentData, newVal, proof); } function executeInitFrame( @@ -523,8 +510,8 @@ contract OneStepProver0 is IOneStepProver { } else if (opcode >= Instructions.I32_CONST && opcode <= Instructions.F64_CONST) { impl = executeConstPush; } else if ( - opcode == Instructions.MOVE_FROM_STACK_TO_INTERNAL || - opcode == Instructions.MOVE_FROM_INTERNAL_TO_STACK + opcode == Instructions.MOVE_FROM_STACK_TO_INTERNAL + || opcode == Instructions.MOVE_FROM_INTERNAL_TO_STACK ) { impl = executeMoveInternal; } else if (opcode == Instructions.DUP) { diff --git a/src/osp/OneStepProverHostIo.sol b/src/osp/OneStepProverHostIo.sol index f5f124d2..d98865cf 100644 --- a/src/osp/OneStepProverHostIo.sol +++ b/src/osp/OneStepProverHostIo.sol @@ -29,11 +29,7 @@ contract OneStepProverHostIo is IOneStepProver { uint64 private constant INBOX_HEADER_LEN = 40; uint64 private constant DELAYED_HEADER_LEN = 112 + 1; - function setLeafByte( - bytes32 oldLeaf, - uint256 idx, - uint8 val - ) internal pure returns (bytes32) { + function setLeafByte(bytes32 oldLeaf, uint256 idx, uint8 val) internal pure returns (bytes32) { require(idx < LEAF_SIZE, "BAD_SET_LEAF_BYTE_IDX"); // Take into account that we are casting the leaf to a big-endian integer uint256 leafShift = (LEAF_SIZE - 1 - idx) * 8; @@ -66,17 +62,12 @@ contract OneStepProverHostIo is IOneStepProver { uint256 proofOffset = 0; bytes32 startLeafContents; MerkleProof memory merkleProof; - (startLeafContents, proofOffset, merkleProof) = mod.moduleMemory.proveLeaf( - leafIdx, - proof, - proofOffset - ); + (startLeafContents, proofOffset, merkleProof) = + mod.moduleMemory.proveLeaf(leafIdx, proof, proofOffset); if (inst.opcode == Instructions.GET_GLOBAL_STATE_BYTES32) { - mod.moduleMemory.merkleRoot = merkleProof.computeRootFromMemory( - leafIdx, - state.bytes32Vals[idx] - ); + mod.moduleMemory.merkleRoot = + merkleProof.computeRootFromMemory(leafIdx, state.bytes32Vals[idx]); } else if (inst.opcode == Instructions.SET_GLOBAL_STATE_BYTES32) { state.bytes32Vals[idx] = startLeafContents; } else { @@ -113,11 +104,7 @@ contract OneStepProverHostIo is IOneStepProver { // Computes b**e % m // Really pure but the Solidity compiler sees the staticcall and requires view - function modExp256( - uint256 b, - uint256 e, - uint256 m - ) internal view returns (uint256) { + function modExp256(uint256 b, uint256 e, uint256 m) internal view returns (uint256) { bytes memory modExpInput = abi.encode(32, 32, 32, b, e, m); (bool modexpSuccess, bytes memory modExpOutput) = address(0x05).staticcall(modExpInput); require(modexpSuccess, "MODEXP_FAILED"); @@ -143,11 +130,8 @@ contract OneStepProverHostIo is IOneStepProver { uint256 proofOffset = 0; bytes32 leafContents; MerkleProof memory merkleProof; - (leafContents, proofOffset, merkleProof) = mod.moduleMemory.proveLeaf( - leafIdx, - proof, - proofOffset - ); + (leafContents, proofOffset, merkleProof) = + mod.moduleMemory.proveLeaf(leafIdx, proof, proofOffset); bytes memory extracted; uint8 proofType = uint8(proof[proofOffset]); @@ -257,7 +241,7 @@ contract OneStepProverHostIo is IOneStepProver { require(message.length >= INBOX_HEADER_LEN, "BAD_SEQINBOX_PROOF"); uint64 afterDelayedMsg; - (afterDelayedMsg, ) = Deserialize.u64(message, 32); + (afterDelayedMsg,) = Deserialize.u64(message, 32); bytes32 messageHash = keccak256(message); bytes32 beforeAcc; bytes32 delayedAcc; @@ -289,7 +273,7 @@ contract OneStepProverHostIo is IOneStepProver { bytes32 messageDataHash = keccak256(message[DELAYED_HEADER_LEN:]); bytes1 kind = message[0]; uint256 sender; - (sender, ) = Deserialize.u256(message, 1); + (sender,) = Deserialize.u256(message, 1); bytes32 messageHash = keccak256( abi.encodePacked(kind, uint160(sender), message[33:DELAYED_HEADER_LEN], messageDataHash) @@ -311,10 +295,10 @@ contract OneStepProverHostIo is IOneStepProver { uint256 ptr = mach.valueStack.pop().assumeI32(); uint256 msgIndex = mach.valueStack.pop().assumeI64(); if ( - inst.argumentData == Instructions.INBOX_INDEX_SEQUENCER && - msgIndex >= execCtx.maxInboxMessagesRead + inst.argumentData == Instructions.INBOX_INDEX_SEQUENCER + && msgIndex >= execCtx.maxInboxMessagesRead ) { - mach.status = MachineStatus.TOO_FAR; + mach.status = MachineStatus.ERRORED; return; } @@ -327,11 +311,8 @@ contract OneStepProverHostIo is IOneStepProver { uint256 proofOffset = 0; bytes32 leafContents; MerkleProof memory merkleProof; - (leafContents, proofOffset, merkleProof) = mod.moduleMemory.proveLeaf( - leafIdx, - proof, - proofOffset - ); + (leafContents, proofOffset, merkleProof) = + mod.moduleMemory.proveLeaf(leafIdx, proof, proofOffset); { // TODO: support proving via an authenticated contract @@ -364,11 +345,8 @@ contract OneStepProverHostIo is IOneStepProver { uint32 i = 0; for (; i < 32 && messageOffset + i < messageLength; i++) { - leafContents = setLeafByte( - leafContents, - i, - uint8(proof[proofOffset + messageOffset + i]) - ); + leafContents = + setLeafByte(leafContents, i, uint8(proof[proofOffset + messageOffset + i])); } mod.moduleMemory.merkleRoot = merkleProof.computeRootFromMemory(leafIdx, leafContents); @@ -385,7 +363,9 @@ contract OneStepProverHostIo is IOneStepProver { mach.status = MachineStatus.FINISHED; } - function isPowerOfTwo(uint256 value) internal pure returns (bool) { + function isPowerOfTwo( + uint256 value + ) internal pure returns (bool) { return value != 0 && (value & (value - 1) == 0); } @@ -396,11 +376,7 @@ contract OneStepProverHostIo is IOneStepProver { ) internal pure - returns ( - uint256 leaf, - MerkleProof memory leafProof, - MerkleProof memory zeroProof - ) + returns (uint256 leaf, MerkleProof memory leafProof, MerkleProof memory zeroProof) { string memory prefix = "Module merkle tree:"; bytes32 root = mach.modulesRoot; @@ -445,13 +421,10 @@ contract OneStepProverHostIo is IOneStepProver { mach.status = MachineStatus.ERRORED; return; } - (bytes32 userMod, uint256 offset, ) = mod.moduleMemory.proveLeaf( - pointer / LEAF_SIZE, - proof, - 0 - ); + (bytes32 userMod, uint256 offset,) = + mod.moduleMemory.proveLeaf(pointer / LEAF_SIZE, proof, 0); - (uint256 leaf, , MerkleProof memory zeroProof) = proveLastLeaf(mach, offset, proof); + (uint256 leaf,, MerkleProof memory zeroProof) = proveLastLeaf(mach, offset, proof); bool balanced = isPowerOfTwo(leaf + 1); if (balanced) { @@ -472,7 +445,7 @@ contract OneStepProverHostIo is IOneStepProver { ) internal pure { string memory prefix = "Module merkle tree:"; - (uint256 leaf, MerkleProof memory leafProof, ) = proveLastLeaf(mach, 0, proof); + (uint256 leaf, MerkleProof memory leafProof,) = proveLastLeaf(mach, 0, proof); bool shrink = isPowerOfTwo(leaf); if (shrink) { @@ -497,8 +470,8 @@ contract OneStepProverHostIo is IOneStepProver { require(state.hash() == mach.globalStateHash, "BAD_GLOBAL_STATE"); if ( - opcode == Instructions.GET_GLOBAL_STATE_BYTES32 || - opcode == Instructions.SET_GLOBAL_STATE_BYTES32 + opcode == Instructions.GET_GLOBAL_STATE_BYTES32 + || opcode == Instructions.SET_GLOBAL_STATE_BYTES32 ) { executeGetOrSetBytes32(mach, mod, state, inst, proof[proofOffset:]); } else if (opcode == Instructions.GET_GLOBAL_STATE_U64) { @@ -539,8 +512,8 @@ contract OneStepProverHostIo is IOneStepProver { require(multi.remainingHash == bytes32(0), "WRONG_COTHREAD_EMPTY"); } else { require( - keccak256(abi.encodePacked("cothread:", newInactiveCoThread, newRemaining)) == - multi.remainingHash, + keccak256(abi.encodePacked("cothread:", newInactiveCoThread, newRemaining)) + == multi.remainingHash, "WRONG_COTHREAD_POP" ); } @@ -620,8 +593,8 @@ contract OneStepProverHostIo is IOneStepProver { ) internal view impl; if ( - opcode >= Instructions.GET_GLOBAL_STATE_BYTES32 && - opcode <= Instructions.SET_GLOBAL_STATE_U64 + opcode >= Instructions.GET_GLOBAL_STATE_BYTES32 + && opcode <= Instructions.SET_GLOBAL_STATE_U64 ) { impl = executeGlobalStateAccess; } else if (opcode == Instructions.READ_PRE_IMAGE) { diff --git a/src/osp/OneStepProverMath.sol b/src/osp/OneStepProverMath.sol index c13dd894..67fed107 100644 --- a/src/osp/OneStepProverMath.sol +++ b/src/osp/OneStepProverMath.sol @@ -39,18 +39,16 @@ contract OneStepProverMath is IOneStepProver { mach.valueStack.push(ValueLib.newI32(output)); } - function signExtend(uint32 a) internal pure returns (uint64) { + function signExtend( + uint32 a + ) internal pure returns (uint64) { if (a & (1 << 31) != 0) { return uint64(a) | uint64(0xffffffff00000000); } return uint64(a); } - function i64RelOp( - uint64 a, - uint64 b, - uint16 relop - ) internal pure returns (bool) { + function i64RelOp(uint64 a, uint64 b, uint16 relop) internal pure returns (bool) { if (relop == Instructions.IRELOP_EQ) { return (a == b); } else if (relop == Instructions.IRELOP_NE) { @@ -90,10 +88,8 @@ contract OneStepProverMath is IOneStepProver { uint64 b64; if ( - relop == Instructions.IRELOP_LT_S || - relop == Instructions.IRELOP_GT_S || - relop == Instructions.IRELOP_LE_S || - relop == Instructions.IRELOP_GE_S + relop == Instructions.IRELOP_LT_S || relop == Instructions.IRELOP_GT_S + || relop == Instructions.IRELOP_LE_S || relop == Instructions.IRELOP_GE_S ) { a64 = signExtend(a); b64 = signExtend(b); @@ -123,11 +119,7 @@ contract OneStepProverMath is IOneStepProver { mach.valueStack.push(ValueLib.newBoolean(res)); } - function genericIUnOp( - uint64 a, - uint16 unop, - uint16 bits - ) internal pure returns (uint32) { + function genericIUnOp(uint64 a, uint16 unop, uint16 bits) internal pure returns (uint32) { require(bits == 32 || bits == 64, "WRONG USE OF genericUnOp"); if (unop == Instructions.IUNOP_CLZ) { /* curbits is one-based to keep with unsigned mathematics */ @@ -480,25 +472,25 @@ contract OneStepProverMath is IOneStepProver { if (opcode == Instructions.I32_EQZ || opcode == Instructions.I64_EQZ) { impl = executeEqz; } else if ( - opcode >= Instructions.I32_RELOP_BASE && - opcode <= Instructions.I32_RELOP_BASE + Instructions.IRELOP_LAST + opcode >= Instructions.I32_RELOP_BASE + && opcode <= Instructions.I32_RELOP_BASE + Instructions.IRELOP_LAST ) { impl = executeI32RelOp; } else if ( - opcode >= Instructions.I32_UNOP_BASE && - opcode <= Instructions.I32_UNOP_BASE + Instructions.IUNOP_LAST + opcode >= Instructions.I32_UNOP_BASE + && opcode <= Instructions.I32_UNOP_BASE + Instructions.IUNOP_LAST ) { impl = executeI32UnOp; } else if (opcode >= Instructions.I32_ADD && opcode <= Instructions.I32_ROTR) { impl = executeI32BinOp; } else if ( - opcode >= Instructions.I64_RELOP_BASE && - opcode <= Instructions.I64_RELOP_BASE + Instructions.IRELOP_LAST + opcode >= Instructions.I64_RELOP_BASE + && opcode <= Instructions.I64_RELOP_BASE + Instructions.IRELOP_LAST ) { impl = executeI64RelOp; } else if ( - opcode >= Instructions.I64_UNOP_BASE && - opcode <= Instructions.I64_UNOP_BASE + Instructions.IUNOP_LAST + opcode >= Instructions.I64_UNOP_BASE + && opcode <= Instructions.I64_UNOP_BASE + Instructions.IUNOP_LAST ) { impl = executeI64UnOp; } else if (opcode >= Instructions.I64_ADD && opcode <= Instructions.I64_ROTR) { diff --git a/src/osp/OneStepProverMemory.sol b/src/osp/OneStepProverMemory.sol index 3c966049..71b7ef7e 100644 --- a/src/osp/OneStepProverMemory.sol +++ b/src/osp/OneStepProverMemory.sol @@ -19,11 +19,7 @@ contract OneStepProverMemory is IOneStepProver { uint256 private constant LEAF_SIZE = 32; uint64 private constant PAGE_SIZE = 65536; - function setLeafByte( - bytes32 oldLeaf, - uint256 idx, - uint8 val - ) internal pure returns (bytes32) { + function setLeafByte(bytes32 oldLeaf, uint256 idx, uint8 val) internal pure returns (bytes32) { require(idx < LEAF_SIZE, "BAD_SET_LEAF_BYTE_IDX"); // Take into account that we are casting the leaf to a big-endian integer uint256 leafShift = (LEAF_SIZE - 1 - idx) * 8; @@ -103,7 +99,7 @@ contract OneStepProverMemory is IOneStepProver { } uint256 index = inst.argumentData + mach.valueStack.pop().assumeI32(); - (bool err, uint256 value, ) = mod.moduleMemory.load(index, readBytes, proof, 0); + (bool err, uint256 value,) = mod.moduleMemory.load(index, readBytes, proof, 0); if (err) { mach.status = MachineStatus.ERRORED; return; @@ -197,31 +193,21 @@ contract OneStepProverMemory is IOneStepProver { if (lastProvedLeafIdx != ~uint256(0)) { // Apply the last leaf update mod.moduleMemory.merkleRoot = lastProvedMerkle.computeRootFromMemory( - lastProvedLeafIdx, - lastProvedLeafContents + lastProvedLeafIdx, lastProvedLeafContents ); } // This hits the stack size if we phrase it as mod.moduleMemory.proveLeaf(...) - (lastProvedLeafContents, proofOffset, lastProvedMerkle) = ModuleMemoryLib.proveLeaf( - mod.moduleMemory, - leafIdx, - proof, - proofOffset - ); + (lastProvedLeafContents, proofOffset, lastProvedMerkle) = + ModuleMemoryLib.proveLeaf(mod.moduleMemory, leafIdx, proof, proofOffset); lastProvedLeafIdx = leafIdx; } uint256 indexWithinLeaf = idx % LEAF_SIZE; - lastProvedLeafContents = setLeafByte( - lastProvedLeafContents, - indexWithinLeaf, - uint8(toWrite) - ); + lastProvedLeafContents = + setLeafByte(lastProvedLeafContents, indexWithinLeaf, uint8(toWrite)); toWrite >>= 8; } - mod.moduleMemory.merkleRoot = lastProvedMerkle.computeRootFromMemory( - lastProvedLeafIdx, - lastProvedLeafContents - ); + mod.moduleMemory.merkleRoot = + lastProvedMerkle.computeRootFromMemory(lastProvedLeafIdx, lastProvedLeafContents); } function executeMemorySize( diff --git a/src/precompiles/ArbAddressTable.sol b/src/precompiles/ArbAddressTable.sol index b37d949d..3803cebc 100644 --- a/src/precompiles/ArbAddressTable.sol +++ b/src/precompiles/ArbAddressTable.sol @@ -14,14 +14,18 @@ interface ArbAddressTable { * @param addr address to check for presence in table * @return true if address is in table */ - function addressExists(address addr) external view returns (bool); + function addressExists( + address addr + ) external view returns (bool); /** * @notice compress an address and return the result * @param addr address to compress * @return compressed address bytes */ - function compress(address addr) external returns (bytes memory); + function compress( + address addr + ) external returns (bytes memory); /** * @notice read a compressed address from a bytes buffer @@ -29,29 +33,35 @@ interface ArbAddressTable { * @param offset offset of target address * @return resulting address and updated offset into the buffer (revert if buffer is too short) */ - function decompress(bytes calldata buf, uint256 offset) - external - view - returns (address, uint256); + function decompress( + bytes calldata buf, + uint256 offset + ) external view returns (address, uint256); /** * @param addr address to lookup * @return index of an address in the address table (revert if address isn't in the table) */ - function lookup(address addr) external view returns (uint256); + function lookup( + address addr + ) external view returns (uint256); /** * @param index index to lookup address * @return address at a given index in address table (revert if index is beyond end of table) */ - function lookupIndex(uint256 index) external view returns (address); + function lookupIndex( + uint256 index + ) external view returns (address); /** * @notice Register an address in the address table * @param addr address to register * @return index of the address (existing index, or newly created index if not already registered) */ - function register(address addr) external returns (uint256); + function register( + address addr + ) external returns (uint256); /** * @return size of address table (= first unused index) diff --git a/src/precompiles/ArbAggregator.sol b/src/precompiles/ArbAggregator.sol index c37af3ba..03dd42da 100644 --- a/src/precompiles/ArbAggregator.sol +++ b/src/precompiles/ArbAggregator.sol @@ -11,7 +11,9 @@ interface ArbAggregator { /// @notice Get the address of an arbitrarily chosen batch poster. /// @param addr ignored /// @return (batchPosterAddress, true) - function getPreferredAggregator(address addr) external view returns (address, bool); + function getPreferredAggregator( + address addr + ) external view returns (address, bool); /// @notice Deprecated, there is no longer a single preferred aggregator, use getBatchPosters instead /// @notice Get default aggregator. @@ -24,12 +26,16 @@ interface ArbAggregator { /// @notice Adds newBatchPoster as a batch poster /// This reverts unless called by a chain owner /// @param newBatchPoster New batch poster - function addBatchPoster(address newBatchPoster) external; + function addBatchPoster( + address newBatchPoster + ) external; /// @notice Get the address where fees to batchPoster are sent. /// @param batchPoster The batch poster to get the fee collector for /// @return The fee collectors address. This will sometimes but not always be the same as the batch poster's address. - function getFeeCollector(address batchPoster) external view returns (address); + function getFeeCollector( + address batchPoster + ) external view returns (address); /// @notice Set the address where fees to batchPoster are sent. /// This reverts unless called by the batch poster, its fee collector, or a chain owner @@ -40,7 +46,9 @@ interface ArbAggregator { /// @notice Deprecated, always returns zero /// @notice Get the tx base fee (in approximate L1 gas) for aggregator /// @param aggregator The aggregator to get the base fee for - function getTxBaseFee(address aggregator) external view returns (uint256); + function getTxBaseFee( + address aggregator + ) external view returns (uint256); /// @notice Deprecated, is now a no-op /// @notice Set the tx base fee (in approximate L1 gas) for aggregator diff --git a/src/precompiles/ArbBLS.sol b/src/precompiles/ArbBLS.sol index 9aef25ce..7fbb5a90 100644 --- a/src/precompiles/ArbBLS.sol +++ b/src/precompiles/ArbBLS.sol @@ -6,6 +6,4 @@ pragma solidity >=0.4.21 <0.9.0; /// @title Disabled precompile, formerly used to register BLS public keys. /// @notice Precompiled contract that exists in every Arbitrum chain at 0x0000000000000000000000000000000000000067. -interface ArbBLS { - -} +interface ArbBLS {} diff --git a/src/precompiles/ArbDebug.sol b/src/precompiles/ArbDebug.sol index 01ee127a..66a92974 100644 --- a/src/precompiles/ArbDebug.sol +++ b/src/precompiles/ArbDebug.sol @@ -21,21 +21,15 @@ interface ArbDebug { // Events that exist for testing log creation and pricing event Basic(bool flag, bytes32 indexed value); event Mixed( - bool indexed flag, - bool not, - bytes32 indexed value, - address conn, - address indexed caller + bool indexed flag, bool not, bytes32 indexed value, address conn, address indexed caller ); event Store( - bool indexed flag, - address indexed field, - uint24 number, - bytes32 value, - bytes store + bool indexed flag, address indexed field, uint24 number, bytes32 value, bytes store ); - function customRevert(uint64 number) external pure; + function customRevert( + uint64 number + ) external pure; function panic() external; diff --git a/src/precompiles/ArbFunctionTable.sol b/src/precompiles/ArbFunctionTable.sol index 6ee07011..be2b30e5 100644 --- a/src/precompiles/ArbFunctionTable.sol +++ b/src/precompiles/ArbFunctionTable.sol @@ -12,18 +12,15 @@ pragma solidity >=0.4.21 <0.9.0; /// Precompiled contract that exists in every Arbitrum chain at 0x0000000000000000000000000000000000000068. interface ArbFunctionTable { /// @notice Reverts since the table is empty - function upload(bytes calldata buf) external; + function upload( + bytes calldata buf + ) external; /// @notice Returns the empty table's size, which is 0 - function size(address addr) external view returns (uint256); + function size( + address addr + ) external view returns (uint256); /// @notice No-op - function get(address addr, uint256 index) - external - view - returns ( - uint256, - bool, - uint256 - ); + function get(address addr, uint256 index) external view returns (uint256, bool, uint256); } diff --git a/src/precompiles/ArbGasInfo.sol b/src/precompiles/ArbGasInfo.sol index b4c21096..a3694034 100644 --- a/src/precompiles/ArbGasInfo.sol +++ b/src/precompiles/ArbGasInfo.sol @@ -19,17 +19,9 @@ interface ArbGasInfo { /// per ArbGas congestion, /// per ArbGas total /// ) - function getPricesInWeiWithAggregator(address aggregator) - external - view - returns ( - uint256, - uint256, - uint256, - uint256, - uint256, - uint256 - ); + function getPricesInWeiWithAggregator( + address aggregator + ) external view returns (uint256, uint256, uint256, uint256, uint256, uint256); /// @notice Get gas prices. Uses the caller's preferred aggregator, or the default if the caller doesn't have a preferred one. /// @return return gas prices in wei @@ -44,47 +36,21 @@ interface ArbGasInfo { function getPricesInWei() external view - returns ( - uint256, - uint256, - uint256, - uint256, - uint256, - uint256 - ); + returns (uint256, uint256, uint256, uint256, uint256, uint256); /// @notice Get prices in ArbGas for the supplied aggregator /// @return (per L2 tx, per L1 calldata byte, per storage allocation) - function getPricesInArbGasWithAggregator(address aggregator) - external - view - returns ( - uint256, - uint256, - uint256 - ); + function getPricesInArbGasWithAggregator( + address aggregator + ) external view returns (uint256, uint256, uint256); /// @notice Get prices in ArbGas. Assumes the callers preferred validator, or the default if caller doesn't have a preferred one. /// @return (per L2 tx, per L1 calldata byte, per storage allocation) - function getPricesInArbGas() - external - view - returns ( - uint256, - uint256, - uint256 - ); + function getPricesInArbGas() external view returns (uint256, uint256, uint256); /// @notice Get the gas accounting parameters. `gasPoolMax` is always zero, as the exponential pricing model has no such notion. /// @return (speedLimitPerSecond, gasPoolMax, maxTxGasLimit) - function getGasAccountingParams() - external - view - returns ( - uint256, - uint256, - uint256 - ); + function getGasAccountingParams() external view returns (uint256, uint256, uint256); /// @notice Get the minimum gas price needed for a tx to succeed function getMinimumGasPrice() external view returns (uint256); diff --git a/src/precompiles/ArbInfo.sol b/src/precompiles/ArbInfo.sol index ab7e7294..49e95725 100644 --- a/src/precompiles/ArbInfo.sol +++ b/src/precompiles/ArbInfo.sol @@ -8,8 +8,12 @@ pragma solidity >=0.4.21 <0.9.0; /// @notice Precompiled contract that exists in every Arbitrum chain at 0x0000000000000000000000000000000000000065. interface ArbInfo { /// @notice Retrieves an account's balance - function getBalance(address account) external view returns (uint256); + function getBalance( + address account + ) external view returns (uint256); /// @notice Retrieves a contract's deployed code - function getCode(address account) external view returns (bytes memory); + function getCode( + address account + ) external view returns (bytes memory); } diff --git a/src/precompiles/ArbOwner.sol b/src/precompiles/ArbOwner.sol index 69273fc6..938170f5 100644 --- a/src/precompiles/ArbOwner.sol +++ b/src/precompiles/ArbOwner.sol @@ -12,40 +12,61 @@ pragma solidity >=0.4.21 <0.9.0; * - ArbOS upgrades happen with the rest of the system rather than being independent * - Exemptions to address aliasing are no longer offered. Exemptions were intended to support backward compatibility for contracts deployed before aliasing was introduced, but no exemptions were ever requested. * Precompiled contract that exists in every Arbitrum chain at 0x0000000000000000000000000000000000000070. - **/ + * + */ interface ArbOwner { /// @notice Add account as a chain owner - function addChainOwner(address newOwner) external; + function addChainOwner( + address newOwner + ) external; /// @notice Remove account from the list of chain owners - function removeChainOwner(address ownerToRemove) external; + function removeChainOwner( + address ownerToRemove + ) external; /// @notice See if the user is a chain owner - function isChainOwner(address addr) external view returns (bool); + function isChainOwner( + address addr + ) external view returns (bool); /// @notice Retrieves the list of chain owners function getAllChainOwners() external view returns (address[] memory); /// @notice Set how slowly ArbOS updates its estimate of the L1 basefee - function setL1BaseFeeEstimateInertia(uint64 inertia) external; + function setL1BaseFeeEstimateInertia( + uint64 inertia + ) external; /// @notice Set the L2 basefee directly, bypassing the pool calculus - function setL2BaseFee(uint256 priceInWei) external; + function setL2BaseFee( + uint256 priceInWei + ) external; /// @notice Set the minimum basefee needed for a transaction to succeed - function setMinimumL2BaseFee(uint256 priceInWei) external; + function setMinimumL2BaseFee( + uint256 priceInWei + ) external; /// @notice Set the computational speed limit for the chain - function setSpeedLimit(uint64 limit) external; + function setSpeedLimit( + uint64 limit + ) external; /// @notice Set the maximum size a tx (and block) can be - function setMaxTxGasLimit(uint64 limit) external; + function setMaxTxGasLimit( + uint64 limit + ) external; /// @notice Set the L2 gas pricing inertia - function setL2GasPricingInertia(uint64 sec) external; + function setL2GasPricingInertia( + uint64 sec + ) external; /// @notice Set the L2 gas backlog tolerance - function setL2GasBacklogTolerance(uint64 sec) external; + function setL2GasBacklogTolerance( + uint64 sec + ) external; /// @notice Get the network fee collector function getNetworkFeeAccount() external view returns (address); @@ -54,59 +75,91 @@ interface ArbOwner { function getInfraFeeAccount() external view returns (address); /// @notice Set the network fee collector - function setNetworkFeeAccount(address newNetworkFeeAccount) external; + function setNetworkFeeAccount( + address newNetworkFeeAccount + ) external; /// @notice Set the infrastructure fee collector - function setInfraFeeAccount(address newInfraFeeAccount) external; + function setInfraFeeAccount( + address newInfraFeeAccount + ) external; /// @notice Upgrades ArbOS to the requested version at the requested timestamp function scheduleArbOSUpgrade(uint64 newVersion, uint64 timestamp) external; /// @notice Sets equilibration units parameter for L1 price adjustment algorithm - function setL1PricingEquilibrationUnits(uint256 equilibrationUnits) external; + function setL1PricingEquilibrationUnits( + uint256 equilibrationUnits + ) external; /// @notice Sets inertia parameter for L1 price adjustment algorithm - function setL1PricingInertia(uint64 inertia) external; + function setL1PricingInertia( + uint64 inertia + ) external; /// @notice Sets reward recipient address for L1 price adjustment algorithm - function setL1PricingRewardRecipient(address recipient) external; + function setL1PricingRewardRecipient( + address recipient + ) external; /// @notice Sets reward amount for L1 price adjustment algorithm, in wei per unit - function setL1PricingRewardRate(uint64 weiPerUnit) external; + function setL1PricingRewardRate( + uint64 weiPerUnit + ) external; /// @notice Set how much ArbOS charges per L1 gas spent on transaction data. - function setL1PricePerUnit(uint256 pricePerUnit) external; + function setL1PricePerUnit( + uint256 pricePerUnit + ) external; /// @notice Sets the base charge (in L1 gas) attributed to each data batch in the calldata pricer - function setPerBatchGasCharge(int64 cost) external; + function setPerBatchGasCharge( + int64 cost + ) external; /** * @notice Sets the Brotli compression level used for fast compression * Available in ArbOS version 12 with default level as 1 */ - function setBrotliCompressionLevel(uint64 level) external; + function setBrotliCompressionLevel( + uint64 level + ) external; /// @notice Sets the cost amortization cap in basis points - function setAmortizedCostCapBips(uint64 cap) external; + function setAmortizedCostCapBips( + uint64 cap + ) external; /// @notice Releases surplus funds from L1PricerFundsPoolAddress for use - function releaseL1PricerSurplusFunds(uint256 maxWeiToRelease) external returns (uint256); + function releaseL1PricerSurplusFunds( + uint256 maxWeiToRelease + ) external returns (uint256); /// @notice Sets the amount of ink 1 gas buys /// @param price the conversion rate (must fit in a uint24) - function setInkPrice(uint32 price) external; + function setInkPrice( + uint32 price + ) external; /// @notice Sets the maximum depth (in wasm words) a wasm stack may grow - function setWasmMaxStackDepth(uint32 depth) external; + function setWasmMaxStackDepth( + uint32 depth + ) external; /// @notice Sets the number of free wasm pages a tx gets - function setWasmFreePages(uint16 pages) external; + function setWasmFreePages( + uint16 pages + ) external; /// @notice Sets the base cost of each additional wasm page - function setWasmPageGas(uint16 gas) external; + function setWasmPageGas( + uint16 gas + ) external; /// @notice Sets the maximum number of pages a wasm may allocate - function setWasmPageLimit(uint16 limit) external; + function setWasmPageLimit( + uint16 limit + ) external; /// @notice Sets the minimum costs to invoke a program /// @param gas amount of gas paid in increments of 256 when not the program is not cached @@ -115,25 +168,39 @@ interface ArbOwner { /// @notice Sets the linear adjustment made to program init costs. /// @param percent the adjustment (100% = no adjustment). - function setWasmInitCostScalar(uint64 percent) external; + function setWasmInitCostScalar( + uint64 percent + ) external; /// @notice Sets the number of days after which programs deactivate - function setWasmExpiryDays(uint16 _days) external; + function setWasmExpiryDays( + uint16 _days + ) external; /// @notice Sets the age a program must be to perform a keepalive - function setWasmKeepaliveDays(uint16 _days) external; + function setWasmKeepaliveDays( + uint16 _days + ) external; /// @notice Sets the number of extra programs ArbOS caches during a given block - function setWasmBlockCacheSize(uint16 count) external; + function setWasmBlockCacheSize( + uint16 count + ) external; /// @notice Adds account as a wasm cache manager - function addWasmCacheManager(address manager) external; + function addWasmCacheManager( + address manager + ) external; /// @notice Removes account from the list of wasm cache managers - function removeWasmCacheManager(address manager) external; + function removeWasmCacheManager( + address manager + ) external; /// @notice Sets serialized chain config in ArbOS state - function setChainConfig(string calldata chainConfig) external; + function setChainConfig( + string calldata chainConfig + ) external; /// Emitted when a successful call is made to this precompile event OwnerActs(bytes4 indexed method, address indexed owner, bytes data); diff --git a/src/precompiles/ArbOwnerPublic.sol b/src/precompiles/ArbOwnerPublic.sol index 0de57ce6..5b28fff3 100644 --- a/src/precompiles/ArbOwnerPublic.sol +++ b/src/precompiles/ArbOwnerPublic.sol @@ -8,14 +8,18 @@ pragma solidity >=0.4.21 <0.9.0; /// @notice Precompiled contract that exists in every Arbitrum chain at 0x000000000000000000000000000000000000006b. interface ArbOwnerPublic { /// @notice See if the user is a chain owner - function isChainOwner(address addr) external view returns (bool); + function isChainOwner( + address addr + ) external view returns (bool); /** * @notice Rectify the list of chain owners * If successful, emits ChainOwnerRectified event * Available in ArbOS version 11 */ - function rectifyChainOwner(address ownerToRectify) external; + function rectifyChainOwner( + address ownerToRectify + ) external; /// @notice Retrieves the list of chain owners function getAllChainOwners() external view returns (address[] memory); diff --git a/src/precompiles/ArbRetryableTx.sol b/src/precompiles/ArbRetryableTx.sol index 0600f651..454a55bf 100644 --- a/src/precompiles/ArbRetryableTx.sol +++ b/src/precompiles/ArbRetryableTx.sol @@ -15,7 +15,9 @@ interface ArbRetryableTx { * @param ticketId unique identifier of retryable message: keccak256(keccak256(ArbchainId, inbox-sequence-number), uint(0) ) * @return txId that the redeem attempt will have */ - function redeem(bytes32 ticketId) external returns (bytes32); + function redeem( + bytes32 ticketId + ) external returns (bytes32); /** * @notice Return the minimum lifetime of redeemable txn. @@ -28,7 +30,9 @@ interface ArbRetryableTx { * @param ticketId unique ticket identifier * @return timestamp for ticket's deadline */ - function getTimeout(bytes32 ticketId) external view returns (uint256); + function getTimeout( + bytes32 ticketId + ) external view returns (uint256); /** * @notice Adds one lifetime period to the life of ticketId. @@ -38,7 +42,9 @@ interface ArbRetryableTx { * @param ticketId unique ticket identifier * @return new timeout of ticketId */ - function keepalive(bytes32 ticketId) external returns (uint256); + function keepalive( + bytes32 ticketId + ) external returns (uint256); /** * @notice Return the beneficiary of ticketId. @@ -46,14 +52,18 @@ interface ArbRetryableTx { * @param ticketId unique ticket identifier * @return address of beneficiary for ticket */ - function getBeneficiary(bytes32 ticketId) external view returns (address); + function getBeneficiary( + bytes32 ticketId + ) external view returns (address); /** * @notice Cancel ticketId and refund its callvalue to its beneficiary. * Revert if ticketId doesn't exist, or if called by anyone other than ticketId's beneficiary. * @param ticketId unique ticket identifier */ - function cancel(bytes32 ticketId) external; + function cancel( + bytes32 ticketId + ) external; /** * @notice Gets the redeemer of the current retryable redeem attempt. diff --git a/src/precompiles/ArbStatistics.sol b/src/precompiles/ArbStatistics.sol index d0a3da00..f5ae31c3 100644 --- a/src/precompiles/ArbStatistics.sol +++ b/src/precompiles/ArbStatistics.sol @@ -18,12 +18,5 @@ interface ArbStatistics { function getStats() external view - returns ( - uint256, - uint256, - uint256, - uint256, - uint256, - uint256 - ); + returns (uint256, uint256, uint256, uint256, uint256, uint256); } diff --git a/src/precompiles/ArbSys.sol b/src/precompiles/ArbSys.sol index 4e7a8f41..5d28aa10 100644 --- a/src/precompiles/ArbSys.sol +++ b/src/precompiles/ArbSys.sol @@ -20,7 +20,9 @@ interface ArbSys { * @notice Get Arbitrum block hash (reverts unless currentBlockNum-256 <= arbBlockNum < currentBlockNum) * @return block hash */ - function arbBlockHash(uint256 arbBlockNum) external view returns (bytes32); + function arbBlockHash( + uint256 arbBlockNum + ) external view returns (bytes32); /** * @notice Gets the rollup's unique chain identifier @@ -53,10 +55,10 @@ interface ArbSys { * @param unused argument no longer used * @return aliased sender address */ - function mapL1SenderContractAddressToL2Alias(address sender, address unused) - external - pure - returns (address); + function mapL1SenderContractAddressToL2Alias( + address sender, + address unused + ) external pure returns (address); /** * @notice check if the caller (of this caller of this) is an aliased L1 contract address @@ -76,7 +78,9 @@ interface ArbSys { * @param destination recipient address on L1 * @return unique identifier for this L2-to-L1 transaction. */ - function withdrawEth(address destination) external payable returns (uint256); + function withdrawEth( + address destination + ) external payable returns (uint256); /** * @notice Send a transaction to L1 @@ -86,10 +90,10 @@ interface ArbSys { * @param data (optional) calldata for L1 contract call * @return a unique identifier for this L2-to-L1 transaction. */ - function sendTxToL1(address destination, bytes calldata data) - external - payable - returns (uint256); + function sendTxToL1( + address destination, + bytes calldata data + ) external payable returns (uint256); /** * @notice Get send Merkle tree state @@ -100,11 +104,7 @@ interface ArbSys { function sendMerkleTreeState() external view - returns ( - uint256 size, - bytes32 root, - bytes32[] memory partials - ); + returns (uint256 size, bytes32 root, bytes32[] memory partials); /** * @notice creates a send txn from L2 to L1 @@ -143,9 +143,7 @@ interface ArbSys { * @param position = (level << 192) + leaf */ event SendMerkleUpdate( - uint256 indexed reserved, - bytes32 indexed hash, - uint256 indexed position + uint256 indexed reserved, bytes32 indexed hash, uint256 indexed position ); error InvalidBlockNumber(uint256 requested, uint256 current); diff --git a/src/precompiles/ArbWasm.sol b/src/precompiles/ArbWasm.sol index b690ed24..e5e6e1b5 100644 --- a/src/precompiles/ArbWasm.sol +++ b/src/precompiles/ArbWasm.sol @@ -13,10 +13,9 @@ interface ArbWasm { /// @param program the program to activate /// @return version the stylus version the program was activated against /// @return dataFee the data fee paid to store the activated program - function activateProgram(address program) - external - payable - returns (uint16 version, uint256 dataFee); + function activateProgram( + address program + ) external payable returns (uint16 version, uint256 dataFee); /// @notice Gets the latest stylus version /// @return version the stylus version @@ -24,36 +23,47 @@ interface ArbWasm { /// @notice Gets the stylus version the program with codehash was most recently activated against /// @return version the program version (reverts for EVM contracts) - function codehashVersion(bytes32 codehash) external view returns (uint16 version); + function codehashVersion( + bytes32 codehash + ) external view returns (uint16 version); /// @notice Extends a program's expiration date. /// Reverts if too soon or if the program is not up to date. - function codehashKeepalive(bytes32 codehash) external payable; + function codehashKeepalive( + bytes32 codehash + ) external payable; /// @notice Gets a program's asm size. /// Reverts if program is not active. /// @return size the size in bytes - function codehashAsmSize(bytes32 codehash) external view returns (uint32 size); + function codehashAsmSize( + bytes32 codehash + ) external view returns (uint32 size); /// @notice Gets the stylus version the program was most recently activated against /// @return version the program version (reverts for EVM contracts) - function programVersion(address program) external view returns (uint16 version); + function programVersion( + address program + ) external view returns (uint16 version); /// @notice Gets the cost to invoke the program /// @return gas the amount of gas /// @return gasWhenCached the amount of gas if the program was recently used - function programInitGas(address program) - external - view - returns (uint64 gas, uint64 gasWhenCached); + function programInitGas( + address program + ) external view returns (uint64 gas, uint64 gasWhenCached); /// @notice Gets the memory footprint of the program at the given address in pages /// @return footprint the memory footprint of program in pages (reverts for EVM contracts) - function programMemoryFootprint(address program) external view returns (uint16 footprint); + function programMemoryFootprint( + address program + ) external view returns (uint16 footprint); /// @notice Gets the amount of time remaining until the program expires /// @return _secs the time left in seconds (reverts for EVM contracts) - function programTimeLeft(address program) external view returns (uint64 _secs); + function programTimeLeft( + address program + ) external view returns (uint64 _secs); /// @notice Gets the conversion rate between gas and ink /// @return price the amount of ink 1 gas buys diff --git a/src/precompiles/ArbWasmCache.sol b/src/precompiles/ArbWasmCache.sol index bc5b199f..fc22ac24 100644 --- a/src/precompiles/ArbWasmCache.sol +++ b/src/precompiles/ArbWasmCache.sol @@ -10,27 +10,37 @@ pragma solidity >=0.4.21 <0.9.0; */ interface ArbWasmCache { /// @notice See if the user is a cache manager. - function isCacheManager(address manager) external view returns (bool); + function isCacheManager( + address manager + ) external view returns (bool); /// @notice Retrieve all address managers. /// @return managers the list of managers. function allCacheManagers() external view returns (address[] memory managers); /// @dev Deprecated, replaced with cacheProgram - function cacheCodehash(bytes32 codehash) external; + function cacheCodehash( + bytes32 codehash + ) external; /// @notice Caches all programs with a codehash equal to the given address. /// @notice Reverts if the programs have expired. /// @notice Caller must be a cache manager or chain owner. /// @notice If you're looking for how to bid for position, interact with the chain's cache manager contract. - function cacheProgram(address addr) external; + function cacheProgram( + address addr + ) external; /// @notice Evicts all programs with the given codehash. /// @notice Caller must be a cache manager or chain owner. - function evictCodehash(bytes32 codehash) external; + function evictCodehash( + bytes32 codehash + ) external; /// @notice Gets whether a program is cached. Note that the program may be expired. - function codehashIsCached(bytes32 codehash) external view returns (bool); + function codehashIsCached( + bytes32 codehash + ) external view returns (bool); event UpdateProgramCache(address indexed manager, bytes32 indexed codehash, bool cached); } diff --git a/src/precompiles/ArbosTest.sol b/src/precompiles/ArbosTest.sol index b766fd01..e1c1ce90 100644 --- a/src/precompiles/ArbosTest.sol +++ b/src/precompiles/ArbosTest.sol @@ -10,5 +10,7 @@ pragma solidity >=0.4.21 <0.9.0; /// Precompiled contract that exists in every Arbitrum chain at 0x0000000000000000000000000000000000000069. interface ArbosTest { /// @notice Unproductively burns the amount of L2 ArbGas - function burnArbGas(uint256 gasAmount) external pure; + function burnArbGas( + uint256 gasAmount + ) external pure; } diff --git a/src/rollup/AbsRollupEventInbox.sol b/src/rollup/AbsRollupEventInbox.sol index c712d31f..b98254ef 100644 --- a/src/rollup/AbsRollupEventInbox.sol +++ b/src/rollup/AbsRollupEventInbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; @@ -11,7 +11,6 @@ import "../precompiles/ArbGasInfo.sol"; import "../libraries/ArbitrumChecker.sol"; import "../bridge/IDelayedMessageProvider.sol"; import "../libraries/DelegateCallAware.sol"; -import {INITIALIZATION_MSG_TYPE} from "../libraries/MessageTypes.sol"; import {AlreadyInit, HadZeroInit, RollupNotChanged} from "../libraries/Error.sol"; /** @@ -30,7 +29,9 @@ abstract contract AbsRollupEventInbox is _; } - function initialize(IBridge _bridge) external override onlyDelegated { + function initialize( + IBridge _bridge + ) external override onlyDelegated { if (address(bridge) != address(0)) revert AlreadyInit(); if (address(_bridge) == address(0)) revert HadZeroInit(); bridge = _bridge; @@ -39,32 +40,30 @@ abstract contract AbsRollupEventInbox is /// @notice Allows the rollup owner to sync the rollup address function updateRollupAddress() external { - if (msg.sender != IOwnable(rollup).owner()) + if (msg.sender != IOwnable(rollup).owner()) { revert NotOwner(msg.sender, IOwnable(rollup).owner()); + } address newRollup = address(bridge.rollup()); if (rollup == newRollup) revert RollupNotChanged(); rollup = newRollup; } - function rollupInitialized(uint256 chainId, string calldata chainConfig) - external - override - onlyRollup - { + function rollupInitialized( + uint256 chainId, + string calldata chainConfig + ) external override onlyRollup { require(bytes(chainConfig).length > 0, "EMPTY_CHAIN_CONFIG"); uint8 initMsgVersion = 1; uint256 currentDataCost = _currentDataCostToReport(); - bytes memory initMsg = abi.encodePacked( - chainId, - initMsgVersion, - currentDataCost, - chainConfig - ); + bytes memory initMsg = + abi.encodePacked(chainId, initMsgVersion, currentDataCost, chainConfig); uint256 num = _enqueueInitializationMsg(initMsg); emit InboxMessageDelivered(num, initMsg); } - function _enqueueInitializationMsg(bytes memory initMsg) internal virtual returns (uint256); + function _enqueueInitializationMsg( + bytes memory initMsg + ) internal virtual returns (uint256); function _currentDataCostToReport() internal virtual returns (uint256); } diff --git a/src/rollup/Assertion.sol b/src/rollup/Assertion.sol new file mode 100644 index 00000000..89705653 --- /dev/null +++ b/src/rollup/Assertion.sol @@ -0,0 +1,100 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "./AssertionState.sol"; + +enum AssertionStatus { + // No assertion at this index + NoAssertion, + // Assertion is being computed + Pending, + // Assertion is confirmed + Confirmed +} + +struct AssertionNode { + // This value starts at zero and is set to a value when the first child is created. After that it is constant until the assertion is destroyed or the owner destroys pending assertions + uint64 firstChildBlock; + // This value starts at zero and is set to a value when the second child is created. After that it is constant until the assertion is destroyed or the owner destroys pending assertions + uint64 secondChildBlock; + // The block number when this assertion was created + uint64 createdAtBlock; + // True if this assertion is the first child of its prev + bool isFirstChild; + // Status of the Assertion + AssertionStatus status; + // A hash of the context available at the time of this assertions creation. It should contain information that is not specific + // to this assertion, but instead to the environment at the time of creation. This is necessary to store on the assertion + // as this environment can change and we need to know what it was like at the time this assertion was created. An example + // of this is the wasm module root which determines the state transition function on the L2. If the wasm module root + // changes we need to know that previous assertions were made under a different root, so that we can understand that they + // were valid at the time. So when resolving a challenge by one step, the edge challenge manager finds the wasm module root + // that was recorded on the prev of the assertions being disputed and uses it to resolve the one step proof. + bytes32 configHash; +} + +struct BeforeStateData { + // The assertion hash of the prev of the beforeState(prev) + bytes32 prevPrevAssertionHash; + // The sequencer inbox accumulator asserted by the beforeState(prev) + bytes32 sequencerBatchAcc; + // below are the components of config hash + ConfigData configData; +} + +struct AssertionInputs { + // Additional data used to validate the before state + BeforeStateData beforeStateData; + AssertionState beforeState; + AssertionState afterState; +} + +struct ConfigData { + bytes32 wasmModuleRoot; + uint256 requiredStake; + address challengeManager; + uint64 confirmPeriodBlocks; + uint64 nextInboxPosition; +} + +/** + * @notice Utility functions for Assertion + */ +library AssertionNodeLib { + /** + * @notice Initialize a Assertion + */ + function createAssertion( + bool _isFirstChild, + bytes32 _configHash + ) internal view returns (AssertionNode memory) { + AssertionNode memory assertion; + assertion.createdAtBlock = uint64(block.number); + assertion.isFirstChild = _isFirstChild; + assertion.configHash = _configHash; + assertion.status = AssertionStatus.Pending; + return assertion; + } + + /** + * @notice Update child properties + */ + function childCreated( + AssertionNode storage self + ) internal { + if (self.firstChildBlock == 0) { + self.firstChildBlock = uint64(block.number); + } else if (self.secondChildBlock == 0) { + self.secondChildBlock = uint64(block.number); + } + } + + function requireExists( + AssertionNode memory self + ) internal pure { + require(self.status != AssertionStatus.NoAssertion, "ASSERTION_NOT_EXIST"); + } +} diff --git a/src/rollup/AssertionState.sol b/src/rollup/AssertionState.sol new file mode 100644 index 00000000..0177ecc2 --- /dev/null +++ b/src/rollup/AssertionState.sol @@ -0,0 +1,29 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "../state/GlobalState.sol"; +import "../state/Machine.sol"; +import "../osp/IOneStepProofEntry.sol"; + +struct AssertionState { + GlobalState globalState; + MachineStatus machineStatus; + bytes32 endHistoryRoot; +} + +library AssertionStateLib { + function toExecutionState( + AssertionState memory state + ) internal pure returns (ExecutionState memory) { + return ExecutionState(state.globalState, state.machineStatus); + } + + function hash( + AssertionState memory state + ) internal pure returns (bytes32) { + return keccak256(abi.encode(state)); + } +} diff --git a/src/rollup/BOLDUpgradeAction.sol b/src/rollup/BOLDUpgradeAction.sol new file mode 100644 index 00000000..2af1e91f --- /dev/null +++ b/src/rollup/BOLDUpgradeAction.sol @@ -0,0 +1,631 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol"; +import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import "./RollupProxy.sol"; +import "./RollupLib.sol"; +import "./RollupAdminLogic.sol"; + +struct Node { + // Hash of the state of the chain as of this node + bytes32 stateHash; + // Hash of the data that can be challenged + bytes32 challengeHash; + // Hash of the data that will be committed if this node is confirmed + bytes32 confirmData; + // Index of the node previous to this one + uint64 prevNum; + // Deadline at which this node can be confirmed + uint64 deadlineBlock; + // Deadline at which a child of this node can be confirmed + uint64 noChildConfirmedBeforeBlock; + // Number of stakers staked on this node. This includes real stakers and zombies + uint64 stakerCount; + // Number of stakers staked on a child node. This includes real stakers and zombies + uint64 childStakerCount; + // This value starts at zero and is set to a value when the first child is created. After that it is constant until the node is destroyed or the owner destroys pending nodes + uint64 firstChildBlock; + // The number of the latest child of this node to be created + uint64 latestChildNumber; + // The block number when this node was created + uint64 createdAtBlock; + // A hash of all the data needed to determine this node's validity, to protect against reorgs + bytes32 nodeHash; +} + +struct OldStaker { + uint256 amountStaked; + uint64 index; + uint64 latestStakedNode; + // currentChallenge is 0 if staker is not in a challenge + uint64 currentChallenge; // 1. cannot have current challenge + bool isStaked; // 2. must be staked +} + +interface IOldRollup { + struct Assertion { + ExecutionState beforeState; + ExecutionState afterState; + uint64 numBlocks; + } + + event NodeCreated( + uint64 indexed nodeNum, + bytes32 indexed parentNodeHash, + bytes32 indexed nodeHash, + bytes32 executionHash, + Assertion assertion, + bytes32 afterInboxBatchAcc, + bytes32 wasmModuleRoot, + uint256 inboxMaxCount + ); + + function wasmModuleRoot() external view returns (bytes32); + function latestConfirmed() external view returns (uint64); + function getNode( + uint64 nodeNum + ) external view returns (Node memory); + function getStakerAddress( + uint64 stakerNum + ) external view returns (address); + function stakerCount() external view returns (uint64); + function getStaker( + address staker + ) external view returns (OldStaker memory); + function isValidator( + address validator + ) external view returns (bool); + function validatorWalletCreator() external view returns (address); + function anyTrustFastConfirmer() external view returns (address); +} + +interface IOldRollupAdmin { + function forceRefundStaker( + address[] memory stacker + ) external; + function pause() external; + function resume() external; +} + +interface ISeqInboxPostUpgradeInit { + function postUpgradeInit( + BufferConfig memory bufferConfig_ + ) external; +} + +/// @title Provides pre-images to a state hash +/// @notice We need to use the execution state of the latest confirmed node as the genesis +/// in the new rollup. However the this full state is not available on chain, only +/// the state hash is, which commits to this. This lookup contract should be deployed +/// before the upgrade, and just before the upgrade is executed the pre-image of the +/// latest confirmed state hash should be populated here. The upgrade contact can then +/// fetch this information and verify it before using it. +contract StateHashPreImageLookup { + using GlobalStateLib for GlobalState; + + event HashSet(bytes32 h, ExecutionState executionState, uint256 inboxMaxCount); + + mapping(bytes32 => bytes) internal preImages; + + function stateHash( + ExecutionState calldata executionState, + uint256 inboxMaxCount + ) public pure returns (bytes32) { + return keccak256( + abi.encodePacked( + executionState.globalState.hash(), inboxMaxCount, executionState.machineStatus + ) + ); + } + + function set(bytes32 h, ExecutionState calldata executionState, uint256 inboxMaxCount) public { + require(h == stateHash(executionState, inboxMaxCount), "Invalid hash"); + preImages[h] = abi.encode(executionState, inboxMaxCount); + emit HashSet(h, executionState, inboxMaxCount); + } + + function get( + bytes32 h + ) public view returns (ExecutionState memory executionState, uint256 inboxMaxCount) { + (executionState, inboxMaxCount) = abi.decode(preImages[h], (ExecutionState, uint256)); + require(inboxMaxCount != 0, "Hash not yet set"); + } +} + +/// @title Forwards calls to the rollup so that they can be interpreted as a user +/// @notice In the upgrade executor we need to access functions on the rollup +/// but since the upgrade executor is the admin it will always be forwarded to the +/// rollup admin logic. We create a separate forwarder contract here that just relays +/// information, since it's not the admin it can access rollup user logic. +contract RollupReader is IOldRollup { + IOldRollup public immutable rollup; + + constructor( + IOldRollup _rollup + ) { + rollup = _rollup; + } + + function wasmModuleRoot() external view returns (bytes32) { + return rollup.wasmModuleRoot(); + } + + function latestConfirmed() external view returns (uint64) { + return rollup.latestConfirmed(); + } + + function getNode( + uint64 nodeNum + ) external view returns (Node memory) { + return rollup.getNode(nodeNum); + } + + function getStakerAddress( + uint64 stakerNum + ) external view returns (address) { + return rollup.getStakerAddress(stakerNum); + } + + function stakerCount() external view returns (uint64) { + return rollup.stakerCount(); + } + + function getStaker( + address staker + ) external view returns (OldStaker memory) { + return rollup.getStaker(staker); + } + + function isValidator( + address validator + ) external view returns (bool) { + return rollup.isValidator(validator); + } + + function validatorWalletCreator() external view returns (address) { + return rollup.validatorWalletCreator(); + } + + function anyTrustFastConfirmer() external view returns (address) { + return rollup.anyTrustFastConfirmer(); + } +} + +/// @notice Stores an array specified during construction. +/// Since the BOLDUpgradeAction is not allowed to have storage, +/// we use this contract so it can keep an immutable pointer to an array. +contract ConstantArrayStorage { + uint256[] internal _array; + + constructor( + uint256[] memory __array + ) { + _array = __array; + } + + function array() public view returns (uint256[] memory) { + return _array; + } +} + +/// @title Upgrades an Arbitrum rollup to the new challenge protocol +/// @notice Requires implementation contracts to be pre-deployed and provided in the constructor +/// Also requires a lookup contract to be provided that contains the pre-image of the state hash +/// that is in the latest confirmed assertion in the current rollup. +contract BOLDUpgradeAction { + using AssertionStateLib for AssertionState; + + uint256 public immutable BLOCK_LEAF_SIZE; + uint256 public immutable BIGSTEP_LEAF_SIZE; + uint256 public immutable SMALLSTEP_LEAF_SIZE; + uint8 public immutable NUM_BIGSTEP_LEVEL; + + address public immutable EXCESS_STAKE_RECEIVER; + IOldRollup public immutable OLD_ROLLUP; + address public immutable BRIDGE; + address public immutable SEQ_INBOX; + address public immutable REI; + address public immutable OUTBOX; + address public immutable INBOX; + + uint64 public immutable CONFIRM_PERIOD_BLOCKS; + uint64 public immutable CHALLENGE_PERIOD_BLOCKS; + address public immutable STAKE_TOKEN; + uint256 public immutable STAKE_AMOUNT; + uint256 public immutable CHAIN_ID; + bool public immutable DISABLE_VALIDATOR_WHITELIST; + uint64 public immutable CHALLENGE_GRACE_PERIOD_BLOCKS; + address public immutable MINI_STAKE_AMOUNTS_STORAGE; + bool public immutable IS_DELAY_BUFFERABLE; + uint256 public constant SECONDS_PER_SLOT = 12; + // buffer config + uint64 public immutable MAX; + uint64 public immutable THRESHOLD; + uint64 public immutable REPLENISH_RATE_IN_BASIS; + + IOneStepProofEntry public immutable OSP; + // proxy admins of the contracts to be upgraded + ProxyAdmin public immutable PROXY_ADMIN_OUTBOX; + ProxyAdmin public immutable PROXY_ADMIN_BRIDGE; + ProxyAdmin public immutable PROXY_ADMIN_REI; + ProxyAdmin public immutable PROXY_ADMIN_SEQUENCER_INBOX; + ProxyAdmin public immutable PROXY_ADMIN_INBOX; + StateHashPreImageLookup public immutable PREIMAGE_LOOKUP; + RollupReader public immutable ROLLUP_READER; + + // new contract implementations + address public immutable IMPL_BRIDGE; + address public immutable IMPL_SEQUENCER_INBOX; + address public immutable IMPL_INBOX; + address public immutable IMPL_REI; + address public immutable IMPL_OUTBOX; + // the old rollup, but with whenNotPaused protection removed from stake withdrawal functions + address public immutable IMPL_PATCHED_OLD_ROLLUP_USER; + address public immutable IMPL_NEW_ROLLUP_USER; + address public immutable IMPL_NEW_ROLLUP_ADMIN; + address public immutable IMPL_CHALLENGE_MANAGER; + + event RollupMigrated(address rollup, address challengeManager); + + struct Settings { + uint64 confirmPeriodBlocks; + uint64 challengePeriodBlocks; + address stakeToken; + uint256 stakeAmt; + uint256[] miniStakeAmounts; + uint256 chainId; + bool disableValidatorWhitelist; + uint256 blockLeafSize; + uint256 bigStepLeafSize; + uint256 smallStepLeafSize; + uint8 numBigStepLevel; + uint64 challengeGracePeriodBlocks; + bool isDelayBufferable; + BufferConfig bufferConfig; + } + + // Unfortunately these are not discoverable on-chain, so we need to supply them + struct ProxyAdmins { + address outbox; + address bridge; + address rei; + address seqInbox; + address inbox; + } + + struct Implementations { + address bridge; + address seqInbox; + address inbox; + address rei; + address outbox; + address oldRollupUser; + address newRollupUser; + address newRollupAdmin; + address challengeManager; + } + + struct Contracts { + address excessStakeReceiver; + IOldRollup rollup; + address bridge; + address sequencerInbox; + address rollupEventInbox; + address outbox; + address inbox; + IOneStepProofEntry osp; + } + + constructor( + Contracts memory contracts, + ProxyAdmins memory proxyAdmins, + Implementations memory implementations, + Settings memory settings + ) { + EXCESS_STAKE_RECEIVER = contracts.excessStakeReceiver; + OLD_ROLLUP = contracts.rollup; + BRIDGE = contracts.bridge; + SEQ_INBOX = contracts.sequencerInbox; + REI = contracts.rollupEventInbox; + OUTBOX = contracts.outbox; + INBOX = contracts.inbox; + OSP = contracts.osp; + + PROXY_ADMIN_OUTBOX = ProxyAdmin(proxyAdmins.outbox); + PROXY_ADMIN_BRIDGE = ProxyAdmin(proxyAdmins.bridge); + PROXY_ADMIN_REI = ProxyAdmin(proxyAdmins.rei); + PROXY_ADMIN_SEQUENCER_INBOX = ProxyAdmin(proxyAdmins.seqInbox); + PROXY_ADMIN_INBOX = ProxyAdmin(proxyAdmins.inbox); + PREIMAGE_LOOKUP = new StateHashPreImageLookup(); + ROLLUP_READER = new RollupReader(contracts.rollup); + + IMPL_BRIDGE = implementations.bridge; + IMPL_SEQUENCER_INBOX = implementations.seqInbox; + IMPL_INBOX = implementations.inbox; + IMPL_REI = implementations.rei; + IMPL_OUTBOX = implementations.outbox; + IMPL_PATCHED_OLD_ROLLUP_USER = implementations.oldRollupUser; + IMPL_NEW_ROLLUP_USER = implementations.newRollupUser; + IMPL_NEW_ROLLUP_ADMIN = implementations.newRollupAdmin; + IMPL_CHALLENGE_MANAGER = implementations.challengeManager; + + CHAIN_ID = settings.chainId; + CONFIRM_PERIOD_BLOCKS = settings.confirmPeriodBlocks; + CHALLENGE_PERIOD_BLOCKS = settings.challengePeriodBlocks; + STAKE_TOKEN = settings.stakeToken; + STAKE_AMOUNT = settings.stakeAmt; + MINI_STAKE_AMOUNTS_STORAGE = address(new ConstantArrayStorage(settings.miniStakeAmounts)); + DISABLE_VALIDATOR_WHITELIST = settings.disableValidatorWhitelist; + BLOCK_LEAF_SIZE = settings.blockLeafSize; + BIGSTEP_LEAF_SIZE = settings.bigStepLeafSize; + SMALLSTEP_LEAF_SIZE = settings.smallStepLeafSize; + NUM_BIGSTEP_LEVEL = settings.numBigStepLevel; + CHALLENGE_GRACE_PERIOD_BLOCKS = settings.challengeGracePeriodBlocks; + IS_DELAY_BUFFERABLE = settings.isDelayBufferable; + MAX = settings.bufferConfig.max; + THRESHOLD = settings.bufferConfig.threshold; + REPLENISH_RATE_IN_BASIS = settings.bufferConfig.replenishRateInBasis; + } + + /// @dev Refund the existing stakers, pause and upgrade the current rollup to + /// allow them to withdraw after pausing + function cleanupOldRollup() private { + IOldRollupAdmin(address(OLD_ROLLUP)).pause(); + + uint64 stakerCount = ROLLUP_READER.stakerCount(); + // since we for-loop these stakers we set an arbitrary limit - we dont + // expect any instances to have close to this number of stakers + if (stakerCount > 50) { + stakerCount = 50; + } + for (uint64 i = 0; i < stakerCount;) { + address stakerAddr = ROLLUP_READER.getStakerAddress(i); + OldStaker memory staker = ROLLUP_READER.getStaker(stakerAddr); + if (staker.isStaked && staker.currentChallenge == 0) { + address[] memory stakersToRefund = new address[](1); + stakersToRefund[0] = stakerAddr; + + IOldRollupAdmin(address(OLD_ROLLUP)).forceRefundStaker(stakersToRefund); + stakerCount -= 1; + } else { + i++; + } + } + + // upgrade the rollup to one that allows validators to withdraw even whilst paused + DoubleLogicUUPSUpgradeable(address(OLD_ROLLUP)).upgradeSecondaryTo( + IMPL_PATCHED_OLD_ROLLUP_USER + ); + } + + /// @dev Create a config for the new rollup - fetches the latest confirmed + /// assertion from the old rollup and uses it as genesis + function createConfig() private view returns (Config memory) { + // fetch the assertion associated with the latest confirmed state + bytes32 latestConfirmedStateHash = + ROLLUP_READER.getNode(ROLLUP_READER.latestConfirmed()).stateHash; + (ExecutionState memory genesisExecState, uint256 inboxMaxCount) = + PREIMAGE_LOOKUP.get(latestConfirmedStateHash); + + // Convert ExecutionState into AssertionState with endHistoryRoot 0 + AssertionState memory genesisAssertionState; + genesisAssertionState.globalState = genesisExecState.globalState; + genesisAssertionState.machineStatus = genesisExecState.machineStatus; + + // double check the hash + require( + PREIMAGE_LOOKUP.stateHash(genesisAssertionState.toExecutionState(), inboxMaxCount) + == latestConfirmedStateHash, + "Invalid latest execution hash" + ); + + // this isnt used during rollup creation, so we can pass in empty + ISequencerInbox.MaxTimeVariation memory maxTimeVariation; + BufferConfig memory bufferConfig; + + return Config({ + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + stakeToken: STAKE_TOKEN, + baseStake: STAKE_AMOUNT, + wasmModuleRoot: ROLLUP_READER.wasmModuleRoot(), + owner: address(this), // upgrade executor is the owner + loserStakeEscrow: EXCESS_STAKE_RECEIVER, // additional funds get sent to the l1 timelock + chainId: CHAIN_ID, + chainConfig: "", // we can use an empty chain config it wont be used in the rollup initialization because we check if the rei is already connected there + miniStakeValues: ConstantArrayStorage(MINI_STAKE_AMOUNTS_STORAGE).array(), + sequencerInboxMaxTimeVariation: maxTimeVariation, + layerZeroBlockEdgeHeight: BLOCK_LEAF_SIZE, + layerZeroBigStepEdgeHeight: BIGSTEP_LEAF_SIZE, + layerZeroSmallStepEdgeHeight: SMALLSTEP_LEAF_SIZE, + genesisAssertionState: genesisAssertionState, + genesisInboxCount: inboxMaxCount, + anyTrustFastConfirmer: address(0), // fast confirmer would be migrated from the old rollup if existed + numBigStepLevel: NUM_BIGSTEP_LEVEL, + challengeGracePeriodBlocks: CHALLENGE_GRACE_PERIOD_BLOCKS, + bufferConfig: bufferConfig + }); + } + + function upgradeSurroundingContracts( + address newRollupAddress + ) private { + // upgrade each of these contracts to an implementation that allows + // the rollup address to be set to the new rollup address + + TransparentUpgradeableProxy bridge = TransparentUpgradeableProxy(payable(BRIDGE)); + PROXY_ADMIN_BRIDGE.upgrade(bridge, IMPL_BRIDGE); + IBridge(BRIDGE).updateRollupAddress(IOwnable(newRollupAddress)); + + upgradeSequencerInbox(); + + TransparentUpgradeableProxy inbox = TransparentUpgradeableProxy(payable(INBOX)); + PROXY_ADMIN_INBOX.upgrade(inbox, IMPL_INBOX); + + TransparentUpgradeableProxy rollupEventInbox = TransparentUpgradeableProxy(payable(REI)); + PROXY_ADMIN_REI.upgrade(rollupEventInbox, IMPL_REI); + IRollupEventInbox(REI).updateRollupAddress(); + + TransparentUpgradeableProxy outbox = TransparentUpgradeableProxy(payable(OUTBOX)); + PROXY_ADMIN_OUTBOX.upgrade(outbox, IMPL_OUTBOX); + IOutbox(OUTBOX).updateRollupAddress(); + } + + function upgradeSequencerInbox() private { + TransparentUpgradeableProxy sequencerInbox = TransparentUpgradeableProxy(payable(SEQ_INBOX)); + + if (IS_DELAY_BUFFERABLE) { + PROXY_ADMIN_SEQUENCER_INBOX.upgradeAndCall( + sequencerInbox, + IMPL_SEQUENCER_INBOX, + abi.encodeCall( + ISeqInboxPostUpgradeInit.postUpgradeInit, + ( + BufferConfig({ + max: MAX, + threshold: THRESHOLD, + replenishRateInBasis: REPLENISH_RATE_IN_BASIS + }) + ) + ) + ); + } else { + PROXY_ADMIN_SEQUENCER_INBOX.upgrade(sequencerInbox, IMPL_SEQUENCER_INBOX); + } + + // verify + require( + PROXY_ADMIN_SEQUENCER_INBOX.getProxyImplementation(sequencerInbox) + == IMPL_SEQUENCER_INBOX, + "DelayBuffer: new seq inbox implementation not set" + ); + require( + ISequencerInbox(SEQ_INBOX).isDelayBufferable() == IS_DELAY_BUFFERABLE, + "DelayBuffer: isDelayBufferable not set" + ); + + (uint256 delayBlocks, uint256 futureBlocks, uint256 delaySeconds, uint256 futureSeconds) = + ISequencerInbox(SEQ_INBOX).maxTimeVariation(); + + // Force inclusion now depends on block numbers and not timestamps. + // To ensure the force inclusion window is unchanged, we need to + // update the delayBlocks if delaySeconds implies a larger delay. + uint256 implDelayBlocks = delaySeconds % SECONDS_PER_SLOT == 0 + ? delaySeconds / SECONDS_PER_SLOT + : delaySeconds / SECONDS_PER_SLOT + 1; + + delayBlocks = implDelayBlocks > delayBlocks ? implDelayBlocks : delayBlocks; + + ISequencerInbox(SEQ_INBOX).setMaxTimeVariation( + ISequencerInbox.MaxTimeVariation({ + delayBlocks: delayBlocks, + delaySeconds: delaySeconds, + futureBlocks: futureBlocks, + futureSeconds: futureSeconds + }) + ); + + // verify + (uint256 _delayBlocks, uint256 _futureBlocks, uint256 _delaySeconds, uint256 _futureSeconds) + = ISequencerInbox(SEQ_INBOX).maxTimeVariation(); + require(_delayBlocks == delayBlocks, "DelayBuffer: delayBlocks not set"); + require(_delaySeconds == delaySeconds, "DelayBuffer: delaySeconds not set"); + require(_futureBlocks == futureBlocks, "DelayBuffer: futureBlocks not set"); + require(_futureSeconds == futureSeconds, "DelayBuffer: futureSeconds not set"); + + ISequencerInbox(SEQ_INBOX).updateRollupAddress(); + } + + function perform( + address[] memory validators + ) external { + // tidy up the old rollup - pause it and refund stakes + cleanupOldRollup(); + + // create the config, we do this now so that we compute the expected rollup address + Config memory config = createConfig(); + + // deploy the new challenge manager + IEdgeChallengeManager challengeManager = IEdgeChallengeManager( + address( + new TransparentUpgradeableProxy( + address(IMPL_CHALLENGE_MANAGER), + address(PROXY_ADMIN_BRIDGE), // use the same proxy admin as the bridge + "" + ) + ) + ); + + // now that all the dependent contracts are pointed at the new address we can + // deploy and init the new rollup + ContractDependencies memory connectedContracts = ContractDependencies({ + bridge: IBridge(BRIDGE), + sequencerInbox: ISequencerInbox(SEQ_INBOX), + inbox: IInboxBase(INBOX), + outbox: IOutbox(OUTBOX), + rollupEventInbox: IRollupEventInbox(REI), + challengeManager: challengeManager, + rollupAdminLogic: IMPL_NEW_ROLLUP_ADMIN, + rollupUserLogic: IRollupUser(IMPL_NEW_ROLLUP_USER), + validatorWalletCreator: ROLLUP_READER.validatorWalletCreator() + }); + + // upgrade the surrounding contracts eg bridge, outbox, seq inbox, rollup event inbox + // to set of the new rollup address + bytes32 rollupSalt = keccak256(abi.encode(config)); + address expectedRollupAddress = + Create2Upgradeable.computeAddress(rollupSalt, keccak256(type(RollupProxy).creationCode)); + upgradeSurroundingContracts(expectedRollupAddress); + + challengeManager.initialize({ + _assertionChain: IAssertionChain(expectedRollupAddress), + _challengePeriodBlocks: CHALLENGE_PERIOD_BLOCKS, + _oneStepProofEntry: OSP, + layerZeroBlockEdgeHeight: config.layerZeroBlockEdgeHeight, + layerZeroBigStepEdgeHeight: config.layerZeroBigStepEdgeHeight, + layerZeroSmallStepEdgeHeight: config.layerZeroSmallStepEdgeHeight, + _stakeToken: IERC20(config.stakeToken), + _stakeAmounts: config.miniStakeValues, + _excessStakeReceiver: EXCESS_STAKE_RECEIVER, + _numBigStepLevel: config.numBigStepLevel + }); + + RollupProxy rollup = new RollupProxy{salt: rollupSalt}(); + require(address(rollup) == expectedRollupAddress, "UNEXPCTED_ROLLUP_ADDR"); + + // initialize the rollup with this contract as owner to set batch poster and validators + // it will transfer the ownership back to the actual owner later + address actualOwner = config.owner; + config.owner = address(this); + + rollup.initializeProxy(config, connectedContracts); + + if (validators.length != 0) { + bool[] memory _vals = new bool[](validators.length); + for (uint256 i = 0; i < validators.length; i++) { + require(ROLLUP_READER.isValidator(validators[i]), "UNEXPECTED_NEW_VALIDATOR"); + _vals[i] = true; + } + IRollupAdmin(address(rollup)).setValidator(validators, _vals); + } + if (DISABLE_VALIDATOR_WHITELIST) { + IRollupAdmin(address(rollup)).setValidatorWhitelistDisabled(DISABLE_VALIDATOR_WHITELIST); + } + + // anyTrustFastConfirmer only exists since v2.0.0, but the old rollup can be on an older version + try ROLLUP_READER.anyTrustFastConfirmer() returns (address anyTrustFastConfirmer) { + if (anyTrustFastConfirmer != address(0)) { + IRollupAdmin(address(rollup)).setAnyTrustFastConfirmer(anyTrustFastConfirmer); + } + } catch { + // do nothing if anyTrustFastConfirmer doesnt exist + } + + IRollupAdmin(address(rollup)).setOwner(actualOwner); + + emit RollupMigrated(expectedRollupAddress, address(challengeManager)); + } +} diff --git a/src/rollup/BridgeCreator.sol b/src/rollup/BridgeCreator.sol index 0e45f815..bb375e43 100644 --- a/src/rollup/BridgeCreator.sol +++ b/src/rollup/BridgeCreator.sol @@ -19,49 +19,71 @@ import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; contract BridgeCreator is Ownable { - BridgeContracts public ethBasedTemplates; - BridgeContracts public erc20BasedTemplates; + BridgeTemplates public ethBasedTemplates; + BridgeTemplates public erc20BasedTemplates; event TemplatesUpdated(); event ERC20TemplatesUpdated(); - struct BridgeContracts { + struct BridgeTemplates { IBridge bridge; ISequencerInbox sequencerInbox; + ISequencerInbox delayBufferableSequencerInbox; IInboxBase inbox; IRollupEventInbox rollupEventInbox; IOutbox outbox; } + struct BridgeContracts { + IBridge bridge; + IInboxBase inbox; + ISequencerInbox sequencerInbox; + IRollupEventInbox rollupEventInbox; + IOutbox outbox; + } + constructor( - BridgeContracts memory _ethBasedTemplates, - BridgeContracts memory _erc20BasedTemplates + BridgeTemplates memory _ethBasedTemplates, + BridgeTemplates memory _erc20BasedTemplates ) Ownable() { ethBasedTemplates = _ethBasedTemplates; erc20BasedTemplates = _erc20BasedTemplates; } - function updateTemplates(BridgeContracts calldata _newTemplates) external onlyOwner { + function updateTemplates( + BridgeTemplates calldata _newTemplates + ) external onlyOwner { ethBasedTemplates = _newTemplates; emit TemplatesUpdated(); } - function updateERC20Templates(BridgeContracts calldata _newTemplates) external onlyOwner { + function updateERC20Templates( + BridgeTemplates calldata _newTemplates + ) external onlyOwner { erc20BasedTemplates = _newTemplates; emit ERC20TemplatesUpdated(); } - function _createBridge(address adminProxy, BridgeContracts storage templates) - internal - returns (BridgeContracts memory) - { + function _createBridge( + address adminProxy, + BridgeTemplates memory templates, + bool isDelayBufferable + ) internal returns (BridgeContracts memory) { BridgeContracts memory frame; frame.bridge = IBridge( address(new TransparentUpgradeableProxy(address(templates.bridge), adminProxy, "")) ); frame.sequencerInbox = ISequencerInbox( address( - new TransparentUpgradeableProxy(address(templates.sequencerInbox), adminProxy, "") + new TransparentUpgradeableProxy( + address( + isDelayBufferable + ? templates.delayBufferableSequencerInbox + : templates.sequencerInbox + ), + adminProxy, + "" + ) ) ); frame.inbox = IInboxBase( @@ -82,12 +104,17 @@ contract BridgeCreator is Ownable { address adminProxy, address rollup, address nativeToken, - ISequencerInbox.MaxTimeVariation calldata maxTimeVariation + ISequencerInbox.MaxTimeVariation calldata maxTimeVariation, + BufferConfig calldata bufferConfig ) external returns (BridgeContracts memory) { + // create delay bufferable sequencer inbox if threshold is non-zero + bool isDelayBufferable = bufferConfig.threshold != 0; + // create ETH-based bridge if address zero is provided for native token, otherwise create ERC20-based bridge BridgeContracts memory frame = _createBridge( adminProxy, - nativeToken == address(0) ? ethBasedTemplates : erc20BasedTemplates + nativeToken == address(0) ? ethBasedTemplates : erc20BasedTemplates, + isDelayBufferable ); // init contracts @@ -96,7 +123,7 @@ contract BridgeCreator is Ownable { } else { IERC20Bridge(address(frame.bridge)).initialize(IOwnable(rollup), nativeToken); } - frame.sequencerInbox.initialize(IBridge(frame.bridge), maxTimeVariation); + frame.sequencerInbox.initialize(IBridge(frame.bridge), maxTimeVariation, bufferConfig); frame.inbox.initialize(frame.bridge, frame.sequencerInbox); frame.rollupEventInbox.initialize(frame.bridge); frame.outbox.initialize(frame.bridge); diff --git a/src/rollup/Config.sol b/src/rollup/Config.sol index 13ca82e2..0f2933a6 100644 --- a/src/rollup/Config.sol +++ b/src/rollup/Config.sol @@ -12,11 +12,10 @@ import "../bridge/IOutbox.sol"; import "../bridge/IInboxBase.sol"; import "./IRollupEventInbox.sol"; import "./IRollupLogic.sol"; -import "../challenge/IChallengeManager.sol"; +import "../challengeV2/EdgeChallengeManager.sol"; struct Config { uint64 confirmPeriodBlocks; - uint64 extraChallengeTimeBlocks; address stakeToken; uint256 baseStake; bytes32 wasmModuleRoot; @@ -24,8 +23,19 @@ struct Config { address loserStakeEscrow; uint256 chainId; string chainConfig; - uint64 genesisBlockNum; + uint256[] miniStakeValues; ISequencerInbox.MaxTimeVariation sequencerInboxMaxTimeVariation; + uint256 layerZeroBlockEdgeHeight; + uint256 layerZeroBigStepEdgeHeight; + uint256 layerZeroSmallStepEdgeHeight; + /// @notice The execution state to be used in the genesis assertion + AssertionState genesisAssertionState; + /// @notice The inbox size at the time the genesis execution state was created + uint256 genesisInboxCount; + address anyTrustFastConfirmer; + uint8 numBigStepLevel; + uint64 challengeGracePeriodBlocks; + BufferConfig bufferConfig; } struct ContractDependencies { @@ -34,10 +44,8 @@ struct ContractDependencies { IInboxBase inbox; IOutbox outbox; IRollupEventInbox rollupEventInbox; - IChallengeManager challengeManager; - address rollupAdminLogic; + IEdgeChallengeManager challengeManager; + address rollupAdminLogic; // this cannot be IRollupAdmin because of circular dependencies IRollupUser rollupUserLogic; - // misc contracts that are useful when interacting with the rollup - address validatorUtils; address validatorWalletCreator; } diff --git a/src/rollup/DeployHelper.sol b/src/rollup/DeployHelper.sol index 4c0758b7..87a160f2 100644 --- a/src/rollup/DeployHelper.sol +++ b/src/rollup/DeployHelper.sol @@ -51,10 +51,7 @@ contract DeployHelper { address _nativeToken, uint256 maxFeePerGas ) internal { - uint256 submissionCost = IInboxBase(inbox).calculateRetryableSubmissionFee( - 0, - block.basefee - ); + uint256 submissionCost = IInboxBase(inbox).calculateRetryableSubmissionFee(0, block.basefee); uint256 feeAmount = _value + submissionCost + GASLIMIT * maxFeePerGas; // fund the target L2 address @@ -63,13 +60,13 @@ contract DeployHelper { uint256 feeAmountNativeDenominated = feeAmount; uint8 decimals = ERC20(_nativeToken).decimals(); if (decimals < 18) { - feeAmountNativeDenominated = feeAmount / (10**(18 - decimals)); + feeAmountNativeDenominated = feeAmount / (10 ** (18 - decimals)); // round up if necessary - if (feeAmountNativeDenominated * (10**(18 - decimals)) < feeAmount) { + if (feeAmountNativeDenominated * (10 ** (18 - decimals)) < feeAmount) { feeAmountNativeDenominated++; } } else if (decimals > 18) { - feeAmountNativeDenominated = feeAmount * (10**(decimals - 18)); + feeAmountNativeDenominated = feeAmount * (10 ** (decimals - 18)); } IERC20Inbox(inbox).createRetryableTicket({ @@ -113,12 +110,7 @@ contract DeployHelper { _maxFeePerGas ); _fundAndDeploy( - _inbox, - ERC2470_VALUE, - ERC2470_DEPLOYER, - ERC2470_PAYLOAD, - _nativeToken, - _maxFeePerGas + _inbox, ERC2470_VALUE, ERC2470_DEPLOYER, ERC2470_PAYLOAD, _nativeToken, _maxFeePerGas ); _fundAndDeploy( _inbox, @@ -129,12 +121,7 @@ contract DeployHelper { _maxFeePerGas ); _fundAndDeploy( - _inbox, - ERC1820_VALUE, - ERC1820_DEPLOYER, - ERC1820_PAYLOAD, - _nativeToken, - _maxFeePerGas + _inbox, ERC1820_VALUE, ERC1820_DEPLOYER, ERC1820_PAYLOAD, _nativeToken, _maxFeePerGas ); // if paying with ETH refund the caller @@ -143,18 +130,12 @@ contract DeployHelper { } } - function getDeploymentTotalCost(IInboxBase inbox, uint256 maxFeePerGas) - public - view - returns (uint256) - { + function getDeploymentTotalCost( + IInboxBase inbox, + uint256 maxFeePerGas + ) public view returns (uint256) { uint256 submissionCost = inbox.calculateRetryableSubmissionFee(0, block.basefee); - return - NICK_CREATE2_VALUE + - ERC2470_VALUE + - ZOLTU_VALUE + - ERC1820_VALUE + - 4 * - (submissionCost + GASLIMIT * maxFeePerGas); + return NICK_CREATE2_VALUE + ERC2470_VALUE + ZOLTU_VALUE + ERC1820_VALUE + + 4 * (submissionCost + GASLIMIT * maxFeePerGas); } } diff --git a/src/rollup/ERC20RollupEventInbox.sol b/src/rollup/ERC20RollupEventInbox.sol index d896475b..dba8bd75 100644 --- a/src/rollup/ERC20RollupEventInbox.sol +++ b/src/rollup/ERC20RollupEventInbox.sol @@ -1,11 +1,12 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./AbsRollupEventInbox.sol"; import "../bridge/IERC20Bridge.sol"; +import {INITIALIZATION_MSG_TYPE} from "../libraries/MessageTypes.sol"; /** * @title The inbox for rollup protocol events @@ -13,15 +14,13 @@ import "../bridge/IERC20Bridge.sol"; contract ERC20RollupEventInbox is AbsRollupEventInbox { constructor() AbsRollupEventInbox() {} - function _enqueueInitializationMsg(bytes memory initMsg) internal override returns (uint256) { + function _enqueueInitializationMsg( + bytes memory initMsg + ) internal override returns (uint256) { uint256 tokenAmount = 0; - return - IERC20Bridge(address(bridge)).enqueueDelayedMessage( - INITIALIZATION_MSG_TYPE, - address(0), - keccak256(initMsg), - tokenAmount - ); + return IERC20Bridge(address(bridge)).enqueueDelayedMessage( + INITIALIZATION_MSG_TYPE, address(0), keccak256(initMsg), tokenAmount + ); } function _currentDataCostToReport() internal pure override returns (uint256) { diff --git a/src/rollup/FactoryDeployerHelper.sol b/src/rollup/FactoryDeployerHelper.sol index ba5732e0..727095b3 100644 --- a/src/rollup/FactoryDeployerHelper.sol +++ b/src/rollup/FactoryDeployerHelper.sol @@ -10,7 +10,9 @@ contract FactoryDeployerHelper { address public constant DEPLOY_HELPER = address(0x90D68B056c411015eaE3EC0b98AD94E2C91419F1); uint256 public constant MAX_FEE_PER_GAS = 100_000_000; - function deploy(address inbox) external { + function deploy( + address inbox + ) external { deploy(inbox, MAX_FEE_PER_GAS); } @@ -25,18 +27,14 @@ contract FactoryDeployerHelper { } interface IERC20 { - function transferFrom( - address from, - address to, - uint256 value - ) external returns (bool); + function transferFrom(address from, address to, uint256 value) external returns (bool); } interface IDeployHelper { - function getDeploymentTotalCost(address inbox, uint256 maxFeePerGas) - external - view - returns (uint256); + function getDeploymentTotalCost( + address inbox, + uint256 maxFeePerGas + ) external view returns (uint256); function perform( address _inbox, diff --git a/src/rollup/IRollupAdmin.sol b/src/rollup/IRollupAdmin.sol index bdad07b3..6d3be8d9 100644 --- a/src/rollup/IRollupAdmin.sol +++ b/src/rollup/IRollupAdmin.sol @@ -11,22 +11,80 @@ import "../bridge/IOwnable.sol"; import "./Config.sol"; interface IRollupAdmin { - event OwnerFunctionCalled(uint256 indexed id); + /// @dev Outbox address was set + event OutboxSet(address outbox); - function initialize(Config calldata config, ContractDependencies calldata connectedContracts) - external; + /// @dev Old outbox was removed + event OldOutboxRemoved(address outbox); + + /// @dev Inbox was enabled or disabled + event DelayedInboxSet(address inbox, bool enabled); + + /// @dev A list of validators was set + event ValidatorsSet(address[] validators, bool[] enabled); + + /// @dev A new minimum assertion period was set + event MinimumAssertionPeriodSet(uint256 newPeriod); + + /// @dev A new validator afk blocks was set + event ValidatorAfkBlocksSet(uint256 newPeriod); + + /// @dev New confirm period blocks was set + event ConfirmPeriodBlocksSet(uint64 newConfirmPeriod); + + /// @dev Base stake was set + event BaseStakeSet(uint256 newBaseStake); + + /// @dev Stakers were force refunded + event StakersForceRefunded(address[] staker); + + /// @dev An assertion was force created + event AssertionForceCreated(bytes32 indexed assertionHash); + + /// @dev An assertion was force confirmed + event AssertionForceConfirmed(bytes32 indexed assertionHash); + + /// @dev New loser stake escrow set + event LoserStakeEscrowSet(address newLoserStakerEscrow); + + /// @dev New wasm module root was set + event WasmModuleRootSet(bytes32 newWasmModuleRoot); + + /// @dev New sequencer inbox was set + event SequencerInboxSet(address newSequencerInbox); + + /// @dev New inbox set + event InboxSet(address inbox); + + /// @dev Validator whitelist was disabled or enabled + event ValidatorWhitelistDisabledSet(bool _validatorWhitelistDisabled); + + /// @dev AnyTrust fast confirmer was set + event AnyTrustFastConfirmerSet(address anyTrustFastConfirmer); + + /// @dev Challenge manager was set + event ChallengeManagerSet(address challengeManager); + + function initialize( + Config calldata config, + ContractDependencies calldata connectedContracts + ) external; /** * @notice Add a contract authorized to put messages into this rollup's inbox * @param _outbox Outbox contract to add */ - function setOutbox(IOutbox _outbox) external; + function setOutbox( + IOutbox _outbox + ) external; /** * @notice Disable an old outbox from interacting with the bridge * @param _outbox Outbox contract to remove */ - function removeOldOutbox(address _outbox) external; + function removeOldOutbox( + address _outbox + ) external; /** * @notice Enable or disable an inbox contract @@ -58,81 +116,105 @@ interface IRollupAdmin { * @notice Set a new owner address for the rollup proxy * @param newOwner address of new rollup owner */ - function setOwner(address newOwner) external; + function setOwner( + address newOwner + ) external; /** * @notice Set minimum assertion period for the rollup * @param newPeriod new minimum period for assertions */ - function setMinimumAssertionPeriod(uint256 newPeriod) external; + function setMinimumAssertionPeriod( + uint256 newPeriod + ) external; /** - * @notice Set number of blocks until a node is considered confirmed - * @param newConfirmPeriod new number of blocks until a node is confirmed + * @notice Set validator afk blocks for the rollup + * @param newAfkBlocks new number of blocks before a validator is considered afk (0 to disable) + * @dev ValidatorAfkBlocks is the number of blocks since the last confirmed + * assertion (or its first child) before the validator whitelist is removed. + * It's important that this time is greater than the max amount of time it can take to + * to confirm an assertion via the normal method. Therefore we need it to be greater + * than max(2* confirmPeriod, 2 * challengePeriod) with some additional margin. */ - function setConfirmPeriodBlocks(uint64 newConfirmPeriod) external; + function setValidatorAfkBlocks( + uint64 newAfkBlocks + ) external; /** - * @notice Set number of extra blocks after a challenge - * @param newExtraTimeBlocks new number of blocks + * @notice Set number of blocks until a assertion is considered confirmed + * @param newConfirmPeriod new number of blocks until a assertion is confirmed */ - function setExtraChallengeTimeBlocks(uint64 newExtraTimeBlocks) external; + function setConfirmPeriodBlocks( + uint64 newConfirmPeriod + ) external; /** * @notice Set base stake required for an assertion * @param newBaseStake maximum avmgas to be used per block */ - function setBaseStake(uint256 newBaseStake) external; - - /** - * @notice Set the token used for stake, where address(0) == eth - * @dev Before changing the base stake token, you might need to change the - * implementation of the Rollup User logic! - * @param newStakeToken address of token used for staking - */ - function setStakeToken(address newStakeToken) external; - - /** - * @notice Upgrades the implementation of a beacon controlled by the rollup - * @param beacon address of beacon to be upgraded - * @param newImplementation new address of implementation - */ - function upgradeBeacon(address beacon, address newImplementation) external; - - function forceResolveChallenge(address[] memory stackerA, address[] memory stackerB) external; + function setBaseStake( + uint256 newBaseStake + ) external; - function forceRefundStaker(address[] memory stacker) external; + function forceRefundStaker( + address[] memory stacker + ) external; - function forceCreateNode( - uint64 prevNode, - uint256 prevNodeInboxMaxCount, - Assertion memory assertion, - bytes32 expectedNodeHash + function forceCreateAssertion( + bytes32 prevAssertionHash, + AssertionInputs calldata assertion, + bytes32 expectedAssertionHash ) external; - function forceConfirmNode( - uint64 nodeNum, - bytes32 blockHash, - bytes32 sendRoot + function forceConfirmAssertion( + bytes32 assertionHash, + bytes32 parentAssertionHash, + AssertionState calldata confirmState, + bytes32 inboxAcc ) external; - function setLoserStakeEscrow(address newLoserStakerEscrow) external; + function setLoserStakeEscrow( + address newLoserStakerEscrow + ) external; /** * @notice Set the proving WASM module root * @param newWasmModuleRoot new module root */ - function setWasmModuleRoot(bytes32 newWasmModuleRoot) external; + function setWasmModuleRoot( + bytes32 newWasmModuleRoot + ) external; /** * @notice set a new sequencer inbox contract * @param _sequencerInbox new address of sequencer inbox */ - function setSequencerInbox(address _sequencerInbox) external; + function setSequencerInbox( + address _sequencerInbox + ) external; /** * @notice set the validatorWhitelistDisabled flag * @param _validatorWhitelistDisabled new value of validatorWhitelistDisabled, i.e. true = disabled */ - function setValidatorWhitelistDisabled(bool _validatorWhitelistDisabled) external; + function setValidatorWhitelistDisabled( + bool _validatorWhitelistDisabled + ) external; + + /** + * @notice set the anyTrustFastConfirmer address + * @param _anyTrustFastConfirmer new value of anyTrustFastConfirmer + */ + function setAnyTrustFastConfirmer( + address _anyTrustFastConfirmer + ) external; + + /** + * @notice set a new challengeManager contract + * @param _challengeManager new value of challengeManager + */ + function setChallengeManager( + address _challengeManager + ) external; } diff --git a/src/rollup/IRollupCore.sol b/src/rollup/IRollupCore.sol index 341f723e..c0c1405f 100644 --- a/src/rollup/IRollupCore.sol +++ b/src/rollup/IRollupCore.sol @@ -4,58 +4,60 @@ pragma solidity ^0.8.0; -import "./Node.sol"; +import "./Assertion.sol"; import "../bridge/IBridge.sol"; import "../bridge/IOutbox.sol"; import "../bridge/IInboxBase.sol"; import "./IRollupEventInbox.sol"; -import "../challenge/IChallengeManager.sol"; +import "../challengeV2/EdgeChallengeManager.sol"; +import "../challengeV2/IAssertionChain.sol"; -interface IRollupCore { +interface IRollupCore is IAssertionChain { struct Staker { uint256 amountStaked; + bytes32 latestStakedAssertion; uint64 index; - uint64 latestStakedNode; - // currentChallenge is 0 if staker is not in a challenge - uint64 currentChallenge; bool isStaked; + address withdrawalAddress; } event RollupInitialized(bytes32 machineHash, uint256 chainId); - event NodeCreated( - uint64 indexed nodeNum, - bytes32 indexed parentNodeHash, - bytes32 indexed nodeHash, - bytes32 executionHash, - Assertion assertion, + event AssertionCreated( + bytes32 indexed assertionHash, + bytes32 indexed parentAssertionHash, + AssertionInputs assertion, bytes32 afterInboxBatchAcc, + uint256 inboxMaxCount, bytes32 wasmModuleRoot, - uint256 inboxMaxCount + uint256 requiredStake, + address challengeManager, + uint64 confirmPeriodBlocks ); - event NodeConfirmed(uint64 indexed nodeNum, bytes32 blockHash, bytes32 sendRoot); - - event NodeRejected(uint64 indexed nodeNum); + event AssertionConfirmed(bytes32 indexed assertionHash, bytes32 blockHash, bytes32 sendRoot); event RollupChallengeStarted( uint64 indexed challengeIndex, address asserter, address challenger, - uint64 challengedNode + uint64 challengedAssertion ); - event UserStakeUpdated(address indexed user, uint256 initialBalance, uint256 finalBalance); - - event UserWithdrawableFundsUpdated( + event UserStakeUpdated( address indexed user, + address indexed withdrawalAddress, uint256 initialBalance, uint256 finalBalance ); + event UserWithdrawableFundsUpdated( + address indexed user, uint256 initialBalance, uint256 finalBalance + ); + function confirmPeriodBlocks() external view returns (uint64); - function extraChallengeTimeBlocks() external view returns (uint64); + function validatorAfkBlocks() external view returns (uint64); function chainId() external view returns (uint256); @@ -71,7 +73,7 @@ interface IRollupCore { function rollupEventInbox() external view returns (IRollupEventInbox); - function challengeManager() external view returns (IChallengeManager); + function challengeManager() external view returns (IEdgeChallengeManager); function loserStakeEscrow() external view returns (address); @@ -79,112 +81,90 @@ interface IRollupCore { function minimumAssertionPeriod() external view returns (uint256); - function isValidator(address) external view returns (bool); - - function validatorWhitelistDisabled() external view returns (bool); + function genesisAssertionHash() external pure returns (bytes32); /** - * @notice Get the Node for the given index. + * @notice Get the Assertion for the given id. */ - function getNode(uint64 nodeNum) external view returns (Node memory); + function getAssertion( + bytes32 assertionHash + ) external view returns (AssertionNode memory); /** - * @notice Returns the block in which the given node was created for looking up its creation event. - * Unlike the Node's createdAtBlock field, this will be the ArbSys blockNumber if the host chain is an Arbitrum chain. + * @notice Returns the block in which the given assertion was created for looking up its creation event. + * Unlike the assertion's createdAtBlock field, this will be the ArbSys blockNumber if the host chain is an Arbitrum chain. * That means that the block number returned for this is usable for event queries. - * This function will revert if the given node number does not exist. + * This function will revert if the given assertion hash does not exist. * @dev This function is meant for internal use only and has no stability guarantees. */ - function getNodeCreationBlockForLogLookup(uint64 nodeNum) external view returns (uint256); - - /** - * @notice Check if the specified node has been staked on by the provided staker. - * Only accurate at the latest confirmed node and afterwards. - */ - function nodeHasStaker(uint64 nodeNum, address staker) external view returns (bool); + function getAssertionCreationBlockForLogLookup( + bytes32 assertionHash + ) external view returns (uint256); /** * @notice Get the address of the staker at the given index * @param stakerNum Index of the staker * @return Address of the staker */ - function getStakerAddress(uint64 stakerNum) external view returns (address); + function getStakerAddress( + uint64 stakerNum + ) external view returns (address); /** * @notice Check whether the given staker is staked * @param staker Staker address to check * @return True or False for whether the staker was staked */ - function isStaked(address staker) external view returns (bool); + function isStaked( + address staker + ) external view returns (bool); /** - * @notice Get the latest staked node of the given staker + * @notice Get the latest staked assertion of the given staker * @param staker Staker address to lookup - * @return Latest node staked of the staker + * @return Latest assertion staked of the staker */ - function latestStakedNode(address staker) external view returns (uint64); + function latestStakedAssertion( + address staker + ) external view returns (bytes32); /** - * @notice Get the current challenge of the given staker + * @notice Get the amount staked of the given staker * @param staker Staker address to lookup - * @return Current challenge of the staker + * @return Amount staked of the staker */ - function currentChallenge(address staker) external view returns (uint64); + function amountStaked( + address staker + ) external view returns (uint256); /** - * @notice Get the amount staked of the given staker + * @notice Get the withdrawal address of the given staker * @param staker Staker address to lookup - * @return Amount staked of the staker + * @return Withdrawal address of the staker */ - function amountStaked(address staker) external view returns (uint256); + function withdrawalAddress( + address staker + ) external view returns (address); /** * @notice Retrieves stored information about a requested staker * @param staker Staker address to retrieve * @return A structure with information about the requested staker */ - function getStaker(address staker) external view returns (Staker memory); - - /** - * @notice Get the original staker address of the zombie at the given index - * @param zombieNum Index of the zombie to lookup - * @return Original staker address of the zombie - */ - function zombieAddress(uint256 zombieNum) external view returns (address); - - /** - * @notice Get Latest node that the given zombie at the given index is staked on - * @param zombieNum Index of the zombie to lookup - * @return Latest node that the given zombie is staked on - */ - function zombieLatestStakedNode(uint256 zombieNum) external view returns (uint64); - - /// @return Current number of un-removed zombies - function zombieCount() external view returns (uint256); - - function isZombie(address staker) external view returns (bool); + function getStaker( + address staker + ) external view returns (Staker memory); /** * @notice Get the amount of funds withdrawable by the given address * @param owner Address to check the funds of * @return Amount of funds withdrawable by owner */ - function withdrawableFunds(address owner) external view returns (uint256); - - /** - * @return Index of the first unresolved node - * @dev If all nodes have been resolved, this will be latestNodeCreated + 1 - */ - function firstUnresolvedNode() external view returns (uint64); - - /// @return Index of the latest confirmed node - function latestConfirmed() external view returns (uint64); - - /// @return Index of the latest rollup node created - function latestNodeCreated() external view returns (uint64); - - /// @return Ethereum block that the most recent stake was created - function lastStakeBlock() external view returns (uint64); + function withdrawableFunds( + address owner + ) external view returns (uint256); + /// @return Hash of the latest confirmed assertion + function latestConfirmed() external view returns (bytes32); /// @return Number of active stakers currently staked function stakerCount() external view returns (uint64); diff --git a/src/rollup/IRollupEventInbox.sol b/src/rollup/IRollupEventInbox.sol index 2e79f7e6..8110f436 100644 --- a/src/rollup/IRollupEventInbox.sol +++ b/src/rollup/IRollupEventInbox.sol @@ -9,7 +9,9 @@ import "../bridge/IBridge.sol"; interface IRollupEventInbox { function bridge() external view returns (IBridge); - function initialize(IBridge _bridge) external; + function initialize( + IBridge _bridge + ) external; function rollup() external view returns (address); diff --git a/src/rollup/IRollupLogic.sol b/src/rollup/IRollupLogic.sol index e5170047..b3f825fd 100644 --- a/src/rollup/IRollupLogic.sol +++ b/src/rollup/IRollupLogic.sol @@ -9,98 +9,61 @@ import "../bridge/ISequencerInbox.sol"; import "../bridge/IOutbox.sol"; import "../bridge/IOwnable.sol"; -interface IRollupUserAbs is IRollupCore, IOwnable { +interface IRollupUser is IRollupCore, IOwnable { /// @dev the user logic just validated configuration and shouldn't write to state during init /// this allows the admin logic to ensure consistency on parameters. - function initialize(address stakeToken) external view; + function initialize( + address stakeToken + ) external view; function removeWhitelistAfterFork() external; function removeWhitelistAfterValidatorAfk() external; - function isERC20Enabled() external view returns (bool); - - function rejectNextNode(address stakerAddress) external; - - function confirmNextNode(bytes32 blockHash, bytes32 sendRoot) external; - - function fastConfirmNextNode( - bytes32 blockHash, - bytes32 sendRoot, - bytes32 nodeHash + function confirmAssertion( + bytes32 assertionHash, + bytes32 prevAssertionHash, + AssertionState calldata confirmState, + bytes32 winningEdgeId, + ConfigData calldata prevConfig, + bytes32 inboxAcc ) external; - function stakeOnExistingNode(uint64 nodeNum, bytes32 nodeHash) external; - - function stakeOnNewNode( - Assertion memory assertion, - bytes32 expectedNodeHash, - uint256 prevNodeInboxMaxCount + function stakeOnNewAssertion( + AssertionInputs calldata assertion, + bytes32 expectedAssertionHash ) external; - function returnOldDeposit(address stakerAddress) external; - - function reduceDeposit(uint256 target) external; - - function removeZombie(uint256 zombieNum, uint256 maxNodes) external; - - function removeOldZombies(uint256 startIndex) external; - - function requiredStake( - uint256 blockNumber, - uint64 firstUnresolvedNodeNum, - uint64 latestCreatedNode - ) external view returns (uint256); - - function currentRequiredStake() external view returns (uint256); - - function countStakedZombies(uint64 nodeNum) external view returns (uint256); - - function countZombiesStakedOnChildren(uint64 nodeNum) external view returns (uint256); + function returnOldDeposit() external; - function requireUnresolvedExists() external view; - - function requireUnresolved(uint256 nodeNum) external view; - - function withdrawStakerFunds() external returns (uint256); - - function createChallenge( - address[2] calldata stakers, - uint64[2] calldata nodeNums, - MachineStatus[2] calldata machineStatuses, - GlobalState[2] calldata globalStates, - uint64 numBlocks, - bytes32 secondExecutionHash, - uint256[2] calldata proposedTimes, - bytes32[2] calldata wasmModuleRoots + function returnOldDepositFor( + address stakerAddress ) external; -} - -interface IRollupUser is IRollupUserAbs { - function newStakeOnExistingNode(uint64 nodeNum, bytes32 nodeHash) external payable; - function newStakeOnNewNode( - Assertion calldata assertion, - bytes32 expectedNodeHash, - uint256 prevNodeInboxMaxCount - ) external payable; + function reduceDeposit( + uint256 target + ) external; - function addToDeposit(address stakerAddress) external payable; -} + function withdrawStakerFunds() external returns (uint256); -interface IRollupUserERC20 is IRollupUserAbs { - function newStakeOnExistingNode( + function newStakeOnNewAssertion( uint256 tokenAmount, - uint64 nodeNum, - bytes32 nodeHash + AssertionInputs calldata assertion, + bytes32 expectedAssertionHash ) external; - function newStakeOnNewNode( + function newStakeOnNewAssertion( uint256 tokenAmount, - Assertion calldata assertion, - bytes32 expectedNodeHash, - uint256 prevNodeInboxMaxCount + AssertionInputs calldata assertion, + bytes32 expectedAssertionHash, + address withdrawalAddress ) external; - function addToDeposit(address stakerAddress, uint256 tokenAmount) external; + function newStake(uint256 tokenAmount, address withdrawalAddress) external; + + function addToDeposit( + address stakerAddress, + address expectedWithdrawalAddress, + uint256 tokenAmount + ) external; } diff --git a/src/rollup/Node.sol b/src/rollup/Node.sol deleted file mode 100644 index 6961168a..00000000 --- a/src/rollup/Node.sol +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE -// SPDX-License-Identifier: BUSL-1.1 - -pragma solidity ^0.8.0; - -import "../state/GlobalState.sol"; -import "../state/Machine.sol"; - -struct ExecutionState { - GlobalState globalState; - MachineStatus machineStatus; -} - -struct Assertion { - ExecutionState beforeState; - ExecutionState afterState; - uint64 numBlocks; -} - -struct Node { - // Hash of the state of the chain as of this node - bytes32 stateHash; - // Hash of the data that can be challenged - bytes32 challengeHash; - // Hash of the data that will be committed if this node is confirmed - bytes32 confirmData; - // Index of the node previous to this one - uint64 prevNum; - // Deadline at which this node can be confirmed - uint64 deadlineBlock; - // Deadline at which a child of this node can be confirmed - uint64 noChildConfirmedBeforeBlock; - // Number of stakers staked on this node. This includes real stakers and zombies - uint64 stakerCount; - // Number of stakers staked on a child node. This includes real stakers and zombies - uint64 childStakerCount; - // This value starts at zero and is set to a value when the first child is created. After that it is constant until the node is destroyed or the owner destroys pending nodes - uint64 firstChildBlock; - // The number of the latest child of this node to be created - uint64 latestChildNumber; - // The block number when this node was created - uint64 createdAtBlock; - // A hash of all the data needed to determine this node's validity, to protect against reorgs - bytes32 nodeHash; -} - -/** - * @notice Utility functions for Node - */ -library NodeLib { - /** - * @notice Initialize a Node - * @param _stateHash Initial value of stateHash - * @param _challengeHash Initial value of challengeHash - * @param _confirmData Initial value of confirmData - * @param _prevNum Initial value of prevNum - * @param _deadlineBlock Initial value of deadlineBlock - * @param _nodeHash Initial value of nodeHash - */ - function createNode( - bytes32 _stateHash, - bytes32 _challengeHash, - bytes32 _confirmData, - uint64 _prevNum, - uint64 _deadlineBlock, - bytes32 _nodeHash - ) internal view returns (Node memory) { - Node memory node; - node.stateHash = _stateHash; - node.challengeHash = _challengeHash; - node.confirmData = _confirmData; - node.prevNum = _prevNum; - node.deadlineBlock = _deadlineBlock; - node.noChildConfirmedBeforeBlock = _deadlineBlock; - node.createdAtBlock = uint64(block.number); - node.nodeHash = _nodeHash; - return node; - } - - /** - * @notice Update child properties - * @param number The child number to set - */ - function childCreated(Node storage self, uint64 number) internal { - if (self.firstChildBlock == 0) { - self.firstChildBlock = uint64(block.number); - } - self.latestChildNumber = number; - } - - /** - * @notice Update the child confirmed deadline - * @param deadline The new deadline to set - */ - function newChildConfirmDeadline(Node storage self, uint64 deadline) internal { - self.noChildConfirmedBeforeBlock = deadline; - } - - /** - * @notice Check whether the current block number has met or passed the node's deadline - */ - function requirePastDeadline(Node memory self) internal view { - require(block.number >= self.deadlineBlock, "BEFORE_DEADLINE"); - } - - /** - * @notice Check whether the current block number has met or passed deadline for children of this node to be confirmed - */ - function requirePastChildConfirmDeadline(Node memory self) internal view { - require(block.number >= self.noChildConfirmedBeforeBlock, "CHILD_TOO_RECENT"); - } -} diff --git a/src/rollup/RollupAdminLogic.sol b/src/rollup/RollupAdminLogic.sol index 0579eaaf..ecdbe927 100644 --- a/src/rollup/RollupAdminLogic.sol +++ b/src/rollup/RollupAdminLogic.sol @@ -9,22 +9,19 @@ import "./IRollupLogic.sol"; import "./RollupCore.sol"; import "../bridge/IOutbox.sol"; import "../bridge/ISequencerInbox.sol"; -import "../challenge/IChallengeManager.sol"; import "../libraries/DoubleLogicUUPSUpgradeable.sol"; import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; -import {NO_CHAL_INDEX} from "../libraries/Constants.sol"; - contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeable { - function initialize(Config calldata config, ContractDependencies calldata connectedContracts) - external - override - onlyProxy - initializer - { + using AssertionStateLib for AssertionState; + using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; + + function initialize( + Config calldata config, + ContractDependencies calldata connectedContracts + ) external override onlyProxy initializer { rollupDeploymentBlock = block.number; bridge = connectedContracts.bridge; - sequencerInbox = connectedContracts.sequencerInbox; connectedContracts.bridge.setDelayedInbox(address(connectedContracts.inbox), true); connectedContracts.bridge.setSequencerInbox(address(connectedContracts.sequencerInbox)); @@ -32,65 +29,91 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl outbox = connectedContracts.outbox; connectedContracts.bridge.setOutbox(address(connectedContracts.outbox), true); rollupEventInbox = connectedContracts.rollupEventInbox; - connectedContracts.bridge.setDelayedInbox( - address(connectedContracts.rollupEventInbox), - true - ); - connectedContracts.rollupEventInbox.rollupInitialized(config.chainId, config.chainConfig); - connectedContracts.sequencerInbox.addSequencerL2Batch( - 0, - "", - 1, - IGasRefunder(address(0)), - 0, - 1 - ); + // dont need to connect and initialize the event inbox if it's already been initialized + if (!bridge.allowedDelayedInboxes(address(connectedContracts.rollupEventInbox))) { + connectedContracts.bridge.setDelayedInbox( + address(connectedContracts.rollupEventInbox), true + ); + connectedContracts.rollupEventInbox.rollupInitialized( + config.chainId, config.chainConfig + ); + } + + if (connectedContracts.sequencerInbox.totalDelayedMessagesRead() == 0) { + connectedContracts.sequencerInbox.addSequencerL2Batch( + 0, "", 1, IGasRefunder(address(0)), 0, 1 + ); + } - validatorUtils = connectedContracts.validatorUtils; validatorWalletCreator = connectedContracts.validatorWalletCreator; challengeManager = connectedContracts.challengeManager; - Node memory node = createInitialNode(); - initializeCore(node); - confirmPeriodBlocks = config.confirmPeriodBlocks; - extraChallengeTimeBlocks = config.extraChallengeTimeBlocks; chainId = config.chainId; baseStake = config.baseStake; wasmModuleRoot = config.wasmModuleRoot; // A little over 15 minutes minimumAssertionPeriod = 75; - - // the owner can't access the rollup user facet where escrow is redeemable - require(config.loserStakeEscrow != _getAdmin(), "INVALID_ESCROW_ADMIN"); - // this next check shouldn't be an issue if the owner controls an AdminProxy - // that accesses the admin facet, but still seems like a good extra precaution - require(config.loserStakeEscrow != config.owner, "INVALID_ESCROW_OWNER"); + // ValidatorAfkBlocks is defaulted to 28 days assuming a 12 seconds block time. + // Since it can take 14 days under normal circumstances to confirm an assertion, this means + // the validators will have been inactive for a further 14 days before the whitelist is removed. + validatorAfkBlocks = 201600; + challengeGracePeriodBlocks = config.challengeGracePeriodBlocks; + + // loser stake is now sent directly to loserStakeEscrow, it must not + // be address(0) because some token do not allow transfers to address(0) + require(config.loserStakeEscrow != address(0), "INVALID_ESCROW_0"); loserStakeEscrow = config.loserStakeEscrow; stakeToken = config.stakeToken; + anyTrustFastConfirmer = config.anyTrustFastConfirmer; + + bytes32 parentAssertionHash = bytes32(0); + bytes32 inboxAcc = bytes32(0); + bytes32 genesisHash = RollupLib.assertionHash({ + parentAssertionHash: parentAssertionHash, + afterStateHash: config.genesisAssertionState.hash(), + inboxAcc: inboxAcc + }); + + uint256 currentInboxCount = bridge.sequencerMessageCount(); + // ensure to move the inbox forward by at least one message + if (currentInboxCount == config.genesisInboxCount) { + currentInboxCount += 1; + } + AssertionNode memory initialAssertion = AssertionNodeLib.createAssertion( + true, + RollupLib.configHash({ + wasmModuleRoot: wasmModuleRoot, + requiredStake: baseStake, + challengeManager: address(challengeManager), + confirmPeriodBlocks: confirmPeriodBlocks, + nextInboxPosition: uint64(currentInboxCount) + }) + ); + initializeCore(initialAssertion, genesisHash); + + AssertionInputs memory assertionInputs; + assertionInputs.afterState = config.genesisAssertionState; + emit AssertionCreated( + genesisHash, + parentAssertionHash, + assertionInputs, + inboxAcc, + currentInboxCount, + wasmModuleRoot, + baseStake, + address(challengeManager), + confirmPeriodBlocks + ); + if (_hostChainIsArbitrum) { + _assertionCreatedAtArbSysBlock[genesisHash] = ArbSys(address(100)).arbBlockNumber(); + } emit RollupInitialized(config.wasmModuleRoot, config.chainId); } - function createInitialNode() private view returns (Node memory) { - GlobalState memory emptyGlobalState; - bytes32 state = RollupLib.stateHashMem( - ExecutionState(emptyGlobalState, MachineStatus.FINISHED), - 1 // inboxMaxCount - force the first assertion to read a message - ); - return - NodeLib.createNode( - state, - 0, // challenge hash (not challengeable) - 0, // confirm data - 0, // prev node - uint64(block.number), // deadline block (not challengeable) - 0 // initial node has a node hash of 0 - ); - } - /** * Functions are only to reach this logic contract if the caller is the owner * so there is no need for a redundant onlyOwner check @@ -100,20 +123,26 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl * @notice Add a contract authorized to put messages into this rollup's inbox * @param _outbox Outbox contract to add */ - function setOutbox(IOutbox _outbox) external override { + function setOutbox( + IOutbox _outbox + ) external override { outbox = _outbox; bridge.setOutbox(address(_outbox), true); - emit OwnerFunctionCalled(0); + emit OutboxSet(address(_outbox)); + // previously: emit OwnerFunctionCalled(0); } /** * @notice Disable an old outbox from interacting with the bridge * @param _outbox Outbox contract to remove */ - function removeOldOutbox(address _outbox) external override { + function removeOldOutbox( + address _outbox + ) external override { require(_outbox != address(outbox), "CUR_OUTBOX"); bridge.setOutbox(_outbox, false); - emit OwnerFunctionCalled(1); + emit OldOutboxRemoved(address(_outbox)); + // previously: emit OwnerFunctionCalled(1); } /** @@ -123,19 +152,20 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl */ function setDelayedInbox(address _inbox, bool _enabled) external override { bridge.setDelayedInbox(address(_inbox), _enabled); - emit OwnerFunctionCalled(2); + emit DelayedInboxSet(address(_inbox), _enabled); + // previously: emit OwnerFunctionCalled(2); } /** * @notice Pause interaction with the rollup contract. - * The time spent paused is not incremented in the rollup's timing for node validation. - * @dev this function may be frontrun by a validator (ie to create a node before the system is paused). + * The time spent paused is not incremented in the rollup's timing for assertion validation. + * @dev this function may be frontrun by a validator (ie to create a assertion before the system is paused). * The pause should be called atomically with required checks to be sure the system is paused in a consistent state. - * The RollupAdmin may execute a check against the Rollup's latest node num or the ChallengeManager, then execute this function atomically with it. + * The RollupAdmin may execute a check against the Rollup's latest assertion num or the OldChallengeManager, then execute this function atomically with it. */ function pause() external override { _pause(); - emit OwnerFunctionCalled(3); + // previously: emit OwnerFunctionCalled(3); } /** @@ -143,18 +173,22 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl */ function resume() external override { _unpause(); - emit OwnerFunctionCalled(4); + // previously: emit OwnerFunctionCalled(4); } /// @notice allows the admin to upgrade the primary logic contract (ie rollup admin logic, aka this) /// @dev this function doesn't revert as this primary logic contract is only /// reachable by the proxy's admin - function _authorizeUpgrade(address newImplementation) internal override {} + function _authorizeUpgrade( + address newImplementation + ) internal override {} /// @notice allows the admin to upgrade the secondary logic contract (ie rollup user logic) /// @dev this function doesn't revert as this primary logic contract is only /// reachable by the proxy's admin - function _authorizeSecondaryUpgrade(address newImplementation) internal override {} + function _authorizeSecondaryUpgrade( + address newImplementation + ) internal override {} /** * @notice Set the addresses of the validator whitelist @@ -168,9 +202,12 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl require(_validator.length == _val.length, "WRONG_LENGTH"); for (uint256 i = 0; i < _validator.length; i++) { - isValidator[_validator[i]] = _val[i]; + if (_val[i]) validators.add(_validator[i]); + else validators.remove(_validator[i]); } - emit OwnerFunctionCalled(6); + + emit ValidatorsSet(_validator, _val); + // previously: emit OwnerFunctionCalled(6); } /** @@ -178,216 +215,200 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl * @dev it is expected that only the rollup admin can use this facet to set a new owner * @param newOwner address of new rollup owner */ - function setOwner(address newOwner) external override { + function setOwner( + address newOwner + ) external override { _changeAdmin(newOwner); - emit OwnerFunctionCalled(7); + // previously: emit OwnerFunctionCalled(7); } /** * @notice Set minimum assertion period for the rollup * @param newPeriod new minimum period for assertions */ - function setMinimumAssertionPeriod(uint256 newPeriod) external override { + function setMinimumAssertionPeriod( + uint256 newPeriod + ) external override { minimumAssertionPeriod = newPeriod; - emit OwnerFunctionCalled(8); + emit MinimumAssertionPeriodSet(newPeriod); + // previously: emit OwnerFunctionCalled(8); } /** - * @notice Set number of blocks until a node is considered confirmed - * @param newConfirmPeriod new number of blocks + * @notice Set validator afk blocks for the rollup + * @param newAfkBlocks new number of blocks before a validator is considered afk (0 to disable) + * @dev ValidatorAfkBlocks is the number of blocks since the last confirmed + * assertion (or its first child) before the validator whitelist is removed. + * It's important that this time is greater than the max amount of time it can take to + * to confirm an assertion via the normal method. Therefore we need it to be greater + * than max(2* confirmPeriod, 2 * challengePeriod) with some additional margin. */ - function setConfirmPeriodBlocks(uint64 newConfirmPeriod) external override { - require(newConfirmPeriod > 0, "INVALID_CONFIRM_PERIOD"); - confirmPeriodBlocks = newConfirmPeriod; - emit OwnerFunctionCalled(9); + function setValidatorAfkBlocks( + uint64 newAfkBlocks + ) external override { + validatorAfkBlocks = newAfkBlocks; + emit ValidatorAfkBlocksSet(newAfkBlocks); } /** - * @notice Set number of extra blocks after a challenge - * @param newExtraTimeBlocks new number of blocks + * @notice Set number of blocks until a assertion is considered confirmed + * @param newConfirmPeriod new number of blocks */ - function setExtraChallengeTimeBlocks(uint64 newExtraTimeBlocks) external override { - extraChallengeTimeBlocks = newExtraTimeBlocks; - emit OwnerFunctionCalled(10); + function setConfirmPeriodBlocks( + uint64 newConfirmPeriod + ) external override { + require(newConfirmPeriod > 0, "INVALID_CONFIRM_PERIOD"); + confirmPeriodBlocks = newConfirmPeriod; + emit ConfirmPeriodBlocksSet(newConfirmPeriod); + // previously: emit OwnerFunctionCalled(9); } /** * @notice Set base stake required for an assertion * @param newBaseStake minimum amount of stake required */ - function setBaseStake(uint256 newBaseStake) external override { + function setBaseStake( + uint256 newBaseStake + ) external override { + // we do not currently allow base stake to be reduced since as doing so might allow a malicious party + // to withdraw some (up to the difference between baseStake and newBaseStake) honest funds from this contract + // The sequence of events is as follows: + // 1. The malicious party creates a sibling assertion, stake size is currently S + // 2. The base stake is then reduced to S' + // 3. The malicious party uses a different address to create a child of the malicious assertion, using stake size S' + // 4. This allows the malicious party to withdraw the stake S, since assertions with children set the staker to "inactive" + require(newBaseStake > baseStake, "BASE_STAKE_MUST_BE_INCREASED"); baseStake = newBaseStake; - emit OwnerFunctionCalled(12); + emit BaseStakeSet(newBaseStake); + // previously: emit OwnerFunctionCalled(12); } - /** - * @notice Set the token used for stake, where address(0) == eth - * @dev Before changing the base stake token, you might need to change the - * implementation of the Rollup User facet! - * @param newStakeToken address of token used for staking - */ - function setStakeToken(address newStakeToken) external override whenPaused { - /* - * To change the stake token without breaking consistency one would need to: - * Pause the system, have all stakers remove their funds, - * update the user logic to handle ERC20s, change the stake token, then resume. - * - * Note: To avoid loss of funds stakers must remove their funds and claim all the - * available withdrawable funds before the system is paused. - */ - bool expectERC20Support = newStakeToken != address(0); - // this assumes the rollup isn't its own admin. if needed, instead use a ProxyAdmin by OZ! - bool actualERC20Support = IRollupUser(address(this)).isERC20Enabled(); - require(actualERC20Support == expectERC20Support, "NO_USER_LOGIC_SUPPORT"); - require(stakerCount() == 0, "NO_ACTIVE_STAKERS"); - require(totalWithdrawableFunds == 0, "NO_PENDING_WITHDRAW"); - stakeToken = newStakeToken; - emit OwnerFunctionCalled(13); - } - - /** - * @notice Upgrades the implementation of a beacon controlled by the rollup - * @param beacon address of beacon to be upgraded - * @param newImplementation new address of implementation - */ - function upgradeBeacon(address beacon, address newImplementation) external override { - UpgradeableBeacon(beacon).upgradeTo(newImplementation); - emit OwnerFunctionCalled(20); - } - - function forceResolveChallenge(address[] calldata stakerA, address[] calldata stakerB) - external - override - whenPaused - { - require(stakerA.length > 0, "EMPTY_ARRAY"); - require(stakerA.length == stakerB.length, "WRONG_LENGTH"); - for (uint256 i = 0; i < stakerA.length; i++) { - uint64 chall = inChallenge(stakerA[i], stakerB[i]); - - require(chall != NO_CHAL_INDEX, "NOT_IN_CHALL"); - clearChallenge(stakerA[i]); - clearChallenge(stakerB[i]); - challengeManager.clearChallenge(chall); - } - emit OwnerFunctionCalled(21); - } - - function forceRefundStaker(address[] calldata staker) external override whenPaused { + function forceRefundStaker( + address[] calldata staker + ) external override whenPaused { require(staker.length > 0, "EMPTY_ARRAY"); for (uint256 i = 0; i < staker.length; i++) { - require(_stakerMap[staker[i]].currentChallenge == NO_CHAL_INDEX, "STAKER_IN_CHALL"); + requireInactiveStaker(staker[i]); reduceStakeTo(staker[i], 0); - turnIntoZombie(staker[i]); } - emit OwnerFunctionCalled(22); + emit StakersForceRefunded(staker); + // previously: emit OwnerFunctionCalled(22); } - function forceCreateNode( - uint64 prevNode, - uint256 prevNodeInboxMaxCount, - Assertion calldata assertion, - bytes32 expectedNodeHash + function forceCreateAssertion( + bytes32 prevAssertionHash, + AssertionInputs calldata assertion, + bytes32 expectedAssertionHash ) external override whenPaused { - require(prevNode == latestConfirmed(), "ONLY_LATEST_CONFIRMED"); - - createNewNode(assertion, prevNode, prevNodeInboxMaxCount, expectedNodeHash); - - emit OwnerFunctionCalled(23); + // To update the wasm module root in the case of a bug: + // 0. pause the contract + // 1. update the wasm module root in the contract + // 2. update the config hash of the assertion after which you wish to use the new wasm module root (functionality not written yet) + // 3. force refund the stake of the current leaf assertion(s) + // 4. create a new assertion using the assertion with the updated config has as a prev + // 5. force confirm it - this is necessary to set latestConfirmed on the correct line + // 6. unpause the contract + + // Normally, a new assertion is created using its prev's confirmPeriodBlocks + // in the case of a force create, we use the rollup's current confirmPeriodBlocks + createNewAssertion(assertion, prevAssertionHash, expectedAssertionHash); + + emit AssertionForceCreated(expectedAssertionHash); + // previously: emit OwnerFunctionCalled(23); } - function forceConfirmNode( - uint64 nodeNum, - bytes32 blockHash, - bytes32 sendRoot + function forceConfirmAssertion( + bytes32 assertionHash, + bytes32 parentAssertionHash, + AssertionState calldata confirmState, + bytes32 inboxAcc ) external override whenPaused { - // this skips deadline, staker and zombie validation - confirmNode(nodeNum, blockHash, sendRoot); - emit OwnerFunctionCalled(24); + // this skip deadline, prev, challenge validations + confirmAssertionInternal(assertionHash, parentAssertionHash, confirmState, inboxAcc); + emit AssertionForceConfirmed(assertionHash); + // previously: emit OwnerFunctionCalled(24); } - function setLoserStakeEscrow(address newLoserStakerEscrow) external override { - // escrow holder can't be proxy admin, since escrow is only redeemable through - // the primary user logic contract - require(newLoserStakerEscrow != _getAdmin(), "INVALID_ESCROW"); + function setLoserStakeEscrow( + address newLoserStakerEscrow + ) external override { + // loser stake is now sent directly to loserStakeEscrow, it must not + // be address(0) because some token do not allow transfers to address(0) + require(newLoserStakerEscrow != address(0), "INVALID_ESCROW_0"); loserStakeEscrow = newLoserStakerEscrow; - emit OwnerFunctionCalled(25); + emit LoserStakeEscrowSet(newLoserStakerEscrow); + // previously: emit OwnerFunctionCalled(25); } /** * @notice Set the proving WASM module root * @param newWasmModuleRoot new module root */ - function setWasmModuleRoot(bytes32 newWasmModuleRoot) external override { + function setWasmModuleRoot( + bytes32 newWasmModuleRoot + ) external override { wasmModuleRoot = newWasmModuleRoot; - emit OwnerFunctionCalled(26); + emit WasmModuleRootSet(newWasmModuleRoot); + // previously: emit OwnerFunctionCalled(26); } /** * @notice set a new sequencer inbox contract * @param _sequencerInbox new address of sequencer inbox */ - function setSequencerInbox(address _sequencerInbox) external override { + function setSequencerInbox( + address _sequencerInbox + ) external override { bridge.setSequencerInbox(_sequencerInbox); - emit OwnerFunctionCalled(27); + emit SequencerInboxSet(_sequencerInbox); + // previously: emit OwnerFunctionCalled(27); } /** * @notice sets the rollup's inbox reference. Does not update the bridge's view. * @param newInbox new address of inbox */ - function setInbox(IInboxBase newInbox) external { + function setInbox( + IInboxBase newInbox + ) external { inbox = newInbox; - emit OwnerFunctionCalled(28); - } - - function createNitroMigrationGenesis(Assertion calldata assertion) external whenPaused { - bytes32 expectedSendRoot = bytes32(0); - uint64 expectedInboxCount = 1; - - require(latestNodeCreated() == 0, "NON_GENESIS_NODES_EXIST"); - require(GlobalStateLib.isEmpty(assertion.beforeState.globalState), "NOT_EMPTY_BEFORE"); - require( - assertion.beforeState.machineStatus == MachineStatus.FINISHED, - "BEFORE_MACHINE_NOT_FINISHED" - ); - // accessors such as state.getSendRoot not available for calldata structs, only memory - require( - assertion.afterState.globalState.bytes32Vals[1] == expectedSendRoot, - "NOT_ZERO_SENDROOT" - ); - require( - assertion.afterState.globalState.u64Vals[0] == expectedInboxCount, - "INBOX_NOT_AT_ONE" - ); - require(assertion.afterState.globalState.u64Vals[1] == 0, "POSITION_IN_MESSAGE_NOT_ZERO"); - require( - assertion.afterState.machineStatus == MachineStatus.FINISHED, - "AFTER_MACHINE_NOT_FINISHED" - ); - bytes32 genesisBlockHash = assertion.afterState.globalState.bytes32Vals[0]; - createNewNode(assertion, 0, expectedInboxCount, bytes32(0)); - confirmNode(1, genesisBlockHash, expectedSendRoot); - emit OwnerFunctionCalled(29); + emit InboxSet(address(newInbox)); + // previously: emit OwnerFunctionCalled(28); } /** * @notice set the validatorWhitelistDisabled flag * @param _validatorWhitelistDisabled new value of validatorWhitelistDisabled, i.e. true = disabled */ - function setValidatorWhitelistDisabled(bool _validatorWhitelistDisabled) external { + function setValidatorWhitelistDisabled( + bool _validatorWhitelistDisabled + ) external { validatorWhitelistDisabled = _validatorWhitelistDisabled; - emit OwnerFunctionCalled(30); + emit ValidatorWhitelistDisabledSet(_validatorWhitelistDisabled); + // previously: emit OwnerFunctionCalled(30); } /** * @notice set the anyTrustFastConfirmer address - * must also call `setValidator` to set the same address as a validator to work - * old fast confirmer need to be removed from the validator list manually * @param _anyTrustFastConfirmer new value of anyTrustFastConfirmer */ - function setAnyTrustFastConfirmer(address _anyTrustFastConfirmer) external { + function setAnyTrustFastConfirmer( + address _anyTrustFastConfirmer + ) external { anyTrustFastConfirmer = _anyTrustFastConfirmer; - emit OwnerFunctionCalled(31); + emit AnyTrustFastConfirmerSet(_anyTrustFastConfirmer); + // previously: emit OwnerFunctionCalled(31); + } + + /** + * @notice set a new challengeManager contract + * @param _challengeManager new value of challengeManager + */ + function setChallengeManager( + address _challengeManager + ) external { + challengeManager = IEdgeChallengeManager(_challengeManager); + emit ChallengeManagerSet(_challengeManager); + // previously: emit OwnerFunctionCalled(32); } } diff --git a/src/rollup/RollupCore.sol b/src/rollup/RollupCore.sol index 621783e8..4ee6715c 100644 --- a/src/rollup/RollupCore.sol +++ b/src/rollup/RollupCore.sol @@ -5,139 +5,173 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; -import "./Node.sol"; +import "./Assertion.sol"; import "./RollupLib.sol"; import "./IRollupEventInbox.sol"; import "./IRollupCore.sol"; -import "../challenge/IChallengeManager.sol"; +import "../state/Machine.sol"; import "../bridge/ISequencerInbox.sol"; import "../bridge/IBridge.sol"; import "../bridge/IOutbox.sol"; - -import "../precompiles/ArbSys.sol"; - +import "../challengeV2/EdgeChallengeManager.sol"; import "../libraries/ArbitrumChecker.sol"; -import {NO_CHAL_INDEX} from "../libraries/Constants.sol"; abstract contract RollupCore is IRollupCore, PausableUpgradeable { - using NodeLib for Node; + using AssertionNodeLib for AssertionNode; using GlobalStateLib for GlobalState; + using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; // Rollup Config - uint64 public confirmPeriodBlocks; - uint64 public extraChallengeTimeBlocks; uint256 public chainId; + + // These 4 config should be stored into the prev and not used directly + // An assertion can be confirmed after confirmPeriodBlocks when it is unchallenged + uint64 public confirmPeriodBlocks; + // The validator whitelist can be dropped permissionlessly once the last confirmed assertion or its first child is at least validatorAfkBlocks old + uint64 public validatorAfkBlocks; + + // ------------------------------ + // STAKING + // ------------------------------ + + // Overall + // ------------------------------ + // In order to create a new assertion the validator creating it must be staked. Only one stake + // is needed per consistent lineage of assertions, so additional stakes must be placed when + // lineages diverge. + // As an example, for the following chain only one stake would be locked up in the C assertion + // A -- B -- C + // However for the following chain 2 stakes would be locked up, in C and in D + // A -- B -- C + // \-- D + // Since we know that only one assertion chain can be correct, we only need one stake available + // to be refunded at any one time, and any more than one stake can be immediately confiscated. + // So in the above situation although 2 stakes are not available to be withdrawn as they are locked + // by C and D, only 1 stake needs to remain in the contract since one of the stakes will eventually + // be confiscated anyway. + // In practice, what we do here is increase the withdrawable amount of an escrow address that is + // expected to be controlled by the rollup owner, whenever the lineage forks. + + // Moving stake + // ------------------------------ + // Since we only need one stake per lineage we can lock the stake of the validator that last extended that + // lineage. All other stakes within that lineage are then free to be moved to other lineages, or be withdrawn. + // Additionally, it's inconsistent for a validator to stake on two different lineages, and as a validator + // should only need to have one stake in the system at any one time. + // In order to create a new assertion a validator needs to have free stake. Since stake is freed from an assertion + // when another assertion builds on it, we know that if the assertion that was last staked on by a validator + // has children, then that validator has free stake. Likewise, if the last staked assertion does not have children + // but it is the parent of the assertion the validator is trying to create, then we know that by the time the assertion + // is created it will have children, so we can allow this condition as well. + + // Updating stake amount + // ------------------------------ + // The stake required to create an assertion can be updated by the rollup owner. A required stake value is stored on each + // assertion, and shows how much stake is required to create the next assertion. Since we only store the last + // assertion made by a validator, we don't know if it has previously staked on lower/higher amounts and + // therefore offer partial withdrawals due to this difference. Instead we enforce that either all of the + // validators stake is locked, or none of it. uint256 public baseStake; + bytes32 public wasmModuleRoot; + // When there is a challenge, we trust the challenge manager to determine the winner + IEdgeChallengeManager public challengeManager; + + // If an assertion was challenged we leave an additional period after it could have completed + // so that the result of a challenge is observable widely before it causes an assertion to be confirmed + uint64 public challengeGracePeriodBlocks; IInboxBase public inbox; IBridge public bridge; IOutbox public outbox; - ISequencerInbox public sequencerInbox; IRollupEventInbox public rollupEventInbox; - IChallengeManager public override challengeManager; - // misc useful contracts when interacting with the rollup - address public validatorUtils; address public validatorWalletCreator; - // when a staker loses a challenge, half of their funds get escrowed in this address + // only 1 child can be confirmed, the excess/loser stake will be sent to this address address public loserStakeEscrow; address public stakeToken; uint256 public minimumAssertionPeriod; - mapping(address => bool) public isValidator; - - // Stakers become Zombies after losing a challenge - struct Zombie { - address stakerAddress; - uint64 latestStakedNode; - } + EnumerableSetUpgradeable.AddressSet internal validators; - uint64 private _latestConfirmed; - uint64 private _firstUnresolvedNode; - uint64 private _latestNodeCreated; - uint64 private _lastStakeBlock; - mapping(uint64 => Node) private _nodes; - mapping(uint64 => mapping(address => bool)) private _nodeStakers; + bytes32 private _latestConfirmed; + mapping(bytes32 => AssertionNode) private _assertions; address[] private _stakerList; mapping(address => Staker) public _stakerMap; - Zombie[] private _zombies; - mapping(address => uint256) private _withdrawableFunds; uint256 public totalWithdrawableFunds; uint256 public rollupDeploymentBlock; - // The node number of the initial node - uint64 internal constant GENESIS_NODE = 0; - bool public validatorWhitelistDisabled; address public anyTrustFastConfirmer; // If the chain this RollupCore is deployed on is an Arbitrum chain. bool internal immutable _hostChainIsArbitrum = ArbitrumChecker.runningOnArbitrum(); // If the chain RollupCore is deployed on, this will contain the ArbSys.blockNumber() at each node's creation. - mapping(uint64 => uint256) internal _nodeCreatedAtArbSysBlock; + mapping(bytes32 => uint256) internal _assertionCreatedAtArbSysBlock; + + function sequencerInbox() public view virtual returns (ISequencerInbox) { + return ISequencerInbox(bridge.sequencerInbox()); + } /** - * @notice Get a storage reference to the Node for the given node index - * @param nodeNum Index of the node - * @return Node struct + * @notice Get a storage reference to the Assertion for the given assertion hash + * @dev The assertion may not exists + * @param assertionHash Id of the assertion + * @return Assertion struct */ - function getNodeStorage(uint64 nodeNum) internal view returns (Node storage) { - return _nodes[nodeNum]; + function getAssertionStorage( + bytes32 assertionHash + ) internal view returns (AssertionNode storage) { + require(assertionHash != bytes32(0), "ASSERTION_ID_CANNOT_BE_ZERO"); + return _assertions[assertionHash]; } /** - * @notice Get the Node for the given index. + * @notice Get the Assertion for the given index. */ - function getNode(uint64 nodeNum) public view override returns (Node memory) { - return getNodeStorage(nodeNum); + function getAssertion( + bytes32 assertionHash + ) public view override returns (AssertionNode memory) { + return getAssertionStorage(assertionHash); } /** - * @notice Returns the block in which the given node was created for looking up its creation event. - * Unlike the Node's createdAtBlock field, this will be the ArbSys blockNumber if the host chain is an Arbitrum chain. + * @notice Returns the block in which the given assertion was created for looking up its creation event. + * Unlike the assertion's createdAtBlock field, this will be the ArbSys blockNumber if the host chain is an Arbitrum chain. * That means that the block number returned for this is usable for event queries. - * This function will revert if the given node number does not exist. + * This function will revert if the given assertion hash does not exist. * @dev This function is meant for internal use only and has no stability guarantees. */ - function getNodeCreationBlockForLogLookup(uint64 nodeNum) - external - view - override - returns (uint256) - { + function getAssertionCreationBlockForLogLookup( + bytes32 assertionHash + ) external view override returns (uint256) { if (_hostChainIsArbitrum) { - uint256 blockNum = _nodeCreatedAtArbSysBlock[nodeNum]; - require(blockNum > 0, "NO_NODE"); + uint256 blockNum = _assertionCreatedAtArbSysBlock[assertionHash]; + require(blockNum > 0, "NO_ASSERTION"); return blockNum; } else { - Node storage node = getNodeStorage(nodeNum); - require(node.deadlineBlock != 0, "NO_NODE"); - return node.createdAtBlock; + AssertionNode storage assertion = getAssertionStorage(assertionHash); + assertion.requireExists(); + return assertion.createdAtBlock; } } - /** - * @notice Check if the specified node has been staked on by the provided staker. - * Only accurate at the latest confirmed node and afterwards. - */ - function nodeHasStaker(uint64 nodeNum, address staker) public view override returns (bool) { - return _nodeStakers[nodeNum][staker]; - } - /** * @notice Get the address of the staker at the given index * @param stakerNum Index of the staker * @return Address of the staker */ - function getStakerAddress(uint64 stakerNum) external view override returns (address) { + function getStakerAddress( + uint64 stakerNum + ) external view override returns (address) { return _stakerList[stakerNum]; } @@ -146,45 +180,43 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { * @param staker Staker address to check * @return True or False for whether the staker was staked */ - function isStaked(address staker) public view override returns (bool) { + function isStaked( + address staker + ) public view override returns (bool) { return _stakerMap[staker].isStaked; } /** - * @notice Check whether the given staker is staked on the latest confirmed node, - * which includes if the staker is staked on a descendent of the latest confirmed node. - * @param staker Staker address to check - * @return True or False for whether the staker was staked - */ - function isStakedOnLatestConfirmed(address staker) public view returns (bool) { - return _stakerMap[staker].isStaked && nodeHasStaker(_latestConfirmed, staker); - } - - /** - * @notice Get the latest staked node of the given staker + * @notice Get the latest staked assertion of the given staker * @param staker Staker address to lookup - * @return Latest node staked of the staker + * @return Latest assertion staked of the staker */ - function latestStakedNode(address staker) public view override returns (uint64) { - return _stakerMap[staker].latestStakedNode; + function latestStakedAssertion( + address staker + ) public view override returns (bytes32) { + return _stakerMap[staker].latestStakedAssertion; } /** - * @notice Get the current challenge of the given staker + * @notice Get the amount staked of the given staker * @param staker Staker address to lookup - * @return Current challenge of the staker + * @return Amount staked of the staker */ - function currentChallenge(address staker) public view override returns (uint64) { - return _stakerMap[staker].currentChallenge; + function amountStaked( + address staker + ) public view override returns (uint256) { + return _stakerMap[staker].amountStaked; } /** - * @notice Get the amount staked of the given staker + * @notice Get the withdrawal address of the given staker * @param staker Staker address to lookup - * @return Amount staked of the staker + * @return Withdrawal address of the staker */ - function amountStaked(address staker) public view override returns (uint256) { - return _stakerMap[staker].amountStaked; + function withdrawalAddress( + address staker + ) public view override returns (address) { + return _stakerMap[staker].withdrawalAddress; } /** @@ -192,197 +224,99 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { * @param staker Staker address to retrieve * @return A structure with information about the requested staker */ - function getStaker(address staker) external view override returns (Staker memory) { + function getStaker( + address staker + ) external view override returns (Staker memory) { return _stakerMap[staker]; } - /** - * @notice Get the original staker address of the zombie at the given index - * @param zombieNum Index of the zombie to lookup - * @return Original staker address of the zombie - */ - function zombieAddress(uint256 zombieNum) public view override returns (address) { - return _zombies[zombieNum].stakerAddress; - } - - /** - * @notice Get Latest node that the given zombie at the given index is staked on - * @param zombieNum Index of the zombie to lookup - * @return Latest node that the given zombie is staked on - */ - function zombieLatestStakedNode(uint256 zombieNum) public view override returns (uint64) { - return _zombies[zombieNum].latestStakedNode; - } - - /** - * @notice Retrieves stored information about a requested zombie - * @param zombieNum Index of the zombie to lookup - * @return A structure with information about the requested staker - */ - function getZombieStorage(uint256 zombieNum) internal view returns (Zombie storage) { - return _zombies[zombieNum]; - } - - /// @return Current number of un-removed zombies - function zombieCount() public view override returns (uint256) { - return _zombies.length; - } - - function isZombie(address staker) public view override returns (bool) { - for (uint256 i = 0; i < _zombies.length; i++) { - if (staker == _zombies[i].stakerAddress) { - return true; - } - } - return false; - } - /** * @notice Get the amount of funds withdrawable by the given address * @param user Address to check the funds of * @return Amount of funds withdrawable by user */ - function withdrawableFunds(address user) external view override returns (uint256) { + function withdrawableFunds( + address user + ) external view override returns (uint256) { return _withdrawableFunds[user]; } - /** - * @return Index of the first unresolved node - * @dev If all nodes have been resolved, this will be latestNodeCreated + 1 - */ - function firstUnresolvedNode() public view override returns (uint64) { - return _firstUnresolvedNode; - } - - /// @return Index of the latest confirmed node - function latestConfirmed() public view override returns (uint64) { + /// @return Index of the latest confirmed assertion + function latestConfirmed() public view override returns (bytes32) { return _latestConfirmed; } - /// @return Index of the latest rollup node created - function latestNodeCreated() public view override returns (uint64) { - return _latestNodeCreated; - } - - /// @return Ethereum block that the most recent stake was created - function lastStakeBlock() external view override returns (uint64) { - return _lastStakeBlock; - } - /// @return Number of active stakers currently staked function stakerCount() public view override returns (uint64) { return uint64(_stakerList.length); } /** - * @notice Initialize the core with an initial node - * @param initialNode Initial node to start the chain with + * @notice Initialize the core with an initial assertion + * @param initialAssertion Initial assertion to start the chain with */ - function initializeCore(Node memory initialNode) internal { + function initializeCore( + AssertionNode memory initialAssertion, + bytes32 assertionHash + ) internal { __Pausable_init(); - _nodes[GENESIS_NODE] = initialNode; - _firstUnresolvedNode = GENESIS_NODE + 1; - if (_hostChainIsArbitrum) { - _nodeCreatedAtArbSysBlock[GENESIS_NODE] = ArbSys(address(100)).arbBlockNumber(); - } + initialAssertion.status = AssertionStatus.Confirmed; + _assertions[assertionHash] = initialAssertion; + _latestConfirmed = assertionHash; } /** - * @notice React to a new node being created by storing it an incrementing the latest node counter - * @param node Node that was newly created + * @dev This function will validate the parentAssertionHash, confirmState and inboxAcc against the assertionHash + * and check if the assertionHash is currently pending. If all checks pass, the assertion will be confirmed. */ - function nodeCreated(Node memory node) internal { - _latestNodeCreated++; - _nodes[_latestNodeCreated] = node; - if (_hostChainIsArbitrum) { - _nodeCreatedAtArbSysBlock[_latestNodeCreated] = ArbSys(address(100)).arbBlockNumber(); - } - } + function confirmAssertionInternal( + bytes32 assertionHash, + bytes32 parentAssertionHash, + AssertionState calldata confirmState, + bytes32 inboxAcc + ) internal { + AssertionNode storage assertion = getAssertionStorage(assertionHash); + // Check that assertion is pending, this also checks that assertion exists + require(assertion.status == AssertionStatus.Pending, "NOT_PENDING"); - /// @notice Reject the next unresolved node - function _rejectNextNode() internal { - _firstUnresolvedNode++; - } + // Authenticate data against assertionHash pre-image + require( + assertionHash + == RollupLib.assertionHash({ + parentAssertionHash: parentAssertionHash, + afterState: confirmState, + inboxAcc: inboxAcc + }), + "CONFIRM_DATA" + ); - function confirmNode( - uint64 nodeNum, - bytes32 blockHash, - bytes32 sendRoot - ) internal { - Node storage node = getNodeStorage(nodeNum); - // Authenticate data against node's confirm data pre-image - require(node.confirmData == RollupLib.confirmHash(blockHash, sendRoot), "CONFIRM_DATA"); + bytes32 blockHash = confirmState.globalState.getBlockHash(); + bytes32 sendRoot = confirmState.globalState.getSendRoot(); // trusted external call to outbox outbox.updateSendRoot(sendRoot, blockHash); - _latestConfirmed = nodeNum; - _firstUnresolvedNode = nodeNum + 1; + _latestConfirmed = assertionHash; + assertion.status = AssertionStatus.Confirmed; - emit NodeConfirmed(nodeNum, blockHash, sendRoot); + emit AssertionConfirmed(assertionHash, blockHash, sendRoot); } /** - * @notice Create a new stake at latest confirmed node + * @notice Create a new stake at latest confirmed assertion * @param stakerAddress Address of the new staker * @param depositAmount Stake amount of the new staker */ - function createNewStake(address stakerAddress, uint256 depositAmount) internal { + function createNewStake( + address stakerAddress, + uint256 depositAmount, + address _withdrawalAddress + ) internal { uint64 stakerIndex = uint64(_stakerList.length); _stakerList.push(stakerAddress); - _stakerMap[stakerAddress] = Staker( - depositAmount, - stakerIndex, - _latestConfirmed, - NO_CHAL_INDEX, // new staker is not in challenge - true - ); - _nodeStakers[_latestConfirmed][stakerAddress] = true; - _lastStakeBlock = uint64(block.number); - emit UserStakeUpdated(stakerAddress, 0, depositAmount); - } - - /** - * @notice Check to see whether the two stakers are in the same challenge - * @param stakerAddress1 Address of the first staker - * @param stakerAddress2 Address of the second staker - * @return Address of the challenge that the two stakers are in - */ - function inChallenge(address stakerAddress1, address stakerAddress2) - internal - view - returns (uint64) - { - Staker storage staker1 = _stakerMap[stakerAddress1]; - Staker storage staker2 = _stakerMap[stakerAddress2]; - uint64 challenge = staker1.currentChallenge; - require(challenge != NO_CHAL_INDEX, "NO_CHAL"); - require(challenge == staker2.currentChallenge, "DIFF_IN_CHAL"); - return challenge; - } - - /** - * @notice Make the given staker as not being in a challenge - * @param stakerAddress Address of the staker to remove from a challenge - */ - function clearChallenge(address stakerAddress) internal { - Staker storage staker = _stakerMap[stakerAddress]; - staker.currentChallenge = NO_CHAL_INDEX; - } - - /** - * @notice Mark both the given stakers as engaged in the challenge - * @param staker1 Address of the first staker - * @param staker2 Address of the second staker - * @param challenge Address of the challenge both stakers are now in - */ - function challengeStarted( - address staker1, - address staker2, - uint64 challenge - ) internal { - _stakerMap[staker1].currentChallenge = challenge; - _stakerMap[staker2].currentChallenge = challenge; + _stakerMap[stakerAddress] = + Staker(depositAmount, _latestConfirmed, stakerIndex, true, _withdrawalAddress); + emit UserStakeUpdated(stakerAddress, _withdrawalAddress, 0, depositAmount); } /** @@ -395,7 +329,7 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { uint256 initialStaked = staker.amountStaked; uint256 finalStaked = initialStaked + amountAdded; staker.amountStaked = finalStaked; - emit UserStakeUpdated(stakerAddress, initialStaked, finalStaked); + emit UserStakeUpdated(stakerAddress, staker.withdrawalAddress, initialStaked, finalStaked); } /** @@ -406,109 +340,30 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { */ function reduceStakeTo(address stakerAddress, uint256 target) internal returns (uint256) { Staker storage staker = _stakerMap[stakerAddress]; + address _withdrawalAddress = staker.withdrawalAddress; uint256 current = staker.amountStaked; require(target <= current, "TOO_LITTLE_STAKE"); uint256 amountWithdrawn = current - target; staker.amountStaked = target; - increaseWithdrawableFunds(stakerAddress, amountWithdrawn); - emit UserStakeUpdated(stakerAddress, current, target); + increaseWithdrawableFunds(_withdrawalAddress, amountWithdrawn); + emit UserStakeUpdated(stakerAddress, _withdrawalAddress, current, target); return amountWithdrawn; } - /** - * @notice Remove the given staker and turn them into a zombie - * @param stakerAddress Address of the staker to remove - */ - function turnIntoZombie(address stakerAddress) internal { - Staker storage staker = _stakerMap[stakerAddress]; - _zombies.push(Zombie(stakerAddress, staker.latestStakedNode)); - deleteStaker(stakerAddress); - } - - /** - * @notice Update the latest staked node of the zombie at the given index - * @param zombieNum Index of the zombie to move - * @param latest New latest node the zombie is staked on - */ - function zombieUpdateLatestStakedNode(uint256 zombieNum, uint64 latest) internal { - _zombies[zombieNum].latestStakedNode = latest; - } - - /** - * @notice Remove the zombie at the given index - * @param zombieNum Index of the zombie to remove - */ - function removeZombie(uint256 zombieNum) internal { - _zombies[zombieNum] = _zombies[_zombies.length - 1]; - _zombies.pop(); - } - - /** - * @notice Mark the given staker as staked on this node - * @param staker Address of the staker to mark - */ - function addStaker(uint64 nodeNum, address staker) internal { - require(!_nodeStakers[nodeNum][staker], "ALREADY_STAKED"); - _nodeStakers[nodeNum][staker] = true; - Node storage node = getNodeStorage(nodeNum); - require(node.deadlineBlock != 0, "NO_NODE"); - - uint64 prevCount = node.stakerCount; - node.stakerCount = prevCount + 1; - - if (nodeNum > GENESIS_NODE) { - Node storage parent = getNodeStorage(node.prevNum); - parent.childStakerCount++; - if (prevCount == 0) { - parent.newChildConfirmDeadline(uint64(block.number) + confirmPeriodBlocks); - } - } - } - - /** - * @notice Remove the given staker from this node - * @param staker Address of the staker to remove - */ - function removeStaker(uint64 nodeNum, address staker) internal { - require(_nodeStakers[nodeNum][staker], "NOT_STAKED"); - _nodeStakers[nodeNum][staker] = false; - - Node storage node = getNodeStorage(nodeNum); - node.stakerCount--; - - if (nodeNum > GENESIS_NODE) { - getNodeStorage(node.prevNum).childStakerCount--; - } - } - /** * @notice Remove the given staker and return their stake - * This should not be called if the staker is staked on a descendent of the latest confirmed node + * This should only be called when the staker is inactive * @param stakerAddress Address of the staker withdrawing their stake */ - function withdrawStaker(address stakerAddress) internal { + function withdrawStaker( + address stakerAddress + ) internal { Staker storage staker = _stakerMap[stakerAddress]; - uint64 latestConfirmedNum = latestConfirmed(); - if (nodeHasStaker(latestConfirmedNum, stakerAddress)) { - // Withdrawing a staker whose latest staked node isn't resolved should be impossible - assert(staker.latestStakedNode == latestConfirmedNum); - removeStaker(latestConfirmedNum, stakerAddress); - } + address _withdrawalAddress = staker.withdrawalAddress; uint256 initialStaked = staker.amountStaked; - increaseWithdrawableFunds(stakerAddress, initialStaked); + increaseWithdrawableFunds(_withdrawalAddress, initialStaked); deleteStaker(stakerAddress); - emit UserStakeUpdated(stakerAddress, initialStaked, 0); - } - - /** - * @notice Advance the given staker to the given node - * @param stakerAddress Address of the staker adding their stake - * @param nodeNum Index of the node to stake on - */ - function stakeOnNode(address stakerAddress, uint64 nodeNum) internal { - Staker storage staker = _stakerMap[stakerAddress]; - addStaker(nodeNum, stakerAddress); - staker.latestStakedNode = nodeNum; + emit UserStakeUpdated(stakerAddress, _withdrawalAddress, initialStaked, 0); } /** @@ -516,7 +371,9 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { * @param account Address of the account to remove funds from * @return Amount of funds removed from account */ - function withdrawFunds(address account) internal returns (uint256) { + function withdrawFunds( + address account + ) internal returns (uint256) { uint256 amount = _withdrawableFunds[account]; _withdrawableFunds[account] = 0; totalWithdrawableFunds -= amount; @@ -540,7 +397,9 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { * @notice Remove the given staker * @param stakerAddress Address of the staker to remove */ - function deleteStaker(address stakerAddress) private { + function deleteStaker( + address stakerAddress + ) private { Staker storage staker = _stakerMap[stakerAddress]; require(staker.isStaked, "NOT_STAKED"); uint64 stakerIndex = staker.index; @@ -550,130 +409,250 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { delete _stakerMap[stakerAddress]; } - struct StakeOnNewNodeFrame { - uint256 currentInboxSize; - Node node; - bytes32 executionHash; - Node prevNode; - bytes32 lastHash; - bool hasSibling; - uint64 deadlineBlock; - bytes32 sequencerBatchAcc; - } + function createNewAssertion( + AssertionInputs calldata assertion, + bytes32 prevAssertionHash, + bytes32 expectedAssertionHash + ) internal returns (bytes32 newAssertionHash, bool overflowAssertion) { + // Validate the config hash + RollupLib.validateConfigHash( + assertion.beforeStateData.configData, getAssertionStorage(prevAssertionHash).configHash + ); - function createNewNode( - Assertion calldata assertion, - uint64 prevNodeNum, - uint256 prevNodeInboxMaxCount, - bytes32 expectedNodeHash - ) internal returns (bytes32 newNodeHash) { + // reading inbox messages always terminates in either a finished or errored state + // although the challenge protocol that any invalid terminal state will be proven incorrect + // we can do a quick sanity check here require( - assertion.afterState.machineStatus == MachineStatus.FINISHED || - assertion.afterState.machineStatus == MachineStatus.ERRORED, + assertion.afterState.machineStatus == MachineStatus.FINISHED + || assertion.afterState.machineStatus == MachineStatus.ERRORED, "BAD_AFTER_STATUS" ); - StakeOnNewNodeFrame memory memoryFrame; - { - // validate data - memoryFrame.prevNode = getNode(prevNodeNum); - memoryFrame.currentInboxSize = bridge.sequencerMessageCount(); + // validate the provided before state is correct by checking that it's part of the prev assertion hash + require( + RollupLib.assertionHash( + assertion.beforeStateData.prevPrevAssertionHash, + assertion.beforeState, + assertion.beforeStateData.sequencerBatchAcc + ) == prevAssertionHash, + "INVALID_BEFORE_STATE" + ); - // Make sure the previous state is correct against the node being built on - require( - RollupLib.stateHash(assertion.beforeState, prevNodeInboxMaxCount) == - memoryFrame.prevNode.stateHash, - "PREV_STATE_HASH" + // The rollup cannot advance from an errored state + // If it reaches an errored state it must be corrected by an administrator + // This will involve updating the wasm root and creating an alternative assertion + // that consumes the correct number of inbox messages, and correctly transitions to the + // FINISHED state so that normal progress can continue + require(assertion.beforeState.machineStatus == MachineStatus.FINISHED, "BAD_PREV_STATUS"); + + AssertionNode storage prevAssertion = getAssertionStorage(prevAssertionHash); + // Required inbox position through which the next assertion (the one after this new assertion) must consume + uint256 nextInboxPosition; + bytes32 sequencerBatchAcc; + { + // This new assertion consumes the messages from prevInboxPosition to afterInboxPosition + GlobalState calldata afterGS = assertion.afterState.globalState; + GlobalState calldata beforeGS = assertion.beforeState.globalState; + + // there are 3 kinds of assertions that can be made. Assertions must be made when they fill the maximum number + // of blocks, or when they process all messages up to prev.nextInboxPosition. When they fill the max + // blocks, but dont manage to process all messages, we call this an "overflow" assertion. + // 1. ERRORED assertion + // The machine finished in an ERRORED state. This can happen with processing any + // messages, or moving the position in the message. + // 2. FINISHED assertion that did not overflow + // The machine finished as normal, and fully processed all the messages up to prev.nextInboxPosition. + // In this case the inbox position must equal prev.nextInboxPosition and position in message must be 0 + // 3. FINISHED assertion that did overflow + // The machine finished as normal, but didn't process all messages in the inbox. + // The inbox can be anywhere between the previous assertion's position and the nextInboxPosition, exclusive. + + // All types of assertion must have inbox position in the range prev.inboxPosition <= x <= prev.nextInboxPosition + require(afterGS.comparePositions(beforeGS) >= 0, "INBOX_BACKWARDS"); + int256 afterStateCmpMaxInbox = afterGS.comparePositionsAgainstStartOfBatch( + assertion.beforeStateData.configData.nextInboxPosition ); + require(afterStateCmpMaxInbox <= 0, "INBOX_TOO_FAR"); - // Ensure that the assertion doesn't read past the end of the current inbox - uint64 afterInboxCount = assertion.afterState.globalState.getInboxPosition(); - uint64 prevInboxPosition = assertion.beforeState.globalState.getInboxPosition(); - require(afterInboxCount >= prevInboxPosition, "INBOX_BACKWARDS"); - if (afterInboxCount == prevInboxPosition) { - require( - assertion.afterState.globalState.getPositionInMessage() >= - assertion.beforeState.globalState.getPositionInMessage(), - "INBOX_POS_IN_MSG_BACKWARDS" - ); - } - // See validator/assertion.go ExecutionState RequiredBatches() for reasoning if ( - assertion.afterState.machineStatus == MachineStatus.ERRORED || - assertion.afterState.globalState.getPositionInMessage() > 0 + assertion.afterState.machineStatus != MachineStatus.ERRORED + && afterStateCmpMaxInbox < 0 ) { - // The current inbox message was read - afterInboxCount++; - } - require(afterInboxCount <= memoryFrame.currentInboxSize, "INBOX_PAST_END"); - // This gives replay protection against the state of the inbox - if (afterInboxCount > 0) { - memoryFrame.sequencerBatchAcc = bridge.sequencerInboxAccs(afterInboxCount - 1); + // If we didn't reach the target next inbox position, this is an overflow assertion. + overflowAssertion = true; + // This shouldn't be necessary, but might as well constrain the assertion to be non-empty + require(afterGS.comparePositions(beforeGS) > 0, "OVERFLOW_STANDSTILL"); } - } - - { - memoryFrame.executionHash = RollupLib.executionHash(assertion); + // Inbox position at the time of this assertion being created + uint256 currentInboxPosition = bridge.sequencerMessageCount(); + // Cannot read more messages than currently exist in the inbox + require( + afterGS.comparePositionsAgainstStartOfBatch(currentInboxPosition) <= 0, + "INBOX_PAST_END" + ); - memoryFrame.deadlineBlock = uint64(block.number) + confirmPeriodBlocks; + // under normal circumstances prev.nextInboxPosition is guaranteed to exist + // because we populate it from bridge.sequencerMessageCount(). However, when + // the inbox message count doesnt change we artificially increase it by 1 as explained below + // in this case we need to ensure when the assertion is made the inbox messages are available + // to ensure that a valid assertion can actually be made. + require( + assertion.beforeStateData.configData.nextInboxPosition <= currentInboxPosition, + "INBOX_NOT_POPULATED" + ); - memoryFrame.hasSibling = memoryFrame.prevNode.latestChildNumber > 0; - // here we don't use ternacy operator to remain compatible with slither - if (memoryFrame.hasSibling) { - memoryFrame.lastHash = getNodeStorage(memoryFrame.prevNode.latestChildNumber) - .nodeHash; + // The next assertion must consume all the messages that are currently found in the inbox + uint256 afterInboxPosition = afterGS.getInboxPosition(); + if (afterInboxPosition == currentInboxPosition) { + // No new messages have been added to the inbox since the last assertion + // In this case if we set the next inbox position to the current one we would be insisting that + // the next assertion process no messages. So instead we increment the next inbox position to current + // plus one, so that the next assertion will process exactly one message. + // Thus, no assertion can be empty (except the genesis assertion, which is created + // via a different codepath). + nextInboxPosition = currentInboxPosition + 1; } else { - memoryFrame.lastHash = memoryFrame.prevNode.nodeHash; + nextInboxPosition = currentInboxPosition; } - newNodeHash = RollupLib.nodeHash( - memoryFrame.hasSibling, - memoryFrame.lastHash, - memoryFrame.executionHash, - memoryFrame.sequencerBatchAcc, - wasmModuleRoot - ); - require( - newNodeHash == expectedNodeHash || expectedNodeHash == bytes32(0), - "UNEXPECTED_NODE_HASH" - ); + // only the genesis assertion processes no messages, and that assertion is created + // when we initialize this contract. Therefore, all assertions created here should have a non + // zero inbox position. + require(afterInboxPosition != 0, "EMPTY_INBOX_COUNT"); - memoryFrame.node = NodeLib.createNode( - RollupLib.stateHash(assertion.afterState, memoryFrame.currentInboxSize), - RollupLib.challengeRootHash( - memoryFrame.executionHash, - block.number, - wasmModuleRoot - ), - RollupLib.confirmHash(assertion), - prevNodeNum, - memoryFrame.deadlineBlock, - newNodeHash - ); + // Fetch the inbox accumulator for this message count. Fetching this and checking against it + // allows the assertion creator to ensure they're creating an assertion against the expected + // inbox messages + sequencerBatchAcc = bridge.sequencerInboxAccs(afterInboxPosition - 1); } - { - uint64 nodeNum = latestNodeCreated() + 1; + newAssertionHash = + RollupLib.assertionHash(prevAssertionHash, assertion.afterState, sequencerBatchAcc); + + // allow an assertion creator to ensure that they're creating their assertion against the expected state + require( + newAssertionHash == expectedAssertionHash || expectedAssertionHash == bytes32(0), + "UNEXPECTED_ASSERTION_HASH" + ); - // Fetch a storage reference to prevNode since we copied our other one into memory - // and we don't have enough stack available to keep to keep the previous storage reference around - Node storage prevNode = getNodeStorage(prevNodeNum); - prevNode.childCreated(nodeNum); + // the assertion hash is unique - it's only possible to have one correct assertion hash + // per assertion. Therefore we can check if this assertion has already been made, and if so + // we can revert + require( + getAssertionStorage(newAssertionHash).status == AssertionStatus.NoAssertion, + "ASSERTION_SEEN" + ); - nodeCreated(memoryFrame.node); - } + // state updates + AssertionNode memory newAssertion = AssertionNodeLib.createAssertion( + prevAssertion.firstChildBlock == 0, // assumes block 0 is impossible + RollupLib.configHash({ + wasmModuleRoot: wasmModuleRoot, + requiredStake: baseStake, + challengeManager: address(challengeManager), + confirmPeriodBlocks: confirmPeriodBlocks, + nextInboxPosition: uint64(nextInboxPosition) + }) + ); - emit NodeCreated( - latestNodeCreated(), - memoryFrame.prevNode.nodeHash, - newNodeHash, - memoryFrame.executionHash, + // Fetch a storage reference to prevAssertion since we copied our other one into memory + // and we don't have enough stack available to keep to keep the previous storage reference around + prevAssertion.childCreated(); + _assertions[newAssertionHash] = newAssertion; + + emit AssertionCreated( + newAssertionHash, + prevAssertionHash, assertion, - memoryFrame.sequencerBatchAcc, + sequencerBatchAcc, + nextInboxPosition, wasmModuleRoot, - memoryFrame.currentInboxSize + baseStake, + address(challengeManager), + confirmPeriodBlocks ); + if (_hostChainIsArbitrum) { + _assertionCreatedAtArbSysBlock[newAssertionHash] = ArbSys(address(100)).arbBlockNumber(); + } + } - return newNodeHash; + function genesisAssertionHash() external pure returns (bytes32) { + GlobalState memory emptyGlobalState; + AssertionState memory emptyAssertionState = + AssertionState(emptyGlobalState, MachineStatus.FINISHED, bytes32(0)); + bytes32 parentAssertionHash = bytes32(0); + bytes32 inboxAcc = bytes32(0); + return RollupLib.assertionHash({ + parentAssertionHash: parentAssertionHash, + afterState: emptyAssertionState, + inboxAcc: inboxAcc + }); + } + + function getFirstChildCreationBlock( + bytes32 assertionHash + ) external view returns (uint64) { + return getAssertionStorage(assertionHash).firstChildBlock; + } + + function getSecondChildCreationBlock( + bytes32 assertionHash + ) external view returns (uint64) { + return getAssertionStorage(assertionHash).secondChildBlock; + } + + function validateAssertionHash( + bytes32 assertionHash, + AssertionState calldata state, + bytes32 prevAssertionHash, + bytes32 inboxAcc + ) external pure { + require( + assertionHash == RollupLib.assertionHash(prevAssertionHash, state, inboxAcc), + "INVALID_ASSERTION_HASH" + ); + } + + function validateConfig(bytes32 assertionHash, ConfigData calldata configData) external view { + RollupLib.validateConfigHash(configData, getAssertionStorage(assertionHash).configHash); + } + + function isFirstChild( + bytes32 assertionHash + ) external view returns (bool) { + return getAssertionStorage(assertionHash).isFirstChild; + } + + function isPending( + bytes32 assertionHash + ) external view returns (bool) { + return getAssertionStorage(assertionHash).status == AssertionStatus.Pending; + } + + function getValidators() external view returns (address[] memory) { + return validators.values(); + } + + function isValidator( + address validator + ) external view returns (bool) { + return validators.contains(validator); + } + + /** + * @notice Verify that the given staker is not active + * @param stakerAddress Address to check + */ + function requireInactiveStaker( + address stakerAddress + ) internal view { + require(isStaked(stakerAddress), "NOT_STAKED"); + // A staker is inactive if + // a) their last staked assertion is the latest confirmed assertion + // b) their last staked assertion have a child + bytes32 lastestAssertion = latestStakedAssertion(stakerAddress); + bool isLatestConfirmed = lastestAssertion == latestConfirmed(); + bool haveChild = getAssertionStorage(lastestAssertion).firstChildBlock > 0; + require(isLatestConfirmed || haveChild, "STAKE_ACTIVE"); } } diff --git a/src/rollup/RollupCreator.sol b/src/rollup/RollupCreator.sol index fca3f245..0ab79e6a 100644 --- a/src/rollup/RollupCreator.sol +++ b/src/rollup/RollupCreator.sol @@ -28,7 +28,6 @@ contract RollupCreator is Ownable { address sequencerInbox, address bridge, address upgradeExecutor, - address validatorUtils, address validatorWalletCreator ); event TemplatesUpdated(); @@ -46,12 +45,11 @@ contract RollupCreator is Ownable { BridgeCreator public bridgeCreator; IOneStepProofEntry public osp; - IChallengeManager public challengeManagerTemplate; + IEdgeChallengeManager public challengeManagerTemplate; IRollupAdmin public rollupAdminLogic; IRollupUser public rollupUserLogic; IUpgradeExecutor public upgradeExecutorLogic; - address public validatorUtils; address public validatorWalletCreator; DeployHelper public l2FactoriesDeployer; @@ -64,11 +62,10 @@ contract RollupCreator is Ownable { function setTemplates( BridgeCreator _bridgeCreator, IOneStepProofEntry _osp, - IChallengeManager _challengeManagerLogic, + IEdgeChallengeManager _challengeManagerLogic, IRollupAdmin _rollupAdminLogic, IRollupUser _rollupUserLogic, IUpgradeExecutor _upgradeExecutorLogic, - address _validatorUtils, address _validatorWalletCreator, DeployHelper _l2FactoriesDeployer ) external onlyOwner { @@ -78,12 +75,41 @@ contract RollupCreator is Ownable { rollupAdminLogic = _rollupAdminLogic; rollupUserLogic = _rollupUserLogic; upgradeExecutorLogic = _upgradeExecutorLogic; - validatorUtils = _validatorUtils; validatorWalletCreator = _validatorWalletCreator; l2FactoriesDeployer = _l2FactoriesDeployer; emit TemplatesUpdated(); } + // internal function to workaround stack limit + function createChallengeManager( + address rollupAddr, + address proxyAdminAddr, + Config memory config + ) internal returns (IEdgeChallengeManager) { + IEdgeChallengeManager challengeManager = IEdgeChallengeManager( + address( + new TransparentUpgradeableProxy( + address(challengeManagerTemplate), proxyAdminAddr, "" + ) + ) + ); + + challengeManager.initialize({ + _assertionChain: IAssertionChain(rollupAddr), + _challengePeriodBlocks: config.confirmPeriodBlocks, + _oneStepProofEntry: osp, + layerZeroBlockEdgeHeight: config.layerZeroBlockEdgeHeight, + layerZeroBigStepEdgeHeight: config.layerZeroBigStepEdgeHeight, + layerZeroSmallStepEdgeHeight: config.layerZeroSmallStepEdgeHeight, + _stakeToken: IERC20(config.stakeToken), + _stakeAmounts: config.miniStakeValues, + _excessStakeReceiver: config.owner, + _numBigStepLevel: config.numBigStepLevel + }); + + return challengeManager; + } + /** * @notice Create a new rollup * @dev After this setup: @@ -107,30 +133,45 @@ contract RollupCreator is Ownable { * - batchPosterManager The address which has the ability to rotate batch poster keys * @return The address of the newly created rollup */ - function createRollup(RollupDeploymentParams memory deployParams) - public - payable - returns (address) - { + function createRollup( + RollupDeploymentParams memory deployParams + ) public payable returns (address) { { // Make sure the immutable maxDataSize is as expected - (, ISequencerInbox ethSequencerInbox, IInboxBase ethInbox, , ) = bridgeCreator - .ethBasedTemplates(); + ( + , + ISequencerInbox ethSequencerInbox, + ISequencerInbox ethDelayBufferableSequencerInbox, + IInboxBase ethInbox, + , + ) = bridgeCreator.ethBasedTemplates(); require( deployParams.maxDataSize == ethSequencerInbox.maxDataSize(), "SI_MAX_DATA_SIZE_MISMATCH" ); + require( + deployParams.maxDataSize == ethDelayBufferableSequencerInbox.maxDataSize(), + "SI_MAX_DATA_SIZE_MISMATCH" + ); require(deployParams.maxDataSize == ethInbox.maxDataSize(), "I_MAX_DATA_SIZE_MISMATCH"); - (, ISequencerInbox erc20SequencerInbox, IInboxBase erc20Inbox, , ) = bridgeCreator - .erc20BasedTemplates(); + ( + , + ISequencerInbox erc20SequencerInbox, + ISequencerInbox erc20DelayBufferableSequencerInbox, + IInboxBase erc20Inbox, + , + ) = bridgeCreator.erc20BasedTemplates(); require( deployParams.maxDataSize == erc20SequencerInbox.maxDataSize(), "SI_MAX_DATA_SIZE_MISMATCH" ); require( - deployParams.maxDataSize == erc20Inbox.maxDataSize(), - "I_MAX_DATA_SIZE_MISMATCH" + deployParams.maxDataSize == erc20DelayBufferableSequencerInbox.maxDataSize(), + "SI_MAX_DATA_SIZE_MISMATCH" + ); + require( + deployParams.maxDataSize == erc20Inbox.maxDataSize(), "I_MAX_DATA_SIZE_MISMATCH" ); } @@ -144,24 +185,12 @@ contract RollupCreator is Ownable { address(proxyAdmin), address(rollup), deployParams.nativeToken, - deployParams.config.sequencerInboxMaxTimeVariation + deployParams.config.sequencerInboxMaxTimeVariation, + deployParams.config.bufferConfig ); - IChallengeManager challengeManager = IChallengeManager( - address( - new TransparentUpgradeableProxy( - address(challengeManagerTemplate), - address(proxyAdmin), - "" - ) - ) - ); - challengeManager.initialize( - IChallengeResultReceiver(address(rollup)), - bridgeContracts.sequencerInbox, - bridgeContracts.bridge, - osp - ); + IEdgeChallengeManager challengeManager = + createChallengeManager(address(rollup), address(proxyAdmin), deployParams.config); // deploy and init upgrade executor address upgradeExecutor = _deployUpgradeExecutor(deployParams.config.owner, proxyAdmin); @@ -183,7 +212,6 @@ contract RollupCreator is Ownable { challengeManager: challengeManager, rollupAdminLogic: address(rollupAdminLogic), rollupUserLogic: rollupUserLogic, - validatorUtils: validatorUtils, validatorWalletCreator: validatorWalletCreator }) ); @@ -226,22 +254,19 @@ contract RollupCreator is Ownable { address(bridgeContracts.sequencerInbox), address(bridgeContracts.bridge), address(upgradeExecutor), - address(validatorUtils), address(validatorWalletCreator) ); return address(rollup); } - function _deployUpgradeExecutor(address rollupOwner, ProxyAdmin proxyAdmin) - internal - returns (address) - { + function _deployUpgradeExecutor( + address rollupOwner, + ProxyAdmin proxyAdmin + ) internal returns (address) { IUpgradeExecutor upgradeExecutor = IUpgradeExecutor( address( new TransparentUpgradeableProxy( - address(upgradeExecutorLogic), - address(proxyAdmin), - bytes("") + address(upgradeExecutorLogic), address(proxyAdmin), bytes("") ) ) ); @@ -259,24 +284,20 @@ contract RollupCreator is Ownable { ) internal { if (_nativeToken == address(0)) { // we need to fund 4 retryable tickets - uint256 cost = l2FactoriesDeployer.getDeploymentTotalCost( - IInboxBase(_inbox), - _maxFeePerGas - ); + uint256 cost = + l2FactoriesDeployer.getDeploymentTotalCost(IInboxBase(_inbox), _maxFeePerGas); // do it l2FactoriesDeployer.perform{value: cost}(_inbox, _nativeToken, _maxFeePerGas); // refund the caller // solhint-disable-next-line avoid-low-level-calls - (bool sent, ) = msg.sender.call{value: address(this).balance}(""); + (bool sent,) = msg.sender.call{value: address(this).balance}(""); require(sent, "Refund failed"); } else { // Transfer fee token amount needed to pay for retryable fees to the inbox. - uint256 totalFee = l2FactoriesDeployer.getDeploymentTotalCost( - IInboxBase(_inbox), - _maxFeePerGas - ); + uint256 totalFee = + l2FactoriesDeployer.getDeploymentTotalCost(IInboxBase(_inbox), _maxFeePerGas); // calculate the fee amount in the native token's decimals uint8 decimals = ERC20(_nativeToken).decimals(); @@ -285,28 +306,21 @@ contract RollupCreator is Ownable { if (decimals < 18) { uint256 gasCost = _maxFeePerGas * 21_000; uint256 nickCreate2Cost = _scaleDownToNativeDecimals( - l2FactoriesDeployer.NICK_CREATE2_VALUE() + gasCost, - decimals + l2FactoriesDeployer.NICK_CREATE2_VALUE() + gasCost, decimals ); uint256 erc2470Cost = _scaleDownToNativeDecimals( - l2FactoriesDeployer.ERC2470_VALUE() + gasCost, - decimals + l2FactoriesDeployer.ERC2470_VALUE() + gasCost, decimals ); uint256 zoltuCreate2Cost = _scaleDownToNativeDecimals( - l2FactoriesDeployer.ZOLTU_VALUE() + gasCost, - decimals + l2FactoriesDeployer.ZOLTU_VALUE() + gasCost, decimals ); uint256 erc1820Cost = _scaleDownToNativeDecimals( - l2FactoriesDeployer.ERC1820_VALUE() + gasCost, - decimals + l2FactoriesDeployer.ERC1820_VALUE() + gasCost, decimals ); totalFeeNativeDenominated = - nickCreate2Cost + - erc2470Cost + - zoltuCreate2Cost + - erc1820Cost; + nickCreate2Cost + erc2470Cost + zoltuCreate2Cost + erc1820Cost; } else if (decimals > 18) { - totalFeeNativeDenominated = totalFee * (10**(decimals - 18)); + totalFeeNativeDenominated = totalFee * (10 ** (decimals - 18)); } IERC20(_nativeToken).safeTransferFrom(msg.sender, _inbox, totalFeeNativeDenominated); @@ -316,16 +330,15 @@ contract RollupCreator is Ownable { } } - function _scaleDownToNativeDecimals(uint256 amount, uint8 decimals) - internal - pure - returns (uint256) - { + function _scaleDownToNativeDecimals( + uint256 amount, + uint8 decimals + ) internal pure returns (uint256) { uint256 scaledAmount = amount; if (decimals < 18) { - scaledAmount = amount / (10**(18 - decimals)); + scaledAmount = amount / (10 ** (18 - decimals)); // round up if necessary - if (scaledAmount * (10**(18 - decimals)) < amount) { + if (scaledAmount * (10 ** (18 - decimals)) < amount) { scaledAmount++; } } diff --git a/src/rollup/RollupEventInbox.sol b/src/rollup/RollupEventInbox.sol index 071281e8..24fb1d36 100644 --- a/src/rollup/RollupEventInbox.sol +++ b/src/rollup/RollupEventInbox.sol @@ -6,6 +6,7 @@ pragma solidity ^0.8.0; import "./AbsRollupEventInbox.sol"; import "../bridge/IEthBridge.sol"; +import {INITIALIZATION_MSG_TYPE} from "../libraries/MessageTypes.sol"; /** * @title The inbox for rollup protocol events @@ -13,13 +14,12 @@ import "../bridge/IEthBridge.sol"; contract RollupEventInbox is AbsRollupEventInbox { constructor() AbsRollupEventInbox() {} - function _enqueueInitializationMsg(bytes memory initMsg) internal override returns (uint256) { - return - IEthBridge(address(bridge)).enqueueDelayedMessage( - INITIALIZATION_MSG_TYPE, - address(0), - keccak256(initMsg) - ); + function _enqueueInitializationMsg( + bytes memory initMsg + ) internal override returns (uint256) { + return IEthBridge(address(bridge)).enqueueDelayedMessage( + INITIALIZATION_MSG_TYPE, address(0), keccak256(initMsg) + ); } function _currentDataCostToReport() internal view override returns (uint256) { diff --git a/src/rollup/RollupLib.sol b/src/rollup/RollupLib.sol index f5da2312..e552477a 100644 --- a/src/rollup/RollupLib.sol +++ b/src/rollup/RollupLib.sol @@ -4,110 +4,74 @@ pragma solidity ^0.8.0; -import "../challenge/IChallengeManager.sol"; -import "../challenge/ChallengeLib.sol"; import "../state/GlobalState.sol"; import "../bridge/ISequencerInbox.sol"; import "../bridge/IBridge.sol"; import "../bridge/IOutbox.sol"; import "../bridge/IInboxBase.sol"; -import "./Node.sol"; +import "./Assertion.sol"; import "./IRollupEventInbox.sol"; +import "../challengeV2/EdgeChallengeManager.sol"; library RollupLib { using GlobalStateLib for GlobalState; + using AssertionStateLib for AssertionState; - function stateHash(ExecutionState calldata execState, uint256 inboxMaxCount) - internal - pure - returns (bytes32) - { - return - keccak256( - abi.encodePacked( - execState.globalState.hash(), - inboxMaxCount, - execState.machineStatus - ) - ); - } - - /// @dev same as stateHash but expects execState in memory instead of calldata - function stateHashMem(ExecutionState memory execState, uint256 inboxMaxCount) - internal - pure - returns (bytes32) - { - return - keccak256( - abi.encodePacked( - execState.globalState.hash(), - inboxMaxCount, - execState.machineStatus - ) - ); - } - - function executionHash(Assertion memory assertion) internal pure returns (bytes32) { - MachineStatus[2] memory statuses; - statuses[0] = assertion.beforeState.machineStatus; - statuses[1] = assertion.afterState.machineStatus; - GlobalState[2] memory globalStates; - globalStates[0] = assertion.beforeState.globalState; - globalStates[1] = assertion.afterState.globalState; - // TODO: benchmark how much this abstraction adds of gas overhead - return executionHash(statuses, globalStates, assertion.numBlocks); - } - - function executionHash( - MachineStatus[2] memory statuses, - GlobalState[2] memory globalStates, - uint64 numBlocks + // The `assertionHash` contains all the information needed to determine an assertion's validity. + // This helps protect validators against reorgs by letting them bind their assertion to the current chain state. + function assertionHash( + bytes32 parentAssertionHash, + AssertionState memory afterState, + bytes32 inboxAcc ) internal pure returns (bytes32) { - bytes32[] memory segments = new bytes32[](2); - segments[0] = ChallengeLib.blockStateHash(statuses[0], globalStates[0].hash()); - segments[1] = ChallengeLib.blockStateHash(statuses[1], globalStates[1].hash()); - return ChallengeLib.hashChallengeState(0, numBlocks, segments); + // we can no longer have `hasSibling` in the assertion hash as it would allow identical assertions + return assertionHash(parentAssertionHash, afterState.hash(), inboxAcc); } - function challengeRootHash( - bytes32 execution, - uint256 proposedTime, - bytes32 wasmModuleRoot + // Takes in a hash of the afterState instead of the afterState itself + function assertionHash( + bytes32 parentAssertionHash, + bytes32 afterStateHash, + bytes32 inboxAcc ) internal pure returns (bytes32) { - return keccak256(abi.encodePacked(execution, proposedTime, wasmModuleRoot)); - } - - function confirmHash(Assertion memory assertion) internal pure returns (bytes32) { - return - confirmHash( - assertion.afterState.globalState.getBlockHash(), - assertion.afterState.globalState.getSendRoot() - ); + // we can no longer have `hasSibling` in the assertion hash as it would allow identical assertions + return keccak256(abi.encodePacked(parentAssertionHash, afterStateHash, inboxAcc)); } - function confirmHash(bytes32 blockHash, bytes32 sendRoot) internal pure returns (bytes32) { - return keccak256(abi.encodePacked(blockHash, sendRoot)); + // All these should be emited in AssertionCreated event + function configHash( + bytes32 wasmModuleRoot, + uint256 requiredStake, + address challengeManager, + uint64 confirmPeriodBlocks, + uint64 nextInboxPosition + ) internal pure returns (bytes32) { + return keccak256( + abi.encodePacked( + wasmModuleRoot, + requiredStake, + challengeManager, + confirmPeriodBlocks, + nextInboxPosition + ) + ); } - function nodeHash( - bool hasSibling, - bytes32 lastHash, - bytes32 assertionExecHash, - bytes32 inboxAcc, - bytes32 wasmModuleRoot - ) internal pure returns (bytes32) { - uint8 hasSiblingInt = hasSibling ? 1 : 0; - return - keccak256( - abi.encodePacked( - hasSiblingInt, - lastHash, - assertionExecHash, - inboxAcc, - wasmModuleRoot - ) - ); + function validateConfigHash( + ConfigData calldata configData, + bytes32 _configHash + ) internal pure { + require( + _configHash + == configHash( + configData.wasmModuleRoot, + configData.requiredStake, + configData.challengeManager, + configData.confirmPeriodBlocks, + configData.nextInboxPosition + ), + "CONFIG_HASH_MISMATCH" + ); } } diff --git a/src/rollup/RollupProxy.sol b/src/rollup/RollupProxy.sol index 2938a585..748daa64 100644 --- a/src/rollup/RollupProxy.sol +++ b/src/rollup/RollupProxy.sol @@ -9,23 +9,19 @@ import "./IRollupAdmin.sol"; import "./Config.sol"; contract RollupProxy is AdminFallbackProxy { - function initializeProxy(Config memory config, ContractDependencies memory connectedContracts) - external - { + function initializeProxy( + Config memory config, + ContractDependencies memory connectedContracts + ) external { if ( - _getAdmin() == address(0) && - _getImplementation() == address(0) && - _getSecondaryImplementation() == address(0) + _getAdmin() == address(0) && _getImplementation() == address(0) + && _getSecondaryImplementation() == address(0) ) { _initialize( address(connectedContracts.rollupAdminLogic), - abi.encodeWithSelector( - IRollupAdmin.initialize.selector, - config, - connectedContracts - ), + abi.encodeCall(IRollupAdmin.initialize, (config, connectedContracts)), address(connectedContracts.rollupUserLogic), - abi.encodeWithSelector(IRollupUserAbs.initialize.selector, config.stakeToken), + abi.encodeCall(IRollupUser.initialize, (config.stakeToken)), config.owner ); } else { diff --git a/src/rollup/RollupUserLogic.sol b/src/rollup/RollupUserLogic.sol index 95df077b..73e758b7 100644 --- a/src/rollup/RollupUserLogic.sol +++ b/src/rollup/RollupUserLogic.sol @@ -4,32 +4,32 @@ pragma solidity ^0.8.0; -import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IRollupUser} from "./IRollupLogic.sol"; import "../libraries/UUPSNotUpgradeable.sol"; import "./RollupCore.sol"; import "./IRollupLogic.sol"; -import {ETH_POS_BLOCK_TIME} from "../libraries/Constants.sol"; - -abstract contract AbsRollupUserLogic is - RollupCore, - UUPSNotUpgradeable, - IRollupUserAbs, - IChallengeResultReceiver -{ - using NodeLib for Node; +contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { + using AssertionNodeLib for AssertionNode; using GlobalStateLib for GlobalState; + using SafeERC20 for IERC20; + using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; - modifier onlyValidator() { - require(isValidator[msg.sender] || validatorWhitelistDisabled, "NOT_VALIDATOR"); + modifier onlyValidator( + address account + ) { + require(validators.contains(account) || validatorWhitelistDisabled, "NOT_VALIDATOR"); _; } - modifier whenNotPausedOrDeprecated() { - require(!paused() || address(bridge.rollup()) != address(this), "PAUSED_AND_ACTIVE"); - _; + /// @dev the user logic just validated configuration and shouldn't write to state during init + /// this allows the admin logic to ensure consistency on parameters. + function initialize( + address _stakeToken + ) external view override onlyProxy { + require(_stakeToken != address(0), "NEED_STAKE_TOKEN"); } uint256 internal immutable deployTimeChainId = block.chainid; @@ -38,19 +38,17 @@ abstract contract AbsRollupUserLogic is return deployTimeChainId != block.chainid; } - /** - * @notice Extra number of blocks the validator can remain inactive before considered inactive - * This is 7 days assuming a 13.2 seconds block time - */ - uint256 public constant VALIDATOR_AFK_BLOCKS = 45818; - function _validatorIsAfk() internal view returns (bool) { - Node memory latestNode = getNodeStorage(latestNodeCreated()); - if (latestNode.createdAtBlock == 0) return false; - if (latestNode.createdAtBlock + confirmPeriodBlocks + VALIDATOR_AFK_BLOCKS < block.number) { - return true; + AssertionNode memory latestConfirmedAssertion = getAssertionStorage(latestConfirmed()); + uint256 _validatorAfkBlocks = validatorAfkBlocks; // cache and cast to uint256 to prevent overflow + if (_validatorAfkBlocks == 0) return false; + if (latestConfirmedAssertion.createdAtBlock == 0) return false; + // We consider the validator is gone if the last known assertion is older than VALIDATOR_AFK_BLOCKS + // Which is either the latest confirmed assertion or the first child of the latest confirmed assertion + if (latestConfirmedAssertion.firstChildBlock > 0) { + return latestConfirmedAssertion.firstChildBlock + _validatorAfkBlocks < block.number; } - return false; + return latestConfirmedAssertion.createdAtBlock + _validatorAfkBlocks < block.number; } function removeWhitelistAfterFork() external { @@ -59,711 +57,354 @@ abstract contract AbsRollupUserLogic is validatorWhitelistDisabled = true; } + /** + * @notice Remove the whitelist after the validator has been inactive for too long + */ function removeWhitelistAfterValidatorAfk() external { require(!validatorWhitelistDisabled, "WHITELIST_DISABLED"); require(_validatorIsAfk(), "VALIDATOR_NOT_AFK"); validatorWhitelistDisabled = true; } - function isERC20Enabled() public view override returns (bool) { - return stakeToken != address(0); - } - /** - * @notice Reject the next unresolved node - * @param stakerAddress Example staker staked on sibling, used to prove a node is on an unconfirmable branch and can be rejected + * @notice Confirm a unresolved assertion + * @param confirmState The state to confirm + * @param winningEdgeId The winning edge if a challenge is started */ - function rejectNextNode(address stakerAddress) external onlyValidator whenNotPaused { - requireUnresolvedExists(); - uint64 latestConfirmedNodeNum = latestConfirmed(); - uint64 firstUnresolvedNodeNum = firstUnresolvedNode(); - Node storage firstUnresolvedNode_ = getNodeStorage(firstUnresolvedNodeNum); - - if (firstUnresolvedNode_.prevNum == latestConfirmedNodeNum) { - /**If the first unresolved node is a child of the latest confirmed node, to prove it can be rejected, we show: - * a) Its deadline has expired - * b) *Some* staker is staked on a sibling - - * The following three checks are sufficient to prove b: - */ - - // 1. StakerAddress is indeed a staker - require(isStakedOnLatestConfirmed(stakerAddress), "NOT_STAKED"); - - // 2. Staker's latest staked node hasn't been resolved; this proves that staker's latest staked node can't be a parent of firstUnresolvedNode - requireUnresolved(latestStakedNode(stakerAddress)); - - // 3. staker isn't staked on first unresolved node; this proves staker's latest staked can't be a child of firstUnresolvedNode (recall staking on node requires staking on all of its parents) - require(!nodeHasStaker(firstUnresolvedNodeNum, stakerAddress), "STAKED_ON_TARGET"); - // If a staker is staked on a node that is neither a child nor a parent of firstUnresolvedNode, it must be a sibling, QED - - // Verify the block's deadline has passed - firstUnresolvedNode_.requirePastDeadline(); - - getNodeStorage(latestConfirmedNodeNum).requirePastChildConfirmDeadline(); - - removeOldZombies(0); + function confirmAssertion( + bytes32 assertionHash, + bytes32 prevAssertionHash, + AssertionState calldata confirmState, + bytes32 winningEdgeId, + ConfigData calldata prevConfig, + bytes32 inboxAcc + ) external onlyValidator(msg.sender) whenNotPaused { + /* + * To confirm an assertion, the following must be true: + * 1. The assertion must be pending + * 2. The assertion's deadline must have passed + * 3. The assertion's prev must be latest confirmed + * 4. The assertion's prev's child confirm deadline must have passed + * 5. If the assertion's prev has more than 1 child, the assertion must be the winner of the challenge + * + * Note that we do not need to ever reject invalid assertion because they can never confirm + * and the stake on them is swept to the loserStakeEscrow as soon as the leaf is created + */ + + // The assertion's must exists and be pending and will be validated in RollupCore.confirmAssertionInternal + AssertionNode storage assertion = getAssertionStorage(assertionHash); + + // prevAssertionHash is user supplied, but will be validated in RollupCore.confirmAssertionInternal + AssertionNode storage prevAssertion = getAssertionStorage(prevAssertionHash); + RollupLib.validateConfigHash(prevConfig, prevAssertion.configHash); + + // Check that deadline has passed + require( + block.number >= assertion.createdAtBlock + prevConfig.confirmPeriodBlocks, + "BEFORE_DEADLINE" + ); - // Verify that no staker is staked on this node + // Check that prev is latest confirmed + require(prevAssertionHash == latestConfirmed(), "PREV_NOT_LATEST_CONFIRMED"); + + if (prevAssertion.secondChildBlock > 0) { + // if the prev has more than 1 child, check if this assertion is the challenge winner + ChallengeEdge memory winningEdge = + IEdgeChallengeManager(prevConfig.challengeManager).getEdge(winningEdgeId); + require(winningEdge.claimId == assertionHash, "NOT_WINNER"); + require(winningEdge.status == EdgeStatus.Confirmed, "EDGE_NOT_CONFIRMED"); + require(winningEdge.confirmedAtBlock != 0, "ZERO_CONFIRMED_AT_BLOCK"); + // an additional number of blocks is added to ensure that the result of the challenge is widely + // observable before it causes an assertion to be confirmed. After a winning edge is found, it will + // always be challengeGracePeriodBlocks before an assertion can be confirmed require( - firstUnresolvedNode_.stakerCount == countStakedZombies(firstUnresolvedNodeNum), - "HAS_STAKERS" + block.number >= winningEdge.confirmedAtBlock + challengeGracePeriodBlocks, + "CHALLENGE_GRACE_PERIOD_NOT_PASSED" ); } - // Simpler case: if the first unreseolved node doesn't point to the last confirmed node, another branch was confirmed and can simply reject it outright - _rejectNextNode(); - - emit NodeRejected(firstUnresolvedNodeNum); - } - - function _confirmNextNode( - bytes32 blockHash, - bytes32 sendRoot, - bool isFastConfirm - ) internal whenNotPaused { - requireUnresolvedExists(); - - uint64 nodeNum = firstUnresolvedNode(); - Node storage node = getNodeStorage(nodeNum); - - if (!isFastConfirm) { - // Verify the block's deadline has passed - node.requirePastDeadline(); - } - - // Check that prev is latest confirmed - assert(node.prevNum == latestConfirmed()); - - Node storage prevNode = getNodeStorage(node.prevNum); - if (!isFastConfirm) { - prevNode.requirePastChildConfirmDeadline(); - } - removeOldZombies(0); - - // Require only zombies are staked on siblings to this node, and there's at least one non-zombie staked on this node - uint256 stakedZombies = countStakedZombies(nodeNum); - uint256 zombiesStakedOnOtherChildren = countZombiesStakedOnChildren(node.prevNum) - - stakedZombies; - require(node.stakerCount > stakedZombies, "NO_STAKERS"); - require( - prevNode.childStakerCount == node.stakerCount + zombiesStakedOnOtherChildren, - "NOT_ALL_STAKED" - ); - - confirmNode(nodeNum, blockHash, sendRoot); - } - - /** - * @notice Confirm the next unresolved node - * @param blockHash The block hash at the end of the assertion - * @param sendRoot The send root at the end of the assertion - */ - function confirmNextNode(bytes32 blockHash, bytes32 sendRoot) external onlyValidator { - _confirmNextNode(blockHash, sendRoot, false); - } - - /** - * @notice This allow anyTrustFastConfirmer to confirm next node regardless of deadline - * the anyTrustFastConfirmer is supposed to be set only on an AnyTrust chain to - * a contract that can call this function when received sufficient signatures - * node hash must be match the node to be confirmed to protect against reorgs - */ - function fastConfirmNextNode( - bytes32 blockHash, - bytes32 sendRoot, - bytes32 nodeHash - ) external { - require(msg.sender == anyTrustFastConfirmer, "NFC"); - require(nodeHash == getNodeStorage(firstUnresolvedNode()).nodeHash, "WH"); - _confirmNextNode(blockHash, sendRoot, true); + confirmAssertionInternal(assertionHash, prevAssertionHash, confirmState, inboxAcc); } /** * @notice Create a new stake * @param depositAmount The amount of either eth or tokens staked + * @param _withdrawalAddress The new staker's withdrawal address */ - function _newStake(uint256 depositAmount) internal onlyValidator whenNotPaused { + function _newStake( + uint256 depositAmount, + address _withdrawalAddress + ) internal onlyValidator(msg.sender) whenNotPaused { // Verify that sender is not already a staker require(!isStaked(msg.sender), "ALREADY_STAKED"); - require(!isZombie(msg.sender), "STAKER_IS_ZOMBIE"); - require(depositAmount >= currentRequiredStake(), "NOT_ENOUGH_STAKE"); - - createNewStake(msg.sender, depositAmount); + // amount will be checked when creating an assertion + createNewStake(msg.sender, depositAmount, _withdrawalAddress); } /** - * @notice Move stake onto existing child node - * @param nodeNum Index of the node to move stake to. This must by a child of the node the staker is currently staked on - * @param nodeHash Node hash of nodeNum (protects against reorgs) + * @notice Computes the hash of an assertion + * @param state The execution state for the assertion + * @param prevAssertionHash The hash of the assertion's parent + * @param inboxAcc The inbox batch accumulator */ - function stakeOnExistingNode(uint64 nodeNum, bytes32 nodeHash) - public - onlyValidator - whenNotPaused - { - require(isStakedOnLatestConfirmed(msg.sender), "NOT_STAKED"); - - require( - nodeNum >= firstUnresolvedNode() && nodeNum <= latestNodeCreated(), - "NODE_NUM_OUT_OF_RANGE" - ); - Node storage node = getNodeStorage(nodeNum); - require(node.nodeHash == nodeHash, "NODE_REORG"); - require(latestStakedNode(msg.sender) == node.prevNum, "NOT_STAKED_PREV"); - stakeOnNode(msg.sender, nodeNum); + function computeAssertionHash( + bytes32 prevAssertionHash, + AssertionState calldata state, + bytes32 inboxAcc + ) external pure returns (bytes32) { + return RollupLib.assertionHash(prevAssertionHash, state, inboxAcc); } /** - * @notice Create a new node and move stake onto it + * @notice Create a new assertion and move stake onto it * @param assertion The assertion data - * @param expectedNodeHash The hash of the node being created (protects against reorgs) - */ - function stakeOnNewNode( - Assertion calldata assertion, - bytes32 expectedNodeHash, - uint256 prevNodeInboxMaxCount - ) public onlyValidator whenNotPaused { - require(isStakedOnLatestConfirmed(msg.sender), "NOT_STAKED"); - // Ensure staker is staked on the previous node - uint64 prevNode = latestStakedNode(msg.sender); - - { - uint256 timeSinceLastNode = block.number - getNode(prevNode).createdAtBlock; - // Verify that assertion meets the minimum Delta time requirement - require(timeSinceLastNode >= minimumAssertionPeriod, "TIME_DELTA"); - - // Minimum size requirement: any assertion must consume at least all inbox messages - // put into L1 inbox before the prev node’s L1 blocknum. - // We make an exception if the machine enters the errored state, - // as it can't consume future batches. - require( - assertion.afterState.machineStatus == MachineStatus.ERRORED || - assertion.afterState.globalState.getInboxPosition() >= prevNodeInboxMaxCount, - "TOO_SMALL" - ); - // Minimum size requirement: any assertion must contain at least one block - require(assertion.numBlocks > 0, "EMPTY_ASSERTION"); - - // The rollup cannot advance normally from an errored state - require( - assertion.beforeState.machineStatus == MachineStatus.FINISHED, - "BAD_PREV_STATUS" - ); - } - createNewNode(assertion, prevNode, prevNodeInboxMaxCount, expectedNodeHash); - - stakeOnNode(msg.sender, latestNodeCreated()); - } - - /** - * @notice Refund a staker that is currently staked on or before the latest confirmed node - * @dev Since a staker is initially placed in the latest confirmed node, if they don't move it - * a griefer can remove their stake. It is recomended to batch together the txs to place a stake - * and move it to the desired node. - * @param stakerAddress Address of the staker whose stake is refunded - */ - function returnOldDeposit(address stakerAddress) - external - override - onlyValidator - whenNotPausedOrDeprecated - { - require(latestStakedNode(stakerAddress) <= latestConfirmed(), "TOO_RECENT"); - requireUnchallengedStaker(stakerAddress); - withdrawStaker(stakerAddress); - } - - /** - * @notice Increase the amount staked for the given staker - * @param stakerAddress Address of the staker whose stake is increased - * @param depositAmount The amount of either eth or tokens deposited + * @param expectedAssertionHash The hash of the assertion being created (protects against reorgs) */ - function _addToDeposit(address stakerAddress, uint256 depositAmount) - internal - onlyValidator - whenNotPaused - { - requireUnchallengedStaker(stakerAddress); - increaseStakeBy(stakerAddress, depositAmount); - } + function stakeOnNewAssertion( + AssertionInputs calldata assertion, + bytes32 expectedAssertionHash + ) public onlyValidator(msg.sender) whenNotPaused { + // Early revert on duplicated assertion if expectedAssertionHash is set + require( + expectedAssertionHash == bytes32(0) + || getAssertionStorage(expectedAssertionHash).status == AssertionStatus.NoAssertion, + "EXPECTED_ASSERTION_SEEN" + ); - /** - * @notice Reduce the amount staked for the sender (difference between initial amount staked and target is creditted back to the sender). - * @param target Target amount of stake for the staker. If this is below the current minimum, it will be set to minimum instead - */ - function reduceDeposit(uint256 target) external onlyValidator whenNotPausedOrDeprecated { - requireUnchallengedStaker(msg.sender); - uint256 currentRequired = currentRequiredStake(); - if (target < currentRequired) { - target = currentRequired; - } - reduceStakeTo(msg.sender, target); - } + require(isStaked(msg.sender), "NOT_STAKED"); - /** - * @notice Start a challenge between the given stakers over the node created by the first staker assuming that the two are staked on conflicting nodes. N.B.: challenge creator does not necessarily need to be one of the two asserters. - * @param stakers Stakers engaged in the challenge. The first staker should be staked on the first node - * @param nodeNums Nodes of the stakers engaged in the challenge. The first node should be the earliest and is the one challenged - * @param machineStatuses The before and after machine status for the first assertion - * @param globalStates The before and after global state for the first assertion - * @param numBlocks The number of L2 blocks contained in the first assertion - * @param secondExecutionHash The execution hash of the second assertion - * @param proposedBlocks L1 block numbers that the two nodes were proposed at - * @param wasmModuleRoots The wasm module roots at the time of the creation of each assertion - */ - function createChallenge( - address[2] calldata stakers, - uint64[2] calldata nodeNums, - MachineStatus[2] calldata machineStatuses, - GlobalState[2] calldata globalStates, - uint64 numBlocks, - bytes32 secondExecutionHash, - uint256[2] calldata proposedBlocks, - bytes32[2] calldata wasmModuleRoots - ) external onlyValidator whenNotPaused { - require(nodeNums[0] < nodeNums[1], "WRONG_ORDER"); - require(nodeNums[1] <= latestNodeCreated(), "NOT_PROPOSED"); - require(latestConfirmed() < nodeNums[0], "ALREADY_CONFIRMED"); - - Node storage node1 = getNodeStorage(nodeNums[0]); - Node storage node2 = getNodeStorage(nodeNums[1]); - - // ensure nodes staked on the same parent (and thus in conflict) - require(node1.prevNum == node2.prevNum, "DIFF_PREV"); - - // ensure both stakers aren't currently in challenge - requireUnchallengedStaker(stakers[0]); - requireUnchallengedStaker(stakers[1]); - - require(nodeHasStaker(nodeNums[0], stakers[0]), "STAKER1_NOT_STAKED"); - require(nodeHasStaker(nodeNums[1], stakers[1]), "STAKER2_NOT_STAKED"); - - // Check param data against challenge hash + // requiredStake is user supplied, will be verified against configHash later + // the prev's requiredStake is used to make sure all children have the same stake + // the staker may have more than enough stake, and the entire stake will be locked + // we cannot do a refund here because the staker may be staker on an unconfirmed ancestor that requires more stake + // excess stake can be removed by calling reduceDeposit when the staker is inactive require( - node1.challengeHash == - RollupLib.challengeRootHash( - RollupLib.executionHash(machineStatuses, globalStates, numBlocks), - proposedBlocks[0], - wasmModuleRoots[0] - ), - "CHAL_HASH1" + amountStaked(msg.sender) >= assertion.beforeStateData.configData.requiredStake, + "INSUFFICIENT_STAKE" ); + bytes32 prevAssertion = RollupLib.assertionHash( + assertion.beforeStateData.prevPrevAssertionHash, + assertion.beforeState, + assertion.beforeStateData.sequencerBatchAcc + ); + getAssertionStorage(prevAssertion).requireExists(); + + // Staker can create new assertion only if + // a) its last staked assertion is the prev; or + // b) its last staked assertion have a child + bytes32 lastAssertion = latestStakedAssertion(msg.sender); require( - node2.challengeHash == - RollupLib.challengeRootHash( - secondExecutionHash, - proposedBlocks[1], - wasmModuleRoots[1] - ), - "CHAL_HASH2" + lastAssertion == prevAssertion || getAssertionStorage(lastAssertion).firstChildBlock > 0, + "STAKED_ON_ANOTHER_BRANCH" ); - // Calculate upper limit for allowed node proposal time: - uint256 commonEndBlock = getNodeStorage(node1.prevNum).firstChildBlock + - // Dispute start: dispute timer for a node starts when its first child is created - (node1.deadlineBlock - proposedBlocks[0]) + - extraChallengeTimeBlocks; // add dispute window to dispute start time - if (commonEndBlock < proposedBlocks[1]) { - // The 2nd node was created too late; loses challenge automatically. - completeChallengeImpl(stakers[0], stakers[1]); - return; + (bytes32 newAssertionHash, bool overflowAssertion) = + createNewAssertion(assertion, prevAssertion, expectedAssertionHash); + _stakerMap[msg.sender].latestStakedAssertion = newAssertionHash; + + if (!overflowAssertion) { + uint256 timeSincePrev = block.number - getAssertionStorage(prevAssertion).createdAtBlock; + // Verify that assertion meets the minimum Delta time requirement + require(timeSincePrev >= minimumAssertionPeriod, "TIME_DELTA"); } - // Start a challenge between staker1 and staker2. Staker1 will defend the correctness of node1, and staker2 will challenge it. - uint64 challengeIndex = createChallengeHelper( - stakers, - machineStatuses, - globalStates, - numBlocks, - wasmModuleRoots, - // convert from block counts to real second based timestamps - (commonEndBlock - proposedBlocks[0]) * ETH_POS_BLOCK_TIME, - (commonEndBlock - proposedBlocks[1]) * ETH_POS_BLOCK_TIME - ); // trusted external call - - challengeStarted(stakers[0], stakers[1], challengeIndex); - - emit RollupChallengeStarted(challengeIndex, stakers[0], stakers[1], nodeNums[0]); - } - function createChallengeHelper( - address[2] calldata stakers, - MachineStatus[2] calldata machineStatuses, - GlobalState[2] calldata globalStates, - uint64 numBlocks, - bytes32[2] calldata wasmModuleRoots, - uint256 asserterTimeLeft, - uint256 challengerTimeLeft - ) internal returns (uint64) { - return - challengeManager.createChallenge( - wasmModuleRoots[0], - machineStatuses, - globalStates, - numBlocks, - stakers[0], - stakers[1], - asserterTimeLeft, - challengerTimeLeft + if (!getAssertionStorage(newAssertionHash).isFirstChild) { + // We assume assertion.beforeStateData is valid here as it will be validated in createNewAssertion + // only 1 of the children can be confirmed and get their stake refunded + // so we send the other children's stake to the loserStakeEscrow + // NOTE: if the losing staker have staked more than requiredStake, the excess stake will be stuck + IERC20(stakeToken).safeTransfer( + loserStakeEscrow, assertion.beforeStateData.configData.requiredStake ); + } } /** - * @notice Inform the rollup that the challenge between the given stakers is completed - * @param winningStaker Address of the winning staker - * @param losingStaker Address of the losing staker + * @notice Refund a staker that is currently staked on an assertion that either has a chlid assertion or is the latest confirmed assertion. */ - function completeChallenge( - uint256 challengeIndex, - address winningStaker, - address losingStaker - ) external override whenNotPaused { - // Only the challenge manager contract can call this to declare the winner and loser - require(msg.sender == address(challengeManager), "WRONG_SENDER"); - require(challengeIndex == inChallenge(winningStaker, losingStaker), "NOT_IN_CHAL"); - completeChallengeImpl(winningStaker, losingStaker); - } - - function completeChallengeImpl(address winningStaker, address losingStaker) private { - uint256 remainingLoserStake = amountStaked(losingStaker); - uint256 winnerStake = amountStaked(winningStaker); - if (remainingLoserStake > winnerStake) { - // If loser has a higher stake than the winner, refund the difference - remainingLoserStake -= reduceStakeTo(losingStaker, winnerStake); - } - - // Reward the winner with half the remaining stake - uint256 amountWon = remainingLoserStake / 2; - increaseStakeBy(winningStaker, amountWon); - remainingLoserStake -= amountWon; - // We deliberately leave loser in challenge state to prevent them from - // doing certain thing that are allowed only to parties not in a challenge - clearChallenge(winningStaker); - // Credit the other half to the loserStakeEscrow address - increaseWithdrawableFunds(loserStakeEscrow, remainingLoserStake); - // Turning loser into zombie renders the loser's remaining stake inaccessible - turnIntoZombie(losingStaker); + function returnOldDeposit() external override onlyValidator(msg.sender) whenNotPaused { + _requireInactiveAndWithdrawStaker(msg.sender); } /** - * @notice Remove the given zombie from nodes it is staked on, moving backwords from the latest node it is staked on - * @param zombieNum Index of the zombie to remove - * @param maxNodes Maximum number of nodes to remove the zombie from (to limit the cost of this transaction) + * @notice From the staker's withdrawal address, + * refund a staker that is currently staked on an assertion that either has a chlid assertion or is the latest confirmed assertion. */ - function removeZombie(uint256 zombieNum, uint256 maxNodes) - external - onlyValidator - whenNotPaused - { - require(zombieNum < zombieCount(), "NO_SUCH_ZOMBIE"); - address zombieStakerAddress = zombieAddress(zombieNum); - uint64 latestNodeStaked = zombieLatestStakedNode(zombieNum); - uint256 nodesRemoved = 0; - uint256 latestConfirmedNum = latestConfirmed(); - while (latestNodeStaked >= latestConfirmedNum && nodesRemoved < maxNodes) { - Node storage node = getNodeStorage(latestNodeStaked); - removeStaker(latestNodeStaked, zombieStakerAddress); - latestNodeStaked = node.prevNum; - nodesRemoved++; - } - if (latestNodeStaked < latestConfirmedNum) { - removeZombie(zombieNum); - } else { - zombieUpdateLatestStakedNode(zombieNum, latestNodeStaked); - } + function returnOldDepositFor( + address stakerAddress + ) external override onlyValidator(stakerAddress) whenNotPaused { + require(msg.sender == withdrawalAddress(stakerAddress), "NOT_WITHDRAWAL_ADDRESS"); + _requireInactiveAndWithdrawStaker(stakerAddress); } /** - * @notice Remove any zombies whose latest stake is earlier than the latest confirmed node - * @param startIndex Index in the zombie list to start removing zombies from (to limit the cost of this transaction) + * @dev Require that the staker is inactive and withdraw their stake */ - function removeOldZombies(uint256 startIndex) public onlyValidator whenNotPaused { - uint256 currentZombieCount = zombieCount(); - uint256 latestConfirmedNum = latestConfirmed(); - for (uint256 i = startIndex; i < currentZombieCount; i++) { - while (zombieLatestStakedNode(i) < latestConfirmedNum) { - removeZombie(i); - currentZombieCount--; - if (i >= currentZombieCount) { - return; - } - } - } + function _requireInactiveAndWithdrawStaker( + address stakerAddress + ) internal { + requireInactiveStaker(stakerAddress); + withdrawStaker(stakerAddress); } /** - * @notice Calculate the current amount of funds required to place a new stake in the rollup - * @dev If the stake requirement get's too high, this function may start reverting due to overflow, but - * that only blocks operations that should be blocked anyway - * @return The current minimum stake requirement + * @notice Increase the amount staked for the given staker + * @param stakerAddress Address of the staker whose stake is increased + * @param depositAmount The amount of either eth or tokens deposited */ - function currentRequiredStake( - uint256 _blockNumber, - uint64 _firstUnresolvedNodeNum, - uint256 _latestCreatedNode - ) internal view returns (uint256) { - // If there are no unresolved nodes, then you can use the base stake - if (_firstUnresolvedNodeNum - 1 == _latestCreatedNode) { - return baseStake; - } - uint256 firstUnresolvedDeadline = getNodeStorage(_firstUnresolvedNodeNum).deadlineBlock; - if (_blockNumber < firstUnresolvedDeadline) { - return baseStake; - } - uint24[10] memory numerators = [ - 1, - 122971, - 128977, - 80017, - 207329, - 114243, - 314252, - 129988, - 224562, - 162163 - ]; - uint24[10] memory denominators = [ - 1, - 114736, - 112281, - 64994, - 157126, - 80782, - 207329, - 80017, - 128977, - 86901 - ]; - uint256 firstUnresolvedAge = _blockNumber - firstUnresolvedDeadline; - uint256 periodsPassed = (firstUnresolvedAge * 10) / confirmPeriodBlocks; - uint256 baseMultiplier = 2**(periodsPassed / 10); - uint256 withNumerator = baseMultiplier * numerators[periodsPassed % 10]; - uint256 multiplier = withNumerator / denominators[periodsPassed % 10]; - if (multiplier == 0) { - multiplier = 1; - } - return baseStake * multiplier; + function _addToDeposit( + address stakerAddress, + address expectedWithdrawalAddress, + uint256 depositAmount + ) internal onlyValidator(stakerAddress) whenNotPaused { + require(isStaked(stakerAddress), "NOT_STAKED"); + require( + withdrawalAddress(stakerAddress) == expectedWithdrawalAddress, + "WRONG_WITHDRAWAL_ADDRESS" + ); + increaseStakeBy(stakerAddress, depositAmount); } /** - * @notice Calculate the current amount of funds required to place a new stake in the rollup - * @dev If the stake requirement get's too high, this function may start reverting due to overflow, but - * that only blocks operations that should be blocked anyway - * @return The current minimum stake requirement + * @notice Reduce the amount staked for the sender (difference between initial amount staked and target is creditted back to the sender). + * @param target Target amount of stake for the staker. */ - function requiredStake( - uint256 blockNumber, - uint64 firstUnresolvedNodeNum, - uint64 latestCreatedNode - ) external view returns (uint256) { - return currentRequiredStake(blockNumber, firstUnresolvedNodeNum, latestCreatedNode); - } - - function owner() external view returns (address) { - return _getAdmin(); - } - - function currentRequiredStake() public view returns (uint256) { - uint64 firstUnresolvedNodeNum = firstUnresolvedNode(); - - return currentRequiredStake(block.number, firstUnresolvedNodeNum, latestNodeCreated()); + function reduceDeposit( + uint256 target + ) external onlyValidator(msg.sender) whenNotPaused { + requireInactiveStaker(msg.sender); + // amount will be checked when creating an assertion + reduceStakeTo(msg.sender, target); } /** - * @notice Calculate the number of zombies staked on the given node - * - * @dev This function could be uncallable if there are too many zombies. However, - * removeZombie and removeOldZombies can be used to remove any zombies that exist - * so that this will then be callable - * - * @param nodeNum The node on which to count staked zombies - * @return The number of zombies staked on the node + * @notice This allow the anyTrustFastConfirmer to force confirm any pending assertion + * the anyTrustFastConfirmer is supposed to be set only on an AnyTrust chain to + * a contract that can call this function when received sufficient signatures */ - function countStakedZombies(uint64 nodeNum) public view override returns (uint256) { - uint256 currentZombieCount = zombieCount(); - uint256 stakedZombieCount = 0; - for (uint256 i = 0; i < currentZombieCount; i++) { - if (nodeHasStaker(nodeNum, zombieAddress(i))) { - stakedZombieCount++; - } - } - return stakedZombieCount; + function fastConfirmAssertion( + bytes32 assertionHash, + bytes32 parentAssertionHash, + AssertionState calldata confirmState, + bytes32 inboxAcc + ) public whenNotPaused { + require(msg.sender == anyTrustFastConfirmer, "NOT_FAST_CONFIRMER"); + // this skip deadline, prev, challenge validations + confirmAssertionInternal(assertionHash, parentAssertionHash, confirmState, inboxAcc); } /** - * @notice Calculate the number of zombies staked on a child of the given node - * - * @dev This function could be uncallable if there are too many zombies. However, - * removeZombie and removeOldZombies can be used to remove any zombies that exist - * so that this will then be callable + * @notice This allow the anyTrustFastConfirmer to immediately create and confirm an assertion + * the anyTrustFastConfirmer is supposed to be set only on an AnyTrust chain to + * a contract that can call this function when received sufficient signatures + * The logic in this function is similar to stakeOnNewAssertion, but without staker checks * - * @param nodeNum The parent node on which to count zombies staked on children - * @return The number of zombies staked on children of the node + * We trust the anyTrustFastConfirmer to not call this function multiple times on the same prev, + * as doing so would result in incorrect accounting of withdrawable funds in the loserStakeEscrow. + * This is because the protocol assume there is only 1 unique confirmable child assertion. */ - function countZombiesStakedOnChildren(uint64 nodeNum) public view override returns (uint256) { - uint256 currentZombieCount = zombieCount(); - uint256 stakedZombieCount = 0; - for (uint256 i = 0; i < currentZombieCount; i++) { - Zombie storage zombie = getZombieStorage(i); - // If this zombie is staked on this node, but its _latest_ staked node isn't this node, - // then it must be staked on a child of this node. - if ( - zombie.latestStakedNode != nodeNum && nodeHasStaker(nodeNum, zombie.stakerAddress) - ) { - stakedZombieCount++; + function fastConfirmNewAssertion( + AssertionInputs calldata assertion, + bytes32 expectedAssertionHash + ) external whenNotPaused { + // Must supply expectedAssertionHash to fastConfirmNewAssertion + require(expectedAssertionHash != bytes32(0), "EXPECTED_ASSERTION_HASH"); + AssertionStatus status = getAssertionStorage(expectedAssertionHash).status; + + bytes32 prevAssertion = RollupLib.assertionHash( + assertion.beforeStateData.prevPrevAssertionHash, + assertion.beforeState, + assertion.beforeStateData.sequencerBatchAcc + ); + getAssertionStorage(prevAssertion).requireExists(); + + if (status == AssertionStatus.NoAssertion) { + // If not exists, we create the new assertion + (bytes32 newAssertionHash,) = + createNewAssertion(assertion, prevAssertion, expectedAssertionHash); + if (!getAssertionStorage(newAssertionHash).isFirstChild) { + // only 1 of the children can be confirmed and get their stake refunded + // so we send the other children's stake to the loserStakeEscrow + // NOTE: if the losing staker have staked more than requiredStake, the excess stake will be stuck + IERC20(stakeToken).safeTransfer( + loserStakeEscrow, assertion.beforeStateData.configData.requiredStake + ); } } - return stakedZombieCount; - } - /** - * @notice Verify that there are some number of nodes still unresolved - */ - function requireUnresolvedExists() public view override { - uint256 firstUnresolved = firstUnresolvedNode(); - require( - firstUnresolved > latestConfirmed() && firstUnresolved <= latestNodeCreated(), - "NO_UNRESOLVED" + // This would revert if the assertion is already confirmed + fastConfirmAssertion( + expectedAssertionHash, + prevAssertion, + assertion.afterState, + bridge.sequencerInboxAccs(assertion.afterState.globalState.getInboxPosition() - 1) ); } - function requireUnresolved(uint256 nodeNum) public view override { - require(nodeNum >= firstUnresolvedNode(), "ALREADY_DECIDED"); - require(nodeNum <= latestNodeCreated(), "DOESNT_EXIST"); - } - - /** - * @notice Verify that the given address is staked and not actively in a challenge - * @param stakerAddress Address to check - */ - function requireUnchallengedStaker(address stakerAddress) private view { - require(isStaked(stakerAddress), "NOT_STAKED"); - require(currentChallenge(stakerAddress) == NO_CHAL_INDEX, "IN_CHAL"); - } -} - -contract RollupUserLogic is AbsRollupUserLogic, IRollupUser { - /// @dev the user logic just validated configuration and shouldn't write to state during init - /// this allows the admin logic to ensure consistency on parameters. - function initialize(address _stakeToken) external view override onlyProxy { - require(_stakeToken == address(0), "NO_TOKEN_ALLOWED"); - require(!isERC20Enabled(), "FACET_NOT_ERC20"); - } - - /** - * @notice Create a new stake on an existing node - * @param nodeNum Number of the node your stake will be place one - * @param nodeHash Node hash of the node with the given nodeNum - */ - function newStakeOnExistingNode(uint64 nodeNum, bytes32 nodeHash) external payable override { - _newStake(msg.value); - stakeOnExistingNode(nodeNum, nodeHash); - } - - /** - * @notice Create a new stake on a new node - * @param assertion Assertion describing the state change between the old node and the new one - * @param expectedNodeHash Node hash of the node that will be created - * @param prevNodeInboxMaxCount Total of messages in the inbox as of the previous node - */ - function newStakeOnNewNode( - Assertion calldata assertion, - bytes32 expectedNodeHash, - uint256 prevNodeInboxMaxCount - ) external payable override { - _newStake(msg.value); - stakeOnNewNode(assertion, expectedNodeHash, prevNodeInboxMaxCount); - } - - /** - * @notice Increase the amount staked eth for the given staker - * @param stakerAddress Address of the staker whose stake is increased - */ - function addToDeposit(address stakerAddress) - external - payable - override - onlyValidator - whenNotPaused - { - _addToDeposit(stakerAddress, msg.value); + function owner() external view returns (address) { + return _getAdmin(); } /** - * @notice Withdraw uncommitted funds owned by sender from the rollup chain + * @notice Deprecated, use the function with `withdrawalAddress` instead + * Using this default `withdrawalAddress` to msg.sender */ - function withdrawStakerFunds() - external - override - onlyValidator - whenNotPausedOrDeprecated - returns (uint256) - { - uint256 amount = withdrawFunds(msg.sender); - // This is safe because it occurs after all checks and effects - // solhint-disable-next-line avoid-low-level-calls - (bool success, ) = msg.sender.call{value: amount}(""); - require(success, "TRANSFER_FAILED"); - return amount; - } -} - -contract ERC20RollupUserLogic is AbsRollupUserLogic, IRollupUserERC20 { - /// @dev the user logic just validated configuration and shouldn't write to state during init - /// this allows the admin logic to ensure consistency on parameters. - function initialize(address _stakeToken) external view override onlyProxy { - require(_stakeToken != address(0), "NEED_STAKE_TOKEN"); - require(isERC20Enabled(), "FACET_NOT_ERC20"); + function newStakeOnNewAssertion( + uint256 tokenAmount, + AssertionInputs calldata assertion, + bytes32 expectedAssertionHash + ) external { + newStakeOnNewAssertion(tokenAmount, assertion, expectedAssertionHash, msg.sender); } /** - * @notice Create a new stake on an existing node + * @notice Create a new stake on a new assertion * @param tokenAmount Amount of the rollups staking token to stake - * @param nodeNum Number of the node your stake will be place one - * @param nodeHash Node hash of the node with the given nodeNum + * @param assertion Assertion describing the state change between the old assertion and the new one + * @param expectedAssertionHash Assertion hash of the assertion that will be created + * @param _withdrawalAddress The address the send the stake back upon withdrawal */ - function newStakeOnExistingNode( + function newStakeOnNewAssertion( uint256 tokenAmount, - uint64 nodeNum, - bytes32 nodeHash - ) external override { - _newStake(tokenAmount); - stakeOnExistingNode(nodeNum, nodeHash); + AssertionInputs calldata assertion, + bytes32 expectedAssertionHash, + address _withdrawalAddress + ) public { + require(_withdrawalAddress != address(0), "EMPTY_WITHDRAWAL_ADDRESS"); + // _newStake makes sure the validator is whitelisted if the whitelist is enabled + _newStake(tokenAmount, _withdrawalAddress); + stakeOnNewAssertion(assertion, expectedAssertionHash); /// @dev This is an external call, safe because it's at the end of the function receiveTokens(tokenAmount); } /** - * @notice Create a new stake on a new node - * @param tokenAmount Amount of the rollups staking token to stake - * @param assertion Assertion describing the state change between the old node and the new one - * @param expectedNodeHash Node hash of the node that will be created - * @param prevNodeInboxMaxCount Total of messages in the inbox as of the previous node + * @notice Create a new stake without creating a new assertion. + * Token amount can be zero if the staker wants to use `addToDeposit` from another account + * @param tokenAmount Amount to stake (can be zero) + * @param _withdrawalAddress The address the send the stake back upon withdrawal */ - function newStakeOnNewNode( - uint256 tokenAmount, - Assertion calldata assertion, - bytes32 expectedNodeHash, - uint256 prevNodeInboxMaxCount - ) external override { - _newStake(tokenAmount); - stakeOnNewNode(assertion, expectedNodeHash, prevNodeInboxMaxCount); + function newStake(uint256 tokenAmount, address _withdrawalAddress) external whenNotPaused { + require(_withdrawalAddress != address(0), "EMPTY_WITHDRAWAL_ADDRESS"); + // _newStake makes sure the validator is whitelisted if the whitelist is enabled + _newStake(tokenAmount, _withdrawalAddress); /// @dev This is an external call, safe because it's at the end of the function - receiveTokens(tokenAmount); + if (tokenAmount > 0) receiveTokens(tokenAmount); } /** * @notice Increase the amount staked tokens for the given staker * @param stakerAddress Address of the staker whose stake is increased + * @param expectedWithdrawalAddress The expected withdrawal address of the staker (protects depositor from a staker changing their withdrawal address) * @param tokenAmount the amount of tokens staked */ - function addToDeposit(address stakerAddress, uint256 tokenAmount) - external - onlyValidator - whenNotPaused - { - _addToDeposit(stakerAddress, tokenAmount); + function addToDeposit( + address stakerAddress, + address expectedWithdrawalAddress, + uint256 tokenAmount + ) external whenNotPaused { + _addToDeposit(stakerAddress, expectedWithdrawalAddress, tokenAmount); /// @dev This is an external call, safe because it's at the end of the function receiveTokens(tokenAmount); } @@ -771,23 +412,17 @@ contract ERC20RollupUserLogic is AbsRollupUserLogic, IRollupUserERC20 { /** * @notice Withdraw uncommitted funds owned by sender from the rollup chain */ - function withdrawStakerFunds() - external - override - onlyValidator - whenNotPausedOrDeprecated - returns (uint256) - { + function withdrawStakerFunds() external override whenNotPaused returns (uint256) { uint256 amount = withdrawFunds(msg.sender); + require(amount > 0, "NO_FUNDS_TO_WITHDRAW"); // This is safe because it occurs after all checks and effects - require(IERC20Upgradeable(stakeToken).transfer(msg.sender, amount), "TRANSFER_FAILED"); + IERC20(stakeToken).safeTransfer(msg.sender, amount); return amount; } - function receiveTokens(uint256 tokenAmount) private { - require( - IERC20Upgradeable(stakeToken).transferFrom(msg.sender, address(this), tokenAmount), - "TRANSFER_FAIL" - ); + function receiveTokens( + uint256 tokenAmount + ) private { + IERC20(stakeToken).safeTransferFrom(msg.sender, address(this), tokenAmount); } } diff --git a/src/rollup/ValidatorUtils.sol b/src/rollup/ValidatorUtils.sol index 75d554bb..6c284371 100644 --- a/src/rollup/ValidatorUtils.sol +++ b/src/rollup/ValidatorUtils.sol @@ -1,243 +1 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE -// SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0; - -pragma experimental ABIEncoderV2; - -import "../rollup/IRollupCore.sol"; -import "../challenge/IChallengeManager.sol"; -import "./IRollupLogic.sol"; - -import {NO_CHAL_INDEX} from "../libraries/Constants.sol"; - -contract ValidatorUtils { - using NodeLib for Node; - - enum ConfirmType { - NONE, - VALID, - INVALID - } - - enum NodeConflictType { - NONE, - FOUND, - INDETERMINATE, - INCOMPLETE - } - - struct NodeConflict { - NodeConflictType ty; - uint64 node1; - uint64 node2; - } - - function findStakerConflict( - IRollupCore rollup, - address staker1, - address staker2, - uint256 maxDepth - ) external view returns (NodeConflict memory) { - uint64 staker1NodeNum = rollup.latestStakedNode(staker1); - uint64 staker2NodeNum = rollup.latestStakedNode(staker2); - return findNodeConflict(rollup, staker1NodeNum, staker2NodeNum, maxDepth); - } - - function checkDecidableNextNode(IRollupUserAbs rollup) external view returns (ConfirmType) { - try ValidatorUtils(address(this)).requireConfirmable(rollup) { - return ConfirmType.VALID; - } catch {} - - try ValidatorUtils(address(this)).requireRejectable(rollup) { - return ConfirmType.INVALID; - } catch { - return ConfirmType.NONE; - } - } - - function requireRejectable(IRollupCore rollup) external view { - IRollupUser(address(rollup)).requireUnresolvedExists(); - uint64 firstUnresolvedNode = rollup.firstUnresolvedNode(); - Node memory node = rollup.getNode(firstUnresolvedNode); - if (node.prevNum == rollup.latestConfirmed()) { - // Verify the block's deadline has passed - require(block.number >= node.deadlineBlock, "BEFORE_DEADLINE"); - rollup.getNode(node.prevNum).requirePastChildConfirmDeadline(); - - // Verify that no staker is staked on this node - require( - node.stakerCount == - IRollupUser(address(rollup)).countStakedZombies(firstUnresolvedNode), - "HAS_STAKERS" - ); - } - } - - function requireConfirmable(IRollupUserAbs rollup) external view { - rollup.requireUnresolvedExists(); - - uint256 stakerCount = rollup.stakerCount(); - // There is at least one non-zombie staker - require(stakerCount > 0, "NO_STAKERS"); - - uint64 firstUnresolved = rollup.firstUnresolvedNode(); - Node memory node = rollup.getNode(firstUnresolved); - - // Verify the block's deadline has passed - node.requirePastDeadline(); - - // Check that prev is latest confirmed - assert(node.prevNum == rollup.latestConfirmed()); - - Node memory prevNode = rollup.getNode(node.prevNum); - prevNode.requirePastChildConfirmDeadline(); - - uint256 zombiesStakedOnOtherChildren = rollup.countZombiesStakedOnChildren(node.prevNum) - - rollup.countStakedZombies(firstUnresolved); - require( - prevNode.childStakerCount == node.stakerCount + zombiesStakedOnOtherChildren, - "NOT_ALL_STAKED" - ); - } - - function refundableStakers(IRollupCore rollup) external view returns (address[] memory) { - uint256 stakerCount = rollup.stakerCount(); - address[] memory stakers = new address[](stakerCount); - uint256 latestConfirmed = rollup.latestConfirmed(); - uint256 index = 0; - for (uint64 i = 0; i < stakerCount; i++) { - address staker = rollup.getStakerAddress(i); - uint256 latestStakedNode = rollup.latestStakedNode(staker); - if (latestStakedNode <= latestConfirmed && rollup.currentChallenge(staker) == 0) { - stakers[index] = staker; - index++; - } - } - assembly { - mstore(stakers, index) - } - return stakers; - } - - function latestStaked(IRollupCore rollup, address staker) - external - view - returns (uint64, Node memory) - { - uint64 num = rollup.latestStakedNode(staker); - if (num == 0) { - num = rollup.latestConfirmed(); - } - Node memory node = rollup.getNode(num); - return (num, node); - } - - function stakedNodes(IRollupCore rollup, address staker) - external - view - returns (uint64[] memory) - { - uint64[] memory nodes = new uint64[](100000); - uint256 index = 0; - for (uint64 i = rollup.latestConfirmed(); i <= rollup.latestNodeCreated(); i++) { - if (rollup.nodeHasStaker(i, staker)) { - nodes[index] = i; - index++; - } - } - // Shrink array down to real size - assembly { - mstore(nodes, index) - } - return nodes; - } - - function findNodeConflict( - IRollupCore rollup, - uint64 node1, - uint64 node2, - uint256 maxDepth - ) public view returns (NodeConflict memory) { - uint64 firstUnresolvedNode = rollup.firstUnresolvedNode(); - uint64 node1Prev = rollup.getNode(node1).prevNum; - uint64 node2Prev = rollup.getNode(node2).prevNum; - - for (uint256 i = 0; i < maxDepth; i++) { - if (node1 == node2) { - return NodeConflict(NodeConflictType.NONE, node1, node2); - } - if (node1Prev == node2Prev) { - return NodeConflict(NodeConflictType.FOUND, node1, node2); - } - if (node1Prev < firstUnresolvedNode && node2Prev < firstUnresolvedNode) { - return NodeConflict(NodeConflictType.INDETERMINATE, 0, 0); - } - if (node1Prev < node2Prev) { - node2 = node2Prev; - node2Prev = rollup.getNode(node2).prevNum; - } else { - node1 = node1Prev; - node1Prev = rollup.getNode(node1).prevNum; - } - } - return NodeConflict(NodeConflictType.INCOMPLETE, 0, 0); - } - - function getStakers( - IRollupCore rollup, - uint64 startIndex, - uint64 max - ) public view returns (address[] memory, bool hasMore) { - uint256 maxStakers = rollup.stakerCount(); - if (startIndex + max <= maxStakers) { - maxStakers = startIndex + max; - hasMore = true; - } - - address[] memory stakers = new address[](maxStakers); - for (uint64 i = 0; i < maxStakers; i++) { - stakers[i] = rollup.getStakerAddress(startIndex + i); - } - return (stakers, hasMore); - } - - function timedOutChallenges( - IRollupCore rollup, - uint64 startIndex, - uint64 max - ) external view returns (uint64[] memory, bool hasMore) { - (address[] memory stakers, bool hasMoreStakers) = getStakers(rollup, startIndex, max); - uint64[] memory challenges = new uint64[](stakers.length); - uint256 index = 0; - IChallengeManager challengeManager = rollup.challengeManager(); - for (uint256 i = 0; i < stakers.length; i++) { - address staker = stakers[i]; - uint64 challengeIndex = rollup.currentChallenge(staker); - if ( - challengeIndex != NO_CHAL_INDEX && - challengeManager.isTimedOut(challengeIndex) && - challengeManager.currentResponder(challengeIndex) == staker - ) { - challenges[index++] = challengeIndex; - } - } - // Shrink array down to real size - assembly { - mstore(challenges, index) - } - return (challenges, hasMoreStakers); - } - - // Worst case runtime of O(depth), as it terminates if it switches paths. - function areUnresolvedNodesLinear(IRollupCore rollup) external view returns (bool) { - uint256 end = rollup.latestNodeCreated(); - for (uint64 i = rollup.firstUnresolvedNode(); i <= end; i++) { - if (i > 0 && rollup.getNode(i).prevNum != i - 1) { - return false; - } - } - return true; - } -} diff --git a/src/rollup/ValidatorWallet.sol b/src/rollup/ValidatorWallet.sol index 0d7cbace..cea2ea87 100644 --- a/src/rollup/ValidatorWallet.sol +++ b/src/rollup/ValidatorWallet.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.0; -import "../challenge/IChallengeManager.sol"; import "../libraries/DelegateCallAware.sol"; import "../libraries/IGasRefunder.sol"; import "../libraries/GasRefundEnabled.sol"; @@ -33,20 +32,22 @@ contract ValidatorWallet is OwnableUpgradeable, DelegateCallAware, GasRefundEnab mapping(address => bool) public allowedExecutorDestinations; modifier onlyExecutorOrOwner() { - if (!executors[_msgSender()] && owner() != _msgSender()) + if (!executors[_msgSender()] && owner() != _msgSender()) { revert NotExecutorOrOwner(_msgSender()); + } _; } event ExecutorUpdated(address indexed executor, bool isExecutor); /// @dev updates the executor addresses - function setExecutor(address[] calldata newExecutors, bool[] calldata isExecutor) - external - onlyOwner - { - if (newExecutors.length != isExecutor.length) + function setExecutor( + address[] calldata newExecutors, + bool[] calldata isExecutor + ) external onlyOwner { + if (newExecutors.length != isExecutor.length) { revert BadArrayLength(newExecutors.length, isExecutor.length); + } unchecked { for (uint64 i = 0; i < newExecutors.length; ++i) { executors[newExecutors[i]] = isExecutor[i]; @@ -77,12 +78,13 @@ contract ValidatorWallet is OwnableUpgradeable, DelegateCallAware, GasRefundEnab event AllowedExecutorDestinationsUpdated(address indexed destination, bool isSet); /// @notice updates the destination addresses which executors are allowed to call - function setAllowedExecutorDestinations(address[] calldata destinations, bool[] calldata isSet) - external - onlyOwner - { - if (destinations.length != isSet.length) + function setAllowedExecutorDestinations( + address[] calldata destinations, + bool[] calldata isSet + ) external onlyOwner { + if (destinations.length != isSet.length) { revert BadArrayLength(destinations.length, isSet.length); + } unchecked { for (uint256 i = 0; i < destinations.length; ++i) { allowedExecutorDestinations[destinations[i]] = isSet[i]; @@ -92,9 +94,12 @@ contract ValidatorWallet is OwnableUpgradeable, DelegateCallAware, GasRefundEnab } /// @dev reverts if the current function can't be called - function validateExecuteTransaction(address destination) public view { - if (!allowedExecutorDestinations[destination] && owner() != _msgSender()) + function validateExecuteTransaction( + address destination + ) public view { + if (!allowedExecutorDestinations[destination] && owner() != _msgSender()) { revert OnlyOwnerDestination(owner(), _msgSender(), destination); + } } function executeTransactions( @@ -120,7 +125,7 @@ contract ValidatorWallet is OwnableUpgradeable, DelegateCallAware, GasRefundEnab validateExecuteTransaction(destination[i]); // We use a low level call here to allow for contract and non-contract calls // solhint-disable-next-line avoid-low-level-calls - (bool success, ) = address(destination[i]).call{value: amount[i]}(data[i]); + (bool success,) = address(destination[i]).call{value: amount[i]}(data[i]); if (!success) { assembly { let ptr := mload(0x40) @@ -150,7 +155,7 @@ contract ValidatorWallet is OwnableUpgradeable, DelegateCallAware, GasRefundEnab validateExecuteTransaction(destination); // We use a low level call here to allow for contract and non-contract calls // solhint-disable-next-line avoid-low-level-calls - (bool success, ) = destination.call{value: amount}(data); + (bool success,) = destination.call{value: amount}(data); if (!success) { assembly { let ptr := mload(0x40) @@ -161,33 +166,12 @@ contract ValidatorWallet is OwnableUpgradeable, DelegateCallAware, GasRefundEnab } } - function timeoutChallenges(IChallengeManager manager, uint64[] calldata challenges) external { - timeoutChallengesWithGasRefunder(IGasRefunder(address(0)), manager, challenges); - } - - function timeoutChallengesWithGasRefunder( - IGasRefunder gasRefunder, - IChallengeManager manager, - uint64[] calldata challenges - ) public onlyExecutorOrOwner refundsGas(gasRefunder, IReader4844(address(0))) { - uint256 challengesCount = challenges.length; - for (uint256 i = 0; i < challengesCount; i++) { - try manager.timeout(challenges[i]) {} catch (bytes memory error) { - if (error.length == 0) { - // Assume out of gas - // We need to revert here so gas estimation works - require(false, "GAS"); - } - } - } - } - receive() external payable {} /// @dev allows the owner to withdraw eth held by this contract function withdrawEth(uint256 amount, address destination) external onlyOwner { // solhint-disable-next-line avoid-low-level-calls - (bool success, ) = destination.call{value: amount}(""); + (bool success,) = destination.call{value: amount}(""); if (!success) revert WithdrawEthFail(destination); } } diff --git a/src/rollup/ValidatorWalletCreator.sol b/src/rollup/ValidatorWalletCreator.sol index ce801eb0..18e59b74 100644 --- a/src/rollup/ValidatorWalletCreator.sol +++ b/src/rollup/ValidatorWalletCreator.sol @@ -25,21 +25,21 @@ contract ValidatorWalletCreator is Ownable { template = address(new ValidatorWallet()); } - function setTemplate(address _template) external onlyOwner { + function setTemplate( + address _template + ) external onlyOwner { template = _template; emit TemplateUpdated(); } - function createWallet(address[] calldata initialExecutorAllowedDests) - external - returns (address) - { + function createWallet( + address[] calldata initialExecutorAllowedDests + ) external returns (address) { address _executor = msg.sender; address _owner = msg.sender; ProxyAdmin admin = new ProxyAdmin(); - address proxy = address( - new TransparentUpgradeableProxy(address(template), address(admin), "") - ); + address proxy = + address(new TransparentUpgradeableProxy(address(template), address(admin), "")); admin.transferOwnership(_owner); ValidatorWallet(payable(proxy)).initialize(_executor, _owner, initialExecutorAllowedDests); emit WalletCreated(proxy, _executor, _owner, address(admin)); diff --git a/src/state/Deserialize.sol b/src/state/Deserialize.sol index 7ff2cfad..e77eff2f 100644 --- a/src/state/Deserialize.sol +++ b/src/state/Deserialize.sol @@ -16,21 +16,19 @@ import "./Module.sol"; import "./GlobalState.sol"; library Deserialize { - function u8(bytes calldata proof, uint256 startOffset) - internal - pure - returns (uint8 ret, uint256 offset) - { + function u8( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (uint8 ret, uint256 offset) { offset = startOffset; ret = uint8(proof[offset]); offset++; } - function u16(bytes calldata proof, uint256 startOffset) - internal - pure - returns (uint16 ret, uint256 offset) - { + function u16( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (uint16 ret, uint256 offset) { offset = startOffset; for (uint256 i = 0; i < 16 / 8; i++) { ret <<= 8; @@ -39,11 +37,10 @@ library Deserialize { } } - function u32(bytes calldata proof, uint256 startOffset) - internal - pure - returns (uint32 ret, uint256 offset) - { + function u32( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (uint32 ret, uint256 offset) { offset = startOffset; for (uint256 i = 0; i < 32 / 8; i++) { ret <<= 8; @@ -52,11 +49,10 @@ library Deserialize { } } - function u64(bytes calldata proof, uint256 startOffset) - internal - pure - returns (uint64 ret, uint256 offset) - { + function u64( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (uint64 ret, uint256 offset) { offset = startOffset; for (uint256 i = 0; i < 64 / 8; i++) { ret <<= 8; @@ -65,11 +61,10 @@ library Deserialize { } } - function u256(bytes calldata proof, uint256 startOffset) - internal - pure - returns (uint256 ret, uint256 offset) - { + function u256( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (uint256 ret, uint256 offset) { offset = startOffset; for (uint256 i = 0; i < 256 / 8; i++) { ret <<= 8; @@ -78,32 +73,29 @@ library Deserialize { } } - function b32(bytes calldata proof, uint256 startOffset) - internal - pure - returns (bytes32 ret, uint256 offset) - { + function b32( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (bytes32 ret, uint256 offset) { offset = startOffset; uint256 retInt; (retInt, offset) = u256(proof, offset); ret = bytes32(retInt); } - function boolean(bytes calldata proof, uint256 startOffset) - internal - pure - returns (bool ret, uint256 offset) - { + function boolean( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (bool ret, uint256 offset) { offset = startOffset; ret = uint8(proof[offset]) != 0; offset++; } - function value(bytes calldata proof, uint256 startOffset) - internal - pure - returns (Value memory val, uint256 offset) - { + function value( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (Value memory val, uint256 offset) { offset = startOffset; uint8 typeInt = uint8(proof[offset]); offset++; @@ -113,11 +105,10 @@ library Deserialize { val = Value({valueType: ValueType(typeInt), contents: contents}); } - function valueStack(bytes calldata proof, uint256 startOffset) - internal - pure - returns (ValueStack memory stack, uint256 offset) - { + function valueStack( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (ValueStack memory stack, uint256 offset) { offset = startOffset; bytes32 remainingHash; (remainingHash, offset) = b32(proof, offset); @@ -130,27 +121,23 @@ library Deserialize { stack = ValueStack({proved: ValueArray(proved), remainingHash: remainingHash}); } - function multiStack(bytes calldata proof, uint256 startOffset) - internal - pure - returns (MultiStack memory multistack, uint256 offset) - { + function multiStack( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (MultiStack memory multistack, uint256 offset) { offset = startOffset; bytes32 inactiveStackHash; (inactiveStackHash, offset) = b32(proof, offset); bytes32 remainingHash; (remainingHash, offset) = b32(proof, offset); - multistack = MultiStack({ - inactiveStackHash: inactiveStackHash, - remainingHash: remainingHash - }); + multistack = + MultiStack({inactiveStackHash: inactiveStackHash, remainingHash: remainingHash}); } - function instructions(bytes calldata proof, uint256 startOffset) - internal - pure - returns (Instruction[] memory code, uint256 offset) - { + function instructions( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (Instruction[] memory code, uint256 offset) { offset = startOffset; uint8 count; (count, offset) = u8(proof, offset); @@ -165,11 +152,10 @@ library Deserialize { } } - function stackFrame(bytes calldata proof, uint256 startOffset) - internal - pure - returns (StackFrame memory window, uint256 offset) - { + function stackFrame( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (StackFrame memory window, uint256 offset) { offset = startOffset; Value memory returnPc; bytes32 localsMerkleRoot; @@ -187,11 +173,10 @@ library Deserialize { }); } - function stackFrameWindow(bytes calldata proof, uint256 startOffset) - internal - pure - returns (StackFrameWindow memory window, uint256 offset) - { + function stackFrameWindow( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (StackFrameWindow memory window, uint256 offset) { offset = startOffset; bytes32 remainingHash; (remainingHash, offset) = b32(proof, offset); @@ -207,11 +192,10 @@ library Deserialize { window = StackFrameWindow({proved: proved, remainingHash: remainingHash}); } - function moduleMemory(bytes calldata proof, uint256 startOffset) - internal - pure - returns (ModuleMemory memory mem, uint256 offset) - { + function moduleMemory( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (ModuleMemory memory mem, uint256 offset) { offset = startOffset; uint64 size; uint64 maxSize; @@ -222,11 +206,10 @@ library Deserialize { mem = ModuleMemory({size: size, maxSize: maxSize, merkleRoot: root}); } - function module(bytes calldata proof, uint256 startOffset) - internal - pure - returns (Module memory mod, uint256 offset) - { + function module( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (Module memory mod, uint256 offset) { offset = startOffset; bytes32 globalsMerkleRoot; ModuleMemory memory mem; @@ -250,11 +233,10 @@ library Deserialize { }); } - function globalState(bytes calldata proof, uint256 startOffset) - internal - pure - returns (GlobalState memory state, uint256 offset) - { + function globalState( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (GlobalState memory state, uint256 offset) { offset = startOffset; // using constant ints for array size requires newer solidity @@ -270,11 +252,10 @@ library Deserialize { state = GlobalState({bytes32Vals: bytes32Vals, u64Vals: u64Vals}); } - function machine(bytes calldata proof, uint256 startOffset) - internal - pure - returns (Machine memory mach, uint256 offset) - { + function machine( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (Machine memory mach, uint256 offset) { offset = startOffset; { MachineStatus status; @@ -287,8 +268,6 @@ library Deserialize { status = MachineStatus.FINISHED; } else if (statusU8 == 2) { status = MachineStatus.ERRORED; - } else if (statusU8 == 3) { - status = MachineStatus.TOO_FAR; } else { revert("UNKNOWN_MACH_STATUS"); } @@ -326,11 +305,10 @@ library Deserialize { (mach.modulesRoot, offset) = b32(proof, offset); } - function merkleProof(bytes calldata proof, uint256 startOffset) - internal - pure - returns (MerkleProof memory merkle, uint256 offset) - { + function merkleProof( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (MerkleProof memory merkle, uint256 offset) { offset = startOffset; uint8 length; (length, offset) = u8(proof, offset); diff --git a/src/state/GlobalState.sol b/src/state/GlobalState.sol index ceea6065..fb450530 100644 --- a/src/state/GlobalState.sol +++ b/src/state/GlobalState.sol @@ -10,42 +10,96 @@ struct GlobalState { } library GlobalStateLib { + using GlobalStateLib for GlobalState; + uint16 internal constant BYTES32_VALS_NUM = 2; uint16 internal constant U64_VALS_NUM = 2; - function hash(GlobalState memory state) internal pure returns (bytes32) { - return - keccak256( - abi.encodePacked( - "Global state:", - state.bytes32Vals[0], - state.bytes32Vals[1], - state.u64Vals[0], - state.u64Vals[1] - ) - ); + function hash( + GlobalState memory state + ) internal pure returns (bytes32) { + return keccak256( + abi.encodePacked( + "Global state:", + state.bytes32Vals[0], + state.bytes32Vals[1], + state.u64Vals[0], + state.u64Vals[1] + ) + ); } - function getBlockHash(GlobalState memory state) internal pure returns (bytes32) { + function getBlockHash( + GlobalState memory state + ) internal pure returns (bytes32) { return state.bytes32Vals[0]; } - function getSendRoot(GlobalState memory state) internal pure returns (bytes32) { + function getSendRoot( + GlobalState memory state + ) internal pure returns (bytes32) { return state.bytes32Vals[1]; } - function getInboxPosition(GlobalState memory state) internal pure returns (uint64) { + function getInboxPosition( + GlobalState memory state + ) internal pure returns (uint64) { return state.u64Vals[0]; } - function getPositionInMessage(GlobalState memory state) internal pure returns (uint64) { + function getPositionInMessage( + GlobalState memory state + ) internal pure returns (uint64) { return state.u64Vals[1]; } - function isEmpty(GlobalState calldata state) internal pure returns (bool) { - return (state.bytes32Vals[0] == bytes32(0) && - state.bytes32Vals[1] == bytes32(0) && - state.u64Vals[0] == 0 && - state.u64Vals[1] == 0); + function isEmpty( + GlobalState calldata state + ) internal pure returns (bool) { + return ( + state.bytes32Vals[0] == bytes32(0) && state.bytes32Vals[1] == bytes32(0) + && state.u64Vals[0] == 0 && state.u64Vals[1] == 0 + ); + } + + function comparePositions( + GlobalState calldata a, + GlobalState calldata b + ) internal pure returns (int256) { + uint64 aPos = a.getInboxPosition(); + uint64 bPos = b.getInboxPosition(); + if (aPos < bPos) { + return -1; + } else if (aPos > bPos) { + return 1; + } else { + uint64 aMsg = a.getPositionInMessage(); + uint64 bMsg = b.getPositionInMessage(); + if (aMsg < bMsg) { + return -1; + } else if (aMsg > bMsg) { + return 1; + } else { + return 0; + } + } + } + + function comparePositionsAgainstStartOfBatch( + GlobalState calldata a, + uint256 bPos + ) internal pure returns (int256) { + uint64 aPos = a.getInboxPosition(); + if (aPos < bPos) { + return -1; + } else if (aPos > bPos) { + return 1; + } else { + if (a.getPositionInMessage() > 0) { + return 1; + } else { + return 0; + } + } } } diff --git a/src/state/Instructions.sol b/src/state/Instructions.sol index c9accdb4..080407a8 100644 --- a/src/state/Instructions.sol +++ b/src/state/Instructions.sol @@ -155,14 +155,15 @@ library Instructions { uint256 internal constant INBOX_INDEX_SEQUENCER = 0; uint256 internal constant INBOX_INDEX_DELAYED = 1; - function hash(Instruction[] memory code) internal pure returns (bytes32) { + function hash( + Instruction[] memory code + ) internal pure returns (bytes32) { // To avoid quadratic expense, we declare a `bytes` early and populate its contents. bytes memory data = new bytes(13 + 1 + 34 * code.length); assembly { // Represents the string "Instructions:", which we place after the length word. mstore( - add(data, 32), - 0x496e737472756374696f6e733a00000000000000000000000000000000000000 + add(data, 32), 0x496e737472756374696f6e733a00000000000000000000000000000000000000 ) } diff --git a/src/state/Machine.sol b/src/state/Machine.sol index 2a67e639..3f1c7aa6 100644 --- a/src/state/Machine.sol +++ b/src/state/Machine.sol @@ -1,4 +1,4 @@ -// Copyright 2021-2023, Offchain Labs, Inc. +// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 @@ -12,8 +12,7 @@ import "./StackFrame.sol"; enum MachineStatus { RUNNING, FINISHED, - ERRORED, - TOO_FAR + ERRORED } struct Machine { @@ -38,17 +37,15 @@ library MachineLib { bytes32 internal constant NO_RECOVERY_PC = ~bytes32(0); - function hash(Machine memory mach) internal pure returns (bytes32) { + function hash( + Machine memory mach + ) internal pure returns (bytes32) { // Warning: the non-running hashes are replicated in Challenge if (mach.status == MachineStatus.RUNNING) { - bytes32 valueMultiHash = mach.valueMultiStack.hash( - mach.valueStack.hash(), - mach.recoveryPc != NO_RECOVERY_PC - ); - bytes32 frameMultiHash = mach.frameMultiStack.hash( - mach.frameStack.hash(), - mach.recoveryPc != NO_RECOVERY_PC - ); + bytes32 valueMultiHash = + mach.valueMultiStack.hash(mach.valueStack.hash(), mach.recoveryPc != NO_RECOVERY_PC); + bytes32 frameMultiHash = + mach.frameMultiStack.hash(mach.frameStack.hash(), mach.recoveryPc != NO_RECOVERY_PC); bytes memory preimage = abi.encodePacked( "Machine running:", valueMultiHash, @@ -65,20 +62,20 @@ library MachineLib { } else if (mach.status == MachineStatus.FINISHED) { return keccak256(abi.encodePacked("Machine finished:", mach.globalStateHash)); } else if (mach.status == MachineStatus.ERRORED) { - return keccak256(abi.encodePacked("Machine errored:")); - } else if (mach.status == MachineStatus.TOO_FAR) { - return keccak256(abi.encodePacked("Machine too far:")); + return keccak256(abi.encodePacked("Machine errored:", mach.globalStateHash)); } else { revert("BAD_MACH_STATUS"); } } - function switchCoThreadStacks(Machine memory mach) internal pure { + function switchCoThreadStacks( + Machine memory mach + ) internal pure { bytes32 newActiveValue = mach.valueMultiStack.inactiveStackHash; bytes32 newActiveFrame = mach.frameMultiStack.inactiveStackHash; if ( - newActiveFrame == MultiStackLib.NO_STACK_HASH || - newActiveValue == MultiStackLib.NO_STACK_HASH + newActiveFrame == MultiStackLib.NO_STACK_HASH + || newActiveValue == MultiStackLib.NO_STACK_HASH ) { mach.status = MachineStatus.ERRORED; return; @@ -100,7 +97,9 @@ library MachineLib { return true; } - function setPcFromRecovery(Machine memory mach) internal pure returns (bool) { + function setPcFromRecovery( + Machine memory mach + ) internal pure returns (bool) { if (!setPcFromData(mach, uint256(mach.recoveryPc))) { return false; } diff --git a/src/state/Module.sol b/src/state/Module.sol index 07630067..35ea9306 100644 --- a/src/state/Module.sol +++ b/src/state/Module.sol @@ -18,18 +18,19 @@ struct Module { library ModuleLib { using ModuleMemoryCompactLib for ModuleMemory; - function hash(Module memory mod) internal pure returns (bytes32) { - return - keccak256( - abi.encodePacked( - "Module:", - mod.globalsMerkleRoot, - mod.moduleMemory.hash(), - mod.tablesMerkleRoot, - mod.functionsMerkleRoot, - mod.extraHash, - mod.internalsOffset - ) - ); + function hash( + Module memory mod + ) internal pure returns (bytes32) { + return keccak256( + abi.encodePacked( + "Module:", + mod.globalsMerkleRoot, + mod.moduleMemory.hash(), + mod.tablesMerkleRoot, + mod.functionsMerkleRoot, + mod.extraHash, + mod.internalsOffset + ) + ); } } diff --git a/src/state/ModuleMemory.sol b/src/state/ModuleMemory.sol index 0f7317ed..57158c54 100644 --- a/src/state/ModuleMemory.sol +++ b/src/state/ModuleMemory.sol @@ -13,7 +13,9 @@ library ModuleMemoryLib { uint256 private constant LEAF_SIZE = 32; - function hash(ModuleMemory memory mem) internal pure returns (bytes32) { + function hash( + ModuleMemory memory mem + ) internal pure returns (bytes32) { return ModuleMemoryCompactLib.hash(mem); } @@ -22,15 +24,7 @@ library ModuleMemoryLib { uint256 leafIdx, bytes calldata proof, uint256 startOffset - ) - internal - pure - returns ( - bytes32 contents, - uint256 offset, - MerkleProof memory merkle - ) - { + ) internal pure returns (bytes32 contents, uint256 offset, MerkleProof memory merkle) { offset = startOffset; (contents, offset) = Deserialize.b32(proof, offset); (merkle, offset) = Deserialize.merkleProof(proof, offset); @@ -56,15 +50,7 @@ library ModuleMemoryLib { uint256 width, bytes calldata proof, uint256 proofOffset - ) - internal - pure - returns ( - bool err, - uint256 value, - uint256 offset - ) - { + ) internal pure returns (bool err, uint256 value, uint256 offset) { if (start + width > mem.size) { return (true, 0, proofOffset); } @@ -76,12 +62,7 @@ library ModuleMemoryLib { uint256 idx = start + i; uint256 leafIdx = idx / LEAF_SIZE; if (leafIdx != lastProvedLeafIdx) { - (lastProvedLeafContents, proofOffset, ) = proveLeaf( - mem, - leafIdx, - proof, - proofOffset - ); + (lastProvedLeafContents, proofOffset,) = proveLeaf(mem, leafIdx, proof, proofOffset); lastProvedLeafIdx = leafIdx; } uint256 indexWithinLeaf = idx % LEAF_SIZE; diff --git a/src/state/ModuleMemoryCompact.sol b/src/state/ModuleMemoryCompact.sol index 62715477..80c2fe09 100644 --- a/src/state/ModuleMemoryCompact.sol +++ b/src/state/ModuleMemoryCompact.sol @@ -11,7 +11,9 @@ struct ModuleMemory { } library ModuleMemoryCompactLib { - function hash(ModuleMemory memory mem) internal pure returns (bytes32) { + function hash( + ModuleMemory memory mem + ) internal pure returns (bytes32) { return keccak256(abi.encodePacked("Memory:", mem.size, mem.maxSize, mem.merkleRoot)); } } diff --git a/src/state/MultiStack.sol b/src/state/MultiStack.sol index 45bc7e6e..f56b1c59 100644 --- a/src/state/MultiStack.sol +++ b/src/state/MultiStack.sol @@ -20,34 +20,30 @@ library MultiStackLib { require(activeStackHash != NO_STACK_HASH, "MULTISTACK_NOSTACK_ACTIVE"); if (cothread) { require(multi.inactiveStackHash != NO_STACK_HASH, "MULTISTACK_NOSTACK_MAIN"); - return - keccak256( - abi.encodePacked( - "multistack:", - multi.inactiveStackHash, - activeStackHash, - multi.remainingHash - ) - ); + return keccak256( + abi.encodePacked( + "multistack:", multi.inactiveStackHash, activeStackHash, multi.remainingHash + ) + ); } else { - return - keccak256( - abi.encodePacked( - "multistack:", - activeStackHash, - multi.inactiveStackHash, - multi.remainingHash - ) - ); + return keccak256( + abi.encodePacked( + "multistack:", activeStackHash, multi.inactiveStackHash, multi.remainingHash + ) + ); } } - function setEmpty(MultiStack memory multi) internal pure { + function setEmpty( + MultiStack memory multi + ) internal pure { multi.inactiveStackHash = NO_STACK_HASH; multi.remainingHash = 0; } - function pushNew(MultiStack memory multi) internal pure { + function pushNew( + MultiStack memory multi + ) internal pure { if (multi.inactiveStackHash != NO_STACK_HASH) { multi.remainingHash = keccak256( abi.encodePacked("cothread:", multi.inactiveStackHash, multi.remainingHash) diff --git a/src/state/PcArray.sol b/src/state/PcArray.sol index d36076db..2688d5bd 100644 --- a/src/state/PcArray.sol +++ b/src/state/PcArray.sol @@ -13,15 +13,13 @@ library PcArrayLib { return arr.inner[index]; } - function set( - PcArray memory arr, - uint256 index, - uint32 val - ) internal pure { + function set(PcArray memory arr, uint256 index, uint32 val) internal pure { arr.inner[index] = val; } - function length(PcArray memory arr) internal pure returns (uint256) { + function length( + PcArray memory arr + ) internal pure returns (uint256) { return arr.inner.length; } @@ -34,7 +32,9 @@ library PcArrayLib { arr.inner = newInner; } - function pop(PcArray memory arr) internal pure returns (uint32 popped) { + function pop( + PcArray memory arr + ) internal pure returns (uint32 popped) { popped = arr.inner[arr.inner.length - 1]; uint32[] memory newInner = new uint32[](arr.inner.length - 1); for (uint256 i = 0; i < newInner.length; i++) { diff --git a/src/state/StackFrame.sol b/src/state/StackFrame.sol index eb72fe0d..e97e5c6d 100644 --- a/src/state/StackFrame.sol +++ b/src/state/StackFrame.sol @@ -21,32 +21,39 @@ struct StackFrameWindow { library StackFrameLib { using ValueLib for Value; - function hash(StackFrame memory frame) internal pure returns (bytes32) { - return - keccak256( - abi.encodePacked( - "Stack frame:", - frame.returnPc.hash(), - frame.localsMerkleRoot, - frame.callerModule, - frame.callerModuleInternals - ) - ); + function hash( + StackFrame memory frame + ) internal pure returns (bytes32) { + return keccak256( + abi.encodePacked( + "Stack frame:", + frame.returnPc.hash(), + frame.localsMerkleRoot, + frame.callerModule, + frame.callerModuleInternals + ) + ); } - function hash(StackFrameWindow memory window) internal pure returns (bytes32 h) { + function hash( + StackFrameWindow memory window + ) internal pure returns (bytes32 h) { h = window.remainingHash; for (uint256 i = 0; i < window.proved.length; i++) { h = keccak256(abi.encodePacked("Stack frame stack:", hash(window.proved[i]), h)); } } - function peek(StackFrameWindow memory window) internal pure returns (StackFrame memory) { + function peek( + StackFrameWindow memory window + ) internal pure returns (StackFrame memory) { require(window.proved.length == 1, "BAD_WINDOW_LENGTH"); return window.proved[0]; } - function pop(StackFrameWindow memory window) internal pure returns (StackFrame memory frame) { + function pop( + StackFrameWindow memory window + ) internal pure returns (StackFrame memory frame) { require(window.proved.length == 1, "BAD_WINDOW_LENGTH"); frame = window.proved[0]; window.proved = new StackFrame[](0); diff --git a/src/state/Value.sol b/src/state/Value.sol index ca1b1a19..9f558da7 100644 --- a/src/state/Value.sol +++ b/src/state/Value.sol @@ -20,7 +20,9 @@ struct Value { } library ValueLib { - function hash(Value memory val) internal pure returns (bytes32) { + function hash( + Value memory val + ) internal pure returns (bytes32) { return keccak256(abi.encodePacked("Value:", val.valueType, val.contents)); } @@ -28,14 +30,18 @@ library ValueLib { return ValueType.INTERNAL_REF; } - function assumeI32(Value memory val) internal pure returns (uint32) { + function assumeI32( + Value memory val + ) internal pure returns (uint32) { uint256 uintval = uint256(val.contents); require(val.valueType == ValueType.I32, "NOT_I32"); require(uintval < (1 << 32), "BAD_I32"); return uint32(uintval); } - function assumeI64(Value memory val) internal pure returns (uint64) { + function assumeI64( + Value memory val + ) internal pure returns (uint64) { uint256 uintval = uint256(val.contents); require(val.valueType == ValueType.I64, "NOT_I64"); require(uintval < (1 << 64), "BAD_I64"); @@ -46,15 +52,21 @@ library ValueLib { return Value({valueType: ValueType.REF_NULL, contents: 0}); } - function newI32(uint32 x) internal pure returns (Value memory) { + function newI32( + uint32 x + ) internal pure returns (Value memory) { return Value({valueType: ValueType.I32, contents: uint256(x)}); } - function newI64(uint64 x) internal pure returns (Value memory) { + function newI64( + uint64 x + ) internal pure returns (Value memory) { return Value({valueType: ValueType.I64, contents: uint256(x)}); } - function newBoolean(bool x) internal pure returns (Value memory) { + function newBoolean( + bool x + ) internal pure returns (Value memory) { if (x) { return newI32(uint32(1)); } else { diff --git a/src/state/ValueArray.sol b/src/state/ValueArray.sol index c4239f6c..db30c34c 100644 --- a/src/state/ValueArray.sol +++ b/src/state/ValueArray.sol @@ -15,15 +15,13 @@ library ValueArrayLib { return arr.inner[index]; } - function set( - ValueArray memory arr, - uint256 index, - Value memory val - ) internal pure { + function set(ValueArray memory arr, uint256 index, Value memory val) internal pure { arr.inner[index] = val; } - function length(ValueArray memory arr) internal pure returns (uint256) { + function length( + ValueArray memory arr + ) internal pure returns (uint256) { return arr.inner.length; } @@ -36,7 +34,9 @@ library ValueArrayLib { arr.inner = newInner; } - function pop(ValueArray memory arr) internal pure returns (Value memory popped) { + function pop( + ValueArray memory arr + ) internal pure returns (Value memory popped) { popped = arr.inner[arr.inner.length - 1]; Value[] memory newInner = new Value[](arr.inner.length - 1); for (uint256 i = 0; i < newInner.length; i++) { diff --git a/src/state/ValueStack.sol b/src/state/ValueStack.sol index 4ba135fb..7fe625ff 100644 --- a/src/state/ValueStack.sol +++ b/src/state/ValueStack.sol @@ -16,7 +16,9 @@ library ValueStackLib { using ValueLib for Value; using ValueArrayLib for ValueArray; - function hash(ValueStack memory stack) internal pure returns (bytes32 h) { + function hash( + ValueStack memory stack + ) internal pure returns (bytes32 h) { h = stack.remainingHash; uint256 len = stack.proved.length(); for (uint256 i = 0; i < len; i++) { @@ -24,12 +26,16 @@ library ValueStackLib { } } - function peek(ValueStack memory stack) internal pure returns (Value memory) { + function peek( + ValueStack memory stack + ) internal pure returns (Value memory) { uint256 len = stack.proved.length(); return stack.proved.get(len - 1); } - function pop(ValueStack memory stack) internal pure returns (Value memory) { + function pop( + ValueStack memory stack + ) internal pure returns (Value memory) { return stack.proved.pop(); } diff --git a/src/test-helpers/BridgeTester.sol b/src/test-helpers/BridgeTester.sol index 87cfff2c..15bff13b 100644 --- a/src/test-helpers/BridgeTester.sol +++ b/src/test-helpers/BridgeTester.sol @@ -59,7 +59,9 @@ contract BridgeTester is Initializable, DelegateCallAware, IBridge, IEthBridge { _; } - function setSequencerInbox(address _sequencerInbox) external override onlyRollupOrOwner { + function setSequencerInbox( + address _sequencerInbox + ) external override onlyRollupOrOwner { sequencerInbox = _sequencerInbox; emit SequencerInboxUpdated(_sequencerInbox); } @@ -72,12 +74,16 @@ contract BridgeTester is Initializable, DelegateCallAware, IBridge, IEthBridge { address private constant EMPTY_ACTIVEOUTBOX = address(type(uint160).max); - function initialize(IOwnable rollup_) external initializer { + function initialize( + IOwnable rollup_ + ) external initializer { _activeOutbox = EMPTY_ACTIVEOUTBOX; rollup = rollup_; } - function updateRollupAddress(IOwnable _rollup) external { + function updateRollupAddress( + IOwnable _rollup + ) external { rollup = _rollup; } @@ -86,11 +92,15 @@ contract BridgeTester is Initializable, DelegateCallAware, IBridge, IEthBridge { return _activeOutbox; } - function allowedDelayedInboxes(address inbox) external view override returns (bool) { + function allowedDelayedInboxes( + address inbox + ) external view override returns (bool) { return allowedInboxesMap[inbox].allowed; } - function allowedOutboxes(address outbox) external view override returns (bool) { + function allowedOutboxes( + address outbox + ) external view override returns (bool) { return allowedOutboxesMap[outbox].allowed; } @@ -101,20 +111,15 @@ contract BridgeTester is Initializable, DelegateCallAware, IBridge, IEthBridge { uint256 newMessageCount ) external - returns ( - uint256 seqMessageIndex, - bytes32 beforeAcc, - bytes32 delayedAcc, - bytes32 acc - ) + returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc) { // TODO: implement stub logic } - function submitBatchSpendingReport(address batchPoster, bytes32 dataHash) - external - returns (uint256) - { + function submitBatchSpendingReport( + address batchPoster, + bytes32 dataHash + ) external returns (uint256) { // TODO: implement stub } @@ -129,15 +134,14 @@ contract BridgeTester is Initializable, DelegateCallAware, IBridge, IEthBridge { bytes32 messageDataHash ) external payable override returns (uint256) { if (!allowedInboxesMap[msg.sender].allowed) revert NotDelayedInbox(msg.sender); - return - addMessageToDelayedAccumulator( - kind, - sender, - uint64(block.number), - uint64(block.timestamp), // solhint-disable-line not-rely-on-time - block.basefee, - messageDataHash - ); + return addMessageToDelayedAccumulator( + kind, + sender, + uint64(block.number), + uint64(block.timestamp), // solhint-disable-line not-rely-on-time + block.basefee, + messageDataHash + ); } function addMessageToDelayedAccumulator( @@ -150,13 +154,7 @@ contract BridgeTester is Initializable, DelegateCallAware, IBridge, IEthBridge { ) internal returns (uint256) { uint256 count = delayedInboxAccs.length; bytes32 messageHash = Messages.messageHash( - kind, - sender, - blockNumber, - blockTimestamp, - count, - baseFeeL1, - messageDataHash + kind, sender, blockNumber, blockTimestamp, count, baseFeeL1, messageDataHash ); bytes32 prevAcc = 0; if (count > 0) { @@ -164,14 +162,7 @@ contract BridgeTester is Initializable, DelegateCallAware, IBridge, IEthBridge { } delayedInboxAccs.push(Messages.accumulateInboxMessage(prevAcc, messageHash)); emit MessageDelivered( - count, - prevAcc, - msg.sender, - kind, - sender, - messageDataHash, - baseFeeL1, - blockTimestamp + count, prevAcc, msg.sender, kind, sender, messageDataHash, baseFeeL1, blockTimestamp ); return count; } @@ -206,9 +197,8 @@ contract BridgeTester is Initializable, DelegateCallAware, IBridge, IEthBridge { allowedInboxesMap[inbox] = InOutInfo(allowedDelayedInboxList.length, true); allowedDelayedInboxList.push(inbox); } else { - allowedDelayedInboxList[info.index] = allowedDelayedInboxList[ - allowedDelayedInboxList.length - 1 - ]; + allowedDelayedInboxList[info.index] = + allowedDelayedInboxList[allowedDelayedInboxList.length - 1]; allowedInboxesMap[allowedDelayedInboxList[info.index]].index = info.index; allowedDelayedInboxList.pop(); delete allowedInboxesMap[inbox]; diff --git a/src/test-helpers/CryptographyPrimitivesTester.sol b/src/test-helpers/CryptographyPrimitivesTester.sol index d587e1ec..65f5665a 100644 --- a/src/test-helpers/CryptographyPrimitivesTester.sol +++ b/src/test-helpers/CryptographyPrimitivesTester.sol @@ -7,21 +7,20 @@ pragma solidity ^0.8.0; import "../libraries/CryptographyPrimitives.sol"; library CryptographyPrimitivesTester { - function keccakF(uint256[25] memory input) public pure returns (uint256[25] memory) { + function keccakF( + uint256[25] memory input + ) public pure returns (uint256[25] memory) { return CryptographyPrimitives.keccakF(input); } - function sha256Block(bytes32[2] memory inputChunk, bytes32 hashState) - public - pure - returns (bytes32) - { - return - bytes32( - CryptographyPrimitives.sha256Block( - [uint256(inputChunk[0]), uint256(inputChunk[1])], - uint256(hashState) - ) - ); + function sha256Block( + bytes32[2] memory inputChunk, + bytes32 hashState + ) public pure returns (bytes32) { + return bytes32( + CryptographyPrimitives.sha256Block( + [uint256(inputChunk[0]), uint256(inputChunk[1])], uint256(hashState) + ) + ); } } diff --git a/src/test-helpers/EthVault.sol b/src/test-helpers/EthVault.sol index e8258bd6..e73f8b76 100644 --- a/src/test-helpers/EthVault.sol +++ b/src/test-helpers/EthVault.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; @@ -10,7 +10,9 @@ pragma solidity ^0.8.0; contract EthVault { uint256 public version = 0; - function setVersion(uint256 _version) external payable { + function setVersion( + uint256 _version + ) external payable { version = _version; } diff --git a/src/test-helpers/InterfaceCompatibilityTester.sol b/src/test-helpers/InterfaceCompatibilityTester.sol index 4d3328fc..ba637705 100644 --- a/src/test-helpers/InterfaceCompatibilityTester.sol +++ b/src/test-helpers/InterfaceCompatibilityTester.sol @@ -7,5 +7,5 @@ pragma solidity >=0.6.9 <0.9.0; import "../bridge/IBridge.sol"; import "../bridge/IOutbox.sol"; -import "../bridge/IInboxBase.sol"; +import "../bridge/IInbox.sol"; import "../bridge/ISequencerInbox.sol"; diff --git a/src/test-helpers/MessageTester.sol b/src/test-helpers/MessageTester.sol index 1dc5cbff..36e2e053 100644 --- a/src/test-helpers/MessageTester.sol +++ b/src/test-helpers/MessageTester.sol @@ -16,16 +16,9 @@ contract MessageTester { uint256 gasPriceL1, bytes32 messageDataHash ) public pure returns (bytes32) { - return - Messages.messageHash( - messageType, - sender, - blockNumber, - timestamp, - inboxSeqNum, - gasPriceL1, - messageDataHash - ); + return Messages.messageHash( + messageType, sender, blockNumber, timestamp, inboxSeqNum, gasPriceL1, messageDataHash + ); } function accumulateInboxMessage(bytes32 inbox, bytes32 message) public pure returns (bytes32) { diff --git a/src/test-helpers/OutboxWithoutOptTester.sol b/src/test-helpers/OutboxWithoutOptTester.sol index 89dcc1e1..9ec93b56 100644 --- a/src/test-helpers/OutboxWithoutOptTester.sol +++ b/src/test-helpers/OutboxWithoutOptTester.sol @@ -22,7 +22,9 @@ contract OutboxWithoutOptTester is DelegateCallAware, IOutbox { address public rollup; // the rollup contract IBridge public bridge; // the bridge contract - function spent(uint256) external pure override returns (bytes32) { + function spent( + uint256 + ) external pure override returns (bytes32) { revert("NOT_IMPLEMETED"); } @@ -39,10 +41,13 @@ contract OutboxWithoutOptTester is DelegateCallAware, IOutbox { // Note, these variables are set and then wiped during a single transaction. // Therefore their values don't need to be maintained, and their slots will // be empty outside of transactions + L2ToL1Context internal context; uint128 public constant OUTBOX_VERSION = 2; - function initialize(IBridge _bridge) external { + function initialize( + IBridge _bridge + ) external { if (address(bridge) != address(0)) revert AlreadyInit(); bridge = _bridge; rollup = address(_bridge.rollup()); @@ -115,15 +120,8 @@ contract OutboxWithoutOptTester is DelegateCallAware, IOutbox { ) external virtual override { bytes32 outputId; { - bytes32 userTx = calculateItemHash( - l2Sender, - to, - l2Block, - l1Block, - l2Timestamp, - value, - data - ); + bytes32 userTx = + calculateItemHash(l2Sender, to, l2Block, l1Block, l2Timestamp, value, data); outputId = recordOutputAsSpent(proof, index, userTx); emit OutBoxTransactionExecuted(to, l2Sender, 0, index); @@ -166,7 +164,7 @@ contract OutboxWithoutOptTester is DelegateCallAware, IOutbox { bytes32 item ) internal returns (bytes32) { if (proof.length >= 256) revert ProofTooLong(proof.length); - if (index >= 2**proof.length) revert PathNotMinimal(index, 2**proof.length); + if (index >= 2 ** proof.length) revert PathNotMinimal(index, 2 ** proof.length); // Hash the leaf an extra time to prove it's a leaf bytes32 calcRoot = calculateMerkleRoot(proof, index, item); @@ -178,11 +176,7 @@ contract OutboxWithoutOptTester is DelegateCallAware, IOutbox { return bytes32(index); } - function executeBridgeCall( - address to, - uint256 value, - bytes memory data - ) internal { + function executeBridgeCall(address to, uint256 value, bytes memory data) internal { (bool success, bytes memory returndata) = bridge.executeCall(to, value, data); if (!success) { if (returndata.length > 0) { @@ -206,8 +200,7 @@ contract OutboxWithoutOptTester is DelegateCallAware, IOutbox { uint256 value, bytes calldata data ) public pure override returns (bytes32) { - return - keccak256(abi.encodePacked(l2Sender, to, l2Block, l1Block, l2Timestamp, value, data)); + return keccak256(abi.encodePacked(l2Sender, to, l2Block, l1Block, l2Timestamp, value, data)); } function calculateMerkleRoot( diff --git a/src/test-helpers/RollupMock.sol b/src/test-helpers/RollupMock.sol index 9abcc6db..0284e57a 100644 --- a/src/test-helpers/RollupMock.sol +++ b/src/test-helpers/RollupMock.sol @@ -10,7 +10,9 @@ contract RollupMock { address public owner; - constructor(address _owner) { + constructor( + address _owner + ) { owner = _owner; } @@ -18,10 +20,4 @@ contract RollupMock { emit WithdrawTriggered(); return 0; } - - function removeOldZombies( - uint256 /* startIndex */ - ) external { - emit ZombieTriggered(); - } } diff --git a/src/test-helpers/TestToken.sol b/src/test-helpers/TestToken.sol index 9a8cb39b..60911893 100644 --- a/src/test-helpers/TestToken.sol +++ b/src/test-helpers/TestToken.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; @@ -10,7 +10,9 @@ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; * Basic ERC20 token */ contract TestToken is ERC20 { - constructor(uint256 initialSupply) ERC20("TestToken", "TT") { + constructor( + uint256 initialSupply + ) ERC20("TestToken", "TT") { _mint(msg.sender, initialSupply); } } diff --git a/test/ERC20Mock.sol b/test/ERC20Mock.sol new file mode 100644 index 00000000..b5930217 --- /dev/null +++ b/test/ERC20Mock.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +// mock class using ERC20 +contract ERC20Mock is ERC20 { + constructor( + string memory name, + string memory symbol, + address initialAccount, + uint256 initialBalance + ) payable ERC20(name, symbol) { + _mint(initialAccount, initialBalance); + } + + function mint(address account, uint256 amount) public { + _mint(account, amount); + } + + function burn(address account, uint256 amount) public { + _burn(account, amount); + } + + function transferInternal(address from, address to, uint256 value) public { + _transfer(from, to, value); + } + + function approveInternal(address owner, address spender, uint256 value) public { + _approve(owner, spender, value); + } +} diff --git a/test/MockAssertionChain.sol b/test/MockAssertionChain.sol new file mode 100644 index 00000000..766cad81 --- /dev/null +++ b/test/MockAssertionChain.sol @@ -0,0 +1,187 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.17; + +import "forge-std/Test.sol"; +import {IAssertionChain} from "../src/challengeV2/IAssertionChain.sol"; +import {IEdgeChallengeManager} from "../src/challengeV2/EdgeChallengeManager.sol"; +import "../src/bridge/IBridge.sol"; +import "../src/rollup/RollupLib.sol"; +import "./challengeV2/StateTools.sol"; + +struct MockAssertion { + bytes32 predecessorId; + uint256 height; + AssertionState state; + bytes32 successionChallenge; + uint64 firstChildCreationBlock; + uint64 secondChildCreationBlock; + bool isFirstChild; + bool isPending; + bytes32 configHash; +} + +contract MockAssertionChain is IAssertionChain { + mapping(bytes32 => MockAssertion) assertions; + IBridge public bridge; // TODO: set bridge in this mock + bytes32 public wasmModuleRoot; + uint256 public baseStake; + address public challengeManager; + uint64 public confirmPeriodBlocks; + + bool public validatorWhitelistDisabled; + mapping(address => bool) public isValidator; + + function assertionExists( + bytes32 assertionHash + ) public view returns (bool) { + return assertions[assertionHash].height != 0; + } + + function stakeToken() public view returns (address) { + return address(0); + } + + function validateAssertionHash( + bytes32 assertionHash, + AssertionState calldata state, + bytes32 prevAssertionHash, + bytes32 inboxAcc + ) external view { + require(assertionExists(assertionHash), "Assertion does not exist"); + // TODO: HN: This is not how the real assertion chain calculate assertion hash + require( + assertionHash == calculateAssertionHash(prevAssertionHash, state), + "INVALID_ASSERTION_HASH" + ); + } + + function getFirstChildCreationBlock( + bytes32 assertionHash + ) external view returns (uint64) { + require(assertionExists(assertionHash), "Assertion does not exist"); + return assertions[assertionHash].firstChildCreationBlock; + } + + function getSecondChildCreationBlock( + bytes32 assertionHash + ) external view returns (uint64) { + require(assertionExists(assertionHash), "Assertion does not exist"); + return assertions[assertionHash].secondChildCreationBlock; + } + + function validateConfig(bytes32 assertionHash, ConfigData calldata configData) external view { + require( + RollupLib.configHash({ + wasmModuleRoot: configData.wasmModuleRoot, + requiredStake: configData.requiredStake, + challengeManager: configData.challengeManager, + confirmPeriodBlocks: configData.confirmPeriodBlocks, + nextInboxPosition: configData.nextInboxPosition + }) == assertions[assertionHash].configHash, + "BAD_CONFIG" + ); + } + + function isFirstChild( + bytes32 assertionHash + ) external view returns (bool) { + require(assertionExists(assertionHash), "Assertion does not exist"); + return assertions[assertionHash].isFirstChild; + } + + function isPending( + bytes32 assertionHash + ) external view returns (bool) { + require(assertionExists(assertionHash), "Assertion does not exist"); + return assertions[assertionHash].isPending; + } + + function calculateAssertionHash( + bytes32 predecessorId, + AssertionState memory afterState + ) public pure returns (bytes32) { + return RollupLib.assertionHash({ + parentAssertionHash: predecessorId, + afterState: afterState, + inboxAcc: keccak256(abi.encode(afterState.globalState.u64Vals[0])) // mock accumulator based on inbox count + }); + } + + function childCreated( + bytes32 assertionHash + ) internal { + if (assertions[assertionHash].firstChildCreationBlock == 0) { + assertions[assertionHash].firstChildCreationBlock = uint64(block.number); + } else if (assertions[assertionHash].secondChildCreationBlock == 0) { + assertions[assertionHash].secondChildCreationBlock = uint64(block.number); + } + } + + function addAssertionUnsafe( + bytes32 predecessorId, + uint256 height, + uint64 nextInboxPosition, + AssertionState memory afterState, + bytes32 successionChallenge + ) public returns (bytes32) { + bytes32 assertionHash = calculateAssertionHash(predecessorId, afterState); + assertions[assertionHash] = MockAssertion({ + predecessorId: predecessorId, + height: height, + state: afterState, + successionChallenge: successionChallenge, + firstChildCreationBlock: 0, + secondChildCreationBlock: 0, + isFirstChild: assertions[predecessorId].firstChildCreationBlock == 0, + isPending: true, + configHash: RollupLib.configHash({ + wasmModuleRoot: wasmModuleRoot, + requiredStake: baseStake, + challengeManager: challengeManager, + confirmPeriodBlocks: confirmPeriodBlocks, + nextInboxPosition: nextInboxPosition + }) + }); + childCreated(predecessorId); + return assertionHash; + } + + function addAssertion( + bytes32 predecessorId, + uint256 height, + uint64 nextInboxPosition, + AssertionState memory beforeState, + AssertionState memory afterState, + bytes32 successionChallenge + ) public returns (bytes32) { + bytes32 beforeStateHash = StateToolsLib.hash(beforeState); + bytes32 assertionHash = calculateAssertionHash(predecessorId, afterState); + require(!assertionExists(assertionHash), "Assertion already exists"); + require(assertionExists(predecessorId), "Predecessor does not exists"); + require(height > assertions[predecessorId].height, "Height too low"); + require( + beforeStateHash == StateToolsLib.hash(assertions[predecessorId].state), + "Before state hash does not match predecessor" + ); + + return addAssertionUnsafe( + predecessorId, height, nextInboxPosition, afterState, successionChallenge + ); + } + + function setValidatorWhitelistDisabled( + bool x + ) external { + validatorWhitelistDisabled = x; + } + + function setIsValidator(address user, bool x) external { + isValidator[user] = x; + } + + function getValidators() external pure returns (address[] memory) { + address[] memory validators = new address[](1); + validators[0] = address(0); + return validators; + } +} diff --git a/test/Rollup.t.sol b/test/Rollup.t.sol new file mode 100644 index 00000000..7316b018 --- /dev/null +++ b/test/Rollup.t.sol @@ -0,0 +1,1636 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "forge-std/Test.sol"; + +import "../src/rollup/RollupProxy.sol"; + +import "../src/rollup/RollupCore.sol"; +import "../src/rollup/RollupUserLogic.sol"; +import "../src/rollup/RollupAdminLogic.sol"; +import "../src/rollup/RollupCreator.sol"; + +import "../src/osp/OneStepProver0.sol"; +import "../src/osp/OneStepProverMemory.sol"; +import "../src/osp/OneStepProverMath.sol"; +import "../src/osp/OneStepProverHostIo.sol"; +import "../src/osp/OneStepProofEntry.sol"; +import "../src/challengeV2/EdgeChallengeManager.sol"; +import "./challengeV2/Utils.sol"; + +import "../src/libraries/Error.sol"; + +import "../src/mocks/TestWETH9.sol"; +import "../src/mocks/UpgradeExecutorMock.sol"; +import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import "@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol"; + +contract RollupTest is Test { + using GlobalStateLib for GlobalState; + using AssertionStateLib for AssertionState; + + address constant owner = address(1337); + address constant sequencer = address(7331); + + address constant validator1 = address(100001); + address constant validator2 = address(100002); + address constant validator3 = address(100003); + address constant validator1Withdrawal = address(1000010); + address constant validator2Withdrawal = address(1000020); + address constant validator3Withdrawal = address(1000030); + address constant loserStakeEscrow = address(200001); + address constant anyTrustFastConfirmer = address(300001); + + bytes32 constant WASM_MODULE_ROOT = keccak256("WASM_MODULE_ROOT"); + uint256 constant BASE_STAKE = 10; + uint256 constant MINI_STAKE_VALUE = 2; + uint64 constant CONFIRM_PERIOD_BLOCKS = 100; + uint256 constant MAX_DATA_SIZE = 117964; + uint64 constant CHALLENGE_GRACE_PERIOD_BLOCKS = 10; + + bytes32 constant FIRST_ASSERTION_BLOCKHASH = keccak256("FIRST_ASSERTION_BLOCKHASH"); + bytes32 constant FIRST_ASSERTION_SENDROOT = keccak256("FIRST_ASSERTION_SENDROOT"); + + uint256 constant LAYERZERO_BLOCKEDGE_HEIGHT = 2 ** 5; + + IERC20 token; + RollupProxy rollup; + RollupUserLogic userRollup; + RollupAdminLogic adminRollup; + EdgeChallengeManager challengeManager; + Random rand = new Random(); + + address upgradeExecutorAddr; + address[] validators; + bool[] flags; + + GlobalState emptyGlobalState; + AssertionState emptyAssertionState = + AssertionState(emptyGlobalState, MachineStatus.FINISHED, bytes32(0)); + bytes32 genesisHash = RollupLib.assertionHash({ + parentAssertionHash: bytes32(0), + afterState: emptyAssertionState, + inboxAcc: bytes32(0) + }); + AssertionState firstState; + + event RollupCreated( + address indexed rollupAddress, + address indexed nativeToken, + address inboxAddress, + address outbox, + address rollupEventInbox, + address challengeManager, + address adminProxy, + address sequencerInbox, + address bridge, + address upgradeExecutor, + address validatorWalletCreator + ); + + IReader4844 dummyReader4844 = IReader4844(address(137)); + BridgeCreator.BridgeTemplates ethBasedTemplates = BridgeCreator.BridgeTemplates({ + bridge: new Bridge(), + sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, false), + delayBufferableSequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, true), + inbox: new Inbox(MAX_DATA_SIZE), + rollupEventInbox: new RollupEventInbox(), + outbox: new Outbox() + }); + BridgeCreator.BridgeTemplates erc20BasedTemplates = BridgeCreator.BridgeTemplates({ + bridge: new ERC20Bridge(), + sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, false), + delayBufferableSequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, true), + inbox: new ERC20Inbox(MAX_DATA_SIZE), + rollupEventInbox: new ERC20RollupEventInbox(), + outbox: new ERC20Outbox() + }); + + function setUp() public { + OneStepProver0 oneStepProver = new OneStepProver0(); + OneStepProverMemory oneStepProverMemory = new OneStepProverMemory(); + OneStepProverMath oneStepProverMath = new OneStepProverMath(); + OneStepProverHostIo oneStepProverHostIo = new OneStepProverHostIo(); + OneStepProofEntry oneStepProofEntry = new OneStepProofEntry( + oneStepProver, oneStepProverMemory, oneStepProverMath, oneStepProverHostIo + ); + EdgeChallengeManager edgeChallengeManager = new EdgeChallengeManager(); + + BridgeCreator bridgeCreator = new BridgeCreator(ethBasedTemplates, erc20BasedTemplates); + RollupCreator rollupCreator = new RollupCreator(); + RollupAdminLogic rollupAdminLogicImpl = new RollupAdminLogic(); + RollupUserLogic rollupUserLogicImpl = new RollupUserLogic(); + DeployHelper deployHelper = new DeployHelper(); + IUpgradeExecutor upgradeExecutorLogic = new UpgradeExecutorMock(); + + rollupCreator.setTemplates( + bridgeCreator, + oneStepProofEntry, + edgeChallengeManager, + rollupAdminLogicImpl, + rollupUserLogicImpl, + upgradeExecutorLogic, + address(0), + deployHelper + ); + + AssertionState memory emptyState = AssertionState( + GlobalState([bytes32(0), bytes32(0)], [uint64(0), uint64(0)]), + MachineStatus.FINISHED, + bytes32(0) + ); + token = new TestWETH9("Test", "TEST"); + IWETH9(address(token)).deposit{value: 10 ether}(); + + uint256[] memory miniStakeValues = new uint256[](5); + miniStakeValues[0] = 1 ether; + miniStakeValues[1] = 2 ether; + miniStakeValues[2] = 3 ether; + miniStakeValues[3] = 4 ether; + miniStakeValues[4] = 5 ether; + + Config memory config = Config({ + baseStake: BASE_STAKE, + chainId: 0, + chainConfig: "{}", + confirmPeriodBlocks: uint64(CONFIRM_PERIOD_BLOCKS), + owner: owner, + sequencerInboxMaxTimeVariation: ISequencerInbox.MaxTimeVariation({ + delayBlocks: (60 * 60 * 24) / 15, + futureBlocks: 12, + delaySeconds: 60 * 60 * 24, + futureSeconds: 60 * 60 + }), + stakeToken: address(token), + wasmModuleRoot: WASM_MODULE_ROOT, + loserStakeEscrow: loserStakeEscrow, + genesisAssertionState: emptyState, + genesisInboxCount: 0, + miniStakeValues: miniStakeValues, + layerZeroBlockEdgeHeight: 2 ** 5, + layerZeroBigStepEdgeHeight: 2 ** 5, + layerZeroSmallStepEdgeHeight: 2 ** 5, + anyTrustFastConfirmer: anyTrustFastConfirmer, + numBigStepLevel: 3, + challengeGracePeriodBlocks: CHALLENGE_GRACE_PERIOD_BLOCKS, + bufferConfig: BufferConfig({threshold: 600, max: 14400, replenishRateInBasis: 500}) + }); + + vm.expectEmit(false, false, false, false); + emit RollupCreated( + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0) + ); + + RollupCreator.RollupDeploymentParams memory param = RollupCreator.RollupDeploymentParams({ + config: config, + validators: new address[](0), + maxDataSize: MAX_DATA_SIZE, + nativeToken: address(0), + deployFactoriesToL2: false, + maxFeePerGasForRetryables: 0, + batchPosters: new address[](0), + batchPosterManager: address(0) + }); + + address rollupAddr = rollupCreator.createRollup(param); + // TODO: fix this + // bytes32 rollupSalt = keccak256(abi.encode(config, address(0), new address[](0), false, MAX_DATA_SIZE)); + // address expectedRollupAddress = Create2Upgradeable.computeAddress( + // rollupSalt, keccak256(type(RollupProxy).creationCode), address(rollupCreator) + // ); + // assertEq(expectedRollupAddress, rollupAddr, "Unexpected rollup address"); + + userRollup = RollupUserLogic(address(rollupAddr)); + adminRollup = RollupAdminLogic(address(rollupAddr)); + challengeManager = EdgeChallengeManager(address(userRollup.challengeManager())); + + assertEq(userRollup.sequencerInbox().maxDataSize(), MAX_DATA_SIZE); + assertFalse(userRollup.validatorWhitelistDisabled()); + + // check upgrade executor owns proxyAdmin + address upgradeExecutorExpectedAddress = computeCreateAddress(address(rollupCreator), 4); + upgradeExecutorAddr = userRollup.owner(); + assertEq(upgradeExecutorAddr, upgradeExecutorExpectedAddress, "Invalid proxyAdmin's owner"); + + vm.startPrank(upgradeExecutorAddr); + validators.push(validator1); + validators.push(validator2); + validators.push(validator3); + validators.push(address(this)); + flags.push(true); + flags.push(true); + flags.push(true); + flags.push(true); + adminRollup.setValidator(address[](validators), flags); + adminRollup.sequencerInbox().setIsBatchPoster(sequencer, true); + vm.stopPrank(); + + firstState.machineStatus = MachineStatus.FINISHED; + firstState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + firstState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + firstState.globalState.u64Vals[0] = 1; // inbox count + firstState.globalState.u64Vals[1] = 0; // pos in msg + + // TODO: determine if challengeManager should be permissionless at the stage + token.approve(address(challengeManager), type(uint256).max); + + token.transfer(validator1, 1 ether); + vm.deal(validator1, 1 ether); + vm.prank(validator1); + token.approve(address(userRollup), type(uint256).max); + vm.prank(validator1); + token.approve(address(challengeManager), type(uint256).max); + + token.transfer(validator2, 1 ether); + vm.deal(validator2, 1 ether); + vm.prank(validator2); + token.approve(address(userRollup), type(uint256).max); + vm.prank(validator2); + token.approve(address(challengeManager), type(uint256).max); + + token.transfer(validator3, 1 ether); + vm.deal(validator3, 1 ether); + vm.prank(validator3); + token.approve(address(userRollup), type(uint256).max); + vm.prank(validator3); + token.approve(address(challengeManager), type(uint256).max); + + vm.deal(sequencer, 1 ether); + + vm.roll(block.number + 75); + } + + function _createNewBatch() internal returns (uint256) { + uint256 count = userRollup.bridge().sequencerMessageCount(); + vm.startPrank(sequencer); + userRollup.sequencerInbox().addSequencerL2Batch({ + sequenceNumber: count, + data: "", + afterDelayedMessagesRead: 1, + gasRefunder: IGasRefunder(address(0)), + prevMessageCount: 0, + newMessageCount: 0 + }); + vm.stopPrank(); + assertEq(userRollup.bridge().sequencerMessageCount(), ++count); + return count; + } + + function testGenesisAssertionConfirmed() external { + bytes32 latestConfirmed = userRollup.latestConfirmed(); + assertEq(latestConfirmed, genesisHash); + assertEq(userRollup.getAssertion(latestConfirmed).status == AssertionStatus.Confirmed, true); + } + + function testSuccessPause() public { + vm.prank(upgradeExecutorAddr); + adminRollup.pause(); + } + + function testConfirmAssertionWhenPaused() public { + (bytes32 assertionHash, AssertionState memory state, uint64 inboxcount) = + testSuccessCreateAssertion(); + vm.roll(userRollup.getAssertion(genesisHash).firstChildBlock + CONFIRM_PERIOD_BLOCKS + 1); + bytes32 inboxAccs = userRollup.bridge().sequencerInboxAccs(0); + vm.prank(upgradeExecutorAddr); + adminRollup.pause(); + vm.prank(validator1); + vm.expectRevert("Pausable: paused"); + userRollup.confirmAssertion( + assertionHash, + genesisHash, + firstState, + bytes32(0), + ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: firstState.globalState.u64Vals[0] + }), + inboxAccs + ); + } + + function testSuccessPauseResume() public { + testSuccessPause(); + vm.prank(upgradeExecutorAddr); + adminRollup.resume(); + } + + function testSuccessOwner() public { + assertEq(userRollup.owner(), upgradeExecutorAddr); + } + + function testSuccessRemoveWhitelistAfterFork() public { + vm.chainId(313377); + userRollup.removeWhitelistAfterFork(); + } + + function testRevertRemoveWhitelistAfterFork() public { + vm.expectRevert("CHAIN_ID_NOT_CHANGED"); + userRollup.removeWhitelistAfterFork(); + } + + function testRevertRemoveWhitelistAfterForkAgain() public { + testSuccessRemoveWhitelistAfterFork(); + vm.expectRevert("WHITELIST_DISABLED"); + userRollup.removeWhitelistAfterFork(); + } + + function testSuccessCreateAssertion() public returns (bytes32, AssertionState memory, uint64) { + uint64 inboxcount = uint64(_createNewBatch()); + AssertionState memory beforeState; + beforeState.machineStatus = MachineStatus.FINISHED; + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + afterState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + afterState.globalState.u64Vals[0] = 1; // inbox count + afterState.globalState.u64Vals[1] = 0; // pos in msg + + bytes32 expectedAssertionHash = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + + vm.prank(validator1); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: expectedAssertionHash, + _withdrawalAddress: validator1Withdrawal + }); + + return (expectedAssertionHash, afterState, inboxcount); + } + + function testSuccessCreateAssertionUsingAddToDeposit() + public + returns (bytes32, AssertionState memory, uint64) + { + uint64 inboxcount = uint64(_createNewBatch()); + AssertionState memory beforeState; + beforeState.machineStatus = MachineStatus.FINISHED; + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + afterState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + afterState.globalState.u64Vals[0] = 1; // inbox count + afterState.globalState.u64Vals[1] = 0; // pos in msg + + bytes32 expectedAssertionHash = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + + vm.prank(validator1); + userRollup.newStake(0, validator1Withdrawal); + + address rando = address(98139098); + token.transfer(rando, BASE_STAKE); + + vm.startPrank(rando); + token.approve(address(userRollup), BASE_STAKE); + userRollup.addToDeposit(validator1, validator1Withdrawal, BASE_STAKE); + vm.stopPrank(); + + vm.prank(validator1); + userRollup.stakeOnNewAssertion({ + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: expectedAssertionHash + }); + + return (expectedAssertionHash, afterState, inboxcount); + } + + function testPartialDepositCanWithdraw() public { + IRollupCore.Staker memory emptyStaker; + + vm.prank(validator1); + userRollup.newStake(10, validator1Withdrawal); + + uint256 snapshot = vm.snapshot(); + + vm.prank(validator1); + userRollup.returnOldDeposit(); + + vm.prank(validator1Withdrawal); + userRollup.withdrawStakerFunds(); + + assertEq(token.balanceOf(validator1Withdrawal), 10); + assertEq( + keccak256(abi.encode(userRollup.getStaker(validator1))), + keccak256(abi.encode(emptyStaker)) + ); + + vm.revertTo(snapshot); + + vm.startPrank(validator1Withdrawal); + userRollup.returnOldDepositFor(validator1); + userRollup.withdrawStakerFunds(); + vm.stopPrank(); + + assertEq(token.balanceOf(validator1Withdrawal), 10); + assertEq( + keccak256(abi.encode(userRollup.getStaker(validator1))), + keccak256(abi.encode(emptyStaker)) + ); + } + + function testPartialDepositCannotMakeAssertion() public { + uint64 inboxcount = uint64(_createNewBatch()); + AssertionState memory beforeState; + beforeState.machineStatus = MachineStatus.FINISHED; + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + afterState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + afterState.globalState.u64Vals[0] = 1; // inbox count + afterState.globalState.u64Vals[1] = 0; // pos in msg + + bytes32 expectedAssertionHash = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + + vm.prank(validator1); + userRollup.newStake(BASE_STAKE - 1, validator1Withdrawal); + + vm.prank(validator1); + vm.expectRevert("INSUFFICIENT_STAKE"); + userRollup.stakeOnNewAssertion({ + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: expectedAssertionHash + }); + } + + function testSuccessGetStaker() public { + assertEq(userRollup.stakerCount(), 0); + testSuccessCreateAssertion(); + assertEq(userRollup.stakerCount(), 1); + assertEq(userRollup.getStakerAddress(userRollup.getStaker(validator1).index), validator1); + } + + function testSuccessCreateErroredAssertions() + public + returns (bytes32, AssertionState memory, uint64) + { + uint64 inboxcount = uint64(_createNewBatch()); + AssertionState memory beforeState; + beforeState.machineStatus = MachineStatus.FINISHED; + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.ERRORED; + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + afterState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + afterState.globalState.u64Vals[0] = 1; // inbox count + afterState.globalState.u64Vals[1] = 0; // pos in msg + + bytes32 expectedAssertionHash = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + + vm.prank(validator1); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: expectedAssertionHash, + _withdrawalAddress: validator1Withdrawal + }); + + return (expectedAssertionHash, afterState, inboxcount); + } + + function testRevertIdenticalAssertions() public { + AssertionState memory beforeState; + beforeState.machineStatus = MachineStatus.FINISHED; + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + afterState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + afterState.globalState.u64Vals[0] = 1; // inbox count + afterState.globalState.u64Vals[1] = 0; // pos in msg + + vm.prank(validator1); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: bytes32(0), + _withdrawalAddress: validator1Withdrawal + }); + + vm.prank(validator2); + vm.expectRevert("ASSERTION_SEEN"); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: bytes32(0), + _withdrawalAddress: validator2Withdrawal + }); + } + + function testRevertInvalidPrev() public { + uint64 inboxcount = uint64(_createNewBatch()); + AssertionState memory beforeState; + beforeState.machineStatus = MachineStatus.FINISHED; + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + afterState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + afterState.globalState.u64Vals[0] = 1; // inbox count + afterState.globalState.u64Vals[1] = 0; // pos in msg + + bytes32 expectedAssertionHash = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + + vm.prank(validator1); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: expectedAssertionHash, + _withdrawalAddress: validator1Withdrawal + }); + + AssertionState memory afterState2; + afterState2.machineStatus = MachineStatus.FINISHED; + afterState2.globalState.u64Vals[0] = inboxcount; + bytes32 expectedAssertionHash2 = RollupLib.assertionHash({ + parentAssertionHash: expectedAssertionHash, + afterState: afterState2, + inboxAcc: userRollup.bridge().sequencerInboxAccs(1) // 1 because we moved the position within message + }); + bytes32 prevInboxAcc = userRollup.bridge().sequencerInboxAccs(0); + + // set the wrong before state + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_SENDROOT; + + vm.roll(block.number + 75); + vm.prank(validator1); + vm.expectRevert("ASSERTION_NOT_EXIST"); + userRollup.stakeOnNewAssertion({ + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: prevInboxAcc, + prevPrevAssertionHash: genesisHash, + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState2.globalState.u64Vals[0] + }) + }), + beforeState: afterState, + afterState: afterState2 + }), + expectedAssertionHash: expectedAssertionHash2 + }); + } + + // need to have these in storage due to stack limit + bytes32[] randomStates1; + bytes32[] randomStates2; + + function testSuccessCreateSecondChild() + public + returns ( + AssertionState memory, + AssertionState memory, + AssertionState memory, + uint256, + uint256, + bytes32, + bytes32 + ) + { + uint256 genesisInboxCount = 1; + uint64 newInboxCount = uint64(_createNewBatch()); + AssertionState memory beforeState; + beforeState.machineStatus = MachineStatus.FINISHED; + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + afterState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + afterState.globalState.u64Vals[0] = 1; // inbox count + afterState.globalState.u64Vals[1] = 0; // pos in msg + + { + IOneStepProofEntry osp = userRollup.challengeManager().oneStepProofEntry(); + bytes32 h0 = osp.getMachineHash(beforeState.toExecutionState()); + bytes32 h1 = osp.getMachineHash(afterState.toExecutionState()); + randomStates1 = fillStatesInBetween(h0, h1, LAYERZERO_BLOCKEDGE_HEIGHT + 1); + afterState.endHistoryRoot = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(randomStates1, 0, LAYERZERO_BLOCKEDGE_HEIGHT + 1) + ); + } + + bytes32 expectedAssertionHash = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + + vm.prank(validator1); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: expectedAssertionHash, + _withdrawalAddress: validator1Withdrawal + }); + + AssertionState memory afterState2; + afterState2.machineStatus = MachineStatus.FINISHED; + afterState2.globalState.bytes32Vals[0] = + keccak256(abi.encodePacked(FIRST_ASSERTION_BLOCKHASH)); // blockhash + afterState2.globalState.bytes32Vals[1] = + keccak256(abi.encodePacked(FIRST_ASSERTION_SENDROOT)); // sendroot + afterState2.globalState.u64Vals[0] = 1; // inbox count + afterState2.globalState.u64Vals[1] = 0; // modify the state + + { + IOneStepProofEntry osp = userRollup.challengeManager().oneStepProofEntry(); + bytes32 h0 = osp.getMachineHash(beforeState.toExecutionState()); + bytes32 h1 = osp.getMachineHash(afterState2.toExecutionState()); + randomStates2 = fillStatesInBetween(h0, h1, LAYERZERO_BLOCKEDGE_HEIGHT + 1); + afterState2.endHistoryRoot = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(randomStates2, 0, LAYERZERO_BLOCKEDGE_HEIGHT + 1) + ); + } + + bytes32 expectedAssertionHash2 = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState2, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + vm.prank(validator2); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: AssertionInputs({ + beforeState: beforeState, + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState2.globalState.u64Vals[0] + }) + }), + afterState: afterState2 + }), + expectedAssertionHash: expectedAssertionHash2, + _withdrawalAddress: validator2Withdrawal + }); + + assertEq(userRollup.getAssertion(genesisHash).secondChildBlock, block.number); + + return ( + beforeState, + afterState, + afterState2, + genesisInboxCount, + newInboxCount, + expectedAssertionHash, + expectedAssertionHash2 + ); + } + + function testSuccessCreateSecondChildDifferentRoot() + public + returns (SuccessCreateChallengeData memory data) + { + ( + data.beforeState, + data.afterState1, + data.afterState2, + data.genesisInboxCount, + data.newInboxCount, + data.assertionHash, + data.assertionHash2 + ) = testSuccessCreateSecondChild(); + AssertionState memory afterState3 = data.afterState2; + afterState3.endHistoryRoot = keccak256(abi.encode(afterState3.endHistoryRoot)); + + bytes32 expectedAssertionHash3 = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState3, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + vm.prank(validator3); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: AssertionInputs({ + beforeState: data.beforeState, + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState3.globalState.u64Vals[0] + }) + }), + afterState: afterState3 + }), + expectedAssertionHash: expectedAssertionHash3, + _withdrawalAddress: validator3Withdrawal + }); + } + + function testRevertConfirmWrongInput() public { + (bytes32 assertionHash1,,) = testSuccessCreateAssertion(); + vm.roll(userRollup.getAssertion(genesisHash).firstChildBlock + CONFIRM_PERIOD_BLOCKS + 1); + bytes32 inboxAccs = userRollup.bridge().sequencerInboxAccs(0); + vm.prank(validator1); + vm.expectRevert("CONFIRM_DATA"); + userRollup.confirmAssertion( + assertionHash1, + genesisHash, + emptyAssertionState, + bytes32(0), + ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: firstState.globalState.u64Vals[0] + }), + inboxAccs + ); + } + + function testSuccessConfirmUnchallengedAssertions() + public + returns (bytes32, AssertionState memory, uint64) + { + (bytes32 assertionHash, AssertionState memory state, uint64 inboxcount) = + testSuccessCreateAssertion(); + vm.roll(userRollup.getAssertion(genesisHash).firstChildBlock + CONFIRM_PERIOD_BLOCKS + 1); + bytes32 inboxAccs = userRollup.bridge().sequencerInboxAccs(0); + vm.prank(validator1); + userRollup.confirmAssertion( + assertionHash, + genesisHash, + firstState, + bytes32(0), + ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: firstState.globalState.u64Vals[0] + }), + inboxAccs + ); + return (assertionHash, state, inboxcount); + } + + function testSuccessRemoveWhitelistAfterValidatorAfk() public { + (bytes32 assertionHash,,) = testSuccessConfirmUnchallengedAssertions(); + vm.roll( + userRollup.getAssertion(assertionHash).createdAtBlock + userRollup.validatorAfkBlocks() + + 1 + ); + userRollup.removeWhitelistAfterValidatorAfk(); + } + + function testSuccessSetValidatorAfk( + uint32 x + ) public { + vm.assume(x > 0); + (bytes32 assertionHash,,) = testSuccessConfirmUnchallengedAssertions(); + vm.prank(upgradeExecutorAddr); + adminRollup.setValidatorAfkBlocks(x); + vm.roll(userRollup.getAssertion(assertionHash).createdAtBlock + x); + vm.expectRevert("VALIDATOR_NOT_AFK"); + userRollup.removeWhitelistAfterValidatorAfk(); + vm.roll(block.number + 1); + userRollup.removeWhitelistAfterValidatorAfk(); + } + + function testSuccessValidatorAfkDisable() public { + (bytes32 assertionHash,,) = testSuccessConfirmUnchallengedAssertions(); + vm.prank(upgradeExecutorAddr); + adminRollup.setValidatorAfkBlocks(0); // set 0 to disable + vm.roll(userRollup.getAssertion(assertionHash).createdAtBlock + 1); + vm.expectRevert("VALIDATOR_NOT_AFK"); + userRollup.removeWhitelistAfterValidatorAfk(); + } + + function testRevertRemoveWhitelistAfterValidatorAfk() public { + vm.expectRevert("VALIDATOR_NOT_AFK"); + userRollup.removeWhitelistAfterValidatorAfk(); + } + + function testRevertConfirmSiblingedAssertions() public { + (,,,,, bytes32 assertionHash,) = testSuccessCreateSecondChild(); + vm.roll(userRollup.getAssertion(genesisHash).firstChildBlock + CONFIRM_PERIOD_BLOCKS + 1); + bytes32 inboxAccs = userRollup.bridge().sequencerInboxAccs(0); + vm.prank(validator1); + + vm.expectRevert(abi.encodeWithSelector(EdgeNotExists.selector, bytes32(0))); + userRollup.confirmAssertion( + assertionHash, + genesisHash, + firstState, + bytes32(0), + ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: firstState.globalState.u64Vals[0] + }), + inboxAccs + ); + } + + struct SuccessCreateChallengeData { + AssertionState beforeState; + uint256 genesisInboxCount; + AssertionState afterState1; + AssertionState afterState2; + uint256 newInboxCount; + bytes32 e1Id; + bytes32 assertionHash; + bytes32 assertionHash2; + } + + function testSuccessCreateChallenge() public returns (SuccessCreateChallengeData memory data) { + ( + data.beforeState, + data.afterState1, + data.afterState2, + data.genesisInboxCount, + data.newInboxCount, + data.assertionHash, + data.assertionHash2 + ) = testSuccessCreateSecondChild(); + + bytes32 root = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(randomStates1, 0, LAYERZERO_BLOCKEDGE_HEIGHT + 1) + ); + + data.e1Id = challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: root, + endHeight: LAYERZERO_BLOCKEDGE_HEIGHT, + claimId: data.assertionHash, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(randomStates1, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(randomStates1, 1, randomStates1.length) + ) + ), + proof: abi.encode( + ProofUtils.generateInclusionProof( + ProofUtils.rehashed(randomStates1), randomStates1.length - 1 + ), + AssertionStateData(data.beforeState, bytes32(0), bytes32(0)), + AssertionStateData( + data.afterState1, genesisHash, userRollup.bridge().sequencerInboxAccs(0) + ) + ) + }) + ); + } + + function testSuccessCreate2Edge() public returns (bytes32, bytes32) { + SuccessCreateChallengeData memory data = testSuccessCreateChallenge(); + require(data.genesisInboxCount == 1, "A"); + require(data.newInboxCount == 2, "B"); + + bytes32 root = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(randomStates2, 0, LAYERZERO_BLOCKEDGE_HEIGHT + 1) + ); + + token.transfer(validator1, 1 ether); + vm.startPrank(validator1); + bytes32 e2Id = challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: root, + endHeight: LAYERZERO_BLOCKEDGE_HEIGHT, + claimId: data.assertionHash2, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(randomStates2, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(randomStates2, 1, randomStates2.length) + ) + ), + proof: abi.encode( + ProofUtils.generateInclusionProof( + ProofUtils.rehashed(randomStates2), randomStates2.length - 1 + ), + AssertionStateData(data.beforeState, bytes32(0), bytes32(0)), + AssertionStateData( + data.afterState2, genesisHash, userRollup.bridge().sequencerInboxAccs(0) + ) + ) + }) + ); + vm.stopPrank(); + + return (data.e1Id, e2Id); + } + + function fillStatesInBetween( + bytes32 start, + bytes32 end, + uint256 totalCount + ) internal returns (bytes32[] memory) { + bytes32[] memory innerStates = rand.hashes(totalCount - 2); + + bytes32[] memory states = new bytes32[](totalCount); + states[0] = start; + for (uint256 i = 0; i < innerStates.length; i++) { + states[i + 1] = innerStates[i]; + } + states[totalCount - 1] = end; + + return states; + } + + function testSuccessConfirmEdgeByTime() public returns (bytes32) { + SuccessCreateChallengeData memory data = testSuccessCreateChallenge(); + + vm.roll(userRollup.getAssertion(genesisHash).firstChildBlock + CONFIRM_PERIOD_BLOCKS + 1); + vm.warp(block.timestamp + CONFIRM_PERIOD_BLOCKS * 15); + userRollup.challengeManager().confirmEdgeByTime( + data.e1Id, + AssertionStateData( + data.afterState1, genesisHash, userRollup.bridge().sequencerInboxAccs(0) + ) + ); + bytes32 inboxAcc = userRollup.bridge().sequencerInboxAccs(0); + vm.roll(block.number + userRollup.challengeGracePeriodBlocks()); + vm.prank(validator1); + userRollup.confirmAssertion( + data.assertionHash, + genesisHash, + data.afterState1, + data.e1Id, + ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: firstState.globalState.u64Vals[0] + }), + inboxAcc + ); + return data.e1Id; + } + + function testRevertConfirmBeforeAfterPeriodBlocks() public returns (bytes32) { + SuccessCreateChallengeData memory data = testSuccessCreateChallenge(); + + vm.roll(userRollup.getAssertion(genesisHash).firstChildBlock + CONFIRM_PERIOD_BLOCKS + 1); + vm.warp(block.timestamp + CONFIRM_PERIOD_BLOCKS * 15); + userRollup.challengeManager().confirmEdgeByTime( + data.e1Id, + AssertionStateData( + data.afterState1, genesisHash, userRollup.bridge().sequencerInboxAccs(0) + ) + ); + bytes32 inboxAcc = userRollup.bridge().sequencerInboxAccs(0); + vm.roll(block.number + userRollup.challengeGracePeriodBlocks() - 1); + vm.prank(validator1); + vm.expectRevert("CHALLENGE_GRACE_PERIOD_NOT_PASSED"); + userRollup.confirmAssertion( + data.assertionHash, + genesisHash, + data.afterState1, + data.e1Id, + ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: firstState.globalState.u64Vals[0] + }), + inboxAcc + ); + return data.e1Id; + } + + function testRevertWithdrawStake() public { + testSuccessConfirmEdgeByTime(); + vm.prank(validator1); + vm.expectRevert("NO_FUNDS_TO_WITHDRAW"); + userRollup.withdrawStakerFunds(); + } + + function testSuccessWithdrawStake() public { + testSuccessConfirmEdgeByTime(); + vm.prank(validator1); + userRollup.returnOldDeposit(); + + RollupCore.Staker memory emptyStaker; + assertEq( + keccak256(abi.encode(emptyStaker)), + keccak256(abi.encode(userRollup.getStaker(validator1))) + ); + + assertGt(userRollup.withdrawableFunds(validator1Withdrawal), 0); + assertEq(token.balanceOf(validator1Withdrawal), 0); + vm.prank(validator1Withdrawal); + userRollup.withdrawStakerFunds(); + assertEq(token.balanceOf(validator1Withdrawal), BASE_STAKE); + } + + function testRevertWithdrawActiveStake() public { + testSuccessConfirmEdgeByTime(); + vm.prank(validator2); + vm.expectRevert("STAKE_ACTIVE"); + userRollup.returnOldDeposit(); + } + + function testSuccessWithdrawExcessStake() public { + uint256 prevBal = token.balanceOf(loserStakeEscrow); + testSuccessCreateSecondChild(); + uint256 afterBal = token.balanceOf(loserStakeEscrow); + assertEq(afterBal - prevBal, BASE_STAKE, "loser stake not sent to escrow"); + } + + function testRevertAlreadyStaked() public { + testSuccessCreateAssertion(); + vm.prank(validator1); + AssertionInputs memory emptyAssertion; + vm.expectRevert("ALREADY_STAKED"); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: emptyAssertion, + expectedAssertionHash: bytes32(0), + _withdrawalAddress: validator2Withdrawal + }); + } + + function testRevertZeroWithdrawalAddress() public { + testSuccessCreateAssertion(); + vm.prank(validator1); + AssertionInputs memory emptyAssertion; + vm.expectRevert("EMPTY_WITHDRAWAL_ADDRESS"); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: emptyAssertion, + expectedAssertionHash: bytes32(0), + _withdrawalAddress: address(0) + }); + } + + function testSuccessReduceDeposit() public { + testSuccessConfirmEdgeByTime(); + vm.prank(validator1); + userRollup.reduceDeposit(1); + } + + function testRevertReduceDepositActive() public { + testSuccessCreateAssertion(); + vm.prank(validator1); + vm.expectRevert("STAKE_ACTIVE"); + userRollup.reduceDeposit(1); + } + + function testAddToDepositWithdrawalAddressCheck() public { + testSuccessConfirmEdgeByTime(); + vm.prank(validator1); + vm.expectRevert("WRONG_WITHDRAWAL_ADDRESS"); + userRollup.addToDeposit(validator1, validator2Withdrawal, 1); + } + + function testSuccessAddToDeposit() public { + testSuccessConfirmEdgeByTime(); + vm.prank(validator1); + userRollup.addToDeposit(validator1, validator1Withdrawal, 1); + } + + function testRevertAddToDepositNotValidator() public { + testSuccessConfirmEdgeByTime(); + vm.prank(sequencer); + vm.expectRevert("NOT_VALIDATOR"); + userRollup.addToDeposit(address(10043902309), address(92803809), 1); + } + + function testRevertAddToDepositNotStaker() public { + testSuccessConfirmEdgeByTime(); + vm.prank(validator1); + vm.expectRevert("NOT_STAKED"); + userRollup.addToDeposit(address(this), validator2Withdrawal, 1); + } + + function testSuccessCreateSecondAssertion() + public + returns (bytes32, bytes32, AssertionState memory, bytes32) + { + (bytes32 prevHash, AssertionState memory beforeState, uint64 prevInboxCount) = + testSuccessCreateAssertion(); + + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.u64Vals[0] = prevInboxCount; + bytes32 inboxAcc = userRollup.bridge().sequencerInboxAccs(1); // 1 because we moved the position within message + bytes32 expectedAssertionHash2 = RollupLib.assertionHash({ + parentAssertionHash: prevHash, + afterState: afterState, + inboxAcc: inboxAcc + }); + bytes32 prevInboxAcc = userRollup.bridge().sequencerInboxAccs(0); + vm.roll(block.number + 75); + vm.prank(validator1); + userRollup.stakeOnNewAssertion({ + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: prevInboxAcc, + prevPrevAssertionHash: genesisHash, + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: expectedAssertionHash2 + }); + return (prevHash, expectedAssertionHash2, afterState, inboxAcc); + } + + function testRevertCreateChildReducedStake() public { + (bytes32 prevHash, AssertionState memory beforeState, uint64 prevInboxCount) = + testSuccessConfirmUnchallengedAssertions(); + + vm.prank(validator1); + userRollup.reduceDeposit(1); + + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.u64Vals[0] = prevInboxCount; + bytes32 expectedAssertionHash2 = RollupLib.assertionHash({ + parentAssertionHash: prevHash, + afterState: afterState, + inboxAcc: userRollup.bridge().sequencerInboxAccs(1) // 1 because we moved the position within message + }); + bytes32 prevInboxAcc = userRollup.bridge().sequencerInboxAccs(0); + vm.roll(block.number + 75); + vm.prank(validator1); + vm.expectRevert("INSUFFICIENT_STAKE"); + userRollup.stakeOnNewAssertion({ + assertion: AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: prevInboxAcc, + prevPrevAssertionHash: genesisHash, + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }), + expectedAssertionHash: expectedAssertionHash2 + }); + } + + function testSuccessFastConfirmNext() public { + (bytes32 assertionHash,,) = testSuccessCreateAssertion(); + bytes32 inboxAccs = userRollup.bridge().sequencerInboxAccs(0); + assertEq(userRollup.latestConfirmed(), genesisHash); + vm.prank(anyTrustFastConfirmer); + userRollup.fastConfirmAssertion(assertionHash, genesisHash, firstState, inboxAccs); + assertEq(userRollup.latestConfirmed(), assertionHash); + } + + function testSuccessFastConfirmSkipOne() public { + ( + bytes32 prevHash, + bytes32 assertionHash, + AssertionState memory afterState, + bytes32 inboxAcc + ) = testSuccessCreateSecondAssertion(); + assertEq(userRollup.latestConfirmed() != prevHash, true); + vm.prank(anyTrustFastConfirmer); + userRollup.fastConfirmAssertion(assertionHash, prevHash, afterState, inboxAcc); + assertEq(userRollup.latestConfirmed(), assertionHash); + } + + function testRevertFastConfirmNotPending() public { + (bytes32 assertionHash,,) = testSuccessConfirmUnchallengedAssertions(); + bytes32 inboxAccs = userRollup.bridge().sequencerInboxAccs(0); + vm.expectRevert("NOT_PENDING"); + vm.prank(anyTrustFastConfirmer); + userRollup.fastConfirmAssertion(assertionHash, genesisHash, firstState, inboxAccs); + } + + function testRevertFastConfirmNotConfirmer() public { + (bytes32 assertionHash,,) = testSuccessCreateAssertion(); + bytes32 inboxAccs = userRollup.bridge().sequencerInboxAccs(0); + vm.expectRevert("NOT_FAST_CONFIRMER"); + userRollup.fastConfirmAssertion(assertionHash, genesisHash, firstState, inboxAccs); + } + + function _testFastConfirmNewAssertion( + address by, + string memory err, + bool isCreated + ) internal returns (AssertionInputs memory, bytes32) { + uint64 inboxcount = uint64(_createNewBatch()); + AssertionState memory beforeState; + beforeState.machineStatus = MachineStatus.FINISHED; + AssertionState memory afterState; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + afterState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + afterState.globalState.u64Vals[0] = 1; // inbox count + afterState.globalState.u64Vals[1] = 0; // pos in msg + + bytes32 expectedAssertionHash = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + + AssertionInputs memory assertion = AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }); + + if (isCreated) { + vm.prank(validator1); + userRollup.newStakeOnNewAssertion({ + tokenAmount: BASE_STAKE, + assertion: assertion, + expectedAssertionHash: expectedAssertionHash, + _withdrawalAddress: validator1Withdrawal + }); + } + + if (bytes(err).length > 0) { + vm.expectRevert(bytes(err)); + } + vm.prank(by); + userRollup.fastConfirmNewAssertion({ + assertion: assertion, + expectedAssertionHash: expectedAssertionHash + }); + if (bytes(err).length == 0) { + assertEq(userRollup.latestConfirmed(), expectedAssertionHash); + } + return (assertion, expectedAssertionHash); + } + + function testSuccessFastConfirmNewAssertion() public { + _testFastConfirmNewAssertion(anyTrustFastConfirmer, "", false); + } + + function testRevertFastConfirmNewAssertionNotConfirmer() public { + _testFastConfirmNewAssertion(validator1, "NOT_FAST_CONFIRMER", false); + } + + function testSuccessFastConfirmNewAssertionPending() public { + _testFastConfirmNewAssertion(anyTrustFastConfirmer, "", true); + } + + function testRevertFastConfirmNewAssertionConfirmed() public { + (AssertionInputs memory assertion, bytes32 expectedAssertionHash) = + _testFastConfirmNewAssertion(anyTrustFastConfirmer, "", true); + vm.expectRevert("NOT_PENDING"); + vm.prank(anyTrustFastConfirmer); + userRollup.fastConfirmNewAssertion({ + assertion: assertion, + expectedAssertionHash: expectedAssertionHash + }); + } + + bytes32 constant _IMPLEMENTATION_PRIMARY_SLOT = + 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + bytes32 constant _IMPLEMENTATION_SECONDARY_SLOT = + 0x2b1dbce74324248c222f0ec2d5ed7bd323cfc425b336f0253c5ccfda7265546d; + + // should only allow admin to upgrade primary logic + function testRevertUpgradeNotAdmin() public { + RollupAdminLogic newAdminLogicImpl = new RollupAdminLogic(); + vm.expectRevert(); + adminRollup.upgradeTo(address(newAdminLogicImpl)); + } + + function testRevertUpgradeNotUUPS() public { + vm.prank(upgradeExecutorAddr); + vm.expectRevert(); + adminRollup.upgradeTo(address(rollup)); + } + + function testRevertUpgradePrimaryAsSecondary() public { + RollupAdminLogic newAdminLogicImpl = new RollupAdminLogic(); + vm.prank(upgradeExecutorAddr); + vm.expectRevert("ERC1967Upgrade: unsupported secondary proxiableUUID"); + adminRollup.upgradeSecondaryTo(address(newAdminLogicImpl)); + } + + function testRevertUpgradeSecondaryAsPrimary() public { + RollupUserLogic newUserLogicImpl = new RollupUserLogic(); + vm.prank(upgradeExecutorAddr); + vm.expectRevert("ERC1967Upgrade: unsupported proxiableUUID"); + adminRollup.upgradeTo(address(newUserLogicImpl)); + } + + function testSuccessUpgradePrimary() public { + address ori_secondary_impl = + address(uint160(uint256(vm.load(address(userRollup), _IMPLEMENTATION_SECONDARY_SLOT)))); + + RollupAdminLogic newAdminLogicImpl = new RollupAdminLogic(); + vm.prank(upgradeExecutorAddr); + adminRollup.upgradeTo(address(newAdminLogicImpl)); + + address new_primary_impl = + address(uint160(uint256(vm.load(address(userRollup), _IMPLEMENTATION_PRIMARY_SLOT)))); + address new_secondary_impl = + address(uint160(uint256(vm.load(address(userRollup), _IMPLEMENTATION_SECONDARY_SLOT)))); + + assertEq(address(newAdminLogicImpl), new_primary_impl); + assertEq(ori_secondary_impl, new_secondary_impl); + } + + function testSuccessUpgradePrimaryAndCall() public { + address ori_secondary_impl = + address(uint160(uint256(vm.load(address(userRollup), _IMPLEMENTATION_SECONDARY_SLOT)))); + + RollupAdminLogic newAdminLogicImpl = new RollupAdminLogic(); + vm.prank(upgradeExecutorAddr); + adminRollup.upgradeToAndCall( + address(newAdminLogicImpl), abi.encodeCall(adminRollup.pause, ()) + ); + assertEq(adminRollup.paused(), true); + + address new_primary_impl = + address(uint160(uint256(vm.load(address(userRollup), _IMPLEMENTATION_PRIMARY_SLOT)))); + address new_secondary_impl = + address(uint160(uint256(vm.load(address(userRollup), _IMPLEMENTATION_SECONDARY_SLOT)))); + + assertEq(address(newAdminLogicImpl), new_primary_impl); + assertEq(ori_secondary_impl, new_secondary_impl); + } + + function testSuccessUpgradeSecondary() public { + address ori_primary_impl = + address(uint160(uint256(vm.load(address(userRollup), _IMPLEMENTATION_PRIMARY_SLOT)))); + + RollupUserLogic newUserLogicImpl = new RollupUserLogic(); + vm.prank(upgradeExecutorAddr); + adminRollup.upgradeSecondaryTo(address(newUserLogicImpl)); + + address new_primary_impl = + address(uint160(uint256(vm.load(address(userRollup), _IMPLEMENTATION_PRIMARY_SLOT)))); + address new_secondary_impl = + address(uint160(uint256(vm.load(address(userRollup), _IMPLEMENTATION_SECONDARY_SLOT)))); + + assertEq(ori_primary_impl, new_primary_impl); + assertEq(address(newUserLogicImpl), new_secondary_impl); + } + + function testRevertInitAdminLogicDirectly() public { + RollupAdminLogic newAdminLogicImpl = new RollupAdminLogic(); + Config memory c; + ContractDependencies memory cd; + vm.expectRevert("Function must be called through delegatecall"); + newAdminLogicImpl.initialize(c, cd); + } + + function testRevertInitUserLogicDirectly() public { + RollupUserLogic newUserLogicImpl = new RollupUserLogic(); + vm.expectRevert("Function must be called through delegatecall"); + newUserLogicImpl.initialize(address(token)); + } + + function testRevertInitTwice() public { + Config memory c; + ContractDependencies memory cd; + vm.prank(upgradeExecutorAddr); + vm.expectRevert("Initializable: contract is already initialized"); + adminRollup.initialize(c, cd); + } + + function testRevertChainIDFork() public { + ISequencerInbox sequencerInbox = userRollup.sequencerInbox(); + vm.expectRevert(NotForked.selector); + sequencerInbox.removeDelayAfterFork(); + } + + function testRevertNotBatchPoster() public { + ISequencerInbox sequencerInbox = userRollup.sequencerInbox(); + vm.expectRevert(NotBatchPoster.selector); + sequencerInbox.addSequencerL2Batch(0, "0x", 0, IGasRefunder(address(0)), 0, 0); + } + + function testSuccessSetChallengeManager() public { + vm.prank(upgradeExecutorAddr); + adminRollup.setChallengeManager(address(0xdeadbeef)); + assertEq(address(userRollup.challengeManager()), address(0xdeadbeef)); + } + + function testRevertSetChallengeManager() public { + vm.expectRevert(); + adminRollup.setChallengeManager(address(0xdeadbeef)); + } + + function testAssertionStateHash() public { + AssertionState memory astate = AssertionState( + GlobalState( + [rand.hash(), rand.hash()], + [uint64(uint256(rand.hash())), uint64(uint256(rand.hash()))] + ), + MachineStatus.FINISHED, + bytes32(0) + ); + bytes32 expectedHash = keccak256(abi.encode(astate)); + assertEq(astate.hash(), expectedHash, "Unexpected hash"); + } + + function testAssertionHash() public { + bytes32 parentHash = rand.hash(); + AssertionState memory astate = AssertionState( + GlobalState( + [rand.hash(), rand.hash()], + [uint64(uint256(rand.hash())), uint64(uint256(rand.hash()))] + ), + MachineStatus.FINISHED, + bytes32(0) + ); + bytes32 inboxAcc = rand.hash(); + bytes32 expectedHash = keccak256(abi.encodePacked(parentHash, astate.hash(), inboxAcc)); + assertEq( + RollupLib.assertionHash(parentHash, astate, inboxAcc), expectedHash, "Unexpected hash" + ); + } + + // do this last as it changes the base stake + function testBaseStake() public { + assertEq(adminRollup.baseStake(), BASE_STAKE, "Invalid before base stake"); + + // increase base stake amount + vm.startPrank(upgradeExecutorAddr); + adminRollup.setBaseStake(BASE_STAKE + 1); + assertEq(adminRollup.baseStake(), BASE_STAKE + 1, "Invalid after increase base stake"); + + // set it to be the same + vm.expectRevert("BASE_STAKE_MUST_BE_INCREASED"); + adminRollup.setBaseStake(BASE_STAKE + 1); + + // set it to be less + vm.expectRevert("BASE_STAKE_MUST_BE_INCREASED"); + adminRollup.setBaseStake(BASE_STAKE); + } +} diff --git a/test/challengeV2/ArrayUtilsLib.t.sol b/test/challengeV2/ArrayUtilsLib.t.sol new file mode 100644 index 00000000..11e9b003 --- /dev/null +++ b/test/challengeV2/ArrayUtilsLib.t.sol @@ -0,0 +1,141 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "forge-std/Test.sol"; +import "../../src/challengeV2/libraries/ArrayUtilsLib.sol"; +import "./Utils.sol"; + +contract ArrayUtilsLibTest is Test { + Random random = new Random(); + + function areEqual(bytes32[] memory a, bytes32[] memory b) internal { + assertEq(a.length, b.length, "Len unequal"); + + for (uint256 i = 0; i < a.length; i++) { + assertEq(a[i], b[i]); + } + } + + function testAppendSingle() public { + bytes32 r = random.hash(); + bytes32[] memory e = new bytes32[](1); + e[0] = r; + + bytes32[] memory n = new bytes32[](0); + bytes32[] memory n2 = ArrayUtilsLib.append(n, r); + areEqual(n2, e); + } + + function testAppend() public { + bytes32[] memory o = random.hashes(3); + bytes32[] memory expected = new bytes32[](4); + expected[0] = o[0]; + expected[1] = o[1]; + expected[2] = o[2]; + bytes32 n = random.hash(); + expected[3] = n; + bytes32[] memory actual = ArrayUtilsLib.append(o, n); + + areEqual(actual, expected); + assertEq(actual.length, 4, "len 4"); + + bytes32[] memory expected2 = new bytes32[](5); + expected2[0] = o[0]; + expected2[1] = o[1]; + expected2[2] = o[2]; + expected2[3] = n; + bytes32 n2 = random.hash(); + expected2[4] = n2; + bytes32[] memory actual2 = ArrayUtilsLib.append(actual, n2); + + areEqual(actual2, expected2); + assertEq(actual2.length, 5, "len 5"); + } + + function testSliceAll() public { + bytes32[] memory o = random.hashes(5); + + bytes32[] memory s = ArrayUtilsLib.slice(o, 0, o.length); + areEqual(o, s); + } + + function testSliceStart() public { + bytes32[] memory o = random.hashes(5); + bytes32[] memory s = ArrayUtilsLib.slice(o, 0, 3); + + bytes32[] memory e = new bytes32[](3); + e[0] = o[0]; + e[1] = o[1]; + e[2] = o[2]; + areEqual(e, s); + } + + function testSliceEnd() public { + bytes32[] memory o = random.hashes(5); + bytes32[] memory s = ArrayUtilsLib.slice(o, 3, 5); + + bytes32[] memory e = new bytes32[](2); + e[0] = o[3]; + e[1] = o[4]; + areEqual(e, s); + } + + function testSliceMiddle() public { + bytes32[] memory o = random.hashes(5); + bytes32[] memory s = ArrayUtilsLib.slice(o, 2, 4); + + bytes32[] memory e = new bytes32[](2); + e[0] = o[2]; + e[1] = o[3]; + areEqual(e, s); + } + + function testSliceOutOfBoundStart() public { + bytes32[] memory o = random.hashes(5); + vm.expectRevert("End not less or equal than length"); + ArrayUtilsLib.slice(o, 5, 6); + } + + function testSliceOutOfBoundEnd() public { + bytes32[] memory o = random.hashes(5); + vm.expectRevert("End not less or equal than length"); + ArrayUtilsLib.slice(o, 3, 6); + } + + function testSliceStartGtEnd() public { + bytes32[] memory o = random.hashes(5); + vm.expectRevert("Start not less than end"); + ArrayUtilsLib.slice(o, 3, 3); + } + + function testConcat() public { + bytes32[] memory o = random.hashes(2); + bytes32[] memory o2 = random.hashes(3); + bytes32[] memory expected = new bytes32[](5); + expected[0] = o[0]; + expected[1] = o[1]; + expected[2] = o2[0]; + expected[3] = o2[1]; + expected[4] = o2[2]; + + bytes32[] memory r = ArrayUtilsLib.concat(o, o2); + areEqual(r, expected); + } + + function testConcatEmpty() public { + bytes32[] memory o = random.hashes(2); + bytes32[] memory o2 = new bytes32[](0); + + bytes32[] memory r = ArrayUtilsLib.concat(o, o2); + areEqual(r, o); + + bytes32[] memory r2 = ArrayUtilsLib.concat(o2, o); + areEqual(r2, o); + + bytes32[] memory r3 = ArrayUtilsLib.concat(o2, o2); + areEqual(r3, o2); + } +} diff --git a/test/challengeV2/ChallengeEdgeLib.t.sol b/test/challengeV2/ChallengeEdgeLib.t.sol new file mode 100644 index 00000000..71834457 --- /dev/null +++ b/test/challengeV2/ChallengeEdgeLib.t.sol @@ -0,0 +1,421 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "forge-std/Test.sol"; +import "./Utils.sol"; +import "../../src/challengeV2/libraries/ChallengeEdgeLib.sol"; + +contract TestChallengeEdge { + function levelToType( + uint8 level, + uint8 numBigStepLevels + ) public pure returns (EdgeType eType) { + return ChallengeEdgeLib.levelToType(level, numBigStepLevels); + } +} + +contract ChallengeEdgeLibAccess { + ChallengeEdge storageEdge; + + function getChallengeEdge() public view returns (ChallengeEdge memory) { + return storageEdge; + } + + function setChallengeEdge( + ChallengeEdge memory edge + ) public { + storageEdge = edge; + } + + function deleteChallengeEdge() public { + delete storageEdge; + } + + function newEdgeChecks( + bytes32 originId, + bytes32 startHistoryRoot, + uint256 startHeight, + bytes32 endHistoryRoot, + uint256 endHeight + ) public pure { + return ChallengeEdgeLib.newEdgeChecks( + originId, startHistoryRoot, startHeight, endHistoryRoot, endHeight + ); + } + + function newLayerZeroEdge( + bytes32 originId, + bytes32 startHistoryRoot, + uint256 startHeight, + bytes32 endHistoryRoot, + uint256 endHeight, + bytes32 claimId, + address staker, + uint8 level + ) public view returns (ChallengeEdge memory) { + return ChallengeEdgeLib.newLayerZeroEdge( + originId, + startHistoryRoot, + startHeight, + endHistoryRoot, + endHeight, + claimId, + staker, + level + ); + } + + function newChildEdge( + bytes32 originId, + bytes32 startHistoryRoot, + uint256 startHeight, + bytes32 endHistoryRoot, + uint256 endHeight, + uint8 level + ) public view returns (ChallengeEdge memory) { + return ChallengeEdgeLib.newChildEdge( + originId, startHistoryRoot, startHeight, endHistoryRoot, endHeight, level + ); + } + + function mutualIdComponent( + uint8 level, + bytes32 originId, + uint256 startHeight, + bytes32 startHistoryRoot, + uint256 endHeight + ) public pure returns (bytes32) { + return ChallengeEdgeLib.mutualIdComponent( + level, originId, startHeight, startHistoryRoot, endHeight + ); + } + + function mutualId() public view returns (bytes32) { + return ChallengeEdgeLib.mutualId(storageEdge); + } + + function mutualIdMem( + ChallengeEdge memory ce + ) public pure returns (bytes32) { + return ChallengeEdgeLib.mutualIdMem(ce); + } + + function idComponent( + uint8 level, + bytes32 originId, + uint256 startHeight, + bytes32 startHistoryRoot, + uint256 endHeight, + bytes32 endHistoryRoot + ) public pure returns (bytes32) { + return ChallengeEdgeLib.idComponent( + level, originId, startHeight, startHistoryRoot, endHeight, endHistoryRoot + ); + } + + function idMem( + ChallengeEdge memory edge + ) public pure returns (bytes32) { + return ChallengeEdgeLib.idMem(edge); + } + + function id() public view returns (bytes32) { + return ChallengeEdgeLib.id(storageEdge); + } + + function exists() public view returns (bool) { + return ChallengeEdgeLib.exists(storageEdge); + } + + function length() public view returns (uint256) { + return ChallengeEdgeLib.length(storageEdge); + } + + function setChildren(bytes32 lowerChildId, bytes32 upperChildId) public { + return ChallengeEdgeLib.setChildren(storageEdge, lowerChildId, upperChildId); + } + + function setConfirmed() public { + return ChallengeEdgeLib.setConfirmed(storageEdge); + } + + function isLayerZero() public view returns (bool) { + return ChallengeEdgeLib.isLayerZero(storageEdge); + } + + function setRefunded() public { + return ChallengeEdgeLib.setRefunded(storageEdge); + } + + function levelToType( + uint8 level, + uint8 numBigStepLevels + ) public pure returns (EdgeType eType) { + return ChallengeEdgeLib.levelToType(level, numBigStepLevels); + } +} + +contract ChallengeEdgeLibTest is Test { + Random rand = new Random(); + uint8 constant NUM_BIGSTEP_LEVEL = 3; + + function randCheckArgs() internal returns (bytes32, bytes32, bytes32) { + return (rand.hash(), rand.hash(), rand.hash()); + } + + function testEdgeChecks() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLib.newEdgeChecks(originId, startRoot, 10, endRoot, 15); + } + + function testEdgeChecksZeroOrigin() public { + (, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + vm.expectRevert(abi.encodeWithSelector(EmptyOriginId.selector)); + access.newEdgeChecks(0, startRoot, 10, endRoot, 15); + } + + function testEdgeChecksStartRoot() public { + (bytes32 originId,, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + vm.expectRevert(abi.encodeWithSelector(EmptyStartRoot.selector)); + access.newEdgeChecks(originId, 0, 10, endRoot, 15); + } + + function testEdgeChecksEndRoot() public { + (bytes32 originId, bytes32 startRoot,) = randCheckArgs(); + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + vm.expectRevert(abi.encodeWithSelector(EmptyEndRoot.selector)); + access.newEdgeChecks(originId, startRoot, 10, 0, 15); + } + + function testEdgeChecksHeightLessThan() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + vm.expectRevert(abi.encodeWithSelector(InvalidHeights.selector, 10, 5)); + access.newEdgeChecks(originId, startRoot, 10, endRoot, 5); + } + + function testEdgeChecksHeightEqual() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + vm.expectRevert(abi.encodeWithSelector(InvalidHeights.selector, 10, 10)); + access.newEdgeChecks(originId, startRoot, 10, endRoot, 10); + } + + function testNewLayerZeroEdge() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + bytes32 claimId = rand.hash(); + address staker = rand.addr(); + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + ChallengeEdge memory e = access.newLayerZeroEdge( + originId, startRoot, 10, endRoot, 15, claimId, staker, NUM_BIGSTEP_LEVEL + 1 + ); + assertEq(e.originId, originId, "Origin id"); + assertEq(e.startHeight, 10, "Start height"); + assertEq(e.startHistoryRoot, startRoot, "Start root"); + assertEq(e.endHeight, 15, "end height"); + assertEq(e.endHistoryRoot, endRoot, "End root"); + assertEq(e.lowerChildId, 0, "Lower child"); + assertEq(e.upperChildId, 0, "Upper child"); + assertEq(e.createdAtBlock, block.number, "Block number"); + assertEq(e.createdAtBlock, 1, "Block number 1"); + assertEq(e.claimId, claimId, "Claim id"); + assertEq(e.staker, staker, "Staker"); + assertTrue(e.status == EdgeStatus.Pending, "Status"); + assertTrue(e.level == NUM_BIGSTEP_LEVEL + 1, "EType"); + assertEq( + access.mutualIdMem(e), + keccak256( + abi.encodePacked( + e.level, e.originId, e.startHeight, e.startHistoryRoot, e.endHeight + ) + ), + "Id mem" + ); + } + + function testNewLayerZeroEdgeZeroStaker() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + bytes32 claimId = rand.hash(); + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + vm.expectRevert(abi.encodeWithSelector(EmptyStaker.selector)); + access.newLayerZeroEdge( + originId, startRoot, 10, endRoot, 15, claimId, address(0), NUM_BIGSTEP_LEVEL + 1 + ); + } + + function testNewLayerZeroEdgeZeroClaimId() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + address staker = rand.addr(); + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + vm.expectRevert(abi.encodeWithSelector(EmptyClaimId.selector)); + access.newLayerZeroEdge( + originId, startRoot, 10, endRoot, 15, 0, staker, NUM_BIGSTEP_LEVEL + 1 + ); + } + + function testNewChildEdge() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + ChallengeEdge memory e = + access.newChildEdge(originId, startRoot, 10, endRoot, 15, NUM_BIGSTEP_LEVEL + 1); + assertEq(e.originId, originId, "Origin id"); + assertEq(e.startHeight, 10, "Start height"); + assertEq(e.startHistoryRoot, startRoot, "Start root"); + assertEq(e.endHeight, 15, "end height"); + assertEq(e.endHistoryRoot, endRoot, "End root"); + assertEq(e.lowerChildId, 0, "Lower child"); + assertEq(e.upperChildId, 0, "Upper child"); + assertEq(e.createdAtBlock, block.number, "Block number"); + assertEq(e.createdAtBlock, 1, "Block number 1"); + assertEq(e.claimId, 0, "Claim id"); + assertEq(e.staker, address(0), "Staker"); + assertTrue(e.status == EdgeStatus.Pending, "Status"); + assertTrue(e.level == NUM_BIGSTEP_LEVEL + 1, "EType"); + } + + function testEdgeExists() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + bytes32 claimId = rand.hash(); + address staker = rand.addr(); + + ChallengeEdgeLibAccess layerZero = new ChallengeEdgeLibAccess(); + ChallengeEdgeLibAccess child = new ChallengeEdgeLibAccess(); + + assertFalse(layerZero.exists(), "Layer zero exists"); + assertFalse(child.exists(), "Child exists"); + + ChallengeEdge memory layerZeroEdge = layerZero.newLayerZeroEdge( + originId, startRoot, 10, endRoot, 15, claimId, staker, NUM_BIGSTEP_LEVEL + 1 + ); + layerZero.setChallengeEdge(layerZeroEdge); + ChallengeEdge memory childEdge = + child.newChildEdge(originId, startRoot, 10, endRoot, 17, NUM_BIGSTEP_LEVEL + 1); + child.setChallengeEdge(childEdge); + + assertTrue(layerZero.exists(), "Layer zero exists"); + assertTrue(child.exists(), "Child exists"); + + layerZero.deleteChallengeEdge(); + child.deleteChallengeEdge(); + + assertFalse(layerZero.exists(), "Layer zero exists"); + assertFalse(child.exists(), "Child exists"); + } + + function testLength() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + bytes32 claimId = rand.hash(); + address staker = rand.addr(); + + ChallengeEdgeLibAccess layerZero = new ChallengeEdgeLibAccess(); + ChallengeEdgeLibAccess child = new ChallengeEdgeLibAccess(); + + ChallengeEdge memory layerZeroEdge = ChallengeEdgeLib.newLayerZeroEdge( + originId, startRoot, 10, endRoot, 15, claimId, staker, NUM_BIGSTEP_LEVEL + 1 + ); + layerZero.setChallengeEdge(layerZeroEdge); + ChallengeEdge memory childEdge = ChallengeEdgeLib.newChildEdge( + originId, startRoot, 10, endRoot, 17, NUM_BIGSTEP_LEVEL + 1 + ); + child.setChallengeEdge(childEdge); + + assertEq(layerZero.length(), 5, "L-zero len"); + assertEq(child.length(), 7, "Child len"); + + layerZero.deleteChallengeEdge(); + child.deleteChallengeEdge(); + + vm.expectRevert(abi.encodeWithSelector(EdgeNotExists.selector, layerZero.id())); + layerZero.length(); + + vm.expectRevert(abi.encodeWithSelector(EdgeNotExists.selector, child.id())); + child.length(); + } + + function testSetChildren() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLibAccess child = new ChallengeEdgeLibAccess(); + ChallengeEdge memory childEdge = ChallengeEdgeLib.newChildEdge( + originId, startRoot, 10, endRoot, 17, NUM_BIGSTEP_LEVEL + 1 + ); + child.setChallengeEdge(childEdge); + + bytes32 lowerChildId = rand.hash(); + bytes32 upperChildId = rand.hash(); + child.setChildren(lowerChildId, upperChildId); + + assertEq(child.getChallengeEdge().lowerChildId, lowerChildId, "Lower child id"); + assertEq(child.getChallengeEdge().upperChildId, upperChildId, "Upper child id"); + + delete child; + } + + function testSetChildrenTwice() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLibAccess child = new ChallengeEdgeLibAccess(); + ChallengeEdge memory childEdge = ChallengeEdgeLib.newChildEdge( + originId, startRoot, 10, endRoot, 17, NUM_BIGSTEP_LEVEL + 1 + ); + child.setChallengeEdge(childEdge); + + bytes32 lowerChildId = rand.hash(); + bytes32 upperChildId = rand.hash(); + child.setChildren(lowerChildId, upperChildId); + vm.expectRevert( + abi.encodeWithSelector( + ChildrenAlreadySet.selector, child.id(), lowerChildId, upperChildId + ) + ); + child.setChildren(lowerChildId, upperChildId); + } + + function testSetConfirmed() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLibAccess child = new ChallengeEdgeLibAccess(); + ChallengeEdge memory childEdge = ChallengeEdgeLib.newChildEdge( + originId, startRoot, 10, endRoot, 17, NUM_BIGSTEP_LEVEL + 1 + ); + child.setChallengeEdge(childEdge); + + vm.roll(137); + + child.setConfirmed(); + assertTrue(child.getChallengeEdge().status == EdgeStatus.Confirmed, "Status confirmed"); + assertTrue(child.getChallengeEdge().confirmedAtBlock == 137, "Confirmed at block"); + } + + function testSetConfirmedTwice() public { + (bytes32 originId, bytes32 startRoot, bytes32 endRoot) = randCheckArgs(); + ChallengeEdgeLibAccess child = new ChallengeEdgeLibAccess(); + ChallengeEdge memory childEdge = ChallengeEdgeLib.newChildEdge( + originId, startRoot, 10, endRoot, 17, NUM_BIGSTEP_LEVEL + 1 + ); + child.setChallengeEdge(childEdge); + + child.setConfirmed(); + vm.expectRevert( + abi.encodeWithSelector(EdgeNotPending.selector, child.id(), EdgeStatus.Confirmed) + ); + child.setConfirmed(); + } + + function testLevelToType() public { + ChallengeEdgeLibAccess access = new ChallengeEdgeLibAccess(); + uint8 numBigStep = 4; + assertTrue(access.levelToType(0, numBigStep) == EdgeType.Block, "Block"); + assertTrue(access.levelToType(1, numBigStep) == EdgeType.BigStep, "Big step 1"); + assertTrue(access.levelToType(2, numBigStep) == EdgeType.BigStep, "Big step 2"); + assertTrue(access.levelToType(3, numBigStep) == EdgeType.BigStep, "Big step 3"); + assertTrue(access.levelToType(4, numBigStep) == EdgeType.BigStep, "Big step 4"); + assertTrue(access.levelToType(5, numBigStep) == EdgeType.SmallStep, "Small step"); + + TestChallengeEdge t = new TestChallengeEdge(); + vm.expectRevert(abi.encodeWithSelector(LevelTooHigh.selector, 6, 4)); + t.levelToType(6, numBigStep); + } +} diff --git a/test/challengeV2/EdgeChallengeManager.t.sol b/test/challengeV2/EdgeChallengeManager.t.sol new file mode 100644 index 00000000..226eb55f --- /dev/null +++ b/test/challengeV2/EdgeChallengeManager.t.sol @@ -0,0 +1,2366 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "forge-std/Test.sol"; +import "./Utils.sol"; +import "../MockAssertionChain.sol"; +import "../../src/challengeV2/EdgeChallengeManager.sol"; +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import "../ERC20Mock.sol"; +import "./StateTools.sol"; + +contract MockOneStepProofEntry is IOneStepProofEntry { + function getStartMachineHash( + bytes32 globalStateHash, + bytes32 wasmModuleRoot + ) external pure returns (bytes32) { + return keccak256(abi.encodePacked("Machine:", globalStateHash, wasmModuleRoot)); + } + + function proveOneStep( + ExecutionContext calldata, + uint256, + bytes32, + bytes calldata proof + ) external pure returns (bytes32 afterHash) { + return bytes32(proof); + } + + function getMachineHash( + ExecutionState calldata execState + ) external pure override returns (bytes32) { + require(execState.machineStatus == MachineStatus.FINISHED, "BAD_MACHINE_STATUS"); + return GlobalStateLib.hash(execState.globalState); + } +} + +contract EdgeChallengeManagerTest is Test { + using ChallengeEdgeLib for ChallengeEdge; + using AssertionStateLib for AssertionState; + + event TimerCacheUpdated(bytes32 indexed edgeId, uint256 newValue); + + Random rand = new Random(); + bytes32 genesisBlockHash = rand.hash(); + AssertionState genesisState = + StateToolsLib.randomState(rand, 4, genesisBlockHash, MachineStatus.FINISHED); + bytes32 genesisStateHash = StateToolsLib.mockMachineHash(genesisState); + bytes32 genesisAfterStateHash = genesisState.hash(); + AssertionStateData genesisStateData = AssertionStateData(genesisState, bytes32(0), bytes32(0)); + + uint8 public NUM_BIGSTEP_LEVEL = 3; + uint256 public START_BLOCK = block.number; + uint256 public NUM_BLOCK_UNRIVALED = 2; + uint256 public NUM_BLOCK_WAIT = 3; + + bytes32 genesisAssertionHash; + + function genesisStates() internal view returns (bytes32[] memory) { + bytes32[] memory genStates = new bytes32[](1); + genStates[0] = genesisStateHash; + return genStates; + } + + bytes32 genesisRoot = + MerkleTreeAccumulatorLib.root(ProofUtils.expansionFromLeaves(genesisStates(), 0, 1)); + + uint256 genesisHeight = 2; + uint64 inboxMsgCountGenesis = 7; + uint64 inboxMsgCountAssertion = 12; + + bytes32 h1 = rand.hash(); + bytes32 h2 = rand.hash(); + uint256 height1 = 32; + + address excessStakeReceiver = address(77); + address nobody = address(78); + + uint64 challengePeriodBlock = 1000; + AssertionStateData empty; + + function miniStakeAmounts() internal view returns (uint256[] memory) { + uint256 numLevels = NUM_BIGSTEP_LEVEL + 2; + uint256[] memory amounts = new uint256[](numLevels); + for (uint256 i = 0; i < numLevels; i++) { + amounts[i] = (numLevels - i) * 1 ether; + } + return amounts; + } + + function appendRandomStates( + bytes32[] memory currentStates, + uint256 numStates + ) internal returns (bytes32[] memory, bytes32[] memory) { + bytes32[] memory newStates = rand.hashes(numStates); + bytes32[] memory full = ArrayUtilsLib.concat(currentStates, newStates); + bytes32[] memory exp = ProofUtils.expansionFromLeaves(full, 0, full.length); + + return (full, exp); + } + + function deploy() internal returns (MockAssertionChain, EdgeChallengeManager, bytes32) { + MockAssertionChain assertionChain = new MockAssertionChain(); + assertionChain.setValidatorWhitelistDisabled(true); + EdgeChallengeManager challengeManagerTemplate = new EdgeChallengeManager(); + EdgeChallengeManager challengeManager = EdgeChallengeManager( + address( + new TransparentUpgradeableProxy( + address(challengeManagerTemplate), address(new ProxyAdmin()), "" + ) + ) + ); + challengeManager.initialize( + assertionChain, + challengePeriodBlock, + new MockOneStepProofEntry(), + 2 ** 5, + 2 ** 5, + 2 ** 5, + new ERC20Mock("StakeToken", "ST", address(this), 1000000 ether), + excessStakeReceiver, + NUM_BIGSTEP_LEVEL, + miniStakeAmounts() + ); + + challengeManager.stakeToken().approve(address(challengeManager), type(uint256).max); + + genesisAssertionHash = assertionChain.addAssertionUnsafe( + 0, genesisHeight, inboxMsgCountGenesis, genesisState, 0 + ); + return (assertionChain, challengeManager, genesisAssertionHash); + } + + function testDeployInit() public { + MockAssertionChain assertionChain = new MockAssertionChain(); + EdgeChallengeManager emt = new EdgeChallengeManager(); + EdgeChallengeManager ecm = EdgeChallengeManager( + address(new TransparentUpgradeableProxy(address(emt), address(new ProxyAdmin()), "")) + ); + MockOneStepProofEntry osp = new MockOneStepProofEntry(); + ERC20Mock erc20 = new ERC20Mock("StakeToken", "ST", address(this), 1000000 ether); + + vm.expectRevert( + abi.encodeWithSelector( + StakeAmountsMismatch.selector, NUM_BIGSTEP_LEVEL, NUM_BIGSTEP_LEVEL + 2 + ) + ); + ecm.initialize( + assertionChain, + challengePeriodBlock, + osp, + 2 ** 5, + 2 ** 5, + 2 ** 5, + erc20, + excessStakeReceiver, + NUM_BIGSTEP_LEVEL, + new uint256[](NUM_BIGSTEP_LEVEL) + ); + + vm.expectRevert(abi.encodeWithSelector(EmptyAssertionChain.selector)); + ecm.initialize( + IAssertionChain(address(0)), + challengePeriodBlock, + osp, + 2 ** 5, + 2 ** 5, + 2 ** 5, + erc20, + excessStakeReceiver, + NUM_BIGSTEP_LEVEL, + miniStakeAmounts() + ); + + vm.expectRevert(abi.encodeWithSelector(EmptyOneStepProofEntry.selector)); + ecm.initialize( + assertionChain, + challengePeriodBlock, + IOneStepProofEntry(address(0)), + 2 ** 5, + 2 ** 5, + 2 ** 5, + erc20, + excessStakeReceiver, + NUM_BIGSTEP_LEVEL, + miniStakeAmounts() + ); + + vm.expectRevert(abi.encodeWithSelector(EmptyChallengePeriod.selector)); + ecm.initialize( + assertionChain, + 0, + osp, + 2 ** 5, + 2 ** 5, + 2 ** 5, + erc20, + excessStakeReceiver, + NUM_BIGSTEP_LEVEL, + miniStakeAmounts() + ); + + vm.expectRevert(abi.encodeWithSelector(EmptyStakeReceiver.selector)); + ecm.initialize( + assertionChain, + challengePeriodBlock, + osp, + 2 ** 5, + 2 ** 5, + 2 ** 5, + erc20, + address(0), + NUM_BIGSTEP_LEVEL, + miniStakeAmounts() + ); + + vm.expectRevert(abi.encodeWithSelector(NotPowerOfTwo.selector, (2 ** 5) + 1)); + ecm.initialize( + assertionChain, + challengePeriodBlock, + osp, + (2 ** 5) + 1, + 2 ** 5, + 2 ** 5, + erc20, + excessStakeReceiver, + NUM_BIGSTEP_LEVEL, + miniStakeAmounts() + ); + + vm.expectRevert(abi.encodeWithSelector(NotPowerOfTwo.selector, (2 ** 5) + 1)); + ecm.initialize( + assertionChain, + challengePeriodBlock, + osp, + 2 ** 5, + (2 ** 5) + 1, + 2 ** 5, + erc20, + excessStakeReceiver, + NUM_BIGSTEP_LEVEL, + miniStakeAmounts() + ); + + vm.expectRevert(abi.encodeWithSelector(NotPowerOfTwo.selector, (2 ** 5) + 1)); + ecm.initialize( + assertionChain, + challengePeriodBlock, + osp, + 2 ** 5, + 2 ** 5, + (2 ** 5) + 1, + erc20, + excessStakeReceiver, + NUM_BIGSTEP_LEVEL, + miniStakeAmounts() + ); + + vm.expectRevert(abi.encodeWithSelector(ZeroBigStepLevels.selector)); + ecm.initialize( + assertionChain, + challengePeriodBlock, + osp, + 2 ** 5, + 2 ** 5, + 2 ** 5, + erc20, + excessStakeReceiver, + 0, + miniStakeAmounts() + ); + + vm.expectRevert(abi.encodeWithSelector(BigStepLevelsTooMany.selector, 254)); + ecm.initialize( + assertionChain, + challengePeriodBlock, + osp, + 2 ** 5, + 2 ** 5, + 2 ** 5, + erc20, + excessStakeReceiver, + 254, + miniStakeAmounts() + ); + } + + struct EdgeInitData { + MockAssertionChain assertionChain; + EdgeChallengeManager challengeManager; + bytes32 genesis; + bytes32 a1; + bytes32 a2; + AssertionState a1State; + AssertionState a2State; + AssertionStateData a1Data; + AssertionStateData a2Data; + } + + // need to have these in storage due to stack limit + bytes32[] a1RandomStates; + bytes32[] a1RandomStatesExp; + bytes32[] a2RandomStates; + bytes32[] a2RandomStatesExp; + + function deployAndInit() internal returns (EdgeInitData memory) { + (MockAssertionChain assertionChain, EdgeChallengeManager challengeManager, bytes32 genesis) + = deploy(); + + AssertionState memory a1State = StateToolsLib.randomState( + rand, + GlobalStateLib.getInboxPosition(genesisState.globalState), + h1, + MachineStatus.FINISHED + ); + AssertionState memory a2State = StateToolsLib.randomState( + rand, + GlobalStateLib.getInboxPosition(genesisState.globalState), + h2, + MachineStatus.FINISHED + ); + + (a1RandomStates, a1RandomStatesExp) = appendRandomStatesBetween( + genesisStates(), StateToolsLib.mockMachineHash(a1State), height1 + ); + a1State.endHistoryRoot = MerkleTreeAccumulatorLib.root(a1RandomStatesExp); + (a2RandomStates, a2RandomStatesExp) = appendRandomStatesBetween( + genesisStates(), StateToolsLib.mockMachineHash(a2State), height1 + ); + a2State.endHistoryRoot = MerkleTreeAccumulatorLib.root(a2RandomStatesExp); + + // add one since heights are zero indexed in the history states + bytes32 a1 = assertionChain.addAssertion( + genesis, genesisHeight + height1, inboxMsgCountAssertion, genesisState, a1State, 0 + ); + bytes32 a2 = assertionChain.addAssertion( + genesis, genesisHeight + height1, inboxMsgCountAssertion, genesisState, a2State, 0 + ); + + return EdgeInitData({ + assertionChain: assertionChain, + challengeManager: challengeManager, + genesis: genesis, + a1: a1, + a2: a2, + a1State: a1State, + a2State: a2State, + a1Data: AssertionStateData(a1State, genesis, bytes32(0)), + a2Data: AssertionStateData(a2State, genesis, bytes32(0)) + }); + } + + function testWhitelist() public { + (MockAssertionChain assertionChain, EdgeChallengeManager challengeManager, bytes32 genesis) + = deploy(); + + assertionChain.setValidatorWhitelistDisabled(false); + + CreateEdgeArgs memory emptyArgs; + vm.expectRevert(abi.encodeWithSelector(NotValidator.selector, address(this))); + challengeManager.createLayerZeroEdge(emptyArgs); + + assertionChain.setIsValidator(address(this), true); + testCanCreateEdgeWithStake(); + } + + function testRevertBlockNoFork() public { + (MockAssertionChain assertionChain, EdgeChallengeManager challengeManager, bytes32 genesis) + = deploy(); + + AssertionState memory a1State = StateToolsLib.randomState( + rand, + GlobalStateLib.getInboxPosition(genesisState.globalState), + h1, + MachineStatus.FINISHED + ); + + (bytes32[] memory states, bytes32[] memory exp) = appendRandomStatesBetween( + genesisStates(), StateToolsLib.mockMachineHash(a1State), height1 + ); + a1State.endHistoryRoot = MerkleTreeAccumulatorLib.root(exp); + + bytes32 a1 = assertionChain.addAssertion( + genesis, genesisHeight + height1, inboxMsgCountAssertion, genesisState, a1State, 0 + ); + + vm.expectRevert(abi.encodeWithSelector(AssertionNoSibling.selector)); + challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp), + endHeight: height1, + claimId: a1, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states, 1, states.length)) + ), + proof: abi.encode( + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states), states.length - 1), + genesisStateData, + AssertionStateData(a1State, genesisAssertionHash, bytes32(0)) + ) + }) + ); + } + + function testRevertBlockInvalidHeight() public { + EdgeInitData memory ei = deployAndInit(); + + bytes32[] memory states = a1RandomStates; + bytes32[] memory exp = a1RandomStatesExp; + + vm.expectRevert(abi.encodeWithSelector(InvalidEndHeight.selector, 1, 32)); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp), + endHeight: 1, + claimId: ei.a1, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states, 1, states.length)) + ), + proof: abi.encode( + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states), states.length - 1), + genesisStateData, + ei.a1Data + ) + }) + ); + } + + function testRevertBlockNoProof() public { + EdgeInitData memory ei = deployAndInit(); + + bytes32[] memory states = a1RandomStates; + bytes32[] memory exp = a1RandomStatesExp; + + vm.expectRevert(abi.encodeWithSelector(EmptyEdgeSpecificProof.selector)); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp), + endHeight: height1, + claimId: ei.a1, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states, 1, states.length)) + ), + proof: "" + }) + ); + } + + function testRevertBlockInvalidProof() public { + EdgeInitData memory ei = deployAndInit(); + + bytes32[] memory states = a1RandomStates; + bytes32[] memory exp = a1RandomStatesExp; + + vm.expectRevert("Invalid inclusion proof"); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp), + endHeight: height1, + claimId: ei.a1, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states, 1, states.length)) + ), + proof: abi.encode( + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states), 0), + genesisStateData, + ei.a1Data + ) + }) + ); + } + + function testRevertInvalidHash() public { + EdgeInitData memory ei = deployAndInit(); + + bytes32[] memory states = a1RandomStates; + bytes32[] memory exp = a1RandomStatesExp; + + vm.expectRevert("INVALID_ASSERTION_HASH"); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp), + endHeight: height1, + claimId: ei.a2, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states, 1, states.length)) + ), + proof: abi.encode( + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states), 0), + genesisStateData, + ei.a1Data + ) + }) + ); + } + + function testRevertInvalidHashPrev() public { + EdgeInitData memory ei = deployAndInit(); + + bytes32[] memory states = a1RandomStates; + bytes32[] memory exp = a1RandomStatesExp; + + vm.expectRevert("INVALID_ASSERTION_HASH"); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp), + endHeight: height1, + claimId: ei.a1, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states, 1, states.length)) + ), + proof: abi.encode( + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states), states.length - 1), + ei.a2Data, + ei.a1Data + ) + }) + ); + } + + function testCanCreateEdgeWithStake() + public + returns (EdgeInitData memory, bytes32[] memory, bytes32[] memory, bytes32) + { + EdgeInitData memory ei = deployAndInit(); + + bytes32[] memory states = a1RandomStates; + bytes32[] memory exp = a1RandomStatesExp; + + IERC20 stakeToken = ei.challengeManager.stakeToken(); + uint256 beforeBalance = stakeToken.balanceOf(address(this)); + bytes32 edgeId = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp), + endHeight: height1, + claimId: ei.a1, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states, 1, states.length)) + ), + proof: abi.encode( + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states), states.length - 1), + genesisStateData, + ei.a1Data + ) + }) + ); + uint256 afterBalance = stakeToken.balanceOf(address(this)); + assertEq(beforeBalance - afterBalance, ei.challengeManager.stakeAmounts(0), "Staked"); + + // test the getters + assertEq(ei.challengeManager.edgeExists(edgeId), true, "Edge exists"); + ChallengeEdge memory edge = ei.challengeManager.getEdge(edgeId); + assertEq( + ei.challengeManager.calculateMutualId( + edge.level, edge.originId, edge.startHeight, edge.startHistoryRoot, edge.endHeight + ), + edge.mutualIdMem(), + "Mutual id" + ); + assertEq( + ei.challengeManager.calculateEdgeId( + edge.level, + edge.originId, + edge.startHeight, + edge.startHistoryRoot, + edge.endHeight, + edge.endHistoryRoot + ), + edge.idMem(), + "Mutual id" + ); + assertEq(ei.challengeManager.edgeLength(edgeId), height1, "Edge length"); + assertEq(ei.challengeManager.hasRival(edgeId), false, "Edge has rival"); + assertEq(ei.challengeManager.confirmedRival(edgeId), bytes32(0), "Confirmed rival"); + assertEq(ei.challengeManager.hasLengthOneRival(edgeId), false, "Has length one rival"); + assertEq( + ei.challengeManager.firstRival(edge.mutualIdMem()), + EdgeChallengeManagerLib.UNRIVALED, + "Unrivaled" + ); + + return (ei, states, exp, edgeId); + } + + function testCanConfirmByTime() public { + (EdgeInitData memory ei,,, bytes32 edgeId) = testCanCreateEdgeWithStake(); + + _safeVmRoll(START_BLOCK + challengePeriodBlock); + + ei.challengeManager.confirmEdgeByTime(edgeId, ei.a1Data); + + assertTrue( + ei.challengeManager.getEdge(edgeId).status == EdgeStatus.Confirmed, "Edge confirmed" + ); + } + + function testCanConfirmByTimeNotLayerZero() public { + EdgeInitData memory ei = deployAndInit(); + (,, BisectionChildren[6] memory blockEdges1,) = createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + _safeVmRoll(START_BLOCK + challengePeriodBlock); + + ChallengeEdge memory ce = ei.challengeManager.getEdge(blockEdges1[0].lowerChildId); + + vm.expectRevert( + abi.encodeWithSelector( + EdgeNotLayerZero.selector, blockEdges1[0].lowerChildId, ce.staker, ce.claimId + ) + ); + ei.challengeManager.confirmEdgeByTime(blockEdges1[0].lowerChildId, ei.a1Data); + } + + function testCanConfirmByChildren() public returns (EdgeInitData memory, bytes32) { + (EdgeInitData memory ei, bytes32[] memory states1,, bytes32 edge1Id) = + testCanCreateEdgeWithStake(); + + _safeVmRoll(block.number + NUM_BLOCK_UNRIVALED); + + assertEq(ei.challengeManager.timeUnrivaled(edge1Id), NUM_BLOCK_UNRIVALED, "Edge1 timer"); + { + bytes32[] memory states2 = a2RandomStates; + bytes32[] memory exp2 = a2RandomStatesExp; + bytes32 edge2Id = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp2), + endHeight: height1, + claimId: ei.a2, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states2, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(states2, 1, states2.length) + ) + ), + proof: abi.encode( + ProofUtils.generateInclusionProof( + ProofUtils.rehashed(states2), states2.length - 1 + ), + genesisStateData, + ei.a2Data + ) + }) + ); + + _safeVmRoll(block.number + NUM_BLOCK_WAIT); + assertEq(ei.challengeManager.timeUnrivaled(edge1Id), NUM_BLOCK_UNRIVALED, "Edge1 timer"); + assertEq(ei.challengeManager.timeUnrivaled(edge2Id), 0, "Edge2 timer"); + } + + BisectionChildren memory children = + bisect(ei.challengeManager, edge1Id, states1, 16, states1.length - 1); + + _safeVmRoll(block.number + challengePeriodBlock); + + ei.challengeManager.updateTimerCacheByChildren(children.lowerChildId, challengePeriodBlock); + + vm.expectRevert( + abi.encodeWithSelector( + CachedTimeSufficient.selector, challengePeriodBlock, challengePeriodBlock + ) + ); + ei.challengeManager.updateTimerCacheByChildren(children.lowerChildId, challengePeriodBlock); + + ei.challengeManager.updateTimerCacheByChildren(children.upperChildId, challengePeriodBlock); + ei.challengeManager.confirmEdgeByTime(edge1Id, ei.a1Data); + + assertTrue( + ei.challengeManager.getEdge(edge1Id).status == EdgeStatus.Confirmed, "Edge confirmed" + ); + + return (ei, edge1Id); + } + + function testRevertConfirmAnotherRival() public { + (EdgeInitData memory ei, bytes32 edge1Id) = testCanConfirmByChildren(); + + AssertionState memory a2State = StateToolsLib.randomState( + rand, + GlobalStateLib.getInboxPosition(genesisState.globalState), + h2, + MachineStatus.FINISHED + ); + (bytes32[] memory states2, bytes32[] memory exp2) = appendRandomStatesBetween( + genesisStates(), StateToolsLib.mockMachineHash(a2State), height1 + ); + a2State.endHistoryRoot = MerkleTreeAccumulatorLib.root(exp2); + bytes32 a2 = ei.assertionChain.addAssertion( + ei.genesis, genesisHeight + height1, inboxMsgCountAssertion, genesisState, a2State, 0 + ); + + bytes32 edge2Id = createLayerZeroEdge(ei.challengeManager, a2, a2State, states2, exp2); + + BisectionChildren memory children = + bisect(ei.challengeManager, edge2Id, states2, 16, states2.length - 1); + BisectionChildren memory children2 = + bisect(ei.challengeManager, children.lowerChildId, states2, 8, 16); + _safeVmRoll(block.number + challengePeriodBlock); + + bytes32[] memory edgeIds = new bytes32[](5); + edgeIds[0] = children2.lowerChildId; + edgeIds[1] = children2.upperChildId; + edgeIds[2] = children.lowerChildId; + edgeIds[3] = children.upperChildId; + edgeIds[4] = edge2Id; + ei.challengeManager.multiUpdateTimeCacheByChildren(edgeIds, challengePeriodBlock); + + vm.expectRevert(abi.encodeWithSelector(RivalEdgeConfirmed.selector, edge2Id, edge1Id)); + ei.challengeManager.confirmEdgeByTime(edge2Id, ei.a2Data); + + assertFalse( + ei.challengeManager.getEdge(edge1Id).status + == ei.challengeManager.getEdge(edge2Id).status + ); + assertTrue(edge1Id != edge2Id, "Same edge"); + assertEq( + ei.challengeManager.getEdge(edge1Id).mutualIdMem(), + ei.challengeManager.getEdge(edge2Id).mutualIdMem(), + "Is rival" + ); + } + + function testCantConfirmEdgeByTimeTwice() public { + (EdgeInitData memory ei, bytes32 edge1Id) = testCanConfirmByChildren(); + + vm.expectRevert( + abi.encodeWithSelector(EdgeNotPending.selector, edge1Id, EdgeStatus.Confirmed) + ); + ei.challengeManager.confirmEdgeByTime(edge1Id, ei.a1Data); + } + + function bisect( + EdgeChallengeManager challengeManager, + bytes32 edgeId, + bytes32[] memory states, + uint256 bisectionSize, + uint256 endSize + ) internal returns (BisectionChildren memory) { + bytes32[] memory middleExp = ProofUtils.expansionFromLeaves(states, 0, bisectionSize + 1); + bytes32[] memory upperStates = ArrayUtilsLib.slice(states, bisectionSize + 1, endSize + 1); + + (bytes32 lowerChildId, bytes32 upperChildId) = challengeManager.bisectEdge( + edgeId, + MerkleTreeAccumulatorLib.root(middleExp), + abi.encode(middleExp, ProofUtils.generatePrefixProof(bisectionSize + 1, upperStates)) + ); + + return BisectionChildren(lowerChildId, upperChildId); + } + + struct BisectionChildren { + bytes32 lowerChildId; + bytes32 upperChildId; + } + + struct BisectToForkOnlyArgs { + EdgeChallengeManager challengeManager; + bytes32 winningId; + bytes32 losingId; + bytes32[] winningLeaves; + bytes32[] losingLeaves; + bool skipLast; + } + + function bisectToForkOnly( + BisectToForkOnlyArgs memory args + ) internal returns (BisectionChildren[6] memory, BisectionChildren[6] memory) { + BisectionChildren[6] memory winningEdges; + BisectionChildren[6] memory losingEdges; + + winningEdges[5] = BisectionChildren(args.winningId, 0); + losingEdges[5] = BisectionChildren(args.losingId, 0); + + // height 16 + winningEdges[4] = bisect( + args.challengeManager, + winningEdges[5].lowerChildId, + args.winningLeaves, + 16, + args.winningLeaves.length - 1 + ); + losingEdges[4] = bisect( + args.challengeManager, + losingEdges[5].lowerChildId, + args.losingLeaves, + 16, + args.losingLeaves.length - 1 + ); + + // height 8 + winningEdges[3] = + bisect(args.challengeManager, winningEdges[4].lowerChildId, args.winningLeaves, 8, 16); + losingEdges[3] = + bisect(args.challengeManager, losingEdges[4].lowerChildId, args.losingLeaves, 8, 16); + + // height 4 + winningEdges[2] = + bisect(args.challengeManager, winningEdges[3].lowerChildId, args.winningLeaves, 4, 8); + losingEdges[2] = + bisect(args.challengeManager, losingEdges[3].lowerChildId, args.losingLeaves, 4, 8); + + winningEdges[1] = + bisect(args.challengeManager, winningEdges[2].lowerChildId, args.winningLeaves, 2, 4); + losingEdges[1] = + bisect(args.challengeManager, losingEdges[2].lowerChildId, args.losingLeaves, 2, 4); + + // height 2 + winningEdges[0] = + bisect(args.challengeManager, winningEdges[1].lowerChildId, args.winningLeaves, 1, 2); + if (!args.skipLast) { + losingEdges[0] = + bisect(args.challengeManager, losingEdges[1].lowerChildId, args.losingLeaves, 1, 2); + } + + return (winningEdges, losingEdges); + } + + function appendRandomStatesBetween( + bytes32[] memory currentStates, + bytes32 endState, + uint256 numStates + ) internal returns (bytes32[] memory, bytes32[] memory) { + (bytes32[] memory states, bytes32[] memory exp) = + appendRandomStates(currentStates, numStates - 1); + bytes32[] memory fullStates = ArrayUtilsLib.append(states, endState); + bytes32[] memory fullExp = MerkleTreeAccumulatorLib.appendLeaf(exp, endState); + return (fullStates, fullExp); + } + + function toDynamic( + BisectionChildren[6] memory l + ) internal pure returns (BisectionChildren[] memory) { + BisectionChildren[] memory d = new BisectionChildren[](6); + for (uint256 i = 0; i < d.length; i++) { + d[i] = l[i]; + } + return d; + } + + function concat( + BisectionChildren[] memory arr1, + BisectionChildren[] memory arr2 + ) internal pure returns (BisectionChildren[] memory) { + BisectionChildren[] memory full = new BisectionChildren[](arr1.length + arr2.length); + for (uint256 i = 0; i < arr1.length; i++) { + full[i] = arr1[i]; + } + for (uint256 i = 0; i < arr2.length; i++) { + full[arr1.length + i] = arr2[i]; + } + return full; + } + + function generateEdgeProof( + bytes32[] memory states1, + bytes32[] memory bigStepStates + ) internal pure returns (bytes memory) { + bytes32[] memory claimStartInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(states1, 0, 1)), 0 + ); + bytes32[] memory claimEndInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(states1, 0, 2)), 1 + ); + bytes32[] memory edgeInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(bigStepStates), bigStepStates.length - 1 + ); + return abi.encode( + states1[0], + states1[1], + claimStartInclusionProof, + claimEndInclusionProof, + edgeInclusionProof + ); + } + + function testRevertEmptyPrefixProof() public { + EdgeInitData memory ei = deployAndInit(); + + (bytes32[] memory states1,, BisectionChildren[6] memory edges1,) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + (bytes32[] memory bigStepStates, bytes32[] memory bigStepExp) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + vm.expectRevert(abi.encodeWithSelector(EmptyPrefixProof.selector)); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: "", + proof: generateEdgeProof(states1, bigStepStates) + }) + ); + } + + function testRevertInvalidPrefixProof() public { + EdgeInitData memory ei = deployAndInit(); + + (bytes32[] memory states1,, BisectionChildren[6] memory edges1,) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + (bytes32[] memory bigStepStates, bytes32[] memory bigStepExp) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + vm.expectRevert("Post expansion root not equal post"); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states1, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states1, 1, states1.length)) + ), + proof: generateEdgeProof(states1, bigStepStates) + }) + ); + } + + function testRevertSubChallengeNotOneStepFork() public { + EdgeInitData memory ei = deployAndInit(); + + (bytes32[] memory states1,, BisectionChildren[6] memory edges1,) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + true, // skipLast + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + (bytes32[] memory bigStepStates, bytes32[] memory bigStepExp) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + vm.expectRevert( + abi.encodeWithSelector(ClaimEdgeNotLengthOneRival.selector, edges1[0].lowerChildId) + ); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates, 1, bigStepStates.length) + ) + ), + proof: generateEdgeProof(states1, bigStepStates) + }) + ); + } + + function testRevertSubChallengeNoProof() public { + EdgeInitData memory ei = deployAndInit(); + + (bytes32[] memory states1,, BisectionChildren[6] memory edges1,) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + (bytes32[] memory bigStepStates, bytes32[] memory bigStepExp) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + vm.expectRevert(abi.encodeWithSelector(EmptyEdgeSpecificProof.selector)); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates, 1, bigStepStates.length) + ) + ), + proof: "" + }) + ); + } + + function testRevertSubChallengeInvalidStartClaimProof() public { + EdgeInitData memory ei = deployAndInit(); + + (bytes32[] memory states1,, BisectionChildren[6] memory edges1,) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + (bytes32[] memory bigStepStates, bytes32[] memory bigStepExp) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + bytes32[] memory claimEndInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(states1, 0, 2)), 1 + ); + bytes32[] memory edgeInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(bigStepStates), bigStepStates.length - 1 + ); + + vm.expectRevert("Invalid inclusion proof"); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates, 1, bigStepStates.length) + ) + ), + proof: abi.encode( + states1[0], + states1[1], + claimEndInclusionProof, + claimEndInclusionProof, + edgeInclusionProof + ) + }) + ); + } + + function testRevertSubChallengeInvalidEndClaimProof() public { + EdgeInitData memory ei = deployAndInit(); + + (bytes32[] memory states1,, BisectionChildren[6] memory edges1,) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + (bytes32[] memory bigStepStates, bytes32[] memory bigStepExp) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + bytes32[] memory claimStartInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(states1, 0, 1)), 0 + ); + bytes32[] memory edgeInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(bigStepStates), bigStepStates.length - 1 + ); + + vm.expectRevert("Invalid inclusion proof"); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates, 1, bigStepStates.length) + ) + ), + proof: abi.encode( + states1[0], + states1[1], + claimStartInclusionProof, + claimStartInclusionProof, + edgeInclusionProof + ) + }) + ); + } + + function testRevertSubChallengeInvalidEdgeProof() public { + EdgeInitData memory ei = deployAndInit(); + + (bytes32[] memory states1,, BisectionChildren[6] memory edges1,) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + (bytes32[] memory bigStepStates, bytes32[] memory bigStepExp) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + bytes32[] memory claimStartInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(states1, 0, 1)), 0 + ); + bytes32[] memory claimEndInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(states1, 0, 2)), 1 + ); + + vm.expectRevert("Invalid inclusion proof"); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates, 1, bigStepStates.length) + ) + ), + proof: abi.encode( + states1[0], + states1[1], + claimStartInclusionProof, + claimEndInclusionProof, + claimStartInclusionProof + ) + }) + ); + } + + function testRevertBigStepInvalidHeight() public { + EdgeInitData memory ei = deployAndInit(); + + (bytes32[] memory states1,, BisectionChildren[6] memory edges1,) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + (bytes32[] memory bigStepStates, bytes32[] memory bigStepExp) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + vm.expectRevert(abi.encodeWithSelector(InvalidEndHeight.selector, 1, 32)); + ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp), + endHeight: 1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates, 1, bigStepStates.length) + ) + ), + proof: generateEdgeProof(states1, bigStepStates) + }) + ); + } + + function testRevertBigStepInvalidClaimType() public { + EdgeInitData memory ei = deployAndInit(); + + ( + bytes32[] memory states1, + bytes32[] memory states2, + BisectionChildren[6] memory edges1, + BisectionChildren[6] memory edges2 + ) = createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + bytes32[] memory bigStepStates1; + bytes32 edge1BigStepId; + { + bytes32[] memory bigStepExp1; + (bigStepStates1, bigStepExp1) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + edge1BigStepId = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp1), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates1, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates1, 1, bigStepStates1.length) + ) + ), + proof: generateEdgeProof(states1, bigStepStates1) + }) + ); + } + + bytes32[] memory bigStepStates2; + bytes32 edge2BigStepId; + { + bytes32[] memory bigStepExp2; + (bigStepStates2, bigStepExp2) = + appendRandomStatesBetween(genesisStates(), states2[1], height1); + + edge2BigStepId = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp2), + endHeight: height1, + claimId: edges2[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates2, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates2, 1, bigStepStates2.length) + ) + ), + proof: generateEdgeProof(states2, bigStepStates2) + }) + ); + } + + (BisectionChildren[6] memory bigstepedges1,) = bisectToForkOnly( + BisectToForkOnlyArgs( + ei.challengeManager, + edge1BigStepId, + edge2BigStepId, + bigStepStates1, + bigStepStates2, + false + ) + ); + + bytes32[] memory smallStepStates1; + bytes32 edge1SmallStepId; + { + bytes32[] memory smallStepExp1; + (smallStepStates1, smallStepExp1) = + appendRandomStatesBetween(genesisStates(), bigStepStates1[1], height1); + + vm.expectRevert(abi.encodeWithSelector(ClaimEdgeInvalidLevel.selector, 1, 1)); + edge1SmallStepId = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(smallStepExp1), + endHeight: 1, + claimId: bigstepedges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(smallStepStates1, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(smallStepStates1, 1, smallStepStates1.length) + ) + ), + proof: generateEdgeProof(bigStepStates1, smallStepStates1) + }) + ); + } + } + + function testRevertSmallStepInvalidClaimType() public { + EdgeInitData memory ei = deployAndInit(); + + (bytes32[] memory states1,, BisectionChildren[6] memory edges1,) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + bytes32[] memory bigStepStates1; + bytes32 edge1BigStepId; + { + bytes32[] memory bigStepExp1; + (bigStepStates1, bigStepExp1) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + vm.expectRevert(abi.encodeWithSelector(ClaimEdgeInvalidLevel.selector, 2, 0)); + edge1BigStepId = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 2, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp1), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates1, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates1, 1, bigStepStates1.length) + ) + ), + proof: generateEdgeProof(states1, bigStepStates1) + }) + ); + } + } + + function testRevertSmallStepInvalidHeight() public { + EdgeInitData memory ei = deployAndInit(); + + ( + bytes32[] memory states1, + bytes32[] memory states2, + BisectionChildren[6] memory edges1, + BisectionChildren[6] memory edges2 + ) = createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + bytes32[] memory bigStepStates1; + bytes32 edge1BigStepId; + { + bytes32[] memory bigStepExp1; + (bigStepStates1, bigStepExp1) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + edge1BigStepId = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp1), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates1, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates1, 1, bigStepStates1.length) + ) + ), + proof: generateEdgeProof(states1, bigStepStates1) + }) + ); + } + + bytes32[] memory bigStepStates2; + bytes32 edge2BigStepId; + { + bytes32[] memory bigStepExp2; + (bigStepStates2, bigStepExp2) = + appendRandomStatesBetween(genesisStates(), states2[1], height1); + + edge2BigStepId = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp2), + endHeight: height1, + claimId: edges2[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates2, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates2, 1, bigStepStates2.length) + ) + ), + proof: generateEdgeProof(states2, bigStepStates2) + }) + ); + } + + (BisectionChildren[6] memory bigstepedges1,) = bisectToForkOnly( + BisectToForkOnlyArgs( + ei.challengeManager, + edge1BigStepId, + edge2BigStepId, + bigStepStates1, + bigStepStates2, + false + ) + ); + + bytes32[] memory smallStepStates1; + bytes32 edge1SmallStepId; + { + bytes32[] memory smallStepExp1; + (smallStepStates1, smallStepExp1) = + appendRandomStatesBetween(genesisStates(), bigStepStates1[1], height1); + + vm.expectRevert(abi.encodeWithSelector(InvalidEndHeight.selector, 1, 32)); + edge1SmallStepId = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 2, + endHistoryRoot: MerkleTreeAccumulatorLib.root(smallStepExp1), + endHeight: 1, + claimId: bigstepedges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(smallStepStates1, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(smallStepStates1, 1, smallStepStates1.length) + ) + ), + proof: generateEdgeProof(bigStepStates1, smallStepStates1) + }) + ); + } + } + + function testCanConfirmByClaim() public { + EdgeInitData memory ei = deployAndInit(); + + ( + bytes32[] memory states1, + , + BisectionChildren[6] memory edges1, + BisectionChildren[6] memory edges2 + ) = createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + (bytes32[] memory bigStepStates, bytes32[] memory bigStepExp) = + appendRandomStatesBetween(genesisStates(), states1[1], height1); + + bytes32 edge1BigStepId = ei.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(bigStepExp), + endHeight: height1, + claimId: edges1[0].lowerChildId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(bigStepStates, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(bigStepStates, 1, bigStepStates.length) + ) + ), + proof: generateEdgeProof(states1, bigStepStates) + }) + ); + + _safeVmRoll(block.number + challengePeriodBlock); + + vm.expectEmit(true, false, false, true); + emit TimerCacheUpdated(edge1BigStepId, challengePeriodBlock); + ei.challengeManager.updateTimerCacheByChildren(edge1BigStepId, challengePeriodBlock); + + vm.expectRevert( + abi.encodeWithSelector(EdgeClaimMismatch.selector, edges1[0].lowerChildId, bytes32(0)) + ); + ei.challengeManager.updateTimerCacheByClaim( + edges1[0].lowerChildId, edges1[0].lowerChildId, challengePeriodBlock + ); + + vm.expectRevert( + abi.encodeWithSelector( + EdgeClaimMismatch.selector, edges2[0].lowerChildId, edges1[0].lowerChildId + ) + ); + ei.challengeManager.updateTimerCacheByClaim( + edges2[0].lowerChildId, edge1BigStepId, challengePeriodBlock + ); + + vm.expectEmit(true, false, false, true); + emit TimerCacheUpdated(edges1[0].lowerChildId, challengePeriodBlock); + ei.challengeManager.updateTimerCacheByClaim( + edges1[0].lowerChildId, edge1BigStepId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren(edges1[0].upperChildId, challengePeriodBlock); + + vm.expectEmit(true, false, false, true); + emit TimerCacheUpdated(edges1[1].lowerChildId, challengePeriodBlock); + ei.challengeManager.updateTimerCacheByChildren(edges1[1].lowerChildId, challengePeriodBlock); + ei.challengeManager.updateTimerCacheByChildren(edges1[1].upperChildId, challengePeriodBlock); + + ei.challengeManager.updateTimerCacheByChildren(edges1[2].lowerChildId, challengePeriodBlock); + ei.challengeManager.updateTimerCacheByChildren(edges1[2].upperChildId, challengePeriodBlock); + + ei.challengeManager.updateTimerCacheByChildren(edges1[3].lowerChildId, challengePeriodBlock); + ei.challengeManager.updateTimerCacheByChildren(edges1[3].upperChildId, challengePeriodBlock); + + ei.challengeManager.updateTimerCacheByChildren(edges1[4].lowerChildId, challengePeriodBlock); + ei.challengeManager.updateTimerCacheByChildren(edges1[4].upperChildId, challengePeriodBlock); + + ei.challengeManager.confirmEdgeByTime(edges1[5].lowerChildId, ei.a1Data); + + assertTrue( + ei.challengeManager.getEdge(edges1[5].lowerChildId).status == EdgeStatus.Confirmed, + "Edge confirmed" + ); + } + + struct CreateBlockEdgesBisectArgs { + EdgeChallengeManager challengeManager; + bytes32 claim1Id; + bytes32 claim2Id; + AssertionState endState1; + AssertionState endState2; + bool skipLast; + bytes32[] endStates1; + bytes32[] endStates1exp; + bytes32[] endStates2; + bytes32[] endStates2exp; + } + + struct CreateMachineEdgesBisectArgs { + EdgeChallengeManager challengeManager; + uint8 eType; + bytes32 claim1Id; + bytes32 claim2Id; + bytes32 endState1; + bytes32 endState2; + bool skipLast; + bytes32[] forkStates1; + bytes32[] forkStates2; + } + + function createLayerZeroEdge( + EdgeChallengeManager challengeManager, + bytes32 claimId, + AssertionState memory endState, + bytes32[] memory states, + bytes32[] memory exp + ) internal returns (bytes32) { + bytes memory typeSpecificProof1 = abi.encode( + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states), states.length - 1), + genesisStateData, + AssertionStateData(endState, genesisAssertionHash, bytes32(0)) + ); + + return challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp), + endHeight: height1, + claimId: claimId, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states, 1, states.length)) + ), + proof: typeSpecificProof1 + }) + ); + } + + function createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs memory args + ) + internal + returns ( + bytes32[] memory, + bytes32[] memory, + BisectionChildren[6] memory, + BisectionChildren[6] memory + ) + { + bytes32[] memory states1 = args.endStates1; + bytes32[] memory exp1 = args.endStates1exp; + bytes32 edge1Id = + createLayerZeroEdge(args.challengeManager, args.claim1Id, args.endState1, states1, exp1); + + _safeVmRoll(block.number + NUM_BLOCK_UNRIVALED); + assertEq(args.challengeManager.timeUnrivaled(edge1Id), NUM_BLOCK_UNRIVALED, "Edge1 timer"); + + bytes32[] memory states2 = args.endStates2; + bytes32[] memory exp2 = args.endStates2exp; + bytes32 edge2Id = + createLayerZeroEdge(args.challengeManager, args.claim2Id, args.endState2, states2, exp2); + + _safeVmRoll(block.number + NUM_BLOCK_WAIT); + + (BisectionChildren[6] memory edges1, BisectionChildren[6] memory edges2) = bisectToForkOnly( + BisectToForkOnlyArgs( + args.challengeManager, edge1Id, edge2Id, states1, states2, args.skipLast + ) + ); + + return (states1, states2, edges1, edges2); + } + + function createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs memory args + ) internal returns (BisectionData memory) { + (bytes32[] memory states1, bytes32[] memory exp1) = + appendRandomStatesBetween(genesisStates(), args.endState1, height1); + bytes32 edge1Id; + { + bytes memory typeSpecificProof1; + { + bytes32[] memory claimStartInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(args.forkStates1, 0, 1)), 0 + ); + bytes32[] memory claimEndInclusionProof = + ProofUtils.generateInclusionProof(ProofUtils.rehashed(args.forkStates1), 1); + bytes32[] memory edgeInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(states1), states1.length - 1 + ); + typeSpecificProof1 = abi.encode( + genesisStateHash, + args.endState1, + claimStartInclusionProof, + claimEndInclusionProof, + edgeInclusionProof + ); + } + edge1Id = args.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: args.eType, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp1), + endHeight: height1, + claimId: args.claim1Id, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states1, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(states1, 1, states1.length) + ) + ), + proof: typeSpecificProof1 + }) + ); + } + + _safeVmRoll(block.number + NUM_BLOCK_UNRIVALED); + assertEq(args.challengeManager.timeUnrivaled(edge1Id), NUM_BLOCK_UNRIVALED, "Edge1 timer"); + + (bytes32[] memory states2, bytes32[] memory exp2) = + appendRandomStatesBetween(genesisStates(), args.endState2, height1); + bytes32 edge2Id; + { + bytes memory typeSpecificProof2; + { + bytes32[] memory claimStartInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(args.forkStates2, 0, 1)), 0 + ); + bytes32[] memory claimEndInclusionProof = + ProofUtils.generateInclusionProof(ProofUtils.rehashed(args.forkStates2), 1); + bytes32[] memory edgeInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(states2), states2.length - 1 + ); + typeSpecificProof2 = abi.encode( + genesisStateHash, + args.endState2, + claimStartInclusionProof, + claimEndInclusionProof, + edgeInclusionProof + ); + } + edge2Id = args.challengeManager.createLayerZeroEdge( + CreateEdgeArgs({ + level: args.eType, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp2), + endHeight: height1, + claimId: args.claim2Id, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states2, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(states2, 1, states2.length) + ) + ), + proof: typeSpecificProof2 + }) + ); + } + + _safeVmRoll(block.number + NUM_BLOCK_WAIT); + + (BisectionChildren[6] memory edges1, BisectionChildren[6] memory edges2) = bisectToForkOnly( + BisectToForkOnlyArgs( + args.challengeManager, edge1Id, edge2Id, states1, states2, args.skipLast + ) + ); + + return BisectionData(states1, states2, edges1, edges2); + } + + function testCanConfirmByClaimSubChallenge() public { + EdgeInitData memory ei = deployAndInit(); + ( + bytes32[] memory blockStates1, + bytes32[] memory blockStates2, + BisectionChildren[6] memory blockEdges1, + BisectionChildren[6] memory blockEdges2 + ) = createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + BisectionData memory bsbd = createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs( + ei.challengeManager, + 1, + blockEdges1[0].lowerChildId, + blockEdges2[0].lowerChildId, + blockStates1[1], + blockStates2[1], + false, + ArrayUtilsLib.slice(blockStates1, 0, 2), + ArrayUtilsLib.slice(blockStates2, 0, 2) + ) + ); + + BisectionData memory ssbd = createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs( + ei.challengeManager, + 2, + bsbd.edges1[0].lowerChildId, + bsbd.edges2[0].lowerChildId, + bsbd.states1[1], + bsbd.states2[1], + true, + ArrayUtilsLib.slice(bsbd.states1, 0, 2), + ArrayUtilsLib.slice(bsbd.states2, 0, 2) + ) + ); + + _safeVmRoll(block.number + challengePeriodBlock); + + BisectionChildren[] memory allWinners = + concat(concat(toDynamic(ssbd.edges1), toDynamic(bsbd.edges1)), toDynamic(blockEdges1)); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[0].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[0].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[1].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[1].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[2].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[2].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[3].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[3].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[4].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[4].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[5].lowerChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByClaim( + allWinners[6].lowerChildId, allWinners[5].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[6].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[7].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[7].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[8].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[8].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[9].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[9].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[10].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[10].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[11].lowerChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByClaim( + allWinners[12].lowerChildId, allWinners[11].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[12].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[13].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[13].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[14].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[14].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[15].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[15].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.updateTimerCacheByChildren( + allWinners[16].lowerChildId, challengePeriodBlock + ); + ei.challengeManager.updateTimerCacheByChildren( + allWinners[16].upperChildId, challengePeriodBlock + ); + + ei.challengeManager.confirmEdgeByTime(allWinners[17].lowerChildId, ei.a1Data); + + assertTrue( + ei.challengeManager.getEdge(allWinners[17].lowerChildId).status == EdgeStatus.Confirmed, + "Edge confirmed" + ); + } + + struct BisectionData { + bytes32[] states1; + bytes32[] states2; + BisectionChildren[6] edges1; + BisectionChildren[6] edges2; + } + + struct CanConfirmByOneStepData { + bytes32[] blockStates1; + bytes32[] blockStates2; + BisectionChildren[6] blockEdges1; + BisectionChildren[6] blockEdges2; + BisectionData[100] bigStepBisections; + BisectionData smallStepBisection; + } + + function testCanConfirmByOneStep() + public + returns (EdgeInitData memory, BisectionChildren[] memory) + { + EdgeInitData memory ei = deployAndInit(); + CanConfirmByOneStepData memory local; + + (local.blockStates1, local.blockStates2, local.blockEdges1, local.blockEdges2) = + createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + local.bigStepBisections[0] = createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs( + ei.challengeManager, + 1, + local.blockEdges1[0].lowerChildId, + local.blockEdges2[0].lowerChildId, + local.blockStates1[1], + local.blockStates2[1], + false, + ArrayUtilsLib.slice(local.blockStates1, 0, 2), + ArrayUtilsLib.slice(local.blockStates2, 0, 2) + ) + ); + + for (uint8 i = 1; i < NUM_BIGSTEP_LEVEL; ++i) { + local.bigStepBisections[i] = createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs( + ei.challengeManager, + i + 1, + local.bigStepBisections[i - 1].edges1[0].lowerChildId, + local.bigStepBisections[i - 1].edges2[0].lowerChildId, + local.bigStepBisections[i - 1].states1[1], + local.bigStepBisections[i - 1].states2[1], + false, + ArrayUtilsLib.slice(local.bigStepBisections[i - 1].states1, 0, 2), + ArrayUtilsLib.slice(local.bigStepBisections[i - 1].states2, 0, 2) + ) + ); + } + + local.smallStepBisection = createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs( + ei.challengeManager, + NUM_BIGSTEP_LEVEL + 1, + local.bigStepBisections[NUM_BIGSTEP_LEVEL - 1].edges1[0].lowerChildId, + local.bigStepBisections[NUM_BIGSTEP_LEVEL - 1].edges2[0].lowerChildId, + local.bigStepBisections[NUM_BIGSTEP_LEVEL - 1].states1[1], + local.bigStepBisections[NUM_BIGSTEP_LEVEL - 1].states2[1], + false, + ArrayUtilsLib.slice(local.bigStepBisections[NUM_BIGSTEP_LEVEL - 1].states1, 0, 2), + ArrayUtilsLib.slice(local.bigStepBisections[NUM_BIGSTEP_LEVEL - 1].states2, 0, 2) + ) + ); + + _safeVmRoll(START_BLOCK + (NUM_BIGSTEP_LEVEL + 2) * (NUM_BLOCK_WAIT) + challengePeriodBlock); + + BisectionChildren[] memory allWinners = toDynamic(local.smallStepBisection.edges1); + for (uint256 i = 0; i < NUM_BIGSTEP_LEVEL; ++i) { + allWinners = concat( + allWinners, toDynamic(local.bigStepBisections[NUM_BIGSTEP_LEVEL - i - 1].edges1) + ); + } + allWinners = concat(allWinners, toDynamic(local.blockEdges1)); + + bytes32[] memory firstStates = new bytes32[](2); + firstStates[0] = local.smallStepBisection.states1[0]; + firstStates[1] = local.smallStepBisection.states1[1]; + + ei.challengeManager.confirmEdgeByOneStepProof( + allWinners[0].lowerChildId, + OneStepData({beforeHash: firstStates[0], proof: abi.encodePacked(firstStates[1])}), + ConfigData({ + wasmModuleRoot: bytes32(0), + requiredStake: 0, + challengeManager: address(0), + confirmPeriodBlocks: 0, + nextInboxPosition: inboxMsgCountGenesis + }), + ProofUtils.generateInclusionProof(ProofUtils.rehashed(genesisStates()), 0), + ProofUtils.generateInclusionProof(ProofUtils.rehashed(firstStates), 1) + ); + + _updateTimers(ei, allWinners); + + bytes32 topEdgeId = allWinners[allWinners.length - 1].lowerChildId; + ei.challengeManager.confirmEdgeByTime(topEdgeId, ei.a1Data); + + assertTrue( + ei.challengeManager.getEdge(topEdgeId).status == EdgeStatus.Confirmed, "Edge confirmed" + ); + + return (ei, allWinners); + } + + /// @dev gracefully handle revert when updating timer cache + /// TODO: consider removing this hack to make the test more robust + function _updateTimerCacheByChildren( + EdgeChallengeManager challengeManager, + bytes32 edgeId, + uint256 maximumCachedTime + ) internal { + uint256 totalTimeUnrivaledCache = challengeManager.getEdge(edgeId).totalTimeUnrivaledCache; + if (totalTimeUnrivaledCache >= maximumCachedTime) { + vm.expectRevert( + abi.encodeWithSelector( + CachedTimeSufficient.selector, totalTimeUnrivaledCache, maximumCachedTime + ) + ); + } else { + maximumCachedTime = totalTimeUnrivaledCache + 1; + } + challengeManager.updateTimerCacheByChildren(edgeId, maximumCachedTime); + } + + /// @dev gracefully handle revert when updating timer cache + /// TODO: consider removing this hack to make the test more robust + function _updateTimerCacheByClaim( + EdgeChallengeManager challengeManager, + bytes32 edgeId, + bytes32 claimingEdgeId, + uint256 maximumCachedTime + ) internal { + uint256 totalTimeUnrivaledCache = challengeManager.getEdge(edgeId).totalTimeUnrivaledCache; + if (totalTimeUnrivaledCache >= maximumCachedTime) { + vm.expectRevert( + abi.encodeWithSelector( + CachedTimeSufficient.selector, totalTimeUnrivaledCache, maximumCachedTime + ) + ); + } else { + maximumCachedTime = totalTimeUnrivaledCache + 1; + } + challengeManager.updateTimerCacheByClaim(edgeId, claimingEdgeId, maximumCachedTime); + } + + function _updateTimers( + EdgeInitData memory ei, + BisectionChildren[] memory allWinners + ) internal { + _updateTimerCacheByChildren( + ei.challengeManager, allWinners[0].upperChildId, challengePeriodBlock + ); + for (uint256 i = 1; i < allWinners.length; i++) { + if ((i + 1) % 6 != 0) { + if (i % 6 != 0) { + _updateTimerCacheByChildren( + ei.challengeManager, allWinners[i].lowerChildId, challengePeriodBlock + ); + } else { + _updateTimerCacheByClaim( + ei.challengeManager, + allWinners[i].lowerChildId, + allWinners[i - 1].lowerChildId, + challengePeriodBlock + ); + } + _updateTimerCacheByChildren( + ei.challengeManager, allWinners[i].upperChildId, challengePeriodBlock + ); + } else { + _updateTimerCacheByChildren( + ei.challengeManager, allWinners[i].lowerChildId, challengePeriodBlock + ); + } + } + } + + function testExcessStakeReceived() external { + (EdgeInitData memory ei,) = testCanConfirmByOneStep(); + IERC20 stakeToken = ei.challengeManager.stakeToken(); + uint256 totalAmount; + for (uint256 i = 0; i < NUM_BIGSTEP_LEVEL + 2; i++) { + totalAmount += ei.challengeManager.stakeAmounts(i); + } + assertEq(stakeToken.balanceOf(excessStakeReceiver), totalAmount, "Excess stake received"); + } + + function testCanRefundStake() external { + (EdgeInitData memory ei, BisectionChildren[] memory allWinners) = testCanConfirmByOneStep(); + + IERC20 stakeToken = ei.challengeManager.stakeToken(); + uint256 beforeBalance = stakeToken.balanceOf(address(this)); + vm.prank(nobody); // call refund as nobody + bytes32 edgeId = allWinners[allWinners.length - 1].lowerChildId; + ei.challengeManager.refundStake(edgeId); + uint256 level = ei.challengeManager.getEdge(edgeId).level; + uint256 afterBalance = stakeToken.balanceOf(address(this)); + // block level + assertEq( + afterBalance - beforeBalance, ei.challengeManager.stakeAmounts(level), "Stake refunded" + ); + } + + function testRevertRefundStakeTwice() external { + (EdgeInitData memory ei, BisectionChildren[] memory allWinners) = testCanConfirmByOneStep(); + ei.challengeManager.refundStake(allWinners[allWinners.length - 1].lowerChildId); + vm.expectRevert( + abi.encodeWithSelector( + EdgeAlreadyRefunded.selector, allWinners[allWinners.length - 1].lowerChildId + ) + ); + ei.challengeManager.refundStake(allWinners[allWinners.length - 1].lowerChildId); + } + + function testRevertRefundStakeNotLayerZero() external { + (EdgeInitData memory ei, BisectionChildren[] memory allWinners) = testCanConfirmByOneStep(); + vm.expectRevert( + abi.encodeWithSelector( + EdgeNotConfirmed.selector, + allWinners[allWinners.length - 2].lowerChildId, + EdgeStatus.Pending + ) + ); + ei.challengeManager.refundStake(allWinners[allWinners.length - 2].lowerChildId); + } + + function testRefundStakeBigStep() external { + (EdgeInitData memory ei, BisectionChildren[] memory allWinners) = testCanConfirmByOneStep(); + + // advance just enough to allow confirmEdgeByTime + _safeVmRoll(block.number + (NUM_BIGSTEP_LEVEL) * NUM_BLOCK_UNRIVALED); + _updateTimers(ei, allWinners); + + IERC20 stakeToken = ei.challengeManager.stakeToken(); + uint256 beforeBalance = stakeToken.balanceOf(address(this)); + vm.prank(nobody); // call refund as nobody + bytes32 edgeId = allWinners[11].lowerChildId; + ei.challengeManager.confirmEdgeByTime(edgeId, ei.a1Data); + ei.challengeManager.refundStake(edgeId); + uint256 afterBalance = stakeToken.balanceOf(address(this)); + uint256 level = ei.challengeManager.getEdge(edgeId).level; + assertEq( + afterBalance - beforeBalance, ei.challengeManager.stakeAmounts(level), "Stake refunded" + ); + } + + function testRefundStakeSmallStep() external { + (EdgeInitData memory ei, BisectionChildren[] memory allWinners) = testCanConfirmByOneStep(); + + // advance just enough to allow confirmEdgeByTime + _safeVmRoll(block.number + (NUM_BIGSTEP_LEVEL + 1) * NUM_BLOCK_UNRIVALED); + _updateTimers(ei, allWinners); + + IERC20 stakeToken = ei.challengeManager.stakeToken(); + uint256 beforeBalance = stakeToken.balanceOf(address(this)); + vm.prank(nobody); // call refund as nobody + bytes32 edgeId = allWinners[5].lowerChildId; + ei.challengeManager.confirmEdgeByTime(edgeId, ei.a1Data); + ei.challengeManager.refundStake(edgeId); + uint256 afterBalance = stakeToken.balanceOf(address(this)); + uint256 level = ei.challengeManager.getEdge(edgeId).level; + assertEq( + afterBalance - beforeBalance, ei.challengeManager.stakeAmounts(level), "Stake refunded" + ); + } + + function testRevertRefundStakeNotConfirmed() external { + (EdgeInitData memory ei,,, bytes32 edgeId) = testCanCreateEdgeWithStake(); + + vm.expectRevert( + abi.encodeWithSelector(EdgeNotConfirmed.selector, edgeId, EdgeStatus.Pending) + ); + ei.challengeManager.refundStake(edgeId); + } + + function testGetPrevAssertionHash() public { + EdgeInitData memory ei = deployAndInit(); + + ( + bytes32[] memory blockStates1, + bytes32[] memory blockStates2, + BisectionChildren[6] memory blockEdges1, + BisectionChildren[6] memory blockEdges2 + ) = createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs( + ei.challengeManager, + ei.a1, + ei.a2, + ei.a1State, + ei.a2State, + false, + a1RandomStates, + a1RandomStatesExp, + a2RandomStates, + a2RandomStatesExp + ) + ); + + BisectionData memory bsbd = createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs( + ei.challengeManager, + 1, + blockEdges1[0].lowerChildId, + blockEdges2[0].lowerChildId, + blockStates1[1], + blockStates2[1], + false, + ArrayUtilsLib.slice(blockStates1, 0, 2), + ArrayUtilsLib.slice(blockStates2, 0, 2) + ) + ); + + BisectionData memory ssbd = createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs( + ei.challengeManager, + 2, + bsbd.edges1[0].lowerChildId, + bsbd.edges2[0].lowerChildId, + bsbd.states1[1], + bsbd.states2[1], + false, + ArrayUtilsLib.slice(bsbd.states1, 0, 2), + ArrayUtilsLib.slice(bsbd.states2, 0, 2) + ) + ); + + for (uint256 i = 0; i < ssbd.edges1.length; i++) { + bytes32 childId = ssbd.edges1[i].lowerChildId; + assertEq(ei.challengeManager.getPrevAssertionHash(childId), ei.genesis); + } + + for (uint256 i = 0; i < ssbd.edges2.length; i++) { + bytes32 childId = ssbd.edges2[i].lowerChildId; + assertEq(ei.challengeManager.getPrevAssertionHash(childId), ei.genesis); + } + + for (uint256 i = 0; i < bsbd.edges1.length; i++) { + bytes32 childId = bsbd.edges1[i].lowerChildId; + assertEq(ei.challengeManager.getPrevAssertionHash(childId), ei.genesis); + } + + for (uint256 i = 0; i < bsbd.edges2.length; i++) { + bytes32 childId = bsbd.edges2[i].lowerChildId; + assertEq(ei.challengeManager.getPrevAssertionHash(childId), ei.genesis); + } + + for (uint256 i = 0; i < blockEdges1.length; i++) { + bytes32 childId = blockEdges1[i].lowerChildId; + assertEq(ei.challengeManager.getPrevAssertionHash(childId), ei.genesis); + } + + for (uint256 i = 0; i < blockEdges2.length; i++) { + bytes32 childId = blockEdges2[i].lowerChildId; + assertEq(ei.challengeManager.getPrevAssertionHash(childId), ei.genesis); + } + } + + function _safeVmRoll( + uint256 target + ) internal { + require(target >= block.number, "BACKWARD_VMROLL"); + vm.roll(target); + } +} + +contract EdgeChallengeManagerTest1 is EdgeChallengeManagerTest { + constructor() { + NUM_BIGSTEP_LEVEL = 1; + } +} + +contract EdgeChallengeManagerTest10 is EdgeChallengeManagerTest { + constructor() { + NUM_BIGSTEP_LEVEL = 10; + } +} diff --git a/test/challengeV2/EdgeChallengeManagerLib.t.sol b/test/challengeV2/EdgeChallengeManagerLib.t.sol new file mode 100644 index 00000000..0c2a0d95 --- /dev/null +++ b/test/challengeV2/EdgeChallengeManagerLib.t.sol @@ -0,0 +1,2451 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "forge-std/Test.sol"; +import "../MockAssertionChain.sol"; +import "../../src/challengeV2/EdgeChallengeManager.sol"; +import "./Utils.sol"; + +contract MockOneStepProofEntry is IOneStepProofEntry { + using GlobalStateLib for GlobalState; + + constructor( + uint256 _testMachineStep + ) { + testMachineStep = _testMachineStep; + } + + uint256 public testMachineStep; + + function getStartMachineHash( + bytes32 globalStateHash, + bytes32 wasmModuleRoot + ) external pure returns (bytes32) { + return keccak256(abi.encodePacked("Machine:", globalStateHash, wasmModuleRoot)); + } + + function proveOneStep( + ExecutionContext calldata, + uint256 machineStep, + bytes32, + bytes calldata proof + ) external view returns (bytes32 afterHash) { + if (testMachineStep != 0) require(testMachineStep == machineStep, "Invalid machine step"); + return bytes32(proof); + } + + function getMachineHash( + ExecutionState calldata execState + ) external pure override returns (bytes32) { + require(execState.machineStatus == MachineStatus.FINISHED, "BAD_MACHINE_STATUS"); + return GlobalStateLib.hash(execState.globalState); + } +} + +contract EdgeChallengeManagerLibAccess { + using EdgeChallengeManagerLib for EdgeStore; + using ChallengeEdgeLib for ChallengeEdge; + + EdgeStore private store; + + function exists( + bytes32 edgeId + ) public view returns (bool) { + return store.get(edgeId).exists(); + } + + function get( + bytes32 edgeId + ) public view returns (ChallengeEdge memory) { + return store.get(edgeId); + } + + function getNoCheck( + bytes32 edgeId + ) public view returns (ChallengeEdge memory) { + return store.getNoCheck(edgeId); + } + + function add( + ChallengeEdge memory edge + ) public returns (EdgeAddedData memory) { + return store.add(edge); + } + + function isPowerOfTwo( + uint256 x + ) public pure returns (bool) { + return EdgeChallengeManagerLib.isPowerOfTwo(x); + } + + function createLayerZeroEdge( + CreateEdgeArgs calldata args, + AssertionReferenceData memory ard, + IOneStepProofEntry oneStepProofEntry, + uint256 expectedEndHeight, + uint8 numBigStepLevel, + bool whitelistEnabled + ) public returns (EdgeAddedData memory) { + return store.createLayerZeroEdge( + args, ard, oneStepProofEntry, expectedEndHeight, numBigStepLevel, whitelistEnabled + ); + } + + function getPrevAssertionHash( + bytes32 edgeId + ) public view returns (bytes32) { + return store.getPrevAssertionHash(edgeId); + } + + function hasRival( + bytes32 edgeId + ) public view returns (bool) { + return store.hasRival(edgeId); + } + + function setFirstRival(bytes32 edgeId, bytes32 firstRival) public { + store.firstRivals[edgeId] = firstRival; + } + + function hasLengthOneRival( + bytes32 edgeId + ) public view returns (bool) { + return store.hasLengthOneRival(edgeId); + } + + function timeUnrivaled( + bytes32 edgeId + ) public view returns (uint256) { + return store.timeUnrivaled(edgeId); + } + + function timeUnrivaledTotal( + bytes32 edgeId + ) public view returns (uint256) { + return store.timeUnrivaledTotal(edgeId); + } + + function updateTimerCacheByChildren(bytes32 edgeId, uint256 maximumCachedTime) public { + store.updateTimerCacheByChildren(edgeId, maximumCachedTime); + } + + function mandatoryBisectionHeight(uint256 start, uint256 end) public pure returns (uint256) { + return EdgeChallengeManagerLib.mandatoryBisectionHeight(start, end); + } + + function bisectEdge( + bytes32 edgeId, + bytes32 bisectionHistoryRoot, + bytes memory prefixProof + ) public returns (bytes32, EdgeAddedData memory, EdgeAddedData memory) { + return store.bisectEdge(edgeId, bisectionHistoryRoot, prefixProof); + } + + function setConfirmed( + bytes32 id + ) public { + store.get(id).setConfirmed(); + } + + function setConfirmedRival( + bytes32 edgeId + ) public { + return EdgeChallengeManagerLib.setConfirmedRival(store, edgeId); + } + + function setClaimId(bytes32 edgeId, bytes32 claimId) public { + store.get(edgeId).claimId = claimId; + } + + function getConfirmedRival( + bytes32 mutualId + ) public view returns (bytes32) { + return store.confirmedRivals[mutualId]; + } + + function setLevel(bytes32 edgeId, uint8 level) public { + store.get(edgeId).level = level; + } + + function nextEdgeLevel(uint8 level, uint8 numBigStepLevel) public pure returns (uint8) { + return EdgeChallengeManagerLib.nextEdgeLevel(level, numBigStepLevel); + } + + function firstRivals( + bytes32 mutualId + ) public view returns (bytes32) { + return store.firstRivals[mutualId]; + } + + function hasMadeLayerZeroRival(address account, bytes32 mutualId) public view returns (bool) { + return store.hasMadeLayerZeroRival[account][mutualId]; + } + + function setHasMadeLayerZeroRival(address account, bytes32 mutualId, bool x) public { + store.hasMadeLayerZeroRival[account][mutualId] = x; + } + + function remove( + bytes32 edgeId + ) public { + delete store.edges[edgeId]; + } + + function confirmedRivals( + bytes32 mutualId + ) public view returns (bytes32) { + return store.confirmedRivals[mutualId]; + } + + function confirmEdgeByTime( + bytes32 edgeId, + uint64 claimedAssertionUnrivaledBlocks, + uint64 confirmationThresholdBlock + ) public returns (uint256) { + return store.confirmEdgeByTime( + edgeId, claimedAssertionUnrivaledBlocks, confirmationThresholdBlock + ); + } + + function confirmEdgeByOneStepProof( + bytes32 edgeId, + IOneStepProofEntry oneStepProofEntry, + OneStepData calldata oneStepData, + ExecutionContext memory execCtx, + bytes32[] calldata beforeHistoryInclusionProof, + bytes32[] calldata afterHistoryInclusionProof, + uint8 numBigStepLevel, + uint256 bigStepHeight, + uint256 smallStepHeight + ) public { + store.confirmEdgeByOneStepProof( + edgeId, + oneStepProofEntry, + oneStepData, + execCtx, + beforeHistoryInclusionProof, + afterHistoryInclusionProof, + numBigStepLevel, + bigStepHeight, + smallStepHeight + ); + } +} + +contract EdgeChallengeManagerLibTest is Test { + using ChallengeEdgeLib for ChallengeEdge; + using AssertionStateLib for AssertionState; + + MockOneStepProofEntry mockOsp = new MockOneStepProofEntry(0); + + uint64 challengePeriodBlocks = 7; + uint256 stakeAmount = 13; + + EdgeChallengeManagerLibAccess store = new EdgeChallengeManagerLibAccess(); + Random rand = new Random(); + + uint8 constant NUM_BIGSTEP_LEVEL = 3; + + function twoNonRivals() internal returns (ChallengeEdge memory, ChallengeEdge memory) { + bytes32 originId = rand.hash(); + + ChallengeEdge memory edge1 = + ChallengeEdgeLib.newChildEdge(originId, rand.hash(), 3, rand.hash(), 9, 0); + ChallengeEdge memory edge2 = + ChallengeEdgeLib.newChildEdge(originId, rand.hash(), 3, rand.hash(), 9, 0); + + return (edge1, edge2); + } + + function twoRivals() internal returns (ChallengeEdge memory, ChallengeEdge memory) { + bytes32 originId = rand.hash(); + bytes32 startRoot = rand.hash(); + + ChallengeEdge memory edge1 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 3, rand.hash(), 9, 0); + ChallengeEdge memory edge2 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 3, rand.hash(), 9, 0); + + return (edge1, edge2); + } + + function checkEdgeAddedData( + ChallengeEdge memory edge, + bool hasRival, + EdgeAddedData memory d + ) internal { + bytes32 id = edge.idMem(); + bytes32 mutualId = ChallengeEdgeLib.mutualIdComponent( + edge.level, edge.originId, edge.startHeight, edge.startHistoryRoot, edge.endHeight + ); + assertEq(id, d.edgeId, "invalid edge id"); + assertEq(mutualId, d.mutualId, "invalid mutual id"); + assertEq(edge.originId, d.originId, "invalid origin id"); + assertEq(hasRival, d.hasRival, "invalid has rival"); + assertEq(edge.endHeight - edge.startHeight, d.length, "invalid length"); + assertEq(uint256(edge.level), uint256(d.level), "invalid eType"); + assertEq(false, d.isLayerZero, "invalid is layer zero"); + } + + function testAdd() public { + (ChallengeEdge memory edge,) = twoNonRivals(); + + EdgeAddedData memory d = store.add(edge); + + ChallengeEdge memory se = store.get(edge.idMem()); + assertTrue(store.exists(edge.idMem()), "Edge exists"); + assertTrue( + store.firstRivals(se.mutualIdMem()) == EdgeChallengeManagerLib.UNRIVALED, + "NO_RIVAL first rival" + ); + + checkEdgeAddedData(se, false, d); + } + + function testGet() public { + (ChallengeEdge memory edge,) = twoNonRivals(); + + store.add(edge); + + ChallengeEdge memory se = store.get(edge.idMem()); + assertEq(edge.idMem(), se.idMem(), "Id's are equal"); + } + + function testGetNotExist() public { + (ChallengeEdge memory edge,) = twoNonRivals(); + + bytes32 edgeId = edge.idMem(); + + vm.expectRevert(abi.encodeWithSelector(EdgeNotExists.selector, edgeId)); + store.get(edgeId); + } + + function testAddRivals() public { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2) = twoRivals(); + + EdgeAddedData memory d1 = store.add(edge1); + + EdgeAddedData memory d2 = store.add(edge2); + + ChallengeEdge memory se = store.get(edge1.idMem()); + ChallengeEdge memory se2 = store.get(edge2.idMem()); + assertTrue(store.exists(se2.idMem()), "Edge exists"); + assertTrue(store.firstRivals(se2.mutualIdMem()) == edge2.idMem(), "First rival1"); + assertTrue(store.firstRivals(se.mutualIdMem()) == edge2.idMem(), "First rival2"); + checkEdgeAddedData(se, false, d1); + checkEdgeAddedData(se2, true, d2); + } + + function testAddMoreRivals() public { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2) = twoRivals(); + ChallengeEdge memory edge3 = ChallengeEdgeLib.newChildEdge( + edge1.originId, + edge1.startHistoryRoot, + edge1.startHeight, + rand.hash(), + edge1.endHeight, + 0 + ); + + store.add(edge1); + store.add(edge2); + store.add(edge3); + + ChallengeEdge memory se = store.get(edge1.idMem()); + ChallengeEdge memory se2 = store.get(edge2.idMem()); + ChallengeEdge memory se3 = store.get(edge3.idMem()); + assertTrue(store.exists(se3.idMem()), "Edge exists"); + assertTrue(store.firstRivals(se.mutualIdMem()) == edge2.idMem(), "First rival1"); + assertTrue(store.firstRivals(se2.mutualIdMem()) == edge2.idMem(), "First rival2"); + assertTrue(store.firstRivals(se3.mutualIdMem()) == edge2.idMem(), "First rival3"); + } + + function testAddNonRivals() public { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2) = twoNonRivals(); + + store.add(edge1); + store.add(edge2); + + ChallengeEdge memory se = store.get(edge1.idMem()); + ChallengeEdge memory se2 = store.get(edge2.idMem()); + assertTrue(store.exists(se2.idMem()), "Edge exists"); + assertTrue( + store.firstRivals(se.mutualIdMem()) == EdgeChallengeManagerLib.UNRIVALED, "First rival1" + ); + assertTrue( + store.firstRivals(se2.mutualIdMem()) == EdgeChallengeManagerLib.UNRIVALED, + "First rival2" + ); + } + + function testCannotAddSameEdgeTwice() public { + ChallengeEdge memory edge = + ChallengeEdgeLib.newChildEdge(rand.hash(), rand.hash(), 0, rand.hash(), 10, 0); + + store.add(edge); + + vm.expectRevert(abi.encodeWithSelector(EdgeAlreadyExists.selector, edge.idMem())); + store.add(edge); + } + + function testHasRival() public { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2) = twoRivals(); + + store.add(edge1); + store.add(edge2); + + assertTrue(store.hasRival(edge1.idMem()), "Edge1 rival"); + assertTrue(store.hasRival(edge2.idMem()), "Edge2 rival"); + } + + function testHasRivalEmpty() public { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2) = twoRivals(); + + store.add(edge1); + store.add(edge2); + + assertTrue(store.hasRival(edge1.idMem()), "Edge1 rival"); + store.setFirstRival(edge2.mutualIdMem(), 0); + vm.expectRevert(abi.encodeWithSelector(EmptyFirstRival.selector)); + store.hasRival(edge2.idMem()); + } + + function testHasRivalMore() public { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2) = twoRivals(); + ChallengeEdge memory edge3 = ChallengeEdgeLib.newChildEdge( + edge1.originId, + edge1.startHistoryRoot, + edge1.startHeight, + rand.hash(), + edge1.endHeight, + 0 + ); + + store.add(edge1); + store.add(edge2); + store.add(edge3); + + assertTrue(store.hasRival(edge1.idMem()), "Edge1 rival"); + assertTrue(store.hasRival(edge2.idMem()), "Edge2 rival"); + assertTrue(store.hasRival(edge3.idMem()), "Edge2 rival"); + } + + function testNoRival() public { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2) = twoNonRivals(); + + store.add(edge1); + store.add(edge2); + + assertFalse(store.hasRival(edge1.idMem()), "Edge1 rival"); + assertFalse(store.hasRival(edge2.idMem()), "Edge2 rival"); + } + + function testRivalNotExist() public { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2) = twoRivals(); + + store.add(edge1); + + bytes32 edge2Id = edge2.idMem(); + vm.expectRevert(abi.encodeWithSelector(EdgeNotExists.selector, edge2Id)); + store.hasRival(edge2Id); + } + + function testSingleStepRivalNotRival() public { + bytes32 originId = rand.hash(); + ChallengeEdge memory edge1 = + ChallengeEdgeLib.newChildEdge(originId, rand.hash(), 9, rand.hash(), 10, 0); + ChallengeEdge memory edge2 = + ChallengeEdgeLib.newChildEdge(originId, rand.hash(), 9, rand.hash(), 10, 0); + + store.add(edge1); + store.add(edge2); + + assertFalse(store.hasLengthOneRival(edge1.idMem())); + assertFalse(store.hasLengthOneRival(edge2.idMem())); + } + + function testSingleStepRivalNotHeight() public { + bytes32 originId = rand.hash(); + bytes32 startRoot = rand.hash(); + ChallengeEdge memory edge1 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 8, rand.hash(), 10, 0); + ChallengeEdge memory edge2 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 8, rand.hash(), 10, 0); + + store.add(edge1); + store.add(edge2); + + assertFalse(store.hasLengthOneRival(edge1.idMem())); + assertFalse(store.hasLengthOneRival(edge2.idMem())); + } + + function testSingleStepRival() public { + bytes32 originId = rand.hash(); + bytes32 startRoot = rand.hash(); + ChallengeEdge memory edge1 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 9, rand.hash(), 10, 0); + ChallengeEdge memory edge2 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 9, rand.hash(), 10, 0); + + store.add(edge1); + store.add(edge2); + + assertTrue(store.hasLengthOneRival(edge1.idMem())); + assertTrue(store.hasLengthOneRival(edge2.idMem())); + } + + function testSingleStepRivalNotExist() public { + bytes32 originId = rand.hash(); + bytes32 startRoot = rand.hash(); + ChallengeEdge memory edge1 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 9, rand.hash(), 10, 0); + ChallengeEdge memory edge2 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 9, rand.hash(), 10, 0); + + store.add(edge1); + + bytes32 edge2Id = edge2.idMem(); + vm.expectRevert(abi.encodeWithSelector(EdgeNotExists.selector, edge2Id)); + store.hasLengthOneRival(edge2Id); + } + + function testTimeUnrivaled() public { + (ChallengeEdge memory edge1,) = twoRivals(); + + store.add(edge1); + vm.roll(block.number + 3); + + assertEq(store.timeUnrivaled(edge1.idMem()), 3, "Time unrivaled"); + } + + function testTimeUnrivaledFirstRivalEdgeNotExist() public { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2) = twoRivals(); + + store.add(edge1); + vm.roll(block.number + 3); + store.add(edge2); + + store.remove(edge2.idMem()); + + vm.expectRevert(abi.encodeWithSelector(EdgeNotExists.selector, edge2.idMem())); + store.timeUnrivaled(edge1.idMem()); + } + + function testTimeUnrivaledFirstRivalNotExist() public { + (ChallengeEdge memory edge1,) = twoRivals(); + + store.add(edge1); + vm.roll(block.number + 3); + + store.setFirstRival(edge1.mutualIdMem(), 0); + vm.expectRevert(abi.encodeWithSelector(EmptyFirstRival.selector)); + store.timeUnrivaled(edge1.idMem()); + } + + function testTimeUnrivaledNotExist() public { + (ChallengeEdge memory edge1,) = twoRivals(); + + vm.roll(block.number + 3); + + bytes32 id1 = edge1.idMem(); + vm.expectRevert(abi.encodeWithSelector(EdgeNotExists.selector, id1)); + store.timeUnrivaled(id1); + } + + function testTimeUnrivaledAfterRival() public { + bytes32 originId = rand.hash(); + bytes32 startRoot = rand.hash(); + ChallengeEdge memory edge1 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 3, rand.hash(), 9, 0); + + store.add(edge1); + vm.roll(block.number + 4); + + ChallengeEdge memory edge2 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 3, rand.hash(), 9, 0); + + store.add(edge2); + vm.roll(block.number + 5); + + ChallengeEdge memory edge3 = + ChallengeEdgeLib.newChildEdge(originId, startRoot, 3, rand.hash(), 9, 0); + store.add(edge3); + + vm.roll(block.number + 6); + + ChallengeEdge memory edge4 = + ChallengeEdgeLib.newChildEdge(originId, rand.hash(), 3, rand.hash(), 9, 0); + store.add(edge4); + + vm.roll(block.number + 7); + + assertEq(store.timeUnrivaled(edge1.idMem()), 4, "Time unrivaled 1"); + assertEq(store.timeUnrivaled(edge2.idMem()), 0, "Time unrivaled 2"); + assertEq(store.timeUnrivaled(edge3.idMem()), 0, "Time unrivaled 3"); + assertEq(store.timeUnrivaled(edge4.idMem()), 7, "Time unrivaled 4"); + } + + function testMandatoryBisectHeightSizeOne() public { + vm.expectRevert(abi.encodeWithSelector(HeightDiffLtTwo.selector, 1, 2)); + store.mandatoryBisectionHeight(1, 2); + } + + function testMandatoryBisectHeightSizes() public { + assertEq(store.mandatoryBisectionHeight(1, 3), 2); + assertEq(store.mandatoryBisectionHeight(0, 4), 2); + assertEq(store.mandatoryBisectionHeight(1, 4), 2); + assertEq(store.mandatoryBisectionHeight(2, 4), 3); + assertEq(store.mandatoryBisectionHeight(0, 5), 4); + assertEq(store.mandatoryBisectionHeight(1, 5), 4); + assertEq(store.mandatoryBisectionHeight(2, 5), 4); + assertEq(store.mandatoryBisectionHeight(3, 5), 4); + assertEq(store.mandatoryBisectionHeight(0, 6), 4); + assertEq(store.mandatoryBisectionHeight(1, 6), 4); + assertEq(store.mandatoryBisectionHeight(2, 6), 4); + assertEq(store.mandatoryBisectionHeight(3, 6), 4); + assertEq(store.mandatoryBisectionHeight(4, 6), 5); + assertEq(store.mandatoryBisectionHeight(0, 7), 4); + assertEq(store.mandatoryBisectionHeight(1, 7), 4); + assertEq(store.mandatoryBisectionHeight(2, 7), 4); + assertEq(store.mandatoryBisectionHeight(2, 7), 4); + assertEq(store.mandatoryBisectionHeight(3, 7), 4); + assertEq(store.mandatoryBisectionHeight(4, 7), 6); + assertEq(store.mandatoryBisectionHeight(5, 7), 6); + assertEq(store.mandatoryBisectionHeight(0, 8), 4); + assertEq(store.mandatoryBisectionHeight(1, 8), 4); + assertEq(store.mandatoryBisectionHeight(2, 8), 4); + assertEq(store.mandatoryBisectionHeight(3, 8), 4); + assertEq(store.mandatoryBisectionHeight(4, 8), 6); + assertEq(store.mandatoryBisectionHeight(5, 8), 6); + assertEq(store.mandatoryBisectionHeight(6, 8), 7); + assertEq(store.mandatoryBisectionHeight(0, 9), 8); + assertEq(store.mandatoryBisectionHeight(1, 9), 8); + assertEq(store.mandatoryBisectionHeight(2, 9), 8); + assertEq(store.mandatoryBisectionHeight(2, 9), 8); + assertEq(store.mandatoryBisectionHeight(3, 9), 8); + assertEq(store.mandatoryBisectionHeight(4, 9), 8); + assertEq(store.mandatoryBisectionHeight(5, 9), 8); + assertEq(store.mandatoryBisectionHeight(6, 9), 8); + assertEq(store.mandatoryBisectionHeight(7, 9), 8); + assertEq(store.mandatoryBisectionHeight(0, 10), 8); + assertEq(store.mandatoryBisectionHeight(1, 10), 8); + assertEq(store.mandatoryBisectionHeight(2, 10), 8); + assertEq(store.mandatoryBisectionHeight(3, 10), 8); + assertEq(store.mandatoryBisectionHeight(4, 10), 8); + assertEq(store.mandatoryBisectionHeight(5, 10), 8); + assertEq(store.mandatoryBisectionHeight(6, 10), 8); + assertEq(store.mandatoryBisectionHeight(7, 10), 8); + assertEq(store.mandatoryBisectionHeight(8, 10), 9); + assertEq(store.mandatoryBisectionHeight(0, 11), 8); + assertEq(store.mandatoryBisectionHeight(1, 11), 8); + assertEq(store.mandatoryBisectionHeight(2, 11), 8); + assertEq(store.mandatoryBisectionHeight(3, 11), 8); + assertEq(store.mandatoryBisectionHeight(4, 11), 8); + assertEq(store.mandatoryBisectionHeight(5, 11), 8); + assertEq(store.mandatoryBisectionHeight(6, 11), 8); + assertEq(store.mandatoryBisectionHeight(7, 11), 8); + assertEq(store.mandatoryBisectionHeight(8, 11), 10); + assertEq(store.mandatoryBisectionHeight(9, 11), 10); + assertEq(store.mandatoryBisectionHeight(7, 73), 64); + assertEq(store.mandatoryBisectionHeight(765273563, 10898783768364), 8796093022208); + } + + function getExpansion( + uint256 leafCount + ) internal returns (bytes32[] memory) { + bytes32[] memory hashes = rand.hashes(leafCount); + bytes32[] memory expansion = ProofUtils.expansionFromLeaves(hashes, 0, leafCount); + return expansion; + } + + function appendRandomStates( + bytes32[] memory currentStates, + uint256 numStates + ) internal returns (bytes32[] memory, bytes32[] memory) { + bytes32[] memory newStates = rand.hashes(numStates); + bytes32[] memory full = ArrayUtilsLib.concat(currentStates, newStates); + bytes32[] memory exp = ProofUtils.expansionFromLeaves(full, 0, full.length); + + return (full, exp); + } + + function appendRandomStatesBetween( + bytes32[] memory currentStates, + bytes32 endState, + uint256 numStates + ) internal returns (bytes32[] memory, bytes32[] memory) { + (bytes32[] memory states, bytes32[] memory exp) = + appendRandomStates(currentStates, numStates - 1); + bytes32[] memory fullStates = ArrayUtilsLib.append(states, endState); + bytes32[] memory fullExp = MerkleTreeAccumulatorLib.appendLeaf(exp, endState); + return (fullStates, fullExp); + } + + struct BisectionDefArgs { + uint256 start; + uint256 agreePoint; + uint256 end; + } + + function rivalStates( + uint256 start, + uint256 agreePoint, + uint256 end + ) internal returns (bytes32[] memory, bytes32[] memory) { + bytes32[] memory preStates = rand.hashes(start + 1); + (bytes32[] memory agreeStates,) = appendRandomStates(preStates, agreePoint - start); + (bytes32[] memory states1,) = appendRandomStates(agreeStates, end - agreePoint); + + (bytes32[] memory states2,) = appendRandomStates(agreeStates, end - agreePoint); + + return (states1, states2); + } + + function edgeFromStates( + bytes32 originId, + uint256 start, + uint256 end, + bytes32[] memory states + ) internal view returns (ChallengeEdge memory) { + bytes32 startRoot = + MerkleTreeAccumulatorLib.root(ProofUtils.expansionFromLeaves(states, 0, start + 1)); + bytes32 endRoot = + MerkleTreeAccumulatorLib.root(ProofUtils.expansionFromLeaves(states, 0, end + 1)); + + return ChallengeEdgeLib.newChildEdge(originId, startRoot, start, endRoot, end, 0); + } + + function proofGen( + uint256 start, + bytes32[] memory states + ) internal pure returns (bytes32[] memory) { + return + ProofUtils.generatePrefixProof(start, ArrayUtilsLib.slice(states, start, states.length)); + } + + function twoRivalsFromLeaves( + uint256 start, + uint256 agreePoint, + uint256 end + ) + internal + returns (ChallengeEdge memory, ChallengeEdge memory, bytes32[] memory, bytes32[] memory) + { + (bytes32[] memory states1, bytes32[] memory states2) = rivalStates(start, agreePoint, end); + + ChallengeEdge memory edge1 = edgeFromStates(rand.hash(), start, end, states1); + ChallengeEdge memory edge2 = edgeFromStates(edge1.originId, start, end, states2); + + return (edge1, edge2, states1, states2); + } + + function bisectEdgeEmitted( + ChallengeEdge memory edge, + bytes32 bisectionRoot, + uint256 bisectionHeight, + bool lowerChildHasRival, + bool upperChildHasRival, + bytes32 lowerChildId, + EdgeAddedData memory lowerChildAdded, + EdgeAddedData memory upperChildAdded + ) internal { + ChallengeEdge memory lowerChild = ChallengeEdgeLib.newChildEdge( + edge.originId, + edge.startHistoryRoot, + edge.startHeight, + bisectionRoot, + bisectionHeight, + edge.level + ); + ChallengeEdge memory upperChild = ChallengeEdgeLib.newChildEdge( + edge.originId, + bisectionRoot, + bisectionHeight, + edge.endHistoryRoot, + edge.endHeight, + edge.level + ); + + if (lowerChildAdded.edgeId != 0) { + checkEdgeAddedData(lowerChild, lowerChildHasRival, lowerChildAdded); + } + checkEdgeAddedData(upperChild, upperChildHasRival, upperChildAdded); + + bytes32 lowerId = lowerChild.idMem(); + assertEq(lowerId, lowerChildId, "Invalid lower child id"); + } + + function bisectAndCheck( + ChallengeEdge memory edge, + bytes32 bisectionRoot, + uint256 bisectionPoint, + bytes32[] memory states, + bool lowerHasRival, + bool upperHasRival + ) internal { + bytes memory prefixProof = abi.encode( + ProofUtils.expansionFromLeaves(states, 0, bisectionPoint + 1), + ProofUtils.generatePrefixProof( + bisectionPoint + 1, ArrayUtilsLib.slice(states, bisectionPoint + 1, states.length) + ) + ); + ( + bytes32 lowerChildId, + EdgeAddedData memory lowerChildAdded, + EdgeAddedData memory upperChildAdded + ) = store.bisectEdge(edge.idMem(), bisectionRoot, prefixProof); + bisectEdgeEmitted( + edge, + bisectionRoot, + bisectionPoint, + lowerHasRival, + upperHasRival, + lowerChildId, + lowerChildAdded, + upperChildAdded + ); + } + + function testBisectEdge() public { + uint256 start = 3; + uint256 agree = 5; // agree point is below the bisection point of 8 + uint256 end = 11; + uint256 bisectionPoint = store.mandatoryBisectionHeight(start, end); + + ( + ChallengeEdge memory edge1, + ChallengeEdge memory edge2, + bytes32[] memory states1, + bytes32[] memory states2 + ) = twoRivalsFromLeaves(start, agree, end); + + store.add(edge1); + store.add(edge2); + + bytes32 bisectionRoot1 = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint + 1) + ); + bisectAndCheck(edge1, bisectionRoot1, bisectionPoint, states1, false, false); + + assertEq( + store.get(edge1.idMem()).lowerChildId, + ( + ChallengeEdgeLib.newChildEdge( + edge1.originId, + edge1.startHistoryRoot, + edge1.startHeight, + bisectionRoot1, + bisectionPoint, + edge1.level + ) + ).idMem(), + "Lower child id" + ); + + assertEq( + store.get(edge1.idMem()).upperChildId, + ( + ChallengeEdgeLib.newChildEdge( + edge1.originId, + bisectionRoot1, + bisectionPoint, + edge1.endHistoryRoot, + edge1.endHeight, + edge1.level + ) + ).idMem(), + "Lower child id" + ); + + assertFalse(store.hasRival(store.get(edge1.idMem()).lowerChildId), "Lower child rival"); + assertFalse(store.hasRival(store.get(edge1.idMem()).upperChildId), "Upper child rival"); + + bytes32 bisectionRoot2 = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states2, 0, bisectionPoint + 1) + ); + bisectAndCheck(edge2, bisectionRoot2, bisectionPoint, states2, true, false); + + assertEq( + store.get(edge2.idMem()).lowerChildId, + ( + ChallengeEdgeLib.newChildEdge( + edge2.originId, + edge2.startHistoryRoot, + edge2.startHeight, + bisectionRoot2, + bisectionPoint, + edge2.level + ) + ).idMem(), + "Lower child id" + ); + + assertEq( + store.get(edge2.idMem()).upperChildId, + ( + ChallengeEdgeLib.newChildEdge( + edge2.originId, + bisectionRoot2, + bisectionPoint, + edge2.endHistoryRoot, + edge2.endHeight, + edge2.level + ) + ).idMem(), + "Lower child id" + ); + + assertTrue(store.hasRival(store.get(edge2.idMem()).lowerChildId), "Lower child rival"); + assertFalse(store.hasRival(store.get(edge2.idMem()).upperChildId), "Upper child rival"); + } + + function bisectMergeEdge( + uint256 agree + ) internal { + uint256 start = 3; + uint256 end = 11; + uint256 bisectionPoint = store.mandatoryBisectionHeight(start, end); + + ( + ChallengeEdge memory edge1, + ChallengeEdge memory edge2, + bytes32[] memory states1, + bytes32[] memory states2 + ) = twoRivalsFromLeaves(start, agree, end); + + store.add(edge1); + store.add(edge2); + + bytes32 bisectionRoot1 = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint + 1) + ); + bisectAndCheck(edge1, bisectionRoot1, bisectionPoint, states1, false, false); + + assertEq( + store.get(edge1.idMem()).lowerChildId, + ( + ChallengeEdgeLib.newChildEdge( + edge1.originId, + edge1.startHistoryRoot, + edge1.startHeight, + bisectionRoot1, + bisectionPoint, + edge1.level + ) + ).idMem(), + "Lower child id" + ); + + assertEq( + store.get(edge1.idMem()).upperChildId, + ( + ChallengeEdgeLib.newChildEdge( + edge1.originId, + bisectionRoot1, + bisectionPoint, + edge1.endHistoryRoot, + edge1.endHeight, + edge1.level + ) + ).idMem(), + "Lower child id" + ); + + assertFalse(store.hasRival(store.get(edge1.idMem()).lowerChildId), "Lower child rival"); + assertFalse(store.hasRival(store.get(edge1.idMem()).upperChildId), "Upper child rival"); + + bytes32 bisectionRoot2 = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states2, 0, bisectionPoint + 1) + ); + bisectAndCheck(edge2, bisectionRoot2, bisectionPoint, states2, false, true); + + assertEq( + store.get(edge2.idMem()).lowerChildId, + ( + ChallengeEdgeLib.newChildEdge( + edge2.originId, + edge2.startHistoryRoot, + edge2.startHeight, + bisectionRoot2, + bisectionPoint, + edge2.level + ) + ).idMem(), + "Lower child id" + ); + + assertEq( + store.get(edge2.idMem()).upperChildId, + ( + ChallengeEdgeLib.newChildEdge( + edge2.originId, + bisectionRoot2, + bisectionPoint, + edge2.endHistoryRoot, + edge2.endHeight, + edge2.level + ) + ).idMem(), + "Lower child id" + ); + + assertFalse(store.hasRival(store.get(edge2.idMem()).lowerChildId), "Lower child rival"); + assertTrue(store.hasRival(store.get(edge2.idMem()).upperChildId), "Upper child rival"); + + assertEq( + store.hasRival(store.get(edge1.idMem()).lowerChildId), + store.hasRival(store.get(edge2.idMem()).lowerChildId), + "Lower children equal" + ); + } + + function testBisectMergeEdge() public { + bisectMergeEdge(9); + } + + function testBisectMergeEdgeEqualBisection() public { + bisectMergeEdge(8); + } + + function testBisectNoRival() public { + uint256 start = 3; + uint256 agree = 5; + uint256 end = 11; + uint256 bisectionPoint = store.mandatoryBisectionHeight(start, end); + + (ChallengeEdge memory edge1,, bytes32[] memory states1,) = + twoRivalsFromLeaves(start, agree, end); + + store.add(edge1); + + bytes32 bisectionRoot1 = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint + 1) + ); + bytes32 edgeId = edge1.idMem(); + bytes memory proof = abi.encode( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint + 1), + ProofUtils.generatePrefixProof( + bisectionPoint + 1, ArrayUtilsLib.slice(states1, bisectionPoint + 1, states1.length) + ) + ); + vm.expectRevert(abi.encodeWithSelector(EdgeUnrivaled.selector, edgeId)); + store.bisectEdge(edgeId, bisectionRoot1, proof); + } + + function testBisectTwice() public { + uint256 start = 3; + uint256 agree = 5; + uint256 end = 11; + uint256 bisectionPoint = store.mandatoryBisectionHeight(start, end); + + (ChallengeEdge memory edge1, ChallengeEdge memory edge2, bytes32[] memory states1,) = + twoRivalsFromLeaves(start, agree, end); + + store.add(edge1); + store.add(edge2); + + bytes32 bisectionRoot1 = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint + 1) + ); + bytes32 edgeId = edge1.idMem(); + bytes memory proof = abi.encode( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint + 1), + ProofUtils.generatePrefixProof( + bisectionPoint + 1, ArrayUtilsLib.slice(states1, bisectionPoint + 1, states1.length) + ) + ); + store.bisectEdge(edgeId, bisectionRoot1, proof); + + vm.expectRevert( + abi.encodeWithSelector(EdgeAlreadyExists.selector, store.get(edgeId).upperChildId) + ); + store.bisectEdge(edgeId, bisectionRoot1, proof); + } + + function testBisectInvalidProof() public { + uint256 start = 3; + uint256 agree = 5; + uint256 end = 11; + uint256 bisectionPoint = store.mandatoryBisectionHeight(start, end); + + (ChallengeEdge memory edge1, ChallengeEdge memory edge2, bytes32[] memory states1,) = + twoRivalsFromLeaves(start, agree, end); + + store.add(edge1); + store.add(edge2); + + bytes32 bisectionRoot1 = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint + 1) + ); + bytes32 edgeId = edge1.idMem(); + bytes memory proof = abi.encode( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint), + ProofUtils.generatePrefixProof( + bisectionPoint + 1, ArrayUtilsLib.slice(states1, bisectionPoint + 1, states1.length) + ) + ); + vm.expectRevert("Pre expansion root mismatch"); + store.bisectEdge(edgeId, bisectionRoot1, proof); + } + + function testBisectEdgeConfirmed() public { + uint256 start = 3; + uint256 agree = 5; // agree point is below the bisection point of 8 + uint256 end = 11; + uint256 bisectionPoint = store.mandatoryBisectionHeight(start, end); + + (ChallengeEdge memory edge1, ChallengeEdge memory edge2, bytes32[] memory states1,) = + twoRivalsFromLeaves(start, agree, end); + + edge1.status = EdgeStatus.Confirmed; + + store.add(edge1); + store.add(edge2); + + bytes32 bisectionRoot1 = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint + 1) + ); + bytes memory proof = abi.encode( + ProofUtils.expansionFromLeaves(states1, 0, bisectionPoint + 1), + ProofUtils.generatePrefixProof( + bisectionPoint + 1, ArrayUtilsLib.slice(states1, bisectionPoint + 1, states1.length) + ) + ); + bytes32 edgeId = edge1.idMem(); + vm.expectRevert( + abi.encodeWithSelector(EdgeNotPending.selector, edgeId, EdgeStatus.Confirmed) + ); + store.bisectEdge(edgeId, bisectionRoot1, proof); + } + + function testBisectEdgeLengthOne() public { + uint256 start = 0; + uint256 end = 1; + + bytes32[] memory states1 = new bytes32[](2); + states1[0] = rand.hash(); + states1[1] = rand.hash(); + bytes32[] memory states2 = new bytes32[](2); + states2[0] = states1[0]; + states2[1] = rand.hash(); + ChallengeEdge memory edge1 = edgeFromStates(rand.hash(), start, end, states1); + ChallengeEdge memory edge2 = edgeFromStates(edge1.originId, start, end, states2); + + store.add(edge1); + store.add(edge2); + + bytes32 edgeId = edge1.idMem(); + vm.expectRevert(abi.encodeWithSelector(HeightDiffLtTwo.selector, start, end)); + store.bisectEdge(edgeId, edge1.endHistoryRoot, ""); + } + + function bisectArgs( + bytes32[] memory states, + uint256 start, + uint256 end + ) internal view returns (uint256, bytes32, bytes memory) { + uint256 bisectionPoint = store.mandatoryBisectionHeight(start, end); + bytes32 bisectionRoot = MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states, 0, bisectionPoint + 1) + ); + bytes memory proof = abi.encode( + ProofUtils.expansionFromLeaves(states, 0, bisectionPoint + 1), + ProofUtils.generatePrefixProof( + bisectionPoint + 1, ArrayUtilsLib.slice(states, bisectionPoint + 1, end + 1) + ) + ); + + return (bisectionPoint, bisectionRoot, proof); + } + + function addParentAndChildren( + uint256 start, + uint256 agree, + uint256 end + ) internal returns (bytes32, bytes32, bytes32) { + (ChallengeEdge memory edge1, ChallengeEdge memory edge2, bytes32[] memory states1,) = + twoRivalsFromLeaves(start, agree, end); + store.add(edge1); + store.add(edge2); + + (, bytes32 bisectionRoot, bytes memory bisectionProof) = bisectArgs(states1, start, end); + + (bytes32 lowerChildId,, EdgeAddedData memory upperChildAdded) = + store.bisectEdge(edge1.idMem(), bisectionRoot, bisectionProof); + + return (edge1.idMem(), lowerChildId, upperChildAdded.edgeId); + } + + function testNextlevel() public { + assertTrue(store.nextEdgeLevel(0, NUM_BIGSTEP_LEVEL) == 1); + assertTrue( + store.nextEdgeLevel(NUM_BIGSTEP_LEVEL, NUM_BIGSTEP_LEVEL) == NUM_BIGSTEP_LEVEL + 1 + ); + vm.expectRevert( + abi.encodeWithSelector(LevelTooHigh.selector, NUM_BIGSTEP_LEVEL + 2, NUM_BIGSTEP_LEVEL) + ); + store.nextEdgeLevel(NUM_BIGSTEP_LEVEL + 1, NUM_BIGSTEP_LEVEL); + } + + function bisect( + ChallengeEdge memory edge, + bytes32[] memory states, + uint256 start, + uint256 end + ) internal returns (bytes32, bytes32) { + (, bytes32 bisectionRoot, bytes memory bisectionProof) = bisectArgs(states, start, end); + (bytes32 lowerChildId,, EdgeAddedData memory upperChildAdded) = + store.bisectEdge(edge.idMem(), bisectionRoot, bisectionProof); + return (lowerChildId, upperChildAdded.edgeId); + } + + struct BArgs { + bytes32 edge1Id; + bytes32 edge2Id; + bytes32 lowerChildId1; + bytes32 upperChildId1; + bytes32 lowerChildId2; + bytes32 upperChildId2; + bytes32[] states1; + bytes32[] states2; + } + + function addParentsAndChildren( + uint256 start, + uint256 agree, + uint256 end + ) internal returns (BArgs memory) { + ( + ChallengeEdge memory edge1, + ChallengeEdge memory edge2, + bytes32[] memory states1, + bytes32[] memory states2 + ) = twoRivalsFromLeaves(start, agree, end); + + store.add(edge1); + store.add(edge2); + + (bytes32 lowerChildId1, bytes32 upperChildId1) = bisect(edge1, states1, start, end); + (bytes32 lowerChildId2, bytes32 upperChildId2) = bisect(edge2, states2, start, end); + + return BArgs( + edge1.idMem(), + edge2.idMem(), + lowerChildId1, + upperChildId1, + lowerChildId2, + upperChildId2, + states1, + states2 + ); + } + + // todo: + // updateTimerCacheByClaim + + function testTimeUnrivaledTotalAndUpdateTimerCacheByChildren() public { + ( + ChallengeEdge memory edge1, + ChallengeEdge memory edge2, + bytes32[] memory states1, + bytes32[] memory states2 + ) = twoRivalsFromLeaves(2, 5, 8); + + // create 2 two parent edges + store.add(edge1); + vm.roll(block.number + 2); + edge2.createdAtBlock = uint64(block.number); + store.add(edge2); + + // bisect first parent + (, bytes32 bisectionRoot1, bytes memory bisectionProof1) = bisectArgs(states1, 2, 8); + (bytes32 lowerChildId1,, EdgeAddedData memory upperChildAdded1) = + store.bisectEdge(edge1.idMem(), bisectionRoot1, bisectionProof1); + + // roll forward a bit + vm.roll(block.number + 20); + + // bisect second parent + (, bytes32 bisectionRoot2, bytes memory bisectionProof2) = bisectArgs(states2, 2, 8); + (bytes32 lowerChildId2,, EdgeAddedData memory upperChildAdded2) = + store.bisectEdge(edge2.idMem(), bisectionRoot2, bisectionProof2); + + // roll forward a bit + vm.roll(block.number + 200); + + // make sure we have expected time unrivaled + assertEq(store.timeUnrivaled(edge1.idMem()), 2); + assertEq(store.timeUnrivaled(edge2.idMem()), 0); + assertEq(store.timeUnrivaled(lowerChildId1), 220); + assertEq(store.timeUnrivaled(upperChildAdded1.edgeId), 20); + assertEq(store.timeUnrivaled(lowerChildId2), 220); + assertEq(store.timeUnrivaled(upperChildAdded2.edgeId), 0); + + // make sure caches are 0 + assertEq(store.get(edge1.idMem()).totalTimeUnrivaledCache, 0); + assertEq(store.get(edge2.idMem()).totalTimeUnrivaledCache, 0); + assertEq(store.get(lowerChildId1).totalTimeUnrivaledCache, 0); + assertEq(store.get(upperChildAdded1.edgeId).totalTimeUnrivaledCache, 0); + assertEq(store.get(lowerChildId2).totalTimeUnrivaledCache, 0); + assertEq(store.get(upperChildAdded2.edgeId).totalTimeUnrivaledCache, 0); + + // make sure leaves just return their time unrivaled for total time unrivaled + assertEq(store.timeUnrivaledTotal(lowerChildId1), 220); + assertEq(store.timeUnrivaledTotal(upperChildAdded1.edgeId), 20); + assertEq(store.timeUnrivaledTotal(lowerChildId2), 220); + assertEq(store.timeUnrivaledTotal(upperChildAdded2.edgeId), 0); + + // make sure parents return their time unrivaled for total time unrivaled (since we haven't updated caches yet) + assertEq(store.timeUnrivaledTotal(edge1.idMem()), 2); + assertEq(store.timeUnrivaledTotal(edge2.idMem()), 0); + + // update the child caches, since they are leaves, this should just set the cache to the time unrivaled + store.updateTimerCacheByChildren(lowerChildId1, 220); + store.updateTimerCacheByChildren(upperChildAdded1.edgeId, 20); + vm.expectRevert(abi.encodeWithSelector(CachedTimeSufficient.selector, 220, 220)); + store.updateTimerCacheByChildren(lowerChildId2, 220); + vm.expectRevert(abi.encodeWithSelector(CachedTimeSufficient.selector, 0, 0)); + store.updateTimerCacheByChildren(upperChildAdded2.edgeId, 0); + assertEq(store.get(lowerChildId1).totalTimeUnrivaledCache, 220); + assertEq(store.get(upperChildAdded1.edgeId).totalTimeUnrivaledCache, 20); + assertEq(store.get(lowerChildId2).totalTimeUnrivaledCache, 220); + assertEq(store.get(upperChildAdded2.edgeId).totalTimeUnrivaledCache, 0); + + // time unrivaled total should now return the parent's time unrivaled plus the lower child's time unrivaled cache + assertEq(store.timeUnrivaledTotal(edge1.idMem()), 22); + assertEq(store.timeUnrivaledTotal(edge2.idMem()), 0); + + // updating the cache should set the cache to the time unrivaled total + store.updateTimerCacheByChildren(edge1.idMem(), 22); + vm.expectRevert(abi.encodeWithSelector(CachedTimeSufficient.selector, 0, 0)); + store.updateTimerCacheByChildren(edge2.idMem(), 0); + assertEq(store.get(edge1.idMem()).totalTimeUnrivaledCache, 22); + assertEq(store.get(edge2.idMem()).totalTimeUnrivaledCache, 0); + } + + struct ConfirmByOneStepData { + ChallengeEdge e1; + ChallengeEdge e2; + bytes32[] beforeProof; + bytes32[] afterProof; + bytes revertArg; + } + + uint256 BIGSTEPHEIGHT = 1 << 4; + uint256 SMALLSTEPHEIGHT = 1 << 6; + + function addUpLastLevel() internal returns (bytes32 originId, uint256[] memory startHeights) { + originId = rand.hash(); + + startHeights = new uint256[](NUM_BIGSTEP_LEVEL + 1); + for (uint256 i = 0; i < NUM_BIGSTEP_LEVEL + 1; i++) { + uint256 startHeight = rand.unsignedInt(BIGSTEPHEIGHT); + ChallengeEdge memory e1 = ChallengeEdgeLib.newChildEdge( + originId, rand.hash(), startHeight, rand.hash(), startHeight + 1, uint8(i) + ); + store.add(e1); + ChallengeEdge memory e2 = ChallengeEdgeLib.newChildEdge( + originId, e1.startHistoryRoot, startHeight, rand.hash(), startHeight + 1, uint8(i) + ); + store.add(e2); + + originId = e1.mutualIdMem(); + startHeights[i] = startHeight; + } + } + + function getLayerZeroStepSize( + uint256 numBigStepLevel, + uint256 bigStepHeight, + uint256 smallStepHeight, + uint256 level + ) internal returns (uint256) { + uint256 stepSize = 1; + uint256 maxLevelIndex = numBigStepLevel + 1; + for (uint256 i = level; i < maxLevelIndex; i++) { + if (i == maxLevelIndex - 1) { + stepSize *= smallStepHeight; + } else { + stepSize *= bigStepHeight; + } + } + return stepSize; + } + + function confirmByOneStep( + uint256 flag + ) internal { + uint256 startHeight = rand.unsignedInt(SMALLSTEPHEIGHT); + (bytes32[] memory states1, bytes32[] memory states2) = + rivalStates(startHeight, startHeight, startHeight + 1); + + (bytes32 originId, uint256[] memory startHeights) = addUpLastLevel(); + ConfirmByOneStepData memory data; + data.e1 = ChallengeEdgeLib.newChildEdge( + originId, + MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states1, 0, startHeight + 1) + ), + startHeight, + MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states1, 0, startHeight + 2) + ), + startHeight + 1, + NUM_BIGSTEP_LEVEL + 1 + ); + + data.e2 = ChallengeEdgeLib.newChildEdge( + originId, + MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states2, 0, startHeight + 1) + ), + startHeight, + MerkleTreeAccumulatorLib.root( + ProofUtils.expansionFromLeaves(states2, 0, startHeight + 2) + ), + startHeight + 1, + NUM_BIGSTEP_LEVEL + 1 + ); + if (flag == 3) { + data.e1.level = NUM_BIGSTEP_LEVEL; + data.revertArg = abi.encodeWithSelector(EdgeTypeNotSmallStep.selector, data.e1.level); + } + if (flag == 5) { + data.e1.endHeight = data.e1.endHeight + 1; + data.revertArg = abi.encodeWithSelector(EdgeNotLengthOne.selector, 2); + } + bytes32 eid = data.e1.idMem(); + if (flag == 2) { + data.e1.status = EdgeStatus.Confirmed; + data.revertArg = abi.encodeWithSelector(EdgeNotPending.selector, eid, data.e1.status); + } + + uint256 expectedStartMachineStep = startHeight; + { + for (uint256 i = 1; i < startHeights.length; i++) { + expectedStartMachineStep += getLayerZeroStepSize( + NUM_BIGSTEP_LEVEL, BIGSTEPHEIGHT, SMALLSTEPHEIGHT, i + ) * startHeights[i]; + } + } + + if (flag != 1) { + store.add(data.e1); + } else { + data.revertArg = abi.encodeWithSelector(EdgeNotExists.selector, eid); + } + if (flag != 4) { + store.add(data.e2); + } + OneStepData memory d = OneStepData({ + beforeHash: states1[startHeight], + proof: abi.encodePacked(states1[startHeight + 1]) + }); + ExecutionContext memory e = ExecutionContext({ + maxInboxMessagesRead: 0, + bridge: IBridge(address(0)), + initialWasmModuleRoot: bytes32(0) + }); + data.beforeProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(states1, 0, startHeight + 1)), startHeight + ); + if (flag == 6) { + data.beforeProof[0] = rand.hash(); + data.revertArg = "Invalid inclusion proof"; + } + data.afterProof = + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states1), startHeight + 1); + if (flag == 7) { + data.afterProof[0] = rand.hash(); + data.revertArg = "Invalid inclusion proof"; + } + if (flag == 8) { + d.proof = abi.encodePacked(rand.hash()); + data.revertArg = "Invalid inclusion proof"; + } + if (flag == 9) { + store.setConfirmed(data.e2.idMem()); + store.setConfirmedRival(data.e2.idMem()); + data.revertArg = abi.encodeWithSelector( + RivalEdgeConfirmed.selector, data.e1.idMem(), data.e2.idMem() + ); + } + + MockOneStepProofEntry entry = new MockOneStepProofEntry(expectedStartMachineStep); + + if (data.revertArg.length != 0) { + vm.expectRevert(data.revertArg); + } + store.confirmEdgeByOneStepProof( + eid, entry, d, e, data.beforeProof, data.afterProof, NUM_BIGSTEP_LEVEL, 1 << 4, 1 << 6 + ); + + if (bytes(data.revertArg).length != 0) { + // for flag one the edge does not exist + // for flag two we set the status to confirmed anyway + if (flag != 1 && flag != 2) { + assertTrue(store.get(eid).status == EdgeStatus.Pending, "Edge pending"); + } + } else { + assertTrue(store.get(eid).status == EdgeStatus.Confirmed, "Edge confirmed"); + assertEq( + store.getConfirmedRival(ChallengeEdgeLib.mutualIdMem(data.e1)), + eid, + "Confirmed rival" + ); + } + } + + error MachineStep( + uint256 actual, uint256 expected, uint256[] startHeights, uint256 smallStartHeight + ); + + function testConfirmByOneStep() public { + confirmByOneStep(0); + } + + function testConfirmByOneStepNotExist() public { + confirmByOneStep(1); + } + + function testConfirmByOneStepNotPending() public { + confirmByOneStep(2); + } + + function testConfirmByOneStepNotSmallStep() public { + confirmByOneStep(3); + } + + function testConfirmByOneStepNotLengthOne() public { + confirmByOneStep(5); + } + + function testConfirmByOneStepBadStartProof() public { + confirmByOneStep(6); + } + + function testConfirmByOneStepBadAfterProof() public { + confirmByOneStep(7); + } + + function testConfirmByOneStepBadOneStepReturn() public { + confirmByOneStep(8); + } + + function testConfirmByOneStepRivalConfirmed() public { + confirmByOneStep(9); + } + + function testPowerOfTwo() public { + assertEq(store.isPowerOfTwo(0), false); + assertEq(store.isPowerOfTwo(1), true); + assertEq(store.isPowerOfTwo(2), true); + assertEq(store.isPowerOfTwo(3), false); + assertEq(store.isPowerOfTwo(4), true); + assertEq(store.isPowerOfTwo(5), false); + assertEq(store.isPowerOfTwo(6), false); + assertEq(store.isPowerOfTwo(7), false); + assertEq(store.isPowerOfTwo(8), true); + assertEq(store.isPowerOfTwo(2 ** 17), true); + assertEq(store.isPowerOfTwo(1 << 255), true); + } + + struct ExpsAndProofs { + bytes32[] states; + bytes32[] startExp; + bytes32[] endExp; + bytes32[] startInclusionProof; + bytes32[] endInclusionProof; + bytes32[] prefixProof; + } + + function newRootsAndProofs( + uint256 startHeight, + uint256 endHeight, + bytes32 startState, + bytes32 endState + ) internal returns (ExpsAndProofs memory) { + bytes32[] memory states; + { + if (startState == 0) { + startState = rand.hash(); + } + if (endState == 0) { + endState = rand.hash(); + } + + bytes32[] memory innerStates = rand.hashes(endHeight - 1); + bytes32[] memory startStates = new bytes32[](1); + startStates[0] = startState; + bytes32[] memory endStates = new bytes32[](1); + endStates[0] = endState; + states = ArrayUtilsLib.concat(ArrayUtilsLib.concat(startStates, innerStates), endStates); + } + bytes32[] memory startExp = ProofUtils.expansionFromLeaves(states, 0, startHeight + 1); + bytes32[] memory expansion = ProofUtils.expansionFromLeaves(states, 0, endHeight + 1); + + // inclusion in the start root + bytes32[] memory startInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(states, 0, startHeight + 1)), startHeight + ); + bytes32[] memory endInclusionProof = + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states), endHeight); + + bytes32[] memory prefixProof = ProofUtils.generatePrefixProof( + startHeight + 1, ArrayUtilsLib.slice(states, startHeight + 1, endHeight + 1) + ); + + return ExpsAndProofs( + states, startExp, expansion, startInclusionProof, endInclusionProof, prefixProof + ); + } + + struct ExecStateVars { + AssertionState assertionState; + bytes32 machineHash; + } + + function randomAssertionState( + IOneStepProofEntry os + ) private returns (ExecStateVars memory) { + AssertionState memory assertionState = AssertionState( + GlobalState( + [rand.hash(), rand.hash()], + [uint64(uint256(rand.hash())), uint64(uint256(rand.hash()))] + ), + MachineStatus.FINISHED, + bytes32(0) + ); + + bytes32 machineHash = os.getMachineHash(assertionState.toExecutionState()); + return ExecStateVars(assertionState, machineHash); + } + + function createZeroBlockEdge( + uint256 mode + ) internal returns (EdgeAddedData memory) { + return createZeroBlockEdge(mode, ""); + } + + function createZeroBlockEdge( + uint256 mode, + bytes memory extraData + ) internal returns (EdgeAddedData memory) { + bytes memory revertArg; + MockOneStepProofEntry entry = new MockOneStepProofEntry(0); + uint256 expectedEndHeight = 2 ** 2; + if (mode == 139) { + expectedEndHeight = 2 ** 5 - 1; + revertArg = abi.encodeWithSelector(NotPowerOfTwo.selector, expectedEndHeight); + } + + bool whitelistEnabled = mode == 150 || mode == 151; + + if (mode == 151) { + bytes32 expectedMutualId = abi.decode(extraData, (bytes32)); + revertArg = abi.encodeWithSelector( + AccountHasMadeLayerZeroRival.selector, address(this), expectedMutualId + ); + } + + ExecStateVars memory startExec = randomAssertionState(entry); + ExecStateVars memory endExec = randomAssertionState(entry); + ExpsAndProofs memory roots = + newRootsAndProofs(0, expectedEndHeight, startExec.machineHash, endExec.machineHash); + bytes32 claimId = rand.hash(); + bytes32 endRoot; + if (mode == 137) { + endRoot = rand.hash(); + revertArg = "Invalid inclusion proof"; + } else { + endRoot = MerkleTreeAccumulatorLib.root(roots.endExp); + } + AssertionReferenceData memory ard; + if (mode != 144) { + ard = AssertionReferenceData({ + assertionHash: claimId, + predecessorId: rand.hash(), + isPending: true, + hasSibling: true, + startState: startExec.assertionState, + endState: endExec.assertionState + }); + if (mode == 141) { + ard.assertionHash = rand.hash(); + revertArg = abi.encodeWithSelector( + AssertionHashMismatch.selector, ard.assertionHash, claimId + ); + } + if (mode == 142) { + ard.isPending = false; + revertArg = abi.encodeWithSelector(AssertionNotPending.selector); + } + if (mode == 143) { + ard.hasSibling = false; + revertArg = abi.encodeWithSelector(AssertionNoSibling.selector); + } + } else { + revertArg = abi.encodeWithSelector(AssertionHashEmpty.selector); + } + + if (mode == 145) { + AssertionState memory s; + ard.startState = s; + revertArg = abi.encodeWithSelector(EmptyStartMachineStatus.selector); + } + if (mode == 146) { + AssertionState memory e; + ard.endState = e; + revertArg = abi.encodeWithSelector(EmptyEndMachineStatus.selector); + } + CreateEdgeArgs memory args; + { + bytes memory proof = abi.encode( + ProofUtils.generateInclusionProof( + ProofUtils.rehashed(roots.states), expectedEndHeight + ), + AssertionStateData(ard.startState, bytes32(0), bytes32(0)), + AssertionStateData(ard.endState, bytes32(0), bytes32(0)) + ); + if (mode == 147) { + proof = ""; + revertArg = abi.encodeWithSelector(EmptyEdgeSpecificProof.selector); + } + + args = CreateEdgeArgs({ + level: 0, + endHistoryRoot: endRoot, + endHeight: expectedEndHeight, + claimId: claimId, + prefixProof: abi.encode(roots.startExp, roots.prefixProof), + proof: proof + }); + } + if (mode == 138) { + args.endHeight = 2 ** 4; + revertArg = abi.encodeWithSelector(InvalidEndHeight.selector, 2 ** 4, expectedEndHeight); + } + if (mode == 148) { + args.prefixProof = ""; + revertArg = abi.encodeWithSelector(EmptyPrefixProof.selector); + } + + if (revertArg.length != 0) { + vm.expectRevert(revertArg); + } + EdgeAddedData memory addedEdge = store.createLayerZeroEdge( + args, ard, entry, expectedEndHeight, NUM_BIGSTEP_LEVEL, whitelistEnabled + ); + if (revertArg.length == 0) { + assertEq( + store.get(addedEdge.edgeId).startHistoryRoot, + MerkleTreeAccumulatorLib.root( + MerkleTreeAccumulatorLib.appendLeaf( + new bytes32[](0), + mockOsp.getMachineHash(startExec.assertionState.toExecutionState()) + ) + ), + "Start history root" + ); + } + + return addedEdge; + } + + function testCreateLayerZeroEdgeBlockA() public { + createZeroBlockEdge(0); + } + + function testCreateLayerZeroEdgeBlockInvalidInclusionProof() public { + createZeroBlockEdge(137); + } + + function testCreateLayerZeroEdgeBlockEndHeight() public { + createZeroBlockEdge(138); + } + + function testCreateLayerZeroEdgeBlockPowerHeight() public { + createZeroBlockEdge(139); + } + + function testCreateLayerZeroEdgeInvalidPrefixProof() public { + createZeroBlockEdge(140); + } + + function testCreateLayerZeroEdgeClaimId() public { + createZeroBlockEdge(141); + } + + function testCreateLayerZeroEdgeIsPending() public { + createZeroBlockEdge(142); + } + + function testCreateLayerZeroEdgeHasSibling() public { + createZeroBlockEdge(143); + } + + function testCreateLayerZeroEdgeEmptyAssertion() public { + createZeroBlockEdge(144); + } + + function testCreateLayerZeroEdgeEmptyStartState() public { + createZeroBlockEdge(145); + } + + function testCreateLayerZeroEdgeEmptyEndState() public { + createZeroBlockEdge(146); + } + + function testCreateLayerZeroEdgeEmptyEdgeSpecificProof() public { + createZeroBlockEdge(147); + } + + function testCreateLayerZeroEdgeEmptyPrefixProof() public { + createZeroBlockEdge(148); + } + + function testPerAccountRivalRestriction() public { + uint256 snapshot = vm.snapshot(); + EdgeAddedData memory edgeAdded = createZeroBlockEdge(150); + assertTrue(store.hasMadeLayerZeroRival(address(this), edgeAdded.mutualId)); + vm.revertTo(snapshot); + + store.setHasMadeLayerZeroRival(address(this), edgeAdded.mutualId, true); + createZeroBlockEdge(151, abi.encode(edgeAdded.mutualId)); + } + + function createClaimEdge( + EdgeChallengeManagerLibAccess c, + uint256 start, + uint256 end, + bool includeRival + ) public returns (bytes32, ExpsAndProofs memory) { + // create a claim edge + ExpsAndProofs memory claimRoots = newRootsAndProofs(start, end, 0, 0); + ChallengeEdge memory ce = ChallengeEdgeLib.newChildEdge( + rand.hash(), + MerkleTreeAccumulatorLib.root(claimRoots.startExp), + start, + MerkleTreeAccumulatorLib.root(claimRoots.endExp), + end, + NUM_BIGSTEP_LEVEL + ); + c.add(ce); + // and give it a rival + if (includeRival) { + c.add( + ChallengeEdgeLib.newChildEdge( + ce.originId, + ce.startHistoryRoot, + ce.startHeight, + rand.hash(), + ce.endHeight, + ce.level + ) + ); + } + + return (ce.idMem(), claimRoots); + } + + struct CreateSmallStepEdgeData { + bytes revertArg; + uint256 claimStartHeight; + uint256 claimEndHeight; + uint256 expectedEndHeight; + bytes32 claimId; + ExpsAndProofs claimRoots; + ExpsAndProofs roots; + bytes proof; + MockOneStepProofEntry a; + AssertionReferenceData emptyArd; + } + + function createSmallStepEdge( + uint256 mode + ) internal { + CreateSmallStepEdgeData memory vars; + + vars.claimStartHeight = 4; + vars.claimEndHeight = mode == 161 ? 6 : 5; + + vars.expectedEndHeight = 2 ** 5; + (vars.claimId, vars.claimRoots) = createClaimEdge( + store, vars.claimStartHeight, vars.claimEndHeight, mode == 160 ? false : true + ); + if (mode == 160) { + vars.revertArg = + abi.encodeWithSelector(ClaimEdgeNotLengthOneRival.selector, vars.claimId); + } + if (mode == 161) { + vars.revertArg = + abi.encodeWithSelector(ClaimEdgeNotLengthOneRival.selector, vars.claimId); + } + + vars.roots = newRootsAndProofs( + 0, + vars.expectedEndHeight, + vars.claimRoots.states[vars.claimStartHeight], + vars.claimRoots.states[vars.claimEndHeight] + ); + if (mode == 164) { + bytes32[] memory b = new bytes32[](1); + b[0] = rand.hash(); + vars.claimRoots.startInclusionProof = + ArrayUtilsLib.concat(vars.claimRoots.startInclusionProof, b); + vars.revertArg = "Invalid inclusion proof"; + } + if (mode == 165) { + bytes32[] memory b = new bytes32[](1); + b[0] = rand.hash(); + vars.claimRoots.endInclusionProof = + ArrayUtilsLib.concat(vars.claimRoots.endInclusionProof, b); + vars.revertArg = "Invalid inclusion proof"; + } + vars.proof = abi.encode( + vars.roots.states[0], + vars.roots.states[vars.expectedEndHeight], + vars.claimRoots.startInclusionProof, + vars.claimRoots.endInclusionProof, + ProofUtils.generateInclusionProof( + ProofUtils.rehashed(vars.roots.states), vars.expectedEndHeight + ) + ); + if (mode == 166) { + vars.proof = ""; + vars.revertArg = abi.encodeWithSelector(EmptyEdgeSpecificProof.selector); + } + if (mode == 162) { + store.setConfirmed(vars.claimId); + vars.revertArg = abi.encodeWithSelector(ClaimEdgeNotPending.selector); + } + + vars.a = new MockOneStepProofEntry(0); + vars.emptyArd; + + if (mode == 163) { + vars.revertArg = abi.encodeWithSelector( + ClaimEdgeInvalidLevel.selector, NUM_BIGSTEP_LEVEL, NUM_BIGSTEP_LEVEL + ); + } + if (vars.revertArg.length != 0) { + vm.expectRevert(vars.revertArg); + } + store.createLayerZeroEdge( + CreateEdgeArgs({ + level: mode == 163 ? NUM_BIGSTEP_LEVEL : NUM_BIGSTEP_LEVEL + 1, + endHistoryRoot: MerkleTreeAccumulatorLib.root(vars.roots.endExp), + endHeight: vars.expectedEndHeight, + claimId: vars.claimId, + prefixProof: abi.encode(vars.roots.startExp, vars.roots.prefixProof), + proof: vars.proof + }), + vars.emptyArd, + vars.a, + vars.expectedEndHeight, + NUM_BIGSTEP_LEVEL, + false + ); + } + + function testCreateLayerZeroEdgeSmallStep() public { + createSmallStepEdge(0); + } + + function testCreateLayerZeroEdgeSmallStepNoRival() public { + createSmallStepEdge(160); + } + + function testCreateLayerZeroEdgeSmallStepNotLength1() public { + createSmallStepEdge(161); + } + + function testCreateLayerZeroEdgeSmallSteplevel() public { + createSmallStepEdge(162); + } + + function testCreateLayerZeroEdgeSmallStepNotPending() public { + createSmallStepEdge(163); + } + + function testCreateLayerZeroEdgeSmallStepStartInclusion() public { + createSmallStepEdge(164); + } + + function testCreateLayerZeroEdgeSmallStepEndInclusion() public { + createSmallStepEdge(165); + } + + function testCreateLayerZeroEdgeSmallStepEmptySpecificProof() public { + createSmallStepEdge(166); + } + + struct CreateBlockEdgesBisectArgs { + bytes32 claim1Id; + bytes32 claim2Id; + AssertionState endState1; + AssertionState endState2; + bool skipLast; + } + + bytes32 genesisBlockHash = rand.hash(); + AssertionState genesisState = + StateToolsLib.randomState(rand, 4, genesisBlockHash, MachineStatus.FINISHED); + bytes32 genesisStateHash = StateToolsLib.mockMachineHash(genesisState); + AssertionStateData genesisStateData = AssertionStateData(genesisState, bytes32(0), bytes32(0)); + bytes32 genesisAssertionHash = rand.hash(); + uint256 height1 = 32; + + function genesisStates() internal view returns (bytes32[] memory) { + bytes32[] memory genStates = new bytes32[](1); + genStates[0] = genesisStateHash; + return genStates; + } + + function createLayerZeroEdge( + bytes32 claimId, + AssertionState memory endState, + bytes32[] memory states, + bytes32[] memory exp, + AssertionReferenceData memory ard, + uint256 expectedEndHeight, + uint8 numBigStepLevel + ) internal returns (bytes32) { + bytes memory typeSpecificProof1 = abi.encode( + ProofUtils.generateInclusionProof(ProofUtils.rehashed(states), states.length - 1), + genesisStateData, + AssertionStateData(endState, genesisAssertionHash, bytes32(0)) + ); + bytes memory prefixProof = abi.encode( + ProofUtils.expansionFromLeaves(states, 0, 1), + ProofUtils.generatePrefixProof(1, ArrayUtilsLib.slice(states, 1, states.length)) + ); + + return store.createLayerZeroEdge( + CreateEdgeArgs({ + level: 0, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp), + endHeight: height1, + claimId: claimId, + prefixProof: prefixProof, + proof: typeSpecificProof1 + }), + ard, + mockOsp, + expectedEndHeight, + numBigStepLevel, + false + ).edgeId; + } + + struct BisectionChildren { + bytes32 lowerChildId; + bytes32 upperChildId; + } + + struct BisectToForkOnlyArgs { + bytes32 winningId; + bytes32 losingId; + bytes32[] winningLeaves; + bytes32[] losingLeaves; + bool skipLast; + } + + function bisect( + bytes32 edgeId, + bytes32[] memory states, + uint256 bisectionSize, + uint256 endSize + ) internal returns (BisectionChildren memory) { + bytes32[] memory middleExp = ProofUtils.expansionFromLeaves(states, 0, bisectionSize + 1); + bytes32[] memory upperStates = ArrayUtilsLib.slice(states, bisectionSize + 1, endSize + 1); + + (bytes32 lowerChildId,, EdgeAddedData memory upperChild) = store.bisectEdge( + edgeId, + MerkleTreeAccumulatorLib.root(middleExp), + abi.encode(middleExp, ProofUtils.generatePrefixProof(bisectionSize + 1, upperStates)) + ); + + return BisectionChildren(lowerChildId, upperChild.edgeId); + } + + function bisectToForkOnly( + BisectToForkOnlyArgs memory args + ) internal returns (BisectionChildren[6] memory, BisectionChildren[6] memory) { + BisectionChildren[6] memory winningEdges; + BisectionChildren[6] memory losingEdges; + + winningEdges[5] = BisectionChildren(args.winningId, 0); + losingEdges[5] = BisectionChildren(args.losingId, 0); + + // height 16 + winningEdges[4] = bisect( + winningEdges[5].lowerChildId, args.winningLeaves, 16, args.winningLeaves.length - 1 + ); + losingEdges[4] = + bisect(losingEdges[5].lowerChildId, args.losingLeaves, 16, args.losingLeaves.length - 1); + + // height 8 + winningEdges[3] = bisect(winningEdges[4].lowerChildId, args.winningLeaves, 8, 16); + losingEdges[3] = bisect(losingEdges[4].lowerChildId, args.losingLeaves, 8, 16); + + // height 4 + winningEdges[2] = bisect(winningEdges[3].lowerChildId, args.winningLeaves, 4, 8); + losingEdges[2] = bisect(losingEdges[3].lowerChildId, args.losingLeaves, 4, 8); + + winningEdges[1] = bisect(winningEdges[2].lowerChildId, args.winningLeaves, 2, 4); + losingEdges[1] = bisect(losingEdges[2].lowerChildId, args.losingLeaves, 2, 4); + + // height 2 + winningEdges[0] = bisect(winningEdges[1].lowerChildId, args.winningLeaves, 1, 2); + if (!args.skipLast) { + losingEdges[0] = bisect(losingEdges[1].lowerChildId, args.losingLeaves, 1, 2); + } + + return (winningEdges, losingEdges); + } + + function createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs memory args + ) + internal + returns ( + bytes32[] memory, + bytes32[] memory, + BisectionChildren[6] memory, + BisectionChildren[6] memory + ) + { + bytes32[] memory states1; + bytes32 edge1Id; + { + bytes32[] memory exp1; + (states1, exp1) = appendRandomStatesBetween( + genesisStates(), StateToolsLib.mockMachineHash(args.endState1), height1 + ); + + edge1Id = createLayerZeroEdge( + args.claim1Id, + args.endState1, + states1, + exp1, + AssertionReferenceData( + args.claim1Id, genesisAssertionHash, true, true, genesisState, args.endState1 + ), + 32, + 1 + ); + + vm.roll(block.number + 1); + + assertEq(store.timeUnrivaled(edge1Id), 1, "Edge1 timer"); + } + + bytes32[] memory states2; + bytes32 edge2Id; + { + bytes32[] memory exp2; + (states2, exp2) = appendRandomStatesBetween( + genesisStates(), StateToolsLib.mockMachineHash(args.endState2), height1 + ); + AssertionReferenceData memory ard2 = AssertionReferenceData( + args.claim2Id, genesisAssertionHash, true, true, genesisState, args.endState2 + ); + edge2Id = createLayerZeroEdge(args.claim2Id, args.endState2, states2, exp2, ard2, 32, 1); + + vm.roll(block.number + 2); + + assertEq(store.timeUnrivaled(edge1Id), 1, "Edge1 timer 2"); + assertEq(store.timeUnrivaled(edge2Id), 0, "Edge2 timer 2"); + } + + (BisectionChildren[6] memory edges1, BisectionChildren[6] memory edges2) = bisectToForkOnly( + BisectToForkOnlyArgs(edge1Id, edge2Id, states1, states2, args.skipLast) + ); + + return (states1, states2, edges1, edges2); + } + + struct CreateMachineEdgesBisectArgs { + uint8 eType; + bytes32 claim1Id; + bytes32 claim2Id; + bytes32 endState1; + bytes32 endState2; + bool skipLast; + bytes32[] forkStates1; + bytes32[] forkStates2; + } + + struct BisectionData { + bytes32[] states1; + bytes32[] states2; + BisectionChildren[6] edges1; + BisectionChildren[6] edges2; + } + + AssertionReferenceData emptyArd; + + function createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs memory args + ) internal returns (BisectionData memory) { + (bytes32[] memory states1, bytes32[] memory exp1) = + appendRandomStatesBetween(genesisStates(), args.endState1, height1); + bytes32 edge1Id; + { + bytes memory typeSpecificProof1; + { + bytes32[] memory claimStartInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(args.forkStates1, 0, 1)), 0 + ); + bytes32[] memory claimEndInclusionProof = + ProofUtils.generateInclusionProof(ProofUtils.rehashed(args.forkStates1), 1); + bytes32[] memory edgeInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(states1), states1.length - 1 + ); + typeSpecificProof1 = abi.encode( + genesisStateHash, + args.endState1, + claimStartInclusionProof, + claimEndInclusionProof, + edgeInclusionProof + ); + } + edge1Id = store.createLayerZeroEdge( + CreateEdgeArgs({ + level: args.eType, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp1), + endHeight: height1, + claimId: args.claim1Id, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states1, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(states1, 1, states1.length) + ) + ), + proof: typeSpecificProof1 + }), + emptyArd, + mockOsp, + 32, + 1, + false + ).edgeId; + } + + vm.roll(block.number + 1); + + assertEq(store.timeUnrivaled(edge1Id), 1, "Edge1 timer"); + + (bytes32[] memory states2, bytes32[] memory exp2) = + appendRandomStatesBetween(genesisStates(), args.endState2, height1); + bytes32 edge2Id; + { + bytes memory typeSpecificProof2; + { + bytes32[] memory claimStartInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(ArrayUtilsLib.slice(args.forkStates2, 0, 1)), 0 + ); + bytes32[] memory claimEndInclusionProof = + ProofUtils.generateInclusionProof(ProofUtils.rehashed(args.forkStates2), 1); + bytes32[] memory edgeInclusionProof = ProofUtils.generateInclusionProof( + ProofUtils.rehashed(states2), states2.length - 1 + ); + typeSpecificProof2 = abi.encode( + genesisStateHash, + args.endState2, + claimStartInclusionProof, + claimEndInclusionProof, + edgeInclusionProof + ); + } + edge2Id = store.createLayerZeroEdge( + CreateEdgeArgs({ + level: args.eType, + endHistoryRoot: MerkleTreeAccumulatorLib.root(exp2), + endHeight: height1, + claimId: args.claim2Id, + prefixProof: abi.encode( + ProofUtils.expansionFromLeaves(states2, 0, 1), + ProofUtils.generatePrefixProof( + 1, ArrayUtilsLib.slice(states2, 1, states2.length) + ) + ), + proof: typeSpecificProof2 + }), + emptyArd, + mockOsp, + 32, + 1, + false + ).edgeId; + } + + vm.roll(block.number + 2); + + (BisectionChildren[6] memory edges1, BisectionChildren[6] memory edges2) = bisectToForkOnly( + BisectToForkOnlyArgs(edge1Id, edge2Id, states1, states2, args.skipLast) + ); + + return BisectionData(states1, states2, edges1, edges2); + } + + function testGetPrevAssertionHashCorrectly() public { + bytes32 a1 = rand.hash(); + bytes32 a2 = rand.hash(); + bytes32 h1 = rand.hash(); + bytes32 h2 = rand.hash(); + AssertionState memory a1State = StateToolsLib.randomState( + rand, + GlobalStateLib.getInboxPosition(genesisState.globalState), + h1, + MachineStatus.FINISHED + ); + AssertionState memory a2State = StateToolsLib.randomState( + rand, + GlobalStateLib.getInboxPosition(genesisState.globalState), + h2, + MachineStatus.FINISHED + ); + + ( + bytes32[] memory blockStates1, + bytes32[] memory blockStates2, + BisectionChildren[6] memory blockEdges1, + BisectionChildren[6] memory blockEdges2 + ) = createBlockEdgesAndBisectToFork( + CreateBlockEdgesBisectArgs(a1, a2, a1State, a2State, false) + ); + + BisectionData memory bsbd = createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs( + 1, + blockEdges1[0].lowerChildId, + blockEdges2[0].lowerChildId, + blockStates1[1], + blockStates2[1], + false, + ArrayUtilsLib.slice(blockStates1, 0, 2), + ArrayUtilsLib.slice(blockStates2, 0, 2) + ) + ); + + BisectionData memory ssbd = createMachineEdgesAndBisectToFork( + CreateMachineEdgesBisectArgs( + 2, + bsbd.edges1[0].lowerChildId, + bsbd.edges2[0].lowerChildId, + bsbd.states1[1], + bsbd.states2[1], + false, + ArrayUtilsLib.slice(bsbd.states1, 0, 2), + ArrayUtilsLib.slice(bsbd.states2, 0, 2) + ) + ); + + assertEq( + store.getPrevAssertionHash(blockEdges1[5].lowerChildId), + genesisAssertionHash, + "Block level winning edge" + ); + assertEq( + store.getPrevAssertionHash(blockEdges2[5].lowerChildId), + genesisAssertionHash, + "Block level losing edge" + ); + + for (uint256 x = 0; x < 5; x++) { + assertEq( + store.getPrevAssertionHash(blockEdges1[x].lowerChildId), + genesisAssertionHash, + "Block level winning edge lower" + ); + assertEq( + store.getPrevAssertionHash(blockEdges2[x].lowerChildId), + genesisAssertionHash, + "Block level losing edge lower" + ); + assertEq( + store.getPrevAssertionHash(blockEdges1[x].upperChildId), + genesisAssertionHash, + "Block level winning edge upper" + ); + assertEq( + store.getPrevAssertionHash(blockEdges2[x].upperChildId), + genesisAssertionHash, + "Block level losing edge upper" + ); + } + + assertEq( + store.getPrevAssertionHash(bsbd.edges1[5].lowerChildId), + genesisAssertionHash, + "Block level winning edge" + ); + assertEq( + store.getPrevAssertionHash(bsbd.edges2[5].lowerChildId), + genesisAssertionHash, + "Block level losing edge" + ); + + for (uint256 x = 0; x < 5; x++) { + assertEq( + store.getPrevAssertionHash(bsbd.edges1[x].lowerChildId), + genesisAssertionHash, + "Block level winning edge lower" + ); + assertEq( + store.getPrevAssertionHash(bsbd.edges2[x].lowerChildId), + genesisAssertionHash, + "Block level losing edge lower" + ); + assertEq( + store.getPrevAssertionHash(bsbd.edges1[x].upperChildId), + genesisAssertionHash, + "Block level winning edge upper" + ); + assertEq( + store.getPrevAssertionHash(bsbd.edges2[x].upperChildId), + genesisAssertionHash, + "Block level losing edge upper" + ); + } + + assertEq( + store.getPrevAssertionHash(ssbd.edges1[5].lowerChildId), + genesisAssertionHash, + "Block level winning edge" + ); + assertEq( + store.getPrevAssertionHash(ssbd.edges2[5].lowerChildId), + genesisAssertionHash, + "Block level losing edge" + ); + + for (uint256 x = 0; x < 5; x++) { + assertEq( + store.getPrevAssertionHash(ssbd.edges1[x].lowerChildId), + genesisAssertionHash, + "Block level winning edge lower" + ); + assertEq( + store.getPrevAssertionHash(ssbd.edges2[x].lowerChildId), + genesisAssertionHash, + "Block level losing edge lower" + ); + assertEq( + store.getPrevAssertionHash(ssbd.edges1[x].upperChildId), + genesisAssertionHash, + "Block level winning edge upper" + ); + assertEq( + store.getPrevAssertionHash(ssbd.edges2[x].upperChildId), + genesisAssertionHash, + "Block level losing edge upper" + ); + } + } +} diff --git a/test/challengeV2/MerkleTreeAccumulatorLib.t.sol b/test/challengeV2/MerkleTreeAccumulatorLib.t.sol new file mode 100644 index 00000000..533ccc7f --- /dev/null +++ b/test/challengeV2/MerkleTreeAccumulatorLib.t.sol @@ -0,0 +1,712 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "forge-std/Test.sol"; +import "../../src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol"; +import "../../src/libraries/MerkleLib.sol"; +import "./Utils.sol"; + +contract MerkleTreeAccumulatorLibTest is Test { + Random random = new Random(); + + function clone( + bytes32[] memory arr + ) internal pure returns (bytes32[] memory) { + bytes32[] memory newArr = new bytes32[](arr.length); + for (uint256 i = 0; i < arr.length; i++) { + newArr[i] = arr[i]; + } + return newArr; + } + + function eq(bytes32[] memory arr1, bytes32[] memory arr2) internal pure { + require(keccak256(abi.encode(arr1)) == keccak256(abi.encode(arr2)), "Arrays not equal"); + } + + function testDoesAppend() public { + // some basic tests + bytes32[] memory me = new bytes32[](0); + bytes32 h0 = random.hash(); + me = MerkleTreeAccumulatorLib.appendCompleteSubTree(me, 0, h0); + + bytes32 h1 = random.hash(); + me = MerkleTreeAccumulatorLib.appendCompleteSubTree(me, 0, h1); + bytes32[] memory me2 = clone(me); + + bytes32 h2 = random.hash(); + bytes32 h3 = random.hash(); + bytes32 h23 = keccak256(abi.encodePacked(h2, h3)); + me = MerkleTreeAccumulatorLib.appendCompleteSubTree(me, 1, h23); + + bytes32[] memory me4 = clone(me); + me = MerkleTreeAccumulatorLib.appendCompleteSubTree(me2, 0, h2); + me = MerkleTreeAccumulatorLib.appendCompleteSubTree(me, 0, h3); + eq(me4, me); + } + + function expansionsFromLeaves( + bytes32[] memory leaves, + uint256 lowSize + ) public pure returns (bytes32[] memory, bytes32[] memory, bytes32[] memory) { + bytes32[] memory lowExpansion = new bytes32[](0); + bytes32[] memory highExpansion = new bytes32[](0); + bytes32[] memory difference = new bytes32[](leaves.length - lowSize); + + for (uint256 i = 0; i < leaves.length; i++) { + if (i < lowSize) { + lowExpansion = MerkleTreeAccumulatorLib.appendLeaf(lowExpansion, leaves[i]); + } else { + difference[i - lowSize] = leaves[i]; + } + + highExpansion = MerkleTreeAccumulatorLib.appendLeaf(highExpansion, leaves[i]); + } + + return (lowExpansion, highExpansion, difference); + } + + function proveVerify(uint256 startSize, uint256 endSize) internal { + bytes32[] memory leaves = random.hashes(endSize); + (bytes32[] memory lowExp, bytes32[] memory highExp, bytes32[] memory diff) = + expansionsFromLeaves(leaves, startSize); + + bytes32[] memory proof = ProofUtils.generatePrefixProof(startSize, diff); + + MerkleTreeAccumulatorLib.verifyPrefixProof( + MerkleTreeAccumulatorLib.root(lowExp), + startSize, + MerkleTreeAccumulatorLib.root(highExp), + endSize, + lowExp, + proof + ); + } + + function testVerifyPrefixProof() public { + // similar tests to proof-tests.go + proveVerify(1, 2); + proveVerify(1, 3); + proveVerify(2, 3); + proveVerify(2, 13); + proveVerify(17, 7052); + proveVerify(23, 7052); + proveVerify(20, 7052); + } + + function testRoot( + uint256 size + ) public { + vm.assume(size > 0); + vm.assume(size < 257); + bytes32[] memory hashes = random.hashes(size); + bytes32[] memory rehashed = ProofUtils.rehashed(hashes); + bytes32[] memory expansion = ProofUtils.expansionFromLeaves(hashes, 0, size); + + bytes32[][] memory fullTree = ProofUtils.fullTree(rehashed); + bytes32 root = fullTree[fullTree.length - 1][0]; + + bytes32 expRoot = MerkleTreeAccumulatorLib.root(expansion); + assertEq(root, expRoot, "Roots"); + } + + function getExpansion( + uint256 leafCount + ) internal returns (bytes32[] memory) { + bytes32[] memory hashes = random.hashes(leafCount); + bytes32[] memory expansion = ProofUtils.expansionFromLeaves(hashes, 0, leafCount); + return expansion; + } + + function hashTogether(bytes32 a, bytes32 b) internal pure returns (bytes32) { + return keccak256(abi.encodePacked(a, b)); + } + + function testRoot1() public { + bytes32[] memory expansion = getExpansion(1); + bytes32 expectedRoot = expansion[0]; + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRoot2() public { + bytes32[] memory expansion = getExpansion(2); + bytes32 expectedRoot = expansion[1]; + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRoot3() public { + bytes32[] memory expansion = getExpansion(3); + bytes32 expectedRoot = hashTogether(expansion[1], hashTogether(expansion[0], 0)); + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRoot4() public { + bytes32[] memory expansion = getExpansion(4); + bytes32 expectedRoot = expansion[2]; + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRoot5() public { + bytes32[] memory expansion = getExpansion(5); + bytes32 expectedRoot = + hashTogether(expansion[2], hashTogether(hashTogether(expansion[0], 0), 0)); + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRoot6() public { + bytes32[] memory expansion = getExpansion(6); + bytes32 expectedRoot = hashTogether(expansion[2], hashTogether(expansion[1], 0)); + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRoot7() public { + bytes32[] memory expansion = getExpansion(7); + bytes32 expectedRoot = + hashTogether(expansion[2], hashTogether(expansion[1], hashTogether(expansion[0], 0))); + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRoot8() public { + bytes32[] memory expansion = getExpansion(8); + bytes32 expectedRoot = expansion[3]; + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRoot9() public { + bytes32[] memory expansion = getExpansion(9); + bytes32 expectedRoot = hashTogether( + expansion[3], hashTogether(hashTogether(hashTogether(expansion[0], 0), 0), 0) + ); + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRoot11() public { + bytes32[] memory expansion = getExpansion(10); + bytes32 expectedRoot = + hashTogether(expansion[3], hashTogether(hashTogether(expansion[1], 0), 0)); + assertEq(MerkleTreeAccumulatorLib.root(expansion), expectedRoot, "Invalid root"); + } + + function testRootEmpty() public { + bytes32[] memory expansion = new bytes32[](0); + vm.expectRevert("Empty merkle expansion"); + MerkleTreeAccumulatorLib.root(expansion); + } + + function testRootTooLarge() public { + bytes32[] memory expansion = new bytes32[](MerkleTreeAccumulatorLib.MAX_LEVEL + 1); + vm.expectRevert("Merkle expansion too large"); + MerkleTreeAccumulatorLib.root(expansion); + } + + function testAppendCS( + uint256 treeSize + ) public { + vm.assume(treeSize > 0); + vm.assume(treeSize < 16); + + bytes32[] memory expansion = getExpansion(treeSize); + bool lowestLevel = false; + for (uint256 i = 0; i < expansion.length; i++) { + bytes32 rand = random.hash(); + if (lowestLevel) { + vm.expectRevert("Append above least significant bit"); + } + bytes32[] memory post = + MerkleTreeAccumulatorLib.appendCompleteSubTree(expansion, i, rand); + + if (expansion[i] != 0) { + lowestLevel = true; + } else { + for (uint256 j = 0; j < expansion.length; j++) { + if (j == i) { + assertEq(post[j], rand, "Different level hash"); + } else { + assertEq(post[j], expansion[j], "Conflicting level"); + } + } + } + + if (expansion[expansion.length - 1] != post[expansion.length - 1]) { + assertEq(post.length, expansion.length + 1, "Level increase"); + } else { + assertEq(post.length, expansion.length, "Level same"); + } + + uint256 preSize = MerkleTreeAccumulatorLib.treeSize(expansion); + uint256 postSize = MerkleTreeAccumulatorLib.treeSize(post); + assertEq(postSize, preSize + (2 ** i), "Sizes"); + } + } + + function plainAppend( + uint256 level + ) internal { + bytes32[] memory pre = getExpansion(44); + + bytes32 rand = random.hash(); + bytes32[] memory post = MerkleTreeAccumulatorLib.appendCompleteSubTree(pre, level, rand); + assertEq(pre.length, post.length, "Pre post len"); + for (uint256 i = 0; i < pre.length; i++) { + if (i == level) { + assertEq(post[i], rand, "Post equal"); + } else { + assertEq(pre[i], post[i], "Pre post equal"); + } + } + } + + function testAppendCS0() public { + plainAppend(0); + } + + function testAppendCS1() public { + plainAppend(1); + } + + function testAppendCS2() public { + // 101100 = 44 + bytes32[] memory pre = getExpansion(44); + uint256 level = 2; + + bytes32 rand = random.hash(); + bytes32[] memory post = MerkleTreeAccumulatorLib.appendCompleteSubTree(pre, level, rand); + assertEq(pre.length, post.length, "Pre post len"); + for (uint256 i = 0; i < pre.length; i++) { + if (i == level || i == level + 1) { + assertEq(post[i], 0, "Post level equal"); + } else if (i == level + 2) { + assertEq( + post[i], + hashTogether(pre[i - 1], hashTogether(pre[i - 2], rand)), + "Post level plus 1 equal" + ); + } else { + assertEq(pre[i], post[i], "Pre post equal"); + } + } + } + + function testAppendCS2IncreaseHeight() public { + // 1100 = 12 + bytes32[] memory pre = getExpansion(12); + uint256 level = 2; + + bytes32 rand = random.hash(); + bytes32[] memory post = MerkleTreeAccumulatorLib.appendCompleteSubTree(pre, level, rand); + assertEq(post.length, pre.length + 1, "Pre post len"); + for (uint256 i = 0; i < post.length; i++) { + if (i == level || i == level + 1) { + assertEq(post[i], 0, "Post level equal"); + } else if (i == level + 2) { + assertEq( + post[i], + hashTogether(pre[i - 1], hashTogether(pre[i - 2], rand)), + "Post level plus 1 equal" + ); + } else { + assertEq(pre[i], post[i], "Pre post equal"); + } + } + } + + function testAppendCS3TooHigh() public { + bytes32[] memory pre = getExpansion(12); + bytes32 rand = random.hash(); + + vm.expectRevert("Append above least significant bit"); + MerkleTreeAccumulatorLib.appendCompleteSubTree(pre, 3, rand); + } + + function testAppendCS4GreaterLevel() public { + bytes32[] memory pre = getExpansion(12); + bytes32 rand = random.hash(); + + vm.expectRevert("Level greater than highest level of current expansion"); + MerkleTreeAccumulatorLib.appendCompleteSubTree(pre, 4, rand); + } + + function testAppendCsLevelTooHigh() public { + bytes32[] memory pre = getExpansion(12); + bytes32 rand = random.hash(); + + vm.expectRevert("Level too high"); + MerkleTreeAccumulatorLib.appendCompleteSubTree( + pre, MerkleTreeAccumulatorLib.MAX_LEVEL, rand + ); + } + + function testAppendCsMeTooLargs() public { + bytes32[] memory pre = new bytes32[](MerkleTreeAccumulatorLib.MAX_LEVEL + 1); + + bytes32 rand = random.hash(); + + vm.expectRevert("Merkle expansion too large"); + MerkleTreeAccumulatorLib.appendCompleteSubTree(pre, 0, rand); + } + + function testAppendCsEmptySubtree() public { + bytes32[] memory pre = getExpansion(12); + vm.expectRevert("Cannot append empty subtree"); + MerkleTreeAccumulatorLib.appendCompleteSubTree(pre, 1, 0); + } + + function testAppendCsPostLevelHigh() public { + bytes32[] memory pre = new bytes32[](MerkleTreeAccumulatorLib.MAX_LEVEL); + pre[pre.length - 1] = random.hash(); + + bytes32 rand2 = random.hash(); + // overflow + vm.expectRevert("Append creates oversize tree"); + MerkleTreeAccumulatorLib.appendCompleteSubTree(pre, pre.length - 1, rand2); + } + + function testAppendCsEmptyPre() public { + bytes32[] memory pre = new bytes32[](0); + uint256 level = 2; + bytes32 rand = random.hash(); + bytes32[] memory post = MerkleTreeAccumulatorLib.appendCompleteSubTree(pre, level, rand); + + for (uint256 i = 0; i < post.length; i++) { + if (level == i) { + assertEq(post[i], rand, "Post rand"); + } else { + assertEq(post[i], 0, "Post empty"); + } + } + } + + function testAppendLeafEmpty() public { + bytes32[] memory pre = new bytes32[](0); + bytes32 leaf = random.hash(); + bytes32[] memory post = MerkleTreeAccumulatorLib.appendLeaf(pre, leaf); + assertEq(post.length, 1, "Post len"); + assertEq(post[0], keccak256(abi.encodePacked(leaf)), "Post slot"); + } + + function testAppendLeafOne() public { + bytes32[] memory pre = new bytes32[](1); + bytes32 slot0 = random.hash(); + pre[0] = slot0; + bytes32 leaf = random.hash(); + bytes32[] memory post = MerkleTreeAccumulatorLib.appendLeaf(pre, leaf); + assertEq(post.length, 2, "Post len"); + assertEq(post[0], 0, "Post slot 0"); + assertEq(post[1], hashTogether(slot0, keccak256(abi.encodePacked(leaf))), "Post slot 1"); + } + + function testMaximumAppendBetween() public { + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(0, 1), 0, "Max append 0,1"); + + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(0, 2), 1, "Max append 0,2"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(1, 2), 0, "Max append 1,2"); + + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(0, 3), 1, "Max append 0,3"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(1, 3), 0, "Max append 1,3"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(2, 3), 0, "Max append 2,3"); + + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(0, 4), 2, "Max append 0,4"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(1, 4), 0, "Max append 1,4"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(2, 4), 1, "Max append 2,4"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(3, 4), 0, "Max append 3,4"); + + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(0, 5), 2, "Max append 0,5"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(1, 5), 0, "Max append 1,5"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(2, 5), 1, "Max append 2,5"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(3, 5), 0, "Max append 3,5"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(4, 5), 0, "Max append 4,5"); + + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(0, 6), 2, "Max append 0,6"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(1, 6), 0, "Max append 1,6"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(2, 6), 1, "Max append 2,6"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(3, 6), 0, "Max append 3,6"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(4, 6), 1, "Max append 4,6"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(5, 6), 0, "Max append 5,6"); + + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(0, 7), 2, "Max append 0,7"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(1, 7), 0, "Max append 1,7"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(2, 7), 1, "Max append 2,7"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(3, 7), 0, "Max append 3,7"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(4, 7), 1, "Max append 4,7"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(5, 7), 0, "Max append 5,7"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(6, 7), 0, "Max append 6,7"); + + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(0, 8), 3, "Max append 0,8"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(1, 8), 0, "Max append 1,8"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(2, 8), 1, "Max append 2,8"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(3, 8), 0, "Max append 3,8"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(4, 8), 2, "Max append 4,8"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(5, 8), 0, "Max append 5,8"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(6, 8), 1, "Max append 6,8"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(7, 8), 0, "Max append 7,8"); + + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(0, 9), 3, "Max append 0,9"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(1, 9), 0, "Max append 1,9"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(2, 9), 1, "Max append 2,9"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(3, 9), 0, "Max append 3,9"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(4, 9), 2, "Max append 4,9"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(5, 9), 0, "Max append 5,9"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(6, 9), 1, "Max append 6,9"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(7, 9), 0, "Max append 7,9"); + assertEq(MerkleTreeAccumulatorLib.maximumAppendBetween(8, 9), 0, "Max append 8,9"); + } + + function testMaxAppendBetweenStartTooLow() public { + vm.expectRevert("Start not less than end"); + MerkleTreeAccumulatorLib.maximumAppendBetween(4, 4); + } + + function testVerifyPrefixProofComp() public { + proveVerify(1, 2); + + proveVerify(1, 3); + proveVerify(2, 3); + + proveVerify(1, 4); + proveVerify(2, 4); + proveVerify(3, 4); + + proveVerify(1, 5); + proveVerify(2, 5); + proveVerify(3, 5); + proveVerify(4, 5); + + proveVerify(1, 6); + proveVerify(2, 6); + proveVerify(3, 6); + proveVerify(4, 6); + proveVerify(5, 6); + + proveVerify(1, 7); + proveVerify(2, 7); + proveVerify(3, 7); + proveVerify(4, 7); + proveVerify(5, 7); + proveVerify(6, 7); + + proveVerify(1, 8); + proveVerify(2, 8); + proveVerify(3, 8); + proveVerify(4, 8); + proveVerify(5, 8); + proveVerify(6, 8); + proveVerify(7, 8); + + proveVerify(1, 9); + proveVerify(2, 9); + proveVerify(3, 9); + proveVerify(4, 9); + proveVerify(5, 9); + proveVerify(6, 9); + proveVerify(7, 9); + proveVerify(8, 9); + + proveVerify(1, 10); + proveVerify(2, 10); + proveVerify(3, 10); + proveVerify(4, 10); + proveVerify(5, 10); + proveVerify(6, 10); + proveVerify(7, 10); + proveVerify(8, 10); + proveVerify(9, 10); + } + + function testVerifyPrefixProofManual() public { + bytes32[] memory pre = getExpansion(5); // 101 + bytes32[] memory newLeaves = random.hashes(4); // 1001 + bytes32[] memory rehashedLeaves = ProofUtils.rehashed(newLeaves); + bytes32[] memory post = ArrayUtilsLib.slice(pre, 0, pre.length); + for (uint256 i = 0; i < newLeaves.length; i++) { + post = MerkleTreeAccumulatorLib.appendLeaf(post, newLeaves[i]); + } + + // manually construct a proof from 5 to 9 + bytes32[] memory proof = new bytes32[](3); + proof[0] = rehashedLeaves[0]; + proof[1] = hashTogether(rehashedLeaves[1], rehashedLeaves[2]); + proof[2] = rehashedLeaves[3]; + MerkleTreeAccumulatorLib.verifyPrefixProof( + MerkleTreeAccumulatorLib.root(pre), + 5, + MerkleTreeAccumulatorLib.root(post), + 9, + pre, + proof + ); + } + + function testVerifyPrefixProofPreZero() public { + uint256 preSize = 5; + uint256 newLeavesCount = 4; + + bytes32[] memory pre = getExpansion(preSize); + bytes32[] memory newLeaves = random.hashes(newLeavesCount); + bytes32[] memory post = ArrayUtilsLib.slice(pre, 0, pre.length); + for (uint256 i = 0; i < newLeaves.length; i++) { + post = MerkleTreeAccumulatorLib.appendLeaf(post, newLeaves[i]); + } + bytes32[] memory proof = ProofUtils.generatePrefixProof(preSize, newLeaves); + + vm.expectRevert("Pre-size cannot be 0"); + MerkleTreeAccumulatorLib.verifyPrefixProof( + MerkleTreeAccumulatorLib.root(pre), + 0, + MerkleTreeAccumulatorLib.root(post), + preSize + newLeavesCount, + pre, + proof + ); + } + + function testVerifyPrefixProofInvalidPreRoot() public { + uint256 preSize = 5; + uint256 newLeavesCount = 4; + + bytes32[] memory pre = getExpansion(preSize); + bytes32[] memory newLeaves = random.hashes(newLeavesCount); + bytes32[] memory post = ArrayUtilsLib.slice(pre, 0, pre.length); + for (uint256 i = 0; i < newLeaves.length; i++) { + post = MerkleTreeAccumulatorLib.appendLeaf(post, newLeaves[i]); + } + bytes32[] memory proof = ProofUtils.generatePrefixProof(preSize, newLeaves); + + bytes32 randomHash = random.hash(); + vm.expectRevert("Pre expansion root mismatch"); + MerkleTreeAccumulatorLib.verifyPrefixProof( + randomHash, + preSize, + MerkleTreeAccumulatorLib.root(post), + preSize + newLeavesCount, + pre, + proof + ); + } + + function testVerifyPrefixProofInvalidPreSize() public { + uint256 preSize = 5; + uint256 newLeavesCount = 4; + + bytes32[] memory pre = getExpansion(preSize); + bytes32[] memory newLeaves = random.hashes(newLeavesCount); + bytes32[] memory post = ArrayUtilsLib.slice(pre, 0, pre.length); + for (uint256 i = 0; i < newLeaves.length; i++) { + post = MerkleTreeAccumulatorLib.appendLeaf(post, newLeaves[i]); + } + + bytes32[] memory proof = ProofUtils.generatePrefixProof(preSize, newLeaves); + + vm.expectRevert("Pre size not less than post size"); + MerkleTreeAccumulatorLib.verifyPrefixProof( + MerkleTreeAccumulatorLib.root(pre), + preSize, + MerkleTreeAccumulatorLib.root(post), + preSize, + pre, + proof + ); + } + + function testVerifyPrefixProofInvalidProofSize() public { + uint256 preSize = 5; + uint256 newLeavesCount = 4; + + bytes32[] memory pre = getExpansion(preSize); + bytes32[] memory newLeaves = random.hashes(newLeavesCount); + bytes32[] memory post = ArrayUtilsLib.slice(pre, 0, pre.length); + for (uint256 i = 0; i < newLeaves.length; i++) { + post = MerkleTreeAccumulatorLib.appendLeaf(post, newLeaves[i]); + } + + bytes32[] memory proof = ProofUtils.generatePrefixProof(preSize, newLeaves); + proof = ArrayUtilsLib.append(proof, random.hash()); + + vm.expectRevert("Incomplete proof usage"); + MerkleTreeAccumulatorLib.verifyPrefixProof( + MerkleTreeAccumulatorLib.root(pre), + preSize, + MerkleTreeAccumulatorLib.root(post), + preSize + newLeavesCount, + pre, + proof + ); + } + + function testVerifyPrefixProofInvalidPreExpansionSize() public { + uint256 preSize = 5; + uint256 newLeavesCount = 4; + + bytes32[] memory pre = getExpansion(preSize); + bytes32[] memory newLeaves = random.hashes(newLeavesCount); + bytes32[] memory post = ArrayUtilsLib.slice(pre, 0, pre.length); + for (uint256 i = 0; i < newLeaves.length; i++) { + post = MerkleTreeAccumulatorLib.appendLeaf(post, newLeaves[i]); + } + + bytes32[] memory proof = ProofUtils.generatePrefixProof(preSize, newLeaves); + + vm.expectRevert("Pre size does not match expansion"); + MerkleTreeAccumulatorLib.verifyPrefixProof( + MerkleTreeAccumulatorLib.root(pre), + preSize - 1, + MerkleTreeAccumulatorLib.root(post), + preSize + newLeavesCount, + pre, + proof + ); + } + + function testVerifyInclusionProofManual() public { + bytes32[] memory leaves = random.hashes(11); // 1011 + bytes32[] memory re = ProofUtils.rehashed(leaves); + uint256 index = 4; // 100 + bytes32[] memory me = ProofUtils.expansionFromLeaves(leaves, 0, 11); + + // need 5 + (6,7) + ((0,1),(2,3)) ((8,9, 10,null), null) + + bytes32[] memory proof = new bytes32[](4); + proof[0] = re[5]; + proof[1] = hashTogether(re[6], re[7]); + proof[2] = hashTogether(hashTogether(re[0], re[1]), hashTogether(re[2], re[3])); + proof[3] = + hashTogether(hashTogether(hashTogether(re[8], re[9]), hashTogether(re[10], 0)), 0); + + MerkleTreeAccumulatorLib.verifyInclusionProof( + MerkleTreeAccumulatorLib.root(me), leaves[index], index, proof + ); + } + + function verifyInclusion(uint256 index, uint256 treeSize) internal { + bytes32[] memory leaves = random.hashes(treeSize); + bytes32[] memory re = ProofUtils.rehashed(leaves); + bytes32[] memory me = ProofUtils.expansionFromLeaves(leaves, 0, leaves.length); + bytes32[] memory proof = ProofUtils.generateInclusionProof(re, index); + + MerkleTreeAccumulatorLib.verifyInclusionProof( + MerkleTreeAccumulatorLib.root(me), leaves[index], index, proof + ); + } + + function testProveInclusion() public { + uint256 size = 16; + for (uint256 i = 0; i < size; i++) { + for (uint256 j = 0; j < i; j++) { + verifyInclusion(j, i); + } + } + } + + function testEmptyTreeSize() public { + bytes32[] memory me = new bytes32[](0); + assertEq(MerkleTreeAccumulatorLib.treeSize(me), 0, "Invalid zero tree size"); + } + + function testTreeSize() public { + for (uint256 h = 1; h <= 256; h++) { + bytes32[] memory me = getExpansion(h); + assertEq(MerkleTreeAccumulatorLib.treeSize(me), h, "Invalid tree size"); + } + } +} diff --git a/test/challengeV2/StateTools.sol b/test/challengeV2/StateTools.sol new file mode 100644 index 00000000..26aac4f5 --- /dev/null +++ b/test/challengeV2/StateTools.sol @@ -0,0 +1,40 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "forge-std/Test.sol"; +import "../../src/state/GlobalState.sol"; +import "../../src/state/Machine.sol"; +import "../../src/rollup/RollupLib.sol"; +import "./Utils.sol"; + +library StateToolsLib { + using GlobalStateLib for GlobalState; + + function randomState( + Random rand, + uint256 inboxMsgCountProcessed, + bytes32 blockHash, + MachineStatus ms + ) internal returns (AssertionState memory) { + bytes32[2] memory bytes32Vals = [blockHash, rand.hash()]; + uint64[2] memory u64Vals = [uint64(inboxMsgCountProcessed), uint64(uint256(rand.hash()))]; + + GlobalState memory gs = GlobalState({bytes32Vals: bytes32Vals, u64Vals: u64Vals}); + return AssertionState({globalState: gs, machineStatus: ms, endHistoryRoot: bytes32(0)}); + } + + function hash( + AssertionState memory s + ) internal pure returns (bytes32) { + return s.globalState.hash(); + } + + function mockMachineHash( + AssertionState memory s + ) internal pure returns (bytes32) { + return s.globalState.hash(); + } +} diff --git a/test/challengeV2/UintUtilsLib.t.sol b/test/challengeV2/UintUtilsLib.t.sol new file mode 100644 index 00000000..019a4db6 --- /dev/null +++ b/test/challengeV2/UintUtilsLib.t.sol @@ -0,0 +1,77 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "forge-std/Test.sol"; +import "../../src/challengeV2/libraries/UintUtilsLib.sol"; +import "./Utils.sol"; + +contract UintUtilsLibTest is Test { + Random random = new Random(); + + function testLsbZero() public { + vm.expectRevert("Zero has no significant bits"); + UintUtilsLib.leastSignificantBit(0); + } + + function testLsb() public { + assertEq(UintUtilsLib.leastSignificantBit(1), 0); // 1 + assertEq(UintUtilsLib.leastSignificantBit(2), 1); // 10 + assertEq(UintUtilsLib.leastSignificantBit(3), 0); // 11 + assertEq(UintUtilsLib.leastSignificantBit(4), 2); // 100 + assertEq(UintUtilsLib.leastSignificantBit(5), 0); // 101 + assertEq(UintUtilsLib.leastSignificantBit(6), 1); // 110 + assertEq(UintUtilsLib.leastSignificantBit(7), 0); // 111 + assertEq(UintUtilsLib.leastSignificantBit(8), 3); // 1000 + assertEq(UintUtilsLib.leastSignificantBit(10), 1); // 1010 + assertEq(UintUtilsLib.leastSignificantBit(696320), 13); // 10101010000000000000 + assertEq(UintUtilsLib.leastSignificantBit(696321), 0); // 10101010000000000001 + assertEq( + UintUtilsLib.leastSignificantBit(236945758459398306981350710526416285671374848), 14 + ); // 1010101000000000000100000000010101010100000000000010101000000000000000001010100000000000010101001000101010000000000000000010100001000100000000000000 + assertEq(UintUtilsLib.leastSignificantBit(type(uint256).max), 0); + } + + function testMoreLsb() public { + uint256 randHash = uint256(random.hash()); + for (uint256 i = 0; i < 256; i++) { + assertEq(UintUtilsLib.leastSignificantBit(1 << i), i); + assertEq(UintUtilsLib.leastSignificantBit(type(uint256).max << i), i); + assertEq(UintUtilsLib.leastSignificantBit((randHash | 1) << i), i); + } + } + + function testMsbZero() public { + vm.expectRevert("Zero has no significant bits"); + UintUtilsLib.mostSignificantBit(0); + } + + function testMsb() public { + assertEq(UintUtilsLib.mostSignificantBit(1), 0); // 1 + assertEq(UintUtilsLib.mostSignificantBit(2), 1); // 10 + assertEq(UintUtilsLib.mostSignificantBit(3), 1); // 11 + assertEq(UintUtilsLib.mostSignificantBit(4), 2); // 100 + assertEq(UintUtilsLib.mostSignificantBit(5), 2); // 101 + assertEq(UintUtilsLib.mostSignificantBit(6), 2); // 110 + assertEq(UintUtilsLib.mostSignificantBit(7), 2); // 111 + assertEq(UintUtilsLib.mostSignificantBit(8), 3); // 1000 + assertEq(UintUtilsLib.mostSignificantBit(10), 3); // 1010 + assertEq(UintUtilsLib.mostSignificantBit(696320), 19); // 10101010000000000000 + assertEq(UintUtilsLib.mostSignificantBit(696321), 19); // 10101010000000000001 + assertEq( + UintUtilsLib.mostSignificantBit(236945758459398306981350710526416285671374848), 147 + ); // 1010101000000000000100000000010101010100000000000010101000000000000000001010100000000000010101001000101010000000000000000010100001000100000000000000 + assertEq(UintUtilsLib.mostSignificantBit(type(uint256).max), 255); + } + + function testMoreMsb() public { + uint256 randHash = uint256(random.hash()); + for (uint256 i = 0; i < 256; i++) { + assertEq(UintUtilsLib.mostSignificantBit(1 << i), i); + assertEq(UintUtilsLib.mostSignificantBit(type(uint256).max >> i), 255 - i); + assertEq(UintUtilsLib.mostSignificantBit((randHash | (1 << 255)) >> i), 255 - i); + } + } +} diff --git a/test/challengeV2/Utils.sol b/test/challengeV2/Utils.sol new file mode 100644 index 00000000..2e2367ea --- /dev/null +++ b/test/challengeV2/Utils.sol @@ -0,0 +1,177 @@ +// Copyright 2023, Offchain Labs, Inc. +// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// +pragma solidity ^0.8.17; + +import "../../src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol"; +import "../../src/challengeV2/libraries/UintUtilsLib.sol"; +import "../../src/challengeV2/libraries/ArrayUtilsLib.sol"; +import "forge-std/Test.sol"; + +contract Random { + bytes32 private seed = 0xf19f64ef5b8c788ff3f087b4f75bc6596a6aaa3c9048bbbbe990fa0870261385; + + function hash() public returns (bytes32) { + seed = keccak256(abi.encodePacked(seed)); + return seed; + } + + function hashes( + uint256 count + ) public returns (bytes32[] memory) { + bytes32[] memory h = new bytes32[](count); + for (uint256 i = 0; i < h.length; i++) { + h[i] = hash(); + } + return h; + } + + function addr() public returns (address) { + seed = keccak256(abi.encodePacked(seed)); + return address(bytes20(seed)); + } + + function unsignedInt( + uint256 max + ) public returns (uint256) { + bytes32 h = hash(); + return uint256(h) % max; + } +} + +library Logger { + function bytes32Array(string memory name, bytes32[] memory arr) internal view { + console.log(name); + for (uint256 i = 0; i < arr.length; i++) { + console.logBytes32(arr[i]); + } + console.log("-----------------------------"); + } +} + +library ProofUtils { + /// @notice Create a merkle expansion from an array of leaves + /// @param leaves The leaves to form into an expansion + /// @param leafStartIndex The subset of the leaves to start the expansion from - inclusive + /// @param leafEndIndex The subset of the leaves to end the expansion from - exclusive + function expansionFromLeaves( + bytes32[] memory leaves, + uint256 leafStartIndex, + uint256 leafEndIndex + ) internal pure returns (bytes32[] memory) { + require(leafStartIndex < leafEndIndex, "Leaf start not less than leaf end"); + require(leafEndIndex <= leaves.length, "Leaf end not less than leaf length"); + + bytes32[] memory expansion = new bytes32[](0); + for (uint256 i = leafStartIndex; i < leafEndIndex; i++) { + expansion = MerkleTreeAccumulatorLib.appendLeaf(expansion, leaves[i]); + } + + return expansion; + } + + /// @notice Generate a proof that a tree of size preSize when appended to with newLeaves + /// results in the tree at size preSize + newLeaves.length + /// @dev The proof is the minimum number of complete sub trees that must + /// be appended to the pre tree in order to produce the post tree. + function generatePrefixProof( + uint256 preSize, + bytes32[] memory newLeaves + ) internal pure returns (bytes32[] memory) { + require(preSize > 0, "Pre-size cannot be 0"); + require(newLeaves.length > 0, "No new leaves added"); + + uint256 size = preSize; + uint256 postSize = size + newLeaves.length; + bytes32[] memory proof = new bytes32[](0); + + // We always want to append the subtrees at the maximum level, so that we cover the most + // leaves possible. We do this by finding the maximum level between the start and the end + // that we can append at, then append these leaves, then repeat the process. + + while (size < postSize) { + uint256 level = MerkleTreeAccumulatorLib.maximumAppendBetween(size, postSize); + // add 2^level leaves to create a subtree + uint256 numLeaves = 1 << level; + + uint256 startIndex = size - preSize; + uint256 endIndex = startIndex + numLeaves; + // create a complete sub tree at the specified level + bytes32[] memory exp = expansionFromLeaves(newLeaves, startIndex, endIndex); + proof = ArrayUtilsLib.append(proof, MerkleTreeAccumulatorLib.root(exp)); + + size += numLeaves; + + assert(size <= postSize); + } + + return proof; + } + + function generateInclusionProof( + bytes32[] memory leaves, + uint256 index + ) internal pure returns (bytes32[] memory) { + require(leaves.length >= 1, "No leaves"); + require(index < leaves.length, "Index too high"); + bytes32[][] memory fullT = fullTree(leaves); + if (leaves.length == 1) return new bytes32[](0); + + uint256 maxLevel = UintUtilsLib.mostSignificantBit(leaves.length - 1); + + bytes32[] memory proof = new bytes32[](maxLevel + 1); + + for (uint256 level = 0; level <= maxLevel; level++) { + uint256 levelIndex = index >> level; + + uint256 counterpartIndex = levelIndex ^ 1; + bytes32[] memory layer = fullT[level]; + bytes32 counterpart = + counterpartIndex > layer.length - 1 ? bytes32(0) : layer[counterpartIndex]; + + proof[level] = counterpart; + } + return proof; + } + + function fullTree( + bytes32[] memory leaves + ) internal pure returns (bytes32[][] memory) { + uint256 msb = UintUtilsLib.mostSignificantBit(leaves.length); + uint256 lsb = UintUtilsLib.leastSignificantBit(leaves.length); + + uint256 maxLevel = msb == lsb ? msb : msb + 1; + + bytes32[][] memory layers = new bytes32[][](maxLevel + 1); + layers[0] = leaves; + uint256 l = 1; + + bytes32[] memory prevLayer = leaves; + while (prevLayer.length > 1) { + bytes32[] memory nextLayer = new bytes32[]((prevLayer.length + 1) / 2); + for (uint256 i = 0; i < nextLayer.length; i++) { + if (2 * i + 1 < prevLayer.length) { + nextLayer[i] = + keccak256(abi.encodePacked(prevLayer[2 * i], prevLayer[2 * i + 1])); + } else { + nextLayer[i] = keccak256(abi.encodePacked(prevLayer[2 * i], bytes32(0))); + } + } + layers[l] = nextLayer; + prevLayer = nextLayer; + l++; + } + return layers; + } + + function rehashed( + bytes32[] memory arr + ) internal pure returns (bytes32[] memory) { + bytes32[] memory arr2 = new bytes32[](arr.length); + for (uint256 i = 0; i < arr.length; i++) { + arr2[i] = keccak256(abi.encodePacked(arr[i])); + } + return arr2; + } +} diff --git a/test/contract/arbRollup.spec.ts b/test/contract/arbRollup.spec.ts deleted file mode 100644 index 79281abc..00000000 --- a/test/contract/arbRollup.spec.ts +++ /dev/null @@ -1,1610 +0,0 @@ -/* - * Copyright 2019-2020, Offchain Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* eslint-env node, mocha */ -import { ethers, network } from 'hardhat' -import { Signer } from '@ethersproject/abstract-signer' -import { BigNumberish, BigNumber } from '@ethersproject/bignumber' -import { BytesLike } from '@ethersproject/bytes' -import { ContractTransaction } from '@ethersproject/contracts' -import { assert, expect } from 'chai' -import { - Bridge__factory, - Inbox__factory, - RollupEventInbox__factory, - Outbox__factory, - ERC20Bridge__factory, - ERC20Inbox__factory, - ERC20RollupEventInbox__factory, - ERC20Outbox__factory, - BridgeCreator__factory, - ChallengeManager, - ChallengeManager__factory, - DeployHelper__factory, - OneStepProofEntry__factory, - OneStepProver0__factory, - OneStepProverHostIo__factory, - OneStepProverMath__factory, - OneStepProverMemory__factory, - RollupAdminLogic, - RollupAdminLogic__factory, - RollupCreator__factory, - RollupUserLogic, - RollupUserLogic__factory, - SequencerInbox, - SequencerInbox__factory, - Bridge, -} from '../../build/types' -import { - abi as UpgradeExecutorABI, - bytecode as UpgradeExecutorBytecode, -} from '@offchainlabs/upgrade-executor/build/contracts/src/UpgradeExecutor.sol/UpgradeExecutor.json' - -import { initializeAccounts } from './utils' - -import { - Node, - RollupContract, - forceCreateNode, - assertionEquals, -} from './common/rolluplib' -import { AssertionStruct } from '../../build/types/src/rollup/RollupCore' -import { ExecutionStateStruct } from '../../build/types/src/rollup/RollupCore' -import { keccak256 } from 'ethers/lib/utils' -import { - ConfigStruct, - RollupCreatedEvent, -} from '../../build/types/src/rollup/RollupCreator' -import { constants, providers } from 'ethers' -import { blockStateHash, MachineStatus } from './common/challengeLib' -import * as globalStateLib from './common/globalStateLib' -import { RollupChallengeStartedEvent } from '../../build/types/src/rollup/IRollupCore' - -const zerobytes32 = ethers.constants.HashZero -const stakeRequirement = 10 -const stakeToken = ethers.constants.AddressZero -const confirmationPeriodBlocks = 100 -const minimumAssertionPeriod = 75 -const ZERO_ADDR = ethers.constants.AddressZero -const extraChallengeTimeBlocks = 20 -const wasmModuleRoot = - '0x9900000000000000000000000000000000000000000000000000000000000010' -const dummy4844Reader = '0x0000000000000000000000000000000000000089' - -// let rollup: RollupContract -let rollup: RollupContract -let batchPosterManager: Signer -let rollupUser: RollupUserLogic -let rollupAdmin: RollupAdminLogic -let bridge: Bridge -let accounts: Signer[] -let validators: Signer[] -let sequencerInbox: SequencerInbox -let admin: Signer -let sequencer: Signer -let challengeManager: ChallengeManager -let upgradeExecutor: string -// let adminproxy: string - -async function getDefaultConfig( - _confirmPeriodBlocks = confirmationPeriodBlocks -): Promise { - return { - baseStake: stakeRequirement, - chainId: stakeToken, - chainConfig: '{}', // TODO - confirmPeriodBlocks: _confirmPeriodBlocks, - extraChallengeTimeBlocks: extraChallengeTimeBlocks, - owner: await accounts[0].getAddress(), - sequencerInboxMaxTimeVariation: { - delayBlocks: (60 * 60 * 24) / 15, - futureBlocks: 12, - delaySeconds: 60 * 60 * 24, - futureSeconds: 60 * 60, - }, - stakeToken: stakeToken, - wasmModuleRoot: wasmModuleRoot, - loserStakeEscrow: ZERO_ADDR, - genesisBlockNum: 0, - } -} - -const setup = async () => { - accounts = await initializeAccounts() - admin = accounts[0] - - const user = accounts[1] - - const val1 = accounts[2] - const val2 = accounts[3] - const val3 = accounts[4] - const val4 = accounts[5] - sequencer = accounts[6] - const batchPosterManager = accounts[7] - - const oneStep0Fac = (await ethers.getContractFactory( - 'OneStepProver0' - )) as OneStepProver0__factory - const oneStep0 = await oneStep0Fac.deploy() - const oneStepMemoryFac = (await ethers.getContractFactory( - 'OneStepProverMemory' - )) as OneStepProverMemory__factory - const oneStepMemory = await oneStepMemoryFac.deploy() - const oneStepMathFac = (await ethers.getContractFactory( - 'OneStepProverMath' - )) as OneStepProverMath__factory - const oneStepMath = await oneStepMathFac.deploy() - const oneStepHostIoFac = (await ethers.getContractFactory( - 'OneStepProverHostIo' - )) as OneStepProverHostIo__factory - const oneStepHostIo = await oneStepHostIoFac.deploy() - - const oneStepProofEntryFac = (await ethers.getContractFactory( - 'OneStepProofEntry' - )) as OneStepProofEntry__factory - const oneStepProofEntry = await oneStepProofEntryFac.deploy( - oneStep0.address, - oneStepMemory.address, - oneStepMath.address, - oneStepHostIo.address - ) - - const challengeManagerTemplateFac = (await ethers.getContractFactory( - 'ChallengeManager' - )) as ChallengeManager__factory - const challengeManagerTemplate = await challengeManagerTemplateFac.deploy() - - const rollupAdminLogicFac = (await ethers.getContractFactory( - 'RollupAdminLogic' - )) as RollupAdminLogic__factory - const rollupAdminLogicTemplate = await rollupAdminLogicFac.deploy() - - const rollupUserLogicFac = (await ethers.getContractFactory( - 'RollupUserLogic' - )) as RollupUserLogic__factory - const rollupUserLogicTemplate = await rollupUserLogicFac.deploy() - - const upgradeExecutorLogicFac = await ethers.getContractFactory( - UpgradeExecutorABI, - UpgradeExecutorBytecode - ) - const upgradeExecutorLogic = await upgradeExecutorLogicFac.deploy() - - const ethBridgeFac = (await ethers.getContractFactory( - 'Bridge' - )) as Bridge__factory - const ethBridge = await ethBridgeFac.deploy() - - const ethSequencerInboxFac = (await ethers.getContractFactory( - 'SequencerInbox' - )) as SequencerInbox__factory - const ethSequencerInbox = await ethSequencerInboxFac.deploy( - 117964, - dummy4844Reader, - false - ) - - const ethInboxFac = (await ethers.getContractFactory( - 'Inbox' - )) as Inbox__factory - const ethInbox = await ethInboxFac.deploy(117964) - - const ethRollupEventInboxFac = (await ethers.getContractFactory( - 'RollupEventInbox' - )) as RollupEventInbox__factory - const ethRollupEventInbox = await ethRollupEventInboxFac.deploy() - - const ethOutboxFac = (await ethers.getContractFactory( - 'Outbox' - )) as Outbox__factory - const ethOutbox = await ethOutboxFac.deploy() - - const erc20BridgeFac = (await ethers.getContractFactory( - 'ERC20Bridge' - )) as ERC20Bridge__factory - const erc20Bridge = await erc20BridgeFac.deploy() - - const erc20SequencerInboxFac = (await ethers.getContractFactory( - 'SequencerInbox' - )) as SequencerInbox__factory - const erc20SequencerInbox = await erc20SequencerInboxFac.deploy( - 117964, - dummy4844Reader, - true - ) - - const erc20InboxFac = (await ethers.getContractFactory( - 'ERC20Inbox' - )) as ERC20Inbox__factory - const erc20Inbox = await erc20InboxFac.deploy(117964) - - const erc20RollupEventInboxFac = (await ethers.getContractFactory( - 'ERC20RollupEventInbox' - )) as ERC20RollupEventInbox__factory - const erc20RollupEventInbox = await erc20RollupEventInboxFac.deploy() - - const erc20OutboxFac = (await ethers.getContractFactory( - 'ERC20Outbox' - )) as ERC20Outbox__factory - const erc20Outbox = await erc20OutboxFac.deploy() - - const bridgeCreatorFac = (await ethers.getContractFactory( - 'BridgeCreator' - )) as BridgeCreator__factory - const bridgeCreator = await bridgeCreatorFac.deploy( - { - bridge: ethBridge.address, - sequencerInbox: ethSequencerInbox.address, - inbox: ethInbox.address, - rollupEventInbox: ethRollupEventInbox.address, - outbox: ethOutbox.address, - }, - { - bridge: erc20Bridge.address, - sequencerInbox: erc20SequencerInbox.address, - inbox: erc20Inbox.address, - rollupEventInbox: erc20RollupEventInbox.address, - outbox: erc20Outbox.address, - } - ) - - const rollupCreatorFac = (await ethers.getContractFactory( - 'RollupCreator' - )) as RollupCreator__factory - const rollupCreator = await rollupCreatorFac.deploy() - - const deployHelperFac = (await ethers.getContractFactory( - 'DeployHelper' - )) as DeployHelper__factory - const deployHelper = await deployHelperFac.deploy() - - await rollupCreator.setTemplates( - bridgeCreator.address, - oneStepProofEntry.address, - challengeManagerTemplate.address, - rollupAdminLogicTemplate.address, - rollupUserLogicTemplate.address, - upgradeExecutorLogic.address, - ethers.constants.AddressZero, - ethers.constants.AddressZero, - deployHelper.address - ) - - const maxFeePerGas = BigNumber.from('1000000000') - - const deployParams = { - config: await getDefaultConfig(), - batchPosters: [await sequencer.getAddress()], - validators: [ - await val1.getAddress(), - await val2.getAddress(), - await val3.getAddress(), - await val4.getAddress(), - ], - maxDataSize: 117964, - nativeToken: ethers.constants.AddressZero, - deployFactoriesToL2: true, - maxFeePerGasForRetryables: maxFeePerGas, - batchPosterManager: await batchPosterManager.getAddress(), - } - - const response = await rollupCreator.createRollup(deployParams, { - value: ethers.utils.parseEther('0.2'), - }) - - const rec = await response.wait() - - const rollupCreatedEvent = rollupCreator.interface.parseLog( - rec.logs[rec.logs.length - 1] - ).args as RollupCreatedEvent['args'] - - const rollupAdmin = rollupAdminLogicFac - .attach(rollupCreatedEvent.rollupAddress) - .connect(rollupCreator.signer) - const rollupUser = rollupUserLogicFac - .attach(rollupCreatedEvent.rollupAddress) - .connect(user) - const bridge = ethBridgeFac.attach(rollupCreatedEvent.bridge).connect(user) - - sequencerInbox = ( - (await ethers.getContractFactory( - 'SequencerInbox' - )) as SequencerInbox__factory - ).attach(rollupCreatedEvent.sequencerInbox) - - await sequencerInbox - .connect(await impersonateAccount(rollupCreatedEvent.upgradeExecutor)) - .setBatchPosterManager(await batchPosterManager.getAddress()) - - challengeManager = ( - (await ethers.getContractFactory( - 'ChallengeManager' - )) as ChallengeManager__factory - ).attach(await rollupUser.challengeManager()) - - return { - admin, - user, - - rollupAdmin, - rollupUser, - - validators: [val1, val2, val3, val4], - - rollupAdminLogicTemplate, - rollupUserLogicTemplate, - blockChallengeFactory: challengeManagerTemplateFac, - rollupEventBridge: await rollupAdmin.rollupEventInbox(), - outbox: rollupCreatedEvent.outbox, - sequencerInbox: rollupCreatedEvent.sequencerInbox, - delayedBridge: rollupCreatedEvent.bridge, - delayedInbox: rollupCreatedEvent.inboxAddress, - bridge, - batchPosterManager, - upgradeExecutorAddress: rollupCreatedEvent.upgradeExecutor, - adminproxy: rollupCreatedEvent.adminProxy, - } -} - -async function tryAdvanceChain(blocks: number, time?: number): Promise { - try { - if (time === undefined) { - time = blocks * 12 - } - if (blocks <= 0) { - blocks = 1 - } - if (time > 0) { - await ethers.provider.send('evm_increaseTime', [time]) - } - for (let i = 0; i < blocks; i++) { - await ethers.provider.send('evm_mine', []) - } - } catch (e) { - // EVM mine failed. Try advancing the chain by sending txes if the node - // is in dev mode and mints blocks when txes are sent - for (let i = 0; i < blocks; i++) { - const tx = await accounts[0].sendTransaction({ - value: 0, - to: await accounts[0].getAddress(), - }) - await tx.wait() - } - } -} - -async function advancePastAssertion( - blockProposed: number, - confBlocks?: number -): Promise { - if (confBlocks === undefined) { - confBlocks = confirmationPeriodBlocks - } - const blockProposedBlock = await ethers.provider.getBlock(blockProposed) - const latestBlock = await ethers.provider.getBlock('latest') - const passedBlocks = latestBlock.number - blockProposed - const passedTime = latestBlock.timestamp - blockProposedBlock.timestamp - await tryAdvanceChain(confBlocks - passedBlocks, confBlocks * 12 - passedTime) -} - -function newRandomExecutionState() { - const blockHash = keccak256(ethers.utils.randomBytes(32)) - const sendRoot = keccak256(ethers.utils.randomBytes(32)) - const machineStatus = 1 - - return newExecutionState(blockHash, sendRoot, 1, 0, machineStatus) -} - -function newExecutionState( - blockHash: string, - sendRoot: string, - inboxPosition: BigNumberish, - positionInMessage: BigNumberish, - machineStatus: BigNumberish -): ExecutionStateStruct { - return { - globalState: { - bytes32Vals: [blockHash, sendRoot], - u64Vals: [inboxPosition, positionInMessage], - }, - machineStatus, - } -} - -function newRandomAssertion( - prevExecutionState: ExecutionStateStruct -): AssertionStruct { - return { - beforeState: prevExecutionState, - afterState: newRandomExecutionState(), - numBlocks: 10, - } -} - -async function makeSimpleNode( - rollup: RollupContract, - sequencerInbox: SequencerInbox, - parentNode: { - assertion: { afterState: ExecutionStateStruct } - nodeNum: number - nodeHash: BytesLike - inboxMaxCount: BigNumber - }, - siblingNode?: Node, - prevNode?: Node, - stakeToAdd?: BigNumber -): Promise<{ tx: ContractTransaction; node: Node }> { - const staker = await rollup.rollup.getStaker( - await rollup.rollup.signer.getAddress() - ) - - const assertion = newRandomAssertion(parentNode.assertion.afterState) - const { tx, node, expectedNewNodeHash } = await rollup.stakeOnNewNode( - sequencerInbox, - parentNode, - assertion, - siblingNode, - stakeToAdd - ) - - expect(assertionEquals(assertion, node.assertion), 'unexpected assertion').to - .be.true - assert.equal( - node.nodeNum, - (prevNode || siblingNode || parentNode).nodeNum + 1 - ) - assert.equal(node.nodeHash, expectedNewNodeHash) - - if (stakeToAdd) { - const stakerAfter = await rollup.rollup.getStaker( - await rollup.rollup.signer.getAddress() - ) - expect(stakerAfter.latestStakedNode.toNumber()).to.eq(node.nodeNum) - expect(stakerAfter.amountStaked.toString()).to.eq( - staker.amountStaked.add(stakeToAdd).toString() - ) - } - return { tx, node } -} - -let prevNode: Node -const prevNodes: Node[] = [] - -function updatePrevNode(node: Node) { - prevNode = node - prevNodes.push(node) -} - -const _IMPLEMENTATION_PRIMARY_SLOT = - '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' -const _IMPLEMENTATION_SECONDARY_SLOT = - '0x2b1dbce74324248c222f0ec2d5ed7bd323cfc425b336f0253c5ccfda7265546d' - -const getDoubleLogicUUPSTarget = async ( - slot: 'user' | 'admin', - provider: providers.Provider -): Promise => { - return `0x${( - await provider.getStorageAt( - rollupAdmin.address, - slot === 'admin' - ? _IMPLEMENTATION_PRIMARY_SLOT - : _IMPLEMENTATION_SECONDARY_SLOT - ) - ) - .substring(26) - .toLowerCase()}` -} - -const impersonateAccount = (address: string) => - network.provider - .request({ - // Fund inboxMock to send transaction - method: 'hardhat_setBalance', - params: [address, '0xffffffffffffffffffff'], - }) - .then(() => - network.provider.request({ - method: 'hardhat_impersonateAccount', - params: [address], - }) - ) - .then(() => ethers.getSigner(address)) - -describe('ArbRollup', () => { - it('should initialize', async function () { - const { - rollupAdmin: rollupAdminContract, - rollupUser: rollupUserContract, - bridge: bridgeContract, - admin: adminI, - validators: validatorsI, - batchPosterManager: batchPosterManagerI, - upgradeExecutorAddress, - } = await setup() - rollupAdmin = rollupAdminContract - rollupUser = rollupUserContract - bridge = bridgeContract - admin = adminI - validators = validatorsI - upgradeExecutor = upgradeExecutorAddress - // adminproxy = adminproxyAddress - rollup = new RollupContract(rollupUser.connect(validators[0])) - batchPosterManager = batchPosterManagerI - }) - - it('should only initialize once', async function () { - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .initialize(await getDefaultConfig(), { - challengeManager: constants.AddressZero, - bridge: constants.AddressZero, - inbox: constants.AddressZero, - outbox: constants.AddressZero, - rollupAdminLogic: constants.AddressZero, - rollupEventInbox: constants.AddressZero, - rollupUserLogic: constants.AddressZero, - sequencerInbox: constants.AddressZero, - validatorUtils: constants.AddressZero, - validatorWalletCreator: constants.AddressZero, - }) - ).to.be.revertedWith('Initializable: contract is already initialized') - }) - - it('should place stake on new node', async function () { - await tryAdvanceChain(minimumAssertionPeriod) - - const initNode: { - assertion: { afterState: ExecutionStateStruct } - nodeNum: number - nodeHash: BytesLike - inboxMaxCount: BigNumber - } = { - assertion: { - afterState: { - globalState: { - bytes32Vals: [zerobytes32, zerobytes32], - u64Vals: [0, 0], - }, - machineStatus: MachineStatus.FINISHED, - }, - }, - inboxMaxCount: BigNumber.from(1), - nodeHash: zerobytes32, - nodeNum: 0, - } - - const stake = await rollup.currentRequiredStake() - const { node } = await makeSimpleNode( - rollup, - sequencerInbox, - initNode, - undefined, - undefined, - stake - ) - updatePrevNode(node) - }) - - it('should let a new staker place on existing node', async function () { - const stake = await rollup.currentRequiredStake() - await rollupUser - .connect(validators[2]) - .newStakeOnExistingNode(1, prevNode.nodeHash, { value: stake }) - await rollupUser - .connect(validators[3]) - .newStakeOnExistingNode(1, prevNode.nodeHash, { value: stake }) - }) - - it('should move stake to a new node', async function () { - await tryAdvanceChain(minimumAssertionPeriod) - const { node } = await makeSimpleNode(rollup, sequencerInbox, prevNode) - updatePrevNode(node) - }) - - it('should let the second staker place on the new node', async function () { - await rollup - .connect(validators[2]) - .stakeOnExistingNode(2, prevNode.nodeHash) - }) - - it('should confirm node', async function () { - await tryAdvanceChain(confirmationPeriodBlocks * 2) - - await rollup.confirmNextNode(prevNodes[0]) - }) - - it('should confirm next node', async function () { - await tryAdvanceChain(minimumAssertionPeriod) - await rollup.confirmNextNode(prevNodes[1]) - }) - - let challengedNode: Node - let validNode: Node - it('should let the first staker make another node', async function () { - await tryAdvanceChain(minimumAssertionPeriod) - const { node } = await makeSimpleNode(rollup, sequencerInbox, prevNode) - challengedNode = node - validNode = node - }) - - let challengerNode: Node - it('should let the second staker make a conflicting node', async function () { - await tryAdvanceChain(minimumAssertionPeriod) - const { node } = await makeSimpleNode( - rollup.connect(validators[2]), - sequencerInbox, - prevNode, - validNode - ) - challengerNode = node - }) - - it('should fail to confirm first staker node', async function () { - await advancePastAssertion(challengerNode.proposedBlock) - await expect(rollup.confirmNextNode(validNode)).to.be.revertedWith( - 'NOT_ALL_STAKED' - ) - }) - - let challengeIndex: number - let challengeCreatedAt: number - it('should initiate a challenge', async function () { - const tx = rollup.createChallenge( - await validators[0].getAddress(), - await validators[2].getAddress(), - challengedNode, - challengerNode - ) - const receipt = await (await tx).wait() - const ev = rollup.rollup.interface.parseLog( - receipt.logs![receipt.logs!.length - 1] - ) - expect(ev.name).to.equal('RollupChallengeStarted') - - const parsedEv = ev.args as RollupChallengeStartedEvent['args'] - challengeIndex = parsedEv.challengeIndex.toNumber() - challengeCreatedAt = receipt.blockNumber - }) - - it('should make a new node', async function () { - const { node } = await makeSimpleNode( - rollup, - sequencerInbox, - validNode, - undefined, - challengerNode - ) - challengedNode = node - }) - - it('new staker should make a conflicting node', async function () { - const stake = await rollup.currentRequiredStake() - await rollup.rollup - .connect(validators[1]) - .newStakeOnExistingNode(3, validNode.nodeHash, { - value: stake.add(50), - }) - - const { node } = await makeSimpleNode( - rollup.connect(validators[1]), - sequencerInbox, - validNode, - challengedNode - ) - challengerNode = node - }) - - it('timeout should not occur early', async function () { - const challengeCreatedAtTime = ( - await ethers.provider.getBlock(challengeCreatedAt) - ).timestamp - // This is missing the extraChallengeTimeBlocks - const notQuiteChallengeDuration = - challengedNode.proposedBlock - - validNode.proposedBlock + - confirmationPeriodBlocks - const elapsedTime = - (await ethers.provider.getBlock('latest')).timestamp - - challengeCreatedAtTime - await tryAdvanceChain(1, notQuiteChallengeDuration - elapsedTime) - const isTimedOut = await challengeManager - .connect(validators[0]) - .isTimedOut(challengeIndex) - expect(isTimedOut).to.be.false - }) - - it('asserter should win via timeout', async function () { - await tryAdvanceChain(extraChallengeTimeBlocks) - await challengeManager.connect(validators[0]).timeout(challengeIndex) - }) - - it('confirm first staker node', async function () { - await rollup.confirmNextNode(validNode) - }) - - it('should reject out of order second node', async function () { - await rollup.rejectNextNode(stakeToken) - }) - - it('should initiate another challenge', async function () { - const tx = rollup.createChallenge( - await validators[0].getAddress(), - await validators[1].getAddress(), - challengedNode, - challengerNode - ) - const receipt = await (await tx).wait() - const ev = rollup.rollup.interface.parseLog( - receipt.logs![receipt.logs!.length - 1] - ) - expect(ev.name).to.equal('RollupChallengeStarted') - const parsedEv = ev.args as RollupChallengeStartedEvent['args'] - challengeIndex = parsedEv.challengeIndex.toNumber() - - await expect( - rollup.rollup.completeChallenge( - challengeIndex, - await sequencer.getAddress(), - await validators[3].getAddress() - ) - ).to.be.revertedWith('WRONG_SENDER') - }) - - it('challenger should reply in challenge', async function () { - const seg0 = blockStateHash( - BigNumber.from(challengerNode.assertion.beforeState.machineStatus), - globalStateLib.hash(challengerNode.assertion.beforeState.globalState) - ) - - const seg1 = blockStateHash( - BigNumber.from(challengedNode.assertion.afterState.machineStatus), - globalStateLib.hash(challengedNode.assertion.afterState.globalState) - ) - await challengeManager.connect(validators[1]).bisectExecution( - challengeIndex, - { - challengePosition: BigNumber.from(0), - oldSegments: [seg0, seg1], - oldSegmentsLength: BigNumber.from(challengedNode.assertion.numBlocks), - oldSegmentsStart: 0, - }, - [ - seg0, - zerobytes32, - zerobytes32, - zerobytes32, - zerobytes32, - zerobytes32, - zerobytes32, - zerobytes32, - zerobytes32, - zerobytes32, - zerobytes32, - ] - ) - }) - - it('challenger should win via timeout', async function () { - const challengeDuration = - confirmationPeriodBlocks + - extraChallengeTimeBlocks + - (challengerNode.proposedBlock - validNode.proposedBlock) - await advancePastAssertion(challengerNode.proposedBlock, challengeDuration) - await challengeManager.timeout(challengeIndex) - }) - - it('should reject out of order second node', async function () { - await rollup.rejectNextNode(await validators[1].getAddress()) - }) - - it('confirm next node', async function () { - await tryAdvanceChain(confirmationPeriodBlocks) - await rollup.confirmNextNode(challengerNode) - }) - - it('allow force refund staker with pending node', async function () { - await rollupAdmin.connect(await impersonateAccount(upgradeExecutor)).pause() - await ( - await rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .forceRefundStaker([await validators[3].getAddress()]) - ).wait() - - await expect( - rollup.rollup.connect(validators[3]).withdrawStakerFunds() - ).to.be.revertedWith('PAUSED_AND_ACTIVE') - // staker can only withdraw if rollup address changed when paused - await bridge - .connect(await impersonateAccount(rollup.rollup.address)) - .updateRollupAddress(ethers.constants.AddressZero) - - await ( - await rollup.rollup.connect(validators[3]).withdrawStakerFunds() - ).wait() - await rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .resume() - - // restore rollup address - await bridge - .connect(await impersonateAccount(ethers.constants.AddressZero)) - .updateRollupAddress(rollupUser.address) - - const postWithdrawablefunds = await rollup.rollup.withdrawableFunds( - await validators[3].getAddress() - ) - expect(postWithdrawablefunds, 'withdrawable funds').to.equal(0) - const stake = await rollup.rollup.amountStaked( - await validators[3].getAddress() - ) - expect(stake, 'amount staked').to.equal(0) - }) - - it('should add and remove stakes correctly', async function () { - /* - RollupUser functions that alter stake and their respective Core logic - - user: newStake - core: createNewStake - - user: addToDeposit - core: increaseStakeBy - - user: reduceDeposit - core: reduceStakeTo - - user: returnOldDeposit - core: withdrawStaker - - user: withdrawStakerFunds - core: withdrawFunds - */ - - const initialStake = await rollup.rollup.amountStaked( - await validators[1].getAddress() - ) - - await rollup.connect(validators[1]).reduceDeposit(initialStake) - - await expect( - rollup.connect(validators[1]).reduceDeposit(initialStake.add(1)) - ).to.be.revertedWith('TOO_LITTLE_STAKE') - - await rollup - .connect(validators[1]) - .addToDeposit(await validators[1].getAddress(), { value: 5 }) - - await rollup.connect(validators[1]).reduceDeposit(5) - - const prevBalance = await validators[1].getBalance() - const prevWithdrawablefunds = await rollup.rollup.withdrawableFunds( - await validators[1].getAddress() - ) - - const tx = await rollup.rollup.connect(validators[1]).withdrawStakerFunds() - const receipt = await tx.wait() - const gasPaid = receipt.gasUsed.mul(receipt.effectiveGasPrice) - - const postBalance = await validators[1].getBalance() - const postWithdrawablefunds = await rollup.rollup.withdrawableFunds( - await validators[1].getAddress() - ) - - expect(postWithdrawablefunds).to.equal(0) - expect(postBalance.add(gasPaid)).to.equal( - prevBalance.add(prevWithdrawablefunds) - ) - - // this gets deposit and removes staker - await rollup.rollup - .connect(validators[1]) - .returnOldDeposit(await validators[1].getAddress()) - // all stake is now removed - }) - - it('should allow removing zombies', async function () { - const zombieCount = ( - await rollup.rollup.connect(validators[2]).zombieCount() - ).toNumber() - for (let i = 0; i < zombieCount; i++) { - await rollup.rollup.connect(validators[2]).removeZombie(0, 1024) - } - }) - - it('should pause the contracts then resume', async function () { - const prevIsPaused = await rollup.rollup.paused() - expect(prevIsPaused).to.equal(false) - - await rollupAdmin.connect(await impersonateAccount(upgradeExecutor)).pause() - - const postIsPaused = await rollup.rollup.paused() - expect(postIsPaused).to.equal(true) - - await expect( - rollup - .connect(validators[1]) - .addToDeposit(await validators[1].getAddress(), { value: 5 }) - ).to.be.revertedWith('Pausable: paused') - - await rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .resume() - }) - - it('should allow admin to alter rollup while paused', async function () { - const prevLatestConfirmed = await rollup.rollup.latestConfirmed() - expect(prevLatestConfirmed.toNumber()).to.equal(6) - // prevNode is prevLatestConfirmed - prevNode = challengerNode - - const stake = await rollup.currentRequiredStake() - - const { node: node1 } = await makeSimpleNode( - rollup, - sequencerInbox, - prevNode, - undefined, - undefined, - stake - ) - const node1Num = await rollup.rollup.latestNodeCreated() - expect(node1Num.toNumber(), 'node1num').to.eq(node1.nodeNum) - - await tryAdvanceChain(minimumAssertionPeriod) - - const { node: node2 } = await makeSimpleNode( - rollup.connect(validators[2]), - sequencerInbox, - prevNode, - node1, - undefined, - stake - ) - const node2Num = await rollup.rollup.latestNodeCreated() - expect(node2Num.toNumber(), 'node2num').to.eq(node2.nodeNum) - - const tx = await rollup.createChallenge( - await validators[0].getAddress(), - await validators[2].getAddress(), - node1, - node2 - ) - const receipt = await tx.wait() - const ev = rollup.rollup.interface.parseLog( - receipt.logs![receipt.logs!.length - 1] - ) - expect(ev.name).to.equal('RollupChallengeStarted') - const parsedEv = ev.args as RollupChallengeStartedEvent['args'] - challengeIndex = parsedEv.challengeIndex.toNumber() - - expect( - await challengeManager.currentResponder(challengeIndex), - 'turn challenger' - ).to.eq(await validators[2].getAddress()) - - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .forceResolveChallenge( - [await validators[0].getAddress()], - [await validators[2].getAddress()] - ), - 'force resolve' - ).to.be.revertedWith('Pausable: not paused') - - await expect( - rollup.createChallenge( - await validators[0].getAddress(), - await validators[2].getAddress(), - node1, - node2 - ), - 'create challenge' - ).to.be.revertedWith('IN_CHAL') - - await rollupAdmin.connect(await impersonateAccount(upgradeExecutor)).pause() - - await rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .forceResolveChallenge( - [await validators[0].getAddress()], - [await validators[2].getAddress()] - ) - - // challenge should have been destroyed - expect( - await challengeManager.currentResponder(challengeIndex), - 'turn reset' - ).to.equal(constants.AddressZero) - - const challengeA = await rollupAdmin.currentChallenge( - await validators[0].getAddress() - ) - const challengeB = await rollupAdmin.currentChallenge( - await validators[2].getAddress() - ) - - expect(challengeA).to.equal(ZERO_ADDR) - expect(challengeB).to.equal(ZERO_ADDR) - - await rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .forceRefundStaker([ - await validators[0].getAddress(), - await validators[2].getAddress(), - ]) - - const adminAssertion = newRandomAssertion(prevNode.assertion.afterState) - const { node: forceCreatedNode1 } = await forceCreateNode( - rollupAdmin.connect(await impersonateAccount(upgradeExecutor)), - sequencerInbox, - prevNode, - adminAssertion, - node2 - ) - expect( - assertionEquals(forceCreatedNode1.assertion, adminAssertion), - 'assertion error' - ).to.be.true - - const adminNodeNum = await rollup.rollup.latestNodeCreated() - const midLatestConfirmed = await rollup.rollup.latestConfirmed() - expect(midLatestConfirmed.toNumber()).to.equal(6) - - expect(adminNodeNum.toNumber()).to.equal(node2Num.toNumber() + 1) - - const adminAssertion2 = newRandomAssertion(prevNode.assertion.afterState) - const { node: forceCreatedNode2 } = await forceCreateNode( - rollupAdmin.connect(await impersonateAccount(upgradeExecutor)), - sequencerInbox, - prevNode, - adminAssertion2, - forceCreatedNode1 - ) - - const postLatestCreated = await rollup.rollup.latestNodeCreated() - - await rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .forceConfirmNode( - adminNodeNum, - adminAssertion.afterState.globalState.bytes32Vals[0], - adminAssertion.afterState.globalState.bytes32Vals[1] - ) - - const postLatestConfirmed = await rollup.rollup.latestConfirmed() - expect(postLatestCreated).to.equal(adminNodeNum.add(1)) - expect(postLatestConfirmed).to.equal(adminNodeNum) - - await rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .resume() - - // should create node after resuming - - prevNode = forceCreatedNode1 - - await tryAdvanceChain(minimumAssertionPeriod) - - await expect( - makeSimpleNode( - rollup.connect(validators[2]), - sequencerInbox, - prevNode, - undefined, - forceCreatedNode2, - stake - ) - ).to.be.revertedWith('STAKER_IS_ZOMBIE') - - await expect( - makeSimpleNode(rollup.connect(validators[2]), sequencerInbox, prevNode) - ).to.be.revertedWith('NOT_STAKED') - - await rollup.rollup.connect(validators[2]).removeOldZombies(0) - - await makeSimpleNode( - rollup.connect(validators[2]), - sequencerInbox, - prevNode, - undefined, - forceCreatedNode2, - stake - ) - }) - - it('should initialize a fresh rollup', async function () { - const { - rollupAdmin: rollupAdminContract, - rollupUser: rollupUserContract, - admin: adminI, - validators: validatorsI, - batchPosterManager: batchPosterManagerI, - upgradeExecutorAddress, - } = await setup() - rollupAdmin = rollupAdminContract - rollupUser = rollupUserContract - admin = adminI - validators = validatorsI - upgradeExecutor = upgradeExecutorAddress - rollup = new RollupContract(rollupUser.connect(validators[0])) - batchPosterManager = batchPosterManagerI - }) - - it('should stake on initial node again', async function () { - await tryAdvanceChain(minimumAssertionPeriod) - - const initNode: { - assertion: { afterState: ExecutionStateStruct } - nodeNum: number - nodeHash: BytesLike - inboxMaxCount: BigNumber - } = { - assertion: { - afterState: { - globalState: { - bytes32Vals: [zerobytes32, zerobytes32], - u64Vals: [0, 0], - }, - machineStatus: MachineStatus.FINISHED, - }, - }, - inboxMaxCount: BigNumber.from(1), - nodeHash: zerobytes32, - nodeNum: 0, - } - - const stake = await rollup.currentRequiredStake() - const { node } = await makeSimpleNode( - rollup, - sequencerInbox, - initNode, - undefined, - undefined, - stake - ) - updatePrevNode(node) - }) - - it('should only allow admin to upgrade primary logic', async function () { - const user = rollupUser.signer - - // store the current implementation addresses - const proxyPrimaryTarget0 = await getDoubleLogicUUPSTarget( - 'admin', - user.provider! - ) - const proxySecondaryTarget0 = await getDoubleLogicUUPSTarget( - 'user', - user.provider! - ) - - // deploy a new admin logic - const rollupAdminLogicFac = (await ethers.getContractFactory( - 'RollupAdminLogic' - )) as RollupAdminLogic__factory - const newAdminLogicImpl = await rollupAdminLogicFac.deploy() - - // attempt to upgrade as user, should revert - await expect(rollupAdmin.connect(user).upgradeTo(newAdminLogicImpl.address)) - .to.be.reverted - // upgrade as admin - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .upgradeTo(newAdminLogicImpl.address) - ).to.emit(rollupAdmin, 'Upgraded') - - // check the new implementation address is set - const proxyPrimaryTarget = await getDoubleLogicUUPSTarget( - 'admin', - user.provider! - ) - await expect(proxyPrimaryTarget).to.not.eq(proxyPrimaryTarget0) - await expect(proxyPrimaryTarget).to.eq( - newAdminLogicImpl.address.toLowerCase() - ) - - // check the other implementation address is unchanged - const proxySecondaryTarget = await getDoubleLogicUUPSTarget( - 'user', - user.provider! - ) - await expect(proxySecondaryTarget).to.eq(proxySecondaryTarget0) - }) - - it('should only allow admin to upgrade secondary logic', async function () { - const user = rollupUser.signer - - // store the current implementation addresses - const proxyPrimaryTarget0 = await getDoubleLogicUUPSTarget( - 'admin', - user.provider! - ) - const proxySecondaryTarget0 = await getDoubleLogicUUPSTarget( - 'user', - user.provider! - ) - - // deploy a new user logic - const rollupUserLogicFac = (await ethers.getContractFactory( - 'RollupUserLogic' - )) as RollupUserLogic__factory - const newUserLogicImpl = await rollupUserLogicFac.deploy() - - // attempt to upgrade as user, should revert - await expect( - rollupAdmin.connect(user).upgradeSecondaryTo(newUserLogicImpl.address) - ).to.be.reverted - // upgrade as admin - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .upgradeSecondaryTo(newUserLogicImpl.address) - ).to.emit(rollupAdmin, 'UpgradedSecondary') - - // check the new implementation address is set - const proxySecondaryTarget = await getDoubleLogicUUPSTarget( - 'user', - user.provider! - ) - await expect(proxySecondaryTarget).to.not.eq(proxySecondaryTarget0) - await expect(proxySecondaryTarget).to.eq( - newUserLogicImpl.address.toLowerCase() - ) - - // check the other implementation address is unchanged - const proxyPrimaryTarget = await getDoubleLogicUUPSTarget( - 'admin', - user.provider! - ) - await expect(proxyPrimaryTarget).to.eq(proxyPrimaryTarget0) - }) - - it('should allow admin to upgrade primary logic and call', async function () { - const rollupAdminLogicFac = (await ethers.getContractFactory( - 'RollupAdminLogic' - )) as RollupAdminLogic__factory - const newAdminLogicImpl = await rollupAdminLogicFac.deploy() - // first pause the contract so we can unpause after upgrade - await rollupAdmin.connect(await impersonateAccount(upgradeExecutor)).pause() - // 0x046f7da2 - resume() - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .upgradeToAndCall(newAdminLogicImpl.address, '0x046f7da2') - ).to.emit(rollupAdmin, 'Unpaused') - }) - - it('should allow admin to upgrade secondary logic and call', async function () { - const rollupUserLogicFac = (await ethers.getContractFactory( - 'RollupUserLogic' - )) as RollupUserLogic__factory - const newUserLogicImpl = await rollupUserLogicFac.deploy() - // this call should revert since the user logic don't have a fallback - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .upgradeSecondaryToAndCall(newUserLogicImpl.address, '0x') - ).to.revertedWith('Address: low-level delegate call failed') - // 0x8da5cb5b - owner() (some random function that will not revert) - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .upgradeSecondaryToAndCall(newUserLogicImpl.address, '0x8da5cb5b') - ).to.emit(rollupAdmin, 'UpgradedSecondary') - }) - - it('should fail upgrade to unsafe primary logic', async function () { - const rollupUserLogicFac = (await ethers.getContractFactory( - 'RollupUserLogic' - )) as RollupUserLogic__factory - const newUserLogicImpl = await rollupUserLogicFac.deploy() - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .upgradeTo(newUserLogicImpl.address) - ).to.revertedWith('ERC1967Upgrade: unsupported proxiableUUID') - }) - - it('should fail upgrade to unsafe secondary logic', async function () { - const rollupAdminLogicFac = (await ethers.getContractFactory( - 'RollupAdminLogic' - )) as RollupAdminLogic__factory - const newAdminLogicImpl = await rollupAdminLogicFac.deploy() - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .upgradeSecondaryTo(newAdminLogicImpl.address) - ).to.revertedWith('ERC1967Upgrade: unsupported secondary proxiableUUID') - }) - - it('should fail upgrade to proxy primary logic', async function () { - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .upgradeTo(rollupAdmin.address) - ).to.revertedWith('ERC1967Upgrade: new implementation is not UUPS') - }) - - it('should fail upgrade to proxy secondary logic', async function () { - await expect( - rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .upgradeSecondaryTo(rollupAdmin.address) - ).to.revertedWith( - 'ERC1967Upgrade: new secondary implementation is not UUPS' - ) - }) - - it('should fail to init rollupAdminLogic without proxy', async function () { - const user = rollupUser.signer - const rollupAdminLogicFac = (await ethers.getContractFactory( - 'RollupAdminLogic' - )) as RollupAdminLogic__factory - const proxyPrimaryTarget = await getDoubleLogicUUPSTarget( - 'admin', - user.provider! - ) - const proxyPrimaryImpl = rollupAdminLogicFac.attach(proxyPrimaryTarget) - await expect( - proxyPrimaryImpl.initialize(await getDefaultConfig(), { - challengeManager: constants.AddressZero, - bridge: constants.AddressZero, - inbox: constants.AddressZero, - outbox: constants.AddressZero, - rollupAdminLogic: constants.AddressZero, - rollupEventInbox: constants.AddressZero, - rollupUserLogic: constants.AddressZero, - sequencerInbox: constants.AddressZero, - validatorUtils: constants.AddressZero, - validatorWalletCreator: constants.AddressZero, - }) - ).to.be.revertedWith('Function must be called through delegatecall') - }) - - it('should fail to init rollupUserLogic without proxy', async function () { - const user = rollupUser.signer - const rollupUserLogicFac = (await ethers.getContractFactory( - 'RollupUserLogic' - )) as RollupUserLogic__factory - const proxySecondaryTarget = await getDoubleLogicUUPSTarget( - 'user', - user.provider! - ) - const proxySecondaryImpl = rollupUserLogicFac.attach(proxySecondaryTarget) - await expect( - proxySecondaryImpl.interface.functions['initialize(address)'] - .stateMutability - ).to.eq('view') - }) - - it('can set is sequencer', async function () { - const testAddress = await accounts[9].getAddress() - expect(await sequencerInbox.isSequencer(testAddress)).to.be.false - await expect(sequencerInbox.setIsSequencer(testAddress, true)) - .to.revertedWith(`NotBatchPosterManager`) - .withArgs(await sequencerInbox.signer.getAddress()) - expect(await sequencerInbox.isSequencer(testAddress)).to.be.false - - await ( - await sequencerInbox - .connect(batchPosterManager) - .setIsSequencer(testAddress, true) - ).wait() - - expect(await sequencerInbox.isSequencer(testAddress)).to.be.true - - await ( - await sequencerInbox - .connect(batchPosterManager) - .setIsSequencer(testAddress, false) - ).wait() - - expect(await sequencerInbox.isSequencer(testAddress)).to.be.false - }) - - it('can set a batch poster', async function () { - const testAddress = await accounts[9].getAddress() - expect(await sequencerInbox.isBatchPoster(testAddress)).to.be.false - await expect(sequencerInbox.setIsBatchPoster(testAddress, true)) - .to.revertedWith(`NotBatchPosterManager`) - .withArgs(await sequencerInbox.signer.getAddress()) - expect(await sequencerInbox.isBatchPoster(testAddress)).to.be.false - - await ( - await sequencerInbox - .connect(batchPosterManager) - .setIsBatchPoster(testAddress, true) - ).wait() - - expect(await sequencerInbox.isBatchPoster(testAddress)).to.be.true - - await ( - await sequencerInbox - .connect(batchPosterManager) - .setIsBatchPoster(testAddress, false) - ).wait() - - expect(await sequencerInbox.isBatchPoster(testAddress)).to.be.false - }) - - it('can set batch poster manager', async function () { - const testManager = await accounts[8].getAddress() - expect(await sequencerInbox.batchPosterManager()).to.eq( - await batchPosterManager.getAddress() - ) - await expect( - sequencerInbox.connect(accounts[8]).setBatchPosterManager(testManager) - ) - .to.revertedWith('NotOwner') - .withArgs(testManager, upgradeExecutor) - expect(await sequencerInbox.batchPosterManager()).to.eq( - await batchPosterManager.getAddress() - ) - - await ( - await sequencerInbox - .connect(await impersonateAccount(upgradeExecutor)) - .setBatchPosterManager(testManager) - ).wait() - - expect(await sequencerInbox.batchPosterManager()).to.eq(testManager) - }) - - it('should fail the chainid fork check', async function () { - await expect(sequencerInbox.removeDelayAfterFork()).to.revertedWith( - 'NotForked' - ) - }) - - it('should fail the batch poster check', async function () { - await expect( - sequencerInbox.addSequencerL2Batch( - 0, - '0x', - 0, - ethers.constants.AddressZero, - 0, - 0 - ) - ).to.revertedWith('NotBatchPoster') - }) - - it('should fail the onlyValidator check', async function () { - await expect(rollupUser.withdrawStakerFunds()).to.revertedWith( - 'NOT_VALIDATOR' - ) - }) - - it('should fail to call removeWhitelistAfterFork', async function () { - await expect(rollupUser.removeWhitelistAfterFork()).to.revertedWith( - 'CHAIN_ID_NOT_CHANGED' - ) - }) - - it('should fail to call removeWhitelistAfterValidatorAfk', async function () { - await expect(rollupUser.removeWhitelistAfterValidatorAfk()).to.revertedWith( - 'VALIDATOR_NOT_AFK' - ) - }) -}) - -const fastConfirmerAddr = '0x000000000000000000000000000000000000fa51' -describe.only('ArbRollupFastConfirm', () => { - it('should initialize', async function () { - const { - rollupAdmin: rollupAdminContract, - rollupUser: rollupUserContract, - bridge: bridgeContract, - admin: adminI, - validators: validatorsI, - batchPosterManager: batchPosterManagerI, - upgradeExecutorAddress, - } = await setup() - rollupAdmin = rollupAdminContract - rollupUser = rollupUserContract - bridge = bridgeContract - admin = adminI - validators = validatorsI - upgradeExecutor = upgradeExecutorAddress - // adminproxy = adminproxyAddress - rollup = new RollupContract(rollupUser.connect(validators[0])) - batchPosterManager = batchPosterManagerI - }) - it('should set fast confirmer', async function () { - await ( - await rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .setAnyTrustFastConfirmer(fastConfirmerAddr) - ).wait() - await expect(await rollup.rollup.anyTrustFastConfirmer()).to.eq( - fastConfirmerAddr - ) - }) - it('should place stake on new node', async function () { - await tryAdvanceChain(minimumAssertionPeriod) - - const initNode: { - assertion: { afterState: ExecutionStateStruct } - nodeNum: number - nodeHash: BytesLike - inboxMaxCount: BigNumber - } = { - assertion: { - afterState: { - globalState: { - bytes32Vals: [zerobytes32, zerobytes32], - u64Vals: [0, 0], - }, - machineStatus: MachineStatus.FINISHED, - }, - }, - inboxMaxCount: BigNumber.from(1), - nodeHash: zerobytes32, - nodeNum: 0, - } - - const stake = await rollup.currentRequiredStake() - const { node } = await makeSimpleNode( - rollup, - sequencerInbox, - initNode, - undefined, - undefined, - stake - ) - updatePrevNode(node) - }) - it('should fail to confirm before deadline', async function () { - await expect(rollup.confirmNextNode(prevNodes[0])).to.be.revertedWith( - 'BEFORE_DEADLINE' - ) - }) - it('should fail to fast confirm if not fast confirmer', async function () { - await expect( - rollup.fastConfirmNextNode(prevNodes[0], ethers.constants.HashZero) - ).to.be.revertedWith('NFC') - }) - it('should fail to fast confirm if not validator', async function () { - await expect( - rollup - .connect(await impersonateAccount(fastConfirmerAddr)) - .fastConfirmNextNode(prevNodes[0], prevNodes[0].nodeHash) - ).to.be.revertedWith('NOT_VALIDATOR') - }) - it('should be able to set fast confirmer as validator', async function () { - await ( - await rollupAdmin - .connect(await impersonateAccount(upgradeExecutor)) - .setValidator([fastConfirmerAddr], [true]) - ).wait() - }) - it('should fail to fast confirm if wrong nodehash', async function () { - await expect( - rollup - .connect(await impersonateAccount(fastConfirmerAddr)) - .fastConfirmNextNode(prevNodes[0], ethers.constants.HashZero) - ).to.be.revertedWith('WH') - }) - it('should fast confirm', async function () { - await rollup - .connect(await impersonateAccount(fastConfirmerAddr)) - .fastConfirmNextNode(prevNodes[0], prevNodes[0].nodeHash) - }) -}) diff --git a/test/contract/common/challengeLib.ts b/test/contract/common/challengeLib.ts index b28a8c25..b3b66b16 100644 --- a/test/contract/common/challengeLib.ts +++ b/test/contract/common/challengeLib.ts @@ -5,37 +5,20 @@ export enum MachineStatus { RUNNING = 0, FINISHED = 1, ERRORED = 2, - TOO_FAR = 3, } -export function hashChallengeState( - segmentsStart: BigNumber, - segmentsLength: BigNumber, - segments: string[] -) { - return solidityKeccak256( - ['uint256', 'uint256', 'bytes32[]'], - [segmentsStart, segmentsLength, segments] - ) -} - -export function blockStateHash( - machineStatus: BigNumber, - globalStateHash: string -) { +export function machineHash(machineStatus: BigNumber, globalStateHash: string) { const machineStatusNum = machineStatus.toNumber() if (machineStatusNum === MachineStatus.FINISHED) { return solidityKeccak256( ['string', 'bytes32'], - ['Block state:', globalStateHash] + ['Machine finished:', globalStateHash] ) } else if (machineStatusNum === MachineStatus.ERRORED) { return solidityKeccak256( ['string', 'bytes32'], - ['Block state, errored:', globalStateHash] + ['Machine errored:', globalStateHash] ) - } else if (machineStatusNum === MachineStatus.TOO_FAR) { - return solidityKeccak256(['string', 'bytes32'], ['Block state, too far:']) } else { console.log(machineStatus.toNumber()) throw new Error('BAD_BLOCK_STATUS') diff --git a/test/contract/common/rolluplib.ts b/test/contract/common/rolluplib.ts deleted file mode 100644 index a9be6926..00000000 --- a/test/contract/common/rolluplib.ts +++ /dev/null @@ -1,325 +0,0 @@ -import { ethers } from 'hardhat' -import { Interface, LogDescription } from '@ethersproject/abi' -import { Signer } from '@ethersproject/abstract-signer' -import { BigNumberish, BigNumber } from '@ethersproject/bignumber' -import { BytesLike } from '@ethersproject/bytes' -import { ContractTransaction, PayableOverrides } from '@ethersproject/contracts' -import { Provider } from '@ethersproject/providers' -import { - RollupUserLogic, - RollupAdminLogic, - SequencerInbox, -} from '../../../build/types' -import { NodeCreatedEvent } from '../../../build/types/src/rollup/RollupUserLogic.sol/RollupUserLogic' -import { AssertionStruct } from '../../../build/types/src/rollup/RollupCore' -import { ExecutionStateStruct } from '../../../build/types/src/rollup/RollupCore' -import { blockStateHash, hashChallengeState } from './challengeLib' -import * as globalStateLib from './globalStateLib' -import { constants } from 'ethers' -import { GlobalStateStruct } from '../../../build/types/src/challenge/ChallengeManager' - -export interface Node { - nodeNum: number - proposedBlock: number - assertion: AssertionStruct - inboxMaxCount: BigNumber - nodeHash: BytesLike - wasmModuleRoot: BytesLike -} - -export function nodeHash( - hasSibling: boolean, - lastHash: BytesLike, - assertionExecHash: BytesLike, - inboxAcc: BytesLike, - wasmModuleRoot: BytesLike -): BytesLike { - return ethers.utils.solidityKeccak256( - ['bool', 'bytes32', 'bytes32', 'bytes32', 'bytes32'], - [hasSibling, lastHash, assertionExecHash, inboxAcc, wasmModuleRoot] - ) -} - -const globalStateEquals = ( - globalState1: GlobalStateStruct, - globalState2: GlobalStateStruct -) => { - return ( - globalState1.bytes32Vals[0].toString() === - globalState2.bytes32Vals[0].toString() && - globalState1.bytes32Vals[1].toString() === - globalState2.bytes32Vals[1].toString() && - BigNumber.from(globalState1.u64Vals[0]).eq(globalState2.u64Vals[0]) && - BigNumber.from(globalState1.u64Vals[1]).eq(globalState2.u64Vals[1]) - ) -} - -export const executionStateEquals = ( - executionState1: ExecutionStateStruct, - executionState2: ExecutionStateStruct -) => { - return ( - globalStateEquals( - executionState1.globalState, - executionState2.globalState - ) && - BigNumber.from(executionState1.machineStatus).eq( - executionState2.machineStatus - ) - ) -} - -export const assertionEquals = ( - assertion1: AssertionStruct, - assertion2: AssertionStruct -) => { - return ( - executionStateEquals(assertion1.beforeState, assertion2.beforeState) && - executionStateEquals(assertion1.afterState, assertion2.afterState) && - BigNumber.from(assertion1.numBlocks).eq(assertion2.numBlocks) - ) -} - -export function executionStateHash( - e: ExecutionStateStruct, - inboxMaxCount: BigNumberish -) { - return ethers.utils.solidityKeccak256( - ['bytes32', 'uint256', 'uint8'], - [globalStateLib.hash(e.globalState), inboxMaxCount, e.machineStatus] - ) -} - -export function executionStructHash(e: ExecutionStateStruct) { - return ethers.utils.solidityKeccak256( - ['bytes32', 'uint8'], - [globalStateLib.hash(e.globalState), e.machineStatus] - ) -} - -export function assertionExecutionHash(a: AssertionStruct): BytesLike { - const seg0 = blockStateHash( - BigNumber.from(a.beforeState.machineStatus), - globalStateLib.hash(a.beforeState.globalState) - ) - const seg1 = blockStateHash( - BigNumber.from(a.afterState.machineStatus), - globalStateLib.hash(a.afterState.globalState) - ) - return hashChallengeState(BigNumber.from(0), BigNumber.from(a.numBlocks), [ - seg0, - seg1, - ]) -} - -async function nodeFromNodeCreatedLog( - blockNumber: number, - log: LogDescription -): Promise { - if (log.name != 'NodeCreated') { - throw Error('wrong event type') - } - const parsedEv = log.args as NodeCreatedEvent['args'] - - const node: Node = { - assertion: parsedEv.assertion, - nodeHash: parsedEv.nodeHash, - wasmModuleRoot: parsedEv.wasmModuleRoot, - nodeNum: parsedEv.nodeNum.toNumber(), - proposedBlock: blockNumber, - inboxMaxCount: parsedEv.inboxMaxCount, - } - return node -} - -async function nodeFromTx( - abi: Interface, - tx: ContractTransaction -): Promise { - const receipt = await tx.wait() - if (receipt.logs == undefined) { - throw Error('expected receipt to have logs') - } - const evs = receipt.logs - .map(log => { - try { - return abi.parseLog(log) - } catch (e) { - return undefined - } - }) - .filter(ev => ev && ev.name == 'NodeCreated') - if (evs.length != 1) { - throw Error('unique event not found') - } - - return nodeFromNodeCreatedLog(receipt.blockNumber, evs[0]!) -} - -export class RollupContract { - constructor(public rollup: RollupUserLogic) {} - - connect(signerOrProvider: Signer | Provider | string): RollupContract { - return new RollupContract(this.rollup.connect(signerOrProvider)) - } - - async stakeOnNewNode( - sequencerInbox: SequencerInbox, - parentNode: { - nodeHash: BytesLike - inboxMaxCount: BigNumber - }, - assertion: AssertionStruct, - siblingNode?: Node, - stakeToAdd?: BigNumber - ): Promise<{ - tx: ContractTransaction - node: Node - expectedNewNodeHash: BytesLike - }> { - const inboxPosition = BigNumber.from( - assertion.afterState.globalState.u64Vals[0] - ).toNumber() - const afterInboxAcc = - inboxPosition > 0 - ? await sequencerInbox.inboxAccs(inboxPosition - 1) - : constants.HashZero - const wasmModuleRoot = await this.rollup.wasmModuleRoot() - const newNodeHash = nodeHash( - Boolean(siblingNode), - (siblingNode || parentNode).nodeHash, - assertionExecutionHash(assertion), - afterInboxAcc, - wasmModuleRoot - ) - const tx = stakeToAdd - ? await this.rollup.newStakeOnNewNode( - assertion, - newNodeHash, - parentNode.inboxMaxCount, - { - value: stakeToAdd, - } - ) - : await this.rollup.stakeOnNewNode( - assertion, - newNodeHash, - parentNode.inboxMaxCount - ) - const node = await nodeFromTx(this.rollup.interface, tx) - return { tx, node, expectedNewNodeHash: newNodeHash } - } - - stakeOnExistingNode( - nodeNum: BigNumberish, - nodeHash: BytesLike - ): Promise { - return this.rollup.stakeOnExistingNode(nodeNum, nodeHash) - } - - confirmNextNode(node: Node): Promise { - return this.rollup.confirmNextNode( - node.assertion.afterState.globalState.bytes32Vals[0], - node.assertion.afterState.globalState.bytes32Vals[1] - ) - } - - fastConfirmNextNode(node: Node, nodeHash): Promise { - return this.rollup.fastConfirmNextNode( - node.assertion.afterState.globalState.bytes32Vals[0], - node.assertion.afterState.globalState.bytes32Vals[1], - nodeHash - ) - } - - rejectNextNode(stakerAddress: string): Promise { - return this.rollup.rejectNextNode(stakerAddress) - } - - async createChallenge( - staker1Address: string, - staker2Address: string, - node1: Node, - node2: Node - ): Promise { - return this.rollup.createChallenge( - [staker1Address, staker2Address], - [node1.nodeNum, node2.nodeNum], - [ - node1.assertion.beforeState.machineStatus, - node1.assertion.afterState.machineStatus, - ], - [ - node1.assertion.beforeState.globalState, - node1.assertion.afterState.globalState, - ], - node1.assertion.numBlocks, - assertionExecutionHash(node2.assertion), - [node1.proposedBlock, node2.proposedBlock], - [node1.wasmModuleRoot, node2.wasmModuleRoot] - ) - } - - addToDeposit( - staker: string, - overrides: PayableOverrides = {} - ): Promise { - return this.rollup.addToDeposit(staker, overrides) - } - - reduceDeposit(amount: BigNumberish): Promise { - return this.rollup.reduceDeposit(amount) - } - - returnOldDeposit(stakerAddress: string): Promise { - return this.rollup.returnOldDeposit(stakerAddress) - } - - latestConfirmed(): Promise { - return this.rollup.latestConfirmed() - } - - getNodeStateHash(index: BigNumberish): Promise { - return this.rollup.getNode(index).then(n => n.stateHash) - } - - latestStakedNode(staker: string): Promise { - return this.rollup.latestStakedNode(staker) - } - - currentRequiredStake(): Promise { - return this.rollup.currentRequiredStake() - } -} - -export async function forceCreateNode( - rollupAdmin: RollupAdminLogic, - sequencerInbox: SequencerInbox, - parentNode: Node, - assertion: AssertionStruct, - siblingNode?: Node -): Promise<{ tx: ContractTransaction; node: Node }> { - const inboxPosition = BigNumber.from( - assertion.afterState.globalState.u64Vals[0] - ).toNumber() - const afterInboxAcc = - inboxPosition > 0 - ? await sequencerInbox.inboxAccs(inboxPosition - 1) - : constants.HashZero - const wasmModuleRoot = await rollupAdmin.wasmModuleRoot() - const newNodeHash = nodeHash( - Boolean(siblingNode), - (siblingNode || parentNode).nodeHash, - assertionExecutionHash(assertion), - afterInboxAcc, - wasmModuleRoot - ) - const tx = await rollupAdmin.forceCreateNode( - parentNode.nodeNum, - parentNode.inboxMaxCount, - assertion, - newNodeHash - ) - const node = await nodeFromTx(rollupAdmin.interface, tx) - return { tx, node } -} diff --git a/test/contract/outboxOptimisation.spec.ts b/test/contract/outboxOptimisation.spec.ts index 7494d4bd..6b200066 100644 --- a/test/contract/outboxOptimisation.spec.ts +++ b/test/contract/outboxOptimisation.spec.ts @@ -48,7 +48,7 @@ const deployBehindProxy = async ( .connect(deployer) .deploy(instance.address, admin, dataToCallProxy) await proxy.deployed() - return instance.attach(proxy.address) + return instance.attach(proxy.address) as ReturnType } describe('Outbox', async function () { diff --git a/test/contract/sequencerInbox.spec.4844.ts b/test/contract/sequencerInbox.spec.4844.ts index c8752e74..b58713e1 100644 --- a/test/contract/sequencerInbox.spec.4844.ts +++ b/test/contract/sequencerInbox.spec.4844.ts @@ -232,6 +232,7 @@ describe('SequencerInbox', async () => { const seqInboxTemplate = await sequencerInboxFac.deploy( 117964, reader4844.address, + false, false ) const inboxFac = new Inbox__factory(deployer) @@ -275,12 +276,20 @@ describe('SequencerInbox', async () => { .connect(user) await (await bridgeAdmin.initialize(rollupMock.address)).wait() await ( - await sequencerInbox.initialize(bridgeProxy.address, { - delayBlocks: maxDelayBlocks, - delaySeconds: maxDelayTime, - futureBlocks: 10, - futureSeconds: 3000, - }) + await sequencerInbox.initialize( + bridgeProxy.address, + { + delayBlocks: maxDelayBlocks, + delaySeconds: maxDelayTime, + futureBlocks: 10, + futureSeconds: 3000, + }, + { + threshold: 0, + max: 0, + replenishRateInBasis: 0, + } + ) ).wait() const inbox = await inboxFac.attach(inboxProxy.address).connect(user) diff --git a/test/contract/sequencerInboxDelayBufferable.spec.ts b/test/contract/sequencerInboxDelayBufferable.spec.ts new file mode 100644 index 00000000..5f30a0bb --- /dev/null +++ b/test/contract/sequencerInboxDelayBufferable.spec.ts @@ -0,0 +1,1082 @@ +import { ethers, network } from 'hardhat' +import { Block } from '@ethersproject/providers' +import { data } from './batchData.json' +import { DelayedMsgDelivered } from './types' +import { expect } from 'chai' + +import { + getBatchSpendingReport, + setupSequencerInbox, + mineBlocks, + forceIncludeMessages, +} from './testHelpers' + +describe('SequencerInboxDelayBufferable', async () => { + it('can deplete buffer', async () => { + const { bridge, sequencerInbox, batchPoster, delayConfig, maxDelay } = + await setupSequencerInbox(true) + const delayedInboxPending: DelayedMsgDelivered[] = [] + let delayedMessageCount = await bridge.delayedMessageCount() + let seqReportedMessageSubCount = + await bridge.sequencerReportedSubMessageCount() + + expect(delayedMessageCount).to.equal(0) + expect(seqReportedMessageSubCount).to.equal(0) + expect(await sequencerInbox.isDelayBufferable()).to.be.true + + let delayBufferData = await sequencerInbox.buffer() + + // full buffers + expect(delayBufferData.bufferBlocks).to.equal(delayConfig.max) + + await ( + await sequencerInbox + .connect(batchPoster) + [ + 'addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)' + ]( + 0, + data, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + delayedMessageCount = await bridge.delayedMessageCount() + seqReportedMessageSubCount = await bridge.sequencerReportedSubMessageCount() + + expect(delayedMessageCount).to.equal(1) + expect(seqReportedMessageSubCount).to.equal(10) + expect(await sequencerInbox.totalDelayedMessagesRead()).to.equal(0) + + await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage, + 'ForceIncludeBlockTooSoon' + ) + + await mineBlocks(7200, 12) + + const txnReciept = await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage + ) + + let forceIncludedMsg = delayedInboxPending.shift() + const delayBlocks = + txnReciept!.blockNumber - + forceIncludedMsg!.delayedMessage.header.blockNumber + const unexpectedDelayBlocks = delayBlocks - delayConfig.threshold.toNumber() + const replenishAmount = Math.floor( + (delayBlocks * delayConfig.replenishRateInBasis) / 10000 + ) + + expect(await sequencerInbox.totalDelayedMessagesRead()).to.equal(1) + + delayBufferData = await sequencerInbox.buffer() + + // full + expect(delayBufferData.bufferBlocks).to.equal(delayConfig.max) + + expect(delayBufferData.prevBlockNumber).to.equal( + forceIncludedMsg?.delayedMessage.header.blockNumber + ) + expect(delayBufferData.prevSequencedBlockNumber).to.equal( + txnReciept!.blockNumber + ) + + await ( + await sequencerInbox + .connect(batchPoster) + [ + 'addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)' + ]( + 2, + data, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + await mineBlocks(7200, 12) + + const txnReciept2 = await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage + ) + forceIncludedMsg = delayedInboxPending.shift() + delayBufferData = await sequencerInbox.buffer() + + const depletedBufferBlocks = + delayConfig.max - unexpectedDelayBlocks + replenishAmount + expect(delayBufferData.bufferBlocks).to.equal(depletedBufferBlocks) + + expect(await sequencerInbox.totalDelayedMessagesRead()).to.equal(2) + + expect(delayBufferData.prevBlockNumber).to.equal( + forceIncludedMsg?.delayedMessage.header.blockNumber + ) + expect(delayBufferData.prevSequencedBlockNumber).to.equal( + txnReciept2!.blockNumber + ) + + const deadline = await sequencerInbox.forceInclusionDeadline( + delayBufferData.prevBlockNumber + ) + const delayBlocksDeadline = + depletedBufferBlocks > maxDelay.delayBlocks + ? maxDelay.delayBlocks + : depletedBufferBlocks + expect(deadline).to.equal( + delayBufferData.prevBlockNumber.add(delayBlocksDeadline) + ) + + const unexpectedDelayBlocks2 = delayBufferData.prevSequencedBlockNumber + .sub(delayBufferData.prevBlockNumber) + .sub(delayConfig.threshold) + .toNumber() + const delay = delayBufferData.prevSequencedBlockNumber.sub( + delayBufferData.prevBlockNumber + ) + const futureBlock = + forceIncludedMsg!.delayedMessage.header.blockNumber + delay.toNumber() + const replenishAmount2 = Math.floor( + (delay.toNumber() * delayConfig.replenishRateInBasis) / 10000 + ) + const deadline2 = await sequencerInbox.forceInclusionDeadline(futureBlock) + const calcBufferBlocks = + depletedBufferBlocks - unexpectedDelayBlocks2 > + delayConfig.threshold.toNumber() + ? depletedBufferBlocks - unexpectedDelayBlocks2 + replenishAmount2 + : delayConfig.threshold.toNumber() + const delayBlocksDeadline2 = + calcBufferBlocks > maxDelay.delayBlocks + ? maxDelay.delayBlocks + : calcBufferBlocks + expect(deadline2).to.equal(futureBlock + delayBlocksDeadline2) + }) + + it('can replenish buffer', async () => { + const { bridge, sequencerInbox, batchPoster, delayConfig } = + await setupSequencerInbox(true) + const delayedInboxPending: DelayedMsgDelivered[] = [] + let delayedMessageCount = await bridge.delayedMessageCount() + let seqReportedMessageSubCount = + await bridge.sequencerReportedSubMessageCount() + let delayBufferData = await sequencerInbox.buffer() + await ( + await sequencerInbox + .connect(batchPoster) + [ + 'addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)' + ]( + 0, + data, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + delayedMessageCount = await bridge.delayedMessageCount() + seqReportedMessageSubCount = await bridge.sequencerReportedSubMessageCount() + + await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage, + 'ForceIncludeBlockTooSoon' + ) + + await mineBlocks(7200, 12) + + await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage + ) + + await ( + await sequencerInbox + .connect(batchPoster) + [ + 'addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)' + ]( + 2, + data, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + const tx = sequencerInbox + .connect(batchPoster) + [ + 'addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)' + ]( + 3, + data, + delayedMessageCount.add(1), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(10), + seqReportedMessageSubCount.add(20), + { gasLimit: 10000000 } + ) + await expect(tx).to.be.revertedWith('DelayProofRequired') + + let nextDelayedMsg = delayedInboxPending.pop() + await mineBlocks(delayConfig.threshold.toNumber() - 100, 12) + + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromOriginDelayProof( + 3, + data, + delayedMessageCount.add(1), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(10), + seqReportedMessageSubCount.add(20), + { + beforeDelayedAcc: nextDelayedMsg!.delayedAcc, + delayedMessage: { + kind: nextDelayedMsg!.delayedMessage.header.kind, + sender: nextDelayedMsg!.delayedMessage.header.sender, + blockNumber: nextDelayedMsg!.delayedMessage.header.blockNumber, + timestamp: nextDelayedMsg!.delayedMessage.header.timestamp, + inboxSeqNum: nextDelayedMsg!.delayedCount, + baseFeeL1: nextDelayedMsg!.delayedMessage.header.baseFee, + messageDataHash: + nextDelayedMsg!.delayedMessage.header.messageDataHash, + }, + }, + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + delayBufferData = await sequencerInbox.buffer() + nextDelayedMsg = delayedInboxPending.pop() + + await mineBlocks(delayConfig.threshold.toNumber() - 100, 12) + + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromOriginDelayProof( + 4, + data, + delayedMessageCount.add(2), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(20), + seqReportedMessageSubCount.add(30), + { + beforeDelayedAcc: nextDelayedMsg!.delayedAcc, + delayedMessage: { + kind: nextDelayedMsg!.delayedMessage.header.kind, + sender: nextDelayedMsg!.delayedMessage.header.sender, + blockNumber: nextDelayedMsg!.delayedMessage.header.blockNumber, + timestamp: nextDelayedMsg!.delayedMessage.header.timestamp, + inboxSeqNum: nextDelayedMsg!.delayedCount, + baseFeeL1: nextDelayedMsg!.delayedMessage.header.baseFee, + messageDataHash: + nextDelayedMsg!.delayedMessage.header.messageDataHash, + }, + }, + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + return res + }) + + const delayBufferData2 = await sequencerInbox.buffer() + const replenishBlocks = Math.floor( + ((nextDelayedMsg!.delayedMessage.header.blockNumber - + delayBufferData.prevBlockNumber.toNumber()) * + delayConfig.replenishRateInBasis) / + 10000 + ) + expect(delayBufferData2.bufferBlocks.toNumber()).to.equal( + delayBufferData.bufferBlocks.toNumber() + replenishBlocks + ) + }) + + it('happy path', async () => { + const { bridge, sequencerInbox, batchPoster, delayConfig } = + await setupSequencerInbox(true) + const delayedInboxPending: DelayedMsgDelivered[] = [] + const delayedMessageCount = await bridge.delayedMessageCount() + const seqReportedMessageSubCount = + await bridge.sequencerReportedSubMessageCount() + + const block = (await network.provider.send('eth_getBlockByNumber', [ + 'latest', + false, + ])) as Block + const blockNumber = Number.parseInt(block.number.toString(10)) + expect( + blockNumber - (await sequencerInbox.buffer()).prevBlockNumber.toNumber() + ).lessThanOrEqual((await sequencerInbox.buffer()).threshold.toNumber()) + await ( + await sequencerInbox + .connect(batchPoster) + [ + 'addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)' + ]( + 0, + data, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + await mineBlocks(delayConfig.threshold.toNumber() - 100, 12) + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromOriginDelayProof( + 1, + data, + delayedMessageCount.add(1), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(10), + seqReportedMessageSubCount.add(20), + { + beforeDelayedAcc: delayedInboxPending[0].delayedAcc, + delayedMessage: { + kind: delayedInboxPending[0].delayedMessage.header.kind, + sender: delayedInboxPending[0].delayedMessage.header.sender, + blockNumber: + delayedInboxPending[0].delayedMessage.header.blockNumber, + timestamp: delayedInboxPending[0].delayedMessage.header.timestamp, + inboxSeqNum: delayedInboxPending[0].delayedCount, + baseFeeL1: delayedInboxPending[0].delayedMessage.header.baseFee, + messageDataHash: + delayedInboxPending[0].delayedMessage.header.messageDataHash, + }, + }, + { gasLimit: 10000000 } + ) + ).wait() + + // sequencerReportedSubMessageCount + expect(await bridge.sequencerReportedSubMessageCount()).to.equal(20) + //seqMessageIndex + expect(await bridge.sequencerMessageCount()).to.equal(2) + }) + + it('unhappy path', async () => { + const { bridge, sequencerInbox, batchPoster, delayConfig } = + await setupSequencerInbox(true) + let delayedInboxPending: DelayedMsgDelivered[] = [] + const delayedMessageCount = await bridge.delayedMessageCount() + const seqReportedMessageSubCount = + await bridge.sequencerReportedSubMessageCount() + + const block = (await network.provider.send('eth_getBlockByNumber', [ + 'latest', + false, + ])) as Block + const blockNumber = Number.parseInt(block.number.toString(10)) + expect( + blockNumber - (await sequencerInbox.buffer()).prevBlockNumber.toNumber() + ).lessThanOrEqual((await sequencerInbox.buffer()).threshold.toNumber()) + await ( + await sequencerInbox + .connect(batchPoster) + [ + 'addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)' + ]( + 0, + data, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + await mineBlocks(delayConfig.threshold.toNumber() - 100, 12) + await ( + await sequencerInbox + .connect(batchPoster) + [ + 'addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)' + ]( + 1, + data, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(10), + seqReportedMessageSubCount.add(20), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + let firstReadMsg = delayedInboxPending[0] + await mineBlocks(101, 12) + + const txn = sequencerInbox + .connect(batchPoster) + [ + 'addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)' + ]( + 2, + data, + delayedMessageCount.add(2), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(20), + seqReportedMessageSubCount.add(30), + { gasLimit: 10000000 } + ) + await expect(txn).to.be.revertedWith('DelayProofRequired') + + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromOriginDelayProof( + 2, + data, + delayedMessageCount.add(2), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(20), + seqReportedMessageSubCount.add(30), + { + beforeDelayedAcc: firstReadMsg!.delayedAcc, + delayedMessage: { + kind: firstReadMsg!.delayedMessage.header.kind, + sender: firstReadMsg!.delayedMessage.header.sender, + blockNumber: firstReadMsg!.delayedMessage.header.blockNumber, + timestamp: firstReadMsg!.delayedMessage.header.timestamp, + inboxSeqNum: firstReadMsg!.delayedCount, + baseFeeL1: firstReadMsg!.delayedMessage.header.baseFee, + messageDataHash: + firstReadMsg!.delayedMessage.header.messageDataHash, + }, + }, + { gasLimit: 10000000 } + ) + ) + .wait() + .then(async res => { + delayedInboxPending = [] + delayedInboxPending.push(getBatchSpendingReport(res)) + return res + }) + + const delayBufferDataBefore = await sequencerInbox.buffer() + firstReadMsg = delayedInboxPending[0] + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromOriginDelayProof( + 3, + data, + delayedMessageCount.add(3), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(30), + seqReportedMessageSubCount.add(40), + { + beforeDelayedAcc: firstReadMsg!.delayedAcc, + delayedMessage: { + kind: firstReadMsg!.delayedMessage.header.kind, + sender: firstReadMsg!.delayedMessage.header.sender, + blockNumber: firstReadMsg!.delayedMessage.header.blockNumber, + timestamp: firstReadMsg!.delayedMessage.header.timestamp, + inboxSeqNum: firstReadMsg!.delayedCount, + baseFeeL1: firstReadMsg!.delayedMessage.header.baseFee, + messageDataHash: + firstReadMsg!.delayedMessage.header.messageDataHash, + }, + }, + { gasLimit: 10000000 } + ) + ) + .wait() + .then(async res => { + delayedInboxPending = [] + delayedInboxPending.push(getBatchSpendingReport(res)) + return res + }) + + const unexpectedDelayBlocks = + delayBufferDataBefore.prevSequencedBlockNumber.toNumber() - + delayBufferDataBefore.prevBlockNumber.toNumber() - + delayConfig.threshold.toNumber() + const elapsed = + firstReadMsg!.delayedMessage.header.blockNumber - + delayBufferDataBefore.prevBlockNumber.toNumber() + const replenishAmount = Math.floor( + (elapsed * delayConfig.replenishRateInBasis) / 10000 + ) + const bufferBlocksUpdate = + delayBufferDataBefore.bufferBlocks.toNumber() - + Math.min(unexpectedDelayBlocks, elapsed) + + replenishAmount + expect((await sequencerInbox.buffer()).bufferBlocks).to.equal( + Math.min(bufferBlocksUpdate, delayConfig.max) + ) + }) +}) + +describe('SequencerInboxDelayBufferableBlobMock', async () => { + it('can deplete buffer', async () => { + const { bridge, sequencerInbox, batchPoster, delayConfig, maxDelay } = + await setupSequencerInbox(true, true) + const delayedInboxPending: DelayedMsgDelivered[] = [] + let delayedMessageCount = await bridge.delayedMessageCount() + let seqReportedMessageSubCount = + await bridge.sequencerReportedSubMessageCount() + + expect(delayedMessageCount).to.equal(0) + expect(seqReportedMessageSubCount).to.equal(0) + expect(await sequencerInbox.isDelayBufferable()).to.be.true + + let delayBufferData = await sequencerInbox.buffer() + + // full buffer + expect(delayBufferData.bufferBlocks).to.equal(delayConfig.max) + + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 0, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + delayedMessageCount = await bridge.delayedMessageCount() + seqReportedMessageSubCount = await bridge.sequencerReportedSubMessageCount() + + expect(delayedMessageCount).to.equal(1) + expect(seqReportedMessageSubCount).to.equal(10) + expect(await sequencerInbox.totalDelayedMessagesRead()).to.equal(0) + + await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage, + 'ForceIncludeBlockTooSoon' + ) + + await mineBlocks(7200, 12) + + const txnReciept = await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage + ) + + let forceIncludedMsg = delayedInboxPending.pop() + const delayBlocks = + txnReciept!.blockNumber - + forceIncludedMsg!.delayedMessage.header.blockNumber + const unexpectedDelayBlocks = delayBlocks - delayConfig.threshold.toNumber() + const replenishAmount = Math.floor( + (delayBlocks * delayConfig.replenishRateInBasis) / 10000 + ) + + expect(await sequencerInbox.totalDelayedMessagesRead()).to.equal(1) + + delayBufferData = await sequencerInbox.buffer() + + // full + expect(delayBufferData.bufferBlocks).to.equal(delayConfig.max) + + expect(delayBufferData.prevBlockNumber).to.equal( + forceIncludedMsg?.delayedMessage.header.blockNumber + ) + + expect(delayBufferData.prevSequencedBlockNumber).to.equal( + txnReciept!.blockNumber + ) + + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 2, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + await mineBlocks(7200, 12) + + const txnReciept2 = await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage + ) + forceIncludedMsg = delayedInboxPending.pop() + delayBufferData = await sequencerInbox.buffer() + + const depletedBufferBlocks = + delayConfig.max - unexpectedDelayBlocks + replenishAmount + expect(delayBufferData.bufferBlocks).to.equal(depletedBufferBlocks) + + expect(await sequencerInbox.totalDelayedMessagesRead()).to.equal(2) + + expect(delayBufferData.prevBlockNumber).to.equal( + forceIncludedMsg?.delayedMessage.header.blockNumber + ) + expect(delayBufferData.prevSequencedBlockNumber).to.equal( + txnReciept2!.blockNumber + ) + + const deadline = await sequencerInbox.forceInclusionDeadline( + delayBufferData.prevBlockNumber + ) + const delayBlocksDeadline = + depletedBufferBlocks > maxDelay.delayBlocks + ? maxDelay.delayBlocks + : depletedBufferBlocks + expect(deadline).to.equal( + delayBufferData.prevBlockNumber.add(delayBlocksDeadline) + ) + const delay = delayBufferData.prevSequencedBlockNumber.sub( + delayBufferData.prevBlockNumber + ) + const unexpectedDelayBlocks2 = delay.sub(delayConfig.threshold).toNumber() + const futureBlock = + forceIncludedMsg!.delayedMessage.header.blockNumber + delay.toNumber() + const deadline2 = await sequencerInbox.forceInclusionDeadline(futureBlock) + const replenishAmount2 = Math.floor( + (delay.toNumber() * delayConfig.replenishRateInBasis) / 10000 + ) + const calcBufferBlocks = + depletedBufferBlocks - unexpectedDelayBlocks2 > + delayConfig.threshold.toNumber() + ? depletedBufferBlocks - unexpectedDelayBlocks2 + replenishAmount2 + : delayConfig.threshold.toNumber() + const delayBlocksDeadline2 = + calcBufferBlocks > maxDelay.delayBlocks + ? maxDelay.delayBlocks + : calcBufferBlocks + expect(deadline2).to.equal(futureBlock + delayBlocksDeadline2) + }) + + it('can replenish buffer', async () => { + const { bridge, sequencerInbox, batchPoster, delayConfig } = + await setupSequencerInbox(true, true) + const delayedInboxPending: DelayedMsgDelivered[] = [] + let delayedMessageCount = await bridge.delayedMessageCount() + let seqReportedMessageSubCount = + await bridge.sequencerReportedSubMessageCount() + let delayBufferData = await sequencerInbox.buffer() + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 0, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + delayedMessageCount = await bridge.delayedMessageCount() + seqReportedMessageSubCount = await bridge.sequencerReportedSubMessageCount() + + await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage, + 'ForceIncludeBlockTooSoon' + ) + + await mineBlocks(7200, 12) + + await forceIncludeMessages( + sequencerInbox, + delayedInboxPending[0].delayedCount + 1, + delayedInboxPending[0].delayedMessage + ) + + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 2, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + const tx = sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 3, + delayedMessageCount.add(1), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(10), + seqReportedMessageSubCount.add(20), + { gasLimit: 10000000 } + ) + await expect(tx).to.be.revertedWith('DelayProofRequired') + + let nextDelayedMsg = delayedInboxPending.pop() + await mineBlocks(delayConfig.threshold.toNumber() - 100, 12) + + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobsDelayProof( + 3, + delayedMessageCount.add(1), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(10), + seqReportedMessageSubCount.add(20), + { + beforeDelayedAcc: nextDelayedMsg!.delayedAcc, + delayedMessage: { + kind: nextDelayedMsg!.delayedMessage.header.kind, + sender: nextDelayedMsg!.delayedMessage.header.sender, + blockNumber: nextDelayedMsg!.delayedMessage.header.blockNumber, + timestamp: nextDelayedMsg!.delayedMessage.header.timestamp, + inboxSeqNum: nextDelayedMsg!.delayedCount, + baseFeeL1: nextDelayedMsg!.delayedMessage.header.baseFee, + messageDataHash: + nextDelayedMsg!.delayedMessage.header.messageDataHash, + }, + }, + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + delayBufferData = await sequencerInbox.buffer() + nextDelayedMsg = delayedInboxPending.pop() + + await mineBlocks(delayConfig.threshold.toNumber() - 100, 12) + + await ( + await sequencerInbox + .connect(batchPoster) + .connect(batchPoster) + .addSequencerL2BatchFromBlobsDelayProof( + 4, + delayedMessageCount.add(2), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(20), + seqReportedMessageSubCount.add(30), + { + beforeDelayedAcc: nextDelayedMsg!.delayedAcc, + delayedMessage: { + kind: nextDelayedMsg!.delayedMessage.header.kind, + sender: nextDelayedMsg!.delayedMessage.header.sender, + blockNumber: nextDelayedMsg!.delayedMessage.header.blockNumber, + timestamp: nextDelayedMsg!.delayedMessage.header.timestamp, + inboxSeqNum: nextDelayedMsg!.delayedCount, + baseFeeL1: nextDelayedMsg!.delayedMessage.header.baseFee, + messageDataHash: + nextDelayedMsg!.delayedMessage.header.messageDataHash, + }, + }, + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + return res + }) + + const delayBufferData2 = await sequencerInbox.buffer() + const replenishBlocks = Math.floor( + ((nextDelayedMsg!.delayedMessage.header.blockNumber - + delayBufferData.prevBlockNumber.toNumber()) * + delayConfig.replenishRateInBasis) / + 10000 + ) + expect(delayBufferData2.bufferBlocks.toNumber()).to.equal( + delayBufferData.bufferBlocks.toNumber() + replenishBlocks + ) + }) + + it('happy path', async () => { + const { bridge, sequencerInbox, batchPoster, delayConfig } = + await setupSequencerInbox(true, true) + const delayedInboxPending: DelayedMsgDelivered[] = [] + const delayedMessageCount = await bridge.delayedMessageCount() + const seqReportedMessageSubCount = + await bridge.sequencerReportedSubMessageCount() + + const block = (await network.provider.send('eth_getBlockByNumber', [ + 'latest', + false, + ])) as Block + const blockNumber = Number.parseInt(block.number.toString(10)) + expect( + blockNumber - (await sequencerInbox.buffer()).prevBlockNumber.toNumber() + ).lessThanOrEqual((await sequencerInbox.buffer()).threshold.toNumber()) + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 0, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + await mineBlocks(delayConfig.threshold.toNumber() - 100, 12) + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 1, + delayedMessageCount.add(1), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(10), + seqReportedMessageSubCount.add(20), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + return res + }) + }) + + it('unhappy path', async () => { + const { bridge, sequencerInbox, batchPoster, delayConfig } = + await setupSequencerInbox(true, true) + let delayedInboxPending: DelayedMsgDelivered[] = [] + const delayedMessageCount = await bridge.delayedMessageCount() + const seqReportedMessageSubCount = + await bridge.sequencerReportedSubMessageCount() + + const block = (await network.provider.send('eth_getBlockByNumber', [ + 'latest', + false, + ])) as Block + const blockNumber = Number.parseInt(block.number.toString(10)) + expect( + blockNumber - (await sequencerInbox.buffer()).prevBlockNumber.toNumber() + ).lessThanOrEqual((await sequencerInbox.buffer()).threshold.toNumber()) + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 0, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount, + seqReportedMessageSubCount.add(10), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + await mineBlocks(delayConfig.threshold.toNumber() - 100, 12) + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 1, + delayedMessageCount, + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(10), + seqReportedMessageSubCount.add(20), + { gasLimit: 10000000 } + ) + ) + .wait() + .then(res => { + delayedInboxPending.push(getBatchSpendingReport(res)) + }) + + let firstReadMsg = delayedInboxPending[0] + await mineBlocks(101, 12) + + const txn = sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobs( + 2, + delayedMessageCount.add(2), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(20), + seqReportedMessageSubCount.add(30), + { gasLimit: 10000000 } + ) + await expect(txn).to.be.revertedWith('DelayProofRequired') + + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobsDelayProof( + 2, + delayedMessageCount.add(2), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(20), + seqReportedMessageSubCount.add(30), + { + beforeDelayedAcc: firstReadMsg!.delayedAcc, + delayedMessage: { + kind: firstReadMsg!.delayedMessage.header.kind, + sender: firstReadMsg!.delayedMessage.header.sender, + blockNumber: firstReadMsg!.delayedMessage.header.blockNumber, + timestamp: firstReadMsg!.delayedMessage.header.timestamp, + inboxSeqNum: firstReadMsg!.delayedCount, + baseFeeL1: firstReadMsg!.delayedMessage.header.baseFee, + messageDataHash: + firstReadMsg!.delayedMessage.header.messageDataHash, + }, + }, + { gasLimit: 10000000 } + ) + ) + .wait() + .then(async res => { + delayedInboxPending = [] + delayedInboxPending.push(getBatchSpendingReport(res)) + return res + }) + + const delayBufferDataBefore = await sequencerInbox.buffer() + firstReadMsg = delayedInboxPending[0] + await ( + await sequencerInbox + .connect(batchPoster) + .addSequencerL2BatchFromBlobsDelayProof( + 3, + delayedMessageCount.add(3), + ethers.constants.AddressZero, + seqReportedMessageSubCount.add(30), + seqReportedMessageSubCount.add(40), + { + beforeDelayedAcc: firstReadMsg!.delayedAcc, + delayedMessage: { + kind: firstReadMsg!.delayedMessage.header.kind, + sender: firstReadMsg!.delayedMessage.header.sender, + blockNumber: firstReadMsg!.delayedMessage.header.blockNumber, + timestamp: firstReadMsg!.delayedMessage.header.timestamp, + inboxSeqNum: firstReadMsg!.delayedCount, + baseFeeL1: firstReadMsg!.delayedMessage.header.baseFee, + messageDataHash: + firstReadMsg!.delayedMessage.header.messageDataHash, + }, + }, + { gasLimit: 10000000 } + ) + ) + .wait() + .then(async res => { + delayedInboxPending = [] + delayedInboxPending.push(getBatchSpendingReport(res)) + return res + }) + + const unexpectedDelayBlocks = + delayBufferDataBefore.prevSequencedBlockNumber.toNumber() - + delayBufferDataBefore.prevBlockNumber.toNumber() - + delayConfig.threshold.toNumber() + const elapsed = + firstReadMsg!.delayedMessage.header.blockNumber - + delayBufferDataBefore.prevBlockNumber.toNumber() + const replenishAmount = Math.floor( + (elapsed * delayConfig.replenishRateInBasis) / 10000 + ) + const bufferBlocksUpdate = + delayBufferDataBefore.bufferBlocks.toNumber() - + Math.min(unexpectedDelayBlocks, elapsed) + + replenishAmount + expect((await sequencerInbox.buffer()).bufferBlocks).to.equal( + Math.min(bufferBlocksUpdate, delayConfig.max) + ) + }) +}) diff --git a/test/contract/sequencerInboxForceInclude.spec.ts b/test/contract/sequencerInboxForceInclude.spec.ts index fcaf2055..1d99a46c 100644 --- a/test/contract/sequencerInboxForceInclude.spec.ts +++ b/test/contract/sequencerInboxForceInclude.spec.ts @@ -237,6 +237,7 @@ describe('SequencerInboxForceInclude', async () => { const seqInboxTemplate = await sequencerInboxFac.deploy( 117964, reader4844.address, + false, false ) const inboxFac = (await ethers.getContractFactory( @@ -275,12 +276,20 @@ describe('SequencerInboxForceInclude', async () => { .connect(user) await bridge.initialize(rollup.address) - await sequencerInbox.initialize(bridgeProxy.address, { - delayBlocks: maxDelayBlocks, - delaySeconds: maxDelayTime, - futureBlocks: 10, - futureSeconds: 3000, - }) + await sequencerInbox.initialize( + bridgeProxy.address, + { + delayBlocks: maxDelayBlocks, + delaySeconds: maxDelayTime, + futureBlocks: 10, + futureSeconds: 3000, + }, + { + threshold: 0, + max: 0, + replenishRateInBasis: 0, + } + ) await ( await sequencerInbox @@ -575,40 +584,6 @@ describe('SequencerInboxForceInclude', async () => { ) }) - it('cannot include before max time delay', async () => { - const { user, inbox, bridge, messageTester, sequencerInbox } = - await setupSequencerInbox(10, 100) - const delayedTx = await sendDelayedTx( - user, - inbox, - bridge, - messageTester, - 1000000, - 21000000000, - 0, - await user.getAddress(), - BigNumber.from(10), - '0x1010' - ) - - const [delayBlocks, , ,] = await sequencerInbox.maxTimeVariation() - // mine a lot of blocks - but use a short time per block - // this should mean enough blocks have passed, but not enough time - await mineBlocks(delayBlocks.toNumber() + 1, 5) - - await forceIncludeMessages( - sequencerInbox, - delayedTx.inboxAccountLength, - delayedTx.deliveredMessageEvent.kind, - delayedTx.l1BlockNumber, - delayedTx.l1BlockTimestamp, - delayedTx.baseFeeL1, - delayedTx.senderAddr, - delayedTx.deliveredMessageEvent.messageDataHash, - 'ForceIncludeTimeTooSoon' - ) - }) - it('should fail to call sendL1FundedUnsignedTransactionToFork', async function () { const { inbox } = await setupSequencerInbox() await expect( diff --git a/test/contract/testHelpers.ts b/test/contract/testHelpers.ts new file mode 100644 index 00000000..7e6ae008 --- /dev/null +++ b/test/contract/testHelpers.ts @@ -0,0 +1,400 @@ +import { ethers, network } from 'hardhat' +import { BigNumber } from '@ethersproject/bignumber' +import { Block, TransactionReceipt } from '@ethersproject/providers' +import { expect } from 'chai' +import { + Bridge, + Bridge__factory, + Inbox, + Inbox__factory, + MessageTester, + RollupMock__factory, + SequencerInbox, + SequencerInbox__factory, + TransparentUpgradeableProxy__factory, +} from '../../build/types' +import { applyAlias, initializeAccounts } from './utils' +import { Event } from '@ethersproject/contracts' +import { Interface } from '@ethersproject/abi' +import { + BridgeInterface, + MessageDeliveredEvent, +} from '../../build/types/src/bridge/Bridge' +import { + SequencerBatchDeliveredEvent, + SequencerInboxInterface, +} from '../../build/types/src/bridge/SequencerInbox' +import { ContractReceipt, Signer } from 'ethers' +import { + DelayedMsg, + DelayedMsgDelivered, + MaxTimeVariation, + DelayConfig, +} from './types' +import { solidityPack } from 'ethers/lib/utils' +import { + InboxInterface, + InboxMessageDeliveredEvent, +} from '../../build/types/src/bridge/Inbox' +import { Toolkit4844 } from './toolkit4844' + +export const mineBlocks = async (count: number, timeDiffPerBlock = 14) => { + const block = (await network.provider.send('eth_getBlockByNumber', [ + 'latest', + false, + ])) as Block + let timestamp = BigNumber.from(block.timestamp).toNumber() + for (let i = 0; i < count; i++) { + timestamp = timestamp + timeDiffPerBlock + await network.provider.send('evm_mine', [timestamp]) + } +} + +export const getMessageDeliveredEvents = (receipt: TransactionReceipt) => { + const bridgeInterface = Bridge__factory.createInterface() + return findMatchingLogs( + receipt, + bridgeInterface, + i => i.getEventTopic(i.getEvent('MessageDelivered')) + ) +} + +export const getInboxMessageDeliveredEvents = (receipt: TransactionReceipt) => { + const inboxInterface = Inbox__factory.createInterface() + return findMatchingLogs( + receipt, + inboxInterface, + i => i.getEventTopic(i.getEvent('InboxMessageDelivered')) + ) +} + +const findMatchingLogs = ( + receipt: TransactionReceipt, + iFace: TInterface, + eventTopicGen: (i: TInterface) => string +): TEvent['args'][] => { + const logs = receipt.logs.filter( + log => log.topics[0] === eventTopicGen(iFace) + ) + return logs.map(l => iFace.parseLog(l).args as TEvent['args']) +} + +export const getBatchSpendingReport = ( + receipt: TransactionReceipt +): DelayedMsgDelivered => { + const res = getMessageDeliveredEvents(receipt) + return { + delayedMessage: { + header: { + kind: res[0].kind, + sender: res[0].sender, + blockNumber: receipt.blockNumber, + timestamp: Number(res[0].timestamp), + totalDelayedMessagesRead: Number(res[0].messageIndex), + baseFee: Number(res[0].baseFeeL1), + messageDataHash: res[0].messageDataHash, + }, + //spendingReportMsg = abi.encodePacked(block.timestamp, batchPoster, dataHash, seqMessageIndex, block.basefee ); + messageData: solidityPack( + ['uint256', 'address', 'bytes32', 'uint256', 'uint256'], + [ + res[0].timestamp, + res[0].sender, + res[0].messageDataHash, + res[0].messageIndex, + res[0].baseFeeL1, + ] + ), + }, + delayedAcc: res[0].beforeInboxAcc, + delayedCount: Number(res[0].messageIndex), + } +} + +export const sendDelayedTx = async ( + sender: Signer, + inbox: Inbox, + bridge: Bridge, + messageTester: MessageTester, + l2Gas: number, + l2GasPrice: number, + nonce: number, + destAddr: string, + amount: BigNumber, + data: string +) => { + const countBefore = ( + await bridge.functions.delayedMessageCount() + )[0].toNumber() + const sendUnsignedTx = await inbox + .connect(sender) + .sendUnsignedTransaction(l2Gas, l2GasPrice, nonce, destAddr, amount, data) + const sendUnsignedTxReceipt = await sendUnsignedTx.wait() + + const countAfter = ( + await bridge.functions.delayedMessageCount() + )[0].toNumber() + expect(countAfter, 'Unexpected inbox count').to.eq(countBefore + 1) + + const senderAddr = applyAlias(await sender.getAddress()) + + const messageDeliveredEvent = getMessageDeliveredEvents( + sendUnsignedTxReceipt + )[0] + const l1BlockNumber = sendUnsignedTxReceipt.blockNumber + const blockL1 = await sender.provider!.getBlock(l1BlockNumber) + const baseFeeL1 = blockL1.baseFeePerGas!.toNumber() + const l1BlockTimestamp = blockL1.timestamp + const delayedAcc = await bridge.delayedInboxAccs(countBefore) + + // need to hex pad the address + const messageDataHash = ethers.utils.solidityKeccak256( + ['uint8', 'uint256', 'uint256', 'uint256', 'uint256', 'uint256', 'bytes'], + [ + 0, + l2Gas, + l2GasPrice, + nonce, + ethers.utils.hexZeroPad(destAddr, 32), + amount, + data, + ] + ) + expect( + messageDeliveredEvent.messageDataHash, + 'Incorrect messageDataHash' + ).to.eq(messageDataHash) + + const messageHash = ( + await messageTester.functions.messageHash( + 3, + senderAddr, + l1BlockNumber, + l1BlockTimestamp, + countBefore, + baseFeeL1, + messageDataHash + ) + )[0] + + const prevAccumulator = messageDeliveredEvent.beforeInboxAcc + expect(prevAccumulator, 'Incorrect prev accumulator').to.eq( + countBefore === 0 + ? ethers.utils.hexZeroPad('0x', 32) + : await bridge.delayedInboxAccs(countBefore - 1) + ) + + const nextAcc = ( + await messageTester.functions.accumulateInboxMessage( + prevAccumulator, + messageHash + ) + )[0] + + expect(delayedAcc, 'Incorrect delayed acc').to.eq(nextAcc) + + const msgData = ethers.utils.solidityPack( + ['uint8', 'uint256', 'uint256', 'uint256', 'uint256', 'uint256', 'bytes'], + [ + 0, + l2Gas, + l2GasPrice, + nonce, + ethers.utils.hexZeroPad(destAddr, 32), + amount, + data, + ] + ) + + const delayedMsg: DelayedMsg = { + header: { + kind: 3, + sender: senderAddr, + blockNumber: l1BlockNumber, + timestamp: l1BlockTimestamp, + totalDelayedMessagesRead: countBefore, + baseFee: baseFeeL1, + messageDataHash: messageDataHash, + }, + messageData: msgData, + } + + return { + countBefore, + delayedMsg, + prevAccumulator, + inboxAccountLength: countAfter, + } +} + +export const forceIncludeMessages = async ( + sequencerInbox: SequencerInbox, + newTotalDelayedMessagesRead: number, + delayedMessage: DelayedMsg, + expectedErrorType?: string +): Promise => { + const inboxLengthBefore = (await sequencerInbox.batchCount()).toNumber() + + const forceInclusionTx = sequencerInbox.forceInclusion( + newTotalDelayedMessagesRead, + delayedMessage.header.kind, + [delayedMessage.header.blockNumber, delayedMessage.header.timestamp], + delayedMessage.header.baseFee, + delayedMessage.header.sender, + delayedMessage.header.messageDataHash + ) + if (expectedErrorType) { + await expect(forceInclusionTx).to.be.revertedWith(`${expectedErrorType}`) + } else { + const txnReciept = await (await forceInclusionTx).wait() + const totalDelayedMessagsReadAfter = ( + await sequencerInbox.totalDelayedMessagesRead() + ).toNumber() + expect( + totalDelayedMessagsReadAfter, + 'Incorrect totalDelayedMessagesRead after.' + ).to.eq(newTotalDelayedMessagesRead) + const inboxLengthAfter = (await sequencerInbox.batchCount()).toNumber() + expect(inboxLengthAfter - inboxLengthBefore, 'Inbox not incremented').to.eq( + 1 + ) + return txnReciept + } +} + +const maxDelayDefault: MaxTimeVariation = { + delayBlocks: (60 * 60 * 24) / 12, + delaySeconds: 60 * 60 * 24, + futureBlocks: 32 * 2, + futureSeconds: 12 * 32 * 2, +} + +const delayConfigDefault: DelayConfig = { + threshold: BigNumber.from((2 * 60 * 60) / 12), + max: maxDelayDefault.delayBlocks * 2, + replenishRateInBasis: 714, +} + +export const getSequencerBatchDeliveredEvents = ( + receipt: TransactionReceipt +) => { + const seqInterface = SequencerInbox__factory.createInterface() + return findMatchingLogs< + SequencerInboxInterface, + SequencerBatchDeliveredEvent + >(receipt, seqInterface, i => + i.getEventTopic(i.getEvent('SequencerBatchDelivered')) + )[0] as SequencerBatchDeliveredEvent['args'] +} + +export const setupSequencerInbox = async ( + isDelayBufferable = false, + isBlobMock = false, + maxDelay: MaxTimeVariation = maxDelayDefault, + delayConfig: DelayConfig = delayConfigDefault +) => { + const accounts = await initializeAccounts() + const admin = accounts[0] + const adminAddr = await admin.getAddress() + const user = accounts[1] + const rollupOwner = accounts[2] + const batchPoster = accounts[3] + const batchPosterManager = accounts[4] + + const rollupMockFac = (await ethers.getContractFactory( + 'RollupMock' + )) as RollupMock__factory + const rollup = await rollupMockFac.deploy(await rollupOwner.getAddress()) + const reader4844 = await Toolkit4844.deployReader4844(admin) + const sequencerInboxFac = (await ethers.getContractFactory( + isBlobMock ? 'SequencerInboxBlobMock' : 'SequencerInbox' + )) as SequencerInbox__factory + const seqInboxTemplate = await sequencerInboxFac.deploy( + 117964, + reader4844.address, + false, + isDelayBufferable + ) + const inboxFac = (await ethers.getContractFactory('Inbox')) as Inbox__factory + const inboxTemplate = await inboxFac.deploy(117964) + const bridgeFac = (await ethers.getContractFactory( + 'Bridge' + )) as Bridge__factory + const bridgeTemplate = await bridgeFac.deploy() + const transparentUpgradeableProxyFac = (await ethers.getContractFactory( + 'TransparentUpgradeableProxy' + )) as TransparentUpgradeableProxy__factory + + const bridgeProxy = await transparentUpgradeableProxyFac.deploy( + bridgeTemplate.address, + adminAddr, + '0x' + ) + const sequencerInboxProxy = await transparentUpgradeableProxyFac.deploy( + seqInboxTemplate.address, + adminAddr, + '0x' + ) + const inboxProxy = await transparentUpgradeableProxyFac.deploy( + inboxTemplate.address, + adminAddr, + '0x' + ) + const bridge = await bridgeFac.attach(bridgeProxy.address).connect(user) + const sequencerInbox = await sequencerInboxFac + .attach(sequencerInboxProxy.address) + .connect(user) + const bridgeAdmin = await bridgeFac + .attach(bridgeProxy.address) + .connect(rollupOwner) + await bridge.initialize(rollup.address) + await sequencerInbox.initialize( + bridgeProxy.address, + maxDelay, + delayConfigDefault + ) + await ( + await sequencerInbox + .connect(rollupOwner) + .setIsBatchPoster(await batchPoster.getAddress(), true) + ).wait() + + await ( + await sequencerInbox + .connect(rollupOwner) + .setBatchPosterManager(await batchPosterManager.getAddress()) + ).wait() + + const inbox = await inboxFac.attach(inboxProxy.address).connect(user) + + await inbox.initialize(bridgeProxy.address, sequencerInbox.address) + + await bridgeAdmin.setDelayedInbox(inbox.address, true) + await bridgeAdmin.setSequencerInbox(sequencerInbox.address) + + await ( + await sequencerInbox + .connect(rollupOwner) + .setIsBatchPoster(await batchPoster.getAddress(), true) + ).wait() + + const messageTester = (await ( + await ethers.getContractFactory('MessageTester') + ).deploy()) as MessageTester + + return { + user, + bridge: bridge, + inbox: inbox, + sequencerInbox: sequencerInbox as SequencerInbox, + messageTester, + inboxProxy, + inboxTemplate, + batchPoster, + bridgeProxy, + rollup, + rollupOwner, + maxDelay, + delayConfig, + } +} diff --git a/test/contract/types.ts b/test/contract/types.ts new file mode 100644 index 00000000..051826fd --- /dev/null +++ b/test/contract/types.ts @@ -0,0 +1,35 @@ +import { BigNumber } from '@ethersproject/bignumber' + +export type DelayedMsgHeader = { + kind: number + sender: string + blockNumber: number + timestamp: number + totalDelayedMessagesRead: number + baseFee: number + messageDataHash: string +} + +export type DelayedMsg = { + header: DelayedMsgHeader + messageData: string +} + +export type DelayedMsgDelivered = { + delayedMessage: DelayedMsg + delayedAcc: string + delayedCount: number +} + +export type MaxTimeVariation = { + delaySeconds: number + futureSeconds: number + delayBlocks: number + futureBlocks: number +} + +export type DelayConfig = { + threshold: BigNumber + max: number + replenishRateInBasis: number +} diff --git a/test/contract/utils.ts b/test/contract/utils.ts index 3c1ef36a..2fe48cc1 100644 --- a/test/contract/utils.ts +++ b/test/contract/utils.ts @@ -45,7 +45,7 @@ export async function tryAdvanceChain( await ethers.provider.send('evm_mine', []) } } catch (e) { - // EVM mine failed. Try advancing the chain by sending txes if the node + // EVM mine failed. Try advancing the chain by sending txes if the assertion // is in dev mode and mints blocks when txes are sent for (let i = 0; i < blocks; i++) { const tx = await account.sendTransaction({ diff --git a/test/contract/validatorWallet.spec.ts b/test/contract/validatorWallet.spec.ts index 8bf305c6..5752f02d 100644 --- a/test/contract/validatorWallet.spec.ts +++ b/test/contract/validatorWallet.spec.ts @@ -5,7 +5,6 @@ import { ValidatorWalletCreator__factory, ValidatorWallet, RollupMock, - RollupMock__factory, } from '../../build/types' import { initializeAccounts } from './utils' @@ -15,7 +14,6 @@ describe('Validator Wallet', () => { let accounts: Awaited> let owner: ArrayElement let executor: ArrayElement - let rollupOwner: ArrayElement let walletCreator: ValidatorWalletCreator let wallet: ValidatorWallet let rollupMock1: RollupMock @@ -28,9 +26,8 @@ describe('Validator Wallet', () => { walletCreator = await WalletCreator.deploy() await walletCreator.deployed() - owner = accounts[0] - executor = accounts[1] - rollupOwner = accounts[2] + owner = await accounts[0] + executor = await accounts[1] const walletCreationTx = await (await walletCreator.createWallet([])).wait() const events = walletCreationTx.logs @@ -48,14 +45,12 @@ describe('Validator Wallet', () => { await wallet.setExecutor([await executor.getAddress()], [true]) await wallet.transferOwnership(await owner.getAddress()) - const RollupMock = (await ethers.getContractFactory( - 'RollupMock' - )) as RollupMock__factory + const RollupMock = await ethers.getContractFactory('RollupMock') rollupMock1 = (await RollupMock.deploy( - await rollupOwner.getAddress() + ethers.constants.AddressZero )) as RollupMock rollupMock2 = (await RollupMock.deploy( - await rollupOwner.getAddress() + ethers.constants.AddressZero )) as RollupMock await accounts[0].sendTransaction({ @@ -101,13 +96,7 @@ describe('Validator Wallet', () => { await expect( wallet.connect(executor).executeTransaction(data, rollupMock1.address, 0) - ) - .to.be.revertedWith('OnlyOwnerDestination') - .withArgs( - `${await owner.getAddress()}`, - `${await executor.getAddress()}`, - `${rollupMock1.address}` - ) + ).to.be.revertedWith(`OnlyOwnerDestination`) await expect( wallet.connect(owner).executeTransaction(data, rollupMock1.address, 0) ).to.emit(rollupMock1, 'WithdrawTriggered') @@ -120,7 +109,7 @@ describe('Validator Wallet', () => { it('should reject batch if single tx is not allowed by executor', async function () { const data = [ - rollupMock1.interface.encodeFunctionData('removeOldZombies', [0]), + rollupMock1.interface.encodeFunctionData('withdrawStakerFunds'), rollupMock2.interface.encodeFunctionData('withdrawStakerFunds'), ] @@ -137,12 +126,6 @@ describe('Validator Wallet', () => { [rollupMock1.address, rollupMock2.address], [0, 0] ) - ) - .to.be.revertedWith('OnlyOwnerDestination') - .withArgs( - `${await owner.getAddress()}`, - `${await executor.getAddress()}`, - `${rollupMock2.address}` - ) + ).to.be.revertedWith(`OnlyOwnerDestination`) }) }) diff --git a/test/e2e/orbitChain.ts b/test/e2e/orbitChain.ts index 25cd3039..0bde6359 100644 --- a/test/e2e/orbitChain.ts +++ b/test/e2e/orbitChain.ts @@ -22,6 +22,7 @@ import { RollupCore__factory, RollupCreator__factory, } from '../../build/types' +import { AssertionStateStruct } from '../../build/types/src/challengeV2/IAssertionChain' import { getLocalNetworks } from '../../scripts/testSetup' import { applyAlias } from '../contract/utils' import { BigNumber, ContractTransaction, Wallet, ethers } from 'ethers' @@ -794,6 +795,15 @@ describe('Orbit Chain', () => { ) } + 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, + } + /// deploy params const config = { confirmPeriodBlocks: ethers.BigNumber.from('150'), @@ -807,7 +817,20 @@ describe('Orbit Chain', () => { chainId: ethers.BigNumber.from('433333'), chainConfig: '{"chainId":433333,"homesteadBlock":0,"daoForkBlock":null,"daoForkSupport":true,"eip150Block":0,"eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000","eip155Block":0,"eip158Block":0,"byzantiumBlock":0,"constantinopleBlock":0,"petersburgBlock":0,"istanbulBlock":0,"muirGlacierBlock":0,"berlinBlock":0,"londonBlock":0,"clique":{"period":0,"epoch":0},"arbitrum":{"EnableArbOS":true,"AllowDebugPrecompiles":false,"DataAvailabilityCommittee":false,"InitialArbOSVersion":10,"InitialChainOwner":"0x72f7EEedF02C522242a4D3Bdc8aE6A8583aD7c5e","GenesisBlockNum":0}}', - genesisBlockNum: ethers.BigNumber.from('0'), + genesisAssertionState: 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, + anyTrustFastConfirmer: ethers.constants.AddressZero, + numBigStepLevel: 1, + challengeGracePeriodBlocks: 10, + bufferConfig: { threshold: 600, max: 14400, replenishRateInBasis: 500 }, sequencerInboxMaxTimeVariation: { delayBlocks: ethers.BigNumber.from('5760'), futureBlocks: ethers.BigNumber.from('12'), diff --git a/test/foundry/AbsBridge.t.sol b/test/foundry/AbsBridge.t.sol index 1ce9737b..9945a13c 100644 --- a/test/foundry/AbsBridge.t.sol +++ b/test/foundry/AbsBridge.t.sol @@ -35,17 +35,12 @@ abstract contract AbsBridgeTest is Test { uint256 newMessageCount = 15; (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc) = bridge .enqueueSequencerMessage( - dataHash, - afterDelayedMessagesRead, - prevMessageCount, - newMessageCount - ); + dataHash, afterDelayedMessagesRead, prevMessageCount, newMessageCount + ); // checks assertEq( - bridge.sequencerReportedSubMessageCount(), - newMessageCount, - "Invalid newMessageCount" + bridge.sequencerReportedSubMessageCount(), newMessageCount, "Invalid newMessageCount" ); bytes32 seqInboxEntry = keccak256(abi.encodePacked(bytes32(0), dataHash, bytes32(0))); assertEq(bridge.sequencerInboxAccs(0), seqInboxEntry, "Invalid sequencerInboxAccs entry"); @@ -75,11 +70,8 @@ abstract contract AbsBridgeTest is Test { uint256 newMessageCount = 15; (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc) = bridge .enqueueSequencerMessage( - dataHash, - afterDelayedMessagesRead, - prevMessageCount, - newMessageCount - ); + dataHash, afterDelayedMessagesRead, prevMessageCount, newMessageCount + ); // checks assertEq( @@ -87,9 +79,8 @@ abstract contract AbsBridgeTest is Test { newMessageCount, "Invalid sequencerReportedSubMessageCount" ); - bytes32 seqInboxEntry = keccak256( - abi.encodePacked(bytes32(0), dataHash, bridge.delayedInboxAccs(1)) - ); + bytes32 seqInboxEntry = + keccak256(abi.encodePacked(bytes32(0), dataHash, bridge.delayedInboxAccs(1))); assertEq(bridge.sequencerInboxAccs(0), seqInboxEntry, "Invalid sequencerInboxAccs entry"); assertEq(bridge.sequencerMessageCount(), 1, "Invalid sequencerMessageCount"); assertEq(seqMessageIndex, 0, "Invalid seqMessageIndex"); @@ -118,11 +109,8 @@ abstract contract AbsBridgeTest is Test { uint256 newMessageCount = 20; (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc) = bridge .enqueueSequencerMessage( - dataHash, - afterDelayedMessagesRead, - prevMessageCount, - newMessageCount - ); + dataHash, afterDelayedMessagesRead, prevMessageCount, newMessageCount + ); // checks assertEq( @@ -178,14 +166,7 @@ abstract contract AbsBridgeTest is Test { // expect event vm.expectEmit(true, true, true, true); emit MessageDelivered( - 0, - 0, - seqInbox, - 13, - sender, - messageDataHash, - block.basefee, - uint64(block.timestamp) + 0, 0, seqInbox, 13, sender, messageDataHash, block.basefee, uint64(block.timestamp) ); // submit report @@ -252,18 +233,13 @@ abstract contract AbsBridgeTest is Test { // mock the owner() call on rollup address mockRollupOwner = address(10000); vm.mockCall( - rollup, - abi.encodeWithSelector(IOwnable.owner.selector), - abi.encode(mockRollupOwner) + rollup, abi.encodeWithSelector(IOwnable.owner.selector), abi.encode(mockRollupOwner) ); // setSequencerInbox shall revert vm.expectRevert( abi.encodeWithSelector( - NotRollupOrOwner.selector, - address(this), - rollup, - mockRollupOwner + NotRollupOrOwner.selector, address(this), rollup, mockRollupOwner ) ); bridge.setSequencerInbox(seqInbox); @@ -345,18 +321,13 @@ abstract contract AbsBridgeTest is Test { // mock the owner() call on rollup address mockRollupOwner = address(10000); vm.mockCall( - rollup, - abi.encodeWithSelector(IOwnable.owner.selector), - abi.encode(mockRollupOwner) + rollup, abi.encodeWithSelector(IOwnable.owner.selector), abi.encode(mockRollupOwner) ); // setDelayedInbox shall revert vm.expectRevert( abi.encodeWithSelector( - NotRollupOrOwner.selector, - address(this), - rollup, - mockRollupOwner + NotRollupOrOwner.selector, address(this), rollup, mockRollupOwner ) ); bridge.setDelayedInbox(inbox, true); @@ -436,18 +407,13 @@ abstract contract AbsBridgeTest is Test { // mock the owner() call on rollup address mockRollupOwner = address(10000); vm.mockCall( - rollup, - abi.encodeWithSelector(IOwnable.owner.selector), - abi.encode(mockRollupOwner) + rollup, abi.encodeWithSelector(IOwnable.owner.selector), abi.encode(mockRollupOwner) ); // setOutbox shall revert vm.expectRevert( abi.encodeWithSelector( - NotRollupOrOwner.selector, - address(this), - rollup, - mockRollupOwner + NotRollupOrOwner.selector, address(this), rollup, mockRollupOwner ) ); bridge.setOutbox(outbox, true); @@ -479,27 +445,23 @@ abstract contract AbsBridgeTest is Test { // mock the owner() call on rollup address mockRollupOwner = address(10000); vm.mockCall( - rollup, - abi.encodeWithSelector(IOwnable.owner.selector), - abi.encode(mockRollupOwner) + rollup, abi.encodeWithSelector(IOwnable.owner.selector), abi.encode(mockRollupOwner) ); // setOutbox shall revert vm.expectRevert( abi.encodeWithSelector( - NotRollupOrOwner.selector, - address(this), - rollup, - mockRollupOwner + NotRollupOrOwner.selector, address(this), rollup, mockRollupOwner ) ); AbsBridge(address(bridge)).setSequencerReportedSubMessageCount(123); } - /**** - **** Event declarations - ***/ - + /** + * + * Event declarations + * + */ event SequencerInboxUpdated(address newSequencerInbox); event InboxToggle(address indexed inbox, bool enabled); event OutboxToggle(address indexed outbox, bool enabled); @@ -514,9 +476,6 @@ abstract contract AbsBridgeTest is Test { uint64 timestamp ); event BridgeCallTriggered( - address indexed outbox, - address indexed to, - uint256 value, - bytes data + address indexed outbox, address indexed to, uint256 value, bytes data ); } diff --git a/test/foundry/AbsInbox.t.sol b/test/foundry/AbsInbox.t.sol index c97bb3ef..38b70c24 100644 --- a/test/foundry/AbsInbox.t.sol +++ b/test/foundry/AbsInbox.t.sol @@ -23,7 +23,7 @@ abstract contract AbsInboxTest is Test { /* solhint-disable func-name-mixedcase */ function test_getProxyAdmin() public { - assertNotEq(inbox.getProxyAdmin(), address(0), "Invalid proxy admin"); + assertFalse(inbox.getProxyAdmin() == address(0), "Invalid proxy admin"); } function test_setAllowList() public { @@ -63,18 +63,13 @@ abstract contract AbsInboxTest is Test { // mock the owner() call on rollup address mockRollupOwner = address(10_000); vm.mockCall( - rollup, - abi.encodeWithSelector(IOwnable.owner.selector), - abi.encode(mockRollupOwner) + rollup, abi.encodeWithSelector(IOwnable.owner.selector), abi.encode(mockRollupOwner) ); // setAllowList shall revert vm.expectRevert( abi.encodeWithSelector( - NotRollupOrOwner.selector, - address(this), - rollup, - mockRollupOwner + NotRollupOrOwner.selector, address(this), rollup, mockRollupOwner ) ); @@ -131,18 +126,13 @@ abstract contract AbsInboxTest is Test { // mock the owner() call on rollup address mockRollupOwner = address(10_000); vm.mockCall( - rollup, - abi.encodeWithSelector(IOwnable.owner.selector), - abi.encode(mockRollupOwner) + rollup, abi.encodeWithSelector(IOwnable.owner.selector), abi.encode(mockRollupOwner) ); // setAllowListEnabled shall revert vm.expectRevert( abi.encodeWithSelector( - NotRollupOrOwner.selector, - address(this), - rollup, - mockRollupOwner + NotRollupOrOwner.selector, address(this), rollup, mockRollupOwner ) ); @@ -151,9 +141,7 @@ abstract contract AbsInboxTest is Test { function test_pause() public { assertEq( - (PausableUpgradeable(address(inbox))).paused(), - false, - "Invalid initial paused state" + (PausableUpgradeable(address(inbox))).paused(), false, "Invalid initial paused state" ); vm.prank(rollup); @@ -166,9 +154,7 @@ abstract contract AbsInboxTest is Test { vm.prank(rollup); inbox.pause(); assertEq( - (PausableUpgradeable(address(inbox))).paused(), - true, - "Invalid initial paused state" + (PausableUpgradeable(address(inbox))).paused(), true, "Invalid initial paused state" ); vm.prank(rollup); inbox.unpause(); @@ -187,53 +173,12 @@ abstract contract AbsInboxTest is Test { inb.initialize(bridge, ISequencerInbox(seqInbox)); } - function test_sendL2MessageFromOrigin() public { - // L2 msg params - bytes memory data = abi.encodePacked("some msg"); - - // expect event - vm.expectEmit(true, true, true, true); - emit InboxMessageDeliveredFromOrigin(0); - - // send L2 msg -> tx.origin == msg.sender - vm.prank(user, user); - uint256 msgNum = inbox.sendL2MessageFromOrigin(data); - - //// checks - assertEq(msgNum, 0, "Invalid msgNum"); - assertEq(bridge.delayedMessageCount(), 1, "Invalid delayed message count"); - } - - function test_sendL2MessageFromOrigin_revert_WhenPaused() public { - vm.prank(rollup); - inbox.pause(); - - vm.expectRevert("Pausable: paused"); + function test_sendL2MessageFromOrigin_revert() public { + vm.expectRevert(abi.encodeWithSelector(Deprecated.selector)); vm.prank(user); inbox.sendL2MessageFromOrigin(abi.encodePacked("some msg")); } - function test_sendL2MessageFromOrigin_revert_NotAllowed() public { - vm.prank(rollup); - inbox.setAllowListEnabled(true); - - vm.expectRevert(abi.encodeWithSelector(NotAllowedOrigin.selector, user)); - vm.prank(user, user); - inbox.sendL2MessageFromOrigin(abi.encodePacked("some msg")); - } - - function test_sendL2MessageFromOrigin_revert_L1Forked() public { - vm.chainId(10); - vm.expectRevert(abi.encodeWithSelector(L1Forked.selector)); - vm.prank(user, user); - inbox.sendL2MessageFromOrigin(abi.encodePacked("some msg")); - } - - function test_sendL2MessageFromOrigin_revert_NotOrigin() public { - vm.expectRevert(abi.encodeWithSelector(NotOrigin.selector)); - inbox.sendL2MessageFromOrigin(abi.encodePacked("some msg")); - } - function test_sendL2Message() public { // L2 msg params bytes memory data = abi.encodePacked("some msg"); @@ -301,14 +246,8 @@ abstract contract AbsInboxTest is Test { // send TX vm.prank(user, user); - uint256 msgNum = inbox.sendUnsignedTransaction( - gasLimit, - maxFeePerGas, - nonce, - user, - value, - data - ); + uint256 msgNum = + inbox.sendUnsignedTransaction(gasLimit, maxFeePerGas, nonce, user, value, data); //// checks assertEq(msgNum, 0, "Invalid msgNum"); @@ -401,7 +340,6 @@ abstract contract AbsInboxTest is Test { * Event declarations * */ - event AllowListAddressSet(address indexed user, bool val); event AllowListEnabledUpdated(bool isEnabled); event InboxMessageDelivered(uint256 indexed messageNum, bytes data); diff --git a/test/foundry/Bridge.t.sol b/test/foundry/Bridge.t.sol index 7e7dc4a4..d5d6f59b 100644 --- a/test/foundry/Bridge.t.sol +++ b/test/foundry/Bridge.t.sol @@ -80,9 +80,7 @@ contract BridgeTest is AbsBridgeTest { uint256 bridgeEthBalanceAfter = address(bridge).balance; assertEq( - bridgeEthBalanceAfter - bridgeEthBalanceBefore, - ethAmount, - "Invalid bridge eth balance" + bridgeEthBalanceAfter - bridgeEthBalanceBefore, ethAmount, "Invalid bridge eth balance" ); uint256 inboxEthBalanceAfter = address(inbox).balance; @@ -126,9 +124,7 @@ contract BridgeTest is AbsBridgeTest { uint256 bridgeEthBalanceAfter = address(bridge).balance; assertEq( - bridgeEthBalanceAfter - bridgeEthBalanceBefore, - ethAmount, - "Invalid bridge eth balance" + bridgeEthBalanceAfter - bridgeEthBalanceBefore, ethAmount, "Invalid bridge eth balance" ); uint256 inboxEthBalanceAfter = address(inbox).balance; @@ -172,7 +168,7 @@ contract BridgeTest is AbsBridgeTest { //// execute call vm.prank(outbox); - (bool success, ) = bridge.executeCall({to: user, value: withdrawalAmount, data: ""}); + (bool success,) = bridge.executeCall({to: user, value: withdrawalAmount, data: ""}); //// checks assertTrue(success, "Execute call failed"); @@ -186,9 +182,7 @@ contract BridgeTest is AbsBridgeTest { uint256 userEthBalanceAfter = address(user).balance; assertEq( - userEthBalanceAfter - userEthBalanceBefore, - withdrawalAmount, - "Invalid user eth balance" + userEthBalanceAfter - userEthBalanceBefore, withdrawalAmount, "Invalid user eth balance" ); } @@ -217,11 +211,8 @@ contract BridgeTest is AbsBridgeTest { //// execute call vm.prank(outbox); - (bool success, ) = bridge.executeCall({ - to: address(vault), - value: withdrawalAmount, - data: data - }); + (bool success,) = + bridge.executeCall({to: address(vault), value: withdrawalAmount, data: data}); //// checks assertTrue(success, "Execute call failed"); @@ -266,11 +257,8 @@ contract BridgeTest is AbsBridgeTest { //// execute call - do call which reverts vm.prank(outbox); - (bool success, bytes memory returnData) = bridge.executeCall({ - to: address(vault), - value: withdrawalAmount, - data: revertingData - }); + (bool success, bytes memory returnData) = + bridge.executeCall({to: address(vault), value: withdrawalAmount, data: revertingData}); //// checks assertEq(success, false, "Execute shall be unsuccessful"); diff --git a/test/foundry/BridgeCreator.t.sol b/test/foundry/BridgeCreator.t.sol index f6178d76..b5f9177d 100644 --- a/test/foundry/BridgeCreator.t.sol +++ b/test/foundry/BridgeCreator.t.sol @@ -15,33 +15,34 @@ contract BridgeCreatorTest is Test { uint256 public constant MAX_DATA_SIZE = 117_964; IReader4844 dummyReader4844 = IReader4844(address(137)); - BridgeCreator.BridgeContracts ethBasedTemplates = - BridgeCreator.BridgeContracts({ - bridge: new Bridge(), - sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false), - inbox: new Inbox(MAX_DATA_SIZE), - rollupEventInbox: new RollupEventInbox(), - outbox: new Outbox() - }); - BridgeCreator.BridgeContracts erc20BasedTemplates = - BridgeCreator.BridgeContracts({ - bridge: new ERC20Bridge(), - sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true), - inbox: new ERC20Inbox(MAX_DATA_SIZE), - rollupEventInbox: new ERC20RollupEventInbox(), - outbox: new ERC20Outbox() - }); + BridgeCreator.BridgeTemplates ethBasedTemplates = BridgeCreator.BridgeTemplates({ + bridge: new Bridge(), + sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, false), + delayBufferableSequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, true), + inbox: new Inbox(MAX_DATA_SIZE), + rollupEventInbox: new RollupEventInbox(), + outbox: new Outbox() + }); + BridgeCreator.BridgeTemplates erc20BasedTemplates = BridgeCreator.BridgeTemplates({ + bridge: new ERC20Bridge(), + sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, false), + delayBufferableSequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, true), + inbox: new ERC20Inbox(MAX_DATA_SIZE), + rollupEventInbox: new ERC20RollupEventInbox(), + outbox: new ERC20Outbox() + }); function setUp() public { vm.prank(owner); creator = new BridgeCreator(ethBasedTemplates, erc20BasedTemplates); } - function getEthBasedTemplates() internal view returns (BridgeCreator.BridgeContracts memory) { - BridgeCreator.BridgeContracts memory templates; + function getEthBasedTemplates() internal view returns (BridgeCreator.BridgeTemplates memory) { + BridgeCreator.BridgeTemplates memory templates; ( templates.bridge, templates.sequencerInbox, + templates.delayBufferableSequencerInbox, templates.inbox, templates.rollupEventInbox, templates.outbox @@ -49,11 +50,16 @@ contract BridgeCreatorTest is Test { return templates; } - function getErc20BasedTemplates() internal view returns (BridgeCreator.BridgeContracts memory) { - BridgeCreator.BridgeContracts memory templates; + function getErc20BasedTemplates() + internal + view + returns (BridgeCreator.BridgeTemplates memory) + { + BridgeCreator.BridgeTemplates memory templates; ( templates.bridge, templates.sequencerInbox, + templates.delayBufferableSequencerInbox, templates.inbox, templates.rollupEventInbox, templates.outbox @@ -62,16 +68,19 @@ contract BridgeCreatorTest is Test { } function assertEq( - BridgeCreator.BridgeContracts memory a, - BridgeCreator.BridgeContracts memory b + BridgeCreator.BridgeTemplates memory a, + BridgeCreator.BridgeTemplates memory b ) internal { assertEq(address(a.bridge), address(b.bridge), "Invalid bridge"); assertEq(address(a.sequencerInbox), address(b.sequencerInbox), "Invalid seqInbox"); + assertEq( + address(a.delayBufferableSequencerInbox), + address(b.delayBufferableSequencerInbox), + "Invalid delayBuffSeqInbox" + ); assertEq(address(a.inbox), address(b.inbox), "Invalid inbox"); assertEq( - address(a.rollupEventInbox), - address(b.rollupEventInbox), - "Invalid rollup event inbox" + address(a.rollupEventInbox), address(b.rollupEventInbox), "Invalid rollup event inbox" ); assertEq(address(a.outbox), address(b.outbox), "Invalid outbox"); } @@ -83,12 +92,13 @@ contract BridgeCreatorTest is Test { } function test_updateTemplates() public { - BridgeCreator.BridgeContracts memory templs = BridgeCreator.BridgeContracts({ + BridgeCreator.BridgeTemplates memory templs = BridgeCreator.BridgeTemplates({ bridge: Bridge(address(200)), sequencerInbox: SequencerInbox(address(201)), - inbox: Inbox(address(202)), - rollupEventInbox: RollupEventInbox(address(203)), - outbox: Outbox(address(204)) + delayBufferableSequencerInbox: SequencerInbox(address(202)), + inbox: Inbox(address(203)), + rollupEventInbox: RollupEventInbox(address(204)), + outbox: Outbox(address(205)) }); vm.prank(owner); @@ -98,12 +108,13 @@ contract BridgeCreatorTest is Test { } function test_updateERC20Templates() public { - BridgeCreator.BridgeContracts memory templs = BridgeCreator.BridgeContracts({ + BridgeCreator.BridgeTemplates memory templs = BridgeCreator.BridgeTemplates({ bridge: ERC20Bridge(address(400)), sequencerInbox: SequencerInbox(address(401)), - inbox: ERC20Inbox(address(402)), - rollupEventInbox: ERC20RollupEventInbox(address(403)), - outbox: ERC20Outbox(address(404)) + delayBufferableSequencerInbox: SequencerInbox(address(402)), + inbox: ERC20Inbox(address(403)), + rollupEventInbox: ERC20RollupEventInbox(address(404)), + outbox: ERC20Outbox(address(405)) }); vm.prank(owner); @@ -116,20 +127,15 @@ contract BridgeCreatorTest is Test { address proxyAdmin = address(300); address rollup = address(301); address nativeToken = address(0); - ISequencerInbox.MaxTimeVariation memory timeVars = ISequencerInbox.MaxTimeVariation( - 10, - 20, - 30, - 40 - ); - timeVars.delayBlocks; - - BridgeCreator.BridgeContracts memory contracts = creator.createBridge( - proxyAdmin, - rollup, - nativeToken, - timeVars - ); + ISequencerInbox.MaxTimeVariation memory timeVars = + ISequencerInbox.MaxTimeVariation(10, 20, 30, 40); + BufferConfig memory bufferConfig = BufferConfig({ + threshold: type(uint64).max, + max: type(uint64).max, + replenishRateInBasis: 0 + }); + BridgeCreator.BridgeContracts memory contracts = + creator.createBridge(proxyAdmin, rollup, nativeToken, timeVars, bufferConfig); ( IBridge bridge, ISequencerInbox seqInbox, @@ -137,12 +143,12 @@ contract BridgeCreatorTest is Test { IRollupEventInbox eventInbox, IOutbox outbox ) = ( - contracts.bridge, - contracts.sequencerInbox, - contracts.inbox, - contracts.rollupEventInbox, - contracts.outbox - ); + contracts.bridge, + contracts.sequencerInbox, + contracts.inbox, + contracts.rollupEventInbox, + contracts.outbox + ); // bridge assertEq(address(bridge.rollup()), rollup, "Invalid rollup ref"); @@ -151,12 +157,8 @@ contract BridgeCreatorTest is Test { // seqInbox assertEq(address(seqInbox.bridge()), address(bridge), "Invalid bridge ref"); assertEq(address(seqInbox.rollup()), rollup, "Invalid rollup ref"); - ( - uint256 _delayBlocks, - uint256 _futureBlocks, - uint256 _delaySeconds, - uint256 _futureSeconds - ) = seqInbox.maxTimeVariation(); + (uint256 _delayBlocks, uint256 _futureBlocks, uint256 _delaySeconds, uint256 _futureSeconds) + = seqInbox.maxTimeVariation(); assertEq(_delayBlocks, timeVars.delayBlocks, "Invalid delayBlocks"); assertEq(_futureBlocks, timeVars.futureBlocks, "Invalid futureBlocks"); assertEq(_delaySeconds, timeVars.delaySeconds, "Invalid delaySeconds"); @@ -184,23 +186,18 @@ contract BridgeCreatorTest is Test { function test_createERC20Bridge() public { address proxyAdmin = address(300); address rollup = address(301); - address nativeToken = address( - new ERC20PresetFixedSupply("Appchain Token", "App", 1_000_000, address(this)) - ); - ISequencerInbox.MaxTimeVariation memory timeVars = ISequencerInbox.MaxTimeVariation( - 10, - 20, - 30, - 40 - ); - timeVars.delayBlocks; // TODO: what is this? + address nativeToken = + address(new ERC20PresetFixedSupply("Appchain Token", "App", 1_000_000, address(this))); + ISequencerInbox.MaxTimeVariation memory timeVars = + ISequencerInbox.MaxTimeVariation(10, 20, 30, 40); + BufferConfig memory bufferConfig = BufferConfig({ + threshold: type(uint64).max, + max: type(uint64).max, + replenishRateInBasis: 0 + }); - BridgeCreator.BridgeContracts memory contracts = creator.createBridge( - proxyAdmin, - rollup, - nativeToken, - timeVars - ); + BridgeCreator.BridgeContracts memory contracts = + creator.createBridge(proxyAdmin, rollup, nativeToken, timeVars, bufferConfig); ( IBridge bridge, ISequencerInbox seqInbox, @@ -208,12 +205,12 @@ contract BridgeCreatorTest is Test { IRollupEventInbox eventInbox, IOutbox outbox ) = ( - contracts.bridge, - contracts.sequencerInbox, - contracts.inbox, - contracts.rollupEventInbox, - contracts.outbox - ); + contracts.bridge, + contracts.sequencerInbox, + contracts.inbox, + contracts.rollupEventInbox, + contracts.outbox + ); // bridge assertEq(address(bridge.rollup()), rollup, "Invalid rollup ref"); @@ -227,12 +224,8 @@ contract BridgeCreatorTest is Test { // seqInbox assertEq(address(seqInbox.bridge()), address(bridge), "Invalid bridge ref"); assertEq(address(seqInbox.rollup()), rollup, "Invalid rollup ref"); - ( - uint256 _delayBlocks, - uint256 _futureBlocks, - uint256 _delaySeconds, - uint256 _futureSeconds - ) = seqInbox.maxTimeVariation(); + (uint256 _delayBlocks, uint256 _futureBlocks, uint256 _delaySeconds, uint256 _futureSeconds) + = seqInbox.maxTimeVariation(); assertEq(_delayBlocks, timeVars.delayBlocks, "Invalid delayBlocks"); assertEq(_futureBlocks, timeVars.futureBlocks, "Invalid futureBlocks"); assertEq(_delaySeconds, timeVars.delaySeconds, "Invalid delaySeconds"); diff --git a/test/foundry/CacheManager.t.sol b/test/foundry/CacheManager.t.sol index 62f1a0fd..7d276094 100644 --- a/test/foundry/CacheManager.t.sol +++ b/test/foundry/CacheManager.t.sol @@ -20,11 +20,7 @@ contract CacheManagerTest is Test { CacheManager cacheManagerImpl = new CacheManager(); cacheManager = CacheManager( address( - new TransparentUpgradeableProxy( - address(cacheManagerImpl), - address(proxyAdmin), - "" - ) + new TransparentUpgradeableProxy(address(cacheManagerImpl), address(proxyAdmin), "") ) ); uint64 cacheSize = 1_000_000; @@ -50,7 +46,8 @@ contract CacheManagerTest is Test { // Deploy bytes(bytes32(i)) as code to a sample program // PUSH32 i PUSH1 0 MSTORE PUSH1 32 PUSH1 0 RETURN // at the time of writing this our forge version or config doesn't have PUSH0 support - bytes memory bytecode = bytes.concat(hex"7F", abi.encodePacked(i), hex"60005260206000F3"); + bytes memory bytecode = + bytes.concat(hex"7F", abi.encodePacked(i), hex"60005260206000F3"); address program; assembly { program := create(0, add(bytecode, 32), mload(bytecode)) @@ -67,7 +64,9 @@ contract CacheManagerTest is Test { for (uint256 epoch = 0; epoch < 4; epoch++) { for (uint256 round = 0; round < 512; round++) { // roll one of 256 random programs - address program = programs[uint256(keccak256(abi.encodePacked("code", epoch, round))) % programs.length]; + address program = programs[uint256( + keccak256(abi.encodePacked("code", epoch, round)) + ) % programs.length]; bytes32 codehash = program.codehash; vm.warp(block.timestamp + 1); // move time forward to test decay and make bid unique @@ -136,10 +135,9 @@ contract CacheManagerTest is Test { cacheManager.placeBid{value: pay}(program); - if(mustCache) { + if (mustCache) { require( - ARB_WASM_CACHE.codehashIsCached(codehash), - "must cache codehash not cached" + ARB_WASM_CACHE.codehashIsCached(codehash), "must cache codehash not cached" ); } @@ -181,7 +179,9 @@ contract ArbOwnerPublicMock { } // pretend all smart contracts are chain owners - function isChainOwner(address addr) external view returns (bool) { + function isChainOwner( + address addr + ) external view returns (bool) { uint256 codeSize; assembly { codeSize := extcodesize(addr) @@ -192,7 +192,9 @@ contract ArbOwnerPublicMock { contract ArbWasmMock { // returns a non-uniform distribution of mock code sizes - function codehashAsmSize(bytes32 codehash) external pure returns (uint64) { + function codehashAsmSize( + bytes32 codehash + ) external pure returns (uint64) { return uint64(uint256(keccak256(abi.encodePacked(codehash))) % 65_536); } } @@ -202,7 +204,9 @@ contract ArbWasmCacheMock { uint256 public numCached; uint256 public uselessCalls; - function cacheProgram(address addr) external { + function cacheProgram( + address addr + ) external { bytes32 codehash = addr.codehash; if (codehashIsCached[codehash]) { uselessCalls++; @@ -212,7 +216,9 @@ contract ArbWasmCacheMock { numCached++; } - function evictCodehash(bytes32 codehash) external { + function evictCodehash( + bytes32 codehash + ) external { if (!codehashIsCached[codehash]) { uselessCalls++; return; diff --git a/test/foundry/ChallengeManager.t.sol b/test/foundry/ChallengeManager.t.sol deleted file mode 100644 index 88557db9..00000000 --- a/test/foundry/ChallengeManager.t.sol +++ /dev/null @@ -1,159 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.4; - -import "forge-std/Test.sol"; -import "./util/TestUtil.sol"; -import "../../src/challenge/ChallengeManager.sol"; -import "../../src/osp/OneStepProofEntry.sol"; - -contract ChallengeManagerTest is Test { - IChallengeResultReceiver resultReceiver = IChallengeResultReceiver(address(137)); - ISequencerInbox sequencerInbox = ISequencerInbox(address(138)); - IBridge bridge = IBridge(address(139)); - IOneStepProofEntry osp = IOneStepProofEntry(address(140)); - IOneStepProofEntry newOsp = IOneStepProofEntry(address(141)); - IOneStepProofEntry condOsp = IOneStepProofEntry(address(142)); - address proxyAdmin = address(141); - ChallengeManager chalmanImpl = new ChallengeManager(); - - bytes32 randomRoot = keccak256(abi.encodePacked("randomRoot")); - - function deploy() public returns (ChallengeManager) { - ChallengeManager chalman = ChallengeManager( - address(new TransparentUpgradeableProxy(address(chalmanImpl), proxyAdmin, "")) - ); - chalman.initialize(resultReceiver, sequencerInbox, bridge, osp); - assertEq( - address(chalman.resultReceiver()), address(resultReceiver), "Result receiver not set" - ); - assertEq( - address(chalman.sequencerInbox()), address(sequencerInbox), "Sequencer inbox not set" - ); - assertEq(address(chalman.bridge()), address(bridge), "Bridge not set"); - assertEq(address(chalman.osp()), address(osp), "OSP not set"); - return chalman; - } - - function testCondOsp() public { - ChallengeManager chalman = deploy(); - - /// legacy root and OSP that will be used as conditional - IOneStepProofEntry legacyOSP = IOneStepProofEntry( - address( - new OneStepProofEntry( - IOneStepProver(makeAddr("0")), - IOneStepProver(makeAddr("mem")), - IOneStepProver(makeAddr("math")), - IOneStepProver(makeAddr("hostio")) - ) - ) - ); - bytes32 legacyRoot = keccak256(abi.encodePacked("legacyRoot")); - - // legacy hashes - bytes32 legacySegment0 = legacyOSP.getStartMachineHash( - keccak256(abi.encodePacked("globalStateHash[0]")), legacyRoot - ); - bytes32 legacySegment1 = legacyOSP.getEndMachineHash( - MachineStatus.FINISHED, keccak256(abi.encodePacked("globalStateHashes[1]")) - ); - - /// new OSP - IOneStepProofEntry _newOSP = IOneStepProofEntry( - address( - new OneStepProofEntry( - IOneStepProver(makeAddr("0")), - IOneStepProver(makeAddr("mem")), - IOneStepProver(makeAddr("math")), - IOneStepProver(makeAddr("hostio")) - ) - ) - ); - - // new hashes - bytes32 newSegment0 = _newOSP.getStartMachineHash( - keccak256(abi.encodePacked("globalStateHash[0]")), randomRoot - ); - bytes32 newSegment1 = _newOSP.getEndMachineHash( - MachineStatus.FINISHED, keccak256(abi.encodePacked("new_globalStateHashes[1]")) - ); - - /// do upgrade - vm.prank(proxyAdmin); - TransparentUpgradeableProxy(payable(address(chalman))).upgradeToAndCall( - address(chalmanImpl), - abi.encodeWithSelector( - ChallengeManager.postUpgradeInit.selector, _newOSP, legacyRoot, legacyOSP - ) - ); - - /// check cond osp - IOneStepProofEntry _condOsp = chalman.getOsp(legacyRoot); - assertEq(address(_condOsp), address(legacyOSP), "Legacy osp not set"); - assertEq( - _condOsp.getStartMachineHash( - keccak256(abi.encodePacked("globalStateHash[0]")), legacyRoot - ), - legacySegment0, - "Unexpected start machine hash" - ); - assertEq( - _condOsp.getEndMachineHash( - MachineStatus.FINISHED, keccak256(abi.encodePacked("globalStateHashes[1]")) - ), - legacySegment1, - "Unexpected end machine hash" - ); - - /// check new osp - IOneStepProofEntry _newOsp = chalman.getOsp(randomRoot); - assertEq(address(_newOsp), address(_newOSP), "New osp not set"); - assertEq( - _newOsp.getStartMachineHash( - keccak256(abi.encodePacked("globalStateHash[0]")), randomRoot - ), - newSegment0, - "Unexpected start machine hash" - ); - assertEq( - _newOsp.getEndMachineHash( - MachineStatus.FINISHED, keccak256(abi.encodePacked("new_globalStateHashes[1]")) - ), - newSegment1, - "Unexpected end machine hash" - ); - - /// check hashes are different - assertNotEq(legacySegment0, newSegment0, "Start machine hash should be different"); - assertNotEq(legacySegment1, newSegment1, "End machine hash should be different"); - } - - function testPostUpgradeInit() public { - ChallengeManager chalman = deploy(); - - vm.prank(proxyAdmin); - TransparentUpgradeableProxy(payable(address(chalman))).upgradeToAndCall( - address(chalmanImpl), - abi.encodeWithSelector( - ChallengeManager.postUpgradeInit.selector, newOsp, randomRoot, condOsp - ) - ); - - assertEq(address(chalman.getOsp(bytes32(0))), address(newOsp), "New osp not set"); - assertEq(address(chalman.getOsp(randomRoot)), address(condOsp), "Cond osp not set"); - } - - function testPostUpgradeInitFailsNotAdmin() public { - ChallengeManager chalman = deploy(); - - vm.expectRevert(abi.encodeWithSelector(NotOwner.selector, address(151), proxyAdmin)); - vm.prank(address(151)); - chalman.postUpgradeInit(newOsp, randomRoot, condOsp); - } - - function testPostUpgradeInitFailsNotDelCall() public { - vm.expectRevert(bytes("Function must be called through delegatecall")); - vm.prank(proxyAdmin); - chalmanImpl.postUpgradeInit(newOsp, randomRoot, condOsp); - } -} diff --git a/test/foundry/DecimalsConverterHelper.t.sol b/test/foundry/DecimalsConverterHelper.t.sol index 95533f4a..446ad856 100644 --- a/test/foundry/DecimalsConverterHelper.t.sol +++ b/test/foundry/DecimalsConverterHelper.t.sol @@ -17,13 +17,11 @@ contract DecimalsConverterHelperTest is Test { function test_adjust_decimals_InLessThanOut() public { assertEq( DecimalsConverterHelper.adjustDecimals(752, 0, 18), - 752 * 10**18, + 752 * 10 ** 18, "Invalid adjustment 2" ); assertEq( - DecimalsConverterHelper.adjustDecimals(752, 16, 18), - 75_200, - "Invalid adjustment 4" + DecimalsConverterHelper.adjustDecimals(752, 16, 18), 75_200, "Invalid adjustment 4" ); } @@ -35,35 +33,35 @@ contract DecimalsConverterHelperTest is Test { function test_adjust_decimals_equalDecimal_Fuzz(uint256 amount, uint8 decimals) public { assertEq( - DecimalsConverterHelper.adjustDecimals(amount, decimals, decimals), - amount, - "Invalid 8" + DecimalsConverterHelper.adjustDecimals(amount, decimals, decimals), amount, "Invalid 8" ); } - function test_adjust_decimals_equalDecimal_InLessThanOut_Fuzz(uint256 amount, uint8 decimalsIn) - public - { + function test_adjust_decimals_equalDecimal_InLessThanOut_Fuzz( + uint256 amount, + uint8 decimalsIn + ) public { uint8 decimalsOut = 18; vm.assume(decimalsIn < decimalsOut); - vm.assume(amount < type(uint256).max / 10**(decimalsOut - decimalsIn)); + vm.assume(amount < type(uint256).max / 10 ** (decimalsOut - decimalsIn)); assertEq( DecimalsConverterHelper.adjustDecimals(amount, decimalsIn, decimalsOut), - amount * 10**(decimalsOut - decimalsIn), + amount * 10 ** (decimalsOut - decimalsIn), "Invalid 9" ); } - function test_adjust_decimals_equalDecimal_InMoreThanOut_Fuzz(uint256 amount, uint8 decimalsIn) - public - { + function test_adjust_decimals_equalDecimal_InMoreThanOut_Fuzz( + uint256 amount, + uint8 decimalsIn + ) public { uint8 decimalsOut = 18; vm.assume(decimalsIn <= 36); vm.assume(decimalsIn > decimalsOut); assertEq( DecimalsConverterHelper.adjustDecimals(amount, decimalsIn, decimalsOut), - amount / 10**(decimalsIn - decimalsOut), + amount / 10 ** (decimalsIn - decimalsOut), "Invalid 10" ); } diff --git a/test/foundry/DelayBuffer.t.sol b/test/foundry/DelayBuffer.t.sol new file mode 100644 index 00000000..cb38466e --- /dev/null +++ b/test/foundry/DelayBuffer.t.sol @@ -0,0 +1,209 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +import "forge-std/Test.sol"; +import "../../src/bridge/DelayBuffer.sol"; +import "../../src/bridge/ISequencerInbox.sol"; +import {L2_MSG} from "../../src/libraries/MessageTypes.sol"; + +contract DelayBufferableTest is Test { + uint64 constant maxBuffer = 1000; + uint64 constant replenishRateInBasis = 333; + uint64 constant threshold = 5; + + BufferConfig config = BufferConfig({threshold: 5, max: 1000, replenishRateInBasis: 333}); + + ISequencerInbox.MaxTimeVariation maxTimeVariation = ISequencerInbox.MaxTimeVariation({ + delayBlocks: 24 * 60 * 60 / 12, + futureBlocks: 32 * 2, + delaySeconds: 24 * 60 * 60, + futureSeconds: 32 * 2 * 12 + }); + BufferConfig configBufferable = BufferConfig({ + threshold: 60 * 60 * 2 / 12, + max: 24 * 60 * 60 / 12 * 2, + replenishRateInBasis: 714 + }); + + using DelayBuffer for BufferData; + + BufferData delayBuffer; + BufferData delayBufferDefault = BufferData({ + bufferBlocks: configBufferable.max, + max: configBufferable.max, + threshold: configBufferable.threshold, + prevBlockNumber: 0, + replenishRateInBasis: configBufferable.replenishRateInBasis, + prevSequencedBlockNumber: 0 + }); + + Messages.Message message = Messages.Message({ + kind: L2_MSG, + sender: address(1), + blockNumber: uint64(block.number), + timestamp: uint64(block.timestamp), + inboxSeqNum: uint256(1), + baseFeeL1: uint256(1), + messageDataHash: bytes32(0) + }); + + function testCalcBuffer() public { + uint64 start = 10; + uint64 sequenced = 20; + uint64 buffer = 100; + uint64 unexpectedDelay = (sequenced - start - threshold); + + assertEq( + buffer, + DelayBuffer.calcBuffer( + start, start, buffer, sequenced, threshold, maxBuffer, replenishRateInBasis + ) + ); + assertEq( + buffer - 1, + DelayBuffer.calcBuffer( + start, start + 1, buffer, sequenced, threshold, maxBuffer, replenishRateInBasis + ) + ); + uint64 replenishAmount = unexpectedDelay * replenishRateInBasis / 10000; + assertEq( + buffer + replenishAmount - unexpectedDelay, + DelayBuffer.calcBuffer( + start, + start + unexpectedDelay, + buffer, + sequenced, + threshold, + maxBuffer, + replenishRateInBasis + ) + ); + replenishAmount = buffer * replenishRateInBasis / 10000; + assertEq( + threshold, + DelayBuffer.calcBuffer( + start, + start + buffer, + buffer, + start + threshold + buffer, + threshold, + maxBuffer, + replenishRateInBasis + ) + ); + replenishAmount = (buffer + 100) * replenishRateInBasis / 10000; + assertEq( + threshold, + DelayBuffer.calcBuffer( + start, + start + buffer + 100, + buffer, + start + threshold + buffer + 100, + threshold, + maxBuffer, + replenishRateInBasis + ) + ); + } + + function testUpdate() public { + delayBuffer = BufferData({ + bufferBlocks: 10, + max: config.max, + threshold: config.threshold, + prevBlockNumber: 0, + replenishRateInBasis: config.replenishRateInBasis, + prevSequencedBlockNumber: 0 + }); + + vm.roll(25); + + delayBuffer.update(20); + assertEq(delayBuffer.bufferBlocks, 10); + assertEq(delayBuffer.prevBlockNumber, 20); + assertEq(delayBuffer.prevSequencedBlockNumber, 25); + + delayBuffer = BufferData({ + bufferBlocks: 10, + max: config.max, + threshold: config.threshold, + prevBlockNumber: 0, + replenishRateInBasis: config.replenishRateInBasis, + prevSequencedBlockNumber: 0 + }); + uint64 updateBN = delayBuffer.prevBlockNumber + 10000; + vm.roll(updateBN); + + delayBuffer.update(updateBN); + assertEq(delayBuffer.bufferBlocks, 10 + config.replenishRateInBasis); + + assertEq(delayBuffer.prevBlockNumber, updateBN); + assertEq(delayBuffer.prevSequencedBlockNumber, updateBN); + } + + function testPendingBufferUpdate() public { + delayBuffer = BufferData({ + bufferBlocks: 10, + max: config.max, + threshold: config.threshold, + prevBlockNumber: 0, + replenishRateInBasis: config.replenishRateInBasis, + prevSequencedBlockNumber: 6 + }); + + uint64 buffer = delayBuffer.calcPendingBuffer(15); + + assertEq(buffer, 9); + } + + function testUpdateDepleteAndReplenish( + BufferConfig memory _config + ) public { + vm.assume(DelayBuffer.isValidBufferConfig(_config)); + + // set config + delayBuffer.max = _config.max; + delayBuffer.threshold = _config.threshold; + delayBuffer.replenishRateInBasis = _config.replenishRateInBasis; + + // init full buffer + delayBuffer.bufferBlocks = _config.max; + delayBuffer.prevBlockNumber = 0; + delayBuffer.prevSequencedBlockNumber = 0; + // only advance a plausible amount of blocks (< 2**32 blocks) + uint64 elapse = uint256(_config.max) + _config.threshold > type(uint32).max + ? type(uint32).max + : _config.max + _config.threshold; + delayBuffer.prevSequencedBlockNumber = elapse; + delayBuffer.prevBlockNumber = 0; + + vm.roll(elapse); + + uint256 bufferCalc = uint256(delayBuffer.bufferBlocks) + + (uint256(elapse) * uint256(_config.replenishRateInBasis)) / 10000; + uint256 decrement = elapse > _config.threshold ? elapse - _config.threshold : 0; + + // decrease the buffer + bufferCalc = bufferCalc > decrement ? bufferCalc - decrement : 0; + if (bufferCalc < _config.threshold) { + bufferCalc = _config.threshold; + } + if (bufferCalc > _config.max) { + bufferCalc = _config.max; + } + + delayBuffer.update(elapse); + assertEq(delayBuffer.bufferBlocks, bufferCalc); + assertEq(delayBuffer.prevBlockNumber, elapse); + assertEq(delayBuffer.prevSequencedBlockNumber, elapse); + + // replenish after 10000 blocks + vm.roll(elapse + 10000); + bufferCalc += _config.replenishRateInBasis; + if (bufferCalc > _config.max) { + bufferCalc = _config.max; + } + delayBuffer.update(elapse + 10000); + assertEq(delayBuffer.bufferBlocks, bufferCalc); + } +} diff --git a/test/foundry/ERC20Bridge.t.sol b/test/foundry/ERC20Bridge.t.sol index 1d2d82aa..036b4e1a 100644 --- a/test/foundry/ERC20Bridge.t.sol +++ b/test/foundry/ERC20Bridge.t.sol @@ -41,16 +41,12 @@ contract ERC20BridgeTest is AbsBridgeTest { /* solhint-disable func-name-mixedcase */ function test_initialize() public { assertEq( - address(erc20Bridge.nativeToken()), - address(nativeToken), - "Invalid nativeToken ref" + address(erc20Bridge.nativeToken()), address(nativeToken), "Invalid nativeToken ref" ); assertEq(address(bridge.rollup()), rollup, "Invalid rollup ref"); assertEq(bridge.activeOutbox(), address(0), "Invalid activeOutbox ref"); assertEq( - IERC20Bridge(address(bridge)).nativeTokenDecimals(), - 18, - "Invalid native token decimals" + IERC20Bridge(address(bridge)).nativeTokenDecimals(), 18, "Invalid native token decimals" ); } @@ -60,7 +56,6 @@ contract ERC20BridgeTest is AbsBridgeTest { noTokenBridge.initialize(IOwnable(rollup), address(0)); } - function test_initialize_ERC20_LessThan18Decimals() public { ERC20 _nativeToken = new ERC20_6Decimals(); ERC20Bridge _bridge = ERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); @@ -81,7 +76,7 @@ contract ERC20BridgeTest is AbsBridgeTest { ERC20_37Decimals _nativeToken = new ERC20_37Decimals(); ERC20Bridge _bridge = ERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - vm.expectRevert(abi.encodeWithSelector(NativeTokenDecimalsTooLarge.selector,37)); + vm.expectRevert(abi.encodeWithSelector(NativeTokenDecimalsTooLarge.selector, 37)); _bridge.initialize(IOwnable(makeAddr("_rollup")), address(_nativeToken)); } @@ -137,9 +132,7 @@ contract ERC20BridgeTest is AbsBridgeTest { //// checks uint256 userNativeTokenBalanceAfter = nativeToken.balanceOf(address(user)); assertEq( - userNativeTokenBalanceAfter, - userNativeTokenBalanceBefore, - "Invalid user token balance" + userNativeTokenBalanceAfter, userNativeTokenBalanceBefore, "Invalid user token balance" ); uint256 bridgeNativeTokenBalanceAfter = nativeToken.balanceOf(address(bridge)); @@ -169,9 +162,7 @@ contract ERC20BridgeTest is AbsBridgeTest { hoax(inbox); vm.expectRevert(); IEthBridge(address(bridge)).enqueueDelayedMessage{value: 0.1 ether}( - kind, - user, - messageDataHash + kind, user, messageDataHash ); } @@ -202,7 +193,7 @@ contract ERC20BridgeTest is AbsBridgeTest { //// execute call vm.prank(outbox); - (bool success, ) = bridge.executeCall(user, withdrawalAmount, data); + (bool success,) = bridge.executeCall(user, withdrawalAmount, data); //// checks assertTrue(success, "Execute call failed"); @@ -248,11 +239,8 @@ contract ERC20BridgeTest is AbsBridgeTest { //// execute call vm.prank(outbox); - (bool success, ) = bridge.executeCall({ - to: address(vault), - value: withdrawalAmount, - data: data - }); + (bool success,) = + bridge.executeCall({to: address(vault), value: withdrawalAmount, data: data}); //// checks assertTrue(success, "Execute call failed"); @@ -298,11 +286,8 @@ contract ERC20BridgeTest is AbsBridgeTest { //// execute call - do call which reverts vm.prank(outbox); - (bool success, bytes memory returnData) = bridge.executeCall({ - to: address(vault), - value: withdrawalAmount, - data: data - }); + (bool success, bytes memory returnData) = + bridge.executeCall({to: address(vault), value: withdrawalAmount, data: data}); //// checks assertEq(success, false, "Execute shall be unsuccessful"); @@ -403,9 +388,7 @@ contract ERC20BridgeTest is AbsBridgeTest { address to = _gateway; uint256 withdrawAmount = 25 ether; bytes memory data = abi.encodeWithSelector( - MockGateway.withdraw.selector, - MockBridgedToken(_nativeToken), - withdrawAmount + MockGateway.withdraw.selector, MockBridgedToken(_nativeToken), withdrawAmount ); vm.expectRevert(abi.encodeWithSelector(CallNotAllowed.selector)); vm.prank(_outbox); @@ -416,7 +399,9 @@ contract ERC20BridgeTest is AbsBridgeTest { contract MockBridgedToken is ERC20 { address public gateway; - constructor(address _gateway) ERC20("MockBridgedToken", "TT") { + constructor( + address _gateway + ) ERC20("MockBridgedToken", "TT") { gateway = _gateway; _mint(msg.sender, 1_000_000 ether); } diff --git a/test/foundry/ERC20Inbox.t.sol b/test/foundry/ERC20Inbox.t.sol index 80596a10..9077de03 100644 --- a/test/foundry/ERC20Inbox.t.sol +++ b/test/foundry/ERC20Inbox.t.sol @@ -87,7 +87,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_6Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -143,7 +144,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_20Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -198,7 +200,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20NoDecimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -297,8 +300,7 @@ contract ERC20InboxTest is AbsInboxTest { // expect event vm.expectEmit(true, true, true, true); emit InboxMessageDelivered( - 0, - abi.encodePacked(AddressAliasHelper.applyL1ToL2Alias(user), depositAmount) + 0, abi.encodePacked(AddressAliasHelper.applyL1ToL2Alias(user), depositAmount) ); // deposit tokens -> tx.origin != msg.sender @@ -329,7 +331,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_6Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -343,9 +346,7 @@ contract ERC20InboxTest is AbsInboxTest { uint256 depositAmountTooHigh = type(uint256).max / 10; - vm.expectRevert( - abi.encodeWithSelector(AmountTooLarge.selector, depositAmountTooHigh) - ); + vm.expectRevert(abi.encodeWithSelector(AmountTooLarge.selector, depositAmountTooHigh)); vm.prank(user, user); _inbox.depositERC20(depositAmountTooHigh); } @@ -446,7 +447,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_6Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -534,7 +536,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_20Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -759,7 +762,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_6Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -808,7 +812,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_20Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -1135,7 +1140,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_6Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -1185,7 +1191,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_20Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -1235,7 +1242,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_6Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); @@ -1283,7 +1291,8 @@ contract ERC20InboxTest is AbsInboxTest { ERC20 _nativeToken = new ERC20_20Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); // init bridge and inbox address _rollup = makeAddr("_rollup"); diff --git a/test/foundry/ERC20Outbox.t.sol b/test/foundry/ERC20Outbox.t.sol index 4c385a56..1322501d 100644 --- a/test/foundry/ERC20Outbox.t.sol +++ b/test/foundry/ERC20Outbox.t.sol @@ -78,10 +78,7 @@ contract ERC20OutboxTest is AbsOutboxTest { bytes32 root = outbox.calculateMerkleRoot(proof, index, itemHash); // store root vm.prank(rollup); - outbox.updateSendRoot( - root, - bytes32(uint256(1)) - ); + outbox.updateSendRoot(root, bytes32(uint256(1))); outbox.executeTransaction({ proof: proof, @@ -162,10 +159,7 @@ contract ERC20OutboxTest is AbsOutboxTest { bytes32 root = outbox.calculateMerkleRoot(proof, index, itemHash); // store root vm.prank(rollup); - outbox.updateSendRoot( - root, - bytes32(uint256(1)) - ); + outbox.updateSendRoot(root, bytes32(uint256(1))); vm.expectRevert(abi.encodeWithSelector(CallTargetNotAllowed.selector, invalidTarget)); outbox.executeTransaction({ @@ -193,7 +187,8 @@ contract ERC20OutboxTest is AbsOutboxTest { ERC20 _nativeToken = new ERC20_6Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); ERC20Outbox _outbox = ERC20Outbox(TestUtil.deployProxy(address(new ERC20Outbox()))); // init bridge and inbox @@ -237,10 +232,7 @@ contract ERC20OutboxTest is AbsOutboxTest { bytes32 root = _outbox.calculateMerkleRoot(proof, index, itemHash); // store root vm.prank(_rollup); - _outbox.updateSendRoot( - root, - bytes32(uint256(1)) - ); + _outbox.updateSendRoot(root, bytes32(uint256(1))); } _outbox.executeTransaction({ @@ -301,7 +293,8 @@ contract ERC20OutboxTest is AbsOutboxTest { ERC20 _nativeToken = new ERC20_20Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); ERC20Outbox _outbox = ERC20Outbox(TestUtil.deployProxy(address(new ERC20Outbox()))); // init bridge and inbox @@ -345,10 +338,7 @@ contract ERC20OutboxTest is AbsOutboxTest { bytes32 root = _outbox.calculateMerkleRoot(proof, index, itemHash); // store root vm.prank(_rollup); - _outbox.updateSendRoot( - root, - bytes32(uint256(1)) - ); + _outbox.updateSendRoot(root, bytes32(uint256(1))); } _outbox.executeTransaction({ @@ -408,7 +398,8 @@ contract ERC20OutboxTest is AbsOutboxTest { ERC20 _nativeToken = new ERC20_36Decimals(); IERC20Bridge _bridge = IERC20Bridge(TestUtil.deployProxy(address(new ERC20Bridge()))); - IERC20Inbox _inbox = IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); + IERC20Inbox _inbox = + IERC20Inbox(TestUtil.deployProxy(address(new ERC20Inbox(MAX_DATA_SIZE)))); ERC20Outbox _outbox = ERC20Outbox(TestUtil.deployProxy(address(new ERC20Outbox()))); // init bridge and inbox @@ -448,10 +439,7 @@ contract ERC20OutboxTest is AbsOutboxTest { bytes32 root = _outbox.calculateMerkleRoot(proof, index, itemHash); // store root vm.prank(_rollup); - _outbox.updateSendRoot( - root, - bytes32(uint256(1)) - ); + _outbox.updateSendRoot(root, bytes32(uint256(1))); } vm.expectRevert(stdError.arithmeticError); // overflow @@ -491,7 +479,9 @@ contract ERC20L2ToL1Target { withdrawalAmount = ERC20Outbox(outbox).l2ToL1WithdrawalAmount(); } - function setOutbox(address _outbox) external { + function setOutbox( + address _outbox + ) external { outbox = _outbox; } } diff --git a/test/foundry/ERC20RollupEventInbox.t.sol b/test/foundry/ERC20RollupEventInbox.t.sol index 2608db98..8475e3f4 100644 --- a/test/foundry/ERC20RollupEventInbox.t.sol +++ b/test/foundry/ERC20RollupEventInbox.t.sol @@ -5,6 +5,7 @@ import "./AbsRollupEventInbox.t.sol"; import {TestUtil} from "./util/TestUtil.sol"; import {ERC20RollupEventInbox} from "../../src/rollup/ERC20RollupEventInbox.sol"; import {ERC20Bridge, IERC20Bridge, IOwnable} from "../../src/bridge/ERC20Bridge.sol"; +import {INITIALIZATION_MSG_TYPE} from "../../src/libraries/MessageTypes.sol"; import {ERC20PresetMinterPauser} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol"; diff --git a/test/foundry/Inbox.t.sol b/test/foundry/Inbox.t.sol index 9b345781..c125072b 100644 --- a/test/foundry/Inbox.t.sol +++ b/test/foundry/Inbox.t.sol @@ -61,9 +61,7 @@ contract InboxTest is AbsInboxTest { uint256 userEthBalanceAfter = address(user).balance; assertEq( - userEthBalanceBefore - userEthBalanceAfter, - depositAmount, - "Invalid user eth balance" + userEthBalanceBefore - userEthBalanceAfter, depositAmount, "Invalid user eth balance" ); assertEq(bridge.delayedMessageCount(), 1, "Invalid delayed message count"); @@ -78,8 +76,7 @@ contract InboxTest is AbsInboxTest { // expect event vm.expectEmit(true, true, true, true); emit InboxMessageDelivered( - 0, - abi.encodePacked(AddressAliasHelper.applyL1ToL2Alias(user), depositAmount) + 0, abi.encodePacked(AddressAliasHelper.applyL1ToL2Alias(user), depositAmount) ); // deposit tokens -> tx.origin != msg.sender @@ -97,9 +94,7 @@ contract InboxTest is AbsInboxTest { uint256 userEthBalanceAfter = address(user).balance; assertEq( - userEthBalanceBefore - userEthBalanceAfter, - depositAmount, - "Invalid eth token balance" + userEthBalanceBefore - userEthBalanceAfter, depositAmount, "Invalid eth token balance" ); assertEq(bridge.delayedMessageCount(), 1, "Invalid delayed message count"); @@ -181,9 +176,7 @@ contract InboxTest is AbsInboxTest { uint256 userEthBalanceAfter = address(user).balance; assertEq( - userEthBalanceBefore - userEthBalanceAfter, - ethToSend, - "Invalid user token balance" + userEthBalanceBefore - userEthBalanceAfter, ethToSend, "Invalid user token balance" ); assertEq(bridge.delayedMessageCount(), 1, "Invalid delayed message count"); @@ -409,18 +402,13 @@ contract InboxTest is AbsInboxTest { // simulate 23 gwei basefee vm.fee(23000000000); - uint256 submissionFee = ethInbox.calculateRetryableSubmissionFee( - data.length, - block.basefee - ); + uint256 submissionFee = ethInbox.calculateRetryableSubmissionFee(data.length, block.basefee); // call shall revert vm.prank(user, user); vm.expectRevert( abi.encodePacked( - InsufficientSubmissionCost.selector, - submissionFee, - tooSmallMaxSubmissionCost + InsufficientSubmissionCost.selector, submissionFee, tooSmallMaxSubmissionCost ) ); ethInbox.createRetryableTicket{value: 1 ether}({ @@ -490,9 +478,7 @@ contract InboxTest is AbsInboxTest { uint256 userEthBalanceAfter = address(user).balance; assertEq( - userEthBalanceBefore - userEthBalanceAfter, - ethToSend, - "Invalid user token balance" + userEthBalanceBefore - userEthBalanceAfter, ethToSend, "Invalid user token balance" ); assertEq(bridge.delayedMessageCount(), 1, "Invalid delayed message count"); diff --git a/test/foundry/Outbox.t.sol b/test/foundry/Outbox.t.sol index 8d38deb8..924b92f9 100644 --- a/test/foundry/Outbox.t.sol +++ b/test/foundry/Outbox.t.sol @@ -61,10 +61,7 @@ contract OutboxTest is AbsOutboxTest { bytes32 root = outbox.calculateMerkleRoot(proof, index, itemHash); // store root vm.prank(rollup); - outbox.updateSendRoot( - root, - bytes32(uint256(1)) - ); + outbox.updateSendRoot(root, bytes32(uint256(1))); outbox.executeTransaction({ proof: proof, @@ -133,7 +130,9 @@ contract L2ToL1Target { withdrawalAmount = msg.value; } - function setOutbox(address _outbox) external { + function setOutbox( + address _outbox + ) external { outbox = _outbox; } } diff --git a/test/foundry/RollupCreator.t.sol b/test/foundry/RollupCreator.t.sol index 68b8ebe2..7e2af3de 100644 --- a/test/foundry/RollupCreator.t.sol +++ b/test/foundry/RollupCreator.t.sol @@ -6,9 +6,8 @@ import "./util/TestUtil.sol"; import "../../src/rollup/RollupCreator.sol"; import "../../src/rollup/RollupAdminLogic.sol"; import "../../src/rollup/RollupUserLogic.sol"; -import "../../src/rollup/ValidatorUtils.sol"; import "../../src/rollup/ValidatorWalletCreator.sol"; -import "../../src/challenge/ChallengeManager.sol"; +import "../../src/challengeV2/EdgeChallengeManager.sol"; import "../../src/osp/OneStepProver0.sol"; import "../../src/osp/OneStepProverMemory.sol"; import "../../src/osp/OneStepProverMath.sol"; @@ -16,6 +15,7 @@ import "../../src/osp/OneStepProverHostIo.sol"; import "../../src/osp/OneStepProofEntry.sol"; import "../../src/mocks/UpgradeExecutorMock.sol"; import "../../src/rollup/DeployHelper.sol"; +import "../../src/mocks/TestWETH9.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; @@ -28,27 +28,28 @@ contract RollupCreatorTest is Test { IRollupUser public rollupUser; DeployHelper public deployHelper; IReader4844 dummyReader4844 = IReader4844(address(137)); + IERC20 token; // 1 gwei uint256 public constant MAX_FEE_PER_GAS = 1_000_000_000; uint256 public constant MAX_DATA_SIZE = 117_964; - BridgeCreator.BridgeContracts public ethBasedTemplates = - BridgeCreator.BridgeContracts({ - bridge: new Bridge(), - sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false), - inbox: new Inbox(MAX_DATA_SIZE), - rollupEventInbox: new RollupEventInbox(), - outbox: new Outbox() - }); - BridgeCreator.BridgeContracts public erc20BasedTemplates = - BridgeCreator.BridgeContracts({ - bridge: new ERC20Bridge(), - sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true), - inbox: new ERC20Inbox(MAX_DATA_SIZE), - rollupEventInbox: new ERC20RollupEventInbox(), - outbox: new ERC20Outbox() - }); + BridgeCreator.BridgeTemplates public ethBasedTemplates = BridgeCreator.BridgeTemplates({ + bridge: new Bridge(), + sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, false), + delayBufferableSequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, true), + inbox: new Inbox(MAX_DATA_SIZE), + rollupEventInbox: new RollupEventInbox(), + outbox: new Outbox() + }); + BridgeCreator.BridgeTemplates public erc20BasedTemplates = BridgeCreator.BridgeTemplates({ + bridge: new ERC20Bridge(), + sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, false), + delayBufferableSequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, true), + inbox: new ERC20Inbox(MAX_DATA_SIZE), + rollupEventInbox: new ERC20RollupEventInbox(), + outbox: new ERC20Outbox() + }); /* solhint-disable func-name-mixedcase */ function setUp() public { @@ -64,7 +65,7 @@ contract RollupCreatorTest is Test { ( IOneStepProofEntry ospEntry, - IChallengeManager challengeManager, + IEdgeChallengeManager challengeManager, IRollupAdmin _rollupAdmin, IRollupUser _rollupUser ) = _prepareRollupDeployment(); @@ -80,11 +81,14 @@ contract RollupCreatorTest is Test { _rollupAdmin, _rollupUser, upgradeExecutorLogic, - address(new ValidatorUtils()), address(new ValidatorWalletCreator()), deployHelper ); + token = new TestWETH9("Test", "TEST"); + vm.deal(deployer, 10 ether); + IWETH9(address(token)).deposit{value: 10 ether}(); + vm.stopPrank(); } @@ -92,24 +96,37 @@ contract RollupCreatorTest is Test { vm.startPrank(deployer); // deployment params - ISequencerInbox.MaxTimeVariation memory timeVars = ISequencerInbox.MaxTimeVariation( - ((60 * 60 * 24) / 15), - 12, - 60 * 60 * 24, - 60 * 60 + ISequencerInbox.MaxTimeVariation memory timeVars = + ISequencerInbox.MaxTimeVariation(((60 * 60 * 24) / 15), 12, 60 * 60 * 24, 60 * 60); + uint256[] memory miniStakeValues = new uint256[](3); + miniStakeValues[0] = 1 ether; + miniStakeValues[1] = 2 ether; + miniStakeValues[2] = 3 ether; + AssertionState memory emptyState = AssertionState( + GlobalState([bytes32(0), bytes32(0)], [uint64(0), uint64(0)]), + MachineStatus.FINISHED, + bytes32(0) ); Config memory config = Config({ - confirmPeriodBlocks: 20, - extraChallengeTimeBlocks: 200, - stakeToken: address(0), baseStake: 1000, - wasmModuleRoot: keccak256("wasm"), - owner: rollupOwner, - loserStakeEscrow: address(200), chainId: 1337, chainConfig: "abc", - genesisBlockNum: 15_000_000, - sequencerInboxMaxTimeVariation: timeVars + confirmPeriodBlocks: 20, + owner: rollupOwner, + sequencerInboxMaxTimeVariation: timeVars, + stakeToken: address(token), + wasmModuleRoot: keccak256("wasm"), + loserStakeEscrow: address(200), + genesisAssertionState: emptyState, + genesisInboxCount: 0, + miniStakeValues: miniStakeValues, + layerZeroBlockEdgeHeight: 2 ** 5, + layerZeroBigStepEdgeHeight: 2 ** 5, + layerZeroSmallStepEdgeHeight: 2 ** 5, + anyTrustFastConfirmer: address(0), + numBigStepLevel: 1, + challengeGracePeriodBlocks: 10, + bufferConfig: BufferConfig({threshold: 600, max: 14400, replenishRateInBasis: 500}) }); // prepare funds @@ -127,18 +144,17 @@ contract RollupCreatorTest is Test { RollupCreator.RollupDeploymentParams memory deployParams = RollupCreator .RollupDeploymentParams({ - config: config, - batchPosters: batchPosters, - validators: validators, - maxDataSize: MAX_DATA_SIZE, - nativeToken: address(0), - deployFactoriesToL2: true, - maxFeePerGasForRetryables: MAX_FEE_PER_GAS, - batchPosterManager: batchPosterManager - }); - address rollupAddress = rollupCreator.createRollup{value: factoryDeploymentFunds}( - deployParams - ); + config: config, + batchPosters: batchPosters, + validators: validators, + maxDataSize: MAX_DATA_SIZE, + nativeToken: address(0), + deployFactoriesToL2: true, + maxFeePerGasForRetryables: MAX_FEE_PER_GAS, + batchPosterManager: batchPosterManager + }); + address rollupAddress = + rollupCreator.createRollup{value: factoryDeploymentFunds}(deployParams); vm.stopPrank(); @@ -212,9 +228,7 @@ contract RollupCreatorTest is Test { // upgrade executor owns rollup assertEq( - IOwnable(rollupAddress).owner(), - upgradeExecutorExpectedAddress, - "Invalid rollup owner" + IOwnable(rollupAddress).owner(), upgradeExecutorExpectedAddress, "Invalid rollup owner" ); assertEq( _getProxyAdmin(rollupAddress), @@ -223,54 +237,59 @@ contract RollupCreatorTest is Test { ); // check rollupOwner has executor role - AccessControlUpgradeable executor = AccessControlUpgradeable( - upgradeExecutorExpectedAddress - ); + AccessControlUpgradeable executor = AccessControlUpgradeable(upgradeExecutorExpectedAddress); assertTrue( - executor.hasRole(keccak256("EXECUTOR_ROLE"), rollupOwner), - "Invalid executor role" + executor.hasRole(keccak256("EXECUTOR_ROLE"), rollupOwner), "Invalid executor role" ); // check funds are refunded uint256 balanceAfter = deployer.balance; - uint256 factoryDeploymentCost = deployHelper.getDeploymentTotalCost( - rollup.inbox(), - MAX_FEE_PER_GAS - ); + uint256 factoryDeploymentCost = + deployHelper.getDeploymentTotalCost(rollup.inbox(), MAX_FEE_PER_GAS); assertEq(balanceBefore - balanceAfter, factoryDeploymentCost, "Invalid balance"); } function test_createErc20Rollup() public { vm.startPrank(deployer); - address nativeToken = address( - new ERC20PresetFixedSupply("Appchain Token", "App", 1_000_000 ether, deployer) - ); + address nativeToken = + address(new ERC20PresetFixedSupply("Appchain Token", "App", 1_000_000 ether, deployer)); // deployment params - ISequencerInbox.MaxTimeVariation memory timeVars = ISequencerInbox.MaxTimeVariation( - ((60 * 60 * 24) / 15), - 12, - 60 * 60 * 24, - 60 * 60 + ISequencerInbox.MaxTimeVariation memory timeVars = + ISequencerInbox.MaxTimeVariation(((60 * 60 * 24) / 15), 12, 60 * 60 * 24, 60 * 60); + uint256[] memory miniStakeValues = new uint256[](3); + miniStakeValues[0] = 1 ether; + miniStakeValues[1] = 2 ether; + miniStakeValues[2] = 3 ether; + AssertionState memory emptyState = AssertionState( + GlobalState([bytes32(0), bytes32(0)], [uint64(0), uint64(0)]), + MachineStatus.FINISHED, + bytes32(0) ); Config memory config = Config({ - confirmPeriodBlocks: 20, - extraChallengeTimeBlocks: 200, - stakeToken: address(0), baseStake: 1000, - wasmModuleRoot: keccak256("wasm"), - owner: rollupOwner, - loserStakeEscrow: address(200), chainId: 1337, chainConfig: "abc", - genesisBlockNum: 15_000_000, - sequencerInboxMaxTimeVariation: timeVars + confirmPeriodBlocks: 20, + owner: rollupOwner, + sequencerInboxMaxTimeVariation: timeVars, + stakeToken: address(token), + wasmModuleRoot: keccak256("wasm"), + loserStakeEscrow: address(200), + genesisAssertionState: emptyState, + genesisInboxCount: 0, + miniStakeValues: miniStakeValues, + layerZeroBlockEdgeHeight: 2 ** 5, + layerZeroBigStepEdgeHeight: 2 ** 5, + layerZeroSmallStepEdgeHeight: 2 ** 5, + anyTrustFastConfirmer: address(0), + numBigStepLevel: 1, + challengeGracePeriodBlocks: 10, + bufferConfig: BufferConfig({threshold: 600, max: 14400, replenishRateInBasis: 500}) }); // approve fee token to pay for deployment of L2 factories - uint256 expectedCost = 0.1247 ether + - 4 * - (1400 * 100_000_000_000 + 100_000 * 1_000_000_000); + uint256 expectedCost = 0.1247 ether + 4 * (1400 * 100_000_000_000 + 100_000 * 1_000_000_000); IERC20(nativeToken).approve(address(rollupCreator), expectedCost); /// deploy rollup @@ -283,15 +302,15 @@ contract RollupCreatorTest is Test { RollupCreator.RollupDeploymentParams memory deployParams = RollupCreator .RollupDeploymentParams({ - config: config, - batchPosters: batchPosters, - validators: validators, - maxDataSize: MAX_DATA_SIZE, - nativeToken: nativeToken, - deployFactoriesToL2: true, - maxFeePerGasForRetryables: MAX_FEE_PER_GAS, - batchPosterManager: batchPosterManager - }); + config: config, + batchPosters: batchPosters, + validators: validators, + maxDataSize: MAX_DATA_SIZE, + nativeToken: nativeToken, + deployFactoriesToL2: true, + maxFeePerGasForRetryables: MAX_FEE_PER_GAS, + batchPosterManager: batchPosterManager + }); address rollupAddress = rollupCreator.createRollup(deployParams); @@ -329,9 +348,7 @@ contract RollupCreatorTest is Test { // native token check IBridge bridge = RollupCore(address(rollupAddress)).bridge(); assertEq( - IERC20Bridge(address(bridge)).nativeToken(), - nativeToken, - "Invalid native token ref" + IERC20Bridge(address(bridge)).nativeToken(), nativeToken, "Invalid native token ref" ); // check proxy admin for non-rollup contracts @@ -378,9 +395,7 @@ contract RollupCreatorTest is Test { // upgrade executor owns rollup assertEq( - IOwnable(rollupAddress).owner(), - upgradeExecutorExpectedAddress, - "Invalid rollup owner" + IOwnable(rollupAddress).owner(), upgradeExecutorExpectedAddress, "Invalid rollup owner" ); assertEq( _getProxyAdmin(rollupAddress), @@ -389,12 +404,9 @@ contract RollupCreatorTest is Test { ); // check rollupOwner has executor role - AccessControlUpgradeable executor = AccessControlUpgradeable( - upgradeExecutorExpectedAddress - ); + AccessControlUpgradeable executor = AccessControlUpgradeable(upgradeExecutorExpectedAddress); assertTrue( - executor.hasRole(keccak256("EXECUTOR_ROLE"), rollupOwner), - "Invalid executor role" + executor.hasRole(keccak256("EXECUTOR_ROLE"), rollupOwner), "Invalid executor role" ); } @@ -402,24 +414,37 @@ contract RollupCreatorTest is Test { vm.startPrank(deployer); // deployment params - ISequencerInbox.MaxTimeVariation memory timeVars = ISequencerInbox.MaxTimeVariation( - ((60 * 60 * 24) / 15), - 12, - 60 * 60 * 24, - 60 * 60 + ISequencerInbox.MaxTimeVariation memory timeVars = + ISequencerInbox.MaxTimeVariation(((60 * 60 * 24) / 15), 12, 60 * 60 * 24, 60 * 60); + uint256[] memory miniStakeValues = new uint256[](3); + miniStakeValues[0] = 1 ether; + miniStakeValues[1] = 2 ether; + miniStakeValues[2] = 3 ether; + AssertionState memory emptyState = AssertionState( + GlobalState([bytes32(0), bytes32(0)], [uint64(0), uint64(0)]), + MachineStatus.FINISHED, + bytes32(0) ); Config memory config = Config({ - confirmPeriodBlocks: 20, - extraChallengeTimeBlocks: 200, - stakeToken: address(0), baseStake: 1000, - wasmModuleRoot: keccak256("wasm"), - owner: rollupOwner, - loserStakeEscrow: address(200), chainId: 1337, chainConfig: "abc", - genesisBlockNum: 15_000_000, - sequencerInboxMaxTimeVariation: timeVars + confirmPeriodBlocks: 20, + owner: rollupOwner, + sequencerInboxMaxTimeVariation: timeVars, + stakeToken: address(token), + wasmModuleRoot: keccak256("wasm"), + loserStakeEscrow: address(200), + genesisAssertionState: emptyState, + genesisInboxCount: 0, + miniStakeValues: miniStakeValues, + layerZeroBlockEdgeHeight: 2 ** 5, + layerZeroBigStepEdgeHeight: 2 ** 5, + layerZeroSmallStepEdgeHeight: 2 ** 5, + anyTrustFastConfirmer: address(0), + numBigStepLevel: 1, + challengeGracePeriodBlocks: 10, + bufferConfig: BufferConfig({threshold: 600, max: 14400, replenishRateInBasis: 500}) }); // prepare funds @@ -436,18 +461,17 @@ contract RollupCreatorTest is Test { RollupCreator.RollupDeploymentParams memory deployParams = RollupCreator .RollupDeploymentParams({ - config: config, - batchPosters: batchPosters, - validators: validators, - maxDataSize: MAX_DATA_SIZE, - nativeToken: address(0), - deployFactoriesToL2: true, - maxFeePerGasForRetryables: MAX_FEE_PER_GAS, - batchPosterManager: batchPosterManager - }); - address rollupAddress = rollupCreator.createRollup{value: factoryDeploymentFunds}( - deployParams - ); + config: config, + batchPosters: batchPosters, + validators: validators, + maxDataSize: MAX_DATA_SIZE, + nativeToken: address(0), + deployFactoriesToL2: true, + maxFeePerGasForRetryables: MAX_FEE_PER_GAS, + batchPosterManager: batchPosterManager + }); + address rollupAddress = + rollupCreator.createRollup{value: factoryDeploymentFunds}(deployParams); vm.stopPrank(); @@ -455,16 +479,12 @@ contract RollupCreatorTest is Test { RollupCore rollup = RollupCore(rollupAddress); address inbox = address(rollup.inbox()); address proxyAdmin = computeCreateAddress(address(rollupCreator), 1); - IUpgradeExecutor upgradeExecutor = IUpgradeExecutor( - computeCreateAddress(address(rollupCreator), 4) - ); + IUpgradeExecutor upgradeExecutor = + IUpgradeExecutor(computeCreateAddress(address(rollupCreator), 4)); Dummy newLogicImpl = new Dummy(); bytes memory data = abi.encodeWithSelector( - ProxyUpgradeAction.perform.selector, - address(proxyAdmin), - inbox, - address(newLogicImpl) + ProxyUpgradeAction.perform.selector, address(proxyAdmin), inbox, address(newLogicImpl) ); address upgradeAction = address(new ProxyUpgradeAction()); @@ -479,7 +499,7 @@ contract RollupCreatorTest is Test { internal returns ( IOneStepProofEntry ospEntry, - IChallengeManager challengeManager, + IEdgeChallengeManager challengeManager, IRollupAdmin rollupAdminLogic, IRollupUser rollupUserLogic ) @@ -491,7 +511,7 @@ contract RollupCreatorTest is Test { new OneStepProverMath(), new OneStepProverHostIo() ); - challengeManager = new ChallengeManager(); + challengeManager = new EdgeChallengeManager(); //// deploy rollup logic rollupAdminLogic = IRollupAdmin(new RollupAdminLogic()); @@ -500,35 +520,38 @@ contract RollupCreatorTest is Test { return (ospEntry, challengeManager, rollupAdminLogic, rollupUserLogic); } - function _getProxyAdmin(address proxy) internal view returns (address) { + function _getProxyAdmin( + address proxy + ) internal view returns (address) { bytes32 adminSlot = bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1); return address(uint160(uint256(vm.load(proxy, adminSlot)))); } - function _getImpl(address proxy) internal view returns (address) { + function _getImpl( + address proxy + ) internal view returns (address) { bytes32 implSlot = bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1); return address(uint160(uint256(vm.load(proxy, implSlot)))); } - function _getPrimary(address proxy) internal view returns (address) { + function _getPrimary( + address proxy + ) internal view returns (address) { bytes32 primarySlot = bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1); return address(uint160(uint256(vm.load(proxy, primarySlot)))); } - function _getSecondary(address proxy) internal view returns (address) { - bytes32 secondarySlot = bytes32( - uint256(keccak256("eip1967.proxy.implementation.secondary")) - 1 - ); + function _getSecondary( + address proxy + ) internal view returns (address) { + bytes32 secondarySlot = + bytes32(uint256(keccak256("eip1967.proxy.implementation.secondary")) - 1); return address(uint160(uint256(vm.load(proxy, secondarySlot)))); } } contract ProxyUpgradeAction { - function perform( - address admin, - address payable target, - address newLogic - ) public payable { + function perform(address admin, address payable target, address newLogic) public payable { ProxyAdmin(admin).upgrade(TransparentUpgradeableProxy(target), newLogic); } } diff --git a/test/foundry/RollupEventInbox.t.sol b/test/foundry/RollupEventInbox.t.sol index 47bfa9ec..77cec905 100644 --- a/test/foundry/RollupEventInbox.t.sol +++ b/test/foundry/RollupEventInbox.t.sol @@ -5,6 +5,7 @@ import "./AbsRollupEventInbox.t.sol"; import {TestUtil} from "./util/TestUtil.sol"; import {RollupEventInbox, IRollupEventInbox} from "../../src/rollup/RollupEventInbox.sol"; import {Bridge, IOwnable, IEthBridge} from "../../src/bridge/Bridge.sol"; +import {INITIALIZATION_MSG_TYPE} from "../../src/libraries/MessageTypes.sol"; import "../../src/libraries/MessageTypes.sol"; contract RollupEventInboxTest is AbsRollupEventInboxTest { diff --git a/test/foundry/SequencerInbox.t.sol b/test/foundry/SequencerInbox.t.sol index 92902d68..17a89e98 100644 --- a/test/foundry/SequencerInbox.t.sol +++ b/test/foundry/SequencerInbox.t.sol @@ -11,7 +11,9 @@ import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol" contract RollupMock { address public immutable owner; - constructor(address _owner) { + constructor( + address _owner + ) { owner = _owner; } } @@ -43,25 +45,32 @@ contract SequencerInboxTest is Test { Random RAND = new Random(); address rollupOwner = address(137); uint256 maxDataSize = 10000; - ISequencerInbox.MaxTimeVariation maxTimeVariation = - ISequencerInbox.MaxTimeVariation({ - delayBlocks: 10, - futureBlocks: 10, - delaySeconds: 100, - futureSeconds: 100 - }); + ISequencerInbox.MaxTimeVariation maxTimeVariation = ISequencerInbox.MaxTimeVariation({ + delayBlocks: 10, + futureBlocks: 10, + delaySeconds: 100, + futureSeconds: 100 + }); + BufferConfig bufferConfigDefault = BufferConfig({ + threshold: type(uint64).max, + max: type(uint64).max, + replenishRateInBasis: 714 + }); address dummyInbox = address(139); address proxyAdmin = address(140); IReader4844 dummyReader4844 = IReader4844(address(137)); uint256 public constant MAX_DATA_SIZE = 117964; - function deployRollup(bool isArbHosted) internal returns (SequencerInbox, Bridge) { + function deployRollup( + bool isArbHosted, + bool isDelayBufferable, + BufferConfig memory bufferConfig + ) internal returns (SequencerInbox, Bridge) { RollupMock rollupMock = new RollupMock(rollupOwner); Bridge bridgeImpl = new Bridge(); - Bridge bridge = Bridge( - address(new TransparentUpgradeableProxy(address(bridgeImpl), proxyAdmin, "")) - ); + Bridge bridge = + Bridge(address(new TransparentUpgradeableProxy(address(bridgeImpl), proxyAdmin, ""))); bridge.initialize(IOwnable(address(rollupMock))); vm.prank(rollupOwner); @@ -70,12 +79,13 @@ contract SequencerInboxTest is Test { SequencerInbox seqInboxImpl = new SequencerInbox( maxDataSize, isArbHosted ? IReader4844(address(0)) : dummyReader4844, - false + false, + isDelayBufferable ); SequencerInbox seqInbox = SequencerInbox( address(new TransparentUpgradeableProxy(address(seqInboxImpl), proxyAdmin, "")) ); - seqInbox.initialize(bridge, maxTimeVariation); + seqInbox.initialize(bridge, maxTimeVariation, bufferConfig); vm.prank(rollupOwner); seqInbox.setIsBatchPoster(tx.origin, true); @@ -104,15 +114,12 @@ contract SequencerInboxTest is Test { abi.encodeWithSelector(ArbSys.arbOSVersion.selector), abi.encode(uint256(11)) ); - SequencerInbox seqInboxImpl = new SequencerInbox( - maxDataSize, - IReader4844(address(0)), - true - ); + SequencerInbox seqInboxImpl = + new SequencerInbox(maxDataSize, IReader4844(address(0)), true, false); SequencerInbox seqInbox = SequencerInbox( address(new TransparentUpgradeableProxy(address(seqInboxImpl), proxyAdmin, "")) ); - seqInbox.initialize(bridge, maxTimeVariation); + seqInbox.initialize(bridge, maxTimeVariation, bufferConfigDefault); vm.prank(rollupOwner); seqInbox.setIsBatchPoster(tx.origin, true); @@ -184,7 +191,7 @@ contract SequencerInboxTest is Test { ); // spending report - vm.expectEmit(); + vm.expectEmit(true, false, false, false); emit MessageDelivered( delayedMessagesRead, delayedAcc, @@ -197,12 +204,12 @@ contract SequencerInboxTest is Test { ); // spending report event in seq inbox - vm.expectEmit(); + vm.expectEmit(true, false, false, false); emit InboxMessageDelivered(delayedMessagesRead, spendingReportMsg); } // sequencer batch delivered - vm.expectEmit(); + vm.expectEmit(true, false, false, false); emit SequencerBatchDelivered( sequenceNumber, beforeAcc, @@ -217,8 +224,10 @@ contract SequencerInboxTest is Test { bytes biggerData = hex"00a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890a4567890"; - function testAddSequencerL2BatchFromOrigin() public { - (SequencerInbox seqInbox, Bridge bridge) = deployRollup(false); + function testAddSequencerL2BatchFromOrigin( + BufferConfig memory bufferConfig + ) public { + (SequencerInbox seqInbox, Bridge bridge) = deployRollup(false, false, bufferConfig); address delayedInboxSender = address(140); uint8 delayedInboxKind = 3; bytes32 messageDataHash = RAND.Bytes32(); @@ -249,7 +258,8 @@ contract SequencerInboxTest is Test { /* solhint-disable func-name-mixedcase */ function testConstructor() public { - SequencerInbox seqInboxLogic = new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false); + SequencerInbox seqInboxLogic = + new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, false); assertEq(seqInboxLogic.maxDataSize(), MAX_DATA_SIZE, "Invalid MAX_DATA_SIZE"); assertEq(seqInboxLogic.isUsingFeeToken(), false, "Invalid isUsingFeeToken"); @@ -257,87 +267,95 @@ contract SequencerInboxTest is Test { assertEq(seqInboxProxy.maxDataSize(), MAX_DATA_SIZE, "Invalid MAX_DATA_SIZE"); assertEq(seqInboxProxy.isUsingFeeToken(), false, "Invalid isUsingFeeToken"); - SequencerInbox seqInboxLogicFeeToken = new SequencerInbox( - MAX_DATA_SIZE, - dummyReader4844, - true - ); + SequencerInbox seqInboxLogicFeeToken = + new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, false); assertEq(seqInboxLogicFeeToken.maxDataSize(), MAX_DATA_SIZE, "Invalid MAX_DATA_SIZE"); assertEq(seqInboxLogicFeeToken.isUsingFeeToken(), true, "Invalid isUsingFeeToken"); - SequencerInbox seqInboxProxyFeeToken = SequencerInbox( - TestUtil.deployProxy(address(seqInboxLogicFeeToken)) - ); + SequencerInbox seqInboxProxyFeeToken = + SequencerInbox(TestUtil.deployProxy(address(seqInboxLogicFeeToken))); assertEq(seqInboxProxyFeeToken.maxDataSize(), MAX_DATA_SIZE, "Invalid MAX_DATA_SIZE"); assertEq(seqInboxProxyFeeToken.isUsingFeeToken(), true, "Invalid isUsingFeeToken"); } - function testInitialize() public { - Bridge _bridge = Bridge( - address(new TransparentUpgradeableProxy(address(new Bridge()), proxyAdmin, "")) - ); + function testInitialize( + BufferConfig memory bufferConfig + ) public { + Bridge _bridge = + Bridge(address(new TransparentUpgradeableProxy(address(new Bridge()), proxyAdmin, ""))); _bridge.initialize(IOwnable(address(new RollupMock(rollupOwner)))); - address seqInboxLogic = address(new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false)); + address seqInboxLogic = + address(new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, false)); SequencerInbox seqInboxProxy = SequencerInbox(TestUtil.deployProxy(seqInboxLogic)); - seqInboxProxy.initialize(IBridge(_bridge), maxTimeVariation); + seqInboxProxy.initialize(IBridge(_bridge), maxTimeVariation, bufferConfig); assertEq(seqInboxProxy.isUsingFeeToken(), false, "Invalid isUsingFeeToken"); assertEq(address(seqInboxProxy.bridge()), address(_bridge), "Invalid bridge"); assertEq(address(seqInboxProxy.rollup()), address(_bridge.rollup()), "Invalid rollup"); } - function testInitialize_FeeTokenBased() public { + function testInitialize_FeeTokenBased( + BufferConfig memory bufferConfig + ) public { ERC20Bridge _bridge = ERC20Bridge( address(new TransparentUpgradeableProxy(address(new ERC20Bridge()), proxyAdmin, "")) ); address nativeToken = address(new ERC20PresetMinterPauser("Appchain Token", "App")); _bridge.initialize(IOwnable(address(new RollupMock(rollupOwner))), nativeToken); - address seqInboxLogic = address(new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true)); + address seqInboxLogic = + address(new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, false)); SequencerInbox seqInboxProxy = SequencerInbox(TestUtil.deployProxy(seqInboxLogic)); - seqInboxProxy.initialize(IBridge(_bridge), maxTimeVariation); + seqInboxProxy.initialize(IBridge(_bridge), maxTimeVariation, bufferConfig); assertEq(seqInboxProxy.isUsingFeeToken(), true, "Invalid isUsingFeeToken"); assertEq(address(seqInboxProxy.bridge()), address(_bridge), "Invalid bridge"); assertEq(address(seqInboxProxy.rollup()), address(_bridge.rollup()), "Invalid rollup"); } - function testInitialize_revert_NativeTokenMismatch_EthFeeToken() public { - Bridge _bridge = Bridge( - address(new TransparentUpgradeableProxy(address(new Bridge()), proxyAdmin, "")) - ); + function testInitialize_revert_NativeTokenMismatch_EthFeeToken( + BufferConfig memory bufferConfig + ) public { + Bridge _bridge = + Bridge(address(new TransparentUpgradeableProxy(address(new Bridge()), proxyAdmin, ""))); _bridge.initialize(IOwnable(address(new RollupMock(rollupOwner)))); - address seqInboxLogic = address(new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true)); + address seqInboxLogic = + address(new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, false)); SequencerInbox seqInboxProxy = SequencerInbox(TestUtil.deployProxy(seqInboxLogic)); vm.expectRevert(abi.encodeWithSelector(NativeTokenMismatch.selector)); - seqInboxProxy.initialize(IBridge(_bridge), maxTimeVariation); + seqInboxProxy.initialize(IBridge(_bridge), maxTimeVariation, bufferConfig); } - function testInitialize_revert_NativeTokenMismatch_FeeTokenEth() public { + function testInitialize_revert_NativeTokenMismatch_FeeTokenEth( + BufferConfig memory bufferConfig + ) public { ERC20Bridge _bridge = ERC20Bridge( address(new TransparentUpgradeableProxy(address(new ERC20Bridge()), proxyAdmin, "")) ); address nativeToken = address(new ERC20PresetMinterPauser("Appchain Token", "App")); _bridge.initialize(IOwnable(address(new RollupMock(rollupOwner))), nativeToken); - address seqInboxLogic = address(new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false)); + address seqInboxLogic = + address(new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, false)); SequencerInbox seqInboxProxy = SequencerInbox(TestUtil.deployProxy(seqInboxLogic)); vm.expectRevert(abi.encodeWithSelector(NativeTokenMismatch.selector)); - seqInboxProxy.initialize(IBridge(_bridge), maxTimeVariation); + seqInboxProxy.initialize(IBridge(_bridge), maxTimeVariation, bufferConfig); } - function testAddSequencerL2BatchFromOrigin_ArbitrumHosted() public { + function testAddSequencerL2BatchFromOrigin_ArbitrumHosted( + BufferConfig memory bufferConfig + ) public { // this will result in 'hostChainIsArbitrum = true' vm.mockCall( address(100), abi.encodeWithSelector(ArbSys.arbOSVersion.selector), abi.encode(uint256(11)) ); - (SequencerInbox seqInbox, Bridge bridge) = deployRollup(true); + (SequencerInbox seqInbox, Bridge bridge) = deployRollup(true, false, bufferConfig); address delayedInboxSender = address(140); uint8 delayedInboxKind = 3; @@ -396,7 +414,7 @@ contract SequencerInboxTest is Test { } function testAddSequencerL2BatchFromOriginReverts() public { - (SequencerInbox seqInbox, Bridge bridge) = deployRollup(false); + (SequencerInbox seqInbox, Bridge bridge) = deployRollup(false, false, bufferConfigDefault); address delayedInboxSender = address(140); uint8 delayedInboxKind = 3; bytes32 messageDataHash = RAND.Bytes32(); @@ -442,9 +460,7 @@ contract SequencerInboxTest is Test { ); vm.expectRevert( abi.encodeWithSelector( - DataTooLarge.selector, - bigData.length + seqInbox.HEADER_LENGTH(), - maxDataSize + DataTooLarge.selector, bigData.length + seqInbox.HEADER_LENGTH(), maxDataSize ) ); vm.prank(tx.origin); @@ -483,110 +499,112 @@ contract SequencerInboxTest is Test { ); } - function testPostUpgradeInitAlreadyInit() public returns (SequencerInbox, SequencerInbox) { - (SequencerInbox seqInbox, ) = deployRollup(false); - SequencerInbox seqInboxImpl = new SequencerInbox(maxDataSize, dummyReader4844, false); + function testPostUpgradeInitAlreadyInitBuffer( + BufferConfig memory bufferConfig + ) public returns (SequencerInbox, SequencerInbox) { + vm.assume(DelayBuffer.isValidBufferConfig(bufferConfig)); + (SequencerInbox seqInbox,) = deployRollup(false, false, bufferConfigDefault); + SequencerInbox seqInboxImpl = new SequencerInbox(maxDataSize, dummyReader4844, false, true); + vm.prank(proxyAdmin); + TransparentUpgradeableProxy(payable(address(seqInbox))).upgradeToAndCall( + address(seqInboxImpl), + abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector, bufferConfig) + ); vm.expectRevert(abi.encodeWithSelector(AlreadyInit.selector)); vm.prank(proxyAdmin); TransparentUpgradeableProxy(payable(address(seqInbox))).upgradeToAndCall( address(seqInboxImpl), - abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector) + abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector, bufferConfig) ); return (seqInbox, seqInboxImpl); } - function testPostUpgradeInit( - uint64 delayBlocks, - uint64 futureBlocks, - uint64 delaySeconds, - uint64 futureSeconds + function testPostUpgradeInitBuffer( + BufferConfig memory bufferConfig ) public { - vm.assume(delayBlocks != 0 || futureBlocks != 0 || delaySeconds != 0 || futureSeconds != 0); + vm.assume(DelayBuffer.isValidBufferConfig(bufferConfig)); - (SequencerInbox seqInbox, SequencerInbox seqInboxImpl) = testPostUpgradeInitAlreadyInit(); + (SequencerInbox seqInbox, SequencerInbox seqInboxImpl) = + testPostUpgradeInitAlreadyInitBuffer(bufferConfig); vm.expectRevert(abi.encodeWithSelector(AlreadyInit.selector)); vm.prank(proxyAdmin); TransparentUpgradeableProxy(payable(address(seqInbox))).upgradeToAndCall( address(seqInboxImpl), - abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector) + abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector, bufferConfig) ); - vm.store(address(seqInbox), bytes32(uint256(4)), bytes32(uint256(delayBlocks))); // slot 4: delayBlocks - vm.store(address(seqInbox), bytes32(uint256(5)), bytes32(uint256(futureBlocks))); // slot 5: futureBlocks - vm.store(address(seqInbox), bytes32(uint256(6)), bytes32(uint256(delaySeconds))); // slot 6: delaySeconds - vm.store(address(seqInbox), bytes32(uint256(7)), bytes32(uint256(futureSeconds))); // slot 7: futureSeconds + // reset buffer and config + vm.store(address(seqInbox), bytes32(uint256(12)), bytes32(0)); + vm.store(address(seqInbox), bytes32(uint256(13)), bytes32(0)); + vm.store(address(seqInbox), bytes32(uint256(14)), bytes32(0)); + vm.store(address(seqInbox), bytes32(uint256(15)), bytes32(0)); + vm.store(address(seqInbox), bytes32(uint256(16)), bytes32(0)); + vm.prank(proxyAdmin); TransparentUpgradeableProxy(payable(address(seqInbox))).upgradeToAndCall( address(seqInboxImpl), - abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector) - ); - - ( - uint256 delayBlocks_, - uint256 futureBlocks_, - uint256 delaySeconds_, - uint256 futureSeconds_ - ) = seqInbox.maxTimeVariation(); - assertEq(delayBlocks_, delayBlocks); - assertEq(futureBlocks_, futureBlocks); - assertEq(delaySeconds_, delaySeconds); - assertEq(futureSeconds_, futureSeconds); - + abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector, bufferConfig) + ); + { + (uint64 bufferBlocks, uint64 max, uint64 threshold,, uint64 replenishRateInBasis,) = + seqInbox.buffer(); + assertEq(max, bufferConfig.max); + assertEq(threshold, bufferConfig.threshold); + assertEq(replenishRateInBasis, bufferConfig.replenishRateInBasis); + assertEq(bufferBlocks, bufferConfig.max); + } vm.expectRevert(abi.encodeWithSelector(AlreadyInit.selector)); vm.prank(proxyAdmin); TransparentUpgradeableProxy(payable(address(seqInbox))).upgradeToAndCall( address(seqInboxImpl), - abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector) + abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector, bufferConfig) ); } - function testPostUpgradeInitBadInit( - uint256 delayBlocks, - uint256 futureBlocks, - uint256 delaySeconds, - uint256 futureSeconds + function testPostUpgradeInitBadInitBuffer( + BufferConfig memory config, + BufferConfig memory configInvalid ) public { - vm.assume(delayBlocks > uint256(type(uint64).max)); - vm.assume(futureBlocks > uint256(type(uint64).max)); - vm.assume(delaySeconds > uint256(type(uint64).max)); - vm.assume(futureSeconds > uint256(type(uint64).max)); + vm.assume(DelayBuffer.isValidBufferConfig(config)); + vm.assume(!DelayBuffer.isValidBufferConfig(configInvalid)); + + (SequencerInbox seqInbox, SequencerInbox seqInboxImpl) = + testPostUpgradeInitAlreadyInitBuffer(config); - (SequencerInbox seqInbox, SequencerInbox seqInboxImpl) = testPostUpgradeInitAlreadyInit(); + // reset buffer and config + vm.store(address(seqInbox), bytes32(uint256(12)), bytes32(0)); + vm.store(address(seqInbox), bytes32(uint256(13)), bytes32(0)); + vm.store(address(seqInbox), bytes32(uint256(14)), bytes32(0)); + vm.store(address(seqInbox), bytes32(uint256(15)), bytes32(0)); + vm.store(address(seqInbox), bytes32(uint256(16)), bytes32(0)); - vm.store(address(seqInbox), bytes32(uint256(4)), bytes32(delayBlocks)); // slot 4: delayBlocks - vm.store(address(seqInbox), bytes32(uint256(5)), bytes32(futureBlocks)); // slot 5: futureBlocks - vm.store(address(seqInbox), bytes32(uint256(6)), bytes32(delaySeconds)); // slot 6: delaySeconds - vm.store(address(seqInbox), bytes32(uint256(7)), bytes32(futureSeconds)); // slot 7: futureSeconds - vm.expectRevert(abi.encodeWithSelector(BadPostUpgradeInit.selector)); + vm.expectRevert(abi.encodeWithSelector(BadBufferConfig.selector)); vm.prank(proxyAdmin); TransparentUpgradeableProxy(payable(address(seqInbox))).upgradeToAndCall( address(seqInboxImpl), - abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector) + abi.encodeWithSelector(SequencerInbox.postUpgradeInit.selector, configInvalid) ); } - function testSetMaxTimeVariation( - uint256 delayBlocks, - uint256 futureBlocks, - uint256 delaySeconds, - uint256 futureSeconds + function testSetBufferConfig( + BufferConfig memory bufferConfig ) public { - vm.assume(delayBlocks <= uint256(type(uint64).max)); - vm.assume(futureBlocks <= uint256(type(uint64).max)); - vm.assume(delaySeconds <= uint256(type(uint64).max)); - vm.assume(futureSeconds <= uint256(type(uint64).max)); - (SequencerInbox seqInbox, ) = deployRollup(false); + vm.assume(DelayBuffer.isValidBufferConfig(bufferConfig)); + (SequencerInbox seqInbox,) = deployRollup(false, true, bufferConfig); vm.prank(rollupOwner); - seqInbox.setMaxTimeVariation( - ISequencerInbox.MaxTimeVariation({ - delayBlocks: delayBlocks, - futureBlocks: futureBlocks, - delaySeconds: delaySeconds, - futureSeconds: futureSeconds - }) - ); + seqInbox.setBufferConfig(bufferConfig); + } + + function testSetBufferConfigInvalid( + BufferConfig memory bufferConfigInvalid + ) public { + vm.assume(!DelayBuffer.isValidBufferConfig(bufferConfigInvalid)); + (SequencerInbox seqInbox,) = deployRollup(false, true, bufferConfigDefault); + vm.expectRevert(abi.encodeWithSelector(BadBufferConfig.selector)); + vm.prank(rollupOwner); + seqInbox.setBufferConfig(bufferConfigInvalid); } function testSetMaxTimeVariationOverflow( @@ -599,7 +617,7 @@ contract SequencerInboxTest is Test { vm.assume(futureBlocks > uint256(type(uint64).max)); vm.assume(delaySeconds > uint256(type(uint64).max)); vm.assume(futureSeconds > uint256(type(uint64).max)); - (SequencerInbox seqInbox, ) = deployRollup(false); + (SequencerInbox seqInbox,) = deployRollup(false, false, bufferConfigDefault); vm.expectRevert(abi.encodeWithSelector(BadMaxTimeVariation.selector)); vm.prank(rollupOwner); seqInbox.setMaxTimeVariation( diff --git a/test/foundry/util/TestUtil.sol b/test/foundry/util/TestUtil.sol index def8120c..f4230026 100644 --- a/test/foundry/util/TestUtil.sol +++ b/test/foundry/util/TestUtil.sol @@ -5,7 +5,9 @@ import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.so import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; library TestUtil { - function deployProxy(address logic) public returns (address) { + function deployProxy( + address logic + ) public returns (address) { ProxyAdmin pa = new ProxyAdmin(); return address(new TransparentUpgradeableProxy(address(logic), address(pa), "")); } @@ -19,7 +21,9 @@ contract Random { return seed; } - function Bytes(uint256 length) public returns (bytes memory) { + function Bytes( + uint256 length + ) public returns (bytes memory) { require(length > 0, "Length must be greater than 0"); bytes memory randomBytes = new bytes(length); diff --git a/test/signatures/BridgeCreator b/test/signatures/BridgeCreator index 33340999..20207d1f 100644 --- a/test/signatures/BridgeCreator +++ b/test/signatures/BridgeCreator @@ -1,10 +1,10 @@ { - "createBridge(address,address,address,(uint256,uint256,uint256,uint256))": "b4a5cc34", + "createBridge(address,address,address,(uint256,uint256,uint256,uint256),(uint64,uint64,uint64))": "57d3a200", "erc20BasedTemplates()": "76768ab9", "ethBasedTemplates()": "11f02227", "owner()": "8da5cb5b", "renounceOwnership()": "715018a6", "transferOwnership(address)": "f2fde38b", - "updateERC20Templates((address,address,address,address,address))": "1bb7c6cc", - "updateTemplates((address,address,address,address,address))": "d94d6e0a" + "updateERC20Templates((address,address,address,address,address,address))": "ceab9410", + "updateTemplates((address,address,address,address,address,address))": "e83b0e16" } diff --git a/test/signatures/ChallengeManager b/test/signatures/ChallengeManager deleted file mode 100644 index 1d582320..00000000 --- a/test/signatures/ChallengeManager +++ /dev/null @@ -1,21 +0,0 @@ -{ - "bisectExecution(uint64,(uint256,uint256,bytes32[],uint256),bytes32[])": "a521b032", - "bridge()": "e78cea92", - "challengeExecution(uint64,(uint256,uint256,bytes32[],uint256),uint8[2],bytes32[2],uint256)": "fb7be0a1", - "challengeInfo(uint64)": "7fd07a9c", - "challenges(uint256)": "8f1d3776", - "clearChallenge(uint64)": "56e9df97", - "createChallenge(bytes32,uint8[2],(bytes32[2],uint64[2])[2],uint64,address,address,uint256,uint256)": "14eab5e7", - "currentResponder(uint64)": "23a9ef23", - "getOsp(bytes32)": "3690b011", - "initialize(address,address,address,address)": "f8c8765e", - "isTimedOut(uint64)": "9ede42b9", - "oneStepProveExecution(uint64,(uint256,uint256,bytes32[],uint256),bytes)": "d248d124", - "osp()": "f26a62c6", - "ospCond(bytes32)": "dc74bf8b", - "postUpgradeInit(address,bytes32,address)": "5038934d", - "resultReceiver()": "3504f1d7", - "sequencerInbox()": "ee35f327", - "timeout(uint64)": "1b45c86a", - "totalChallengesCreated()": "5ef489e6" -} diff --git a/test/signatures/EdgeChallengeManager b/test/signatures/EdgeChallengeManager new file mode 100644 index 00000000..88baacf5 --- /dev/null +++ b/test/signatures/EdgeChallengeManager @@ -0,0 +1,34 @@ +{ + "LAYERZERO_BIGSTEPEDGE_HEIGHT()": "416e6657", + "LAYERZERO_BLOCKEDGE_HEIGHT()": "1dce5166", + "LAYERZERO_SMALLSTEPEDGE_HEIGHT()": "f8ee77d6", + "NUM_BIGSTEP_LEVEL()": "5d9e2444", + "assertionChain()": "48dd2924", + "bisectEdge(bytes32,bytes32,bytes)": "c8bc4e43", + "calculateEdgeId(uint8,bytes32,uint256,bytes32,uint256,bytes32)": "004d8efe", + "calculateMutualId(uint8,bytes32,uint256,bytes32,uint256)": "c32d8c63", + "challengePeriodBlocks()": "46c2781a", + "confirmEdgeByOneStepProof(bytes32,(bytes32,bytes),(bytes32,uint256,address,uint64,uint64),bytes32[],bytes32[])": "8c1b3a40", + "confirmEdgeByTime(bytes32,(((bytes32[2],uint64[2]),uint8,bytes32),bytes32,bytes32))": "b2a1408e", + "confirmedRival(bytes32)": "e5b123da", + "createLayerZeroEdge((uint8,bytes32,uint256,bytes32,bytes,bytes))": "05fae141", + "edgeExists(bytes32)": "750e0c0f", + "edgeLength(bytes32)": "eae0328b", + "excessStakeReceiver()": "e94e051e", + "firstRival(bytes32)": "bce6f54f", + "getEdge(bytes32)": "fda2892e", + "getLayerZeroEndHeight(uint8)": "42e1aaa8", + "getPrevAssertionHash(bytes32)": "5a48e0f4", + "hasLengthOneRival(bytes32)": "54b64151", + "hasMadeLayerZeroRival(address,bytes32)": "655b42f3", + "hasRival(bytes32)": "908517e9", + "initialize(address,uint64,address,uint256,uint256,uint256,address,address,uint8,uint256[])": "1a72d54c", + "multiUpdateTimeCacheByChildren(bytes32[],uint256)": "432bb78a", + "oneStepProofEntry()": "48923bc5", + "refundStake(bytes32)": "748926f3", + "stakeAmounts(uint256)": "1c1b4f3a", + "stakeToken()": "51ed6a30", + "timeUnrivaled(bytes32)": "3e35f5e8", + "updateTimerCacheByChildren(bytes32,uint256)": "edaab54a", + "updateTimerCacheByClaim(bytes32,bytes32,uint256)": "8826a370" +} diff --git a/test/signatures/OneStepProofEntry b/test/signatures/OneStepProofEntry index 404d208c..26cff384 100644 --- a/test/signatures/OneStepProofEntry +++ b/test/signatures/OneStepProofEntry @@ -1,7 +1,7 @@ { - "getEndMachineHash(uint8,bytes32)": "d8558b87", + "getMachineHash(((bytes32[2],uint64[2]),uint8))": "c39619c4", "getStartMachineHash(bytes32,bytes32)": "04997be4", - "proveOneStep((uint256,address),uint256,bytes32,bytes)": "5d3adcfb", + "proveOneStep((uint256,address,bytes32),uint256,bytes32,bytes)": "b5112fd2", "prover0()": "30a5509f", "proverHostIo()": "5f52fd7c", "proverMath()": "66e5d9c3", diff --git a/test/signatures/RollupAdminLogic b/test/signatures/RollupAdminLogic index 7db12d75..a0732e6f 100644 --- a/test/signatures/RollupAdminLogic +++ b/test/signatures/RollupAdminLogic @@ -5,33 +5,30 @@ "baseStake()": "76e7e23b", "bridge()": "e78cea92", "chainId()": "9a8a0592", + "challengeGracePeriodBlocks()": "3be680ea", "challengeManager()": "023a96fe", "confirmPeriodBlocks()": "2e7acfa6", - "createNitroMigrationGenesis((((bytes32[2],uint64[2]),uint8),((bytes32[2],uint64[2]),uint8),uint64))": "7b83a3fe", - "currentChallenge(address)": "69fd251c", - "extraChallengeTimeBlocks()": "771b2f97", - "firstUnresolvedNode()": "d735e21d", - "forceConfirmNode(uint64,bytes32,bytes32)": "2f7968e8", - "forceCreateNode(uint64,uint256,(((bytes32[2],uint64[2]),uint8),((bytes32[2],uint64[2]),uint8),uint64),bytes32)": "470dce4e", + "forceConfirmAssertion(bytes32,bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32)": "5bf03833", + "forceCreateAssertion(bytes32,((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32)": "9a7b4556", "forceRefundStaker(address[])": "7c75c298", - "forceResolveChallenge(address[],address[])": "f38c9379", - "getNode(uint64)": "92c8134c", - "getNodeCreationBlockForLogLookup(uint64)": "f63a434a", + "genesisAssertionHash()": "353325e0", + "getAssertion(bytes32)": "88302884", + "getAssertionCreationBlockForLogLookup(bytes32)": "13c56ca7", + "getFirstChildCreationBlock(bytes32)": "11715585", + "getSecondChildCreationBlock(bytes32)": "56bbc9e6", "getStaker(address)": "a23c44b1", "getStakerAddress(uint64)": "6ddd3744", + "getValidators()": "b7ab4db5", "inbox()": "fb0e722b", - "initialize((uint64,uint64,address,uint256,bytes32,address,address,uint256,string,uint64,(uint256,uint256,uint256,uint256)),(address,address,address,address,address,address,address,address,address,address))": "28ff127a", + "initialize((uint64,address,uint256,bytes32,address,address,uint256,string,uint256[],(uint256,uint256,uint256,uint256),uint256,uint256,uint256,((bytes32[2],uint64[2]),uint8,bytes32),uint256,address,uint8,uint64,(uint64,uint64,uint64)),(address,address,address,address,address,address,address,address,address))": "9e7e6aa7", + "isFirstChild(bytes32)": "30836228", + "isPending(bytes32)": "e531d8c7", "isStaked(address)": "6177fd18", - "isStakedOnLatestConfirmed(address)": "dcd030aa", "isValidator(address)": "facd743b", - "isZombie(address)": "91c657e8", - "lastStakeBlock()": "8640ce5f", "latestConfirmed()": "65f7f80d", - "latestNodeCreated()": "7ba9534a", - "latestStakedNode(address)": "3e96576e", + "latestStakedAssertion(address)": "2abdd230", "loserStakeEscrow()": "f065de3f", "minimumAssertionPeriod()": "45e38b64", - "nodeHasStaker(uint64,address)": "aa65af48", "outbox()": "ce11e6ab", "pause()": "8456cb59", "paused()": "5c975abb", @@ -43,33 +40,32 @@ "sequencerInbox()": "ee35f327", "setAnyTrustFastConfirmer(address)": "0d561b37", "setBaseStake(uint256)": "06ae5851", + "setChallengeManager(address)": "b7626e73", "setConfirmPeriodBlocks(uint64)": "ce66d05c", "setDelayedInbox(address,bool)": "47fb24c5", - "setExtraChallengeTimeBlocks(uint64)": "6136fe2e", "setInbox(address)": "53b60c4a", "setLoserStakeEscrow(address)": "fc8ffa03", "setMinimumAssertionPeriod(uint256)": "948d6588", "setOutbox(address)": "ff204f3b", "setOwner(address)": "13af4035", "setSequencerInbox(address)": "4f61f850", - "setStakeToken(address)": "0397d458", "setValidator(address[],bool[])": "a3ffb772", + "setValidatorAfkBlocks(uint64)": "f112cea3", "setValidatorWhitelistDisabled(bool)": "a2b4f1d8", "setWasmModuleRoot(bytes32)": "89384960", "stakeToken()": "51ed6a30", "stakerCount()": "dff69787", "totalWithdrawableFunds()": "71ef232c", - "upgradeBeacon(address,address)": "848bf918", "upgradeSecondaryTo(address)": "0d40a0fd", "upgradeSecondaryToAndCall(address,bytes)": "9846129a", "upgradeTo(address)": "3659cfe6", "upgradeToAndCall(address,bytes)": "4f1ef286", - "validatorUtils()": "014cc92c", + "validateAssertionHash(bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32,bytes32)": "e51019a6", + "validateConfig(bytes32,(bytes32,uint256,address,uint64,uint64))": "04972af9", + "validatorAfkBlocks()": "e6b3082c", "validatorWalletCreator()": "bc45e0ae", "validatorWhitelistDisabled()": "12ab3d3b", "wasmModuleRoot()": "8ee1a126", "withdrawableFunds(address)": "2f30cabd", - "zombieAddress(uint256)": "d01e6602", - "zombieCount()": "63721d6b", - "zombieLatestStakedNode(uint256)": "f33e1fac" + "withdrawalAddress(address)": "84728cd0" } diff --git a/test/signatures/RollupCore b/test/signatures/RollupCore index f830b8cc..8dd28355 100644 --- a/test/signatures/RollupCore +++ b/test/signatures/RollupCore @@ -5,27 +5,26 @@ "baseStake()": "76e7e23b", "bridge()": "e78cea92", "chainId()": "9a8a0592", + "challengeGracePeriodBlocks()": "3be680ea", "challengeManager()": "023a96fe", "confirmPeriodBlocks()": "2e7acfa6", - "currentChallenge(address)": "69fd251c", - "extraChallengeTimeBlocks()": "771b2f97", - "firstUnresolvedNode()": "d735e21d", - "getNode(uint64)": "92c8134c", - "getNodeCreationBlockForLogLookup(uint64)": "f63a434a", + "genesisAssertionHash()": "353325e0", + "getAssertion(bytes32)": "88302884", + "getAssertionCreationBlockForLogLookup(bytes32)": "13c56ca7", + "getFirstChildCreationBlock(bytes32)": "11715585", + "getSecondChildCreationBlock(bytes32)": "56bbc9e6", "getStaker(address)": "a23c44b1", "getStakerAddress(uint64)": "6ddd3744", + "getValidators()": "b7ab4db5", "inbox()": "fb0e722b", + "isFirstChild(bytes32)": "30836228", + "isPending(bytes32)": "e531d8c7", "isStaked(address)": "6177fd18", - "isStakedOnLatestConfirmed(address)": "dcd030aa", "isValidator(address)": "facd743b", - "isZombie(address)": "91c657e8", - "lastStakeBlock()": "8640ce5f", "latestConfirmed()": "65f7f80d", - "latestNodeCreated()": "7ba9534a", - "latestStakedNode(address)": "3e96576e", + "latestStakedAssertion(address)": "2abdd230", "loserStakeEscrow()": "f065de3f", "minimumAssertionPeriod()": "45e38b64", - "nodeHasStaker(uint64,address)": "aa65af48", "outbox()": "ce11e6ab", "paused()": "5c975abb", "rollupDeploymentBlock()": "1b1689e9", @@ -34,12 +33,12 @@ "stakeToken()": "51ed6a30", "stakerCount()": "dff69787", "totalWithdrawableFunds()": "71ef232c", - "validatorUtils()": "014cc92c", + "validateAssertionHash(bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32,bytes32)": "e51019a6", + "validateConfig(bytes32,(bytes32,uint256,address,uint64,uint64))": "04972af9", + "validatorAfkBlocks()": "e6b3082c", "validatorWalletCreator()": "bc45e0ae", "validatorWhitelistDisabled()": "12ab3d3b", "wasmModuleRoot()": "8ee1a126", "withdrawableFunds(address)": "2f30cabd", - "zombieAddress(uint256)": "d01e6602", - "zombieCount()": "63721d6b", - "zombieLatestStakedNode(uint256)": "f33e1fac" + "withdrawalAddress(address)": "84728cd0" } diff --git a/test/signatures/RollupCreator b/test/signatures/RollupCreator index 6c6f761a..9a9e681a 100644 --- a/test/signatures/RollupCreator +++ b/test/signatures/RollupCreator @@ -1,16 +1,15 @@ { "bridgeCreator()": "f860cefa", "challengeManagerTemplate()": "9c683d10", - "createRollup(((uint64,uint64,address,uint256,bytes32,address,address,uint256,string,uint64,(uint256,uint256,uint256,uint256)),address[],uint256,address,bool,uint256,address[],address))": "331f9b0b", + "createRollup(((uint64,address,uint256,bytes32,address,address,uint256,string,uint256[],(uint256,uint256,uint256,uint256),uint256,uint256,uint256,((bytes32[2],uint64[2]),uint8,bytes32),uint256,address,uint8,uint64,(uint64,uint64,uint64)),address[],uint256,address,bool,uint256,address[],address))": "5491abea", "l2FactoriesDeployer()": "ac0425bc", "osp()": "f26a62c6", "owner()": "8da5cb5b", "renounceOwnership()": "715018a6", "rollupAdminLogic()": "9dba3241", "rollupUserLogic()": "9d4798e3", - "setTemplates(address,address,address,address,address,address,address,address,address)": "ac9a97b4", + "setTemplates(address,address,address,address,address,address,address,address)": "f0dae494", "transferOwnership(address)": "f2fde38b", "upgradeExecutorLogic()": "030cb85e", - "validatorUtils()": "014cc92c", "validatorWalletCreator()": "bc45e0ae" } diff --git a/test/signatures/RollupUserLogic b/test/signatures/RollupUserLogic index 41ac3e65..acbc5a86 100644 --- a/test/signatures/RollupUserLogic +++ b/test/signatures/RollupUserLogic @@ -1,73 +1,62 @@ { - "VALIDATOR_AFK_BLOCKS()": "4ceccfe5", "_stakerMap(address)": "e8bd4922", - "addToDeposit(address)": "45c5b2c7", + "addToDeposit(address,address,uint256)": "685f5ecc", "amountStaked(address)": "ef40a670", "anyTrustFastConfirmer()": "55840a58", "baseStake()": "76e7e23b", "bridge()": "e78cea92", "chainId()": "9a8a0592", + "challengeGracePeriodBlocks()": "3be680ea", "challengeManager()": "023a96fe", - "completeChallenge(uint256,address,address)": "0357aa49", - "confirmNextNode(bytes32,bytes32)": "5eb405d5", + "computeAssertionHash(bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32)": "33635fc2", + "confirmAssertion(bytes32,bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32,(bytes32,uint256,address,uint64,uint64),bytes32)": "10b98a35", "confirmPeriodBlocks()": "2e7acfa6", - "countStakedZombies(uint64)": "5c617e94", - "countZombiesStakedOnChildren(uint64)": "6d08d0a2", - "createChallenge(address[2],uint64[2],uint8[2],(bytes32[2],uint64[2])[2],uint64,bytes32,uint256[2],bytes32[2])": "6f57644e", - "currentChallenge(address)": "69fd251c", - "currentRequiredStake()": "4d26732d", - "extraChallengeTimeBlocks()": "771b2f97", - "fastConfirmNextNode(bytes32,bytes32,bytes32)": "3ed57598", - "firstUnresolvedNode()": "d735e21d", - "getNode(uint64)": "92c8134c", - "getNodeCreationBlockForLogLookup(uint64)": "f63a434a", + "fastConfirmAssertion(bytes32,bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32)": "6096686d", + "fastConfirmNewAssertion(((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32)": "6420fb9f", + "genesisAssertionHash()": "353325e0", + "getAssertion(bytes32)": "88302884", + "getAssertionCreationBlockForLogLookup(bytes32)": "13c56ca7", + "getFirstChildCreationBlock(bytes32)": "11715585", + "getSecondChildCreationBlock(bytes32)": "56bbc9e6", "getStaker(address)": "a23c44b1", "getStakerAddress(uint64)": "6ddd3744", + "getValidators()": "b7ab4db5", "inbox()": "fb0e722b", "initialize(address)": "c4d66de8", - "isERC20Enabled()": "cd205fda", + "isFirstChild(bytes32)": "30836228", + "isPending(bytes32)": "e531d8c7", "isStaked(address)": "6177fd18", - "isStakedOnLatestConfirmed(address)": "dcd030aa", "isValidator(address)": "facd743b", - "isZombie(address)": "91c657e8", - "lastStakeBlock()": "8640ce5f", "latestConfirmed()": "65f7f80d", - "latestNodeCreated()": "7ba9534a", - "latestStakedNode(address)": "3e96576e", + "latestStakedAssertion(address)": "2abdd230", "loserStakeEscrow()": "f065de3f", "minimumAssertionPeriod()": "45e38b64", - "newStakeOnExistingNode(uint64,bytes32)": "ced01cfb", - "newStakeOnNewNode((((bytes32[2],uint64[2]),uint8),((bytes32[2],uint64[2]),uint8),uint64),bytes32,uint256)": "4774e576", - "nodeHasStaker(uint64,address)": "aa65af48", + "newStake(uint256,address)": "68129b14", + "newStakeOnNewAssertion(uint256,((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32)": "7300201c", + "newStakeOnNewAssertion(uint256,((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32,address)": "50f32f68", "outbox()": "ce11e6ab", "owner()": "8da5cb5b", "paused()": "5c975abb", "proxiableUUID()": "52d1902d", "reduceDeposit(uint256)": "1e83d30f", - "rejectNextNode(address)": "6b94c33b", - "removeOldZombies(uint256)": "edfd03ed", "removeWhitelistAfterFork()": "c2c2e68e", "removeWhitelistAfterValidatorAfk()": "18baaab9", - "removeZombie(uint256,uint256)": "7e2d2155", - "requireUnresolved(uint256)": "2b2af0ab", - "requireUnresolvedExists()": "67425daf", - "requiredStake(uint256,uint64,uint64)": "b0ebedc7", - "returnOldDeposit(address)": "7427be51", + "returnOldDeposit()": "57ef4ab9", + "returnOldDepositFor(address)": "588c7a16", "rollupDeploymentBlock()": "1b1689e9", "rollupEventInbox()": "aa38a6e7", "sequencerInbox()": "ee35f327", - "stakeOnExistingNode(uint64,bytes32)": "1aeb55a0", - "stakeOnNewNode((((bytes32[2],uint64[2]),uint8),((bytes32[2],uint64[2]),uint8),uint64),bytes32,uint256)": "54ce8961", + "stakeOnNewAssertion(((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32)": "3b86de19", "stakeToken()": "51ed6a30", "stakerCount()": "dff69787", "totalWithdrawableFunds()": "71ef232c", - "validatorUtils()": "014cc92c", + "validateAssertionHash(bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32,bytes32)": "e51019a6", + "validateConfig(bytes32,(bytes32,uint256,address,uint64,uint64))": "04972af9", + "validatorAfkBlocks()": "e6b3082c", "validatorWalletCreator()": "bc45e0ae", "validatorWhitelistDisabled()": "12ab3d3b", "wasmModuleRoot()": "8ee1a126", "withdrawStakerFunds()": "61373919", "withdrawableFunds(address)": "2f30cabd", - "zombieAddress(uint256)": "d01e6602", - "zombieCount()": "63721d6b", - "zombieLatestStakedNode(uint256)": "f33e1fac" + "withdrawalAddress(address)": "84728cd0" } diff --git a/test/signatures/SequencerInbox b/test/signatures/SequencerInbox index 18c3db02..13425aba 100644 --- a/test/signatures/SequencerInbox +++ b/test/signatures/SequencerInbox @@ -7,29 +7,36 @@ "TREE_DAS_MESSAGE_HEADER_FLAG()": "6c890450", "ZERO_HEAVY_MESSAGE_HEADER_FLAG()": "02c99275", "addSequencerL2Batch(uint256,bytes,uint256,address,uint256,uint256)": "e0bc9729", + "addSequencerL2BatchDelayProof(uint256,bytes,uint256,address,uint256,uint256,(bytes32,(uint8,address,uint64,uint64,uint256,uint256,bytes32)))": "6e620055", "addSequencerL2BatchFromBlobs(uint256,uint256,address,uint256,uint256)": "3e5aa082", + "addSequencerL2BatchFromBlobsDelayProof(uint256,uint256,address,uint256,uint256,(bytes32,(uint8,address,uint64,uint64,uint256,uint256,bytes32)))": "917cf8ac", "addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address)": "6f12b0c9", "addSequencerL2BatchFromOrigin(uint256,bytes,uint256,address,uint256,uint256)": "8f111f3c", + "addSequencerL2BatchFromOriginDelayProof(uint256,bytes,uint256,address,uint256,uint256,(bytes32,(uint8,address,uint64,uint64,uint256,uint256,bytes32)))": "69cacded", "batchCount()": "06f13056", "batchPosterManager()": "cc2a1a0c", "bridge()": "e78cea92", + "buffer()": "edaafe20", "dasKeySetInfo(bytes32)": "715ea34b", "forceInclusion(uint256,uint8,uint64[2],uint256,address,bytes32)": "f1981578", + "forceInclusionDeadline(uint64)": "dd44e6e0", "getKeysetCreationBlock(bytes32)": "258f0495", "inboxAccs(uint256)": "d9dd67ab", - "initialize(address,(uint256,uint256,uint256,uint256))": "1f7a92b2", + "initialize(address,(uint256,uint256,uint256,uint256),(uint64,uint64,uint64))": "1ad87e45", "invalidateKeysetHash(bytes32)": "84420860", "isBatchPoster(address)": "71c3e6fe", + "isDelayBufferable()": "4b678a66", "isSequencer(address)": "6d46e987", "isUsingFeeToken()": "92d9f782", "isValidKeysetHash(bytes32)": "1637be48", "maxDataSize()": "e8eb1dc3", "maxTimeVariation()": "ebea461d", - "postUpgradeInit()": "95fcea78", + "postUpgradeInit((uint64,uint64,uint64))": "a655d937", "reader4844()": "8d910dde", "removeDelayAfterFork()": "96cc5c78", "rollup()": "cb23bcb5", "setBatchPosterManager(address)": "1ff64790", + "setBufferConfig((uint64,uint64,uint64))": "2f3985a7", "setIsBatchPoster(address,bool)": "6e7df3e7", "setIsSequencer(address,bool)": "1f956632", "setMaxTimeVariation((uint256,uint256,uint256,uint256))": "b31761f8", diff --git a/test/signatures/test-sigs.bash b/test/signatures/test-sigs.bash index 09c4bb6f..549e5adf 100755 --- a/test/signatures/test-sigs.bash +++ b/test/signatures/test-sigs.bash @@ -1,6 +1,6 @@ #!/bin/bash output_dir="./test/signatures" -for CONTRACTNAME in Bridge Inbox Outbox RollupCore RollupUserLogic RollupAdminLogic SequencerInbox ChallengeManager ERC20Bridge ERC20Inbox ERC20Outbox BridgeCreator DeployHelper RollupCreator OneStepProofEntry CacheManager +for CONTRACTNAME in Bridge Inbox Outbox RollupCore RollupUserLogic RollupAdminLogic SequencerInbox EdgeChallengeManager ERC20Bridge ERC20Inbox ERC20Outbox BridgeCreator DeployHelper RollupCreator OneStepProofEntry CacheManager do echo "Checking for signature changes in $CONTRACTNAME" [ -f "$output_dir/$CONTRACTNAME" ] && mv "$output_dir/$CONTRACTNAME" "$output_dir/$CONTRACTNAME-old" diff --git a/test/stakingPool/AbsBoldStakingPool.t.sol b/test/stakingPool/AbsBoldStakingPool.t.sol new file mode 100644 index 00000000..b0862d8c --- /dev/null +++ b/test/stakingPool/AbsBoldStakingPool.t.sol @@ -0,0 +1,199 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "forge-std/Test.sol"; + +import "../../src/assertionStakingPool/AbsBoldStakingPool.sol"; +import "../../src/mocks/TestWETH9.sol"; + +contract FundsHolder { + function withdraw(IERC20 stakeToken, uint256 amount) external { + stakeToken.transfer(msg.sender, amount); + } +} + +contract FakeStakingPool is AbsBoldStakingPool { + FundsHolder public immutable fundsHolder; + uint256 immutable reqStake; + + constructor( + address _stakeToken, + FundsHolder _fundsHolder, + uint256 _reqStake + ) AbsBoldStakingPool(_stakeToken) { + fundsHolder = _fundsHolder; + reqStake = _reqStake; + } + + function createMove() external { + IERC20(stakeToken).transfer(address(fundsHolder), reqStake); + } + + function withdrawStakeBackIntoPool() external { + fundsHolder.withdraw(IERC20(stakeToken), reqStake); + } +} + +contract AbsBoldStakingPoolTest is Test { + uint256 constant BASE_STAKE = 10 ether; + + address staker1 = address(4000001); + address staker2 = address(4000002); + address excessStaker = address(4000003); + address fullStaker = address(4000004); + + uint256 staker1Bal = 6 ether; + uint256 staker2Bal = 4 ether; + uint256 fullStakerBal = 10 ether; + uint256 excessStakerBal = 1 ether; + + IERC20 token; + FakeStakingPool pool; + + event StakeDeposited(address indexed sender, uint256 amount); + + function setUp() public { + token = new TestWETH9("Test", "TEST"); + pool = new FakeStakingPool(address(token), new FundsHolder(), BASE_STAKE); + + IWETH9(address(token)).deposit{value: 21 ether}(); + + token.transfer(staker1, staker1Bal); + token.transfer(staker2, staker2Bal); + token.transfer(fullStaker, fullStakerBal); + + token.transfer(excessStaker, excessStakerBal); + + vm.prank(staker1); + token.approve(address(pool), type(uint256).max); + + vm.prank(staker2); + token.approve(address(pool), type(uint256).max); + + vm.prank(fullStaker); + token.approve(address(pool), type(uint256).max); + + vm.prank(excessStaker); + token.approve(address(pool), type(uint256).max); + } + + function testOverDeposit() external { + vm.prank(staker1); + pool.depositIntoPool(staker1Bal); + vm.prank(staker2); + pool.depositIntoPool(staker2Bal); + + vm.startPrank(excessStaker); + pool.depositIntoPool(excessStakerBal); + pool.withdrawFromPool(); + vm.stopPrank(); + assertEq(token.balanceOf(excessStaker), excessStakerBal, "excess balance returned"); + } + + function testCanDepositAndWithdrawWhilePending() external { + vm.prank(staker1); + pool.depositIntoPool(staker1Bal); + vm.prank(staker2); + pool.depositIntoPool(staker2Bal); + + assertEq( + token.balanceOf(address(pool)), staker1Bal + staker2Bal, "tokens depositted into pool" + ); + assertEq(token.balanceOf(address(staker1)), uint256(0), "tokens depositted into pool"); + assertEq(token.balanceOf(address(staker2)), uint256(0), "tokens depositted into pool"); + + vm.prank(staker1); + pool.withdrawFromPool(); + + vm.prank(staker2); + pool.withdrawFromPool(); + + assertEq(token.balanceOf(address(pool)), uint256(0), "tokens withdrawn from pool"); + assertEq(token.balanceOf(address(staker1)), staker1Bal, "tokens withdrawn from pool"); + assertEq(token.balanceOf(address(staker2)), staker2Bal, "tokens withdrawn from pool"); + } + + function testCantAssertWithInsufficientStake() external { + vm.prank(staker1); + pool.depositIntoPool(staker1Bal); + + vm.expectRevert("ERC20: transfer amount exceeds balance"); + pool.createMove(); + } + + function testCanDepositInAssertedState() external { + vm.startPrank(excessStaker); + pool.depositIntoPool(excessStakerBal); + pool.withdrawFromPool(); + vm.stopPrank(); + + assertEq(token.balanceOf(excessStaker), excessStakerBal, "excess balance returned"); + } + + function testPartialWithdraw() external { + vm.prank(staker1); + pool.depositIntoPool(staker1Bal); + + vm.startPrank(fullStaker); + pool.depositIntoPool(fullStakerBal); + pool.createMove(); + + vm.expectRevert("ERC20: transfer amount exceeds balance"); + pool.withdrawFromPool(); + + pool.withdrawFromPool(staker1Bal); + assertEq(token.balanceOf(fullStaker), staker1Bal, "partial stake returned"); + + vm.stopPrank(); + } + + function testReturnStake() external { + vm.prank(staker1); + pool.depositIntoPool(staker1Bal); + vm.prank(staker2); + pool.depositIntoPool(staker2Bal); + + pool.createMove(); + assertEq(token.balanceOf(address(pool)), 0, "tokens sent from pool"); + + vm.expectRevert("ERC20: transfer amount exceeds balance"); + vm.prank(staker1); + pool.withdrawFromPool(); + + pool.withdrawStakeBackIntoPool(); + assertEq(token.balanceOf(address(pool)), BASE_STAKE, "tokens returned to pool"); + + vm.prank(staker1); + pool.withdrawFromPool(); + + vm.prank(staker2); + pool.withdrawFromPool(); + + assertEq(token.balanceOf(address(pool)), 0, "tokens returned to users"); + assertEq(token.balanceOf(staker1), staker1Bal, "tokens returned to users"); + assertEq(token.balanceOf(staker2), staker2Bal, "tokens returned to users"); + } + + function testCantWithdrawTwice() external { + vm.prank(staker1); + pool.depositIntoPool(staker1Bal); + vm.prank(staker2); + pool.depositIntoPool(staker2Bal); + + pool.createMove(); + assertEq(token.balanceOf(address(pool)), 0, "tokens sent from pool"); + + vm.expectRevert("ERC20: transfer amount exceeds balance"); + vm.prank(staker1); + pool.withdrawFromPool(); + + pool.withdrawStakeBackIntoPool(); + assertEq(token.balanceOf(address(pool)), BASE_STAKE, "tokens returned to pool"); + + vm.startPrank(staker1); + pool.withdrawFromPool(); + vm.expectRevert(abi.encodeWithSelector(IAbsBoldStakingPool.ZeroAmount.selector)); + pool.withdrawFromPool(); + vm.stopPrank(); + } +} diff --git a/test/stakingPool/AssertionStakingPool.t.sol b/test/stakingPool/AssertionStakingPool.t.sol new file mode 100644 index 00000000..7b58ec4b --- /dev/null +++ b/test/stakingPool/AssertionStakingPool.t.sol @@ -0,0 +1,373 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "forge-std/Test.sol"; + +import "../../src/rollup/RollupProxy.sol"; + +import "../../src/rollup/RollupCore.sol"; +import "../../src/rollup/RollupUserLogic.sol"; +import "../../src/rollup/RollupAdminLogic.sol"; +import "../../src/rollup/RollupCreator.sol"; + +import "../../src/osp/OneStepProver0.sol"; +import "../../src/osp/OneStepProverMemory.sol"; +import "../../src/osp/OneStepProverMath.sol"; +import "../../src/osp/OneStepProverHostIo.sol"; +import "../../src/osp/OneStepProofEntry.sol"; +import "../../src/challengeV2/EdgeChallengeManager.sol"; +import "../challengeV2/Utils.sol"; + +import "../../src/libraries/Error.sol"; + +import "../../src/mocks/TestWETH9.sol"; +import "../../src/mocks/UpgradeExecutorMock.sol"; + +import "../../src/assertionStakingPool/AssertionStakingPool.sol"; +import "../../src/assertionStakingPool/AssertionStakingPoolCreator.sol"; + +import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; + +contract AssertionPoolTest is Test { + address constant owner = address(1337); + address constant sequencer = address(7331); + + bytes32 constant WASM_MODULE_ROOT = keccak256("WASM_MODULE_ROOT"); + uint256 constant BASE_STAKE = 10 ether; + uint64 constant CONFIRM_PERIOD_BLOCKS = 100; + uint256 constant MAX_DATA_SIZE = 117964; + uint64 constant CHALLENGE_GRACE_PERIOD_BLOCKS = 10; + + bytes32 constant FIRST_ASSERTION_BLOCKHASH = keccak256("FIRST_ASSERTION_BLOCKHASH"); + bytes32 constant FIRST_ASSERTION_SENDROOT = keccak256("FIRST_ASSERTION_SENDROOT"); + + IERC20 token; + RollupUserLogic userRollup; + RollupAdminLogic adminRollup; + EdgeChallengeManager challengeManager; + + GlobalState emptyGlobalState; + AssertionState emptyAssertionState = + AssertionState(emptyGlobalState, MachineStatus.FINISHED, bytes32(0)); + bytes32 genesisHash = RollupLib.assertionHash({ + parentAssertionHash: bytes32(0), + afterState: emptyAssertionState, + inboxAcc: bytes32(0) + }); + AssertionState firstState; + + IAssertionStakingPool pool; + + AssertionStakingPoolCreator aspcreator; + address staker1 = address(4000001); + address staker2 = address(4000002); + address excessStaker = address(4000003); + address fullStaker = address(4000004); + + address rando = address(4000005); + + uint256 staker1Bal = 6 ether; + uint256 staker2Bal = 4 ether; + uint256 fullStakerBal = 10 ether; + uint256 excessStakerBal = 1 ether; + + address rollupAddr; + AssertionInputs assertionInputs; + bytes32 assertionHash; + AssertionState afterState; + uint64 inboxcount; + address upgradeExecutorAddr; + + event RollupCreated( + address indexed rollupAddress, + address indexed nativeToken, + address inboxAddress, + address outbox, + address rollupEventInbox, + address challengeManager, + address adminProxy, + address sequencerInbox, + address bridge, + address upgradeExecutor, + address validatorWalletCreator + ); + + IReader4844 dummyReader4844 = IReader4844(address(137)); + BridgeCreator.BridgeTemplates ethBasedTemplates = BridgeCreator.BridgeTemplates({ + bridge: new Bridge(), + sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, false), + delayBufferableSequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, false, true), + inbox: new Inbox(MAX_DATA_SIZE), + rollupEventInbox: new RollupEventInbox(), + outbox: new Outbox() + }); + BridgeCreator.BridgeTemplates erc20BasedTemplates = BridgeCreator.BridgeTemplates({ + bridge: new ERC20Bridge(), + sequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, false), + delayBufferableSequencerInbox: new SequencerInbox(MAX_DATA_SIZE, dummyReader4844, true, false), + inbox: new ERC20Inbox(MAX_DATA_SIZE), + rollupEventInbox: new ERC20RollupEventInbox(), + outbox: new ERC20Outbox() + }); + + function setUp() public { + OneStepProver0 oneStepProver = new OneStepProver0(); + OneStepProverMemory oneStepProverMemory = new OneStepProverMemory(); + OneStepProverMath oneStepProverMath = new OneStepProverMath(); + OneStepProverHostIo oneStepProverHostIo = new OneStepProverHostIo(); + OneStepProofEntry oneStepProofEntry = new OneStepProofEntry( + oneStepProver, oneStepProverMemory, oneStepProverMath, oneStepProverHostIo + ); + EdgeChallengeManager edgeChallengeManager = new EdgeChallengeManager(); + BridgeCreator bridgeCreator = new BridgeCreator(ethBasedTemplates, erc20BasedTemplates); + RollupCreator rollupCreator = new RollupCreator(); + RollupAdminLogic rollupAdminLogicImpl = new RollupAdminLogic(); + RollupUserLogic rollupUserLogicImpl = new RollupUserLogic(); + DeployHelper deployHelper = new DeployHelper(); + IUpgradeExecutor upgradeExecutorLogic = new UpgradeExecutorMock(); + + rollupCreator.setTemplates( + bridgeCreator, + oneStepProofEntry, + edgeChallengeManager, + rollupAdminLogicImpl, + rollupUserLogicImpl, + upgradeExecutorLogic, + address(0), + deployHelper + ); + AssertionState memory emptyState = AssertionState( + GlobalState([bytes32(0), bytes32(0)], [uint64(0), uint64(0)]), + MachineStatus.FINISHED, + bytes32(0) + ); + token = new TestWETH9("Test", "TEST"); + IWETH9(address(token)).deposit{value: 21 ether}(); + + uint256[] memory miniStakeValues = new uint256[](4); + miniStakeValues[0] = 1 ether; + miniStakeValues[1] = 2 ether; + miniStakeValues[2] = 3 ether; + miniStakeValues[3] = 4 ether; + Config memory config = Config({ + baseStake: BASE_STAKE, + chainId: 0, + chainConfig: "{}", + confirmPeriodBlocks: uint64(CONFIRM_PERIOD_BLOCKS), + owner: owner, + sequencerInboxMaxTimeVariation: ISequencerInbox.MaxTimeVariation({ + delayBlocks: (60 * 60 * 24) / 15, + futureBlocks: 12, + delaySeconds: 60 * 60 * 24, + futureSeconds: 60 * 60 + }), + stakeToken: address(token), + wasmModuleRoot: WASM_MODULE_ROOT, + loserStakeEscrow: address(200001), + genesisAssertionState: emptyState, + genesisInboxCount: 0, + miniStakeValues: miniStakeValues, + layerZeroBlockEdgeHeight: 2 ** 5, + layerZeroBigStepEdgeHeight: 2 ** 5, + layerZeroSmallStepEdgeHeight: 2 ** 5, + numBigStepLevel: 2, + anyTrustFastConfirmer: address(300001), + challengeGracePeriodBlocks: CHALLENGE_GRACE_PERIOD_BLOCKS, + bufferConfig: BufferConfig({threshold: 600, max: 14400, replenishRateInBasis: 500}) + }); + + vm.expectEmit(false, false, false, false); + emit RollupCreated( + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + address(0) + ); + RollupCreator.RollupDeploymentParams memory param = RollupCreator.RollupDeploymentParams({ + config: config, + validators: new address[](0), + maxDataSize: MAX_DATA_SIZE, + nativeToken: address(0), + deployFactoriesToL2: false, + maxFeePerGasForRetryables: 0, + batchPosters: new address[](0), + batchPosterManager: address(0) + }); + + rollupAddr = rollupCreator.createRollup(param); + userRollup = RollupUserLogic(address(rollupAddr)); + adminRollup = RollupAdminLogic(address(rollupAddr)); + challengeManager = EdgeChallengeManager(address(userRollup.challengeManager())); + upgradeExecutorAddr = userRollup.owner(); + + vm.startPrank(upgradeExecutorAddr); + adminRollup.sequencerInbox().setIsBatchPoster(sequencer, true); + vm.stopPrank(); + + firstState.machineStatus = MachineStatus.FINISHED; + firstState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + firstState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + firstState.globalState.u64Vals[0] = 1; // inbox count + firstState.globalState.u64Vals[1] = 0; // pos in msg + + vm.roll(block.number + 75); + + inboxcount = uint64(_createNewBatch()); + AssertionState memory beforeState; + beforeState.machineStatus = MachineStatus.FINISHED; + afterState.machineStatus = MachineStatus.FINISHED; + afterState.globalState.bytes32Vals[0] = FIRST_ASSERTION_BLOCKHASH; // blockhash + afterState.globalState.bytes32Vals[1] = FIRST_ASSERTION_SENDROOT; // sendroot + afterState.globalState.u64Vals[0] = 1; // inbox count + afterState.globalState.u64Vals[1] = 0; // pos in msg + + assertionHash = RollupLib.assertionHash({ + parentAssertionHash: genesisHash, + afterState: afterState, + inboxAcc: userRollup.bridge().sequencerInboxAccs(0) + }); + + assertionInputs = AssertionInputs({ + beforeStateData: BeforeStateData({ + sequencerBatchAcc: bytes32(0), + prevPrevAssertionHash: bytes32(0), + configData: ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: afterState.globalState.u64Vals[0] + }) + }), + beforeState: beforeState, + afterState: afterState + }); + aspcreator = new AssertionStakingPoolCreator(); + + vm.expectRevert(abi.encodeWithSelector(IAssertionStakingPool.EmptyAssertionId.selector)); + pool = aspcreator.createPool(address(rollupAddr), bytes32(0)); + pool = aspcreator.createPool(address(rollupAddr), assertionHash); + + token.transfer(staker1, staker1Bal); + token.transfer(staker2, staker2Bal); + token.transfer(fullStaker, fullStakerBal); + + token.transfer(excessStaker, excessStakerBal); + + vm.prank(staker1); + token.approve(address(pool), type(uint256).max); + + vm.prank(staker2); + token.approve(address(pool), type(uint256).max); + + vm.prank(fullStaker); + token.approve(address(pool), type(uint256).max); + + vm.prank(excessStaker); + token.approve(address(pool), type(uint256).max); + + vm.prank(upgradeExecutorAddr); + adminRollup.setValidatorWhitelistDisabled(true); + } + + function _createNewBatch() internal returns (uint256) { + uint256 count = userRollup.bridge().sequencerMessageCount(); + vm.startPrank(sequencer); + userRollup.sequencerInbox().addSequencerL2Batch({ + sequenceNumber: count, + data: "", + afterDelayedMessagesRead: 1, + gasRefunder: IGasRefunder(address(0)), + prevMessageCount: 0, + newMessageCount: 0 + }); + vm.stopPrank(); + assertEq(userRollup.bridge().sequencerMessageCount(), ++count); + return count; + } + + function testGetPool() external { + assertEq( + address(pool), + address(aspcreator.getPool(rollupAddr, assertionHash)), + "getPool returns created pool's expected address" + ); + } + + function testCantAssertTwice() external { + vm.prank(staker1); + pool.depositIntoPool(staker1Bal); + vm.prank(staker2); + pool.depositIntoPool(staker2Bal); + + pool.createAssertion(assertionInputs); + + vm.expectRevert("ALREADY_STAKED"); + pool.createAssertion(assertionInputs); + } + + function testCantAssertTwiceAfterConfirmed() external { + _createAndConfirmAssertion(); + pool.makeStakeWithdrawable(); + pool.withdrawStakeBackIntoPool(); + + vm.expectRevert("EXPECTED_ASSERTION_SEEN"); + pool.createAssertion(assertionInputs); + } + + function testCantMakeBadAssertion() external { + vm.prank(staker1); + pool.depositIntoPool(staker1Bal); + vm.prank(staker2); + pool.depositIntoPool(staker2Bal); + + AssertionInputs memory _inputs = assertionInputs; + _inputs.afterState.endHistoryRoot = keccak256("bad"); + vm.expectRevert("UNEXPECTED_ASSERTION_HASH"); + pool.createAssertion(_inputs); + } + + function _createAssertion() internal { + vm.prank(staker1); + pool.depositIntoPool(staker1Bal); + vm.prank(staker2); + pool.depositIntoPool(staker2Bal); + + vm.prank(rando); + pool.createAssertion(assertionInputs); + } + + function _createAndConfirmAssertion() internal { + _createAssertion(); + vm.roll(userRollup.getAssertion(genesisHash).firstChildBlock + CONFIRM_PERIOD_BLOCKS + 1); + bytes32 inboxAccs = userRollup.bridge().sequencerInboxAccs(0); + userRollup.confirmAssertion( + assertionHash, + genesisHash, + firstState, + bytes32(0), + ConfigData({ + wasmModuleRoot: WASM_MODULE_ROOT, + requiredStake: BASE_STAKE, + challengeManager: address(challengeManager), + confirmPeriodBlocks: CONFIRM_PERIOD_BLOCKS, + nextInboxPosition: firstState.globalState.u64Vals[0] + }), + inboxAccs + ); + } + + function testCanAssert() external { + _createAssertion(); + assertEq(token.balanceOf(address(pool)), 0, "stake moved to rollup"); + assertEq(token.balanceOf(address(userRollup)), BASE_STAKE, "stake moved to rollup"); + } +} diff --git a/test/stakingPool/EdgeStakingPool.t.sol b/test/stakingPool/EdgeStakingPool.t.sol new file mode 100644 index 00000000..fff7da06 --- /dev/null +++ b/test/stakingPool/EdgeStakingPool.t.sol @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "forge-std/Test.sol"; +import "../ERC20Mock.sol"; +import "../../src/assertionStakingPool/EdgeStakingPoolCreator.sol"; +import "../../src/challengeV2/EdgeChallengeManager.sol"; + +contract MockChallengeManager { + IERC20 public immutable stakeToken; + + event EdgeCreated(CreateEdgeArgs args); + + constructor( + IERC20 _token + ) { + stakeToken = _token; + } + + function createLayerZeroEdge( + CreateEdgeArgs calldata args + ) external returns (bytes32) { + stakeToken.transferFrom(msg.sender, address(this), stakeAmounts(args.level)); + + emit EdgeCreated(args); + + return keccak256(abi.encode(args)); + } + + function stakeAmounts( + uint256 lvl + ) public pure returns (uint256) { + return 100 * (lvl + 1); + } +} + +contract EdgeStakingPoolTest is Test { + IERC20 token; + MockChallengeManager challengeManager; + EdgeStakingPoolCreator stakingPoolCreator; + + event EdgeCreated(CreateEdgeArgs args); + + function setUp() public { + token = new ERC20Mock("TEST", "TST", address(this), 100 ether); + challengeManager = new MockChallengeManager(token); + stakingPoolCreator = new EdgeStakingPoolCreator(); + } + + function testProperInitialization( + bytes32 edgeId + ) public { + vm.assume(edgeId != bytes32(0)); + IEdgeStakingPool stakingPool = + stakingPoolCreator.createPool(address(challengeManager), edgeId); + + assertEq( + address(stakingPoolCreator.getPool(address(challengeManager), edgeId)), + address(stakingPool) + ); + + assertEq(address(stakingPool.challengeManager()), address(challengeManager)); + assertEq(stakingPool.edgeId(), edgeId); + assertEq(address(stakingPool.stakeToken()), address(token)); + } + + function testEmptyEdgeId() public { + vm.expectRevert(abi.encodeWithSelector(IEdgeStakingPool.EmptyEdgeId.selector)); + stakingPoolCreator.createPool(address(challengeManager), bytes32(0)); + } + + function testCreateEdge( + CreateEdgeArgs memory args + ) public { + uint256 requiredStake = challengeManager.stakeAmounts(args.level); + bytes32 realEdgeId = keccak256(abi.encode(args)); + IEdgeStakingPool stakingPool = + stakingPoolCreator.createPool(address(challengeManager), realEdgeId); + + // simulate deposits + // we don't need to deposit using the staking pool's deposit function because we're not testing that here + token.transfer(address(stakingPool), requiredStake - 1); + vm.expectRevert("ERC20: transfer amount exceeds balance"); + stakingPool.createEdge(args); + token.transfer(address(stakingPool), 1); + + // simulate an incorrect edge id + args.claimId = ~args.claimId; + vm.expectRevert( + abi.encodeWithSelector( + IEdgeStakingPool.IncorrectEdgeId.selector, keccak256(abi.encode(args)), realEdgeId + ) + ); + stakingPool.createEdge(args); + args.claimId = ~args.claimId; + + vm.expectEmit(false, false, false, true); + emit EdgeCreated(args); + stakingPool.createEdge(args); + + assertEq(token.balanceOf(address(stakingPool)), 0); + assertEq(token.balanceOf(address(challengeManager)), requiredStake); + } +} diff --git a/test/storage/Bridge b/test/storage/Bridge index 9ed7f48a..718f08c8 100644 --- a/test/storage/Bridge +++ b/test/storage/Bridge @@ -1,6 +1,6 @@ | Name | Type | Slot | Offset | Bytes | Contract | |----------------------------------|------------------------------------------------|------|--------|-------|------------------------------| -| _initialized | bool | 0 | 0 | 1 | src/bridge/Bridge.sol:Bridge | +| _initialized | uint8 | 0 | 0 | 1 | src/bridge/Bridge.sol:Bridge | | _initializing | bool | 0 | 1 | 1 | src/bridge/Bridge.sol:Bridge | | allowedDelayedInboxesMap | mapping(address => struct AbsBridge.InOutInfo) | 1 | 0 | 32 | src/bridge/Bridge.sol:Bridge | | allowedOutboxesMap | mapping(address => struct AbsBridge.InOutInfo) | 2 | 0 | 32 | src/bridge/Bridge.sol:Bridge | diff --git a/test/storage/CacheManager b/test/storage/CacheManager index 199a48d0..99acb5ae 100644 --- a/test/storage/CacheManager +++ b/test/storage/CacheManager @@ -1,6 +1,6 @@ | Name | Type | Slot | Offset | Bytes | Contract | |---------------|-----------------------------|------|--------|-------|-----------------------------------------| -| _initialized | bool | 0 | 0 | 1 | src/chain/CacheManager.sol:CacheManager | +| _initialized | uint8 | 0 | 0 | 1 | src/chain/CacheManager.sol:CacheManager | | _initializing | bool | 0 | 1 | 1 | src/chain/CacheManager.sol:CacheManager | | bids | struct MinHeapLib.Heap | 1 | 0 | 32 | src/chain/CacheManager.sol:CacheManager | | entries | struct CacheManager.Entry[] | 2 | 0 | 32 | src/chain/CacheManager.sol:CacheManager | diff --git a/test/storage/ChallengeManager b/test/storage/ChallengeManager deleted file mode 100644 index 15c3f116..00000000 --- a/test/storage/ChallengeManager +++ /dev/null @@ -1,9 +0,0 @@ -| Name | Type | Slot | Offset | Bytes | Contract | -|------------------------|---------------------------------------------------|------|--------|-------|-----------------------------------------------------| -| totalChallengesCreated | uint64 | 0 | 0 | 8 | src/challenge/ChallengeManager.sol:ChallengeManager | -| challenges | mapping(uint256 => struct ChallengeLib.Challenge) | 1 | 0 | 32 | src/challenge/ChallengeManager.sol:ChallengeManager | -| resultReceiver | contract IChallengeResultReceiver | 2 | 0 | 20 | src/challenge/ChallengeManager.sol:ChallengeManager | -| sequencerInbox | contract ISequencerInbox | 3 | 0 | 20 | src/challenge/ChallengeManager.sol:ChallengeManager | -| bridge | contract IBridge | 4 | 0 | 20 | src/challenge/ChallengeManager.sol:ChallengeManager | -| osp | contract IOneStepProofEntry | 5 | 0 | 20 | src/challenge/ChallengeManager.sol:ChallengeManager | -| ospCond | mapping(bytes32 => contract IOneStepProofEntry) | 6 | 0 | 32 | src/challenge/ChallengeManager.sol:ChallengeManager | diff --git a/test/storage/ERC20Bridge b/test/storage/ERC20Bridge index 7e00cd68..f7e56eb3 100644 --- a/test/storage/ERC20Bridge +++ b/test/storage/ERC20Bridge @@ -1,6 +1,6 @@ | Name | Type | Slot | Offset | Bytes | Contract | |----------------------------------|------------------------------------------------|------|--------|-------|----------------------------------------| -| _initialized | bool | 0 | 0 | 1 | src/bridge/ERC20Bridge.sol:ERC20Bridge | +| _initialized | uint8 | 0 | 0 | 1 | src/bridge/ERC20Bridge.sol:ERC20Bridge | | _initializing | bool | 0 | 1 | 1 | src/bridge/ERC20Bridge.sol:ERC20Bridge | | allowedDelayedInboxesMap | mapping(address => struct AbsBridge.InOutInfo) | 1 | 0 | 32 | src/bridge/ERC20Bridge.sol:ERC20Bridge | | allowedOutboxesMap | mapping(address => struct AbsBridge.InOutInfo) | 2 | 0 | 32 | src/bridge/ERC20Bridge.sol:ERC20Bridge | diff --git a/test/storage/ERC20Inbox b/test/storage/ERC20Inbox index 58f398df..85fae0cb 100644 --- a/test/storage/ERC20Inbox +++ b/test/storage/ERC20Inbox @@ -1,6 +1,6 @@ | Name | Type | Slot | Offset | Bytes | Contract | |------------------|--------------------------|------|--------|-------|--------------------------------------| -| _initialized | bool | 0 | 0 | 1 | src/bridge/ERC20Inbox.sol:ERC20Inbox | +| _initialized | uint8 | 0 | 0 | 1 | src/bridge/ERC20Inbox.sol:ERC20Inbox | | _initializing | bool | 0 | 1 | 1 | src/bridge/ERC20Inbox.sol:ERC20Inbox | | __gap | uint256[50] | 1 | 0 | 1600 | src/bridge/ERC20Inbox.sol:ERC20Inbox | | _paused | bool | 51 | 0 | 1 | src/bridge/ERC20Inbox.sol:ERC20Inbox | diff --git a/test/storage/EdgeChallengeManager b/test/storage/EdgeChallengeManager new file mode 100644 index 00000000..324a1c5e --- /dev/null +++ b/test/storage/EdgeChallengeManager @@ -0,0 +1,15 @@ +| Name | Type | Slot | Offset | Bytes | Contract | +|--------------------------------|-----------------------------|------|--------|-------|---------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| _initializing | bool | 0 | 1 | 1 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| store | struct EdgeStore | 1 | 0 | 128 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| excessStakeReceiver | address | 5 | 0 | 20 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| stakeToken | contract IERC20 | 6 | 0 | 20 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| stakeAmounts | uint256[] | 7 | 0 | 32 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| challengePeriodBlocks | uint64 | 8 | 0 | 8 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| assertionChain | contract IAssertionChain | 8 | 8 | 20 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| oneStepProofEntry | contract IOneStepProofEntry | 9 | 0 | 20 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| LAYERZERO_BLOCKEDGE_HEIGHT | uint256 | 10 | 0 | 32 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| LAYERZERO_BIGSTEPEDGE_HEIGHT | uint256 | 11 | 0 | 32 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| LAYERZERO_SMALLSTEPEDGE_HEIGHT | uint256 | 12 | 0 | 32 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | +| NUM_BIGSTEP_LEVEL | uint8 | 13 | 0 | 1 | src/challengeV2/EdgeChallengeManager.sol:EdgeChallengeManager | diff --git a/test/storage/Inbox b/test/storage/Inbox index 0551822e..92e08b63 100644 --- a/test/storage/Inbox +++ b/test/storage/Inbox @@ -1,6 +1,6 @@ | Name | Type | Slot | Offset | Bytes | Contract | |------------------|--------------------------|------|--------|-------|----------------------------| -| _initialized | bool | 0 | 0 | 1 | src/bridge/Inbox.sol:Inbox | +| _initialized | uint8 | 0 | 0 | 1 | src/bridge/Inbox.sol:Inbox | | _initializing | bool | 0 | 1 | 1 | src/bridge/Inbox.sol:Inbox | | __gap | uint256[50] | 1 | 0 | 1600 | src/bridge/Inbox.sol:Inbox | | _paused | bool | 51 | 0 | 1 | src/bridge/Inbox.sol:Inbox | diff --git a/test/storage/OneStepProofEntry b/test/storage/OneStepProofEntry new file mode 100644 index 00000000..30a6bfe1 --- /dev/null +++ b/test/storage/OneStepProofEntry @@ -0,0 +1,6 @@ +| Name | Type | Slot | Offset | Bytes | Contract | +|--------------|-------------------------|------|--------|-------|-------------------------------------------------| +| prover0 | contract IOneStepProver | 0 | 0 | 20 | src/osp/OneStepProofEntry.sol:OneStepProofEntry | +| proverMem | contract IOneStepProver | 1 | 0 | 20 | src/osp/OneStepProofEntry.sol:OneStepProofEntry | +| proverMath | contract IOneStepProver | 2 | 0 | 20 | src/osp/OneStepProofEntry.sol:OneStepProofEntry | +| proverHostIo | contract IOneStepProver | 3 | 0 | 20 | src/osp/OneStepProofEntry.sol:OneStepProofEntry | diff --git a/test/storage/RollupAdminLogic b/test/storage/RollupAdminLogic index 8e3dc844..a4a1f581 100644 --- a/test/storage/RollupAdminLogic +++ b/test/storage/RollupAdminLogic @@ -1,39 +1,33 @@ -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------------------|-----------------------------------------------|------|--------|-------|--------------------------------------------------| -| _initialized | bool | 0 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _paused | bool | 51 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| confirmPeriodBlocks | uint64 | 101 | 0 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| extraChallengeTimeBlocks | uint64 | 101 | 8 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| chainId | uint256 | 102 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| inbox | contract IInboxBase | 105 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| bridge | contract IBridge | 106 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| outbox | contract IOutbox | 107 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| sequencerInbox | contract ISequencerInbox | 108 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| challengeManager | contract IChallengeManager | 110 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| validatorUtils | address | 111 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| validatorWalletCreator | address | 112 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| loserStakeEscrow | address | 113 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| stakeToken | address | 114 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| minimumAssertionPeriod | uint256 | 115 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| isValidator | mapping(address => bool) | 116 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _latestConfirmed | uint64 | 117 | 0 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _firstUnresolvedNode | uint64 | 117 | 8 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _latestNodeCreated | uint64 | 117 | 16 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _lastStakeBlock | uint64 | 117 | 24 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _nodes | mapping(uint64 => struct Node) | 118 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _nodeStakers | mapping(uint64 => mapping(address => bool)) | 119 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _stakerList | address[] | 120 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _stakerMap | mapping(address => struct IRollupCore.Staker) | 121 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _zombies | struct RollupCore.Zombie[] | 122 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _withdrawableFunds | mapping(address => uint256) | 123 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| totalWithdrawableFunds | uint256 | 124 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| rollupDeploymentBlock | uint256 | 125 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| validatorWhitelistDisabled | bool | 126 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| anyTrustFastConfirmer | address | 126 | 1 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -| _nodeCreatedAtArbSysBlock | mapping(uint64 => uint256) | 127 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| Name | Type | Slot | Offset | Bytes | Contract | +|--------------------------------|-----------------------------------------------|------|--------|-------|--------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| _paused | bool | 51 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| chainId | uint256 | 101 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| confirmPeriodBlocks | uint64 | 102 | 0 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| validatorAfkBlocks | uint64 | 102 | 8 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| challengeManager | contract IEdgeChallengeManager | 105 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| challengeGracePeriodBlocks | uint64 | 105 | 20 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| inbox | contract IInboxBase | 106 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| bridge | contract IBridge | 107 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| outbox | contract IOutbox | 108 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| validatorWalletCreator | address | 110 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| loserStakeEscrow | address | 111 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| stakeToken | address | 112 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| minimumAssertionPeriod | uint256 | 113 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| validators | struct EnumerableSetUpgradeable.AddressSet | 114 | 0 | 64 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| _latestConfirmed | bytes32 | 116 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| _assertions | mapping(bytes32 => struct AssertionNode) | 117 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| _stakerList | address[] | 118 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| _stakerMap | mapping(address => struct IRollupCore.Staker) | 119 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| _withdrawableFunds | mapping(address => uint256) | 120 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| totalWithdrawableFunds | uint256 | 121 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| rollupDeploymentBlock | uint256 | 122 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| validatorWhitelistDisabled | bool | 123 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| anyTrustFastConfirmer | address | 123 | 1 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +| _assertionCreatedAtArbSysBlock | mapping(bytes32 => uint256) | 124 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | diff --git a/test/storage/RollupCore b/test/storage/RollupCore index 1349cece..03f07fbd 100644 --- a/test/storage/RollupCore +++ b/test/storage/RollupCore @@ -1,39 +1,33 @@ -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------------------|-----------------------------------------------|------|--------|-------|--------------------------------------| -| _initialized | bool | 0 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | -| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupCore.sol:RollupCore | -| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupCore.sol:RollupCore | -| _paused | bool | 51 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | -| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupCore.sol:RollupCore | -| confirmPeriodBlocks | uint64 | 101 | 0 | 8 | src/rollup/RollupCore.sol:RollupCore | -| extraChallengeTimeBlocks | uint64 | 101 | 8 | 8 | src/rollup/RollupCore.sol:RollupCore | -| chainId | uint256 | 102 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| inbox | contract IInboxBase | 105 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| bridge | contract IBridge | 106 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| outbox | contract IOutbox | 107 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| sequencerInbox | contract ISequencerInbox | 108 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| challengeManager | contract IChallengeManager | 110 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| validatorUtils | address | 111 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| validatorWalletCreator | address | 112 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| loserStakeEscrow | address | 113 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| stakeToken | address | 114 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -| minimumAssertionPeriod | uint256 | 115 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| isValidator | mapping(address => bool) | 116 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| _latestConfirmed | uint64 | 117 | 0 | 8 | src/rollup/RollupCore.sol:RollupCore | -| _firstUnresolvedNode | uint64 | 117 | 8 | 8 | src/rollup/RollupCore.sol:RollupCore | -| _latestNodeCreated | uint64 | 117 | 16 | 8 | src/rollup/RollupCore.sol:RollupCore | -| _lastStakeBlock | uint64 | 117 | 24 | 8 | src/rollup/RollupCore.sol:RollupCore | -| _nodes | mapping(uint64 => struct Node) | 118 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| _nodeStakers | mapping(uint64 => mapping(address => bool)) | 119 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| _stakerList | address[] | 120 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| _stakerMap | mapping(address => struct IRollupCore.Staker) | 121 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| _zombies | struct RollupCore.Zombie[] | 122 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| _withdrawableFunds | mapping(address => uint256) | 123 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| totalWithdrawableFunds | uint256 | 124 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| rollupDeploymentBlock | uint256 | 125 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -| validatorWhitelistDisabled | bool | 126 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | -| anyTrustFastConfirmer | address | 126 | 1 | 20 | src/rollup/RollupCore.sol:RollupCore | -| _nodeCreatedAtArbSysBlock | mapping(uint64 => uint256) | 127 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| Name | Type | Slot | Offset | Bytes | Contract | +|--------------------------------|-----------------------------------------------|------|--------|-------|--------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | +| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupCore.sol:RollupCore | +| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupCore.sol:RollupCore | +| _paused | bool | 51 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | +| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupCore.sol:RollupCore | +| chainId | uint256 | 101 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| confirmPeriodBlocks | uint64 | 102 | 0 | 8 | src/rollup/RollupCore.sol:RollupCore | +| validatorAfkBlocks | uint64 | 102 | 8 | 8 | src/rollup/RollupCore.sol:RollupCore | +| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| challengeManager | contract IEdgeChallengeManager | 105 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +| challengeGracePeriodBlocks | uint64 | 105 | 20 | 8 | src/rollup/RollupCore.sol:RollupCore | +| inbox | contract IInboxBase | 106 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +| bridge | contract IBridge | 107 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +| outbox | contract IOutbox | 108 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +| validatorWalletCreator | address | 110 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +| loserStakeEscrow | address | 111 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +| stakeToken | address | 112 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +| minimumAssertionPeriod | uint256 | 113 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| validators | struct EnumerableSetUpgradeable.AddressSet | 114 | 0 | 64 | src/rollup/RollupCore.sol:RollupCore | +| _latestConfirmed | bytes32 | 116 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| _assertions | mapping(bytes32 => struct AssertionNode) | 117 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| _stakerList | address[] | 118 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| _stakerMap | mapping(address => struct IRollupCore.Staker) | 119 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| _withdrawableFunds | mapping(address => uint256) | 120 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| totalWithdrawableFunds | uint256 | 121 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| rollupDeploymentBlock | uint256 | 122 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +| validatorWhitelistDisabled | bool | 123 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | +| anyTrustFastConfirmer | address | 123 | 1 | 20 | src/rollup/RollupCore.sol:RollupCore | +| _assertionCreatedAtArbSysBlock | mapping(bytes32 => uint256) | 124 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | diff --git a/test/storage/RollupUserLogic b/test/storage/RollupUserLogic index 5fd45918..79656e96 100644 --- a/test/storage/RollupUserLogic +++ b/test/storage/RollupUserLogic @@ -1,39 +1,33 @@ -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------------------|-----------------------------------------------|------|--------|-------|------------------------------------------------| -| _initialized | bool | 0 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _paused | bool | 51 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| confirmPeriodBlocks | uint64 | 101 | 0 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| extraChallengeTimeBlocks | uint64 | 101 | 8 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| chainId | uint256 | 102 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| inbox | contract IInboxBase | 105 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| bridge | contract IBridge | 106 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| outbox | contract IOutbox | 107 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| sequencerInbox | contract ISequencerInbox | 108 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| challengeManager | contract IChallengeManager | 110 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| validatorUtils | address | 111 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| validatorWalletCreator | address | 112 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| loserStakeEscrow | address | 113 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| stakeToken | address | 114 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| minimumAssertionPeriod | uint256 | 115 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| isValidator | mapping(address => bool) | 116 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _latestConfirmed | uint64 | 117 | 0 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _firstUnresolvedNode | uint64 | 117 | 8 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _latestNodeCreated | uint64 | 117 | 16 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _lastStakeBlock | uint64 | 117 | 24 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _nodes | mapping(uint64 => struct Node) | 118 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _nodeStakers | mapping(uint64 => mapping(address => bool)) | 119 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _stakerList | address[] | 120 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _stakerMap | mapping(address => struct IRollupCore.Staker) | 121 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _zombies | struct RollupCore.Zombie[] | 122 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _withdrawableFunds | mapping(address => uint256) | 123 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| totalWithdrawableFunds | uint256 | 124 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| rollupDeploymentBlock | uint256 | 125 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| validatorWhitelistDisabled | bool | 126 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| anyTrustFastConfirmer | address | 126 | 1 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -| _nodeCreatedAtArbSysBlock | mapping(uint64 => uint256) | 127 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| Name | Type | Slot | Offset | Bytes | Contract | +|--------------------------------|-----------------------------------------------|------|--------|-------|------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| _paused | bool | 51 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| chainId | uint256 | 101 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| confirmPeriodBlocks | uint64 | 102 | 0 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| validatorAfkBlocks | uint64 | 102 | 8 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| challengeManager | contract IEdgeChallengeManager | 105 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| challengeGracePeriodBlocks | uint64 | 105 | 20 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| inbox | contract IInboxBase | 106 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| bridge | contract IBridge | 107 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| outbox | contract IOutbox | 108 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| validatorWalletCreator | address | 110 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| loserStakeEscrow | address | 111 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| stakeToken | address | 112 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| minimumAssertionPeriod | uint256 | 113 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| validators | struct EnumerableSetUpgradeable.AddressSet | 114 | 0 | 64 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| _latestConfirmed | bytes32 | 116 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| _assertions | mapping(bytes32 => struct AssertionNode) | 117 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| _stakerList | address[] | 118 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| _stakerMap | mapping(address => struct IRollupCore.Staker) | 119 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| _withdrawableFunds | mapping(address => uint256) | 120 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| totalWithdrawableFunds | uint256 | 121 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| rollupDeploymentBlock | uint256 | 122 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| validatorWhitelistDisabled | bool | 123 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| anyTrustFastConfirmer | address | 123 | 1 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +| _assertionCreatedAtArbSysBlock | mapping(bytes32 => uint256) | 124 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | diff --git a/test/storage/SequencerInbox b/test/storage/SequencerInbox index c53e775e..4d2ba3fd 100644 --- a/test/storage/SequencerInbox +++ b/test/storage/SequencerInbox @@ -12,3 +12,4 @@ | delaySeconds | uint64 | 10 | 16 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox | | futureSeconds | uint64 | 10 | 24 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox | | batchPosterManager | address | 11 | 0 | 20 | src/bridge/SequencerInbox.sol:SequencerInbox | +| buffer | struct BufferData | 12 | 0 | 64 | src/bridge/SequencerInbox.sol:SequencerInbox | diff --git a/test/storage/test.bash b/test/storage/test.bash index 0cc42c3e..c9400c17 100755 --- a/test/storage/test.bash +++ b/test/storage/test.bash @@ -1,6 +1,6 @@ #!/bin/bash output_dir="./test/storage" -for CONTRACTNAME in Bridge Inbox Outbox RollupCore RollupUserLogic RollupAdminLogic SequencerInbox ChallengeManager ERC20Bridge ERC20Inbox ERC20Outbox CacheManager +for CONTRACTNAME in Bridge Inbox Outbox RollupCore RollupUserLogic RollupAdminLogic SequencerInbox EdgeChallengeManager ERC20Bridge ERC20Inbox ERC20Outbox OneStepProofEntry CacheManager do echo "Checking storage change of $CONTRACTNAME" [ -f "$output_dir/$CONTRACTNAME" ] && mv "$output_dir/$CONTRACTNAME" "$output_dir/$CONTRACTNAME-old" diff --git a/yarn.lock b/yarn.lock index 06a9ee89..223cad70 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,17 @@ # yarn lockfile v1 +"@arbitrum/nitro-contracts-2.0.0@npm:@arbitrum/nitro-contracts@2.0.0-beta.0": + version "2.0.0-beta.0" + resolved "https://registry.yarnpkg.com/@arbitrum/nitro-contracts/-/nitro-contracts-2.0.0-beta.0.tgz#f8e75b843cc67100ce99f7a0f7aa583315ad1f9e" + integrity sha512-MzWGBKInvLqr5Qh0ux8G8tN3meX+uhil1ozsMrAce1NTiDWUSijj6q4zGJEVjKTSN5YX0rVg7CR7HjwveGZrCg== + dependencies: + "@offchainlabs/upgrade-executor" "1.1.0-beta.0" + "@openzeppelin/contracts" "4.5.0" + "@openzeppelin/contracts-upgradeable" "4.5.2" + patch-package "^6.4.7" + solady "0.0.182" + "@arbitrum/sdk@^3.4.1": version "3.6.0" resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-3.6.0.tgz#b5c6ec56fe4d95c7e865bb4f0e8a4c7b327ae6f8" @@ -14,25 +25,27 @@ ethers "^5.1.0" "@babel/code-frame@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" - integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== dependencies: - "@babel/highlight" "^7.16.7" + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" -"@babel/helper-validator-identifier@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" - integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== -"@babel/highlight@^7.16.7": - version "7.16.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" - integrity sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw== +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== dependencies: - "@babel/helper-validator-identifier" "^7.16.7" - chalk "^2.0.0" + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" js-tokens "^4.0.0" + picocolors "^1.0.0" "@colors/colors@1.5.0": version "1.5.0" @@ -1063,13 +1076,18 @@ dependencies: antlr4ts "^0.5.0-alpha.4" -"@solidity-parser/parser@^0.14.1": - version "0.14.1" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.1.tgz#179afb29f4e295a77cc141151f26b3848abc3c46" - integrity sha512-eLjj2L6AuQjBB6s/ibwCAc0DwrR5Ge+ys+wgWo+bviU7fV2nTMQhU63CGaDKXg9iTmMxwhkyoggdIR7ZGRfMgw== +"@solidity-parser/parser@^0.16.0": + version "0.16.2" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.16.2.tgz#42cb1e3d88b3e8029b0c9befff00b634cd92d2fa" + integrity sha512-PI9NfoA3P8XK2VBkK5oIfRgKDsicwDZfkVq9ZTBCQYGOP1N2owgY2dyLGyU5/J/hQs8KRk55kdmvTLjy3Mu3vg== dependencies: antlr4ts "^0.5.0-alpha.4" +"@solidity-parser/parser@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.17.0.tgz#52a2fcc97ff609f72011014e4c5b485ec52243ef" + integrity sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw== + "@solidity-parser/parser@^0.18.0": version "0.18.0" resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.18.0.tgz#8e77a02a09ecce957255a2f48c9a7178ec191908" @@ -1224,9 +1242,9 @@ "@types/lodash" "*" "@types/lodash@*": - version "4.17.0" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.0.tgz#d774355e41f372d5350a4d0714abb48194a489c3" - integrity sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA== + version "4.17.5" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.5.tgz#e6c29b58e66995d57cd170ce3e2a61926d55ee04" + integrity sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw== "@types/lru-cache@5.1.1", "@types/lru-cache@^5.1.0": version "5.1.1" @@ -1485,7 +1503,7 @@ abstract-leveldown@~6.2.1: level-supports "~1.0.0" xtend "~4.0.0" -acorn-jsx@^5.0.0, acorn-jsx@^5.3.2: +acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== @@ -1497,11 +1515,6 @@ acorn-walk@^8.1.1: dependencies: acorn "^8.11.0" -acorn@^6.0.7: - version "6.4.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" - integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== - acorn@^8.11.0, acorn@^8.4.1, acorn@^8.9.0: version "8.12.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" @@ -1532,7 +1545,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.6.1, ajv@^6.9.1: +ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1569,11 +1582,6 @@ ansi-colors@^4.1.1, ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -ansi-escapes@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== - ansi-escapes@^4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -1591,17 +1599,12 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -1615,10 +1618,10 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" -antlr4@4.7.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" - integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== +antlr4@^4.11.0: + version "4.13.1" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.1.tgz#1e0a1830a08faeb86217cb2e6c34716004e4253d" + integrity sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA== antlr4@~4.8.0: version "4.8.0" @@ -1707,15 +1710,10 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== -ast-parents@0.0.1: +ast-parents@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" - integrity sha1-UI/Q8F0MSHddnszaLhdEIyYejdM= - -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA== astral-regex@^2.0.0: version "2.0.0" @@ -2077,25 +2075,6 @@ call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" -caller-callsite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= - dependencies: - callsites "^2.0.0" - -caller-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= - dependencies: - caller-callsite "^2.0.0" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= - callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -2141,7 +2120,7 @@ chai@^4.3.4: pathval "^1.1.1" type-detect "^4.0.8" -chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.2: +chalk@^2.3.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2163,11 +2142,6 @@ chalk@^5.3.0: resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - "charenc@>= 0.0.1": version "0.0.2" resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" @@ -2223,13 +2197,6 @@ cli-boxes@^2.2.1: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - dependencies: - restore-cursor "^2.0.0" - cli-table3@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" @@ -2249,11 +2216,6 @@ cli-table3@^0.6.0: optionalDependencies: "@colors/colors" "1.5.0" -cli-width@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" - integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== - cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" @@ -2347,10 +2309,10 @@ command-line-usage@^6.1.0: table-layout "^1.0.1" typical "^5.2.0" -commander@2.18.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" - integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== +commander@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== commander@^11.0.0: version "11.1.0" @@ -2412,15 +2374,15 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cosmiconfig@^5.0.7: - version "5.2.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" - integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== +cosmiconfig@^8.0.0: + version "8.3.6" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" + integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== dependencies: - import-fresh "^2.0.0" - is-directory "^0.3.1" - js-yaml "^3.13.1" - parse-json "^4.0.0" + import-fresh "^3.3.0" + js-yaml "^4.1.0" + parse-json "^5.2.0" + path-type "^4.0.0" crc-32@^1.2.0: version "1.2.2" @@ -2529,13 +2491,6 @@ debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.0.1: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - dependencies: - ms "2.1.2" - debug@^4.3.1: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -2711,16 +2666,6 @@ emittery@0.10.0: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.0.tgz#bb373c660a9d421bb44706ec4967ed50c02a8026" integrity sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ== -emoji-regex@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.0.0.tgz#96559e19f82231b436403e059571241d627c42b8" - integrity sha512-KmJa8l6uHi1HrBI34udwlzZY1jOEuID/ft4d8BSSEdRyap7PwBEt910453PJa5MuGvxkLqlt4Uvhu7tttFHViw== - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -2839,14 +2784,6 @@ eslint-plugin-prettier@^4.0.0: dependencies: prettier-linter-helpers "^1.0.0" -eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -2863,13 +2800,6 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^1.3.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" - integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== - dependencies: - eslint-visitor-keys "^1.1.0" - eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" @@ -2877,11 +2807,6 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" @@ -2892,48 +2817,6 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^5.6.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" - integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== - dependencies: - "@babel/code-frame" "^7.0.0" - ajv "^6.9.1" - chalk "^2.1.0" - cross-spawn "^6.0.5" - debug "^4.0.1" - doctrine "^3.0.0" - eslint-scope "^4.0.3" - eslint-utils "^1.3.1" - eslint-visitor-keys "^1.0.0" - espree "^5.0.1" - esquery "^1.0.1" - esutils "^2.0.2" - file-entry-cache "^5.0.1" - functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^11.7.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - inquirer "^6.2.2" - js-yaml "^3.13.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.11" - minimatch "^3.0.4" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" - progress "^2.0.0" - regexpp "^2.0.1" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" - table "^5.2.3" - text-table "^0.2.0" - eslint@^8.23.1: version "8.57.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" @@ -2978,15 +2861,6 @@ eslint@^8.23.1: strip-ansi "^6.0.1" text-table "^0.2.0" -espree@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" - integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== - dependencies: - acorn "^6.0.7" - acorn-jsx "^5.0.0" - eslint-visitor-keys "^1.0.0" - espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -3006,13 +2880,6 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== - dependencies: - estraverse "^5.1.0" - esquery@^1.4.2: version "1.5.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" @@ -3020,7 +2887,7 @@ esquery@^1.4.2: dependencies: estraverse "^5.1.0" -esrecurse@^4.1.0, esrecurse@^4.3.0: +esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== @@ -3363,15 +3230,6 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -3387,10 +3245,10 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-diff@^1.1.2, fast-diff@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== fast-glob@^3.0.3, fast-glob@^3.2.9, fast-glob@^3.3.1: version "3.3.2" @@ -3420,20 +3278,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" - integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== - dependencies: - flat-cache "^2.0.1" - file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -3482,15 +3326,6 @@ find-yarn-workspace-root@^2.0.0: dependencies: micromatch "^4.0.2" -flat-cache@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" - integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== - dependencies: - flatted "^2.0.0" - rimraf "2.6.3" - write "1.0.3" - flat-cache@^3.0.4: version "3.2.0" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" @@ -3505,11 +3340,6 @@ flat@^5.0.2: resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -flatted@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" - integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== - flatted@^3.2.9: version "3.3.1" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" @@ -3764,7 +3594,7 @@ glob@7.1.7: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.2.0, glob@^7.1.2: +glob@7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -3826,11 +3656,6 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -globals@^11.7.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - globals@^13.19.0: version "13.24.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" @@ -4155,7 +3980,7 @@ hyperapp@1.2.9: resolved "https://registry.yarnpkg.com/hyperapp/-/hyperapp-1.2.9.tgz#a17ec09634968a5fa5f6b7d649e7a03d9680fcf2" integrity sha512-bIzi12am7pyQ5nc2qnQpN6GWonjdJp+AghY7j9H9L0vccM1OQ3Cqn13cZlmS9KYm91Nf9fwF4KjvbQekFBxHVw== -iconv-lite@0.4.24, iconv-lite@^0.4.24: +iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -4167,12 +3992,7 @@ ieee754@^1.1.13, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - -ignore@^5.1.1, ignore@^5.2.0: +ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== @@ -4192,15 +4012,7 @@ immutable@^4.0.0-rc.12: resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.6.tgz#6a05f7858213238e587fb83586ffa3b4b27f0447" integrity sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ== -import-fresh@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= - dependencies: - caller-path "^2.0.0" - resolve-from "^3.0.0" - -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -4241,25 +4053,6 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inquirer@^6.2.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" - integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== - dependencies: - ansi-escapes "^3.2.0" - chalk "^2.4.2" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^3.0.3" - figures "^2.0.0" - lodash "^4.17.12" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^6.4.0" - string-width "^2.1.0" - strip-ansi "^5.1.0" - through "^2.3.6" - interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -4322,11 +4115,6 @@ is-core-module@^2.9.0: dependencies: has "^1.0.3" -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= - is-docker@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" @@ -4463,7 +4251,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: +js-yaml@3.x, js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -4495,10 +4283,10 @@ json-buffer@3.0.1: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" @@ -4729,14 +4517,6 @@ levelup@^4.3.2: level-supports "~1.0.0" xtend "~4.0.0" -levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -4745,6 +4525,19 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -4785,7 +4578,7 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21: +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -4954,11 +4747,6 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.52.0" -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - mimic-fn@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -5079,11 +4867,6 @@ murmur-128@^0.2.1: fmix "^0.1.0" imul "^1.0.0" -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= - mz@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -5252,13 +5035,6 @@ once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - open@^7.4.2: version "7.4.2" resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" @@ -5267,7 +5043,7 @@ open@^7.4.2: is-docker "^2.0.0" is-wsl "^2.1.1" -optionator@^0.8.1, optionator@^0.8.2: +optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -5377,13 +5153,15 @@ parse-es6-imports@^1.0.1: resolved "https://registry.yarnpkg.com/parse-es6-imports/-/parse-es6-imports-1.0.1.tgz#fbfea61afcd94435c7f697fc439616c18853771b" integrity sha512-WheMSatJ69ItiKNFTYYzYIbntAT4DC0+dM+a64bLQi6dxxqI5elYqJK9oCo5AYlDxeTo/bimmdo5kv4IxJy34A== -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: + "@babel/code-frame" "^7.0.0" error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" patch-package@^6.4.7: version "6.5.1" @@ -5425,11 +5203,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -5478,6 +5251,11 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== +picocolors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -5488,6 +5266,11 @@ pify@^4.0.1: resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + postinstall-postinstall@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" @@ -5511,42 +5294,29 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier-plugin-solidity@^1.0.0-beta.19: - version "1.0.0-beta.19" - resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.19.tgz#7c3607fc4028f5e6a425259ff03e45eedf733df3" - integrity sha512-xxRQ5ZiiZyUoMFLE9h7HnUDXI/daf1tnmL1msEdcKmyh7ZGQ4YklkYLC71bfBpYU2WruTb5/SFLUaEb3RApg5g== + version "1.3.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.3.1.tgz#59944d3155b249f7f234dee29f433524b9a4abcf" + integrity sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA== dependencies: - "@solidity-parser/parser" "^0.14.0" - emoji-regex "^10.0.0" - escape-string-regexp "^4.0.0" - semver "^7.3.5" - solidity-comments-extractor "^0.0.7" - string-width "^4.2.3" - -prettier@^1.14.3: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + "@solidity-parser/parser" "^0.17.0" + semver "^7.5.4" + solidity-comments-extractor "^0.0.8" prettier@^2.3.1: version "2.6.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== -prettier@^2.5.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" - integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== +prettier@^2.5.1, prettier@^2.8.3: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - promise@^8.0.0: version "8.3.0" resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" @@ -5734,11 +5504,6 @@ regenerator-runtime@0.13.2: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA== -regexpp@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" - integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== - req-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" @@ -5843,14 +5608,6 @@ resolve@^1.3.2: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -5866,13 +5623,6 @@ rfdc@^1.1.4: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== -rimraf@2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - rimraf@^2.2.8, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -5909,11 +5659,6 @@ rlp@^2.2.3, rlp@^2.2.4: dependencies: bn.js "^5.2.0" -run-async@^2.2.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -5926,13 +5671,6 @@ rustbn.js@~0.2.0: resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== -rxjs@^6.4.0: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -5997,7 +5735,7 @@ semaphore-async-await@^1.5.1: resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" integrity sha512-b/ptP11hETwYWpeilHXXQiV5UJNJl7ZWWooKRE5eBIYWoom6dZ0SluCIdCtKycsMtZgKWE01/qAw6jblw1YVhg== -semver@^5.3.0, semver@^5.5.1: +semver@^5.3.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -6019,18 +5757,11 @@ semver@^7.0.0, semver@^7.5.4: dependencies: lru-cache "^6.0.0" -semver@^7.3.4, semver@^7.3.7: +semver@^7.3.4, semver@^7.3.7, semver@^7.5.2, semver@^7.6.0: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== -semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - serialize-javascript@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" @@ -6134,7 +5865,7 @@ side-channel@^1.0.6: get-intrinsic "^1.2.4" object-inspect "^1.13.1" -signal-exit@^3.0.0, signal-exit@^3.0.2: +signal-exit@^3.0.0: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -6149,15 +5880,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" - integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== - dependencies: - ansi-styles "^3.2.0" - astral-regex "^1.0.0" - is-fullwidth-code-point "^2.0.0" - slice-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" @@ -6233,26 +5955,29 @@ solhint-plugin-prettier@^0.0.5: prettier-linter-helpers "^1.0.0" solhint@^3.3.7: - version "3.3.7" - resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.7.tgz#b5da4fedf7a0fee954cb613b6c55a5a2b0063aa7" - integrity sha512-NjjjVmXI3ehKkb3aNtRJWw55SUVJ8HMKKodwe0HnejA+k0d2kmhw7jvpa+MCTbcEgt8IWSwx0Hu6aCo/iYOZzQ== - dependencies: - "@solidity-parser/parser" "^0.14.1" - ajv "^6.6.1" - antlr4 "4.7.1" - ast-parents "0.0.1" - chalk "^2.4.2" - commander "2.18.0" - cosmiconfig "^5.0.7" - eslint "^5.6.0" - fast-diff "^1.1.2" - glob "^7.1.3" - ignore "^4.0.6" - js-yaml "^3.12.0" - lodash "^4.17.11" - semver "^6.3.0" + version "3.6.2" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.6.2.tgz#2b2acbec8fdc37b2c68206a71ba89c7f519943fe" + integrity sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ== + dependencies: + "@solidity-parser/parser" "^0.16.0" + ajv "^6.12.6" + antlr4 "^4.11.0" + ast-parents "^0.0.1" + chalk "^4.1.2" + commander "^10.0.0" + cosmiconfig "^8.0.0" + fast-diff "^1.2.0" + glob "^8.0.3" + ignore "^5.2.4" + js-yaml "^4.1.0" + lodash "^4.17.21" + pluralize "^8.0.0" + semver "^7.5.2" + strip-ansi "^6.0.1" + table "^6.8.1" + text-table "^0.2.0" optionalDependencies: - prettier "^1.14.3" + prettier "^2.8.3" solidity-comments-darwin-arm64@0.0.2: version "0.0.2" @@ -6264,10 +5989,10 @@ solidity-comments-darwin-x64@0.0.2: resolved "https://registry.yarnpkg.com/solidity-comments-darwin-x64/-/solidity-comments-darwin-x64-0.0.2.tgz#aaadbfcc08d9fdd1b564c8ce71d6ba50d67b1829" integrity sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA== -solidity-comments-extractor@^0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" - integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== +solidity-comments-extractor@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.8.tgz#f6e148ab0c49f30c1abcbecb8b8df01ed8e879f8" + integrity sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g== solidity-comments-freebsd-x64@0.0.2: version "0.0.2" @@ -6461,7 +6186,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: +string-width@^2.0.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -6469,15 +6194,6 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -6520,13 +6236,6 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -6546,11 +6255,6 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" -strip-json-comments@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -6606,9 +6310,9 @@ sync-rpc@^1.2.1: get-port "^3.1.0" synp@^1.9.10: - version "1.9.10" - resolved "https://registry.yarnpkg.com/synp/-/synp-1.9.10.tgz#53163321a600418c9b06af0db499939ffce12907" - integrity sha512-G9Z/TXTaBG1xNslUf3dHFidz/8tvvRaR560WWyOwyI7XrGGEGBTEIIg4hdRh1qFtz8mPYynAUYwWXUg/Zh0Pzw== + version "1.9.13" + resolved "https://registry.yarnpkg.com/synp/-/synp-1.9.13.tgz#90eee678f01dce5dccd228ab9e8d887d2c0728a5" + integrity sha512-qbmzXIDpgtx435n26p7MWgWNvGaNdgZ9zKBm+cXlV6ZhFWaH8MMBQt8PdMGqjdvp63J0k040fO77ClDFDD804Q== dependencies: "@yarnpkg/lockfile" "^1.1.0" bash-glob "^2.0.0" @@ -6617,7 +6321,7 @@ synp@^1.9.10: eol "^0.9.1" lodash "4.17.21" nmtree "^1.0.6" - semver "^7.3.5" + semver "^7.6.0" sort-object-keys "^1.1.3" table-layout@^1.0.1: @@ -6630,17 +6334,7 @@ table-layout@^1.0.1: typical "^5.2.0" wordwrapjs "^4.0.0" -table@^5.2.3: - version "5.4.6" - resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" - integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== - dependencies: - ajv "^6.10.2" - lodash "^4.17.14" - slice-ansi "^2.1.0" - string-width "^3.0.0" - -table@^6.8.0: +table@^6.8.0, table@^6.8.1: version "6.8.2" resolved "https://registry.yarnpkg.com/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" integrity sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA== @@ -6710,7 +6404,7 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -through@2, "through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.4: +through@2, "through@>=2.2.7 <3", through@^2.3.8, through@~2.3, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== @@ -6786,7 +6480,7 @@ ts-node@^10.4.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -7133,13 +6827,6 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" - integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== - dependencies: - mkdirp "^0.5.1" - ws@7.4.6: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"