Commit 15009ac9 authored by tre's avatar tre

Merge branch 'develop' into update_eco_bridge

parents 17b87632 2e64d046
......@@ -91,24 +91,28 @@ jobs:
- store_test_results:
path: /tmp/test-results
yarn-monorepo:
pnpm-monorepo:
docker:
- image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:latest
resource_class: large
resource_class: xlarge
steps:
- checkout
- check-changed:
patterns: op-bindings,op-chain-ops,packages/
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: Install dependencies
command: yarn install && git diff --exit-code
command: pnpm install --frozen-lockfile
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-v2-{{ checksum "yarn.lock" }}
name: Save PNPM Package Cache
key: pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
paths:
- "node_modules"
- "packages/chain-mon/node_modules"
......@@ -116,7 +120,6 @@ jobs:
- "packages/contracts-bedrock/node_modules"
- "packages/contracts-periphery/node_modules"
- "packages/core-utils/node_modules"
- "packages/drippie-mon/node_modules"
- "packages/fault-detector/node_modules"
- "packages/hardhat-deploy-config/node_modules"
- "packages/replica-healthcheck/node_modules"
......@@ -126,7 +129,7 @@ jobs:
command: forge --version
- run:
name: Build monorepo
command: yarn build
command: pnpm build
- persist_to_workspace:
root: "."
paths:
......@@ -315,18 +318,23 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: contracts-bedrock,hardhat-deploy-config
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: print forge version
command: forge --version
working_directory: packages/contracts-bedrock
- run:
name: generate coverage report
command: yarn coverage:lcov
name: test and generate coverage
command: pnpm coverage:lcov
no_output_timeout: 18m
environment:
FOUNDRY_PROFILE: ci
working_directory: packages/contracts-bedrock
......@@ -344,18 +352,22 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: contracts-bedrock,hardhat-deploy-config
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: print forge version
command: forge --version
working_directory: packages/contracts-bedrock
- run:
name: run tests
command: yarn test
command: pnpm test
environment:
FOUNDRY_PROFILE: ci
working_directory: packages/contracts-bedrock
......@@ -367,41 +379,45 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: contracts-bedrock,hardhat-deploy-config
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: lint
command: |
yarn lint:check || echo "export LINT_STATUS=1" >> "$BASH_ENV"
pnpm lint:check || echo "export LINT_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: gas snapshot
command: |
forge --version
yarn gas-snapshot --check || echo "export GAS_SNAPSHOT_STATUS=1" >> "$BASH_ENV"
pnpm gas-snapshot --check || echo "export GAS_SNAPSHOT_STATUS=1" >> "$BASH_ENV"
environment:
FOUNDRY_PROFILE: ci
working_directory: packages/contracts-bedrock
- run:
name: validate deploy configs
command: |
yarn validate-deploy-configs || echo "export DEPLOY_CONFIG_STATUS=1" >> "$BASH_ENV"
pnpm validate-deploy-configs || echo "export DEPLOY_CONFIG_STATUS=1" >> "$BASH_ENV"
environment:
FOUNDRY_PROFILE: ci
working_directory: packages/contracts-bedrock
- run:
name: storage snapshot
command: |
yarn storage-snapshot
pnpm storage-snapshot
git diff --exit-code .storage-layout || echo "export STORAGE_SNAPSHOT_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: invariant docs
command: |
yarn autogen:invariant-docs
pnpm autogen:invariant-docs
git diff --exit-code ./invariant-docs/*.md || echo "export INVARIANT_DOCS_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
......@@ -439,16 +455,22 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: contracts-bedrock,hardhat-deploy-config
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: slither
command: |
slither --version
yarn slither
slither --version && pnpm slither || echo "export LINT_STATUS=1" >> "$BASH_ENV"
- run:
name: invariant docs
command: pnpm autogen:invariant-docs && git diff --exit-code ./invariant-docs/*.md
working_directory: packages/contracts-bedrock
contracts-bedrock-validate-spaces:
......@@ -458,14 +480,18 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: contracts-bedrock,hardhat-deploy-config
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: validate spacers
command: yarn validate-spacers
command: pnpm validate-spacers
working_directory: packages/contracts-bedrock
bedrock-echidna-build:
......@@ -476,9 +502,13 @@ jobs:
- attach_workspace: { at: "." }
- check-changed:
patterns: contracts-bedrock,contracts
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: Compile with metadata hash
command: yarn clean && yarn build:with-metadata
command: pnpm clean && pnpm build:with-metadata
working_directory: packages/contracts-bedrock
- persist_to_workspace:
root: .
......@@ -502,14 +532,18 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: contracts-bedrock,contracts
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: Echidna Fuzz <<parameters.echidna_target>>
command: yarn echidna:<<parameters.echidna_target>>
command: pnpm echidna:<<parameters.echidna_target>>
working_directory: packages/contracts-bedrock
no_output_timeout: 15m
......@@ -521,11 +555,15 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: contracts-bedrock,op-bindings
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: check go bindings
command: make && git diff --exit-code
......@@ -550,18 +588,22 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: <<parameters.package_name>>,<<parameters.dependencies>>
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: Lint
command: yarn lint && git diff --exit-code
command: pnpm lint && git diff --exit-code
working_directory: packages/<<parameters.package_name>>
- run:
name: Test
command: yarn test:coverage
command: pnpm test:coverage
working_directory: packages/<<parameters.package_name>>
- run:
name: Upload coverage
......@@ -575,9 +617,9 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore pnpm Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm.lock.yaml" }}
- check-changed:
patterns: sdk,contracts-bedrock,contracts
- run:
......@@ -592,11 +634,11 @@ jobs:
command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 11276409
- run:
name: build
command: yarn build
command: pnpm build
working_directory: packages/sdk
- run:
name: lint
command: yarn lint:check
command: pnpm lint:check
working_directory: packages/sdk
- run:
name: make sure anvil l1 is up
......@@ -606,7 +648,7 @@ jobs:
command: npx wait-on tcp:9545 && cast block-number --rpc-url http://localhost:9545
- run:
name: test:next
command: yarn test:next:run
command: pnpm test:next:run
no_output_timeout: 5m
working_directory: packages/sdk
environment:
......@@ -623,20 +665,28 @@ jobs:
- check-changed:
patterns: specs/(.*)\.md$
- run:
name: yarn dev deps # todo: what's the best way to pull in the dependencies for linting? yarn install above is using production env without dev dependencies
command: yarn install --production=false
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: pnpm dev deps
command: pnpm install
- run:
name: specs toc
command: yarn lint:specs:toc && git diff --exit-code ./specs
command: pnpm lint:specs:toc && git diff --exit-code ./specs
- run:
name: markdown lint
command: yarn lint:specs:check
command: pnpm lint:specs:check
bedrock-markdown-links:
machine:
image: ubuntu-2204:2022.07.1
steps:
- checkout
- run:
name: Lint check
command: |
pnpm lint:specs:check
- run:
name: link lint
command: |
......@@ -677,11 +727,15 @@ jobs:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore Yarn Package Cache
name: Restore PNPM Package Cache
keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }}
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: packages
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
# Note: The below needs to be manually configured whenever we
# add a new package to CI.
- run:
......@@ -809,7 +863,7 @@ jobs:
working_directory: <<parameters.working_directory>>
- when:
condition:
equal: [ true, <<parameters.build>> ]
equal: [true, <<parameters.build>>]
steps:
- run:
name: Build
......@@ -845,15 +899,19 @@ jobs:
source $HOME/.bashrc
foundryup
echo 'export PATH=$HOME/.foundry/bin:$PATH' >> $BASH_ENV
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
- run:
name: Install and build
command: |
yarn install
yarn build
pnpm install
pnpm build
- when:
condition:
and:
- equal: [ true, <<parameters.deploy>> ]
- equal: [true, <<parameters.deploy>>]
steps:
- run:
name: Bring up the stack
......@@ -899,7 +957,7 @@ jobs:
- when:
condition:
and:
- equal: [ false, <<parameters.deploy>> ]
- equal: [false, <<parameters.deploy>>]
steps:
- run:
name: Bring up the stack
......@@ -964,7 +1022,7 @@ jobs:
- checkout
- unless:
condition:
equal: [ "develop", << pipeline.git.branch >> ]
equal: ["develop", << pipeline.git.branch >>]
steps:
- run:
# Scan changed files in PRs, block on new issues only (existing issues ignored)
......@@ -1080,79 +1138,82 @@ jobs:
workflows:
main:
jobs:
- yarn-monorepo
- pnpm-monorepo
- js-lint-test:
name: common-ts-tests
coverage_flag: common-ts-tests
package_name: common-ts
requires:
- yarn-monorepo
- pnpm-monorepo
- js-lint-test:
name: core-utils-tests
coverage_flag: core-utils-tests
package_name: core-utils
requires:
- yarn-monorepo
- pnpm-monorepo
- contracts-bedrock-tests:
requires:
- yarn-monorepo
- pnpm-monorepo
- contracts-bedrock-coverage:
requires:
- yarn-monorepo
- pnpm-monorepo
- contracts-bedrock-checks:
requires:
- yarn-monorepo
- pnpm-monorepo
- contracts-bedrock-slither:
requires:
- yarn-monorepo
- pnpm-monorepo
- contracts-bedrock-validate-spaces:
requires:
- yarn-monorepo
- pnpm-monorepo
- op-bindings-build:
requires:
- yarn-monorepo
- pnpm-monorepo
- js-lint-test:
name: contracts-periphery-tests
coverage_flag: contracts-periphery-tests
package_name: contracts-periphery
dependencies: "(contracts|contracts-bedrock|core-utils|hardhat-deploy-config)"
requires:
- yarn-monorepo
- pnpm-monorepo
- js-lint-test:
name: chain-mon-tests
coverage_flag: chain-mon-tests
package_name: chain-mon
dependencies: "(common-ts|contracts-periphery|core-utils|sdk)"
requires:
- yarn-monorepo
- pnpm-monorepo
- js-lint-test:
name: fault-detector-tests
coverage_flag: fault-detector-tests
package_name: fault-detector
dependencies: "(common-ts|contracts|core-utils|sdk)"
dependencies: '(common-ts|core-utils|sdk)'
requires:
- yarn-monorepo
- pnpm-monorepo
- js-lint-test:
name: sdk-next-tests
coverage_flag: sdk-next-tests
package_name: sdk
dependencies: '(common-ts|contracts-bedrock|core-utils)'
requires:
- pnpm-monorepo
- js-lint-test:
name: replica-healthcheck-tests
coverage_flag: replica-healthcheck-tests
package_name: replica-healthcheck
dependencies: "(common-ts|core-utils)"
requires:
- yarn-monorepo
- sdk-next-tests:
name: sdk-next-tests
requires:
- yarn-monorepo
- pnpm-monorepo
- js-lint-test:
name: sdk-tests
coverage_flag: sdk-tests
package_name: sdk
dependencies: "(contracts|core-utils)"
dependencies: '(contracts-bedrock|core-utils)'
requires:
- yarn-monorepo
- pnpm-monorepo
- depcheck:
requires:
- yarn-monorepo
- pnpm-monorepo
- devnet:
name: devnet (with deployed contracts)
deploy: true
......
......@@ -35,21 +35,10 @@ jobs:
uses: actions/setup-node@master
with:
node-version: 16.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: pnpm
- name: Install Dependencies
run: yarn --frozen-lockfile
run: pnpm --frozen-lockfile
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
......@@ -57,17 +46,17 @@ jobs:
version: nightly
- name: Build
run: yarn build
run: pnpm build
- name: Setup Canary Snapshot
run: yarn changeset version --snapshot
run: pnpm changeset version --snapshot
- name: Publish To NPM
uses: changesets/action@v1
id: changesets
with:
createGithubReleases: false
publish: yarn changeset publish --tag canary
publish: pnpm changeset publish --tag canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
......
......@@ -33,21 +33,10 @@ jobs:
uses: actions/setup-node@master
with:
node-version: 16.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: pnpm
- name: Install Dependencies
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
......@@ -62,7 +51,7 @@ jobs:
id: changesets
with:
createGithubReleases: false
publish: yarn release
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
......
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn nx affected --target=pre-commit
pnpm nx affected --target=pre-commit
# run prefoo scripts
# npm and yarn support this as a default pnpm defaults to false
enable-pre-post-scripts=true
lockfile=true
prefer-workspace-packages=true
module.exports = {
$schema: 'http://json.schemastore.org/prettierrc',
plugins: ['prettier-plugin-solidity'],
trailingComma: 'es5',
tabWidth: 2,
semi: false,
......
......@@ -43,7 +43,7 @@ You *must* include a `changeset` file in your PR when making a change that would
Adding a `changeset` file is easy:
1. Navigate to the root of the monorepo.
2. Run `yarn changeset`. You'll be prompted to select packages to include in the changeset. Use the arrow keys to move the cursor up and down, hit the `spacebar` to select a package, and hit `enter` to confirm your selection. Select *all* packages that require a new release as a result of your PR.
2. Run `pnpm changeset`. You'll be prompted to select packages to include in the changeset. Use the arrow keys to move the cursor up and down, hit the `spacebar` to select a package, and hit `enter` to confirm your selection. Select *all* packages that require a new release as a result of your PR.
3. Once you hit `enter` you'll be prompted to decide whether your selected packages need a `major`, `minor`, or `patch` release. We follow the [Semantic Versioning](https://semver.org/) scheme. Please avoid using `major` releases for any packages that are still in version `0.y.z`.
4. Commit your changeset and push it into your PR. The changeset bot will notice your changeset file and leave a little comment to this effect on GitHub.
5. Voilà, c'est fini!
......@@ -63,7 +63,7 @@ You'll need the following:
* [Git](https://git-scm.com/downloads)
* [NodeJS](https://nodejs.org/en/download/)
* [Node Version Manager](https://github.com/nvm-sh/nvm)
* [Yarn](https://classic.yarnpkg.com/en/docs/install)
* [pnpm](https://pnpm.io/installation)
* [Docker](https://docs.docker.com/get-docker/)
* [Docker Compose](https://docs.docker.com/compose/install/)
* [Go](https://go.dev/dl/)
......@@ -86,10 +86,10 @@ Install node v16.16.0 with [nvm](https://github.com/nvm-sh/nvm)
nvm use
```
### Install node modules with Yarn
### Install node modules with pnpm
```bash
yarn install
pnpm i
```
### Building the TypeScript packages
......@@ -101,8 +101,8 @@ and compile the smart contracts. Install foundry [here](https://getfoundry.sh/).
To build all of the [TypeScript packages](./packages), run:
```bash
yarn clean
yarn build
pnpm clean
pnpm build
```
Packages compiled when on one branch may not be compatible with packages on a different branch.
......@@ -136,8 +136,8 @@ Finally, **if you're running into weird problems and nothing seems to be working
```bash
cd optimism
yarn clean
yarn build
pnpm clean
pnpm build
cd ops
docker-compose down -v
docker-compose build
......@@ -162,14 +162,14 @@ Before running tests: **follow the above instructions to get everything built.**
Run unit tests for all packages in parallel via:
```bash
yarn test
pnpm test
```
To run unit tests for a specific package:
```bash
cd packages/package-to-test
yarn test
pnpm test
```
#### Running contract static analysis
......@@ -181,5 +181,5 @@ To run `slither` locally, do:
```bash
cd packages/contracts
pip3 install slither-analyzer
yarn test:slither
pnpm test:slither
```
......@@ -12,8 +12,8 @@ build-ts: submodules
if [ -n "$$NVM_DIR" ]; then \
. $$NVM_DIR/nvm.sh && nvm use; \
fi
yarn install
yarn build
pnpm install
pnpm build
.PHONY: build-ts
submodules:
......@@ -102,7 +102,7 @@ test-unit:
make -C ./op-proposer test
make -C ./op-batcher test
make -C ./op-e2e test
yarn test
pnpm test
.PHONY: test-unit
test-integration:
......
......@@ -138,7 +138,7 @@ See table in the **Active Branches** section above to find the right branch to t
We use [changesets](https://github.com/changesets/changesets) to mark packages for new releases.
When merging commits to the `develop` branch you MUST include a changeset file if your change would require that a new version of a package be released.
To add a changeset, run the command `yarn changeset` in the root of this monorepo.
To add a changeset, run the command `pnpm changeset` in the root of this monorepo.
You will be presented with a small prompt to select the packages to be released, the scope of the release (major, minor, or patch), and the reason for the release.
Comments within changeset files will be automatically included in the changelog of the package.
......
......@@ -48,7 +48,7 @@ func LoadContractsFromFiles() (*Contracts, error) {
if err != nil {
return nil, err
}
oracle, err := LoadContract("Oracle")
oracle, err := LoadContract("PreimageOracle")
if err != nil {
return nil, err
}
......
......@@ -58,8 +58,9 @@ func TestEVM(t *testing.T) {
for _, f := range testFiles {
t.Run(f.Name(), func(t *testing.T) {
var oracle PreimageOracle
if f.Name() == "oracle.bin" {
t.Skip("oracle test needs to be updated to use syscall pre-image oracle")
oracle = staticOracle(t, []byte("hello world"))
}
env, evmState := NewEVMEnv(contracts, addrs)
......@@ -75,7 +76,7 @@ func TestEVM(t *testing.T) {
// set the return address ($ra) to jump into when test completes
state.Registers[31] = endAddr
us := NewInstrumentedState(state, nil, os.Stdout, os.Stderr)
us := NewInstrumentedState(state, oracle, os.Stdout, os.Stderr)
for i := 0; i < 1000; i++ {
if us.state.PC == endAddr {
......@@ -91,6 +92,16 @@ func TestEVM(t *testing.T) {
// we take a snapshot so we can clean up the state, and isolate the logs of this instruction run.
snap := env.StateDB.Snapshot()
// prepare pre-image oracle data, if any
if stepWitness.HasPreimage() {
t.Logf("reading preimage key %x at offset %d", stepWitness.PreimageKey, stepWitness.PreimageOffset)
poInput, err := stepWitness.EncodePreimageOracleInput()
require.NoError(t, err, "encode preimage oracle input")
_, leftOverGas, err := env.Call(vm.AccountRef(addrs.Sender), addrs.Oracle, poInput, startingGas, big.NewInt(0))
require.NoErrorf(t, err, "evm should not fail, took %d gas", startingGas-leftOverGas)
}
ret, leftOverGas, err := env.Call(vm.AccountRef(sender), addrs.MIPS, input, startingGas, big.NewInt(0))
require.NoError(t, err, "evm should not fail")
require.Len(t, ret, 32, "expecting 32-byte state hash")
......
.section .test, "x"
.section .test, "x"
.balign 4
.set noreorder
.global test
.ent test
# load hash at 0x30001000
# 0x47173285 a8d7341e 5e972fc6 77286384 f802f8ef 42a5ec5f 03bbfa25 4cb01fad = "hello world"
# 0x47173285 a8d7341e 5e972fc6 77286384 f802f8ef 42a5ec5f 03bbfa25 4cb01fad = keccak("hello world")
# 0x02173285 a8d7341e 5e972fc6 77286384 f802f8ef 42a5ec5f 03bbfa25 4cb01fad = keccak("hello world").key
test:
lui $s0, 0x3000
ori $s0, 0x1000
lui $t0, 0x4717
lui $t0, 0x0217
ori $t0, 0x3285
sw $t0, 0($s0)
lui $t0, 0xa8d7
......@@ -35,20 +36,53 @@ test:
ori $t0, 0x1fad
sw $t0, 0x1c($s0)
# syscall 4020 to trigger
li $v0, 4020
# preimage request - write(fdPreimageWrite, preimageData, 32)
li $a0, 6
li $a1, 0x30001000
li $t0, 8
li $a2, 4
$writeloop:
li $v0, 4004
syscall
addiu $a1, $a1, 4
addiu $t0, $t0, -1
bnez $t0, $writeloop
nop
# preimage response to 0x30002000 - read(fdPreimageRead, addr, count)
# read preimage length
li $a0, 5
li $a1, 0x31000000
li $a2, 4
li $v0, 4003
syscall
li $a1, 0x31000004
li $v0, 4003
syscall
# read the preimage data
li $a1, 0x31000008
li $t0, 3
$readloop:
li $v0, 4003
syscall
addiu $a1, $a1, 4
addiu $t0, $t0, -1
bnez $t0, $readloop
nop
# length at 0x31000000
# length at 0x31000000. We also check that the lower 32 bits are zero
lui $s1, 0x3100
lw $t0, 0($s1)
sltiu $t6, $t0, 1
li $s1, 0x31000004
lw $t0, 0($s1)
# should be len("hello world") == 11
li $t4, 11
subu $t5, $t0, $t4
sltiu $v0, $t5, 1
sltiu $v0, $t5, 1
and $v0, $v0, $t6
# data at 0x31000004
# data at 0x31000008
lw $t0, 4($s1)
lui $t4, 0x6865
ori $t4, 0x6c6c
......
......@@ -31,8 +31,9 @@ func TestState(t *testing.T) {
for _, f := range testFiles {
t.Run(f.Name(), func(t *testing.T) {
var oracle PreimageOracle
if f.Name() == "oracle.bin" {
t.Skip("oracle test needs to be updated to use syscall pre-image oracle")
oracle = staticOracle(t, []byte("hello world"))
}
// TODO: currently tests are compiled as flat binary objects
// We can use more standard tooling to compile them to ELF files and get remove maketests.py
......@@ -50,7 +51,7 @@ func TestState(t *testing.T) {
// set the return address ($ra) to jump into when test completes
state.Registers[31] = endAddr
us := NewInstrumentedState(state, nil, os.Stdout, os.Stderr)
us := NewInstrumentedState(state, oracle, os.Stdout, os.Stderr)
for i := 0; i < 1000; i++ {
if us.state.PC == endAddr {
......@@ -196,3 +197,15 @@ func TestClaim(t *testing.T) {
require.Equal(t, expectedStdOut, stdOutBuf.String(), "stdout")
require.Equal(t, expectedStdErr, stdErrBuf.String(), "stderr")
}
func staticOracle(t *testing.T, preimageData []byte) *testOracle {
return &testOracle{
hint: func(v []byte) {},
getPreimage: func(k [32]byte) []byte {
if k != preimage.Keccak256Key(crypto.Keccak256Hash(preimageData)).PreimageKey() {
t.Fatalf("invalid preimage request for %x", k)
}
return preimageData
},
}
}
{
"npmClient": "yarn",
"npmClient": "pnpm",
"useWorkspaces": true,
"version": "independent",
"packages": [
"packages/*"
],
"version": "independent"
]
}
......@@ -11,7 +11,7 @@ version:
compile:
cd $(contracts-dir) && \
yarn build
pnpm build
bindings: compile bindings-build
......@@ -28,7 +28,7 @@ mkdir:
clean-contracts:
cd $(contracts-dir) && \
yarn clean
pnpm clean
clean:
rm -rf $(pkg)
......
......@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const FaultDisputeGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"gameStart\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1011\"},{\"astId\":1001,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"status\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1006\"},{\"astId\":1002,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"bondManager\",\"offset\":9,\"slot\":\"0\",\"type\":\"t_contract(IBondManager)1005\"},{\"astId\":1003,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_struct(ClaimData)5796_storage)dyn_storage\"},{\"astId\":1004,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)\"}],\"types\":{\"t_array(t_struct(ClaimData)5796_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IFaultDisputeGame.ClaimData[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(ClaimData)5796_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(IBondManager)1005\":{\"encoding\":\"inplace\",\"label\":\"contract IBondManager\",\"numberOfBytes\":\"20\"},\"t_enum(GameStatus)1006\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1008\",\"value\":\"t_bool\"},\"t_struct(ClaimData)5796_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IFaultDisputeGame.ClaimData\",\"numberOfBytes\":\"96\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1007\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1008\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1009\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Position)1010\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1011\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}"
const FaultDisputeGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"gameStart\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1011\"},{\"astId\":1001,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"status\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1006\"},{\"astId\":1002,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"bondManager\",\"offset\":9,\"slot\":\"0\",\"type\":\"t_contract(IBondManager)1005\"},{\"astId\":1003,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_struct(ClaimData)38805_storage)dyn_storage\"},{\"astId\":1004,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)\"}],\"types\":{\"t_array(t_struct(ClaimData)38805_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IFaultDisputeGame.ClaimData[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(ClaimData)38805_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(IBondManager)1005\":{\"encoding\":\"inplace\",\"label\":\"contract IBondManager\",\"numberOfBytes\":\"20\"},\"t_enum(GameStatus)1006\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1008\",\"value\":\"t_bool\"},\"t_struct(ClaimData)38805_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IFaultDisputeGame.ClaimData\",\"numberOfBytes\":\"96\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1007\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1008\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1009\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Position)1010\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1011\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}"
var FaultDisputeGameStorageLayout = new(solc.StorageLayout)
......
......@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const L2OutputOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"startingBlockNumber\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1003,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"startingTimestamp\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1004,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"l2Outputs\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_array(t_struct(OutputProposal)9692_storage)dyn_storage\"}],\"types\":{\"t_array(t_struct(OutputProposal)9692_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct Types.OutputProposal[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(OutputProposal)9692_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_struct(OutputProposal)9692_storage\":{\"encoding\":\"inplace\",\"label\":\"struct Types.OutputProposal\",\"numberOfBytes\":\"64\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
const L2OutputOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"startingBlockNumber\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1003,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"startingTimestamp\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1004,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"l2Outputs\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_array(t_struct(OutputProposal)42701_storage)dyn_storage\"}],\"types\":{\"t_array(t_struct(OutputProposal)42701_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct Types.OutputProposal[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(OutputProposal)42701_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_struct(OutputProposal)42701_storage\":{\"encoding\":\"inplace\",\"label\":\"struct Types.OutputProposal\",\"numberOfBytes\":\"64\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var L2OutputOracleStorageLayout = new(solc.StorageLayout)
......
......@@ -31,7 +31,7 @@ var (
// MIPSMetaData contains all meta data concerning the MIPS contract.
var MIPSMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"name\":\"BRK_START\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"Step\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contractIPreimageOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x608060405234801561001057600080fd5b50611b1c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006757806398bb138314610098575b600080fd5b61004e61016c565b6040805163ffffffff9092168252519081900360200190f35b61006f610174565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61015a600480360360408110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111640100000000831117156100fd57600080fd5b91939092909160208101903564010000000081111561011b57600080fd5b82018360208201111561012d57600080fd5b8035906020019184600183028401116401000000008311171561014f57600080fd5b509092509050610190565b60408051918252519081900360200190f35b634000000081565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600061019a611a62565b608081146101a757600080fd5b604051610600146101b757600080fd5b606486146101c457600080fd5b61016684146101d257600080fd5b6101ef565b8035602084810360031b9190911c8352920192910190565b8560806101fe602082846101d7565b9150915061020e602082846101d7565b9150915061021e600482846101d7565b9150915061022e600482846101d7565b9150915061023e600482846101d7565b9150915061024e600482846101d7565b9150915061025e600482846101d7565b9150915061026e600482846101d7565b9150915061027e600182846101d7565b9150915061028e600182846101d7565b9150915061029e600882846101d7565b6020810190819052909250905060005b60208110156102d0576102c3600483856101d7565b90935091506001016102ae565b505050806101200151156102ee576102e6610710565b915050610708565b6101408101805160010167ffffffffffffffff1690526060810151600090610316908261081e565b9050603f601a82901c16600281148061033557508063ffffffff166003145b15610382576103788163ffffffff1660021461035257601f610355565b60005b60ff16600261036b856303ffffff16601a6108e6565b63ffffffff16901b610959565b9350505050610708565b6101608301516000908190601f601086901c81169190601587901c16602081106103a857fe5b602002015192508063ffffffff851615806103c957508463ffffffff16601c145b156103fa578661016001518263ffffffff16602081106103e557fe5b6020020151925050601f600b86901c166104b1565b60208563ffffffff16101561045d578463ffffffff16600c148061042457508463ffffffff16600d145b8061043557508463ffffffff16600e145b15610446578561ffff169250610458565b6104558661ffff1660106108e6565b92505b6104b1565b60288563ffffffff1610158061047957508463ffffffff166022145b8061048a57508463ffffffff166026145b156104b1578661016001518263ffffffff16602081106104a657fe5b602002015192508190505b60048563ffffffff16101580156104ce575060088563ffffffff16105b806104df57508463ffffffff166001145b156104fe576104f0858784876109c4565b975050505050505050610708565b63ffffffff60006020878316106105635761051e8861ffff1660106108e6565b9095019463fffffffc861661053481600161081e565b915060288863ffffffff161015801561055457508763ffffffff16603014155b1561056157809250600093505b505b600061057189888885610b4d565b63ffffffff9081169150603f8a16908916158015610596575060088163ffffffff1610155b80156105a85750601c8163ffffffff16105b15610687578063ffffffff16600814806105c857508063ffffffff166009145b156105ff576105ed8163ffffffff166008146105e457856105e7565b60005b89610959565b9b505050505050505050505050610708565b8063ffffffff16600a1415610620576105ed858963ffffffff8a1615611213565b8063ffffffff16600b1415610642576105ed858963ffffffff8a161515611213565b8063ffffffff16600c1415610659576105ed6112f8565b60108163ffffffff16101580156106765750601c8163ffffffff16105b15610687576105ed81898988611770565b8863ffffffff1660381480156106a2575063ffffffff861615155b156106d15760018b61016001518763ffffffff16602081106106c057fe5b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146106ee576106ee84600184611954565b6106fa85836001611213565b9b5050505050505050505050505b949350505050565b6000610728565b602083810382015183520192910190565b60806040518061073a60208285610717565b9150925061074a60208285610717565b9150925061075a60048285610717565b9150925061076a60048285610717565b9150925061077a60048285610717565b9150925061078a60048285610717565b9150925061079a60048285610717565b915092506107aa60048285610717565b915092506107ba60018285610717565b915092506107ca60018285610717565b915092506107da60088285610717565b60209091019350905060005b6020811015610808576107fb60048386610717565b90945091506001016107e6565b506000815281810382a081900390209150505b90565b60008061082a836119f0565b9050600384161561083a57600080fd5b602081019035610857565b60009081526020919091526040902090565b8460051c8160005b601b8110156108af5760208501943583821c60011680156108875760018114610898576108a5565b6108918285610845565b93506108a5565b6108a28483610845565b93505b505060010161085f565b5060805191508181146108ca57630badf00d60005260206000fd5b5050601f8516601c0360031b1c63ffffffff1691505092915050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b0182610943576000610945565b815b90861663ffffffff16179250505092915050565b6000610963611a62565b5060e08051610100805163ffffffff90811690935284831690526080918516156109b357806008018261016001518663ffffffff16602081106109a257fe5b63ffffffff90921660209290920201525b6109bb610710565b95945050505050565b60006109ce611a62565b5060806000600463ffffffff881614806109ee57508663ffffffff166005145b15610a645760008261016001518663ffffffff1660208110610a0c57fe5b602002015190508063ffffffff168563ffffffff16148015610a3457508763ffffffff166004145b80610a5c57508063ffffffff168563ffffffff1614158015610a5c57508763ffffffff166005145b915050610ae1565b8663ffffffff1660061415610a825760008460030b13159050610ae1565b8663ffffffff1660071415610a9f5760008460030b139050610ae1565b8663ffffffff1660011415610ae157601f601087901c1680610ac55760008560030b1291505b8063ffffffff1660011415610adf5760008560030b121591505b505b606082018051608084015163ffffffff169091528115610b27576002610b0c8861ffff1660106108e6565b63ffffffff90811690911b8201600401166080840152610b39565b60808301805160040163ffffffff1690525b610b41610710565b98975050505050505050565b6000603f601a86901c81169086166020821015610f215760088263ffffffff1610158015610b815750600f8263ffffffff16105b15610c28578163ffffffff1660081415610b9d57506020610c23565b8163ffffffff1660091415610bb457506021610c23565b8163ffffffff16600a1415610bcb5750602a610c23565b8163ffffffff16600b1415610be25750602b610c23565b8163ffffffff16600c1415610bf957506024610c23565b8163ffffffff16600d1415610c1057506025610c23565b8163ffffffff16600e1415610c23575060265b600091505b63ffffffff8216610e7157601f600688901c16602063ffffffff83161015610d455760088263ffffffff1610610c6357869350505050610708565b63ffffffff8216610c835763ffffffff86811691161b9250610708915050565b8163ffffffff1660021415610ca75763ffffffff86811691161c9250610708915050565b8163ffffffff1660031415610cd2576103788163ffffffff168763ffffffff16901c826020036108e6565b8163ffffffff1660041415610cf6575050505063ffffffff8216601f84161b610708565b8163ffffffff1660061415610d1a575050505063ffffffff8216601f84161c610708565b8163ffffffff1660071415610d45576103788763ffffffff168763ffffffff16901c886020036108e6565b8163ffffffff1660201480610d6057508163ffffffff166021145b15610d72578587019350505050610708565b8163ffffffff1660221480610d8d57508163ffffffff166023145b15610d9f578587039350505050610708565b8163ffffffff1660241415610dbb578587169350505050610708565b8163ffffffff1660251415610dd7578587179350505050610708565b8163ffffffff1660261415610df3578587189350505050610708565b8163ffffffff1660271415610e0f575050505082821719610708565b8163ffffffff16602a1415610e42578560030b8760030b12610e32576000610e35565b60015b60ff169350505050610708565b8163ffffffff16602b1415610e6b578563ffffffff168763ffffffff1610610e32576000610e35565b50610f1c565b8163ffffffff16600f1415610e945760108563ffffffff16901b92505050610708565b8163ffffffff16601c1415610f1c578063ffffffff1660021415610ebd57505050828202610708565b8063ffffffff1660201480610ed857508063ffffffff166021145b15610f1c578063ffffffff1660201415610ef0579419945b60005b6380000000871615610f12576401fffffffe600197881b169601610ef3565b9250610708915050565b6111ac565b60288263ffffffff16101561108b578163ffffffff1660201415610f6e57610f658660031660080260180363ffffffff168563ffffffff16901c60ff1660086108e6565b92505050610708565b8163ffffffff1660211415610fa457610f658660021660080260100363ffffffff168563ffffffff16901c61ffff1660106108e6565b8163ffffffff1660221415610fd55750505063ffffffff60086003851602811681811b198416918316901b17610708565b8163ffffffff1660231415610fee578392505050610708565b8163ffffffff1660241415611022578560031660080260180363ffffffff168463ffffffff16901c60ff1692505050610708565b8163ffffffff1660251415611057578560021660080260100363ffffffff168463ffffffff16901c61ffff1692505050610708565b8163ffffffff1660261415610f1c5750505063ffffffff60086003851602601803811681811c198416918316901c17610708565b8163ffffffff16602814156110c35750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610708565b8163ffffffff16602914156110fc5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610708565b8163ffffffff16602a141561112d5750505063ffffffff60086003851602811681811c198316918416901c17610708565b8163ffffffff16602b1415611146578492505050610708565b8163ffffffff16602e141561117a5750505063ffffffff60086003851602601803811681811b198316918416901b17610708565b8163ffffffff1660301415611193578392505050610708565b8163ffffffff16603814156111ac578492505050610708565b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e00000000000000000000000000604482015290519081900360640190fd5b600061121d611a62565b506080602063ffffffff86161061129557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c6964207265676973746572000000000000000000000000000000000000604482015290519081900360640190fd5b63ffffffff8516158015906112a75750825b156112d557838161016001518663ffffffff16602081106112c457fe5b63ffffffff90921660209290920201525b60808101805163ffffffff808216606085015260049091011690526109bb610710565b6000611302611a62565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa141561137a5781610fff81161561134c57610fff811661100003015b63ffffffff84166113705760e08801805163ffffffff838201169091529550611374565b8395505b50611723565b8563ffffffff16610fcd14156113965763400000009450611723565b8563ffffffff1661101814156113af5760019450611723565b8563ffffffff1661109614156113e757600161012088015260ff83166101008801526113d9610710565b97505050505050505061081b565b8563ffffffff16610fa314156115a15763ffffffff83166114075761159c565b63ffffffff8316600514156115795760006114298363fffffffc16600161081e565b6000805460208b01516040808d015181517fe03110e1000000000000000000000000000000000000000000000000000000008152600481019390935263ffffffff16602483015280519495509293849373ffffffffffffffffffffffffffffffffffffffff9093169263e03110e19260448082019391829003018186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d60408110156114dd57600080fd5b508051602090910151909250905060038516600481900382811015611500578092505b508185101561150d578491505b8260088302610100031c925082600882021b9250600180600883600403021b036001806008858560040301021b0391508119811690508381198616179450505061155f8563fffffffc16600185611954565b60408a018051820163ffffffff169052965061159c915050565b63ffffffff8316600314156115905780945061159c565b63ffffffff9450600993505b611723565b8563ffffffff16610fa414156116755763ffffffff8316600114806115cc575063ffffffff83166002145b806115dd575063ffffffff83166004145b156115ea5780945061159c565b63ffffffff83166006141561159057600061160c8363fffffffc16600161081e565b60208901519091506003841660040383811015611627578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b1760208801526000604088015293508361159c565b8563ffffffff16610fd71415611723578163ffffffff16600314156117175763ffffffff831615806116ad575063ffffffff83166005145b806116be575063ffffffff83166003145b156116cc576000945061159c565b63ffffffff8316600114806116e7575063ffffffff83166002145b806116f8575063ffffffff83166006145b80611709575063ffffffff83166004145b15611590576001945061159c565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b01526004019091169052611764610710565b97505050505050505090565b600061177a611a62565b5060806000601063ffffffff88161415611799575060c08101516118f1565b8663ffffffff16601114156117b95763ffffffff861660c08301526118f1565b8663ffffffff16601214156117d3575060a08101516118f1565b8663ffffffff16601314156117f35763ffffffff861660a08301526118f1565b8663ffffffff16601814156118285763ffffffff600387810b9087900b02602081901c821660c08501521660a08301526118f1565b8663ffffffff166019141561185a5763ffffffff86811681871602602081901c821660c08501521660a08301526118f1565b8663ffffffff16601a14156118a5578460030b8660030b8161187857fe5b0763ffffffff1660c0830152600385810b9087900b8161189457fe5b0563ffffffff1660a08301526118f1565b8663ffffffff16601b14156118f1578463ffffffff168663ffffffff16816118c957fe5b0663ffffffff90811660c0840152858116908716816118e457fe5b0463ffffffff1660a08301525b63ffffffff84161561192657808261016001518563ffffffff166020811061191557fe5b63ffffffff90921660209290920201525b60808201805163ffffffff80821660608601526004909101169052611949610710565b979650505050505050565b600061195f836119f0565b9050600384161561196f57600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b8110156119e55760208401933582821c60011680156119bd57600181146119ce576119db565b6119c78286610845565b94506119db565b6119d88583610845565b94505b5050600101611995565b505060805250505050565b60ff81166103800261016681019036906104e601811015611a5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611aed6023913960400191505060405180910390fd5b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611ac8611acd565b905290565b604051806104000160405280602090602082028036833750919291505056fe636865636b207468617420746865726520697320656e6f7567682063616c6c64617461a164736f6c6343000706000a",
Bin: "0x608060405234801561001057600080fd5b50611b21806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006757806398bb138314610098575b600080fd5b61004e61016c565b6040805163ffffffff9092168252519081900360200190f35b61006f610174565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61015a600480360360408110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111640100000000831117156100fd57600080fd5b91939092909160208101903564010000000081111561011b57600080fd5b82018360208201111561012d57600080fd5b8035906020019184600183028401116401000000008311171561014f57600080fd5b509092509050610190565b60408051918252519081900360200190f35b634000000081565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600061019a611a67565b608081146101a757600080fd5b604051610600146101b757600080fd5b606486146101c457600080fd5b61016684146101d257600080fd5b6101ef565b8035602084810360031b9190911c8352920192910190565b8560806101fe602082846101d7565b9150915061020e602082846101d7565b9150915061021e600482846101d7565b9150915061022e600482846101d7565b9150915061023e600482846101d7565b9150915061024e600482846101d7565b9150915061025e600482846101d7565b9150915061026e600482846101d7565b9150915061027e600182846101d7565b9150915061028e600182846101d7565b9150915061029e600882846101d7565b6020810190819052909250905060005b60208110156102d0576102c3600483856101d7565b90935091506001016102ae565b505050806101200151156102ee576102e6610710565b915050610708565b6101408101805160010167ffffffffffffffff1690526060810151600090610316908261081e565b9050603f601a82901c16600281148061033557508063ffffffff166003145b15610382576103788163ffffffff1660021461035257601f610355565b60005b60ff16600261036b856303ffffff16601a6108e6565b63ffffffff16901b610959565b9350505050610708565b6101608301516000908190601f601086901c81169190601587901c16602081106103a857fe5b602002015192508063ffffffff851615806103c957508463ffffffff16601c145b156103fa578661016001518263ffffffff16602081106103e557fe5b6020020151925050601f600b86901c166104b1565b60208563ffffffff16101561045d578463ffffffff16600c148061042457508463ffffffff16600d145b8061043557508463ffffffff16600e145b15610446578561ffff169250610458565b6104558661ffff1660106108e6565b92505b6104b1565b60288563ffffffff1610158061047957508463ffffffff166022145b8061048a57508463ffffffff166026145b156104b1578661016001518263ffffffff16602081106104a657fe5b602002015192508190505b60048563ffffffff16101580156104ce575060088563ffffffff16105b806104df57508463ffffffff166001145b156104fe576104f0858784876109c4565b975050505050505050610708565b63ffffffff60006020878316106105635761051e8861ffff1660106108e6565b9095019463fffffffc861661053481600161081e565b915060288863ffffffff161015801561055457508763ffffffff16603014155b1561056157809250600093505b505b600061057189888885610b4d565b63ffffffff9081169150603f8a16908916158015610596575060088163ffffffff1610155b80156105a85750601c8163ffffffff16105b15610687578063ffffffff16600814806105c857508063ffffffff166009145b156105ff576105ed8163ffffffff166008146105e457856105e7565b60005b89610959565b9b505050505050505050505050610708565b8063ffffffff16600a1415610620576105ed858963ffffffff8a1615611213565b8063ffffffff16600b1415610642576105ed858963ffffffff8a161515611213565b8063ffffffff16600c1415610659576105ed6112f8565b60108163ffffffff16101580156106765750601c8163ffffffff16105b15610687576105ed81898988611775565b8863ffffffff1660381480156106a2575063ffffffff861615155b156106d15760018b61016001518763ffffffff16602081106106c057fe5b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146106ee576106ee84600184611959565b6106fa85836001611213565b9b5050505050505050505050505b949350505050565b6000610728565b602083810382015183520192910190565b60806040518061073a60208285610717565b9150925061074a60208285610717565b9150925061075a60048285610717565b9150925061076a60048285610717565b9150925061077a60048285610717565b9150925061078a60048285610717565b9150925061079a60048285610717565b915092506107aa60048285610717565b915092506107ba60018285610717565b915092506107ca60018285610717565b915092506107da60088285610717565b60209091019350905060005b6020811015610808576107fb60048386610717565b90945091506001016107e6565b506000815281810382a081900390209150505b90565b60008061082a836119f5565b9050600384161561083a57600080fd5b602081019035610857565b60009081526020919091526040902090565b8460051c8160005b601b8110156108af5760208501943583821c60011680156108875760018114610898576108a5565b6108918285610845565b93506108a5565b6108a28483610845565b93505b505060010161085f565b5060805191508181146108ca57630badf00d60005260206000fd5b5050601f8516601c0360031b1c63ffffffff1691505092915050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b0182610943576000610945565b815b90861663ffffffff16179250505092915050565b6000610963611a67565b5060e08051610100805163ffffffff90811690935284831690526080918516156109b357806008018261016001518663ffffffff16602081106109a257fe5b63ffffffff90921660209290920201525b6109bb610710565b95945050505050565b60006109ce611a67565b5060806000600463ffffffff881614806109ee57508663ffffffff166005145b15610a645760008261016001518663ffffffff1660208110610a0c57fe5b602002015190508063ffffffff168563ffffffff16148015610a3457508763ffffffff166004145b80610a5c57508063ffffffff168563ffffffff1614158015610a5c57508763ffffffff166005145b915050610ae1565b8663ffffffff1660061415610a825760008460030b13159050610ae1565b8663ffffffff1660071415610a9f5760008460030b139050610ae1565b8663ffffffff1660011415610ae157601f601087901c1680610ac55760008560030b1291505b8063ffffffff1660011415610adf5760008560030b121591505b505b606082018051608084015163ffffffff169091528115610b27576002610b0c8861ffff1660106108e6565b63ffffffff90811690911b8201600401166080840152610b39565b60808301805160040163ffffffff1690525b610b41610710565b98975050505050505050565b6000603f601a86901c81169086166020821015610f215760088263ffffffff1610158015610b815750600f8263ffffffff16105b15610c28578163ffffffff1660081415610b9d57506020610c23565b8163ffffffff1660091415610bb457506021610c23565b8163ffffffff16600a1415610bcb5750602a610c23565b8163ffffffff16600b1415610be25750602b610c23565b8163ffffffff16600c1415610bf957506024610c23565b8163ffffffff16600d1415610c1057506025610c23565b8163ffffffff16600e1415610c23575060265b600091505b63ffffffff8216610e7157601f600688901c16602063ffffffff83161015610d455760088263ffffffff1610610c6357869350505050610708565b63ffffffff8216610c835763ffffffff86811691161b9250610708915050565b8163ffffffff1660021415610ca75763ffffffff86811691161c9250610708915050565b8163ffffffff1660031415610cd2576103788163ffffffff168763ffffffff16901c826020036108e6565b8163ffffffff1660041415610cf6575050505063ffffffff8216601f84161b610708565b8163ffffffff1660061415610d1a575050505063ffffffff8216601f84161c610708565b8163ffffffff1660071415610d45576103788763ffffffff168763ffffffff16901c886020036108e6565b8163ffffffff1660201480610d6057508163ffffffff166021145b15610d72578587019350505050610708565b8163ffffffff1660221480610d8d57508163ffffffff166023145b15610d9f578587039350505050610708565b8163ffffffff1660241415610dbb578587169350505050610708565b8163ffffffff1660251415610dd7578587179350505050610708565b8163ffffffff1660261415610df3578587189350505050610708565b8163ffffffff1660271415610e0f575050505082821719610708565b8163ffffffff16602a1415610e42578560030b8760030b12610e32576000610e35565b60015b60ff169350505050610708565b8163ffffffff16602b1415610e6b578563ffffffff168763ffffffff1610610e32576000610e35565b50610f1c565b8163ffffffff16600f1415610e945760108563ffffffff16901b92505050610708565b8163ffffffff16601c1415610f1c578063ffffffff1660021415610ebd57505050828202610708565b8063ffffffff1660201480610ed857508063ffffffff166021145b15610f1c578063ffffffff1660201415610ef0579419945b60005b6380000000871615610f12576401fffffffe600197881b169601610ef3565b9250610708915050565b6111ac565b60288263ffffffff16101561108b578163ffffffff1660201415610f6e57610f658660031660080260180363ffffffff168563ffffffff16901c60ff1660086108e6565b92505050610708565b8163ffffffff1660211415610fa457610f658660021660080260100363ffffffff168563ffffffff16901c61ffff1660106108e6565b8163ffffffff1660221415610fd55750505063ffffffff60086003851602811681811b198416918316901b17610708565b8163ffffffff1660231415610fee578392505050610708565b8163ffffffff1660241415611022578560031660080260180363ffffffff168463ffffffff16901c60ff1692505050610708565b8163ffffffff1660251415611057578560021660080260100363ffffffff168463ffffffff16901c61ffff1692505050610708565b8163ffffffff1660261415610f1c5750505063ffffffff60086003851602601803811681811c198416918316901c17610708565b8163ffffffff16602814156110c35750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610708565b8163ffffffff16602914156110fc5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610708565b8163ffffffff16602a141561112d5750505063ffffffff60086003851602811681811c198316918416901c17610708565b8163ffffffff16602b1415611146578492505050610708565b8163ffffffff16602e141561117a5750505063ffffffff60086003851602601803811681811b198316918416901b17610708565b8163ffffffff1660301415611193578392505050610708565b8163ffffffff16603814156111ac578492505050610708565b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e00000000000000000000000000604482015290519081900360640190fd5b600061121d611a67565b506080602063ffffffff86161061129557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c6964207265676973746572000000000000000000000000000000000000604482015290519081900360640190fd5b63ffffffff8516158015906112a75750825b156112d557838161016001518663ffffffff16602081106112c457fe5b63ffffffff90921660209290920201525b60808101805163ffffffff808216606085015260049091011690526109bb610710565b6000611302611a67565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa141561137a5781610fff81161561134c57610fff811661100003015b63ffffffff84166113705760e08801805163ffffffff838201169091529550611374565b8395505b50611728565b8563ffffffff16610fcd14156113965763400000009450611728565b8563ffffffff1661101814156113af5760019450611728565b8563ffffffff1661109614156113e757600161012088015260ff83166101008801526113d9610710565b97505050505050505061081b565b8563ffffffff16610fa314156115a65763ffffffff8316611407576115a1565b63ffffffff83166005141561157e5760006114298363fffffffc16600161081e565b6000805460208b01516040808d015181517fe03110e1000000000000000000000000000000000000000000000000000000008152600481019390935263ffffffff16602483015280519495509293849373ffffffffffffffffffffffffffffffffffffffff9093169263e03110e19260448082019391829003018186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d60408110156114dd57600080fd5b508051602090910151909250905060038516600481900382811015611500578092505b508185101561150d578491505b8260088302610100031c9250826008828460040301021b9250600180600883600403021b036001806008858560040303021b039150811981169050838119861617945050506115648563fffffffc16600185611959565b60408a018051820163ffffffff16905296506115a1915050565b63ffffffff831660031415611595578094506115a1565b63ffffffff9450600993505b611728565b8563ffffffff16610fa4141561167a5763ffffffff8316600114806115d1575063ffffffff83166002145b806115e2575063ffffffff83166004145b156115ef578094506115a1565b63ffffffff8316600614156115955760006116118363fffffffc16600161081e565b6020890151909150600384166004038381101561162c578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b176020880152600060408801529350836115a1565b8563ffffffff16610fd71415611728578163ffffffff166003141561171c5763ffffffff831615806116b2575063ffffffff83166005145b806116c3575063ffffffff83166003145b156116d157600094506115a1565b63ffffffff8316600114806116ec575063ffffffff83166002145b806116fd575063ffffffff83166006145b8061170e575063ffffffff83166004145b1561159557600194506115a1565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b01526004019091169052611769610710565b97505050505050505090565b600061177f611a67565b5060806000601063ffffffff8816141561179e575060c08101516118f6565b8663ffffffff16601114156117be5763ffffffff861660c08301526118f6565b8663ffffffff16601214156117d8575060a08101516118f6565b8663ffffffff16601314156117f85763ffffffff861660a08301526118f6565b8663ffffffff166018141561182d5763ffffffff600387810b9087900b02602081901c821660c08501521660a08301526118f6565b8663ffffffff166019141561185f5763ffffffff86811681871602602081901c821660c08501521660a08301526118f6565b8663ffffffff16601a14156118aa578460030b8660030b8161187d57fe5b0763ffffffff1660c0830152600385810b9087900b8161189957fe5b0563ffffffff1660a08301526118f6565b8663ffffffff16601b14156118f6578463ffffffff168663ffffffff16816118ce57fe5b0663ffffffff90811660c0840152858116908716816118e957fe5b0463ffffffff1660a08301525b63ffffffff84161561192b57808261016001518563ffffffff166020811061191a57fe5b63ffffffff90921660209290920201525b60808201805163ffffffff8082166060860152600490910116905261194e610710565b979650505050505050565b6000611964836119f5565b9050600384161561197457600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b8110156119ea5760208401933582821c60011680156119c257600181146119d3576119e0565b6119cc8286610845565b94506119e0565b6119dd8583610845565b94505b505060010161199a565b505060805250505050565b60ff81166103800261016681019036906104e601811015611a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611af26023913960400191505060405180910390fd5b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611acd611ad2565b905290565b604051806104000160405280602090602082028036833750919291505056fe636865636b207468617420746865726520697320656e6f7567682063616c6c64617461a164736f6c6343000706000a",
}
// MIPSABI is the input ABI used to generate the binding from.
......
......@@ -13,9 +13,9 @@ const MIPSStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"cont
var MIPSStorageLayout = new(solc.StorageLayout)
var MIPSDeployedBin = "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006757806398bb138314610098575b600080fd5b61004e61016c565b6040805163ffffffff9092168252519081900360200190f35b61006f610174565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61015a600480360360408110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111640100000000831117156100fd57600080fd5b91939092909160208101903564010000000081111561011b57600080fd5b82018360208201111561012d57600080fd5b8035906020019184600183028401116401000000008311171561014f57600080fd5b509092509050610190565b60408051918252519081900360200190f35b634000000081565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600061019a611a62565b608081146101a757600080fd5b604051610600146101b757600080fd5b606486146101c457600080fd5b61016684146101d257600080fd5b6101ef565b8035602084810360031b9190911c8352920192910190565b8560806101fe602082846101d7565b9150915061020e602082846101d7565b9150915061021e600482846101d7565b9150915061022e600482846101d7565b9150915061023e600482846101d7565b9150915061024e600482846101d7565b9150915061025e600482846101d7565b9150915061026e600482846101d7565b9150915061027e600182846101d7565b9150915061028e600182846101d7565b9150915061029e600882846101d7565b6020810190819052909250905060005b60208110156102d0576102c3600483856101d7565b90935091506001016102ae565b505050806101200151156102ee576102e6610710565b915050610708565b6101408101805160010167ffffffffffffffff1690526060810151600090610316908261081e565b9050603f601a82901c16600281148061033557508063ffffffff166003145b15610382576103788163ffffffff1660021461035257601f610355565b60005b60ff16600261036b856303ffffff16601a6108e6565b63ffffffff16901b610959565b9350505050610708565b6101608301516000908190601f601086901c81169190601587901c16602081106103a857fe5b602002015192508063ffffffff851615806103c957508463ffffffff16601c145b156103fa578661016001518263ffffffff16602081106103e557fe5b6020020151925050601f600b86901c166104b1565b60208563ffffffff16101561045d578463ffffffff16600c148061042457508463ffffffff16600d145b8061043557508463ffffffff16600e145b15610446578561ffff169250610458565b6104558661ffff1660106108e6565b92505b6104b1565b60288563ffffffff1610158061047957508463ffffffff166022145b8061048a57508463ffffffff166026145b156104b1578661016001518263ffffffff16602081106104a657fe5b602002015192508190505b60048563ffffffff16101580156104ce575060088563ffffffff16105b806104df57508463ffffffff166001145b156104fe576104f0858784876109c4565b975050505050505050610708565b63ffffffff60006020878316106105635761051e8861ffff1660106108e6565b9095019463fffffffc861661053481600161081e565b915060288863ffffffff161015801561055457508763ffffffff16603014155b1561056157809250600093505b505b600061057189888885610b4d565b63ffffffff9081169150603f8a16908916158015610596575060088163ffffffff1610155b80156105a85750601c8163ffffffff16105b15610687578063ffffffff16600814806105c857508063ffffffff166009145b156105ff576105ed8163ffffffff166008146105e457856105e7565b60005b89610959565b9b505050505050505050505050610708565b8063ffffffff16600a1415610620576105ed858963ffffffff8a1615611213565b8063ffffffff16600b1415610642576105ed858963ffffffff8a161515611213565b8063ffffffff16600c1415610659576105ed6112f8565b60108163ffffffff16101580156106765750601c8163ffffffff16105b15610687576105ed81898988611770565b8863ffffffff1660381480156106a2575063ffffffff861615155b156106d15760018b61016001518763ffffffff16602081106106c057fe5b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146106ee576106ee84600184611954565b6106fa85836001611213565b9b5050505050505050505050505b949350505050565b6000610728565b602083810382015183520192910190565b60806040518061073a60208285610717565b9150925061074a60208285610717565b9150925061075a60048285610717565b9150925061076a60048285610717565b9150925061077a60048285610717565b9150925061078a60048285610717565b9150925061079a60048285610717565b915092506107aa60048285610717565b915092506107ba60018285610717565b915092506107ca60018285610717565b915092506107da60088285610717565b60209091019350905060005b6020811015610808576107fb60048386610717565b90945091506001016107e6565b506000815281810382a081900390209150505b90565b60008061082a836119f0565b9050600384161561083a57600080fd5b602081019035610857565b60009081526020919091526040902090565b8460051c8160005b601b8110156108af5760208501943583821c60011680156108875760018114610898576108a5565b6108918285610845565b93506108a5565b6108a28483610845565b93505b505060010161085f565b5060805191508181146108ca57630badf00d60005260206000fd5b5050601f8516601c0360031b1c63ffffffff1691505092915050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b0182610943576000610945565b815b90861663ffffffff16179250505092915050565b6000610963611a62565b5060e08051610100805163ffffffff90811690935284831690526080918516156109b357806008018261016001518663ffffffff16602081106109a257fe5b63ffffffff90921660209290920201525b6109bb610710565b95945050505050565b60006109ce611a62565b5060806000600463ffffffff881614806109ee57508663ffffffff166005145b15610a645760008261016001518663ffffffff1660208110610a0c57fe5b602002015190508063ffffffff168563ffffffff16148015610a3457508763ffffffff166004145b80610a5c57508063ffffffff168563ffffffff1614158015610a5c57508763ffffffff166005145b915050610ae1565b8663ffffffff1660061415610a825760008460030b13159050610ae1565b8663ffffffff1660071415610a9f5760008460030b139050610ae1565b8663ffffffff1660011415610ae157601f601087901c1680610ac55760008560030b1291505b8063ffffffff1660011415610adf5760008560030b121591505b505b606082018051608084015163ffffffff169091528115610b27576002610b0c8861ffff1660106108e6565b63ffffffff90811690911b8201600401166080840152610b39565b60808301805160040163ffffffff1690525b610b41610710565b98975050505050505050565b6000603f601a86901c81169086166020821015610f215760088263ffffffff1610158015610b815750600f8263ffffffff16105b15610c28578163ffffffff1660081415610b9d57506020610c23565b8163ffffffff1660091415610bb457506021610c23565b8163ffffffff16600a1415610bcb5750602a610c23565b8163ffffffff16600b1415610be25750602b610c23565b8163ffffffff16600c1415610bf957506024610c23565b8163ffffffff16600d1415610c1057506025610c23565b8163ffffffff16600e1415610c23575060265b600091505b63ffffffff8216610e7157601f600688901c16602063ffffffff83161015610d455760088263ffffffff1610610c6357869350505050610708565b63ffffffff8216610c835763ffffffff86811691161b9250610708915050565b8163ffffffff1660021415610ca75763ffffffff86811691161c9250610708915050565b8163ffffffff1660031415610cd2576103788163ffffffff168763ffffffff16901c826020036108e6565b8163ffffffff1660041415610cf6575050505063ffffffff8216601f84161b610708565b8163ffffffff1660061415610d1a575050505063ffffffff8216601f84161c610708565b8163ffffffff1660071415610d45576103788763ffffffff168763ffffffff16901c886020036108e6565b8163ffffffff1660201480610d6057508163ffffffff166021145b15610d72578587019350505050610708565b8163ffffffff1660221480610d8d57508163ffffffff166023145b15610d9f578587039350505050610708565b8163ffffffff1660241415610dbb578587169350505050610708565b8163ffffffff1660251415610dd7578587179350505050610708565b8163ffffffff1660261415610df3578587189350505050610708565b8163ffffffff1660271415610e0f575050505082821719610708565b8163ffffffff16602a1415610e42578560030b8760030b12610e32576000610e35565b60015b60ff169350505050610708565b8163ffffffff16602b1415610e6b578563ffffffff168763ffffffff1610610e32576000610e35565b50610f1c565b8163ffffffff16600f1415610e945760108563ffffffff16901b92505050610708565b8163ffffffff16601c1415610f1c578063ffffffff1660021415610ebd57505050828202610708565b8063ffffffff1660201480610ed857508063ffffffff166021145b15610f1c578063ffffffff1660201415610ef0579419945b60005b6380000000871615610f12576401fffffffe600197881b169601610ef3565b9250610708915050565b6111ac565b60288263ffffffff16101561108b578163ffffffff1660201415610f6e57610f658660031660080260180363ffffffff168563ffffffff16901c60ff1660086108e6565b92505050610708565b8163ffffffff1660211415610fa457610f658660021660080260100363ffffffff168563ffffffff16901c61ffff1660106108e6565b8163ffffffff1660221415610fd55750505063ffffffff60086003851602811681811b198416918316901b17610708565b8163ffffffff1660231415610fee578392505050610708565b8163ffffffff1660241415611022578560031660080260180363ffffffff168463ffffffff16901c60ff1692505050610708565b8163ffffffff1660251415611057578560021660080260100363ffffffff168463ffffffff16901c61ffff1692505050610708565b8163ffffffff1660261415610f1c5750505063ffffffff60086003851602601803811681811c198416918316901c17610708565b8163ffffffff16602814156110c35750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610708565b8163ffffffff16602914156110fc5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610708565b8163ffffffff16602a141561112d5750505063ffffffff60086003851602811681811c198316918416901c17610708565b8163ffffffff16602b1415611146578492505050610708565b8163ffffffff16602e141561117a5750505063ffffffff60086003851602601803811681811b198316918416901b17610708565b8163ffffffff1660301415611193578392505050610708565b8163ffffffff16603814156111ac578492505050610708565b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e00000000000000000000000000604482015290519081900360640190fd5b600061121d611a62565b506080602063ffffffff86161061129557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c6964207265676973746572000000000000000000000000000000000000604482015290519081900360640190fd5b63ffffffff8516158015906112a75750825b156112d557838161016001518663ffffffff16602081106112c457fe5b63ffffffff90921660209290920201525b60808101805163ffffffff808216606085015260049091011690526109bb610710565b6000611302611a62565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa141561137a5781610fff81161561134c57610fff811661100003015b63ffffffff84166113705760e08801805163ffffffff838201169091529550611374565b8395505b50611723565b8563ffffffff16610fcd14156113965763400000009450611723565b8563ffffffff1661101814156113af5760019450611723565b8563ffffffff1661109614156113e757600161012088015260ff83166101008801526113d9610710565b97505050505050505061081b565b8563ffffffff16610fa314156115a15763ffffffff83166114075761159c565b63ffffffff8316600514156115795760006114298363fffffffc16600161081e565b6000805460208b01516040808d015181517fe03110e1000000000000000000000000000000000000000000000000000000008152600481019390935263ffffffff16602483015280519495509293849373ffffffffffffffffffffffffffffffffffffffff9093169263e03110e19260448082019391829003018186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d60408110156114dd57600080fd5b508051602090910151909250905060038516600481900382811015611500578092505b508185101561150d578491505b8260088302610100031c925082600882021b9250600180600883600403021b036001806008858560040301021b0391508119811690508381198616179450505061155f8563fffffffc16600185611954565b60408a018051820163ffffffff169052965061159c915050565b63ffffffff8316600314156115905780945061159c565b63ffffffff9450600993505b611723565b8563ffffffff16610fa414156116755763ffffffff8316600114806115cc575063ffffffff83166002145b806115dd575063ffffffff83166004145b156115ea5780945061159c565b63ffffffff83166006141561159057600061160c8363fffffffc16600161081e565b60208901519091506003841660040383811015611627578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b1760208801526000604088015293508361159c565b8563ffffffff16610fd71415611723578163ffffffff16600314156117175763ffffffff831615806116ad575063ffffffff83166005145b806116be575063ffffffff83166003145b156116cc576000945061159c565b63ffffffff8316600114806116e7575063ffffffff83166002145b806116f8575063ffffffff83166006145b80611709575063ffffffff83166004145b15611590576001945061159c565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b01526004019091169052611764610710565b97505050505050505090565b600061177a611a62565b5060806000601063ffffffff88161415611799575060c08101516118f1565b8663ffffffff16601114156117b95763ffffffff861660c08301526118f1565b8663ffffffff16601214156117d3575060a08101516118f1565b8663ffffffff16601314156117f35763ffffffff861660a08301526118f1565b8663ffffffff16601814156118285763ffffffff600387810b9087900b02602081901c821660c08501521660a08301526118f1565b8663ffffffff166019141561185a5763ffffffff86811681871602602081901c821660c08501521660a08301526118f1565b8663ffffffff16601a14156118a5578460030b8660030b8161187857fe5b0763ffffffff1660c0830152600385810b9087900b8161189457fe5b0563ffffffff1660a08301526118f1565b8663ffffffff16601b14156118f1578463ffffffff168663ffffffff16816118c957fe5b0663ffffffff90811660c0840152858116908716816118e457fe5b0463ffffffff1660a08301525b63ffffffff84161561192657808261016001518563ffffffff166020811061191557fe5b63ffffffff90921660209290920201525b60808201805163ffffffff80821660608601526004909101169052611949610710565b979650505050505050565b600061195f836119f0565b9050600384161561196f57600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b8110156119e55760208401933582821c60011680156119bd57600181146119ce576119db565b6119c78286610845565b94506119db565b6119d88583610845565b94505b5050600101611995565b505060805250505050565b60ff81166103800261016681019036906104e601811015611a5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611aed6023913960400191505060405180910390fd5b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611ac8611acd565b905290565b604051806104000160405280602090602082028036833750919291505056fe636865636b207468617420746865726520697320656e6f7567682063616c6c64617461a164736f6c6343000706000a"
var MIPSDeployedBin = "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006757806398bb138314610098575b600080fd5b61004e61016c565b6040805163ffffffff9092168252519081900360200190f35b61006f610174565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61015a600480360360408110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111640100000000831117156100fd57600080fd5b91939092909160208101903564010000000081111561011b57600080fd5b82018360208201111561012d57600080fd5b8035906020019184600183028401116401000000008311171561014f57600080fd5b509092509050610190565b60408051918252519081900360200190f35b634000000081565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600061019a611a67565b608081146101a757600080fd5b604051610600146101b757600080fd5b606486146101c457600080fd5b61016684146101d257600080fd5b6101ef565b8035602084810360031b9190911c8352920192910190565b8560806101fe602082846101d7565b9150915061020e602082846101d7565b9150915061021e600482846101d7565b9150915061022e600482846101d7565b9150915061023e600482846101d7565b9150915061024e600482846101d7565b9150915061025e600482846101d7565b9150915061026e600482846101d7565b9150915061027e600182846101d7565b9150915061028e600182846101d7565b9150915061029e600882846101d7565b6020810190819052909250905060005b60208110156102d0576102c3600483856101d7565b90935091506001016102ae565b505050806101200151156102ee576102e6610710565b915050610708565b6101408101805160010167ffffffffffffffff1690526060810151600090610316908261081e565b9050603f601a82901c16600281148061033557508063ffffffff166003145b15610382576103788163ffffffff1660021461035257601f610355565b60005b60ff16600261036b856303ffffff16601a6108e6565b63ffffffff16901b610959565b9350505050610708565b6101608301516000908190601f601086901c81169190601587901c16602081106103a857fe5b602002015192508063ffffffff851615806103c957508463ffffffff16601c145b156103fa578661016001518263ffffffff16602081106103e557fe5b6020020151925050601f600b86901c166104b1565b60208563ffffffff16101561045d578463ffffffff16600c148061042457508463ffffffff16600d145b8061043557508463ffffffff16600e145b15610446578561ffff169250610458565b6104558661ffff1660106108e6565b92505b6104b1565b60288563ffffffff1610158061047957508463ffffffff166022145b8061048a57508463ffffffff166026145b156104b1578661016001518263ffffffff16602081106104a657fe5b602002015192508190505b60048563ffffffff16101580156104ce575060088563ffffffff16105b806104df57508463ffffffff166001145b156104fe576104f0858784876109c4565b975050505050505050610708565b63ffffffff60006020878316106105635761051e8861ffff1660106108e6565b9095019463fffffffc861661053481600161081e565b915060288863ffffffff161015801561055457508763ffffffff16603014155b1561056157809250600093505b505b600061057189888885610b4d565b63ffffffff9081169150603f8a16908916158015610596575060088163ffffffff1610155b80156105a85750601c8163ffffffff16105b15610687578063ffffffff16600814806105c857508063ffffffff166009145b156105ff576105ed8163ffffffff166008146105e457856105e7565b60005b89610959565b9b505050505050505050505050610708565b8063ffffffff16600a1415610620576105ed858963ffffffff8a1615611213565b8063ffffffff16600b1415610642576105ed858963ffffffff8a161515611213565b8063ffffffff16600c1415610659576105ed6112f8565b60108163ffffffff16101580156106765750601c8163ffffffff16105b15610687576105ed81898988611775565b8863ffffffff1660381480156106a2575063ffffffff861615155b156106d15760018b61016001518763ffffffff16602081106106c057fe5b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146106ee576106ee84600184611959565b6106fa85836001611213565b9b5050505050505050505050505b949350505050565b6000610728565b602083810382015183520192910190565b60806040518061073a60208285610717565b9150925061074a60208285610717565b9150925061075a60048285610717565b9150925061076a60048285610717565b9150925061077a60048285610717565b9150925061078a60048285610717565b9150925061079a60048285610717565b915092506107aa60048285610717565b915092506107ba60018285610717565b915092506107ca60018285610717565b915092506107da60088285610717565b60209091019350905060005b6020811015610808576107fb60048386610717565b90945091506001016107e6565b506000815281810382a081900390209150505b90565b60008061082a836119f5565b9050600384161561083a57600080fd5b602081019035610857565b60009081526020919091526040902090565b8460051c8160005b601b8110156108af5760208501943583821c60011680156108875760018114610898576108a5565b6108918285610845565b93506108a5565b6108a28483610845565b93505b505060010161085f565b5060805191508181146108ca57630badf00d60005260206000fd5b5050601f8516601c0360031b1c63ffffffff1691505092915050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b0182610943576000610945565b815b90861663ffffffff16179250505092915050565b6000610963611a67565b5060e08051610100805163ffffffff90811690935284831690526080918516156109b357806008018261016001518663ffffffff16602081106109a257fe5b63ffffffff90921660209290920201525b6109bb610710565b95945050505050565b60006109ce611a67565b5060806000600463ffffffff881614806109ee57508663ffffffff166005145b15610a645760008261016001518663ffffffff1660208110610a0c57fe5b602002015190508063ffffffff168563ffffffff16148015610a3457508763ffffffff166004145b80610a5c57508063ffffffff168563ffffffff1614158015610a5c57508763ffffffff166005145b915050610ae1565b8663ffffffff1660061415610a825760008460030b13159050610ae1565b8663ffffffff1660071415610a9f5760008460030b139050610ae1565b8663ffffffff1660011415610ae157601f601087901c1680610ac55760008560030b1291505b8063ffffffff1660011415610adf5760008560030b121591505b505b606082018051608084015163ffffffff169091528115610b27576002610b0c8861ffff1660106108e6565b63ffffffff90811690911b8201600401166080840152610b39565b60808301805160040163ffffffff1690525b610b41610710565b98975050505050505050565b6000603f601a86901c81169086166020821015610f215760088263ffffffff1610158015610b815750600f8263ffffffff16105b15610c28578163ffffffff1660081415610b9d57506020610c23565b8163ffffffff1660091415610bb457506021610c23565b8163ffffffff16600a1415610bcb5750602a610c23565b8163ffffffff16600b1415610be25750602b610c23565b8163ffffffff16600c1415610bf957506024610c23565b8163ffffffff16600d1415610c1057506025610c23565b8163ffffffff16600e1415610c23575060265b600091505b63ffffffff8216610e7157601f600688901c16602063ffffffff83161015610d455760088263ffffffff1610610c6357869350505050610708565b63ffffffff8216610c835763ffffffff86811691161b9250610708915050565b8163ffffffff1660021415610ca75763ffffffff86811691161c9250610708915050565b8163ffffffff1660031415610cd2576103788163ffffffff168763ffffffff16901c826020036108e6565b8163ffffffff1660041415610cf6575050505063ffffffff8216601f84161b610708565b8163ffffffff1660061415610d1a575050505063ffffffff8216601f84161c610708565b8163ffffffff1660071415610d45576103788763ffffffff168763ffffffff16901c886020036108e6565b8163ffffffff1660201480610d6057508163ffffffff166021145b15610d72578587019350505050610708565b8163ffffffff1660221480610d8d57508163ffffffff166023145b15610d9f578587039350505050610708565b8163ffffffff1660241415610dbb578587169350505050610708565b8163ffffffff1660251415610dd7578587179350505050610708565b8163ffffffff1660261415610df3578587189350505050610708565b8163ffffffff1660271415610e0f575050505082821719610708565b8163ffffffff16602a1415610e42578560030b8760030b12610e32576000610e35565b60015b60ff169350505050610708565b8163ffffffff16602b1415610e6b578563ffffffff168763ffffffff1610610e32576000610e35565b50610f1c565b8163ffffffff16600f1415610e945760108563ffffffff16901b92505050610708565b8163ffffffff16601c1415610f1c578063ffffffff1660021415610ebd57505050828202610708565b8063ffffffff1660201480610ed857508063ffffffff166021145b15610f1c578063ffffffff1660201415610ef0579419945b60005b6380000000871615610f12576401fffffffe600197881b169601610ef3565b9250610708915050565b6111ac565b60288263ffffffff16101561108b578163ffffffff1660201415610f6e57610f658660031660080260180363ffffffff168563ffffffff16901c60ff1660086108e6565b92505050610708565b8163ffffffff1660211415610fa457610f658660021660080260100363ffffffff168563ffffffff16901c61ffff1660106108e6565b8163ffffffff1660221415610fd55750505063ffffffff60086003851602811681811b198416918316901b17610708565b8163ffffffff1660231415610fee578392505050610708565b8163ffffffff1660241415611022578560031660080260180363ffffffff168463ffffffff16901c60ff1692505050610708565b8163ffffffff1660251415611057578560021660080260100363ffffffff168463ffffffff16901c61ffff1692505050610708565b8163ffffffff1660261415610f1c5750505063ffffffff60086003851602601803811681811c198416918316901c17610708565b8163ffffffff16602814156110c35750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610708565b8163ffffffff16602914156110fc5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610708565b8163ffffffff16602a141561112d5750505063ffffffff60086003851602811681811c198316918416901c17610708565b8163ffffffff16602b1415611146578492505050610708565b8163ffffffff16602e141561117a5750505063ffffffff60086003851602601803811681811b198316918416901b17610708565b8163ffffffff1660301415611193578392505050610708565b8163ffffffff16603814156111ac578492505050610708565b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e00000000000000000000000000604482015290519081900360640190fd5b600061121d611a67565b506080602063ffffffff86161061129557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c6964207265676973746572000000000000000000000000000000000000604482015290519081900360640190fd5b63ffffffff8516158015906112a75750825b156112d557838161016001518663ffffffff16602081106112c457fe5b63ffffffff90921660209290920201525b60808101805163ffffffff808216606085015260049091011690526109bb610710565b6000611302611a67565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa141561137a5781610fff81161561134c57610fff811661100003015b63ffffffff84166113705760e08801805163ffffffff838201169091529550611374565b8395505b50611728565b8563ffffffff16610fcd14156113965763400000009450611728565b8563ffffffff1661101814156113af5760019450611728565b8563ffffffff1661109614156113e757600161012088015260ff83166101008801526113d9610710565b97505050505050505061081b565b8563ffffffff16610fa314156115a65763ffffffff8316611407576115a1565b63ffffffff83166005141561157e5760006114298363fffffffc16600161081e565b6000805460208b01516040808d015181517fe03110e1000000000000000000000000000000000000000000000000000000008152600481019390935263ffffffff16602483015280519495509293849373ffffffffffffffffffffffffffffffffffffffff9093169263e03110e19260448082019391829003018186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d60408110156114dd57600080fd5b508051602090910151909250905060038516600481900382811015611500578092505b508185101561150d578491505b8260088302610100031c9250826008828460040301021b9250600180600883600403021b036001806008858560040303021b039150811981169050838119861617945050506115648563fffffffc16600185611959565b60408a018051820163ffffffff16905296506115a1915050565b63ffffffff831660031415611595578094506115a1565b63ffffffff9450600993505b611728565b8563ffffffff16610fa4141561167a5763ffffffff8316600114806115d1575063ffffffff83166002145b806115e2575063ffffffff83166004145b156115ef578094506115a1565b63ffffffff8316600614156115955760006116118363fffffffc16600161081e565b6020890151909150600384166004038381101561162c578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b176020880152600060408801529350836115a1565b8563ffffffff16610fd71415611728578163ffffffff166003141561171c5763ffffffff831615806116b2575063ffffffff83166005145b806116c3575063ffffffff83166003145b156116d157600094506115a1565b63ffffffff8316600114806116ec575063ffffffff83166002145b806116fd575063ffffffff83166006145b8061170e575063ffffffff83166004145b1561159557600194506115a1565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b01526004019091169052611769610710565b97505050505050505090565b600061177f611a67565b5060806000601063ffffffff8816141561179e575060c08101516118f6565b8663ffffffff16601114156117be5763ffffffff861660c08301526118f6565b8663ffffffff16601214156117d8575060a08101516118f6565b8663ffffffff16601314156117f85763ffffffff861660a08301526118f6565b8663ffffffff166018141561182d5763ffffffff600387810b9087900b02602081901c821660c08501521660a08301526118f6565b8663ffffffff166019141561185f5763ffffffff86811681871602602081901c821660c08501521660a08301526118f6565b8663ffffffff16601a14156118aa578460030b8660030b8161187d57fe5b0763ffffffff1660c0830152600385810b9087900b8161189957fe5b0563ffffffff1660a08301526118f6565b8663ffffffff16601b14156118f6578463ffffffff168663ffffffff16816118ce57fe5b0663ffffffff90811660c0840152858116908716816118e957fe5b0463ffffffff1660a08301525b63ffffffff84161561192b57808261016001518563ffffffff166020811061191a57fe5b63ffffffff90921660209290920201525b60808201805163ffffffff8082166060860152600490910116905261194e610710565b979650505050505050565b6000611964836119f5565b9050600384161561197457600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b8110156119ea5760208401933582821c60011680156119c257600181146119d3576119e0565b6119cc8286610845565b94506119e0565b6119dd8583610845565b94505b505060010161199a565b505060805250505050565b60ff81166103800261016681019036906104e601811015611a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611af26023913960400191505060405180910390fd5b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611acd611ad2565b905290565b604051806104000160405280602090602082028036833750919291505056fe636865636b207468617420746865726520697320656e6f7567682063616c6c64617461a164736f6c6343000706000a"
var MIPSDeployedSourceMap = "1025:22394:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1423:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1791:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;14355:4789;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14355:4789:0;;-1:-1:-1;14355:4789:0;-1:-1:-1;14355:4789:0;:::i;:::-;;;;;;;;;;;;;;;;1423:45;1458:10;1423:45;:::o;1791:29::-;;;;;;:::o;14355:4789::-;14433:7;14448:18;;:::i;:::-;14548:4;14541:5;14538:15;14528:2;;14609:1;14607;14600:11;14528:2;14645:4;14639:11;14652;14636:28;14626:2;;14710:1;14708;14701:11;14626:2;14758:3;14740:16;14737:25;14727:2;;14824:1;14822;14815:11;14727:2;14868:3;14854:12;14851:21;14841:2;;14933:1;14931;14924:11;14841:2;14950:370;;;15168:24;;15156:2;15152:13;;;15149:1;15145:21;15141:52;;;;15202:20;;15248:21;;;15294:18;;;15028:292::o;:::-;15336:16;15387:4;15420:18;15435:2;15432:1;15429;15420:18;:::i;:::-;15412:26;;;;15464:18;15479:2;15476:1;15473;15464:18;:::i;:::-;15456:26;;;;15512:17;15527:1;15524;15521;15512:17;:::i;:::-;15504:25;;;;15562:17;15577:1;15574;15571;15562:17;:::i;:::-;15554:25;;;;15600:17;15615:1;15612;15609;15600:17;:::i;:::-;15592:25;;;;15642:17;15657:1;15654;15651;15642:17;:::i;:::-;15634:25;;;;15680:17;15695:1;15692;15689;15680:17;:::i;:::-;15672:25;;;;15718:17;15733:1;15730;15727;15718:17;:::i;:::-;15710:25;;;;15758:17;15773:1;15770;15767;15758:17;:::i;:::-;15750:25;;;;15802:17;15817:1;15814;15811;15802:17;:::i;:::-;15794:25;;;;15844:17;15859:1;15856;15853;15844:17;:::i;:::-;15893:2;15886:10;;15876:21;;;;15836:25;;-1:-1:-1;15886:10:0;-1:-1:-1;15964:1:0;15949:77;15974:2;15971:1;15968:9;15949:77;;;16007:17;16022:1;16019;16016;16007:17;:::i;:::-;15999:25;;-1:-1:-1;15999:25:0;-1:-1:-1;15992:1:0;15985:9;15949:77;;;15953:14;;;16053:5;:12;;;16050:86;;;16116:13;:11;:13::i;:::-;16109:20;;;;;16050:86;16141:10;;;:15;;16155:1;16141:15;;;;;16210:8;;;;-1:-1:-1;;16202:20:0;;-1:-1:-1;16202:7:0;:20::i;:::-;16188:34;-1:-1:-1;16245:10:0;16253:2;16245:10;;;;16306:1;16296:11;;;:26;;;16311:6;:11;;16321:1;16311:11;16296:26;16292:308;;;16531:62;16542:6;:11;;16552:1;16542:11;:20;;16560:2;16542:20;;;16556:1;16542:20;16531:62;;16591:1;16564:23;16567:4;16572:10;16567:15;16584:2;16564;:23::i;:::-;:28;;;;16531:10;:62::i;:::-;16524:69;;;;;;;16292:308;16801:15;;;;16628:9;;;;16749:4;16743:2;16735:10;;;16734:19;;;16801:15;16826:2;16818:10;;;16817:19;16801:36;;;;;;;;;;;;-1:-1:-1;16858:5:0;16873:11;;;;;:29;;;16888:6;:14;;16898:4;16888:14;16873:29;16869:636;;;16945:5;:15;;;16961:5;16945:22;;;;;;;;;;;;;;-1:-1:-1;;16998:4:0;16992:2;16984:10;;;16983:19;16869:636;;;17028:4;17019:6;:13;;;17015:490;;;17119:6;:13;;17129:3;17119:13;:30;;;;17136:6;:13;;17146:3;17136:13;17119:30;:47;;;;17153:6;:13;;17163:3;17153:13;17119:47;17115:181;;;17205:4;17210:6;17205:11;17200:16;;17115:181;;;17268:19;17271:4;17276:6;17271:11;17284:2;17268;:19::i;:::-;17263:24;;17115:181;17015:490;;;17322:4;17312:6;:14;;;;:32;;;;17330:6;:14;;17340:4;17330:14;17312:32;:50;;;;17348:6;:14;;17358:4;17348:14;17312:50;17308:197;;;17412:5;:15;;;17428:5;17412:22;;;;;;;;;;;;;17407:27;;17493:5;17485:13;;17308:197;17526:1;17516:6;:11;;;;:25;;;;;17540:1;17531:6;:10;;;17516:25;17515:42;;;;17546:6;:11;;17556:1;17546:11;17515:42;17511:107;;;17574:37;17587:6;17595:4;17601:5;17608:2;17574:12;:37::i;:::-;17567:44;;;;;;;;;;;17511:107;17643:13;17624:16;17763:4;17753:14;;;;17749:328;;17812:19;17815:4;17820:6;17815:11;17828:2;17812;:19::i;:::-;17806:25;;;;17858:10;17853:15;;17882:16;17853:15;17896:1;17882:7;:16::i;:::-;17876:22;;17920:4;17910:6;:14;;;;:32;;;;;17928:6;:14;;17938:4;17928:14;;17910:32;17906:165;;;17983:4;17971:16;;18061:1;18053:9;;17906:165;17749:328;;18094:10;18107:26;18115:4;18121:2;18125;18129:3;18107:7;:26::i;:::-;18136:10;18107:39;;;;-1:-1:-1;18224:4:0;18217:11;;;18248;;;:24;;;;;18271:1;18263:4;:9;;;;18248:24;:39;;;;;18283:4;18276;:11;;;18248:39;18244:589;;;18301:4;:9;;18309:1;18301:9;:22;;;;18314:4;:9;;18322:1;18314:9;18301:22;18297:102;;;18353:37;18364:4;:9;;18372:1;18364:9;:21;;18380:5;18364:21;;;18376:1;18364:21;18387:2;18353:10;:37::i;:::-;18346:44;;;;;;;;;;;;;;;18297:102;18411:4;:11;;18419:3;18411:11;18407:79;;;18449:28;18458:5;18465:2;18469:7;;;;18449:8;:28::i;18407:79::-;18497:4;:11;;18505:3;18497:11;18493:79;;;18535:28;18544:5;18551:2;18555:7;;;;;18535:8;:28::i;18493:79::-;18622:4;:11;;18630:3;18622:11;18618:58;;;18652:15;:13;:15::i;18618:58::-;18749:4;18741;:12;;;;:27;;;;;18764:4;18757;:11;;;18741:27;18737:90;;;18787:31;18798:4;18804:2;18808;18812:5;18787:10;:31::i;18737:90::-;18877:6;:14;;18887:4;18877:14;:28;;;;-1:-1:-1;18895:10:0;;;;;18877:28;18873:75;;;18940:1;18915:5;:15;;;18931:5;18915:22;;;;;;;;;:26;;;;:22;;;;;;:26;18873:75;18978:9;:26;;18991:13;18978:26;18974:74;;19014:27;19023:9;19034:1;19037:3;19014:8;:27::i;:::-;19113:26;19122:5;19129:3;19134:4;19113:8;:26::i;:::-;19106:33;;;;;;;;;;;;;14355:4789;;;;;;;:::o;2085:1331::-;2126:11;2254:176;;;2346:2;2342:13;;;2332:24;;2326:31;2315:43;;2378:13;;2409;;;2305:125::o;:::-;2449:4;2488;2482:11;2526:5;2550:21;2568:2;2564;2558:4;2550:21;:::i;:::-;2538:33;;;;2601:21;2619:2;2615;2609:4;2601:21;:::i;:::-;2589:33;;;;2656:20;2674:1;2670:2;2664:4;2656:20;:::i;:::-;2644:32;;;;2713:20;2731:1;2727:2;2721:4;2713:20;:::i;:::-;2701:32;;;;2758:20;2776:1;2772:2;2766:4;2758:20;:::i;:::-;2746:32;;;;2807:20;2825:1;2821:2;2815:4;2807:20;:::i;:::-;2795:32;;;;2852:20;2870:1;2866:2;2860:4;2852:20;:::i;:::-;2840:32;;;;2897:20;2915:1;2911:2;2905:4;2897:20;:::i;:::-;2885:32;;;;2944:20;2962:1;2958:2;2952:4;2944:20;:::i;:::-;2932:32;;;;2995:20;3013:1;3009:2;3003:4;2995:20;:::i;:::-;2983:32;;;;3044:20;3062:1;3058:2;3052:4;3044:20;:::i;:::-;3097:2;3087:13;;;;-1:-1:-1;3032:32:0;-1:-1:-1;3145:1:0;3130:84;3155:2;3152:1;3149:9;3130:84;;;3192:20;3210:1;3206:2;3200:4;3192:20;:::i;:::-;3180:32;;-1:-1:-1;3180:32:0;-1:-1:-1;3173:1:0;3166:9;3130:84;;;3134:14;3245:1;3241:2;3234:13;3290:5;3286:2;3282:14;3275:5;3270:27;3375:14;;;3358:32;;;-1:-1:-1;;2085:1331:0;;:::o;11757:1270::-;11828:10;11846:14;11863:23;11875:10;11863:11;:23::i;:::-;11846:40;;11922:1;11916:4;11912:12;11909:2;;;11937:1;11934;11927:12;11909:2;12039;12027:15;;;11990:20;12049:169;;;;12088:12;;;12174:2;12167:13;;;;12207:2;12194:16;;;12078:140::o;:::-;12244:4;12241:1;12237:12;12268:4;12391:1;12376:273;12401:2;12398:1;12395:9;12376:273;;;12500:2;12488:15;;;12449:20;12523:12;;;12537:1;12519:20;12548:42;;;;12604:1;12599:42;;;;12512:129;;12548:42;12565:23;12580:7;12574:4;12565:23;:::i;:::-;12557:31;;12548:42;;12599;12616:23;12634:4;12625:7;12616:23;:::i;:::-;12608:31;;12512:129;-1:-1:-1;;12419:1:0;12412:9;12376:273;;;12380:14;12677:4;12671:11;12656:26;;12746:7;12740:4;12737:17;12727:2;;12803:10;12800:1;12793:21;12833:2;12830:1;12823:13;12727:2;-1:-1:-1;;12949:2:0;12939:13;;12927:10;12923:30;12920:1;12916:38;12972:16;12990:10;12968:33;;-1:-1:-1;;11757:1270:0;;;;:::o;1825:256::-;1884:6;1915:14;;;;1923:5;;;;1915:14;;;;;;1914:21;;;;;1927:1;1966:2;:6;;;1960:13;;;;;1959:19;;1958:28;;;;;;;2008:8;;2007:14;1914:21;2053;;2073:1;2053:21;;;2064:6;2053:21;2041:8;;;;;:34;;-1:-1:-1;;;1825:256:0;;;;:::o;10429:401::-;10496:7;10511:18;;:::i;:::-;-1:-1:-1;10592:8:0;;;10617:12;;;10606:23;;;;;;;10635:19;;;;;10561:4;;10664:12;;;10660:140;;10713:6;10720:1;10713:8;10686:5;:15;;;10702:7;10686:24;;;;;;;;;:35;;;;:24;;;;;;:35;10660:140;10812:13;:11;:13::i;:::-;10805:20;10429:401;-1:-1:-1;;;;;10429:401:0:o;8271:1063::-;8364:7;8379:18;;:::i;:::-;-1:-1:-1;8429:4:0;8444:17;8490:1;8480:11;;;;;:26;;;8495:6;:11;;8505:1;8495:11;8480:26;8476:514;;;8529:9;8541:5;:15;;;8557:5;8541:22;;;;;;;;;;;;;8529:34;;8593:2;8587:8;;:2;:8;;;:23;;;;;8599:6;:11;;8609:1;8599:11;8587:23;8586:54;;;;8622:2;8616:8;;:2;:8;;;;:23;;;;;8628:6;:11;;8638:1;8628:11;8616:23;8571:69;;8476:514;;;;8657:6;:11;;8667:1;8657:11;8653:337;;;8700:1;8693:2;8687:14;;;;8672:29;;8653:337;;;8726:6;:11;;8736:1;8726:11;8722:268;;;8768:1;8762:2;8756:13;;;8741:28;;8722:268;;;8794:6;:11;;8804:1;8794:11;8790:200;;;8860:4;8854:2;8846:10;;;8845:19;8877:8;8873:42;;8914:1;8908:2;8902:13;;;8887:28;;8873:42;8936:3;:8;;8943:1;8936:8;8932:43;;;8974:1;8967:2;8961:14;;;;8946:29;;8932:43;8790:200;;9012:8;;;;;9037:12;;;;9026:23;;;;;9087:216;;;;9163:1;9142:19;9145:4;9150:6;9145:11;9158:2;9142;:19::i;:::-;:22;;;;;;;9128:37;;9137:1;9128:37;9113:52;:12;;;:52;9087:216;;;9260:12;;;;;9275:1;9260:16;9245:31;;;;9087:216;9316:13;:11;:13::i;:::-;9309:20;8271:1063;-1:-1:-1;;;;;;;;8271:1063:0:o;19148:4269::-;19235:6;19265:10;19273:2;19265:10;;;;;;19308:11;;19404:4;19395:13;;19391:3986;;;19505:1;19495:6;:11;;;;:27;;;;;19519:3;19510:6;:12;;;19495:27;19491:462;;;19538:6;:11;;19548:1;19538:11;19534:383;;;-1:-1:-1;19560:4:0;19534:383;;;19600:6;:11;;19610:1;19600:11;19596:321;;;-1:-1:-1;19622:4:0;19596:321;;;19658:6;:13;;19668:3;19658:13;19654:263;;;-1:-1:-1;19682:4:0;19654:263;;;19715:6;:13;;19725:3;19715:13;19711:206;;;-1:-1:-1;19739:4:0;19711:206;;;19773:6;:13;;19783:3;19773:13;19769:148;;;-1:-1:-1;19797:4:0;19769:148;;;19830:6;:13;;19840:3;19830:13;19826:91;;;-1:-1:-1;19854:4:0;19826:91;;;19886:6;:13;;19896:3;19886:13;19882:35;;;-1:-1:-1;19910:4:0;19882:35;19943:1;19934:10;;19491:462;19994:11;;;19990:1701;;20046:4;20041:1;20033:9;;;20032:18;20071:4;20033:9;20064:11;;;20060:588;;;20101:4;20093;:12;;;20089:549;;20116:2;20109:9;;;;;;;20089:549;20196:12;;;20192:446;;20219:11;;;;;;;;-1:-1:-1;20212:18:0;;-1:-1:-1;;20212:18:0;20192:446;20265:4;:12;;20273:4;20265:12;20261:377;;;20288:11;;;;;;;;-1:-1:-1;20281:18:0;;-1:-1:-1;;20281:18:0;20261:377;20334:4;:12;;20342:4;20334:12;20330:308;;;20357:25;20366:5;20360:11;;:2;:11;;;;20376:5;20373:2;:8;20357:2;:25::i;20330:308::-;20417:4;:12;;20425:4;20417:12;20413:225;;;-1:-1:-1;;;;20440:15:0;;;20450:4;20447:7;;20440:15;20433:22;;20413:225;20494:4;:12;;20502:4;20494:12;20490:148;;;-1:-1:-1;;;;20517:15:0;;;20527:4;20524:7;;20517:15;20510:22;;20490:148;20571:4;:12;;20579:4;20571:12;20567:71;;;20594:19;20603:2;20597:8;;:2;:8;;;;20610:2;20607;:5;20594:2;:19::i;20567:71::-;20736:4;:12;;20744:4;20736:12;:28;;;;20752:4;:12;;20760:4;20752:12;20736:28;20732:602;;;20778:2;20775;:5;20768:12;;;;;;;20732:602;20818:4;:12;;20826:4;20818:12;:28;;;;20834:4;:12;;20842:4;20834:12;20818:28;20814:520;;;20860:2;20857;:5;20850:12;;;;;;;20814:520;20900:4;:12;;20908:4;20900:12;20896:438;;;20926:2;20923;:5;20916:12;;;;;;;20896:438;20967:4;:12;;20975:4;20967:12;20963:371;;;20994:2;20991;:5;20983:14;;;;;;;20963:371;21033:4;:12;;21041:4;21033:12;21029:305;;;21060:2;21057;:5;21049:14;;;;;;;21029:305;21100:4;:12;;21108:4;21100:12;21096:238;;;-1:-1:-1;;;;21125:5:0;;;21123:8;21116:15;;21096:238;21167:4;:12;;21175:4;21167:12;21163:171;;;21216:2;21200:19;;21206:2;21200:19;;;:27;;21226:1;21200:27;;;21222:1;21200:27;21193:34;;;;;;;;;21163:171;21255:4;:12;;21263:4;21255:12;21251:83;;;21291:2;21288:5;;:2;:5;;;:13;;21300:1;21288:13;;21251:83;19990:1701;;;;21352:6;:13;;21362:3;21352:13;21348:343;;;21380:2;21376;:6;;;;21369:13;;;;;;21348:343;21408:6;:14;;21418:4;21408:14;21404:287;;;21451:4;:9;;21459:1;21451:9;21447:49;;;-1:-1:-1;;;21476:19:0;;;21462:34;;21447:49;21517:4;:12;;21525:4;21517:12;:28;;;;21533:4;:12;;21541:4;21533:12;21517:28;21513:170;;;21570:4;:12;;21578:4;21570:12;21566:26;;;21589:3;;;21566:26;21604:8;21618:45;21628:10;21625:13;;:18;21618:45;;21652:8;21647:3;21652:8;;;;;21647:3;21618:45;;;21671:1;-1:-1:-1;21664:8:0;;-1:-1:-1;;21664:8:0;21513:170;19391:3986;;;21716:4;21707:6;:13;;;21703:1674;;;21734:6;:14;;21744:4;21734:14;21730:776;;;21774:36;21790:2;21793:1;21790:4;21796:1;21789:8;21786:2;:11;21778:20;;:3;:20;;;;21802:4;21777:29;21808:1;21774:2;:36::i;:::-;21767:43;;;;;;21730:776;21829:6;:14;;21839:4;21829:14;21825:681;;;21869:39;21885:2;21888:1;21885:4;21891:1;21884:8;21881:2;:11;21873:20;;:3;:20;;;;21897:6;21872:31;21905:2;21869;:39::i;21825:681::-;21927:6;:14;;21937:4;21927:14;21923:583;;;-1:-1:-1;;;21974:17:0;21989:1;21986;21983:4;;21982:8;21974:17;;22015:32;;;22070:5;22065:10;;21974:17;;;;;22064:18;22057:25;;21923:583;22101:6;:14;;22111:4;22101:14;22097:409;;;22126:3;22119:10;;;;;;22097:409;22156:6;:14;;22166:4;22156:14;22152:354;;;22210:2;22213:1;22210:4;22216:1;22209:8;22206:2;:11;22198:20;;:3;:20;;;;22222:4;22197:29;22190:36;;;;;;22152:354;22245:6;:14;;22255:4;22245:14;22241:265;;;22299:2;22302:1;22299:4;22305:1;22298:8;22295:2;:11;22287:20;;:3;:20;;;;22311:6;22286:31;22279:38;;;;;;22241:265;22336:6;:14;;22346:4;22336:14;22332:174;;;-1:-1:-1;;;22383:20:0;22401:1;22398;22395:4;;22394:8;22391:2;:11;22383:20;;22427:35;;;22485:5;22480:10;;22383:20;;;;;22479:18;22472:25;;21703:1674;22522:6;:14;;22532:4;22522:14;22518:859;;;-1:-1:-1;;;22569:4:0;22565:26;22589:1;22586;22583:4;;22582:8;22579:2;:11;22565:26;;22633:21;;;22613:42;;;22671:10;;22566:7;;;22565:26;;22670:18;22663:25;;22518:859;22705:6;:14;;22715:4;22705:14;22701:676;;;-1:-1:-1;;;22752:6:0;22748:28;22774:1;22771;22768:4;;22767:8;22764:2;:11;22748:28;;22818:23;;;22798:44;;;22858:10;;22749:9;;;22748:28;;22857:18;22850:25;;22701:676;22892:6;:14;;22902:4;22892:14;22888:489;;;-1:-1:-1;;;22937:16:0;22951:1;22948;22945:4;;22944:8;22937:16;;22975:32;;;23029:5;23023:11;;22937:16;;;;;23022:19;23015:26;;22888:489;23058:6;:14;;23068:4;23058:14;23054:323;;;23095:2;23088:9;;;;;;23054:323;23114:6;:14;;23124:4;23114:14;23110:267;;;-1:-1:-1;;;23159:19:0;23176:1;23173;23170:4;;23169:8;23166:2;:11;23159:19;;23200:35;;;23257:5;23251:11;;23159:19;;;;;23250;23243:26;;23110:267;23286:6;:14;;23296:4;23286:14;23282:95;;;23311:3;23304:10;;;;;;23282:95;23337:6;:14;;23347:4;23337:14;23333:44;;;23362:2;23355:9;;;;;;23333:44;23383:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10834:455;10917:7;10932:18;;:::i;:::-;-1:-1:-1;10982:4:0;11016:2;11005:13;;;;10997:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11115:13;;;;;;;:28;;;11132:11;11115:28;11111:80;;;11181:3;11153:5;:15;;;11169:8;11153:25;;;;;;;;;:31;;;;:25;;;;;;:31;11111:80;11208:12;;;;;11197:23;;;;:8;;;:23;11256:1;11241:16;;;11226:31;;;11271:13;:11;:13::i;3420:4847::-;3463:7;3478:18;;:::i;:::-;-1:-1:-1;3563:15:0;;:18;;;;3528:4;3638:18;;;;3674;;;;3710;;;;;3528:4;;3543:17;;;;3638:18;3674;3739;;;3753:4;3739:18;3735:4375;;;3793:2;3810:4;3807:7;;:12;3803:98;;3887:4;3884:7;;3876:4;:16;3870:22;3803:98;3912:7;;;3908:105;;3936:10;;;;;3956:16;;;;;;;;3936:10;-1:-1:-1;3908:105:0;;;4002:2;3997:7;;3908:105;3735:4375;;;;4029:10;:18;;4043:4;4029:18;4025:4085;;;1458:10;4070:14;;4025:4085;;;4101:10;:18;;4115:4;4101:18;4097:4013;;;4165:1;4160:6;;4097:4013;;;4183:10;:18;;4197:4;4183:18;4179:3931;;;4246:4;4231:12;;;:19;4258:26;;;:14;;;:26;4299:13;:11;:13::i;:::-;4292:20;;;;;;;;;;;4179:3931;4329:10;:18;;4343:4;4329:18;4325:3785;;;4458:14;;;4454:1768;;;;;4549:22;;;1679:1;4549:22;4545:1677;;;4670:10;4683:27;4691:2;4696:10;4691:15;4708:1;4683:7;:27::i;:::-;4761:11;4792:6;;4812:17;;;;4831:20;;;;;4792:60;;;;;;;;;;;;;;;;;;;;4670:40;;-1:-1:-1;4761:11:0;;;;4792:6;;;;;:19;;:60;;;;;;;;;;;:6;:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4792:60:0;;;;;;;;;-1:-1:-1;4792:60:0;-1:-1:-1;4965:1:0;4957:10;;5045:1;5041:17;;;5106;;;5103:2;;;5136:5;5126:15;;5103:2;;5205:6;5201:2;5198:14;5195:2;;;5225;5215:12;;5195:2;5317:3;5312:1;5304:6;5300:14;5295:3;5291:24;5287:34;5280:41;;5382:3;5378:1;5367:9;5363:17;5359:27;5352:34;;5492:1;5488;5484;5472:9;5469:1;5465:17;5461:25;5457:33;5453:41;5605:1;5601;5597;5588:6;5576:9;5573:1;5569:17;5565:30;5561:38;5557:46;5553:54;5535:72;;5691:10;5687:15;5681:4;5677:26;5669:34;;5793:3;5785:4;5781:9;5776:3;5772:19;5769:28;5762:35;;;;5873:33;5882:2;5887:10;5882:15;5899:1;5902:3;5873:8;:33::i;:::-;5916:20;;;:38;;;;;;;;;-1:-1:-1;4545:1677:0;;-1:-1:-1;;4545:1677:0;;6002:18;;;1602:1;6002:18;5998:224;;;6151:2;6146:7;;5998:224;;;6183:10;6178:15;;1750:3;6203:10;;5998:224;4325:3785;;;6238:10;:18;;6252:4;6238:18;6234:1876;;;6371:15;;;1533:1;6371:15;;:34;;-1:-1:-1;6390:15:0;;;1566:1;6390:15;6371:34;:57;;;-1:-1:-1;6409:19:0;;;1639:1;6409:19;6371:57;6367:1172;;;6445:2;6440:7;;6367:1172;;;6509:23;;;1720:1;6509:23;6505:1034;;;6564:10;6577:27;6585:2;6590:10;6585:15;6602:1;6577:7;:27::i;:::-;6668:17;;;;6564:40;;-1:-1:-1;6798:1:0;6790:10;;6878:1;6874:17;6939:13;;;6936:2;;;6961:5;6955:11;;6936:2;7205:14;;;7039:1;7201:22;;;7197:32;;;;7108:26;7132:1;7031:10;;;7112:18;;;7108:26;7193:43;7027:20;;7287:12;7337:17;;;:23;7393:1;7370:20;;;:24;7035:2;-1:-1:-1;7035:2:0;6505:1034;;6234:1876;7555:10;:18;;7569:4;7555:18;7551:559;;;7629:2;:7;;7635:1;7629:7;7625:479;;;7690:14;;;;;:40;;-1:-1:-1;7708:22:0;;;1679:1;7708:22;7690:40;:62;;;-1:-1:-1;7734:18:0;;;1602:1;7734:18;7690:62;7686:312;;;7771:1;7766:6;;7686:312;;;7805:15;;;1533:1;7805:15;;:34;;-1:-1:-1;7824:15:0;;;1566:1;7824:15;7805:34;:61;;;-1:-1:-1;7843:23:0;;;1720:1;7843:23;7805:61;:84;;;-1:-1:-1;7870:19:0;;;1639:1;7870:19;7805:84;7801:197;;;7908:1;7903:6;;7801:197;;7625:479;8027:10;8022:15;;1782:4;8047:11;;7625:479;8116:15;;;;;:23;;;;:18;;;;:23;;;;8145:15;;:23;;;:18;;;;:23;-1:-1:-1;8186:12:0;;;;8175:23;;;:8;;;:23;8234:1;8219:16;8204:31;;;;;8249:13;:11;:13::i;:::-;8242:20;;;;;;;;;3420:4847;:::o;9338:1087::-;9428:7;9443:18;;:::i;:::-;-1:-1:-1;9493:4:0;9508:10;9536:4;9528:12;;;;9524:732;;;-1:-1:-1;9548:8:0;;;;9524:732;;;9579:4;:12;;9587:4;9579:12;9575:681;;;9593:13;;;:8;;;:13;9575:681;;;9629:4;:12;;9637:4;9629:12;9625:631;;;-1:-1:-1;9649:8:0;;;;9625:631;;;9680:4;:12;;9688:4;9680:12;9676:580;;;9694:13;;;:8;;;:13;9676:580;;;9730:4;:12;;9738:4;9730:12;9726:530;;;9840:7;9797:16;9780;;;9797;;;;9780:33;9845:2;9840:7;;;;;9822:8;;;:26;9856:22;:8;;;:22;9726:530;;;9895:4;:12;;9903:4;9895:12;9891:365;;;9957:10;9946;;;9957;;;9946:21;9999:2;9994:7;;;;;9976:8;;;:26;10010:22;:8;;;:22;9891:365;;;10049:4;:12;;10057:4;10049:12;10045:211;;;10112:2;10096:19;;10102:2;10096:19;;;;;;;;10078:38;;:8;;;:38;10142:19;;;;;;;;;;;;;;10124:38;;:8;;;:38;10045:211;;;10179:4;:12;;10187:4;10179:12;10175:81;;;10223:2;10220:5;;:2;:5;;;;;;;;10209:16;;;;:8;;;:16;10244:5;;;;;;;;;;;;10233:16;;:8;;;:16;10175:81;10266:13;;;;10262:65;;10317:3;10289:5;:15;;;10305:8;10289:25;;;;;;;;;:31;;;;:25;;;;;;:31;10262:65;10344:12;;;;;10333:23;;;;:8;;;:23;10392:1;10377:16;;;10362:31;;;10407:13;:11;:13::i;:::-;10400:20;9338:1087;-1:-1:-1;;;;;;;9338:1087:0:o;13150:1145::-;13233:14;13250:23;13262:10;13250:11;:23::i;:::-;13233:40;;13309:1;13303:4;13299:12;13296:2;;;13324:1;13321;13314:12;13296:2;13432;13595:15;;;13450:2;13440:13;;13428:10;13424:30;13421:1;13417:38;13560:17;;;13377:20;;13545:10;13534:22;;;13530:27;13520:38;13517:61;13812:4;13809:1;13805:12;13959:1;13944:273;13969:2;13966:1;13963:9;13944:273;;;14068:2;14056:15;;;14017:20;14091:12;;;14105:1;14087:20;14116:42;;;;14172:1;14167:42;;;;14080:129;;14116:42;14133:23;14148:7;14142:4;14133:23;:::i;:::-;14125:31;;14116:42;;14167;14184:23;14202:4;14193:7;14184:23;:::i;:::-;14176:31;;14080:129;-1:-1:-1;;13987:1:0;13980:9;13944:273;;;-1:-1:-1;;14231:4:0;14224:18;-1:-1:-1;;;;13288:1003:0:o;11293:460::-;11568:19;;;11591:5;11568:29;11561:3;:37;;;11639:14;;11674;;11668:21;;;11660:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11735:13;11293:460;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o"
var MIPSDeployedSourceMap = "1025:22415:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1423:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1791:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;14376:4789;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14376:4789:0;;-1:-1:-1;14376:4789:0;-1:-1:-1;14376:4789:0;:::i;:::-;;;;;;;;;;;;;;;;1423:45;1458:10;1423:45;:::o;1791:29::-;;;;;;:::o;14376:4789::-;14454:7;14469:18;;:::i;:::-;14569:4;14562:5;14559:15;14549:2;;14630:1;14628;14621:11;14549:2;14666:4;14660:11;14673;14657:28;14647:2;;14731:1;14729;14722:11;14647:2;14779:3;14761:16;14758:25;14748:2;;14845:1;14843;14836:11;14748:2;14889:3;14875:12;14872:21;14862:2;;14954:1;14952;14945:11;14862:2;14971:370;;;15189:24;;15177:2;15173:13;;;15170:1;15166:21;15162:52;;;;15223:20;;15269:21;;;15315:18;;;15049:292::o;:::-;15357:16;15408:4;15441:18;15456:2;15453:1;15450;15441:18;:::i;:::-;15433:26;;;;15485:18;15500:2;15497:1;15494;15485:18;:::i;:::-;15477:26;;;;15533:17;15548:1;15545;15542;15533:17;:::i;:::-;15525:25;;;;15583:17;15598:1;15595;15592;15583:17;:::i;:::-;15575:25;;;;15621:17;15636:1;15633;15630;15621:17;:::i;:::-;15613:25;;;;15663:17;15678:1;15675;15672;15663:17;:::i;:::-;15655:25;;;;15701:17;15716:1;15713;15710;15701:17;:::i;:::-;15693:25;;;;15739:17;15754:1;15751;15748;15739:17;:::i;:::-;15731:25;;;;15779:17;15794:1;15791;15788;15779:17;:::i;:::-;15771:25;;;;15823:17;15838:1;15835;15832;15823:17;:::i;:::-;15815:25;;;;15865:17;15880:1;15877;15874;15865:17;:::i;:::-;15914:2;15907:10;;15897:21;;;;15857:25;;-1:-1:-1;15907:10:0;-1:-1:-1;15985:1:0;15970:77;15995:2;15992:1;15989:9;15970:77;;;16028:17;16043:1;16040;16037;16028:17;:::i;:::-;16020:25;;-1:-1:-1;16020:25:0;-1:-1:-1;16013:1:0;16006:9;15970:77;;;15974:14;;;16074:5;:12;;;16071:86;;;16137:13;:11;:13::i;:::-;16130:20;;;;;16071:86;16162:10;;;:15;;16176:1;16162:15;;;;;16231:8;;;;-1:-1:-1;;16223:20:0;;-1:-1:-1;16223:7:0;:20::i;:::-;16209:34;-1:-1:-1;16266:10:0;16274:2;16266:10;;;;16327:1;16317:11;;;:26;;;16332:6;:11;;16342:1;16332:11;16317:26;16313:308;;;16552:62;16563:6;:11;;16573:1;16563:11;:20;;16581:2;16563:20;;;16577:1;16563:20;16552:62;;16612:1;16585:23;16588:4;16593:10;16588:15;16605:2;16585;:23::i;:::-;:28;;;;16552:10;:62::i;:::-;16545:69;;;;;;;16313:308;16822:15;;;;16649:9;;;;16770:4;16764:2;16756:10;;;16755:19;;;16822:15;16847:2;16839:10;;;16838:19;16822:36;;;;;;;;;;;;-1:-1:-1;16879:5:0;16894:11;;;;;:29;;;16909:6;:14;;16919:4;16909:14;16894:29;16890:636;;;16966:5;:15;;;16982:5;16966:22;;;;;;;;;;;;;;-1:-1:-1;;17019:4:0;17013:2;17005:10;;;17004:19;16890:636;;;17049:4;17040:6;:13;;;17036:490;;;17140:6;:13;;17150:3;17140:13;:30;;;;17157:6;:13;;17167:3;17157:13;17140:30;:47;;;;17174:6;:13;;17184:3;17174:13;17140:47;17136:181;;;17226:4;17231:6;17226:11;17221:16;;17136:181;;;17289:19;17292:4;17297:6;17292:11;17305:2;17289;:19::i;:::-;17284:24;;17136:181;17036:490;;;17343:4;17333:6;:14;;;;:32;;;;17351:6;:14;;17361:4;17351:14;17333:32;:50;;;;17369:6;:14;;17379:4;17369:14;17333:50;17329:197;;;17433:5;:15;;;17449:5;17433:22;;;;;;;;;;;;;17428:27;;17514:5;17506:13;;17329:197;17547:1;17537:6;:11;;;;:25;;;;;17561:1;17552:6;:10;;;17537:25;17536:42;;;;17567:6;:11;;17577:1;17567:11;17536:42;17532:107;;;17595:37;17608:6;17616:4;17622:5;17629:2;17595:12;:37::i;:::-;17588:44;;;;;;;;;;;17532:107;17664:13;17645:16;17784:4;17774:14;;;;17770:328;;17833:19;17836:4;17841:6;17836:11;17849:2;17833;:19::i;:::-;17827:25;;;;17879:10;17874:15;;17903:16;17874:15;17917:1;17903:7;:16::i;:::-;17897:22;;17941:4;17931:6;:14;;;;:32;;;;;17949:6;:14;;17959:4;17949:14;;17931:32;17927:165;;;18004:4;17992:16;;18082:1;18074:9;;17927:165;17770:328;;18115:10;18128:26;18136:4;18142:2;18146;18150:3;18128:7;:26::i;:::-;18157:10;18128:39;;;;-1:-1:-1;18245:4:0;18238:11;;;18269;;;:24;;;;;18292:1;18284:4;:9;;;;18269:24;:39;;;;;18304:4;18297;:11;;;18269:39;18265:589;;;18322:4;:9;;18330:1;18322:9;:22;;;;18335:4;:9;;18343:1;18335:9;18322:22;18318:102;;;18374:37;18385:4;:9;;18393:1;18385:9;:21;;18401:5;18385:21;;;18397:1;18385:21;18408:2;18374:10;:37::i;:::-;18367:44;;;;;;;;;;;;;;;18318:102;18432:4;:11;;18440:3;18432:11;18428:79;;;18470:28;18479:5;18486:2;18490:7;;;;18470:8;:28::i;18428:79::-;18518:4;:11;;18526:3;18518:11;18514:79;;;18556:28;18565:5;18572:2;18576:7;;;;;18556:8;:28::i;18514:79::-;18643:4;:11;;18651:3;18643:11;18639:58;;;18673:15;:13;:15::i;18639:58::-;18770:4;18762;:12;;;;:27;;;;;18785:4;18778;:11;;;18762:27;18758:90;;;18808:31;18819:4;18825:2;18829;18833:5;18808:10;:31::i;18758:90::-;18898:6;:14;;18908:4;18898:14;:28;;;;-1:-1:-1;18916:10:0;;;;;18898:28;18894:75;;;18961:1;18936:5;:15;;;18952:5;18936:22;;;;;;;;;:26;;;;:22;;;;;;:26;18894:75;18999:9;:26;;19012:13;18999:26;18995:74;;19035:27;19044:9;19055:1;19058:3;19035:8;:27::i;:::-;19134:26;19143:5;19150:3;19155:4;19134:8;:26::i;:::-;19127:33;;;;;;;;;;;;;14376:4789;;;;;;;:::o;2085:1331::-;2126:11;2254:176;;;2346:2;2342:13;;;2332:24;;2326:31;2315:43;;2378:13;;2409;;;2305:125::o;:::-;2449:4;2488;2482:11;2526:5;2550:21;2568:2;2564;2558:4;2550:21;:::i;:::-;2538:33;;;;2601:21;2619:2;2615;2609:4;2601:21;:::i;:::-;2589:33;;;;2656:20;2674:1;2670:2;2664:4;2656:20;:::i;:::-;2644:32;;;;2713:20;2731:1;2727:2;2721:4;2713:20;:::i;:::-;2701:32;;;;2758:20;2776:1;2772:2;2766:4;2758:20;:::i;:::-;2746:32;;;;2807:20;2825:1;2821:2;2815:4;2807:20;:::i;:::-;2795:32;;;;2852:20;2870:1;2866:2;2860:4;2852:20;:::i;:::-;2840:32;;;;2897:20;2915:1;2911:2;2905:4;2897:20;:::i;:::-;2885:32;;;;2944:20;2962:1;2958:2;2952:4;2944:20;:::i;:::-;2932:32;;;;2995:20;3013:1;3009:2;3003:4;2995:20;:::i;:::-;2983:32;;;;3044:20;3062:1;3058:2;3052:4;3044:20;:::i;:::-;3097:2;3087:13;;;;-1:-1:-1;3032:32:0;-1:-1:-1;3145:1:0;3130:84;3155:2;3152:1;3149:9;3130:84;;;3192:20;3210:1;3206:2;3200:4;3192:20;:::i;:::-;3180:32;;-1:-1:-1;3180:32:0;-1:-1:-1;3173:1:0;3166:9;3130:84;;;3134:14;3245:1;3241:2;3234:13;3290:5;3286:2;3282:14;3275:5;3270:27;3375:14;;;3358:32;;;-1:-1:-1;;2085:1331:0;;:::o;11778:1270::-;11849:10;11867:14;11884:23;11896:10;11884:11;:23::i;:::-;11867:40;;11943:1;11937:4;11933:12;11930:2;;;11958:1;11955;11948:12;11930:2;12060;12048:15;;;12011:20;12070:169;;;;12109:12;;;12195:2;12188:13;;;;12228:2;12215:16;;;12099:140::o;:::-;12265:4;12262:1;12258:12;12289:4;12412:1;12397:273;12422:2;12419:1;12416:9;12397:273;;;12521:2;12509:15;;;12470:20;12544:12;;;12558:1;12540:20;12569:42;;;;12625:1;12620:42;;;;12533:129;;12569:42;12586:23;12601:7;12595:4;12586:23;:::i;:::-;12578:31;;12569:42;;12620;12637:23;12655:4;12646:7;12637:23;:::i;:::-;12629:31;;12533:129;-1:-1:-1;;12440:1:0;12433:9;12397:273;;;12401:14;12698:4;12692:11;12677:26;;12767:7;12761:4;12758:17;12748:2;;12824:10;12821:1;12814:21;12854:2;12851:1;12844:13;12748:2;-1:-1:-1;;12970:2:0;12960:13;;12948:10;12944:30;12941:1;12937:38;12993:16;13011:10;12989:33;;-1:-1:-1;;11778:1270:0;;;;:::o;1825:256::-;1884:6;1915:14;;;;1923:5;;;;1915:14;;;;;;1914:21;;;;;1927:1;1966:2;:6;;;1960:13;;;;;1959:19;;1958:28;;;;;;;2008:8;;2007:14;1914:21;2053;;2073:1;2053:21;;;2064:6;2053:21;2041:8;;;;;:34;;-1:-1:-1;;;1825:256:0;;;;:::o;10450:401::-;10517:7;10532:18;;:::i;:::-;-1:-1:-1;10613:8:0;;;10638:12;;;10627:23;;;;;;;10656:19;;;;;10582:4;;10685:12;;;10681:140;;10734:6;10741:1;10734:8;10707:5;:15;;;10723:7;10707:24;;;;;;;;;:35;;;;:24;;;;;;:35;10681:140;10833:13;:11;:13::i;:::-;10826:20;10450:401;-1:-1:-1;;;;;10450:401:0:o;8292:1063::-;8385:7;8400:18;;:::i;:::-;-1:-1:-1;8450:4:0;8465:17;8511:1;8501:11;;;;;:26;;;8516:6;:11;;8526:1;8516:11;8501:26;8497:514;;;8550:9;8562:5;:15;;;8578:5;8562:22;;;;;;;;;;;;;8550:34;;8614:2;8608:8;;:2;:8;;;:23;;;;;8620:6;:11;;8630:1;8620:11;8608:23;8607:54;;;;8643:2;8637:8;;:2;:8;;;;:23;;;;;8649:6;:11;;8659:1;8649:11;8637:23;8592:69;;8497:514;;;;8678:6;:11;;8688:1;8678:11;8674:337;;;8721:1;8714:2;8708:14;;;;8693:29;;8674:337;;;8747:6;:11;;8757:1;8747:11;8743:268;;;8789:1;8783:2;8777:13;;;8762:28;;8743:268;;;8815:6;:11;;8825:1;8815:11;8811:200;;;8881:4;8875:2;8867:10;;;8866:19;8898:8;8894:42;;8935:1;8929:2;8923:13;;;8908:28;;8894:42;8957:3;:8;;8964:1;8957:8;8953:43;;;8995:1;8988:2;8982:14;;;;8967:29;;8953:43;8811:200;;9033:8;;;;;9058:12;;;;9047:23;;;;;9108:216;;;;9184:1;9163:19;9166:4;9171:6;9166:11;9179:2;9163;:19::i;:::-;:22;;;;;;;9149:37;;9158:1;9149:37;9134:52;:12;;;:52;9108:216;;;9281:12;;;;;9296:1;9281:16;9266:31;;;;9108:216;9337:13;:11;:13::i;:::-;9330:20;8292:1063;-1:-1:-1;;;;;;;;8292:1063:0:o;19169:4269::-;19256:6;19286:10;19294:2;19286:10;;;;;;19329:11;;19425:4;19416:13;;19412:3986;;;19526:1;19516:6;:11;;;;:27;;;;;19540:3;19531:6;:12;;;19516:27;19512:462;;;19559:6;:11;;19569:1;19559:11;19555:383;;;-1:-1:-1;19581:4:0;19555:383;;;19621:6;:11;;19631:1;19621:11;19617:321;;;-1:-1:-1;19643:4:0;19617:321;;;19679:6;:13;;19689:3;19679:13;19675:263;;;-1:-1:-1;19703:4:0;19675:263;;;19736:6;:13;;19746:3;19736:13;19732:206;;;-1:-1:-1;19760:4:0;19732:206;;;19794:6;:13;;19804:3;19794:13;19790:148;;;-1:-1:-1;19818:4:0;19790:148;;;19851:6;:13;;19861:3;19851:13;19847:91;;;-1:-1:-1;19875:4:0;19847:91;;;19907:6;:13;;19917:3;19907:13;19903:35;;;-1:-1:-1;19931:4:0;19903:35;19964:1;19955:10;;19512:462;20015:11;;;20011:1701;;20067:4;20062:1;20054:9;;;20053:18;20092:4;20054:9;20085:11;;;20081:588;;;20122:4;20114;:12;;;20110:549;;20137:2;20130:9;;;;;;;20110:549;20217:12;;;20213:446;;20240:11;;;;;;;;-1:-1:-1;20233:18:0;;-1:-1:-1;;20233:18:0;20213:446;20286:4;:12;;20294:4;20286:12;20282:377;;;20309:11;;;;;;;;-1:-1:-1;20302:18:0;;-1:-1:-1;;20302:18:0;20282:377;20355:4;:12;;20363:4;20355:12;20351:308;;;20378:25;20387:5;20381:11;;:2;:11;;;;20397:5;20394:2;:8;20378:2;:25::i;20351:308::-;20438:4;:12;;20446:4;20438:12;20434:225;;;-1:-1:-1;;;;20461:15:0;;;20471:4;20468:7;;20461:15;20454:22;;20434:225;20515:4;:12;;20523:4;20515:12;20511:148;;;-1:-1:-1;;;;20538:15:0;;;20548:4;20545:7;;20538:15;20531:22;;20511:148;20592:4;:12;;20600:4;20592:12;20588:71;;;20615:19;20624:2;20618:8;;:2;:8;;;;20631:2;20628;:5;20615:2;:19::i;20588:71::-;20757:4;:12;;20765:4;20757:12;:28;;;;20773:4;:12;;20781:4;20773:12;20757:28;20753:602;;;20799:2;20796;:5;20789:12;;;;;;;20753:602;20839:4;:12;;20847:4;20839:12;:28;;;;20855:4;:12;;20863:4;20855:12;20839:28;20835:520;;;20881:2;20878;:5;20871:12;;;;;;;20835:520;20921:4;:12;;20929:4;20921:12;20917:438;;;20947:2;20944;:5;20937:12;;;;;;;20917:438;20988:4;:12;;20996:4;20988:12;20984:371;;;21015:2;21012;:5;21004:14;;;;;;;20984:371;21054:4;:12;;21062:4;21054:12;21050:305;;;21081:2;21078;:5;21070:14;;;;;;;21050:305;21121:4;:12;;21129:4;21121:12;21117:238;;;-1:-1:-1;;;;21146:5:0;;;21144:8;21137:15;;21117:238;21188:4;:12;;21196:4;21188:12;21184:171;;;21237:2;21221:19;;21227:2;21221:19;;;:27;;21247:1;21221:27;;;21243:1;21221:27;21214:34;;;;;;;;;21184:171;21276:4;:12;;21284:4;21276:12;21272:83;;;21312:2;21309:5;;:2;:5;;;:13;;21321:1;21309:13;;21272:83;20011:1701;;;;21373:6;:13;;21383:3;21373:13;21369:343;;;21401:2;21397;:6;;;;21390:13;;;;;;21369:343;21429:6;:14;;21439:4;21429:14;21425:287;;;21472:4;:9;;21480:1;21472:9;21468:49;;;-1:-1:-1;;;21497:19:0;;;21483:34;;21468:49;21538:4;:12;;21546:4;21538:12;:28;;;;21554:4;:12;;21562:4;21554:12;21538:28;21534:170;;;21591:4;:12;;21599:4;21591:12;21587:26;;;21610:3;;;21587:26;21625:8;21639:45;21649:10;21646:13;;:18;21639:45;;21673:8;21668:3;21673:8;;;;;21668:3;21639:45;;;21692:1;-1:-1:-1;21685:8:0;;-1:-1:-1;;21685:8:0;21534:170;19412:3986;;;21737:4;21728:6;:13;;;21724:1674;;;21755:6;:14;;21765:4;21755:14;21751:776;;;21795:36;21811:2;21814:1;21811:4;21817:1;21810:8;21807:2;:11;21799:20;;:3;:20;;;;21823:4;21798:29;21829:1;21795:2;:36::i;:::-;21788:43;;;;;;21751:776;21850:6;:14;;21860:4;21850:14;21846:681;;;21890:39;21906:2;21909:1;21906:4;21912:1;21905:8;21902:2;:11;21894:20;;:3;:20;;;;21918:6;21893:31;21926:2;21890;:39::i;21846:681::-;21948:6;:14;;21958:4;21948:14;21944:583;;;-1:-1:-1;;;21995:17:0;22010:1;22007;22004:4;;22003:8;21995:17;;22036:32;;;22091:5;22086:10;;21995:17;;;;;22085:18;22078:25;;21944:583;22122:6;:14;;22132:4;22122:14;22118:409;;;22147:3;22140:10;;;;;;22118:409;22177:6;:14;;22187:4;22177:14;22173:354;;;22231:2;22234:1;22231:4;22237:1;22230:8;22227:2;:11;22219:20;;:3;:20;;;;22243:4;22218:29;22211:36;;;;;;22173:354;22266:6;:14;;22276:4;22266:14;22262:265;;;22320:2;22323:1;22320:4;22326:1;22319:8;22316:2;:11;22308:20;;:3;:20;;;;22332:6;22307:31;22300:38;;;;;;22262:265;22357:6;:14;;22367:4;22357:14;22353:174;;;-1:-1:-1;;;22404:20:0;22422:1;22419;22416:4;;22415:8;22412:2;:11;22404:20;;22448:35;;;22506:5;22501:10;;22404:20;;;;;22500:18;22493:25;;21724:1674;22543:6;:14;;22553:4;22543:14;22539:859;;;-1:-1:-1;;;22590:4:0;22586:26;22610:1;22607;22604:4;;22603:8;22600:2;:11;22586:26;;22654:21;;;22634:42;;;22692:10;;22587:7;;;22586:26;;22691:18;22684:25;;22539:859;22726:6;:14;;22736:4;22726:14;22722:676;;;-1:-1:-1;;;22773:6:0;22769:28;22795:1;22792;22789:4;;22788:8;22785:2;:11;22769:28;;22839:23;;;22819:44;;;22879:10;;22770:9;;;22769:28;;22878:18;22871:25;;22722:676;22913:6;:14;;22923:4;22913:14;22909:489;;;-1:-1:-1;;;22958:16:0;22972:1;22969;22966:4;;22965:8;22958:16;;22996:32;;;23050:5;23044:11;;22958:16;;;;;23043:19;23036:26;;22909:489;23079:6;:14;;23089:4;23079:14;23075:323;;;23116:2;23109:9;;;;;;23075:323;23135:6;:14;;23145:4;23135:14;23131:267;;;-1:-1:-1;;;23180:19:0;23197:1;23194;23191:4;;23190:8;23187:2;:11;23180:19;;23221:35;;;23278:5;23272:11;;23180:19;;;;;23271;23264:26;;23131:267;23307:6;:14;;23317:4;23307:14;23303:95;;;23332:3;23325:10;;;;;;23303:95;23358:6;:14;;23368:4;23358:14;23354:44;;;23383:2;23376:9;;;;;;23354:44;23404:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10855:455;10938:7;10953:18;;:::i;:::-;-1:-1:-1;11003:4:0;11037:2;11026:13;;;;11018:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11136:13;;;;;;;:28;;;11153:11;11136:28;11132:80;;;11202:3;11174:5;:15;;;11190:8;11174:25;;;;;;;;;:31;;;;:25;;;;;;:31;11132:80;11229:12;;;;;11218:23;;;;:8;;;:23;11277:1;11262:16;;;11247:31;;;11292:13;:11;:13::i;3420:4868::-;3463:7;3478:18;;:::i;:::-;-1:-1:-1;3563:15:0;;:18;;;;3528:4;3638:18;;;;3674;;;;3710;;;;;3528:4;;3543:17;;;;3638:18;3674;3739;;;3753:4;3739:18;3735:4396;;;3793:2;3810:4;3807:7;;:12;3803:98;;3887:4;3884:7;;3876:4;:16;3870:22;3803:98;3912:7;;;3908:105;;3936:10;;;;;3956:16;;;;;;;;3936:10;-1:-1:-1;3908:105:0;;;4002:2;3997:7;;3908:105;3735:4396;;;;4029:10;:18;;4043:4;4029:18;4025:4106;;;1458:10;4070:14;;4025:4106;;;4101:10;:18;;4115:4;4101:18;4097:4034;;;4165:1;4160:6;;4097:4034;;;4183:10;:18;;4197:4;4183:18;4179:3952;;;4246:4;4231:12;;;:19;4258:26;;;:14;;;:26;4299:13;:11;:13::i;:::-;4292:20;;;;;;;;;;;4179:3952;4329:10;:18;;4343:4;4329:18;4325:3806;;;4458:14;;;4454:1789;;;;;4549:22;;;1679:1;4549:22;4545:1698;;;4670:10;4683:27;4691:2;4696:10;4691:15;4708:1;4683:7;:27::i;:::-;4761:11;4792:6;;4812:17;;;;4831:20;;;;;4792:60;;;;;;;;;;;;;;;;;;;;4670:40;;-1:-1:-1;4761:11:0;;;;4792:6;;;;;:19;;:60;;;;;;;;;;;:6;:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4792:60:0;;;;;;;;;-1:-1:-1;4792:60:0;-1:-1:-1;4965:1:0;4957:10;;5045:1;5041:17;;;5106;;;5103:2;;;5136:5;5126:15;;5103:2;;5205:6;5201:2;5198:14;5195:2;;;5225;5215:12;;5195:2;5317:3;5312:1;5304:6;5300:14;5295:3;5291:24;5287:34;5280:41;;5403:3;5399:1;5387:9;5378:6;5375:1;5371:14;5367:30;5363:38;5359:48;5352:55;;5513:1;5509;5505;5493:9;5490:1;5486:17;5482:25;5478:33;5474:41;5626:1;5622;5618;5609:6;5597:9;5594:1;5590:17;5586:30;5582:38;5578:46;5574:54;5556:72;;5712:10;5708:15;5702:4;5698:26;5690:34;;5814:3;5806:4;5802:9;5797:3;5793:19;5790:28;5783:35;;;;5894:33;5903:2;5908:10;5903:15;5920:1;5923:3;5894:8;:33::i;:::-;5937:20;;;:38;;;;;;;;;-1:-1:-1;4545:1698:0;;-1:-1:-1;;4545:1698:0;;6023:18;;;1602:1;6023:18;6019:224;;;6172:2;6167:7;;6019:224;;;6204:10;6199:15;;1750:3;6224:10;;6019:224;4325:3806;;;6259:10;:18;;6273:4;6259:18;6255:1876;;;6392:15;;;1533:1;6392:15;;:34;;-1:-1:-1;6411:15:0;;;1566:1;6411:15;6392:34;:57;;;-1:-1:-1;6430:19:0;;;1639:1;6430:19;6392:57;6388:1172;;;6466:2;6461:7;;6388:1172;;;6530:23;;;1720:1;6530:23;6526:1034;;;6585:10;6598:27;6606:2;6611:10;6606:15;6623:1;6598:7;:27::i;:::-;6689:17;;;;6585:40;;-1:-1:-1;6819:1:0;6811:10;;6899:1;6895:17;6960:13;;;6957:2;;;6982:5;6976:11;;6957:2;7226:14;;;7060:1;7222:22;;;7218:32;;;;7129:26;7153:1;7052:10;;;7133:18;;;7129:26;7214:43;7048:20;;7308:12;7358:17;;;:23;7414:1;7391:20;;;:24;7056:2;-1:-1:-1;7056:2:0;6526:1034;;6255:1876;7576:10;:18;;7590:4;7576:18;7572:559;;;7650:2;:7;;7656:1;7650:7;7646:479;;;7711:14;;;;;:40;;-1:-1:-1;7729:22:0;;;1679:1;7729:22;7711:40;:62;;;-1:-1:-1;7755:18:0;;;1602:1;7755:18;7711:62;7707:312;;;7792:1;7787:6;;7707:312;;;7826:15;;;1533:1;7826:15;;:34;;-1:-1:-1;7845:15:0;;;1566:1;7845:15;7826:34;:61;;;-1:-1:-1;7864:23:0;;;1720:1;7864:23;7826:61;:84;;;-1:-1:-1;7891:19:0;;;1639:1;7891:19;7826:84;7822:197;;;7929:1;7924:6;;7822:197;;7646:479;8048:10;8043:15;;1782:4;8068:11;;7646:479;8137:15;;;;;:23;;;;:18;;;;:23;;;;8166:15;;:23;;;:18;;;;:23;-1:-1:-1;8207:12:0;;;;8196:23;;;:8;;;:23;8255:1;8240:16;8225:31;;;;;8270:13;:11;:13::i;:::-;8263:20;;;;;;;;;3420:4868;:::o;9359:1087::-;9449:7;9464:18;;:::i;:::-;-1:-1:-1;9514:4:0;9529:10;9557:4;9549:12;;;;9545:732;;;-1:-1:-1;9569:8:0;;;;9545:732;;;9600:4;:12;;9608:4;9600:12;9596:681;;;9614:13;;;:8;;;:13;9596:681;;;9650:4;:12;;9658:4;9650:12;9646:631;;;-1:-1:-1;9670:8:0;;;;9646:631;;;9701:4;:12;;9709:4;9701:12;9697:580;;;9715:13;;;:8;;;:13;9697:580;;;9751:4;:12;;9759:4;9751:12;9747:530;;;9861:7;9818:16;9801;;;9818;;;;9801:33;9866:2;9861:7;;;;;9843:8;;;:26;9877:22;:8;;;:22;9747:530;;;9916:4;:12;;9924:4;9916:12;9912:365;;;9978:10;9967;;;9978;;;9967:21;10020:2;10015:7;;;;;9997:8;;;:26;10031:22;:8;;;:22;9912:365;;;10070:4;:12;;10078:4;10070:12;10066:211;;;10133:2;10117:19;;10123:2;10117:19;;;;;;;;10099:38;;:8;;;:38;10163:19;;;;;;;;;;;;;;10145:38;;:8;;;:38;10066:211;;;10200:4;:12;;10208:4;10200:12;10196:81;;;10244:2;10241:5;;:2;:5;;;;;;;;10230:16;;;;:8;;;:16;10265:5;;;;;;;;;;;;10254:16;;:8;;;:16;10196:81;10287:13;;;;10283:65;;10338:3;10310:5;:15;;;10326:8;10310:25;;;;;;;;;:31;;;;:25;;;;;;:31;10283:65;10365:12;;;;;10354:23;;;;:8;;;:23;10413:1;10398:16;;;10383:31;;;10428:13;:11;:13::i;:::-;10421:20;9359:1087;-1:-1:-1;;;;;;;9359:1087:0:o;13171:1145::-;13254:14;13271:23;13283:10;13271:11;:23::i;:::-;13254:40;;13330:1;13324:4;13320:12;13317:2;;;13345:1;13342;13335:12;13317:2;13453;13616:15;;;13471:2;13461:13;;13449:10;13445:30;13442:1;13438:38;13581:17;;;13398:20;;13566:10;13555:22;;;13551:27;13541:38;13538:61;13833:4;13830:1;13826:12;13980:1;13965:273;13990:2;13987:1;13984:9;13965:273;;;14089:2;14077:15;;;14038:20;14112:12;;;14126:1;14108:20;14137:42;;;;14193:1;14188:42;;;;14101:129;;14137:42;14154:23;14169:7;14163:4;14154:23;:::i;:::-;14146:31;;14137:42;;14188;14205:23;14223:4;14214:7;14205:23;:::i;:::-;14197:31;;14101:129;-1:-1:-1;;14008:1:0;14001:9;13965:273;;;-1:-1:-1;;14252:4:0;14245:18;-1:-1:-1;;;;13309:1003:0:o;11314:460::-;11589:19;;;11612:5;11589:29;11582:3;:37;;;11660:14;;11695;;11689:21;;;11681:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11756:13;11314:460;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o"
func init() {
if err := json.Unmarshal([]byte(MIPSStorageLayoutJSON), MIPSStorageLayout); err != nil {
......
......@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const OptimismPortalStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)1932_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)48_storage\"},{\"astId\":1004,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"50\",\"type\":\"t_address\"},{\"astId\":1005,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1006,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"provenWithdrawals\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_mapping(t_bytes32,t_struct(ProvenWithdrawal)1271_storage)\"},{\"astId\":1007,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"paused\",\"offset\":0,\"slot\":\"53\",\"type\":\"t_bool\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)48_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[48]\",\"numberOfBytes\":\"1536\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_mapping(t_bytes32,t_struct(ProvenWithdrawal)1271_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e struct OptimismPortal.ProvenWithdrawal)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_struct(ProvenWithdrawal)1271_storage\"},\"t_struct(ProvenWithdrawal)1271_storage\":{\"encoding\":\"inplace\",\"label\":\"struct OptimismPortal.ProvenWithdrawal\",\"numberOfBytes\":\"64\"},\"t_struct(ResourceParams)1932_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceParams\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
const OptimismPortalStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)34941_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)48_storage\"},{\"astId\":1004,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"50\",\"type\":\"t_address\"},{\"astId\":1005,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1006,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"provenWithdrawals\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_mapping(t_bytes32,t_struct(ProvenWithdrawal)34280_storage)\"},{\"astId\":1007,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"paused\",\"offset\":0,\"slot\":\"53\",\"type\":\"t_bool\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)48_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[48]\",\"numberOfBytes\":\"1536\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_mapping(t_bytes32,t_struct(ProvenWithdrawal)34280_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e struct OptimismPortal.ProvenWithdrawal)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_struct(ProvenWithdrawal)34280_storage\"},\"t_struct(ProvenWithdrawal)34280_storage\":{\"encoding\":\"inplace\",\"label\":\"struct OptimismPortal.ProvenWithdrawal\",\"numberOfBytes\":\"64\"},\"t_struct(ResourceParams)34941_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceParams\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var OptimismPortalStorageLayout = new(solc.StorageLayout)
......
......@@ -15,7 +15,7 @@ var PreimageOracleStorageLayout = new(solc.StorageLayout)
var PreimageOracleDeployedBin = "0x608060405234801561001057600080fd5b50600436106100725760003560e01c8063e159261111610050578063e15926111461011b578063fe4ac08e14610130578063fef2b4ed146101a557600080fd5b806361238bde146100775780638542cf50146100b5578063e03110e1146100f3575b600080fd5b6100a26100853660046103b5565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100e36100c33660046103b5565b600260209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100ac565b6101066101013660046103b5565b6101c5565b604080519283526020830191909152016100ac565b61012e6101293660046103d7565b6102b6565b005b61012e61013e366004610453565b6000838152600260209081526040808320878452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558684528252808320968352958152858220939093559283529082905291902055565b6100a26101b3366004610485565b60006020819052908152604090205481565b6000828152600260209081526040808320848452909152812054819060ff1661024e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f707265696d616765206d75737420657869737400000000000000000000000000604482015260640160405180910390fd5b506000838152602081815260409091205461026a8160086104cd565b6102758560206104cd565b1061029357836102868260086104cd565b61029091906104e5565b91505b506000938452600160209081526040808620948652939052919092205492909150565b6044356000806008830186106102cb57600080fd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b600080604083850312156103c857600080fd5b50508035926020909101359150565b6000806000604084860312156103ec57600080fd5b83359250602084013567ffffffffffffffff8082111561040b57600080fd5b818601915086601f83011261041f57600080fd5b81358181111561042e57600080fd5b87602082850101111561044057600080fd5b6020830194508093505050509250925092565b6000806000806080858703121561046957600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561049757600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156104e0576104e061049e565b500190565b6000828210156104f7576104f761049e565b50039056fea164736f6c634300080f000a"
var PreimageOracleDeployedSourceMap = "57:2945:19:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143:68;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;413:25:195;;;401:2;386:18;143:68:19;;;;;;;;217:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:14:195;;607:22;589:41;;577:2;562:18;217:66:19;449:187:195;290:454:19;;;;;;:::i;:::-;;:::i;:::-;;;;815:25:195;;;871:2;856:18;;849:34;;;;788:18;290:454:19;641:248:195;1537:1463:19;;;;;;:::i;:::-;;:::i;:::-;;1086:262;;;;;;:::i;:::-;1219:19;;;;:14;:19;;;;;;;;:31;;;;;;;;:38;;;;1253:4;1219:38;;;;;;1267:18;;;;;;;;:30;;;;;;;;;:37;;;;1314:20;;;;;;;;;;:27;1086:262;87:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;290:454;388:11;439:19;;;:14;:19;;;;;;;;:27;;;;;;;;;388:11;;439:27;;431:59;;;;;;;2517:2:195;431:59:19;;;2499:21:195;2556:2;2536:18;;;2529:30;2595:21;2575:18;;;2568:49;2634:18;;431:59:19;;;;;;;;-1:-1:-1;521:14:19;538:20;;;509:2;538:20;;;;;;;;631:10;538:20;640:1;631:10;:::i;:::-;616:11;:6;625:2;616:11;:::i;:::-;:25;612:84;;679:6;666:10;:6;675:1;666:10;:::i;:::-;:19;;;;:::i;:::-;657:28;;612:84;-1:-1:-1;711:18:19;;;;:13;:18;;;;;;;;:26;;;;;;;;;;;;290:454;;-1:-1:-1;290:454:19:o;1537:1463::-;1831:4;1818:18;1636:12;;1966:1;1956:12;;1941:28;;1931:84;;1999:1;1996;1989:12;1931:84;2258:3;2254:14;;;2158:4;2242:27;2289:11;2263:4;2408:15;2289:11;2390:40;2620:28;;;2624:11;2620:28;2614:35;2671:20;;;;2818:19;2811:27;2840:11;2808:44;2871:19;;;;2849:1;2871:19;;;;;;;;:31;;;;;;;;:38;;;;2905:4;2871:38;;;;;;2919:18;;;;;;;;:30;;;;;;;;;:37;;;;2966:20;;;;;;;;;;;:27;;;;-1:-1:-1;;;;1537:1463:19:o;14:248:195:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:195;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:195:o;894:659::-;973:6;981;989;1042:2;1030:9;1021:7;1017:23;1013:32;1010:52;;;1058:1;1055;1048:12;1010:52;1094:9;1081:23;1071:33;;1155:2;1144:9;1140:18;1127:32;1178:18;1219:2;1211:6;1208:14;1205:34;;;1235:1;1232;1225:12;1205:34;1273:6;1262:9;1258:22;1248:32;;1318:7;1311:4;1307:2;1303:13;1299:27;1289:55;;1340:1;1337;1330:12;1289:55;1380:2;1367:16;1406:2;1398:6;1395:14;1392:34;;;1422:1;1419;1412:12;1392:34;1467:7;1462:2;1453:6;1449:2;1445:15;1441:24;1438:37;1435:57;;;1488:1;1485;1478:12;1435:57;1519:2;1515;1511:11;1501:21;;1541:6;1531:16;;;;;894:659;;;;;:::o;1558:385::-;1644:6;1652;1660;1668;1721:3;1709:9;1700:7;1696:23;1692:33;1689:53;;;1738:1;1735;1728:12;1689:53;-1:-1:-1;;1761:23:195;;;1831:2;1816:18;;1803:32;;-1:-1:-1;1882:2:195;1867:18;;1854:32;;1933:2;1918:18;1905:32;;-1:-1:-1;1558:385:195;-1:-1:-1;1558:385:195:o;1948:180::-;2007:6;2060:2;2048:9;2039:7;2035:23;2031:32;2028:52;;;2076:1;2073;2066:12;2028:52;-1:-1:-1;2099:23:195;;1948:180;-1:-1:-1;1948:180:195:o;2663:184::-;2715:77;2712:1;2705:88;2812:4;2809:1;2802:15;2836:4;2833:1;2826:15;2852:128;2892:3;2923:1;2919:6;2916:1;2913:13;2910:39;;;2929:18;;:::i;:::-;-1:-1:-1;2965:9:195;;2852:128::o;2985:125::-;3025:4;3053:1;3050;3047:8;3044:34;;;3058:18;;:::i;:::-;-1:-1:-1;3095:9:195;;2985:125::o"
var PreimageOracleDeployedSourceMap = "57:2945:58:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143:68;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;413:25:234;;;401:2;386:18;143:68:58;;;;;;;;217:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:14:234;;607:22;589:41;;577:2;562:18;217:66:58;449:187:234;290:454:58;;;;;;:::i;:::-;;:::i;:::-;;;;815:25:234;;;871:2;856:18;;849:34;;;;788:18;290:454:58;641:248:234;1537:1463:58;;;;;;:::i;:::-;;:::i;:::-;;1086:262;;;;;;:::i;:::-;1219:19;;;;:14;:19;;;;;;;;:31;;;;;;;;:38;;;;1253:4;1219:38;;;;;;1267:18;;;;;;;;:30;;;;;;;;;:37;;;;1314:20;;;;;;;;;;:27;1086:262;87:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;290:454;388:11;439:19;;;:14;:19;;;;;;;;:27;;;;;;;;;388:11;;439:27;;431:59;;;;;;;2517:2:234;431:59:58;;;2499:21:234;2556:2;2536:18;;;2529:30;2595:21;2575:18;;;2568:49;2634:18;;431:59:58;;;;;;;;-1:-1:-1;521:14:58;538:20;;;509:2;538:20;;;;;;;;631:10;538:20;640:1;631:10;:::i;:::-;616:11;:6;625:2;616:11;:::i;:::-;:25;612:84;;679:6;666:10;:6;675:1;666:10;:::i;:::-;:19;;;;:::i;:::-;657:28;;612:84;-1:-1:-1;711:18:58;;;;:13;:18;;;;;;;;:26;;;;;;;;;;;;290:454;;-1:-1:-1;290:454:58:o;1537:1463::-;1831:4;1818:18;1636:12;;1966:1;1956:12;;1941:28;;1931:84;;1999:1;1996;1989:12;1931:84;2258:3;2254:14;;;2158:4;2242:27;2289:11;2263:4;2408:15;2289:11;2390:40;2620:28;;;2624:11;2620:28;2614:35;2671:20;;;;2818:19;2811:27;2840:11;2808:44;2871:19;;;;2849:1;2871:19;;;;;;;;:31;;;;;;;;:38;;;;2905:4;2871:38;;;;;;2919:18;;;;;;;;:30;;;;;;;;;:37;;;;2966:20;;;;;;;;;;;:27;;;;-1:-1:-1;;;;1537:1463:58:o;14:248:234:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:234;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:234:o;894:659::-;973:6;981;989;1042:2;1030:9;1021:7;1017:23;1013:32;1010:52;;;1058:1;1055;1048:12;1010:52;1094:9;1081:23;1071:33;;1155:2;1144:9;1140:18;1127:32;1178:18;1219:2;1211:6;1208:14;1205:34;;;1235:1;1232;1225:12;1205:34;1273:6;1262:9;1258:22;1248:32;;1318:7;1311:4;1307:2;1303:13;1299:27;1289:55;;1340:1;1337;1330:12;1289:55;1380:2;1367:16;1406:2;1398:6;1395:14;1392:34;;;1422:1;1419;1412:12;1392:34;1467:7;1462:2;1453:6;1449:2;1445:15;1441:24;1438:37;1435:57;;;1488:1;1485;1478:12;1435:57;1519:2;1515;1511:11;1501:21;;1541:6;1531:16;;;;;894:659;;;;;:::o;1558:385::-;1644:6;1652;1660;1668;1721:3;1709:9;1700:7;1696:23;1692:33;1689:53;;;1738:1;1735;1728:12;1689:53;-1:-1:-1;;1761:23:234;;;1831:2;1816:18;;1803:32;;-1:-1:-1;1882:2:234;1867:18;;1854:32;;1933:2;1918:18;1905:32;;-1:-1:-1;1558:385:234;-1:-1:-1;1558:385:234:o;1948:180::-;2007:6;2060:2;2048:9;2039:7;2035:23;2031:32;2028:52;;;2076:1;2073;2066:12;2028:52;-1:-1:-1;2099:23:234;;1948:180;-1:-1:-1;1948:180:234:o;2663:184::-;2715:77;2712:1;2705:88;2812:4;2809:1;2802:15;2836:4;2833:1;2826:15;2852:128;2892:3;2923:1;2919:6;2916:1;2913:13;2910:39;;;2929:18;;:::i;:::-;-1:-1:-1;2965:9:234;;2852:128::o;2985:125::-;3025:4;3053:1;3050;3047:8;3044:34;;;3058:18;;:::i;:::-;-1:-1:-1;3095:9:234;;2985:125::o"
func init() {
if err := json.Unmarshal([]byte(PreimageOracleStorageLayoutJSON), PreimageOracleStorageLayout); err != nil {
......
......@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const SystemConfigStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":1005,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_uint256\"},{\"astId\":1007,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"batcherHash\",\"offset\":0,\"slot\":\"103\",\"type\":\"t_bytes32\"},{\"astId\":1008,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"gasLimit\",\"offset\":0,\"slot\":\"104\",\"type\":\"t_uint64\"},{\"astId\":1009,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_resourceConfig\",\"offset\":0,\"slot\":\"105\",\"type\":\"t_struct(ResourceConfig)1945_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)49_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\",\"base\":\"t_uint256\"},\"t_array(t_uint256)50_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_struct(ResourceConfig)1945_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceConfig\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
const SystemConfigStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":1005,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_uint256\"},{\"astId\":1007,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"batcherHash\",\"offset\":0,\"slot\":\"103\",\"type\":\"t_bytes32\"},{\"astId\":1008,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"gasLimit\",\"offset\":0,\"slot\":\"104\",\"type\":\"t_uint64\"},{\"astId\":1009,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_resourceConfig\",\"offset\":0,\"slot\":\"105\",\"type\":\"t_struct(ResourceConfig)34954_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)49_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\",\"base\":\"t_uint256\"},\"t_array(t_uint256)50_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_struct(ResourceConfig)34954_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceConfig\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var SystemConfigStorageLayout = new(solc.StorageLayout)
......
......@@ -95,6 +95,9 @@ func (s *SourceMap) Info(pc uint64) (source string, line uint32, col uint32) {
if s.PosData[instr.F] == nil { // when the source file is known to be unavailable
return
}
if int(instr.S) >= len(s.PosData[instr.F]) { // possibly invalid / truncated source mapping
return
}
lc := s.PosData[instr.F][instr.S]
line = lc.Line
col = lc.Col
......
......@@ -3,6 +3,8 @@ package fault
import (
"context"
"sync"
"github.com/ethereum/go-ethereum/log"
)
type Agent struct {
......@@ -12,15 +14,17 @@ type Agent struct {
trace TraceProvider
responder Responder
maxDepth int
log log.Logger
}
func NewAgent(game Game, maxDepth int, trace TraceProvider, responder Responder) Agent {
func NewAgent(game Game, maxDepth int, trace TraceProvider, responder Responder, log log.Logger) Agent {
return Agent{
game: game,
solver: NewSolver(maxDepth, trace),
trace: trace,
responder: responder,
maxDepth: maxDepth,
log: log,
}
}
......@@ -38,19 +42,30 @@ func (a *Agent) AddClaim(claim Claim) error {
func (a *Agent) PerformActions() {
a.mu.Lock()
defer a.mu.Unlock()
for _, pair := range a.game.ClaimPairs() {
_ = a.move(pair.claim, pair.parent)
for _, claim := range a.game.Claims() {
_ = a.move(claim)
}
}
// move determines & executes the next move given a claim pair
func (a *Agent) move(claim, parent Claim) error {
move, err := a.solver.NextMove(claim)
if err != nil || move == nil {
func (a *Agent) move(claim Claim) error {
nextMove, err := a.solver.NextMove(claim)
if err != nil {
a.log.Warn("Failed to execute the next move", "err", err)
return err
}
if a.game.IsDuplicate(*move) {
if nextMove == nil {
a.log.Info("No next move")
return nil
}
move := *nextMove
log := a.log.New("is_defend", move.DefendsParent(), "depth", move.Depth(), "index_at_depth", move.IndexAtDepth(), "value", move.Value,
"letter", string(move.Value[31:]), "trace_index", move.Value[30],
"parent_letter", string(claim.Value[31:]), "parent_trace_index", claim.Value[30])
if a.game.IsDuplicate(move) {
log.Debug("Duplicate move")
return nil
}
return a.responder.Respond(context.TODO(), *move)
log.Info("Performing move")
return a.responder.Respond(context.TODO(), move)
}
package examples
import (
"os"
"github.com/ethereum-optimism/optimism/op-challenger/fault"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
)
func FullGame() {
log.Root().SetHandler(
log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stdout, log.TerminalFormat(true))),
)
canonical := "abcdefgh"
disputed := "abcdexyz"
maxDepth := uint64(3)
canonicalProvider := fault.NewAlphabetProvider(canonical, maxDepth)
disputedProvider := fault.NewAlphabetProvider(disputed, maxDepth)
root := fault.Claim{
ClaimData: fault.ClaimData{
Value: common.HexToHash("0x000000000000000000000000000000000000000000000000000000000000077a"),
Position: fault.NewPosition(0, 0),
},
}
o := fault.NewOrchestrator(maxDepth, []fault.TraceProvider{canonicalProvider, disputedProvider}, []string{"charlie", "mallory"}, root)
o.Start()
}
......@@ -37,17 +37,6 @@ func SolverExampleOne() {
},
}
// Note: We have to create the first counter claim seperately because next move does not know how to counter
// the root claim at this time.
// Counter claim is d at trace index 3 from the canonical provider
counter := fault.Claim{
ClaimData: fault.ClaimData{
Value: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000364"),
Position: fault.NewPosition(1, 0),
},
Parent: root.ClaimData,
}
canonicalProvider := fault.NewAlphabetProvider(canonical, uint64(maxDepth))
disputedProvider := fault.NewAlphabetProvider(disputed, uint64(maxDepth))
......@@ -63,17 +52,22 @@ func SolverExampleOne() {
fmt.Println("go left to d, then right to x (cannonical is f), then left to e")
fmt.Println()
PrettyPrintAlphabetClaim("Root claim", root)
PrettyPrintAlphabetClaim("Counter claim", counter)
claim1, err := disputedSolver.NextMove(counter)
claim1, err := cannonicalSolver.NextMove(root)
if err != nil {
fmt.Printf("error getting claim from provider: %v", err)
}
PrettyPrintAlphabetClaim("Cannonical move", *claim1)
claim2, err := disputedSolver.NextMove(*claim1)
if err != nil {
fmt.Printf("error getting claim from disputed provider: %v", err)
fmt.Printf("error getting claim from provider: %v", err)
}
PrettyPrintAlphabetClaim("Disputed moved", *claim1)
PrettyPrintAlphabetClaim("Disputed moved", *claim2)
claim2, err := cannonicalSolver.NextMove(*claim1)
claim3, err := cannonicalSolver.NextMove(*claim2)
if err != nil {
fmt.Printf("error getting claim from disputed provider: %v", err)
fmt.Printf("error getting claim from provider: %v", err)
}
PrettyPrintAlphabetClaim("Cannonical move", *claim2)
PrettyPrintAlphabetClaim("Cannonical move", *claim3)
}
......@@ -5,8 +5,8 @@ import (
)
func main() {
examples.SolverExampleOne()
examples.FullGame()
// examples.SolverExampleOne()
// examples.PositionExampleOne()
// examples.PositionExampleTwo()
}
......@@ -17,11 +17,8 @@ type Game interface {
// Put adds a claim into the game state.
Put(claim Claim) error
// ClaimPairs returns a list of claim pairs.
ClaimPairs() []struct {
claim Claim
parent Claim
}
// Claims returns all of the claims in the game.
Claims() []Claim
IsDuplicate(claim Claim) bool
}
......@@ -93,8 +90,8 @@ func (g *gameState) recurseTree(treeNode *Node, claim ClaimData) (*Node, error)
// Put adds a claim into the game state.
func (g *gameState) Put(claim Claim) error {
// If the claim is the root node and the node is set, return an error.
if claim.IsRoot() && g.root.self != (Claim{}) {
// The game is always initialized with a root claim. Cannot add a second.
if claim.IsRoot() {
return ErrClaimExists
}
......@@ -132,40 +129,15 @@ func (g *gameState) IsDuplicate(claim Claim) bool {
return ok
}
// recurseTreePairs recursively walks down the tree from the root node
// returning a list of claim and parent pairs.
func (g *gameState) recurseTreePairs(current *Node) []struct {
claim Claim
parent Claim
} {
// Create a list of claim pairs.
pairs := make([]struct {
claim Claim
parent Claim
}, 0)
// Iterate over all children of the current node.
for _, child := range current.children {
// Add the current node to the list of pairs.
pairs = append(pairs, struct {
claim Claim
parent Claim
}{
claim: child.self,
parent: current.self,
})
// Recurse down the tree.
pairs = append(pairs, g.recurseTreePairs(child)...)
}
return pairs
func (g *gameState) Claims() []Claim {
return g.root.claims()
}
// ClaimPairs returns a list of claim pairs.
func (g *gameState) ClaimPairs() []struct {
claim Claim
parent Claim
} {
return g.recurseTreePairs(&g.root)
func (n *Node) claims() []Claim {
var out []Claim
out = append(out, n.self)
for _, c := range n.children {
out = append(out, c.claims()...)
}
return out
}
......@@ -121,10 +121,7 @@ func TestGame_ClaimPairs(t *testing.T) {
require.NoError(t, err)
// Validate claim pairs.
expected := []struct{ claim, parent Claim }{
{middle, top},
{bottom, middle},
}
pairs := g.ClaimPairs()
require.ElementsMatch(t, expected, pairs)
expected := []Claim{top, middle, bottom}
claims := g.Claims()
require.ElementsMatch(t, expected, claims)
}
package fault
import (
"context"
"os"
"time"
"github.com/ethereum/go-ethereum/log"
)
type Orchestrator struct {
agents []Agent
outputChs []chan Claim
responses chan Claim
}
func NewOrchestrator(maxDepth uint64, traces []TraceProvider, names []string, root Claim) Orchestrator {
o := Orchestrator{
responses: make(chan Claim, 100),
outputChs: make([]chan Claim, len(traces)),
agents: make([]Agent, len(traces)),
}
log.Info("Starting game", "root_letter", string(root.Value[31:]))
for i, trace := range traces {
game := NewGameState(root)
o.agents[i] = NewAgent(game, int(maxDepth), trace, &o, log.New("role", names[i]))
o.outputChs[i] = make(chan Claim)
}
return o
}
func (o *Orchestrator) Respond(_ context.Context, response Claim) error {
o.responses <- response
return nil
}
func (o *Orchestrator) Start() {
for i := 0; i < len(o.agents); i++ {
go runAgent(&o.agents[i], o.outputChs[i])
}
o.responderThread()
}
func runAgent(agent *Agent, claimCh <-chan Claim) {
for {
agent.PerformActions()
// Note: Should drain the channel here
claim := <-claimCh
_ = agent.AddClaim(claim)
}
}
func (o *Orchestrator) responderThread() {
timer := time.NewTimer(200 * time.Millisecond)
defer timer.Stop()
for {
select {
case resp := <-o.responses:
timer.Reset(200 * time.Millisecond)
for _, ch := range o.outputChs {
// Copy it. Should be immutable, but be sure.
resp := resp
ch <- resp
}
case <-timer.C:
os.Exit(0)
}
}
}
......@@ -23,6 +23,21 @@ func NewSolver(gameDepth int, traceProvider TraceProvider) *Solver {
// NextMove returns the next move to make given the current state of the game.
func (s *Solver) NextMove(claim Claim) (*Claim, error) {
// Special case of the root claim
if claim.IsRoot() {
agree, err := s.agreeWithClaim(claim.ClaimData)
if err != nil {
return nil, err
}
// Attack the root claim if we do not agree with it
if !agree {
return s.attack(claim)
} else {
return nil, nil
}
}
parentCorrect, err := s.agreeWithClaim(claim.Parent)
if err != nil {
return nil, err
......@@ -31,6 +46,9 @@ func (s *Solver) NextMove(claim Claim) (*Claim, error) {
if err != nil {
return nil, err
}
if claim.Depth() == s.gameDepth {
return nil, errors.New("game depth reached")
}
if parentCorrect && claimCorrect {
// We agree with the parent, but the claim is disagreeing with it.
// Since we agree with the claim, the difference must be to the right of the claim
......
......@@ -22,6 +22,20 @@ func TestSolver_NextMove_Opponent(t *testing.T) {
claim Claim
response ClaimData
}{
{
7,
Claim{
ClaimData: ClaimData{
Value: common.HexToHash("0x000000000000000000000000000000000000000000000000000000000000077a"),
Position: NewPosition(0, 0),
},
// Root claim has no parent
},
ClaimData{
Value: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000364"),
Position: NewPosition(1, 0),
},
},
{
3,
Claim{
......
......@@ -32,6 +32,10 @@ type ClaimData struct {
type Claim struct {
ClaimData
Parent ClaimData
// Location of the claim & it's parent inside the contract. Does not exist
// for claims that have not made it to the contract.
ContractIndex int
ParentContractIndex int
}
// IsRoot returns true if this claim is the root claim.
......
......@@ -10,10 +10,11 @@ REBUILD_ALL_PATTERNS = [
r'^\.circleci/\.*',
r'^\.github/\.*',
r'^package\.json',
r'^yarn\.lock',
r'ops/check-changed/.*',
r'^go\.mod',
r'^go\.sum',
r'^pnpm-lock\.yaml',
r'ops/check-changed/.*'
]
WHITELISTED_BRANCHES = {
......
......@@ -3,7 +3,7 @@
#
# Stage 0 (named `manifests`) collects
# dependency manifest files (`package.json` and `yarn.lock`) which are then
# dependency manifest files (`package.json` and `pnpm-lock.yaml`) which are then
# used by stage 1 to install these dependencies
# development. The only reason we need a separate stage just for collecting the
# dependency manifests is that Docker's `COPY` command still does not allow
......@@ -17,41 +17,47 @@ FROM alpine:3.16 as manifests
RUN apk add coreutils
WORKDIR /tmp
COPY yarn.lock .nvmrc package.json ./src/
COPY pnpm-lock.yaml pnpm-workspace.yaml .nvmrc package.json ./src/
COPY packages src/packages/
RUN mkdir manifests && \
cd src && \
# copy package.json recursively
find . -name 'package.json' | xargs cp --parents -t ../manifests/ && \
# yarn.lock
cp yarn.lock ../manifests/ && \
# pnpm-lock.yaml
cp pnpm-lock.yaml ../manifests/ && \
# pnpm-workspace.yaml
cp pnpm-workspace.yaml ../manifests/ && \
# .nvmrc
cp .nvmrc ../manifests/
FROM ethereumoptimism/foundry:latest as foundry
FROM node:16-alpine3.14 as base
# bullseye-slim is debian based
# we use it rather than alpien because it's not much
# bigger and alpine is often missing packages for node applications
# alpine is not officially supported by node.js
FROM node:16.16.0-bullseye-slim as base
# Base: install deps
RUN apk --no-cache add curl \
RUN apt-get update && apt-get install -y \
curl \
jq \
python3 \
ca-certificates \
git \
g++ \
make \
gcc \
musl-dev \
linux-headers \
bash \
build-base \
gcompat
# the following 4 deps are needed for node-hid
# which is a deep sub dependency of ethers to install
# correctly
pkg-config \
libusb-1.0-0-dev \
libudev-dev \
--no-install-recommends
ENV GLIBC_KEY=https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
ENV GLIBC_KEY_FILE=/etc/apk/keys/sgerrand.rsa.pub
ENV GLIBC_RELEASE=https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
RUN wget -q -O ${GLIBC_KEY_FILE} ${GLIBC_KEY} \
&& wget -O glibc.apk ${GLIBC_RELEASE} \
&& apk add glibc.apk --force
RUN npm install pnpm --global
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge
COPY --from=foundry /usr/local/bin/cast /usr/local/bin/cast
......@@ -59,37 +65,38 @@ COPY --from=foundry /usr/local/bin/cast /usr/local/bin/cast
WORKDIR /opt/optimism
# Copy manifest files into the image in
# preparation for `yarn install`.
# preparation for `pnpm install`.
COPY --from=manifests /tmp/manifests ./
COPY *.json ./
RUN yarn install --frozen-lockfile && yarn cache clean
RUN pnpm install --frozen-lockfile
COPY ./packages ./packages
RUN yarn build
RUN pnpm build
FROM base as fault-detector
WORKDIR /opt/optimism/packages/fault-detector
COPY ./ops/scripts/detector.sh .
CMD ["npm", "run", "start"]
CMD ["pnpm", "run", "start"]
FROM base as replica-healthcheck
WORKDIR /opt/optimism/packages/replica-healthcheck
ENTRYPOINT ["npm", "run", "start"]
ENTRYPOINT ["pnpm", "run", "start"]
FROM base as balance-mon
WORKDIR /opt/optimism/packages/chain-mon
ENTRYPOINT ["npm", "run", "start:balance-mon"]
ENTRYPOINT ["pnpm", "run", "start:balance-mon"]
FROM base as drippie-mon
WORKDIR /opt/optimism/packages/chain-mon
ENTRYPOINT ["npm", "run", "start:drippie-mon"]
ENTRYPOINT ["pnpm", "run", "start:drippie-mon"]
FROM base as wd-mon
WORKDIR /opt/optimism/packages/chain-mon
ENTRYPOINT ["yarn", "run", "start:wd-mon"]
ENTRYPOINT ["pnpm", "run", "start:wd-mon"]
FROM base as wallet-mon
WORKDIR /opt/optimism/packages/chain-mon
ENTRYPOINT ["yarn", "run", "start:wallet-mon"]
ENTRYPOINT ["pnpm", "run", "start:wallet-mon"]
......@@ -50,13 +50,18 @@ RUN apt-get update && \
ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt && \
bash nodesource_setup.sh && \
apt-get install -y nodejs && \
npm i -g npm@8.11.0 \
npm i -g yarn && \
npm i -g depcheck && \
pip install slither-analyzer==0.9.3 && \
go install gotest.tools/gotestsum@latest && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.48.0 && \
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash &&
chmox +x /usr/local/bin/check-changed
RUN echo "downloading pnpm" && \
curl -o /pnpm-install.sh -L https://get.pnpm.io/install.sh && \
chmod +x /pnpm-install.sh && \
/pnpm-install.sh && \
rm /pnpm-install.sh
RUN echo "downloading solidity compilers" && \
curl -o solc-linux-amd64-v0.5.17+commit.d19bba13 -sL https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.5.17+commit.d19bba13 && \
......
......@@ -16,4 +16,4 @@ curl \
$FAULT_DETECTOR__L2_RPC_PROVIDER
# go
exec yarn start
exec pnpm start
......@@ -3,6 +3,7 @@
"version": "1.0.0",
"author": "Optimism PBC",
"license": "MIT",
"private": true,
"workspaces": {
"packages": [
"packages/*",
......@@ -22,7 +23,9 @@
"forta-agent"
]
},
"private": true,
"engines": {
"pnpm": ">=8"
},
"scripts": {
"clean": "npx nx run-many --target=clean",
"build": "npx nx run-many --target=build",
......@@ -32,15 +35,15 @@
"lint:ts:check": "npx nx run-many --target=lint:ts:check",
"lint:check": "npx nx run-many --target=lint:check",
"lint:fix": "npx nx run-many --target=lint:fix",
"lint:specs:fix": "yarn run markdownlint-cli2-fix \"./specs/**/*.md\"",
"lint:specs:check": "yarn run markdownlint-cli2 \"./specs/**/*.md\"",
"lint:specs:toc": "yarn run doctoc '--title=**Table of Contents**' ./specs",
"postinstall": "patch-package",
"ready": "yarn lint && yarn test",
"lint:specs:fix": "npx markdownlint-cli2-fix \"./specs/**/*.md\"",
"lint:specs:check": "npx markdownlint-cli2 \"./specs/**/*.md\"",
"lint:specs:toc": "npx doctoc '--title=**Table of Contents**' ./specs",
"preinstall": "npx only-allow pnpm",
"postinstall": "patch-package && (test -d docs/op-stack && cd docs/op-stack && npx yarn@1 install && cd ../.. || exit 0)",
"ready": "pnpm lint && pnpm test",
"prepare": "husky install",
"release": "yarn build && yarn changeset publish",
"update:yarn": "yarn set version 1.x",
"install:foundry": "curl -L https://foundry.paradigm.xyz | bash && yarn update:foundry",
"release": "pnpm build && pnpm changeset publish",
"install:foundry": "curl -L https://foundry.paradigm.xyz | bash && pnpm update:foundry",
"update:foundry": "foundryup -C $(cat .foundryrc)"
},
"devDependencies": {
......@@ -50,13 +53,13 @@
"@types/chai-as-promised": "^7.1.4",
"@types/mocha": "^8.2.2",
"@types/node": "^12.0.0",
"@typescript-eslint/eslint-plugin": "^5.45.1",
"@typescript-eslint/parser": "^5.45.1",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"chai": "^4.2.0",
"copyfiles": "^2.3.0",
"depcheck": "^1.4.3",
"doctoc": "^2.2.0",
"eslint": "^8.16.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.26.0",
......@@ -68,6 +71,7 @@
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-unicorn": "^42.0.0",
"husky": "^6.0.0",
"lerna": "^6.0.0",
"lint-staged": "11.0.0",
"markdownlint": "^0.24.0",
"markdownlint-cli2": "0.4.0",
......
......@@ -10,8 +10,8 @@ Clone, install, and build the Optimism monorepo:
```
git clone https://github.com/ethereum-optimism/optimism.git
yarn install
yarn build
pnpm install
pnpm build
```
## Running a service
......@@ -20,11 +20,11 @@ Copy `.env.example` into a new file named `.env`, then set the environment varia
Once your environment variables have been set, run via:
```
yarn start:<service name>
pnpm start:<service name>
```
For example, to run `drippie-mon`, execute:
```
yarn start:drippie-mon
pnpm start:drippie-mon
```
......@@ -16,9 +16,9 @@
"test:coverage": "echo 'No tests defined.'",
"build": "tsc -p ./tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check",
"lint": "pnpm lint:fix && pnpm lint:check",
"pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix",
"lint:fix": "pnpm lint:check --fix",
"lint:check": "eslint . --max-warnings=0"
},
"keywords": [
......
......@@ -9,12 +9,12 @@
"src/*"
],
"scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"all": "pnpm clean && pnpm build && pnpm test && pnpm lint:fix && pnpm lint",
"build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint:check": "eslint . --max-warnings=0",
"lint:fix": "yarn lint:check --fix",
"lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "pnpm lint:check --fix",
"lint": "pnpm lint:fix && pnpm lint:check",
"pre-commit": "lint-staged",
"test": "ts-mocha test/*.spec.ts",
"test:coverage": "nyc ts-mocha test/*.spec.ts && nyc merge .nyc_output coverage.json"
......
......@@ -56,28 +56,28 @@ npm install @eth-optimism/contracts-bedrock
We work on this repository with a combination of [Hardhat](https://hardhat.org) and [Foundry](https://getfoundry.sh/).
1. Install node modules with yarn (v1) and Node.js (16+):
1. Install node modules with pnpm (v8) and Node.js (16+):
```shell
yarn install
pnpm install
```
1. Install the correct version of foundry (defined in the .foundryrc file in the root of this repo.
2. Install the correct version of foundry (defined in the .foundryrc file in the root of this repo.
```shell
yarn install:foundry
pnpm install:foundry
```
### Build
```shell
yarn build
pnpm build
```
### Tests
```shell
yarn test
pnpm test
```
#### Running Echidna tests
......@@ -85,10 +85,10 @@ yarn test
You must have [Echidna](https://github.com/crytic/echidna) installed.
Contracts targetted for Echidna testing are located in `./contracts/echidna`
Each target contract is tested with a separate yarn command, for example:
Each target contract is tested with a separate pnpm command, for example:
```shell
yarn echidna:aliasing
pnpm echidna:aliasing
```
### Deployment
......
......@@ -145,9 +145,9 @@ contract MIPS {
if lt(space, datLen) { datLen := space } // if less space than data, shorten data
if lt(a2, datLen) { datLen := a2 } // if requested to read less, read less
dat := shr(sub(256, mul(datLen, 8)), dat) // right-align data
dat := shl(mul(alignment, 8), dat) // position data to insert into memory word
dat := shl(mul(add(sub(4, datLen), alignment), 8), dat) // position data to insert into memory word
let mask := sub(shl(mul(sub(4, alignment), 8), 1), 1) // mask all bytes after start
let suffixMask := sub(shl(mul(add(sub(4, alignment), datLen), 8), 1), 1) // mask of all bytes starting from end, maybe none
let suffixMask := sub(shl(mul(sub(sub(4, alignment), datLen), 8), 1), 1) // mask of all bytes starting from end, maybe none
mask := and(mask, not(suffixMask)) // reduce mask to just cover the data we insert
mem := or(and(mem, not(mask)), dat) // clear masked part of original memory, and insert data
}
......
......@@ -19,6 +19,8 @@ build_info_path = 'artifacts/build-info'
ffi = true
fuzz_runs = 16
no_match_contract = 'EchidnaFuzz'
# PNPM symlinks all node_modules from the monorepo root
allow_paths = ["../../node_modules", "./**"]
fs_permissions = [
{ 'access'='read-write', 'path'='./.resource-metering.csv' },
......
......@@ -2,7 +2,7 @@
This directory contains documentation for all defined invariant tests within `contracts-bedrock`.
<!-- Do not modify the following section manually. It will be automatically generated on running `yarn autogen:invariant-docs` -->
<!-- Do not modify the following section manually. It will be automatically generated on running `pnpm autogen:invariant-docs` -->
<!-- START autoTOC -->
## Table of Contents
......@@ -23,7 +23,7 @@ This directory contains documentation for all defined invariant tests within `co
## Usage
To auto-generate documentation for invariant tests, run `yarn autogen:invariant-docs`.
To auto-generate documentation for invariant tests, run `pnpm autogen:invariant-docs`.
## Documentation Standard
......
......@@ -10,18 +10,18 @@
],
"scripts": {
"bindings": "cd ../../op-bindings && make",
"build:with-metadata": "FOUNDRY_PROFILE=echidna yarn build:forge",
"build:with-metadata": "FOUNDRY_PROFILE=echidna pnpm build:forge",
"build": "npx nx build:contracts",
"prebuild:contracts": "./scripts/verify-foundry-install.sh",
"build:contracts": "yarn build:forge",
"build:contracts": "pnpm build:forge",
"build:forge": "forge build",
"build:differential": "go build -o ./scripts/differential-testing/differential-testing ./scripts/differential-testing",
"build:fuzz": "(cd test-case-generator && go build ./cmd/fuzz.go)",
"autogen:invariant-docs": "ts-node scripts/invariant-doc-gen.ts",
"test": "yarn build:differential && yarn build:fuzz && forge test",
"coverage": "yarn build:differential && yarn build:fuzz && forge coverage",
"coverage:lcov": "yarn build:differential && yarn build:fuzz && forge coverage --report lcov",
"gas-snapshot": "yarn build:differential && yarn build:fuzz && forge snapshot --no-match-test 'testDiff|testFuzz|invariant|generateArtifact'",
"test": "pnpm build:differential && pnpm build:fuzz && forge test",
"coverage": "pnpm build:differential && pnpm build:fuzz && forge coverage",
"coverage:lcov": "pnpm build:differential && pnpm build:fuzz && forge coverage --report lcov",
"gas-snapshot": "pnpm build:differential && pnpm build:fuzz && forge snapshot --no-match-test 'testDiff|testFuzz|invariant|generateArtifact'",
"storage-snapshot": "./scripts/storage-snapshot.sh",
"validate-deploy-configs": "./scripts/validate-deploy-configs.sh",
"validate-spacers": "forge build && npx ts-node scripts/validate-spacers.ts",
......@@ -30,12 +30,12 @@
"clean": "rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./tsconfig.tsbuildinfo ./tsconfig.build.tsbuildinfo ./src/contract-artifacts.ts ./test-case-generator/fuzz",
"lint:ts:check": "eslint . --max-warnings=0",
"lint:forge-tests:check": "ts-node scripts/forge-test-names.ts",
"lint:contracts:check": "yarn solhint -f table 'contracts/**/!(DisputeTypes).sol' && yarn prettier --check 'contracts/**/!(DisputeTypes).sol' && yarn lint:forge-tests:check",
"lint:check": "yarn lint:contracts:check && yarn lint:ts:check",
"lint:contracts:check": "pnpm solhint -f table 'contracts/**/!(DisputeTypes|RLPReader).sol' && pnpm prettier --check 'contracts/**/!(DisputeTypes|RLPReader).sol' && pnpm lint:forge-tests:check",
"lint:check": "pnpm lint:contracts:check && pnpm lint:ts:check",
"lint:ts:fix": "eslint --fix .",
"lint:contracts:fix": "yarn solhint --fix 'contracts/**/!(DisputeTypes).sol' && yarn prettier --write 'contracts/**/!(DisputeTypes).sol'",
"lint:fix": "yarn lint:contracts:fix && yarn lint:ts:fix",
"lint": "yarn lint:fix && yarn lint:check",
"lint:contracts:fix": "pnpm solhint --fix 'contracts/**/!(DisputeTypes|RLPReader).sol' && pnpm prettier --write 'contracts/**/!(DisputeTypes|RLPReader).sol'",
"lint:fix": "pnpm lint:contracts:fix && pnpm lint:ts:fix",
"lint": "pnpm lint:fix && pnpm lint:check",
"echidna:aliasing": "echidna-test --contract EchidnaFuzzAddressAliasing --config ./echidna.yaml .",
"echidna:burn:gas": "echidna-test --contract EchidnaFuzzBurnGas --config ./echidna.yaml .",
"echidna:burn:eth": "echidna-test --contract EchidnaFuzzBurnEth --config ./echidna.yaml .",
......@@ -48,17 +48,17 @@
"@eth-optimism/core-utils": "^0.12.1",
"@openzeppelin/contracts": "4.7.3",
"@openzeppelin/contracts-upgradeable": "4.7.3",
"@rari-capital/solmate": "https://github.com/rari-capital/solmate.git#8f9b23f8838670afda0fd8983f2c41e8037ae6bc",
"clones-with-immutable-args": "https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args.git#105efee1b9127ed7f6fedf139e1fc796ce8791f2",
"@rari-capital/solmate": "github:transmissions11/solmate#8f9b23f8838670afda0fd8983f2c41e8037ae6bc",
"clones-with-immutable-args": "github:Saw-mon-and-Natalie/clones-with-immutable-args#105efee1b9127ed7f6fedf139e1fc796ce8791f2",
"ethers": "^5.7.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.45.1",
"@typescript-eslint/parser": "^5.45.1",
"ds-test": "https://github.com/dapphub/ds-test.git#9310e879db8ba3ea6d5c6489a579118fd264a3f5",
"forge-std": "https://github.com/foundry-rs/forge-std.git#e8a047e3f40f13fa37af6fe14e6e06283d9a060e",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"ds-test": "github:dapphub/ds-test#c9ce3f25bde29fc5eb9901842bf02850dfd2d084",
"forge-std": "github:foundry-rs/forge-std#e8a047e3f40f13fa37af6fe14e6e06283d9a060e",
"glob": "^7.1.6",
"solhint": "^3.3.7",
"solhint": "^3.4.1",
"solhint-plugin-prettier": "^0.0.5",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
......
pragma solidity ^0.8.15;
import { Script } from "forge-std/Script.sol";
import { console2 as console } from "forge-std/console2.sol";
import { FaultDisputeGame_Init } from "../contracts/test/FaultDisputeGame.t.sol";
import { DisputeGameFactory } from "../contracts/dispute/DisputeGameFactory.sol";
import { FaultDisputeGame } from "../contracts/dispute/FaultDisputeGame.sol";
import { IFaultDisputeGame } from "../contracts/dispute/interfaces/IFaultDisputeGame.sol";
import "../contracts/libraries/DisputeTypes.sol";
import "../contracts/libraries/DisputeErrors.sol";
import { LibClock } from "../contracts/dispute/lib/LibClock.sol";
import { LibPosition } from "../contracts/dispute/lib/LibPosition.sol";
/**
* @title FaultDisputeGameViz
* @dev To run this script, make sure to install the `dagviz` & `eth_abi` python packages.
*/
contract FaultDisputeGameViz is Script, FaultDisputeGame_Init {
/// @dev The root claim of the game.
Claim internal constant ROOT_CLAIM = Claim.wrap(bytes32(uint256(10)));
/// @dev The absolute prestate of the trace.
Claim internal constant ABSOLUTE_PRESTATE = Claim.wrap(bytes32(uint256(0)));
function setUp() public override {
super.init(ROOT_CLAIM, ABSOLUTE_PRESTATE);
}
/**
* @dev Entry point
*/
function local() public {
// Construct the game by performing attacks, defenses, and steps.
// ...
buildGraph();
console.log("Saved graph to `./dispute_game.svg");
}
/**
* @dev Entry point
*/
function remote(address _addr) public {
gameProxy = FaultDisputeGame(_addr);
buildGraph();
console.log("Saved graph to `./dispute_game.svg");
}
/**
* @dev Uses the `dag-viz` python script to generate a visual model of the game state.
*/
function buildGraph() internal {
uint256 numClaims = uint256(vm.load(address(gameProxy), bytes32(uint256(1))));
IFaultDisputeGame.ClaimData[] memory gameData = new IFaultDisputeGame.ClaimData[](numClaims);
for (uint256 i = 0; i < numClaims; i++) {
(
uint32 parentIndex,
bool countered,
Claim claim,
Position position,
Clock clock
) = gameProxy.claimData(i);
gameData[i] = IFaultDisputeGame.ClaimData({
parentIndex: parentIndex,
countered: countered,
claim: claim,
position: position,
clock: clock
});
}
string[] memory commands = new string[](3);
commands[0] = "python3";
commands[1] = "scripts/dag-viz.py";
commands[2] = vm.toString(abi.encode(gameData));
vm.ffi(commands);
}
}
import sys
import dagviz
import networkx as nx
from eth_abi import decode
# The parent of the root claim is uint32 max.
ROOT_PARENT = 4294967295
# Get the abi-encoded input
b = sys.argv[1].removeprefix('0x')
# Decode the input
t = decode(['(uint32,bool,bytes32,uint128,uint128)[]'], bytes.fromhex(b))[0]
# Create the graph
G = nx.DiGraph()
for c in t:
claim = c[2].hex()
key = f"Position: {bin(c[3])[2:]} | Claim: 0x{claim[:4]}..{claim[60:64]}"
G.add_node(key)
if int(c[0]) != ROOT_PARENT:
pclaim = t[c[0]][2].hex()
G.add_edge(f"Position: {bin(t[c[0]][3])[2:]} | Claim: 0x{pclaim[:4]}..{pclaim[60:64]}", key)
r = dagviz.render_svg(G)
f = open('dispute_game.svg', 'w')
f.write(r)
f.close()
......@@ -10,7 +10,7 @@ A lightweight input fuzzing utility used for testing various Bedrock contracts.
## Usage
To build, run `yarn build:fuzz` from this directory or the `contract-bedrock` package.
To build, run `pnpm build:fuzz` from this directory or the `contract-bedrock` package.
To generate an abi-encoded fuzz case, pass in a mode via the `-m` flag as well as an optional variant via the `-v` flag.
......
"*.{ts,js}":
- eslint
"*.sol":
- yarn solhint -f table
- pnpm solhint -f table
......@@ -19,8 +19,9 @@ remappings = [
'multicall/=lib/multicall',
'@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/',
'@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/',
'@eth-optimism/contracts-bedrock/=../../node_modules/@eth-optimism/contracts-bedrock',
'@eth-optimism/contracts-bedrock/=node_modules/@eth-optimism/contracts-bedrock',
]
allow_paths = ["../../node_modules", "./**"]
# The metadata hash can be removed from the bytecode by setting "none"
bytecode_hash = "none"
libs = ["node_modules", "lib"]
......
......@@ -13,29 +13,29 @@
"contracts"
],
"scripts": {
"build": "yarn build:hh",
"build": "pnpm build:hh",
"build:hh": "hardhat compile --show-stack-traces",
"build:forge": "forge build",
"test": "yarn test:forge",
"test": "pnpm test:forge",
"test:forge": "forge test",
"test:coverage": "yarn test:coverage:forge",
"test:coverage": "pnpm test:coverage:forge",
"test:coverage:forge": "forge coverage",
"test:slither": "slither .",
"gas-snapshot": "forge snapshot",
"pretest:slither": "rm -f @openzeppelin && rm -f hardhat && ln -s node_modules/@openzeppelin @openzeppelin && ln -s ../../node_modules/hardhat hardhat",
"posttest:slither": "rm -f @openzeppelin && rm -f hardhat",
"lint:ts:check": "eslint . --max-warnings=0",
"lint:contracts:check": "yarn solhint -f table 'contracts/**/*.sol'",
"lint:check": "yarn lint:contracts:check && yarn lint:ts:check",
"lint:contracts:check": "pnpm solhint -f table 'contracts/**/*.sol'",
"lint:check": "pnpm lint:contracts:check && pnpm lint:ts:check",
"lint:ts:fix": "eslint --fix .",
"lint:contracts:fix": "yarn prettier --write 'contracts/**/*.sol'",
"lint:fix": "yarn lint:contracts:fix && yarn lint:ts:fix",
"lint": "yarn lint:fix && yarn lint:check",
"lint:contracts:fix": "pnpm prettier --write 'contracts/**/*.sol'",
"lint:fix": "pnpm lint:contracts:fix && pnpm lint:ts:fix",
"lint": "pnpm lint:fix && pnpm lint:check",
"clean": "rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./coverage ./tsconfig.tsbuildinfo",
"prepublishOnly": "yarn copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./",
"prepublishOnly": "pnpm copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./",
"postpublish": "rimraf chugsplash L1 L2 libraries standards",
"prepack": "yarn prepublishOnly",
"postpack": "yarn postpublish",
"prepack": "pnpm prepublishOnly",
"postpack": "pnpm postpublish",
"pre-commit": "lint-staged"
},
"keywords": [
......@@ -60,20 +60,18 @@
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^3.0.3",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"@rari-capital/solmate": "7.0.0-alpha.3",
"@openzeppelin/contracts": "4.7.3",
"@openzeppelin/contracts-upgradeable": "4.7.3",
"@types/node": "^17.0.21",
"@rari-capital/solmate": "7.0.0-alpha.3",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@types/node": "^17.0.21",
"babel-eslint": "^10.1.0",
"chai": "^4.3.4",
"copyfiles": "^2.3.0",
"dotenv": "^10.0.0",
"ds-test": "https://github.com/dapphub/ds-test.git#9310e879db8ba3ea6d5c6489a579118fd264a3f5",
"ethereum-waffle": "^3.4.4",
"ethers": "^5.7.0",
"forge-std": "https://github.com/foundry-rs/forge-std.git#e8a047e3f40f13fa37af6fe14e6e06283d9a060e",
"hardhat": "^2.9.6",
"hardhat-deploy": "^0.11.10",
"hardhat-gas-reporter": "^1.0.8",
......@@ -87,5 +85,9 @@
"solidity-coverage": "^0.7.17",
"ts-node": "^10.9.1",
"typechain": "^8.1.0"
},
"dependencies": {
"ds-test": "github:dapphub/ds-test#c9ce3f25bde29fc5eb9901842bf02850dfd2d084",
"forge-std": "github:foundry-rs/forge-std#e8a047e3f40f13fa37af6fe14e6e06283d9a060e"
}
}
......@@ -13,14 +13,14 @@
After cloning and switching to the repository, install dependencies:
```bash
$ yarn
$ pnpm i
```
Use the following commands to build, use, test, and lint:
```bash
$ yarn build
$ yarn start
$ yarn test
$ yarn lint
$ pnpm build
$ pnpm start
$ pnpm test
$ pnpm lint
```
......@@ -8,12 +8,12 @@
"dist/*"
],
"scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"all": "pnpm clean && pnpm build && pnpm test && pnpm lint:fix && pnpm lint",
"build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check",
"lint": "pnpm lint:fix && pnpm lint:check",
"lint:check": "eslint . --max-warnings=0",
"lint:fix": "yarn lint:check --fix",
"lint:fix": "pnpm lint:check --fix",
"pre-commit": "lint-staged",
"test": "ts-mocha test/**/*.spec.ts",
"test:coverage": "nyc ts-mocha test/**/*.spec.ts && nyc merge .nyc_output coverage.json"
......
......@@ -10,8 +10,8 @@ Clone, install, and build the Optimism monorepo:
```
git clone https://github.com/ethereum-optimism/optimism.git
yarn install
yarn build
pnpm install
pnpm build
```
## Running the service
......@@ -22,7 +22,7 @@ a custom op chain, the `OptimismPortal` contract addresses must also be set asso
Once your environment variables or flags have been set, run the service via:
```
yarn start
pnpm start
```
## Ports
......@@ -44,11 +44,10 @@ The state root of the block is published to the [`L2OutputOracle`](https://githu
We can therefore detect differences by, for each block, checking the state root of the given block as reported by an Optimism node and the state root as published to Ethereum.
We export a series of Prometheus metrics that you can use to trigger alerting when issues are detected.
Check the list of available metrics via `yarn start --help`:
Check the list of available metrics via `pnpm start --help`:
```sh
> yarn start --help
yarn run v1.22.19
> pnpm start --help
$ ts-node ./src/service.ts --help
Usage: service [options]
......@@ -71,6 +70,4 @@ Metrics:
l2_node_connection_failures Number of times L2 node connection has failed (type: Gauge)
metadata Service metadata (type: Gauge)
unhandled_errors Unhandled errors (type: Counter)
Done in 2.19s.
```
......@@ -14,11 +14,11 @@
"test": "hardhat test",
"test:coverage": "nyc hardhat test && nyc merge .nyc_output coverage.json",
"build": "tsc -p tsconfig.json",
"preview": "yarn build && yarn start",
"preview": "pnpm build && pnpm start",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check",
"lint": "pnpm lint:fix && pnpm lint:check",
"pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix",
"lint:fix": "pnpm lint:check --fix",
"lint:check": "eslint . --max-warnings=0"
},
"keywords": [
......
......@@ -5,5 +5,5 @@
## Installation
```
yarn add @eth-optimism/hardhat-deploy-config
pnpm i @eth-optimism/hardhat-deploy-config
```
......@@ -11,9 +11,9 @@
"test:coverage": "echo 'No tests defined.'",
"build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check",
"lint": "pnpm lint:fix && pnpm lint:check",
"pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix",
"lint:fix": "pnpm lint:check --fix",
"lint:check": "eslint . --max-warnings=0"
},
"keywords": [
......
......@@ -13,8 +13,8 @@ Clone, install, and build the Optimism monorepo:
```
git clone https://github.com/ethereum-optimism/optimism.git
yarn install
yarn build
pnpm install
pnpm build
```
## Running the service (manual)
......@@ -23,11 +23,11 @@ Copy `.env.example` into a new file named `.env`, then set the environment varia
You can view a list of all environment variables and descriptions for each via:
```
yarn start --help
pnpm start --help
```
Once your environment variables have been set, run the relayer via:
```
yarn start
pnpm start
```
......@@ -13,9 +13,9 @@
"test:coverage": "echo 'No tests defined.'",
"build": "tsc -p tsconfig.json",
"clean": "rimraf ./dist ./tsconfig.tsbuildinfo",
"lint": "yarn run lint:fix && yarn run lint:check",
"lint": "pnpm run lint:fix && pnpm run lint:check",
"pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix",
"lint:fix": "pnpm lint:check --fix",
"lint:check": "eslint . --max-warnings=0"
},
"keywords": [
......
......@@ -9,12 +9,12 @@
"src/*"
],
"scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"all": "pnpm clean && pnpm build && pnpm test && pnpm lint:fix && pnpm lint",
"build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check",
"lint": "pnpm lint:fix && pnpm lint:check",
"lint:check": "eslint . --max-warnings=0",
"lint:fix": "yarn lint:check --fix",
"lint:fix": "pnpm lint:check --fix",
"pre-commit": "lint-staged",
"test": "hardhat test",
"test:next": "vitest",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
packages:
- 'packages/*'
- 'endpoint-monitor'
- 'op-exporter'
......@@ -308,7 +308,7 @@ A reference implementation of the L1 Attributes predeploy contract can be found
[L1Block.sol]: ../packages/contracts-bedrock/contracts/L2/L1Block.sol
After running `yarn build` in the `packages/contracts` directory, the bytecode to add to the genesis
After running `pnpm build` in the `packages/contracts` directory, the bytecode to add to the genesis
file will be located in the `deployedBytecode` field of the build artifacts file at
`/packages/contracts/artifacts/contracts/L2/L1Block.sol/L1Block.json`.
......
......@@ -13,7 +13,7 @@ You can spin up a local devnet via `docker-compose`.
For convenience, we have defined `make` targets to start and stop the devnet with a single command.
To run the devnet, you will need `docker` and `docker-compose` installed.
Then, as a precondition, make sure that you have compiled the contracts by `cd`ing into `packages/contracts`
and running `yarn` followed by `yarn build`. You'll only need to do this if you change the contracts in the future.
and running `pnpm i` followed by `pnpm build`. You'll only need to do this if you change the contracts in the future.
Then, run the following:
......
......@@ -24,10 +24,10 @@ Justification for linting rules in [.markdownlint.json](/.markdownlint.json):
- *no-emphasis-as-heading*: enable emphasized paragraphs
```shell
yarn # Install dependencies
yarn lint:specs:check # Run linter
yarn lint:specs:fix # Fix lint issues
yarn lint:specs:toc # Update TOC docs
pnpm i # Install dependencies
pnpm lint:specs:check # Run linter
pnpm lint:specs:fix # Fix lint issues
pnpm lint:specs:toc # Update TOC docs
# Check links
docker run --init -it -v `pwd`:/input lycheeverse/lychee --verbose --no-progress --exclude-loopback --exclude twitter.com --exclude-mail /input/README.md "/input/specs/**/*.md"
......
......@@ -13,7 +13,7 @@
## Linting
Respect the [linting rules] (you can run the linter with `yarn lint`).
Respect the [linting rules] (you can run the linter with `pnpm lint`).
Notably:
......
# Span-batches
<!-- All glossary references in this file. -->
[g-deposit-tx-type]: glossary.md#deposited-transaction-type
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**
- [Introduction](#introduction)
- [Span batch format](#span-batch-format)
- [Integration](#integration)
- [Channel Reader (Batch Decoding)](#channel-reader-batch-decoding)
- [Batch Queue](#batch-queue)
- [Batcher](#batcher)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
> The span-batches spec is experimental :shipit:
>
> *this feature is in active R&D and not yet part of any hard fork
## Introduction
Span-batches reduce overhead of OP-stack chains.
This enables sparse and low-throughput OP-stack chains.
The overhead is reduced by representing a span of
consecutive L2 blocks in a more efficient manner,
while preserving the same consistency checks as regular batch data.
Note that the [channel](./derivation.md#channel-format) and
[frame](./derivation.md#frame-format) formats stay the same:
data slicing, packing and multi-transaction transport is already optimized.
The overhead in the [V0 batch format](./derivation.md) comes from:
- The meta-data attributes are repeated for every L2 block, while these are mostly implied already:
- parent hash (32 bytes)
- L1 epoch: blockhash (32 bytes) and block number (~4 bytes)
- timestamp (~4 bytes)
- The organization of block data is inefficient:
- Similar attributes are far apart, diminishing any chances of effective compression.
- Random data like hashes are positioned in-between the more compressible application data.
- The RLP encoding of the data adds unnecessary overhead
- The outer list does not have to be length encoded, the attributes are known
- Fixed-length attributes do not need any encoding
- The batch-format is static and can be optimized further
- Remaining meta-data for consistency checks can be optimized further:
- The metadata only needs to be secure for consistency checks. E.g. 20 bytes of a hash may be enough.
Span-batches address these inefficiencies, with a new batch format version.
## Span batch format
Note that span-batches, unlike previous V0 batches,
encode *a range of consecutive* L2 blocks at the same time.
Introduce version `1` to the [batch-format](./derivation.md#batch-format) table:
| `batch_version` | `content` |
|-----------------|---------------------|
| 1 | `prefix ++ payload` |
Notation:
`++`: concatenation of byte-strings.
`anchor`: first L2 block in the span
`uvarint`: unsigned Base128 varint, as defined in [protobuf spec]
[protobuf spec]: https://protobuf.dev/programming-guides/encoding/#varints
Where:
- `prefix = rel_timestamp ++ parent_check ++ l1_origin_check`
- `rel_timestamp`: relative time since genesis, i.e. `anchor.timestamp - config.genesis.timestamp`.
- `parent_check`: first 20 bytes of parent hash, i.e. `anchor.parent_hash[:20]`.
- `l1_origin_check`: to ensure the intended L1 origins of this span of
L2 blocks are consistent with the L1 chain, the blockhash of the last L1 origin is referenced.
The hash is truncated to 20 bytes for efficiency, i.e. `anchor.l1_origin.hash[:20]`.
- `payload = block_count ++ block_tx_counts ++ tx_data_headers ++ tx_data ++ tx_sigs`:
- `block_count`: `uvarint` number of L2 blocks.
- `origin_bits`: bitlist of `block_count` bits, right-padded to a multiple of 8 bits:
1 bit per L2 block, indicating if the L1 origin changed this L2 block.
- `block_tx_counts`: for each block, a `uvarint` of `len(block.transactions)`.
- `tx_data_headers`: lengths of each `tx_data` entry, encodes as concatenated `uvarint` entries, (empty if there are
no entries).
- `tx_data`: [EIP-2718] encoded transactions.
- The `tx_signature` is truncated from each [EIP-2718] encoded tx. To be reconstructed from `tx_sigs`.
- `legacy`: starting at `v` RLP field
- `1` ([EIP-2930]): starting at `signatureYParity` RLP field
- `2` ([EIP-1559]): starting at `signature_y_parity` RLP field
- `tx_sigs`: concatenated list of transaction signatures:
- `v`, or `y_parity`, is encoded as `uvarint` (some legacy transactions combine the chain ID)
- `r` is encoded as big-endian `uint256`
- `s` is encoded as big-endian `uint256`
[EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718
[EIP-2930]: https://eips.ethereum.org/EIPS/eip-2930
[EIP-1559]: https://eips.ethereum.org/EIPS/eip-1559
> **TODO research/experimentation questions:**
>
> - `tx_data` entries may be split up completely and tx attributes could be grouped into individual arrays, similar to
signatures.
> This may add more complexity, but organize data for improved compression.
> - Backtesting: using this format, how are different types of chain history affected? Improved or not? And by what
margin?
## Integration
### Channel Reader (Batch Decoding)
The Channel Reader decodes the span-batch, as described in the [span-batch format](#span-batch-format).
A set of derived attributes is computed, cached with the decoded result:
- `l2_blocks_count`: number of L2 blocks in the span-batch
- `start_timestamp`: `config.genesis.timestamp + batch.rel_timestamp`
- `epoch_end`:
### Batch Queue
A span-batch is buffered as a singular large batch,
by its starting timestamp (transformed `rel_timestamp`).
Span-batches share the same queue with v0 batches: batches are processed in L1 inclusion order.
A set of modified validation rules apply to the span-batches.
Rules are enforced with the [contextual definitions](./derivation.md#batch-queue) as v0-batch validation:
`batch`, `epoch`, `inclusion_block_number`, `next_timestamp`, `next_epoch`, `batch_origin`
Span-batch rules, in validation order:
- `batch.start_timestamp > next_timestamp` -> `future`: i.e. the batch must be ready to process.
- `batch.start_timestamp < next_timestamp` -> `drop`: i.e. the batch must not be too old.
- `batch.parent_check != safe_l2_head.hash[:20]` -> `drop`: i.e. the checked part of the parent hash must be equal
to the L2 safe head block hash.
- Sequencing-window checks:
- Note: The sequencing window is enforced for the *batch as a whole*:
if the batch was partially invalid instead, it would drop the oldest L2 blocks,
which makes the later L2 blocks invalid.
- Variables:
- `origin_changed_bit = origin_bits[0]`: `true` if the first L2 block changed its L1 origin, `false` otherwise.
- `start_epoch_num = safe_l2_head.origin.block_number + (origin_changed_bit ? 1 : 0)`
- `end_epoch_num = safe_l2_head.origin.block_number + sum(origin_bits)`: block number of last referenced L1 origin
- Rules:
- `start_epoch_num + sequence_window_size < inclusion_block_number` -> `drop`:
i.e. the batch must be included timely.
- `end_epoch_num < epoch.number` -> `future`: i.e. all referenced L1 epochs must be there.
- `end_epoch_num == epoch.number`:
- If `batch.l1_origin_check != epoch.hash[:20]` -> `drop`: verify the batch is intended for this L1 chain.
- `end_epoch_num > epoch.number` -> `drop`: must have been duplicate batch,
we may be past this L1 block in the safe L2 chain.
- Max Sequencer time-drift checks:
- Note: The max time-drift is enforced for the *batch as a whole*, to keep the possible output variants small.
- Variables:
- `block_input`: an L2 block from the span-batch,
with L1 origin as derived from the `origin_bits` and now established canonical L1 chain.
- `next_epoch` is relative to the `block_input`,
and may reach to the next origin outside of the L1 origins of the span.
- Rules:
- For each `block_input` that can be read from the span-batch:
- `block_input.timestamp < block_input.origin.time` -> `drop`: enforce the min L2 timestamp rule.
- `block_input.timestamp > block_input.origin.time + max_sequencer_drift`: enforce the L2 timestamp drift rule,
but with exceptions to preserve above min L2 timestamp invariant:
- `len(block_input.transactions) == 0`:
- `epoch.number == batch.epoch_num`:
this implies the batch does not already advance the L1 origin,
and must thus be checked against `next_epoch`.
- If `next_epoch` is not known -> `undecided`:
without the next L1 origin we cannot yet determine if time invariant could have been kept.
- If `batch.timestamp >= next_epoch.time` -> `drop`:
the batch could have adopted the next L1 origin without breaking the `L2 time >= L1 time` invariant.
- `len(batch.transactions) > 0`: -> `drop`:
when exceeding the sequencer time drift, never allow the sequencer to include transactions.
- And for all transactions:
- `drop` if the `batch.transactions` list contains a transaction
that is invalid or derived by other means exclusively:
- any transaction that is empty (zero length `tx_data`)
- any [deposited transactions][g-deposit-tx-type] (identified by the transaction type prefix byte in `tx_data`)
Once validated, the batch-queue then emits a block-input for each of the blocks included in the span-batch.
The next derivation stage is thus only aware of individual block inputs, similar to the previous V0 batch,
although not strictly a "v0 batch" anymore.
### Batcher
Instead of transforming L2 blocks into batches,
the blocks should be buffered to form a span-batch.
Ideally the L2 blocks are buffered as block-inputs, to maximize the span of blocks covered by the span-batch:
span-batches of single L2 blocks do not increase efficiency as much as with larger spans.
This means that the `(c *channelBuilder) AddBlock` function is changed to
not directly call `(co *ChannelOut) AddBatch` but defer that until a minimum number of blocks have been buffered.
Output-size estimation of the queued up blocks is not possible until the span-batch is written to the channel.
Past a given number of blocks, the channel may be written for estimation, and then re-written if more blocks arrive.
The [batcher functionality](./batcher.md) stays the same otherwise: unsafe blocks are transformed into batches,
encoded in compressed channels, and then split into frames for submission to L1.
Batcher implementations can implement different heuristics and re-attempts to build the most gas-efficient data-txs.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment