Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
887323bf
Unverified
Commit
887323bf
authored
Aug 21, 2023
by
mergify[bot]
Committed by
GitHub
Aug 21, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into dependabot/go_modules/github.com/google/uuid-1.3.1
parents
6aa09333
6295ff59
Changes
47
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
1138 additions
and
904 deletions
+1138
-904
mips.go
cannon/mipsevm/mips.go
+126
-103
go.mod
go.mod
+2
-1
go.sum
go.sum
+4
-2
cli.go
indexer/cli/cli.go
+1
-1
docker-compose.yml
indexer/docker-compose.yml
+12
-101
indexer.toml
indexer/indexer.toml
+4
-4
schema.prisma
indexer/ui/schema.prisma
+180
-83
mips.go
op-bindings/bindings/mips.go
+1
-1
mips_more.go
op-bindings/bindings/mips_more.go
+2
-2
main_test.go
op-challenger/cmd/main_test.go
+5
-5
config.go
op-challenger/config/config.go
+7
-6
config_test.go
op-challenger/config/config_test.go
+4
-3
caller.go
op-challenger/fault/caller.go
+11
-36
caller_test.go
op-challenger/fault/caller_test.go
+7
-7
monitor.go
op-challenger/fault/monitor.go
+16
-4
monitor_test.go
op-challenger/fault/monitor_test.go
+5
-5
player.go
op-challenger/fault/player.go
+27
-16
player_test.go
op-challenger/fault/player_test.go
+23
-20
service.go
op-challenger/fault/service.go
+1
-1
game.go
op-challenger/fault/types/game.go
+1
-1
flags.go
op-challenger/flags/flags.go
+22
-16
helper.go
op-e2e/e2eutils/challenger/helper.go
+4
-1
alphabet_helper.go
op-e2e/e2eutils/disputegame/alphabet_helper.go
+3
-1
waits.go
op-e2e/e2eutils/wait/waits.go
+5
-2
geth.go
op-e2e/geth.go
+4
-0
setup.go
op-e2e/setup.go
+1
-1
chains.go
op-node/chaincfg/chains.go
+73
-108
chains_test.go
op-node/chaincfg/chains_test.go
+131
-0
main.go
op-node/cmd/main.go
+2
-2
flags.go
op-node/flags/flags.go
+9
-0
peer_params_test.go
op-node/p2p/peer_params_test.go
+4
-4
superchain.go
op-node/rollup/superchain.go
+96
-0
service.go
op-node/service.go
+5
-1
chaincfg.go
op-program/chainconfig/chaincfg.go
+21
-104
boot_test.go
op-program/client/boot_test.go
+2
-2
engine_test.go
op-program/client/l2/engine_test.go
+1
-1
main_test.go
op-program/host/cmd/main_test.go
+9
-6
config.go
op-program/host/config/config.go
+9
-3
config_test.go
op-program/host/config/config_test.go
+1
-1
host.go
op-program/host/host.go
+1
-1
host_test.go
op-program/host/host_test.go
+1
-1
local_test.go
op-program/host/kvstore/local_test.go
+1
-1
enum.go
op-service/enum/enum.go
+2
-20
enum_test.go
op-service/enum/enum_test.go
+3
-18
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+66
-65
MIPS.sol
packages/contracts-bedrock/src/cannon/MIPS.sol
+197
-137
MIPS.t.sol
packages/contracts-bedrock/test/MIPS.t.sol
+26
-6
No files found.
cannon/mipsevm/mips.go
View file @
887323bf
...
...
@@ -395,87 +395,110 @@ func (m *InstrumentedState) mipsStep() error {
func
execute
(
insn
uint32
,
rs
uint32
,
rt
uint32
,
mem
uint32
)
uint32
{
opcode
:=
insn
>>
26
// 6-bits
fun
:=
insn
&
0x3f
// 6-bits
if
opcode
<
0x20
{
// transform ArithLogI
// TODO(CLI-4136): replace with table
if
opcode
>=
8
&&
opcode
<
0xF
{
switch
opcode
{
case
8
:
fun
=
0x20
// addi
case
9
:
fun
=
0x21
// addiu
case
0xA
:
fun
=
0x2A
// slti
case
0xB
:
fun
=
0x2B
// sltiu
case
0xC
:
fun
=
0x24
// andi
case
0xD
:
fun
=
0x25
// ori
case
0xE
:
fun
=
0x26
// xori
}
opcode
=
0
if
opcode
==
0
||
(
opcode
>=
8
&&
opcode
<
0xF
)
{
fun
:=
insn
&
0x3f
// 6-bits
// transform ArithLogI to SPECIAL
switch
opcode
{
case
8
:
fun
=
0x20
// addi
case
9
:
fun
=
0x21
// addiu
case
0xA
:
fun
=
0x2A
// slti
case
0xB
:
fun
=
0x2B
// sltiu
case
0xC
:
fun
=
0x24
// andi
case
0xD
:
fun
=
0x25
// ori
case
0xE
:
fun
=
0x26
// xori
}
// 0 is opcode SPECIAL
if
opcode
==
0
{
switch
fun
{
case
0x00
:
// sll
return
rt
<<
((
insn
>>
6
)
&
0x1F
)
case
0x02
:
// srl
return
rt
>>
((
insn
>>
6
)
&
0x1F
)
case
0x03
:
// sra
shamt
:=
(
insn
>>
6
)
&
0x1F
if
fun
<
0x20
{
switch
{
case
fun
>=
0x08
:
return
rs
// jr/jalr/div + others
case
fun
==
0x00
:
return
rt
<<
shamt
// sll
case
fun
==
0x02
:
return
rt
>>
shamt
// srl
case
fun
==
0x03
:
return
SE
(
rt
>>
shamt
,
32
-
shamt
)
// sra
case
fun
==
0x04
:
return
rt
<<
(
rs
&
0x1F
)
// sllv
case
fun
==
0x06
:
return
rt
>>
(
rs
&
0x1F
)
// srlv
case
fun
==
0x07
:
return
SE
(
rt
>>
rs
,
32
-
rs
)
// srav
}
return
SE
(
rt
>>
shamt
,
32
-
shamt
)
case
0x04
:
// sllv
return
rt
<<
(
rs
&
0x1F
)
case
0x06
:
// srlv
return
rt
>>
(
rs
&
0x1F
)
case
0x07
:
// srav
return
SE
(
rt
>>
rs
,
32
-
rs
)
// functs in range [0x8, 0x1b] are handled specially by other functions
case
0x08
:
// jr
return
rs
case
0x09
:
// jalr
return
rs
case
0x0a
:
// movz
return
rs
case
0x0b
:
// movn
return
rs
case
0x0c
:
// syscall
return
rs
// 0x0d - break not supported
case
0x0f
:
// sync
return
rs
case
0x10
:
// mfhi
return
rs
case
0x11
:
// mthi
return
rs
case
0x12
:
// mflo
return
rs
case
0x13
:
// mtlo
return
rs
case
0x18
:
// mult
return
rs
case
0x19
:
// multu
return
rs
case
0x1a
:
// div
return
rs
case
0x1b
:
// divu
return
rs
// The rest includes transformed R-type arith imm instructions
case
0x20
:
// add
return
rs
+
rt
case
0x21
:
// addu
return
rs
+
rt
case
0x22
:
// sub
return
rs
-
rt
case
0x23
:
// subu
return
rs
-
rt
case
0x24
:
// and
return
rs
&
rt
case
0x25
:
// or
return
rs
|
rt
case
0x26
:
// xor
return
rs
^
rt
case
0x27
:
// nor
return
^
(
rs
|
rt
)
case
0x2a
:
// slti
if
int32
(
rs
)
<
int32
(
rt
)
{
return
1
}
// 0x10-0x13 = mfhi, mthi, mflo, mtlo
// R-type (ArithLog)
switch
fun
{
case
0x20
,
0x21
:
return
rs
+
rt
// add or addu
case
0x22
,
0x23
:
return
rs
-
rt
// sub or subu
case
0x24
:
return
rs
&
rt
// and
case
0x25
:
return
rs
|
rt
// or
case
0x26
:
return
rs
^
rt
// xor
case
0x27
:
return
^
(
rs
|
rt
)
// nor
case
0x2A
:
if
int32
(
rs
)
<
int32
(
rt
)
{
return
1
// slt
}
else
{
return
0
}
case
0x2B
:
if
rs
<
rt
{
return
1
// sltu
}
else
{
return
0
}
return
0
case
0x2b
:
// sltiu
if
rs
<
rt
{
return
1
}
}
else
if
opcode
==
0xF
{
return
rt
<<
16
// lui
}
else
if
opcode
==
0x1C
{
// SPECIAL2
if
fun
==
2
{
// mul
return
0
default
:
panic
(
"invalid instruction"
)
}
}
else
{
switch
opcode
{
// SPECIAL2
case
0x1C
:
fun
:=
insn
&
0x3f
// 6-bits
switch
fun
{
case
0x2
:
// mul
return
uint32
(
int32
(
rs
)
*
int32
(
rt
))
}
if
fun
==
0x20
||
fun
==
0x21
{
// clo
case
0x20
,
0x21
:
// clo
if
fun
==
0x20
{
rs
=
^
rs
}
...
...
@@ -485,9 +508,8 @@ func execute(insn uint32, rs uint32, rt uint32, mem uint32) uint32 {
}
return
i
}
}
}
else
if
opcode
<
0x28
{
switch
opcode
{
case
0x0F
:
// lui
return
rt
<<
16
case
0x20
:
// lb
return
SE
((
mem
>>
(
24
-
(
rs
&
3
)
*
8
))
&
0xFF
,
8
)
case
0x21
:
// lh
...
...
@@ -500,37 +522,38 @@ func execute(insn uint32, rs uint32, rt uint32, mem uint32) uint32 {
return
mem
case
0x24
:
// lbu
return
(
mem
>>
(
24
-
(
rs
&
3
)
*
8
))
&
0xFF
case
0x25
:
// lhu
case
0x25
:
//
lhu
return
(
mem
>>
(
16
-
(
rs
&
2
)
*
8
))
&
0xFFFF
case
0x26
:
// lwr
case
0x26
:
//
lwr
val
:=
mem
>>
(
24
-
(
rs
&
3
)
*
8
)
mask
:=
uint32
(
0xFFFFFFFF
)
>>
(
24
-
(
rs
&
3
)
*
8
)
return
(
rt
&
^
mask
)
|
val
case
0x28
:
// sb
val
:=
(
rt
&
0xFF
)
<<
(
24
-
(
rs
&
3
)
*
8
)
mask
:=
0xFFFFFFFF
^
uint32
(
0xFF
<<
(
24
-
(
rs
&
3
)
*
8
))
return
(
mem
&
mask
)
|
val
case
0x29
:
// sh
val
:=
(
rt
&
0xFFFF
)
<<
(
16
-
(
rs
&
2
)
*
8
)
mask
:=
0xFFFFFFFF
^
uint32
(
0xFFFF
<<
(
16
-
(
rs
&
2
)
*
8
))
return
(
mem
&
mask
)
|
val
case
0x2a
:
// swl
val
:=
rt
>>
((
rs
&
3
)
*
8
)
mask
:=
uint32
(
0xFFFFFFFF
)
>>
((
rs
&
3
)
*
8
)
return
(
mem
&
^
mask
)
|
val
case
0x2b
:
// sw
return
rt
case
0x2e
:
// swr
val
:=
rt
<<
(
24
-
(
rs
&
3
)
*
8
)
mask
:=
uint32
(
0xFFFFFFFF
)
<<
(
24
-
(
rs
&
3
)
*
8
)
return
(
mem
&
^
mask
)
|
val
case
0x30
:
// ll
return
mem
case
0x38
:
// sc
return
rt
default
:
panic
(
"invalid instruction"
)
}
}
else
if
opcode
==
0x28
{
// sb
val
:=
(
rt
&
0xFF
)
<<
(
24
-
(
rs
&
3
)
*
8
)
mask
:=
0xFFFFFFFF
^
uint32
(
0xFF
<<
(
24
-
(
rs
&
3
)
*
8
))
return
(
mem
&
mask
)
|
val
}
else
if
opcode
==
0x29
{
// sh
val
:=
(
rt
&
0xFFFF
)
<<
(
16
-
(
rs
&
2
)
*
8
)
mask
:=
0xFFFFFFFF
^
uint32
(
0xFFFF
<<
(
16
-
(
rs
&
2
)
*
8
))
return
(
mem
&
mask
)
|
val
}
else
if
opcode
==
0x2a
{
// swl
val
:=
rt
>>
((
rs
&
3
)
*
8
)
mask
:=
uint32
(
0xFFFFFFFF
)
>>
((
rs
&
3
)
*
8
)
return
(
mem
&
^
mask
)
|
val
}
else
if
opcode
==
0x2b
{
// sw
return
rt
}
else
if
opcode
==
0x2e
{
// swr
val
:=
rt
<<
(
24
-
(
rs
&
3
)
*
8
)
mask
:=
uint32
(
0xFFFFFFFF
)
<<
(
24
-
(
rs
&
3
)
*
8
)
return
(
mem
&
^
mask
)
|
val
}
else
if
opcode
==
0x30
{
return
mem
// ll
}
else
if
opcode
==
0x38
{
return
rt
// sc
}
panic
(
"invalid instruction"
)
}
...
...
go.mod
View file @
887323bf
...
...
@@ -8,6 +8,7 @@ require (
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230817174831-5d3ca1966435
github.com/ethereum/go-ethereum v1.12.0
github.com/fsnotify/fsnotify v1.6.0
github.com/go-chi/chi/v5 v5.0.10
...
...
@@ -207,6 +208,6 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)
replace github.com/ethereum/go-ethereum v1.12.0 => github.com/ethereum-optimism/op-geth v1.101
106.1-0.20230724181546-b9c6d36ae9b8
replace github.com/ethereum/go-ethereum v1.12.0 => github.com/ethereum-optimism/op-geth v1.101
200.0-rc.1.0.20230818191139-f7376a28049b
//replace github.com/ethereum/go-ethereum v1.12.0 => ../go-ethereum
go.sum
View file @
887323bf
...
...
@@ -162,8 +162,10 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs=
github.com/ethereum-optimism/op-geth v1.101106.1-0.20230724181546-b9c6d36ae9b8 h1:Kr4nvrI5WHLtjLiuuVGXMBfPX2Yeo3HdUWW8iXRH6oA=
github.com/ethereum-optimism/op-geth v1.101106.1-0.20230724181546-b9c6d36ae9b8/go.mod h1:G224y5tCMfjaCqIrTu2Svcz13CbVjHIVZjuoacCvJ1w=
github.com/ethereum-optimism/op-geth v1.101200.0-rc.1.0.20230818191139-f7376a28049b h1:YF2FE/QnbhvrHwDYJHnbTKgJvw2aKwB/dd7PO1zKNqY=
github.com/ethereum-optimism/op-geth v1.101200.0-rc.1.0.20230818191139-f7376a28049b/go.mod h1:gRnPb21PoKcHm3kHqj9BQlQkwmhOGUvQoGEbC7z852Q=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230817174831-5d3ca1966435 h1:2CzkJkkTLuVyoVFkoW5w6vDB2Q7eJzxXw/ybA17xjqM=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230817174831-5d3ca1966435/go.mod h1:v2YpePbdGBF0Gr6VWq49MFFmcTW0kRYZ2ingBJYWEwg=
github.com/ethereum/c-kzg-4844 v0.2.0 h1:+cUvymlnoDDQgMInp25Bo3OmLajmmY8mLJ/tLjqd77Q=
github.com/ethereum/c-kzg-4844 v0.2.0/go.mod h1:WI2Nd82DMZAAZI1wV2neKGost9EKjvbpQR9OqE5Qqa8=
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
...
...
indexer/cli/cli.go
View file @
887323bf
...
...
@@ -105,7 +105,7 @@ func NewCli(GitVersion string, GitCommit string, GitDate string) *Cli {
Action
:
runApi
,
},
{
Name
:
"index
er
"
,
Name
:
"index"
,
Flags
:
flags
,
Description
:
"Runs the indexing service"
,
Action
:
runIndexer
,
...
...
indexer/docker-compose.yml
View file @
887323bf
...
...
@@ -20,22 +20,14 @@ services:
indexer
:
build
:
context
:
..
dockerfile
:
indexer/Dockerfile.refresh
command
:
[
"
indexer-refresh"
,
"
processor"
]
# healthcheck:
# Add healthcheck once figure out good way how
# maybe after we add metrics?
ports
:
-
8080:8080
dockerfile
:
indexer/Dockerfile
command
:
[
"
indexer"
,
"
index"
]
environment
:
-
INDEXER_DB_PORT=5432
-
INDEXER_DB_USER=db_username
-
INDEXER_DB_PASSWORD=db_password
-
INDEXER_DB_NAME=db_name
-
INDEXER_DB_HOST=postgres
-
INDEXER_CONFIG=/configs/indexer.toml
-
INDEXER_RPC_URL_L1=$INDEXER_RPC_URL_L1
-
INDEXER_RPC_URL_L2=$INDEXER_RPC_URL_L2
-
INDEXER_CONFIG=/indexer/indexer.toml
volumes
:
-
./indexer.toml:/
configs
/indexer.toml
-
./indexer.toml:/
indexer
/indexer.toml
depends_on
:
postgres
:
condition
:
service_healthy
...
...
@@ -44,27 +36,17 @@ services:
build
:
context
:
..
dockerfile
:
indexer/Dockerfile
command
:
[
"
indexer"
,
"
api"
]
healthcheck
:
test
:
wget localhost:8080/healthz -q -O - > /dev/null 2>&1
environment
:
# Note that you must index goerli with INDEXER_BEDROCK=false first, then
# reindex with INDEXER_BEDROCK=true or seed the database
-
INDEXER_BEDROCK=${INDEXER_BEDROCK_GOERLI:-true}
-
INDEXER_BUILD_ENV=${INDEXER_BUILD_ENV:-development}
-
INDEXER_DB_PORT=${INDEXER_DB_PORT:-5432}
-
INDEXER_DB_USER=${INDEXER_DB_USER:-db_username}
-
INDEXER_DB_PASSWORD=${INDEXER_DB_PASSWORD:-db_password}
-
INDEXER_DB_NAME=${INDEXER_DB_NAME:-db_name}
-
INDEXER_DB_HOST=${INDEXER_DB_HOST:-postgres}
-
INDEXER_CHAIN_ID=${INDEXER_CHAIN_ID:-5}
-
INDEXER_L1_ETH_RPC=$INDEXER_L1_ETH_RPC
-
INDEXER_L2_ETH_RPC=$INDEXER_L2_ETH_RPC
-
INDEXER_REST_HOSTNAME=0.0.0.0
-
INDEXER_REST_PORT=8080
-
INDEXER_BEDROCK_L1_STANDARD_BRIDGE=0
-
INDEXER_BEDROCK_L1_STANDARD_BRIDGE=${INDEXER_BEDROCK_L1_STANDARD_BRIDGE:-0x636Af16bf2f682dD3109e60102b8E1A089FedAa8}
-
INDEXER_BEDROCK_OPTIMISM_PORTAL=${INDEXER_BEDROCK_OPTIMISM_PORTAL:-0xB7040fd32359688346A3D1395a42114cf8E3b9b2}
-
INDEXER_L1_ADDRESS_MANAGER_ADDRESS=${INDEXER_L1_ADDRESS_MANAGER_ADDRESS:-0xdE1FCfB0851916CA5101820A69b13a4E276bd81F}
-
INDEXER_RPC_URL_L1=$INDEXER_RPC_URL_L1
-
INDEXER_RPC_URL_L2=$INDEXER_RPC_URL_L2
-
INDEXER_CONFIG=/indexer/indexer.toml
volumes
:
-
./indexer.toml:/indexer/indexer.toml
ports
:
-
8080:8080
depends_on
:
...
...
@@ -99,77 +81,6 @@ services:
postgres
:
condition
:
service_healthy
gateway-frontend
:
command
:
pnpm nx start @gateway/frontend --host 0.0.0.0 --port
5173
# Change tag to `latest` after https://github.com/ethereum-optimism/gateway/pull/2541 merges
image
:
ethereumoptimism/gateway-frontend:latest
ports
:
-
5173:5173
healthcheck
:
test
:
curl http://0.0.0.0:5173
environment
:
-
VITE_GROWTHBOOK=${VITE_GROWTHBOOK:-https://cdn.growthbook.io/api/features/dev_iGoAbSwtGOtEJONeHdVTosV0BD3TvTPttAccGyRxqsk}
-
VITE_ENABLE_DEVNET=true
-
VITE_RPC_URL_ETHEREUM_MAINNET=$VITE_RPC_URL_ETHEREUM_MAINNET
-
VITE_RPC_URL_ETHEREUM_OPTIMISM_MAINNET=$VITE_RPC_URL_OPTIMISM_MAINNET
-
VITE_RPC_URL_ETHEREUM_GOERLI=$VITE_RPC_URL_ETHEREUM_GOERLI
-
VITE_RPC_URL_ETHEREUM_OPTIMISM_GOERLI=$VITE_RPC_URL_OPTIMISM_GOERLI
-
VITE_BACKEND_URL_MAINNET=http://localhost:7421
-
VITE_BACKEND_URL_GOERLI=http://localhost:7422
-
VITE_ENABLE_ALL_FEATURES=true
backend-mainnet
:
image
:
ethereumoptimism/gateway-backend:latest
environment
:
# this enables the backend to proxy history requests to the indexer
-
BRIDGE_INDEXER_URI=http://api
-
HOST=0.0.0.0
-
PORT=7300
-
MIGRATE_APP_DB_USER=${MIGRATE_APP_DB_USER:-postgres}
-
MIGRATE_APP_DB_PASSWORD=${MIGRATE_APP_DB_PASSWORD:-db_password}
-
APP_DB_HOST=${APP_DB_HOST:-postgres-app}
-
APP_DB_USER=${APP_DB_USER:-gateway-backend-mainnet@oplabs-local-web.iam}
-
APP_DB_NAME=${APP_DB_NAME:-gateway}
-
APP_DB_PORT=${APP_DB_PORT:-5432}
# THis is for the legacy indexer which won't be used but the env variable is still required
-
INDEXER_DB_HOST=postgres-mainnet
# THis is for the legacy indexer which won't be used but the env variable is still required
-
INDEXER_DB_USER=db_username
# THis is for the legacy indexer which won't be used but the env variable is still required
-
INDEXER_DB_PASS=db_password
# THis is for the legacy indexer which won't be used but the env variable is still required
-
INDEXER_DB_NAME=db_name
# THis is for the legacy indexer which won't be used but the env variable is still required
-
INDEXER_DB_PORT=5432
# THis is for the legacy indexer which won't be used but the env variable is still required
-
DATABASE_URL=postgres://db_username:db_password@postgres-mainnet:5432/db_name
-
JSON_RPC_URLS_L1=$JSON_RPC_URLS_L1_MAINNET
-
JSON_RPC_URLS_L2=$JSON_RPC_URLS_L2_MAINNET
-
JSON_RPC_URLS_L2_GOERLI=$JSON_RPC_URLS_L2_GOERLI
# anvil[0] privater key as placeholder
-
FAUCET_AUTH_ADMIN_WALLET_PRIVATE_KEY=${$FAUCET_AUTH_ADMIN_WALLET_PRIVATE_KEY:-0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80}
-
IRON_SESSION_SECRET=${IRON_SESSION_SECRET:-UNKNOWN_IRON_SESSION_PASSWORD_32}
-
CHAIN_ID_L1=1
-
CHAIN_ID_L2=10
-
FLEEK_BUCKET_ADDRESS=34a609661-6774-441f-9fdb-453fdbb89931-bucket
-
FLEEK_API_SECRET=$FLEEK_API_SECRET
-
FLEEK_API_KEY=$FLEEK_API_KEY
-
MOCK_MERKLE_PROOF=true
-
LOOP_INTERVAL_MINUTES=.1
-
GITHUB_CLIENT_ID=$GITHUB_CLIENT_ID
-
GITHUB_SECRET=$GITHUB_SECRET
-
MAINNET_BEDROCK=$MAINNET_BEDROCK
-
TRM_API_KEY=$TRM_API_KEY
-
GOOGLE_CLOUD_STORAGE_BUCKET_NAME=oplabs-dev-web-content
# Recommened to uncomment for local dev unless you need it
#- BYPASS_EVENT_LOG_POLLER_BOOTSTRAP=true
ports
:
-
7421:7300
# overrides command in Dockerfile so we can hot reload the server in docker while developing
#command: ['pnpm', 'nx', 'run', '@gateway/backend:docker:watch']
healthcheck
:
test
:
curl http://0.0.0.0:7300/api/v0/healthz
backend-goerli
:
image
:
ethereumoptimism/gateway-backend:latest
environment
:
...
...
indexer/indexer.toml
View file @
887323bf
...
...
@@ -9,11 +9,11 @@ l1-rpc = "${INDEXER_RPC_URL_L1}"
l2-rpc
=
"${INDEXER_RPC_URL_L2}"
[db]
host
=
"
127.0.0.1
"
host
=
"
postgres
"
port
=
5432
user
=
"
postgres
"
password
=
"
postgres
"
name
=
"
indexer
"
user
=
"
db_username
"
password
=
"
db_password
"
name
=
"
db_name
"
[api]
host
=
"127.0.0.1"
...
...
indexer/ui/schema.prisma
View file @
887323bf
...
...
@@ -7,103 +7,200 @@ datasource db {
url
=
env
(
"DATABASE_URL"
)
}
model
airdrops
{
address
String
@
id
@
db
.
VarChar
(
42
)
voter_amount
String
@
default
(
"0"
)
@
db
.
VarChar
multisig_signer_amount
String
@
default
(
"0"
)
@
db
.
VarChar
gitcoin_amount
String
@
default
(
"0"
)
@
db
.
VarChar
active_bridged_amount
String
@
default
(
"0"
)
@
db
.
VarChar
op_user_amount
String
@
default
(
"0"
)
@
db
.
VarChar
op_repeat_user_amount
String
@
default
(
"0"
)
@
db
.
VarChar
op_og_amount
String
@
default
(
"0"
)
@
db
.
VarChar
bonus_amount
String
@
default
(
"0"
)
@
db
.
VarChar
total_amount
String
@
db
.
VarChar
model
l1_tokens
{
address
String
@
id
@
db
.
VarChar
bridge_address
String
@
db
.
VarChar
l2_token_address
String
@
db
.
VarChar
name
String
@
db
.
VarChar
symbol
String
@
db
.
VarChar
decimals
Int
l2_tokens
l2_tokens
[]
}
model
deposits
{
guid
String
@
id
@
db
.
VarChar
from_address
String
@
db
.
VarChar
to_address
String
@
db
.
VarChar
l1_token
String
@
db
.
VarChar
l2_token
String
@
db
.
VarChar
amount
String
@
db
.
VarChar
data
Bytes
log_index
Int
block_hash
String
@
db
.
VarChar
tx_hash
String
@
db
.
VarChar
l1_blocks
l1_blocks
@
relation
(
fields
:
[
block_hash
],
references
:
[
hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l1_tokens
l1_tokens
@
relation
(
fields
:
[
l1_token
],
references
:
[
address
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
model
l2_tokens
{
address
String
@
id
@
db
.
VarChar
bridge_address
String
@
db
.
VarChar
l1_token_address
String
?
@
db
.
VarChar
name
String
@
db
.
VarChar
symbol
String
@
db
.
VarChar
decimals
Int
l1_tokens
l1_tokens
?
@
relation
(
fields
:
[
l1_token_address
],
references
:
[
address
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
}
model
l1_blocks
{
hash
String
@
id
@
db
.
VarChar
parent_hash
String
@
db
.
VarChar
number
Int
@
unique
(
map
:
"l1_blocks_number"
)
timestamp
Int
deposits
deposits
[]
state_batches
state_batches
[]
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l1_block_headers
{
hash
String
@
id
@
db
.
VarChar
parent_hash
String
@
db
.
VarChar
number
Decimal
@
db
.
Decimal
timestamp
Int
rlp_bytes
String
@
db
.
VarChar
l1_contract_events
l1_contract_events
[]
}
model
l1_tokens
{
address
String
@
id
@
db
.
VarChar
name
String
@
db
.
VarChar
symbol
String
@
db
.
VarChar
decimals
Int
deposits
deposits
[]
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l1_bridge_deposits
{
transaction_source_hash
String
@
id
@
db
.
VarChar
cross_domain_message_hash
String
?
@
unique
@
db
.
VarChar
from_address
String
@
db
.
VarChar
to_address
String
@
db
.
VarChar
local_token_address
String
@
db
.
VarChar
remote_token_address
String
@
db
.
VarChar
amount
Decimal
@
db
.
Decimal
data
String
@
db
.
VarChar
timestamp
Int
l1_bridge_messages
l1_bridge_messages
?
@
relation
(
fields
:
[
cross_domain_message_hash
],
references
:
[
message_hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l1_transaction_deposits
l1_transaction_deposits
@
relation
(
fields
:
[
transaction_source_hash
],
references
:
[
source_hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
}
model
l2_blocks
{
hash
String
@
id
@
db
.
VarChar
parent_hash
String
@
db
.
VarChar
number
Int
@
unique
(
map
:
"l2_blocks_number"
)
timestamp
Int
withdrawals
withdrawals
[]
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l1_bridge_messages
{
message_hash
String
@
id
@
db
.
VarChar
nonce
Decimal
@
unique
@
db
.
Decimal
transaction_source_hash
String
@
unique
@
db
.
VarChar
sent_message_event_guid
String
@
unique
@
db
.
VarChar
relayed_message_event_guid
String
?
@
unique
@
db
.
VarChar
from_address
String
@
db
.
VarChar
to_address
String
@
db
.
VarChar
amount
Decimal
@
db
.
Decimal
gas_limit
Decimal
@
db
.
Decimal
data
String
@
db
.
VarChar
timestamp
Int
l1_bridge_deposits
l1_bridge_deposits
?
l2_contract_events
l2_contract_events
?
@
relation
(
fields
:
[
relayed_message_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l1_contract_events
l1_contract_events
@
relation
(
fields
:
[
sent_message_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l1_transaction_deposits
l1_transaction_deposits
@
relation
(
fields
:
[
transaction_source_hash
],
references
:
[
source_hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
}
model
l2_tokens
{
address
String
@
id
name
String
symbol
String
decimals
Int
withdrawals
withdrawals
[]
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l1_contract_events
{
guid
String
@
id
@
db
.
VarChar
block_hash
String
@
db
.
VarChar
contract_address
String
@
db
.
VarChar
transaction_hash
String
@
db
.
VarChar
log_index
Int
event_signature
String
@
db
.
VarChar
timestamp
Int
rlp_bytes
String
@
db
.
VarChar
l1_bridge_messages
l1_bridge_messages
?
l1_block_headers
l1_block_headers
@
relation
(
fields
:
[
block_hash
],
references
:
[
hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l1_transaction_deposits
l1_transaction_deposits
[]
l2_bridge_messages
l2_bridge_messages
?
l2_transaction_withdrawals_l2_transaction_withdrawals_finalized_l1_event_guidTol1_contract_events
l2_transaction_withdrawals
[]
@
relation
(
"l2_transaction_withdrawals_finalized_l1_event_guidTol1_contract_events"
)
l2_transaction_withdrawals_l2_transaction_withdrawals_proven_l1_event_guidTol1_contract_events
l2_transaction_withdrawals
[]
@
relation
(
"l2_transaction_withdrawals_proven_l1_event_guidTol1_contract_events"
)
legacy_state_batches
legacy_state_batches
[]
output_proposals
output_proposals
[]
}
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l1_transaction_deposits
{
source_hash
String
@
id
@
db
.
VarChar
l2_transaction_hash
String
@
db
.
VarChar
initiated_l1_event_guid
String
@
db
.
VarChar
from_address
String
@
db
.
VarChar
to_address
String
@
db
.
VarChar
amount
Decimal
@
db
.
Decimal
gas_limit
Decimal
@
db
.
Decimal
data
String
@
db
.
VarChar
timestamp
Int
l1_bridge_deposits
l1_bridge_deposits
?
l1_bridge_messages
l1_bridge_messages
?
l1_contract_events
l1_contract_events
@
relation
(
fields
:
[
initiated_l1_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
}
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l2_block_headers
{
hash
String
@
id
@
db
.
VarChar
parent_hash
String
@
db
.
VarChar
number
Decimal
@
db
.
Decimal
timestamp
Int
rlp_bytes
String
@
db
.
VarChar
l2_contract_events
l2_contract_events
[]
}
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l2_bridge_messages
{
message_hash
String
@
id
@
db
.
VarChar
nonce
Decimal
@
unique
@
db
.
Decimal
transaction_withdrawal_hash
String
@
unique
@
db
.
VarChar
sent_message_event_guid
String
@
unique
@
db
.
VarChar
relayed_message_event_guid
String
?
@
unique
@
db
.
VarChar
from_address
String
@
db
.
VarChar
to_address
String
@
db
.
VarChar
amount
Decimal
@
db
.
Decimal
gas_limit
Decimal
@
db
.
Decimal
data
String
@
db
.
VarChar
timestamp
Int
l1_contract_events
l1_contract_events
?
@
relation
(
fields
:
[
relayed_message_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l2_contract_events
l2_contract_events
@
relation
(
fields
:
[
sent_message_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l2_transaction_withdrawals
l2_transaction_withdrawals
@
relation
(
fields
:
[
transaction_withdrawal_hash
],
references
:
[
withdrawal_hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l2_bridge_withdrawals
l2_bridge_withdrawals
?
}
model
state_batches
{
index
Int
@
id
root
String
@
db
.
VarChar
size
Int
prev_total
Int
extra_data
Bytes
block_hash
String
@
db
.
VarChar
l1_blocks
l1_blocks
@
relation
(
fields
:
[
block_hash
],
references
:
[
hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
withdrawals
withdrawals
[]
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l2_bridge_withdrawals
{
transaction_withdrawal_hash
String
@
id
@
db
.
VarChar
cross_domain_message_hash
String
?
@
unique
@
db
.
VarChar
from_address
String
@
db
.
VarChar
to_address
String
@
db
.
VarChar
local_token_address
String
@
db
.
VarChar
remote_token_address
String
@
db
.
VarChar
amount
Decimal
@
db
.
Decimal
data
String
@
db
.
VarChar
timestamp
Int
l2_bridge_messages
l2_bridge_messages
?
@
relation
(
fields
:
[
cross_domain_message_hash
],
references
:
[
message_hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l2_transaction_withdrawals
l2_transaction_withdrawals
@
relation
(
fields
:
[
transaction_withdrawal_hash
],
references
:
[
withdrawal_hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
}
@@
index
([
block_hash
],
map
:
"state_batches_block_hash"
)
@@
index
([
prev_total
],
map
:
"state_batches_prev_total"
)
@@
index
([
size
],
map
:
"state_batches_size"
)
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l2_contract_events
{
guid
String
@
id
@
db
.
VarChar
block_hash
String
@
db
.
VarChar
contract_address
String
@
db
.
VarChar
transaction_hash
String
@
db
.
VarChar
log_index
Int
event_signature
String
@
db
.
VarChar
timestamp
Int
rlp_bytes
String
@
db
.
VarChar
l1_bridge_messages
l1_bridge_messages
?
l2_bridge_messages
l2_bridge_messages
?
l2_block_headers
l2_block_headers
@
relation
(
fields
:
[
block_hash
],
references
:
[
hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l2_transaction_withdrawals
l2_transaction_withdrawals
[]
}
model
withdrawals
{
guid
String
@
id
@
db
.
VarChar
from_address
String
@
db
.
VarChar
to_address
String
@
db
.
VarChar
l1_token
String
@
db
.
VarChar
l2_token
String
@
db
.
VarChar
amount
String
@
db
.
VarChar
data
Bytes
log_index
Int
block_hash
String
@
db
.
VarChar
tx_hash
String
@
db
.
VarChar
state_batch
Int
?
br_withdrawal_hash
String
?
@
db
.
VarChar
br_withdrawal_proven_tx_hash
String
?
@
db
.
VarChar
br_withdrawal_proven_log_index
Int
?
br_withdrawal_finalized_tx_hash
String
?
@
db
.
VarChar
br_withdrawal_finalized_log_index
Int
?
br_withdrawal_finalized_success
Boolean
?
l2_blocks
l2_blocks
@
relation
(
fields
:
[
block_hash
],
references
:
[
hash
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
,
map
:
"l2"
)
l2_tokens
l2_tokens
@
relation
(
fields
:
[
l2_token
],
references
:
[
address
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
state_batches
state_batches
?
@
relation
(
fields
:
[
state_batch
],
references
:
[
index
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
///
This
table
contains
check
constraints
and
requires
additional
setup
for
migrations
.
Visit
https
://
pris
.
ly
/
d
/
check
-
constraints
for
more
info
.
model
l2_transaction_withdrawals
{
withdrawal_hash
String
@
id
@
db
.
VarChar
initiated_l2_event_guid
String
@
db
.
VarChar
proven_l1_event_guid
String
?
@
db
.
VarChar
finalized_l1_event_guid
String
?
@
db
.
VarChar
succeeded
Boolean
?
nonce
Decimal
?
@
unique
@
db
.
Decimal
from_address
String
@
db
.
VarChar
to_address
String
@
db
.
VarChar
amount
Decimal
@
db
.
Decimal
gas_limit
Decimal
@
db
.
Decimal
data
String
@
db
.
VarChar
timestamp
Int
l2_bridge_messages
l2_bridge_messages
?
l2_bridge_withdrawals
l2_bridge_withdrawals
?
l1_contract_events_l2_transaction_withdrawals_finalized_l1_event_guidTol1_contract_events
l1_contract_events
?
@
relation
(
"l2_transaction_withdrawals_finalized_l1_event_guidTol1_contract_events"
,
fields
:
[
finalized_l1_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l2_contract_events
l2_contract_events
@
relation
(
fields
:
[
initiated_l2_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
l1_contract_events_l2_transaction_withdrawals_proven_l1_event_guidTol1_contract_events
l1_contract_events
?
@
relation
(
"l2_transaction_withdrawals_proven_l1_event_guidTol1_contract_events"
,
fields
:
[
proven_l1_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
}
model
legacy_state_batches
{
index
Int
@
id
root
String
@
db
.
VarChar
size
Int
prev_total
Int
l1_contract_event_guid
String
?
@
db
.
VarChar
l1_contract_events
l1_contract_events
?
@
relation
(
fields
:
[
l1_contract_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
}
@@
index
([
br_withdrawal_hash
],
map
:
"withdrawals_br_withdrawal_hash"
)
model
output_proposals
{
output_root
String
@
id
@
db
.
VarChar
l2_output_index
Decimal
@
db
.
Decimal
l2_block_number
Decimal
@
db
.
Decimal
l1_contract_event_guid
String
?
@
db
.
VarChar
l1_contract_events
l1_contract_events
?
@
relation
(
fields
:
[
l1_contract_event_guid
],
references
:
[
guid
],
onDelete
:
NoAction
,
onUpdate
:
NoAction
)
}
op-bindings/bindings/mips.go
View file @
887323bf
...
...
@@ -31,7 +31,7 @@ var (
// MIPSMetaData contains all meta data concerning the MIPS contract.
var
MIPSMetaData
=
&
bind
.
MetaData
{
ABI
:
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
contractIPreimageOracle
\"
,
\"
name
\"
:
\"
_oracle
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
BRK_START
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
oracle
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractIPreimageOracle
\"
,
\"
name
\"
:
\"
oracle_
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
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
\"
}]"
,
Bin
:
"0x60a060405234801561001057600080fd5b50604051611
d67380380611d6783398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051611cd6610091600039600081816085015261149c0152611cd66000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006b578063f8e0cb96146100af575b600080fd5b610051634000000081565b60405163ffffffff90911681526020015b60405180910390f35b60405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610062565b6100c26100bd366004611bdb565b6100d0565b604051908152602001610062565b60006100da611b08565b608081146100e757600080fd5b604051610600146100f757600080fd5b6064861461010457600080fd5b610184841461011257600080fd5b8535608052602086013560a052604086013560e090811c60c09081526044880135821c82526048880135821c61010052604c880135821c610120526050880135821c61014052605488013590911c61016052605887013560f890811c610180526059880135901c6101a052605a870135901c6101c0526102006101e0819052606287019060005b60208110156101bd57823560e01c8252600490920191602090910190600101610199565b505050806101200151156101db576101d3610619565b915050610611565b6101408101805160010167ffffffffffffffff169052606081015160009061020390826106c1565b9050603f601a82901c16600281148061022257508063ffffffff166003145b156102775760006002836303ffffff1663ffffffff16901b846080015163f00000001617905061026c8263ffffffff1660021461026057601f610263565b60005b60ff168261077d565b945050505050610611565b6101608301516000908190601f601086901c81169190601587901c16602081106102a3576102a3611c47565b602002015192508063ffffffff851615806102c457508463ffffffff16601c145b156102fb578661016001518263ffffffff16602081106102e6576102e6611c47565b6020020151925050601f600b86901c166103b7565b60208563ffffffff16101561035d578463ffffffff16600c148061032557508463ffffffff16600d145b8061033657508463ffffffff16600e145b15610347578561ffff1692506103b7565b6103568661ffff166010610877565b92506103b7565b60288563ffffffff1610158061037957508463ffffffff166022145b8061038a57508463ffffffff166026145b156103b7578661016001518263ffffffff16602081106103ac576103ac611c47565b602002015192508190505b60048563ffffffff16101580156103d4575060088563ffffffff16105b806103e557508463ffffffff166001145b15610404576103f6858784876108ea565b975050505050505050610611565b63ffffffff6000602087831610610469576104248861ffff166010610877565b9095019463fffffffc861661043a8160016106c1565b915060288863ffffffff161015801561045a57508763ffffffff16603014155b1561046757809250600093505b505b600061047789888885610afa565b63ffffffff9081169150603f8a1690891615801561049c575060088163ffffffff1610155b80156104ae5750601c8163ffffffff16105b1561058a578063ffffffff16600814806104ce57508063ffffffff166009145b15610505576104f38163ffffffff166008146104ea57856104ed565b60005b8961077d565b9b505050505050505050505050610611565b8063ffffffff16600a03610525576104f3858963ffffffff8a16156111a7565b8063ffffffff16600b03610546576104f3858963ffffffff8a1615156111a7565b8063ffffffff16600c0361055c576104f361128d565b60108163ffffffff16101580156105795750601c8163ffffffff16105b1561058a576104f3818989886117c1565b8863ffffffff1660381480156105a5575063ffffffff861615155b156105da5760018b61016001518763ffffffff16602081106105c9576105c9611c47565b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146105f7576105f7846001846119bb565b610603858360016111a7565b9b5050505050505050505050505b949350505050565b60408051608051815260a051602082015260dc519181019190915260fc51604482015261011c51604882015261013c51604c82015261015c51605082015261017c51605482015261019f5160588201526101bf5160598201526101d851605a8201526000906102009060628101835b60208110156106ac57601c8401518252602090930192600490910190600101610688565b506000815281810382a0819003902092915050565b6000806106cd83611a5f565b905060038416156106dd57600080fd5b6020810190358460051c8160005b601b8110156107435760208501943583821c6001168015610713576001811461072857610739565b60008481526020839052604090209350610739565b600082815260208590526040902093505b50506001016106eb565b50608051915081811461075e57630badf00d60005260206000fd5b5050601f94909416601c0360031b9390931c63ffffffff169392505050565b6000610787611b08565b60809050806060015160040163ffffffff16816080015163ffffffff1614610810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6a756d7020696e2064656c617920736c6f74000000000000000000000000000060448201526064015b60405180910390fd5b60608101805160808301805163ffffffff90811690935285831690529085161561086657806008018261016001518663ffffffff166020811061085557610855611c47565b63ffffffff90921660209290920201525b61086e610619565b95945050505050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b01826108d45760006108d6565b815b90861663ffffffff16179250505092915050565b60006108f4611b08565b608090506000816060015160040163ffffffff16826080015163ffffffff161461097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6272616e636820696e2064656c617920736c6f740000000000000000000000006044820152606401610807565b8663ffffffff166004148061099557508663ffffffff166005145b15610a115760008261016001518663ffffffff16602081106109b9576109b9611c47565b602002015190508063ffffffff168563ffffffff161480156109e157508763ffffffff166004145b80610a0957508063ffffffff168563ffffffff1614158015610a0957508763ffffffff166005145b915050610a8e565b8663ffffffff16600603610a2e5760008460030b13159050610a8e565b8663ffffffff16600703610a4a5760008460030b139050610a8e565b8663ffffffff16600103610a8e57601f601087901c166000819003610a735760008560030b1291505b8063ffffffff16600103610a8c5760008560030b121591505b505b606082018051608084015163ffffffff169091528115610ad4576002610ab98861ffff166010610877565b63ffffffff90811690911b8201600401166080840152610ae6565b60808301805160040163ffffffff1690525b610aee610619565b98975050505050505050565b6000603f601a86901c81169086166020821015610ec85760088263ffffffff1610158015610b2e5750600f8263ffffffff16105b15610bce578163ffffffff16600803610b4957506020610bc9565b8163ffffffff16600903610b5f57506021610bc9565b8163ffffffff16600a03610b755750602a610bc9565b8163ffffffff16600b03610b8b5750602b610bc9565b8163ffffffff16600c03610ba157506024610bc9565b8163ffffffff16600d03610bb757506025610bc9565b8163ffffffff16600e03610bc9575060265b600091505b8163ffffffff16600003610e1c57601f600688901c16602063ffffffff83161015610cf65760088263ffffffff1610610c0c57869350505050610611565b8163ffffffff16600003610c2f5763ffffffff86811691161b9250610611915050565b8163ffffffff16600203610c525763ffffffff86811691161c9250610611915050565b8163ffffffff16600303610c8657610c7c8163ffffffff168763ffffffff16901c82602003610877565b9350505050610611565b8163ffffffff16600403610ca9575050505063ffffffff8216601f84161b610611565b8163ffffffff16600603610ccc575050505063ffffffff8216601f84161c610611565b8163ffffffff16600703610cf657610c7c8763ffffffff168763ffffffff16901c88602003610877565b8163ffffffff1660201480610d1157508163ffffffff166021145b15610d23578587019350505050610611565b8163ffffffff1660221480610d3e57508163ffffffff166023145b15610d50578587039350505050610611565b8163ffffffff16602403610d6b578587169350505050610611565b8163ffffffff16602503610d86578587179350505050610611565b8163ffffffff16602603610da1578587189350505050610611565b8163ffffffff16602703610dbc575050505082821719610611565b8163ffffffff16602a03610dee578560030b8760030b12610dde576000610de1565b60015b60ff169350505050610611565b8163ffffffff16602b03610e16578563ffffffff168763ffffffff1610610dde576000610de1565b50611145565b8163ffffffff16600f03610e3e5760108563ffffffff16901b92505050610611565b8163ffffffff16601c03610ec3578063ffffffff16600203610e6557505050828202610611565b8063ffffffff1660201480610e8057508063ffffffff166021145b15610ec3578063ffffffff16602003610e97579419945b60005b6380000000871615610eb9576401fffffffe600197881b169601610e9a565b9250610611915050565b611145565b60288263ffffffff16101561102b578163ffffffff16602003610f1457610f0b8660031660080260180363ffffffff168563ffffffff16901c60ff166008610877565b92505050610611565b8163ffffffff16602103610f4957610f0b8660021660080260100363ffffffff168563ffffffff16901c61ffff166010610877565b8163ffffffff16602203610f795750505063ffffffff60086003851602811681811b198416918316901b17610611565b8163ffffffff16602303610f91578392505050610611565b8163ffffffff16602403610fc4578560031660080260180363ffffffff168463ffffffff16901c60ff1692505050610611565b8163ffffffff16602503610ff8578560021660080260100363ffffffff168463ffffffff16901c61ffff1692505050610611565b8163ffffffff16602603610ec35750505063ffffffff60086003851602601803811681811c198416918316901c17610611565b8163ffffffff166028036110625750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610611565b8163ffffffff1660290361109a5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610611565b8163ffffffff16602a036110ca5750505063ffffffff60086003851602811681811c198316918416901c17610611565b8163ffffffff16602b036110e2578492505050610611565b8163ffffffff16602e036111155750505063ffffffff60086003851602601803811681811b198316918416901b17610611565b8163ffffffff1660300361112d578392505050610611565b8163ffffffff16603803611145578492505050610611565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e000000000000000000000000006044820152606401610807565b60006111b1611b08565b506080602063ffffffff861610611224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c69642072656769737465720000000000000000000000000000000000006044820152606401610807565b63ffffffff8516158015906112365750825b1561126a57838161016001518663ffffffff166020811061125957611259611c47565b63ffffffff90921660209290920201525b60808101805163ffffffff8082166060850152600490910116905261086e610619565b6000611297611b08565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa036113115781610fff8116156112e057610fff811661100003015b8363ffffffff166000036113075760e08801805163ffffffff83820116909152955061130b565b8395505b50611780565b8563ffffffff16610fcd0361132c5763400000009450611780565b8563ffffffff16611018036113445760019450611780565b8563ffffffff166110960361137957600161012088015260ff831661010088015261136d610619565b97505050505050505090565b8563ffffffff16610fa3036115e35763ffffffff831615611780577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb63ffffffff84160161159d5760006113d48363fffffffc1660016106c1565b60208901519091508060001a6001036114415761143e81600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b90505b6040808a015190517fe03110e10000000000000000000000000000000000000000000000000000000081526004810183905263ffffffff9091166024820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e03110e1906044016040805180830381865afa1580156114e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115069190611c76565b9150915060038616806004038281101561151e578092505b508186101561152b578591505b8260088302610100031c9250826008828460040303021b9250600180600883600403021b036001806008858560040303021b039150811981169050838119871617955050506115828663fffffffc166001866119bb565b60408b018051820163ffffffff16905297506115de92505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd63ffffffff8416016115d257809450611780565b63ffffffff9450600993505b611780565b8563ffffffff16610fa4036116d45763ffffffff83166001148061160d575063ffffffff83166002145b8061161e575063ffffffff83166004145b1561162b57809450611780565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa63ffffffff8416016115d257600061166b8363fffffffc1660016106c1565b60208901519091506003841660040383811015611686578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b17602088015260006040880152935083611780565b8563ffffffff16610fd703611780578163ffffffff166003036117745763ffffffff8316158061170a575063ffffffff83166005145b8061171b575063ffffffff83166003145b156117295760009450611780565b63ffffffff831660011480611744575063ffffffff83166002145b80611755575063ffffffff83166006145b80611766575063ffffffff83166004145b156115d25760019450611780565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b0152600401909116905261136d610619565b60006117cb611b08565b506080600063ffffffff87166010036117e9575060c0810151611952565b8663ffffffff166011036118085763ffffffff861660c0830152611952565b8663ffffffff16601203611821575060a0810151611952565b8663ffffffff166013036118405763ffffffff861660a0830152611952565b8663ffffffff166018036118745763ffffffff600387810b9087900b02602081901c821660c08501521660a0830152611952565b8663ffffffff166019036118a55763ffffffff86811681871602602081901c821660c08501521660a0830152611952565b8663ffffffff16601a036118fb578460030b8660030b816118c8576118c8611c9a565b0763ffffffff1660c0830152600385810b9087900b816118ea576118ea611c9a565b0563ffffffff1660a0830152611952565b8663ffffffff16601b03611952578463ffffffff168663ffffffff168161192457611924611c9a565b0663ffffffff90811660c08401528581169087168161194557611945611c9a565b0463ffffffff1660a08301525b63ffffffff84161561198d57808261016001518563ffffffff166020811061197c5761197c611c47565b63ffffffff90921660209290920201525b60808201805163ffffffff808216606086015260049091011690526119b0610619565b979650505050505050565b60006119c683611a5f565b905060038416156119d657600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b811015611a545760208401933582821c6001168015611a245760018114611a3957611a4a565b60008581526020839052604090209450611a4a565b600082815260208690526040902094505b50506001016119fc565b505060805250505050565b60ff811661038002610184810190369061050401811015611b02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f636865636b207468617420746865726520697320656e6f7567682063616c6c6460448201527f61746100000000000000000000000000000000000000000000000000000000006064820152608401610807565b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611b6e611b73565b905290565b6040518061040001604052806020906020820280368337509192915050565b60008083601f840112611ba457600080fd5b50813567ffffffffffffffff811115611bbc57600080fd5b602083019150836020828501011115611bd457600080fd5b9250929050565b60008060008060408587031215611bf157600080fd5b843567ffffffffffffffff80821115611c0957600080fd5b611c1588838901611b92565b90965094506020870135915080821115611c2e57600080fd5b50611c3b87828801611b92565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008060408385031215611c89
57600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c634300080f000a"
,
Bin
:
"0x60a060405234801561001057600080fd5b50604051611
e3e380380611e3e83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051611dad61009160003960008181608501526115730152611dad6000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006b578063f8e0cb96146100af575b600080fd5b610051634000000081565b60405163ffffffff90911681526020015b60405180910390f35b60405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610062565b6100c26100bd366004611cb2565b6100d0565b604051908152602001610062565b60006100da611bdf565b608081146100e757600080fd5b604051610600146100f757600080fd5b6064861461010457600080fd5b610184841461011257600080fd5b8535608052602086013560a052604086013560e090811c60c09081526044880135821c82526048880135821c61010052604c880135821c610120526050880135821c61014052605488013590911c61016052605887013560f890811c610180526059880135901c6101a052605a870135901c6101c0526102006101e0819052606287019060005b60208110156101bd57823560e01c8252600490920191602090910190600101610199565b505050806101200151156101db576101d3610619565b915050610611565b6101408101805160010167ffffffffffffffff169052606081015160009061020390826106c1565b9050603f601a82901c16600281148061022257508063ffffffff166003145b156102775760006002836303ffffff1663ffffffff16901b846080015163f00000001617905061026c8263ffffffff1660021461026057601f610263565b60005b60ff168261077d565b945050505050610611565b6101608301516000908190601f601086901c81169190601587901c16602081106102a3576102a3611d1e565b602002015192508063ffffffff851615806102c457508463ffffffff16601c145b156102fb578661016001518263ffffffff16602081106102e6576102e6611d1e565b6020020151925050601f600b86901c166103b7565b60208563ffffffff16101561035d578463ffffffff16600c148061032557508463ffffffff16600d145b8061033657508463ffffffff16600e145b15610347578561ffff1692506103b7565b6103568661ffff166010610877565b92506103b7565b60288563ffffffff1610158061037957508463ffffffff166022145b8061038a57508463ffffffff166026145b156103b7578661016001518263ffffffff16602081106103ac576103ac611d1e565b602002015192508190505b60048563ffffffff16101580156103d4575060088563ffffffff16105b806103e557508463ffffffff166001145b15610404576103f6858784876108ea565b975050505050505050610611565b63ffffffff6000602087831610610469576104248861ffff166010610877565b9095019463fffffffc861661043a8160016106c1565b915060288863ffffffff161015801561045a57508763ffffffff16603014155b1561046757809250600093505b505b600061047789888885610afa565b63ffffffff9081169150603f8a1690891615801561049c575060088163ffffffff1610155b80156104ae5750601c8163ffffffff16105b1561058a578063ffffffff16600814806104ce57508063ffffffff166009145b15610505576104f38163ffffffff166008146104ea57856104ed565b60005b8961077d565b9b505050505050505050505050610611565b8063ffffffff16600a03610525576104f3858963ffffffff8a161561127e565b8063ffffffff16600b03610546576104f3858963ffffffff8a16151561127e565b8063ffffffff16600c0361055c576104f3611364565b60108163ffffffff16101580156105795750601c8163ffffffff16105b1561058a576104f381898988611898565b8863ffffffff1660381480156105a5575063ffffffff861615155b156105da5760018b61016001518763ffffffff16602081106105c9576105c9611d1e565b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146105f7576105f784600184611a92565b6106038583600161127e565b9b5050505050505050505050505b949350505050565b60408051608051815260a051602082015260dc519181019190915260fc51604482015261011c51604882015261013c51604c82015261015c51605082015261017c51605482015261019f5160588201526101bf5160598201526101d851605a8201526000906102009060628101835b60208110156106ac57601c8401518252602090930192600490910190600101610688565b506000815281810382a0819003902092915050565b6000806106cd83611b36565b905060038416156106dd57600080fd5b6020810190358460051c8160005b601b8110156107435760208501943583821c6001168015610713576001811461072857610739565b60008481526020839052604090209350610739565b600082815260208590526040902093505b50506001016106eb565b50608051915081811461075e57630badf00d60005260206000fd5b5050601f94909416601c0360031b9390931c63ffffffff169392505050565b6000610787611bdf565b60809050806060015160040163ffffffff16816080015163ffffffff1614610810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6a756d7020696e2064656c617920736c6f74000000000000000000000000000060448201526064015b60405180910390fd5b60608101805160808301805163ffffffff90811690935285831690529085161561086657806008018261016001518663ffffffff166020811061085557610855611d1e565b63ffffffff90921660209290920201525b61086e610619565b95945050505050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b01826108d45760006108d6565b815b90861663ffffffff16179250505092915050565b60006108f4611bdf565b608090506000816060015160040163ffffffff16826080015163ffffffff161461097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6272616e636820696e2064656c617920736c6f740000000000000000000000006044820152606401610807565b8663ffffffff166004148061099557508663ffffffff166005145b15610a115760008261016001518663ffffffff16602081106109b9576109b9611d1e565b602002015190508063ffffffff168563ffffffff161480156109e157508763ffffffff166004145b80610a0957508063ffffffff168563ffffffff1614158015610a0957508763ffffffff166005145b915050610a8e565b8663ffffffff16600603610a2e5760008460030b13159050610a8e565b8663ffffffff16600703610a4a5760008460030b139050610a8e565b8663ffffffff16600103610a8e57601f601087901c166000819003610a735760008560030b1291505b8063ffffffff16600103610a8c5760008560030b121591505b505b606082018051608084015163ffffffff169091528115610ad4576002610ab98861ffff166010610877565b63ffffffff90811690911b8201600401166080840152610ae6565b60808301805160040163ffffffff1690525b610aee610619565b98975050505050505050565b6000603f601a86901c16801580610b29575060088163ffffffff1610158015610b295750600f8163ffffffff16105b15610f7f57603f86168160088114610b705760098114610b7957600a8114610b8257600b8114610b8b57600c8114610b9457600d8114610b9d57600e8114610ba657610bab565b60209150610bab565b60219150610bab565b602a9150610bab565b602b9150610bab565b60249150610bab565b60259150610bab565b602691505b508063ffffffff16600003610bd25750505063ffffffff8216601f600686901c161b610611565b8063ffffffff16600203610bf85750505063ffffffff8216601f600686901c161c610611565b8063ffffffff16600303610c2e57601f600688901c16610c2463ffffffff8716821c6020839003610877565b9350505050610611565b8063ffffffff16600403610c505750505063ffffffff8216601f84161b610611565b8063ffffffff16600603610c725750505063ffffffff8216601f84161c610611565b8063ffffffff16600703610ca557610c9c8663ffffffff168663ffffffff16901c87602003610877565b92505050610611565b8063ffffffff16600803610cbd578592505050610611565b8063ffffffff16600903610cd5578592505050610611565b8063ffffffff16600a03610ced578592505050610611565b8063ffffffff16600b03610d05578592505050610611565b8063ffffffff16600c03610d1d578592505050610611565b8063ffffffff16600f03610d35578592505050610611565b8063ffffffff16601003610d4d578592505050610611565b8063ffffffff16601103610d65578592505050610611565b8063ffffffff16601203610d7d578592505050610611565b8063ffffffff16601303610d95578592505050610611565b8063ffffffff16601803610dad578592505050610611565b8063ffffffff16601903610dc5578592505050610611565b8063ffffffff16601a03610ddd578592505050610611565b8063ffffffff16601b03610df5578592505050610611565b8063ffffffff16602003610e0e57505050828201610611565b8063ffffffff16602103610e2757505050828201610611565b8063ffffffff16602203610e4057505050818303610611565b8063ffffffff16602303610e5957505050818303610611565b8063ffffffff16602403610e7257505050828216610611565b8063ffffffff16602503610e8b57505050828217610611565b8063ffffffff16602603610ea457505050828218610611565b8063ffffffff16602703610ebe5750505082821719610611565b8063ffffffff16602a03610eef578460030b8660030b12610ee0576000610ee3565b60015b60ff1692505050610611565b8063ffffffff16602b03610f17578463ffffffff168663ffffffff1610610ee0576000610ee3565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e000000000000000000000000006044820152606401610807565b50610f17565b8063ffffffff16601c0361100357603f86166002819003610fa557505050828202610611565b8063ffffffff1660201480610fc057508063ffffffff166021145b15610f79578063ffffffff16602003610fd7579419945b60005b6380000000871615610ff9576401fffffffe600197881b169601610fda565b9250610611915050565b8063ffffffff16600f0361102557505065ffffffff0000601083901b16610611565b8063ffffffff16602003611059576101d38560031660080260180363ffffffff168463ffffffff16901c60ff166008610877565b8063ffffffff1660210361108e576101d38560021660080260100363ffffffff168463ffffffff16901c61ffff166010610877565b8063ffffffff166022036110bd57505063ffffffff60086003851602811681811b198416918316901b17610611565b8063ffffffff166023036110d45782915050610611565b8063ffffffff16602403611106578460031660080260180363ffffffff168363ffffffff16901c60ff16915050610611565b8063ffffffff16602503611139578460021660080260100363ffffffff168363ffffffff16901c61ffff16915050610611565b8063ffffffff1660260361116b57505063ffffffff60086003851602601803811681811c198416918316901c17610611565b8063ffffffff166028036111a157505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610611565b8063ffffffff166029036111d857505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610611565b8063ffffffff16602a0361120757505063ffffffff60086003851602811681811c198316918416901c17610611565b8063ffffffff16602b0361121e5783915050610611565b8063ffffffff16602e0361125057505063ffffffff60086003851602601803811681811b198316918416901b17610611565b8063ffffffff166030036112675782915050610611565b8063ffffffff16603803610f175783915050610611565b6000611288611bdf565b506080602063ffffffff8616106112fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c69642072656769737465720000000000000000000000000000000000006044820152606401610807565b63ffffffff85161580159061130d5750825b1561134157838161016001518663ffffffff166020811061133057611330611d1e565b63ffffffff90921660209290920201525b60808101805163ffffffff8082166060850152600490910116905261086e610619565b600061136e611bdf565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa036113e85781610fff8116156113b757610fff811661100003015b8363ffffffff166000036113de5760e08801805163ffffffff8382011690915295506113e2565b8395505b50611857565b8563ffffffff16610fcd036114035763400000009450611857565b8563ffffffff166110180361141b5760019450611857565b8563ffffffff166110960361145057600161012088015260ff8316610100880152611444610619565b97505050505050505090565b8563ffffffff16610fa3036116ba5763ffffffff831615611857577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb63ffffffff8416016116745760006114ab8363fffffffc1660016106c1565b60208901519091508060001a6001036115185761151581600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b90505b6040808a015190517fe03110e10000000000000000000000000000000000000000000000000000000081526004810183905263ffffffff9091166024820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e03110e1906044016040805180830381865afa1580156115b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115dd9190611d4d565b915091506003861680600403828110156115f5578092505b5081861015611602578591505b8260088302610100031c9250826008828460040303021b9250600180600883600403021b036001806008858560040303021b039150811981169050838119871617955050506116598663fffffffc16600186611a92565b60408b018051820163ffffffff16905297506116b592505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd63ffffffff8416016116a957809450611857565b63ffffffff9450600993505b611857565b8563ffffffff16610fa4036117ab5763ffffffff8316600114806116e4575063ffffffff83166002145b806116f5575063ffffffff83166004145b1561170257809450611857565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa63ffffffff8416016116a95760006117428363fffffffc1660016106c1565b6020890151909150600384166004038381101561175d578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b17602088015260006040880152935083611857565b8563ffffffff16610fd703611857578163ffffffff1660030361184b5763ffffffff831615806117e1575063ffffffff83166005145b806117f2575063ffffffff83166003145b156118005760009450611857565b63ffffffff83166001148061181b575063ffffffff83166002145b8061182c575063ffffffff83166006145b8061183d575063ffffffff83166004145b156116a95760019450611857565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b01526004019091169052611444610619565b60006118a2611bdf565b506080600063ffffffff87166010036118c0575060c0810151611a29565b8663ffffffff166011036118df5763ffffffff861660c0830152611a29565b8663ffffffff166012036118f8575060a0810151611a29565b8663ffffffff166013036119175763ffffffff861660a0830152611a29565b8663ffffffff1660180361194b5763ffffffff600387810b9087900b02602081901c821660c08501521660a0830152611a29565b8663ffffffff1660190361197c5763ffffffff86811681871602602081901c821660c08501521660a0830152611a29565b8663ffffffff16601a036119d2578460030b8660030b8161199f5761199f611d71565b0763ffffffff1660c0830152600385810b9087900b816119c1576119c1611d71565b0563ffffffff1660a0830152611a29565b8663ffffffff16601b03611a29578463ffffffff168663ffffffff16816119fb576119fb611d71565b0663ffffffff90811660c084015285811690871681611a1c57611a1c611d71565b0463ffffffff1660a08301525b63ffffffff841615611a6457808261016001518563ffffffff1660208110611a5357611a53611d1e565b63ffffffff90921660209290920201525b60808201805163ffffffff80821660608601526004909101169052611a87610619565b979650505050505050565b6000611a9d83611b36565b90506003841615611aad57600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b811015611b2b5760208401933582821c6001168015611afb5760018114611b1057611b21565b60008581526020839052604090209450611b21565b600082815260208690526040902094505b5050600101611ad3565b505060805250505050565b60ff811661038002610184810190369061050401811015611bd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f636865636b207468617420746865726520697320656e6f7567682063616c6c6460448201527f61746100000000000000000000000000000000000000000000000000000000006064820152608401610807565b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611c45611c4a565b905290565b6040518061040001604052806020906020820280368337509192915050565b60008083601f840112611c7b57600080fd5b50813567ffffffffffffffff811115611c9357600080fd5b602083019150836020828501011115611cab57600080fd5b9250929050565b60008060008060408587031215611cc857600080fd5b843567ffffffffffffffff80821115611ce057600080fd5b611cec88838901611c69565b90965094506020870135915080821115611d0557600080fd5b50611d1287828801611c69565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008060408385031215611d60
57600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c634300080f000a"
,
}
// MIPSABI is the input ABI used to generate the binding from.
...
...
op-bindings/bindings/mips_more.go
View file @
887323bf
...
...
@@ -13,9 +13,9 @@ const MIPSStorageLayoutJSON = "{\"storage\":null,\"types\":{}}"
var
MIPSStorageLayout
=
new
(
solc
.
StorageLayout
)
var
MIPSDeployedBin
=
"0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006b578063f8e0cb96146100af575b600080fd5b610051634000000081565b60405163ffffffff90911681526020015b60405180910390f35b60405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610062565b6100c26100bd366004611
bdb565b6100d0565b604051908152602001610062565b60006100da611b08565b608081146100e757600080fd5b604051610600146100f757600080fd5b6064861461010457600080fd5b610184841461011257600080fd5b8535608052602086013560a052604086013560e090811c60c09081526044880135821c82526048880135821c61010052604c880135821c610120526050880135821c61014052605488013590911c61016052605887013560f890811c610180526059880135901c6101a052605a870135901c6101c0526102006101e0819052606287019060005b60208110156101bd57823560e01c8252600490920191602090910190600101610199565b505050806101200151156101db576101d3610619565b915050610611565b6101408101805160010167ffffffffffffffff169052606081015160009061020390826106c1565b9050603f601a82901c16600281148061022257508063ffffffff166003145b156102775760006002836303ffffff1663ffffffff16901b846080015163f00000001617905061026c8263ffffffff1660021461026057601f610263565b60005b60ff168261077d565b945050505050610611565b6101608301516000908190601f601086901c81169190601587901c16602081106102a3576102a3611c47565b602002015192508063ffffffff851615806102c457508463ffffffff16601c145b156102fb578661016001518263ffffffff16602081106102e6576102e6611c47565b6020020151925050601f600b86901c166103b7565b60208563ffffffff16101561035d578463ffffffff16600c148061032557508463ffffffff16600d145b8061033657508463ffffffff16600e145b15610347578561ffff1692506103b7565b6103568661ffff166010610877565b92506103b7565b60288563ffffffff1610158061037957508463ffffffff166022145b8061038a57508463ffffffff166026145b156103b7578661016001518263ffffffff16602081106103ac576103ac611c47565b602002015192508190505b60048563ffffffff16101580156103d4575060088563ffffffff16105b806103e557508463ffffffff166001145b15610404576103f6858784876108ea565b975050505050505050610611565b63ffffffff6000602087831610610469576104248861ffff166010610877565b9095019463fffffffc861661043a8160016106c1565b915060288863ffffffff161015801561045a57508763ffffffff16603014155b1561046757809250600093505b505b600061047789888885610afa565b63ffffffff9081169150603f8a1690891615801561049c575060088163ffffffff1610155b80156104ae5750601c8163ffffffff16105b1561058a578063ffffffff16600814806104ce57508063ffffffff166009145b15610505576104f38163ffffffff166008146104ea57856104ed565b60005b8961077d565b9b505050505050505050505050610611565b8063ffffffff16600a03610525576104f3858963ffffffff8a16156111a7565b8063ffffffff16600b03610546576104f3858963ffffffff8a1615156111a7565b8063ffffffff16600c0361055c576104f361128d565b60108163ffffffff16101580156105795750601c8163ffffffff16105b1561058a576104f3818989886117c1565b8863ffffffff1660381480156105a5575063ffffffff861615155b156105da5760018b61016001518763ffffffff16602081106105c9576105c9611c47565b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146105f7576105f7846001846119bb565b610603858360016111a7565b9b5050505050505050505050505b949350505050565b60408051608051815260a051602082015260dc519181019190915260fc51604482015261011c51604882015261013c51604c82015261015c51605082015261017c51605482015261019f5160588201526101bf5160598201526101d851605a8201526000906102009060628101835b60208110156106ac57601c8401518252602090930192600490910190600101610688565b506000815281810382a0819003902092915050565b6000806106cd83611a5f565b905060038416156106dd57600080fd5b6020810190358460051c8160005b601b8110156107435760208501943583821c6001168015610713576001811461072857610739565b60008481526020839052604090209350610739565b600082815260208590526040902093505b50506001016106eb565b50608051915081811461075e57630badf00d60005260206000fd5b5050601f94909416601c0360031b9390931c63ffffffff169392505050565b6000610787611b08565b60809050806060015160040163ffffffff16816080015163ffffffff1614610810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6a756d7020696e2064656c617920736c6f74000000000000000000000000000060448201526064015b60405180910390fd5b60608101805160808301805163ffffffff90811690935285831690529085161561086657806008018261016001518663ffffffff166020811061085557610855611c47565b63ffffffff90921660209290920201525b61086e610619565b95945050505050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b01826108d45760006108d6565b815b90861663ffffffff16179250505092915050565b60006108f4611b08565b608090506000816060015160040163ffffffff16826080015163ffffffff161461097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6272616e636820696e2064656c617920736c6f740000000000000000000000006044820152606401610807565b8663ffffffff166004148061099557508663ffffffff166005145b15610a115760008261016001518663ffffffff16602081106109b9576109b9611c47565b602002015190508063ffffffff168563ffffffff161480156109e157508763ffffffff166004145b80610a0957508063ffffffff168563ffffffff1614158015610a0957508763ffffffff166005145b915050610a8e565b8663ffffffff16600603610a2e5760008460030b13159050610a8e565b8663ffffffff16600703610a4a5760008460030b139050610a8e565b8663ffffffff16600103610a8e57601f601087901c166000819003610a735760008560030b1291505b8063ffffffff16600103610a8c5760008560030b121591505b505b606082018051608084015163ffffffff169091528115610ad4576002610ab98861ffff166010610877565b63ffffffff90811690911b8201600401166080840152610ae6565b60808301805160040163ffffffff1690525b610aee610619565b98975050505050505050565b6000603f601a86901c81169086166020821015610ec85760088263ffffffff1610158015610b2e5750600f8263ffffffff16105b15610bce578163ffffffff16600803610b4957506020610bc9565b8163ffffffff16600903610b5f57506021610bc9565b8163ffffffff16600a03610b755750602a610bc9565b8163ffffffff16600b03610b8b5750602b610bc9565b8163ffffffff16600c03610ba157506024610bc9565b8163ffffffff16600d03610bb757506025610bc9565b8163ffffffff16600e03610bc9575060265b600091505b8163ffffffff16600003610e1c57601f600688901c16602063ffffffff83161015610cf65760088263ffffffff1610610c0c57869350505050610611565b8163ffffffff16600003610c2f5763ffffffff86811691161b9250610611915050565b8163ffffffff16600203610c525763ffffffff86811691161c9250610611915050565b8163ffffffff16600303610c8657610c7c8163ffffffff168763ffffffff16901c82602003610877565b9350505050610611565b8163ffffffff16600403610ca9575050505063ffffffff8216601f84161b610611565b8163ffffffff16600603610ccc575050505063ffffffff8216601f84161c610611565b8163ffffffff16600703610cf657610c7c8763ffffffff168763ffffffff16901c88602003610877565b8163ffffffff1660201480610d1157508163ffffffff166021145b15610d23578587019350505050610611565b8163ffffffff1660221480610d3e57508163ffffffff166023145b15610d50578587039350505050610611565b8163ffffffff16602403610d6b578587169350505050610611565b8163ffffffff16602503610d86578587179350505050610611565b8163ffffffff16602603610da1578587189350505050610611565b8163ffffffff16602703610dbc575050505082821719610611565b8163ffffffff16602a03610dee578560030b8760030b12610dde576000610de1565b60015b60ff169350505050610611565b8163ffffffff16602b03610e16578563ffffffff168763ffffffff1610610dde576000610de1565b50611145565b8163ffffffff16600f03610e3e5760108563ffffffff16901b92505050610611565b8163ffffffff16601c03610ec3578063ffffffff16600203610e6557505050828202610611565b8063ffffffff1660201480610e8057508063ffffffff166021145b15610ec3578063ffffffff16602003610e97579419945b60005b6380000000871615610eb9576401fffffffe600197881b169601610e9a565b9250610611915050565b611145565b60288263ffffffff16101561102b578163ffffffff16602003610f1457610f0b8660031660080260180363ffffffff168563ffffffff16901c60ff166008610877565b92505050610611565b8163ffffffff16602103610f4957610f0b8660021660080260100363ffffffff168563ffffffff16901c61ffff166010610877565b8163ffffffff16602203610f795750505063ffffffff60086003851602811681811b198416918316901b17610611565b8163ffffffff16602303610f91578392505050610611565b8163ffffffff16602403610fc4578560031660080260180363ffffffff168463ffffffff16901c60ff1692505050610611565b8163ffffffff16602503610ff8578560021660080260100363ffffffff168463ffffffff16901c61ffff1692505050610611565b8163ffffffff16602603610ec35750505063ffffffff60086003851602601803811681811c198416918316901c17610611565b8163ffffffff166028036110625750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610611565b8163ffffffff1660290361109a5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610611565b8163ffffffff16602a036110ca5750505063ffffffff60086003851602811681811c198316918416901c17610611565b8163ffffffff16602b036110e2578492505050610611565b8163ffffffff16602e036111155750505063ffffffff60086003851602601803811681811b198316918416901b17610611565b8163ffffffff1660300361112d578392505050610611565b8163ffffffff16603803611145578492505050610611565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e000000000000000000000000006044820152606401610807565b60006111b1611b08565b506080602063ffffffff861610611224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c69642072656769737465720000000000000000000000000000000000006044820152606401610807565b63ffffffff8516158015906112365750825b1561126a57838161016001518663ffffffff166020811061125957611259611c47565b63ffffffff90921660209290920201525b60808101805163ffffffff8082166060850152600490910116905261086e610619565b6000611297611b08565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa036113115781610fff8116156112e057610fff811661100003015b8363ffffffff166000036113075760e08801805163ffffffff83820116909152955061130b565b8395505b50611780565b8563ffffffff16610fcd0361132c5763400000009450611780565b8563ffffffff16611018036113445760019450611780565b8563ffffffff166110960361137957600161012088015260ff831661010088015261136d610619565b97505050505050505090565b8563ffffffff16610fa3036115e35763ffffffff831615611780577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb63ffffffff84160161159d5760006113d48363fffffffc1660016106c1565b60208901519091508060001a6001036114415761143e81600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b90505b6040808a015190517fe03110e10000000000000000000000000000000000000000000000000000000081526004810183905263ffffffff9091166024820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e03110e1906044016040805180830381865afa1580156114e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115069190611c76565b9150915060038616806004038281101561151e578092505b508186101561152b578591505b8260088302610100031c9250826008828460040303021b9250600180600883600403021b036001806008858560040303021b039150811981169050838119871617955050506115828663fffffffc166001866119bb565b60408b018051820163ffffffff16905297506115de92505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd63ffffffff8416016115d257809450611780565b63ffffffff9450600993505b611780565b8563ffffffff16610fa4036116d45763ffffffff83166001148061160d575063ffffffff83166002145b8061161e575063ffffffff83166004145b1561162b57809450611780565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa63ffffffff8416016115d257600061166b8363fffffffc1660016106c1565b60208901519091506003841660040383811015611686578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b17602088015260006040880152935083611780565b8563ffffffff16610fd703611780578163ffffffff166003036117745763ffffffff8316158061170a575063ffffffff83166005145b8061171b575063ffffffff83166003145b156117295760009450611780565b63ffffffff831660011480611744575063ffffffff83166002145b80611755575063ffffffff83166006145b80611766575063ffffffff83166004145b156115d25760019450611780565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b0152600401909116905261136d610619565b60006117cb611b08565b506080600063ffffffff87166010036117e9575060c0810151611952565b8663ffffffff166011036118085763ffffffff861660c0830152611952565b8663ffffffff16601203611821575060a0810151611952565b8663ffffffff166013036118405763ffffffff861660a0830152611952565b8663ffffffff166018036118745763ffffffff600387810b9087900b02602081901c821660c08501521660a0830152611952565b8663ffffffff166019036118a55763ffffffff86811681871602602081901c821660c08501521660a0830152611952565b8663ffffffff16601a036118fb578460030b8660030b816118c8576118c8611c9a565b0763ffffffff1660c0830152600385810b9087900b816118ea576118ea611c9a565b0563ffffffff1660a0830152611952565b8663ffffffff16601b03611952578463ffffffff168663ffffffff168161192457611924611c9a565b0663ffffffff90811660c08401528581169087168161194557611945611c9a565b0463ffffffff1660a08301525b63ffffffff84161561198d57808261016001518563ffffffff166020811061197c5761197c611c47565b63ffffffff90921660209290920201525b60808201805163ffffffff808216606086015260049091011690526119b0610619565b979650505050505050565b60006119c683611a5f565b905060038416156119d657600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b811015611a545760208401933582821c6001168015611a245760018114611a3957611a4a565b60008581526020839052604090209450611a4a565b600082815260208690526040902094505b50506001016119fc565b505060805250505050565b60ff811661038002610184810190369061050401811015611b02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f636865636b207468617420746865726520697320656e6f7567682063616c6c6460448201527f61746100000000000000000000000000000000000000000000000000000000006064820152608401610807565b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611b6e611b73565b905290565b6040518061040001604052806020906020820280368337509192915050565b60008083601f840112611ba457600080fd5b50813567ffffffffffffffff811115611bbc57600080fd5b602083019150836020828501011115611bd457600080fd5b9250929050565b60008060008060408587031215611bf157600080fd5b843567ffffffffffffffff80821115611c0957600080fd5b611c1588838901611b92565b90965094506020870135915080821115611c2e57600080fd5b50611c3b87828801611b92565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008060408385031215611c89
57600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c634300080f000a"
var
MIPSDeployedBin
=
"0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006b578063f8e0cb96146100af575b600080fd5b610051634000000081565b60405163ffffffff90911681526020015b60405180910390f35b60405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610062565b6100c26100bd366004611
cb2565b6100d0565b604051908152602001610062565b60006100da611bdf565b608081146100e757600080fd5b604051610600146100f757600080fd5b6064861461010457600080fd5b610184841461011257600080fd5b8535608052602086013560a052604086013560e090811c60c09081526044880135821c82526048880135821c61010052604c880135821c610120526050880135821c61014052605488013590911c61016052605887013560f890811c610180526059880135901c6101a052605a870135901c6101c0526102006101e0819052606287019060005b60208110156101bd57823560e01c8252600490920191602090910190600101610199565b505050806101200151156101db576101d3610619565b915050610611565b6101408101805160010167ffffffffffffffff169052606081015160009061020390826106c1565b9050603f601a82901c16600281148061022257508063ffffffff166003145b156102775760006002836303ffffff1663ffffffff16901b846080015163f00000001617905061026c8263ffffffff1660021461026057601f610263565b60005b60ff168261077d565b945050505050610611565b6101608301516000908190601f601086901c81169190601587901c16602081106102a3576102a3611d1e565b602002015192508063ffffffff851615806102c457508463ffffffff16601c145b156102fb578661016001518263ffffffff16602081106102e6576102e6611d1e565b6020020151925050601f600b86901c166103b7565b60208563ffffffff16101561035d578463ffffffff16600c148061032557508463ffffffff16600d145b8061033657508463ffffffff16600e145b15610347578561ffff1692506103b7565b6103568661ffff166010610877565b92506103b7565b60288563ffffffff1610158061037957508463ffffffff166022145b8061038a57508463ffffffff166026145b156103b7578661016001518263ffffffff16602081106103ac576103ac611d1e565b602002015192508190505b60048563ffffffff16101580156103d4575060088563ffffffff16105b806103e557508463ffffffff166001145b15610404576103f6858784876108ea565b975050505050505050610611565b63ffffffff6000602087831610610469576104248861ffff166010610877565b9095019463fffffffc861661043a8160016106c1565b915060288863ffffffff161015801561045a57508763ffffffff16603014155b1561046757809250600093505b505b600061047789888885610afa565b63ffffffff9081169150603f8a1690891615801561049c575060088163ffffffff1610155b80156104ae5750601c8163ffffffff16105b1561058a578063ffffffff16600814806104ce57508063ffffffff166009145b15610505576104f38163ffffffff166008146104ea57856104ed565b60005b8961077d565b9b505050505050505050505050610611565b8063ffffffff16600a03610525576104f3858963ffffffff8a161561127e565b8063ffffffff16600b03610546576104f3858963ffffffff8a16151561127e565b8063ffffffff16600c0361055c576104f3611364565b60108163ffffffff16101580156105795750601c8163ffffffff16105b1561058a576104f381898988611898565b8863ffffffff1660381480156105a5575063ffffffff861615155b156105da5760018b61016001518763ffffffff16602081106105c9576105c9611d1e565b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146105f7576105f784600184611a92565b6106038583600161127e565b9b5050505050505050505050505b949350505050565b60408051608051815260a051602082015260dc519181019190915260fc51604482015261011c51604882015261013c51604c82015261015c51605082015261017c51605482015261019f5160588201526101bf5160598201526101d851605a8201526000906102009060628101835b60208110156106ac57601c8401518252602090930192600490910190600101610688565b506000815281810382a0819003902092915050565b6000806106cd83611b36565b905060038416156106dd57600080fd5b6020810190358460051c8160005b601b8110156107435760208501943583821c6001168015610713576001811461072857610739565b60008481526020839052604090209350610739565b600082815260208590526040902093505b50506001016106eb565b50608051915081811461075e57630badf00d60005260206000fd5b5050601f94909416601c0360031b9390931c63ffffffff169392505050565b6000610787611bdf565b60809050806060015160040163ffffffff16816080015163ffffffff1614610810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6a756d7020696e2064656c617920736c6f74000000000000000000000000000060448201526064015b60405180910390fd5b60608101805160808301805163ffffffff90811690935285831690529085161561086657806008018261016001518663ffffffff166020811061085557610855611d1e565b63ffffffff90921660209290920201525b61086e610619565b95945050505050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b01826108d45760006108d6565b815b90861663ffffffff16179250505092915050565b60006108f4611bdf565b608090506000816060015160040163ffffffff16826080015163ffffffff161461097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6272616e636820696e2064656c617920736c6f740000000000000000000000006044820152606401610807565b8663ffffffff166004148061099557508663ffffffff166005145b15610a115760008261016001518663ffffffff16602081106109b9576109b9611d1e565b602002015190508063ffffffff168563ffffffff161480156109e157508763ffffffff166004145b80610a0957508063ffffffff168563ffffffff1614158015610a0957508763ffffffff166005145b915050610a8e565b8663ffffffff16600603610a2e5760008460030b13159050610a8e565b8663ffffffff16600703610a4a5760008460030b139050610a8e565b8663ffffffff16600103610a8e57601f601087901c166000819003610a735760008560030b1291505b8063ffffffff16600103610a8c5760008560030b121591505b505b606082018051608084015163ffffffff169091528115610ad4576002610ab98861ffff166010610877565b63ffffffff90811690911b8201600401166080840152610ae6565b60808301805160040163ffffffff1690525b610aee610619565b98975050505050505050565b6000603f601a86901c16801580610b29575060088163ffffffff1610158015610b295750600f8163ffffffff16105b15610f7f57603f86168160088114610b705760098114610b7957600a8114610b8257600b8114610b8b57600c8114610b9457600d8114610b9d57600e8114610ba657610bab565b60209150610bab565b60219150610bab565b602a9150610bab565b602b9150610bab565b60249150610bab565b60259150610bab565b602691505b508063ffffffff16600003610bd25750505063ffffffff8216601f600686901c161b610611565b8063ffffffff16600203610bf85750505063ffffffff8216601f600686901c161c610611565b8063ffffffff16600303610c2e57601f600688901c16610c2463ffffffff8716821c6020839003610877565b9350505050610611565b8063ffffffff16600403610c505750505063ffffffff8216601f84161b610611565b8063ffffffff16600603610c725750505063ffffffff8216601f84161c610611565b8063ffffffff16600703610ca557610c9c8663ffffffff168663ffffffff16901c87602003610877565b92505050610611565b8063ffffffff16600803610cbd578592505050610611565b8063ffffffff16600903610cd5578592505050610611565b8063ffffffff16600a03610ced578592505050610611565b8063ffffffff16600b03610d05578592505050610611565b8063ffffffff16600c03610d1d578592505050610611565b8063ffffffff16600f03610d35578592505050610611565b8063ffffffff16601003610d4d578592505050610611565b8063ffffffff16601103610d65578592505050610611565b8063ffffffff16601203610d7d578592505050610611565b8063ffffffff16601303610d95578592505050610611565b8063ffffffff16601803610dad578592505050610611565b8063ffffffff16601903610dc5578592505050610611565b8063ffffffff16601a03610ddd578592505050610611565b8063ffffffff16601b03610df5578592505050610611565b8063ffffffff16602003610e0e57505050828201610611565b8063ffffffff16602103610e2757505050828201610611565b8063ffffffff16602203610e4057505050818303610611565b8063ffffffff16602303610e5957505050818303610611565b8063ffffffff16602403610e7257505050828216610611565b8063ffffffff16602503610e8b57505050828217610611565b8063ffffffff16602603610ea457505050828218610611565b8063ffffffff16602703610ebe5750505082821719610611565b8063ffffffff16602a03610eef578460030b8660030b12610ee0576000610ee3565b60015b60ff1692505050610611565b8063ffffffff16602b03610f17578463ffffffff168663ffffffff1610610ee0576000610ee3565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e000000000000000000000000006044820152606401610807565b50610f17565b8063ffffffff16601c0361100357603f86166002819003610fa557505050828202610611565b8063ffffffff1660201480610fc057508063ffffffff166021145b15610f79578063ffffffff16602003610fd7579419945b60005b6380000000871615610ff9576401fffffffe600197881b169601610fda565b9250610611915050565b8063ffffffff16600f0361102557505065ffffffff0000601083901b16610611565b8063ffffffff16602003611059576101d38560031660080260180363ffffffff168463ffffffff16901c60ff166008610877565b8063ffffffff1660210361108e576101d38560021660080260100363ffffffff168463ffffffff16901c61ffff166010610877565b8063ffffffff166022036110bd57505063ffffffff60086003851602811681811b198416918316901b17610611565b8063ffffffff166023036110d45782915050610611565b8063ffffffff16602403611106578460031660080260180363ffffffff168363ffffffff16901c60ff16915050610611565b8063ffffffff16602503611139578460021660080260100363ffffffff168363ffffffff16901c61ffff16915050610611565b8063ffffffff1660260361116b57505063ffffffff60086003851602601803811681811c198416918316901c17610611565b8063ffffffff166028036111a157505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610611565b8063ffffffff166029036111d857505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610611565b8063ffffffff16602a0361120757505063ffffffff60086003851602811681811c198316918416901c17610611565b8063ffffffff16602b0361121e5783915050610611565b8063ffffffff16602e0361125057505063ffffffff60086003851602601803811681811b198316918416901b17610611565b8063ffffffff166030036112675782915050610611565b8063ffffffff16603803610f175783915050610611565b6000611288611bdf565b506080602063ffffffff8616106112fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c69642072656769737465720000000000000000000000000000000000006044820152606401610807565b63ffffffff85161580159061130d5750825b1561134157838161016001518663ffffffff166020811061133057611330611d1e565b63ffffffff90921660209290920201525b60808101805163ffffffff8082166060850152600490910116905261086e610619565b600061136e611bdf565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa036113e85781610fff8116156113b757610fff811661100003015b8363ffffffff166000036113de5760e08801805163ffffffff8382011690915295506113e2565b8395505b50611857565b8563ffffffff16610fcd036114035763400000009450611857565b8563ffffffff166110180361141b5760019450611857565b8563ffffffff166110960361145057600161012088015260ff8316610100880152611444610619565b97505050505050505090565b8563ffffffff16610fa3036116ba5763ffffffff831615611857577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb63ffffffff8416016116745760006114ab8363fffffffc1660016106c1565b60208901519091508060001a6001036115185761151581600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b90505b6040808a015190517fe03110e10000000000000000000000000000000000000000000000000000000081526004810183905263ffffffff9091166024820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e03110e1906044016040805180830381865afa1580156115b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115dd9190611d4d565b915091506003861680600403828110156115f5578092505b5081861015611602578591505b8260088302610100031c9250826008828460040303021b9250600180600883600403021b036001806008858560040303021b039150811981169050838119871617955050506116598663fffffffc16600186611a92565b60408b018051820163ffffffff16905297506116b592505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd63ffffffff8416016116a957809450611857565b63ffffffff9450600993505b611857565b8563ffffffff16610fa4036117ab5763ffffffff8316600114806116e4575063ffffffff83166002145b806116f5575063ffffffff83166004145b1561170257809450611857565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa63ffffffff8416016116a95760006117428363fffffffc1660016106c1565b6020890151909150600384166004038381101561175d578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b17602088015260006040880152935083611857565b8563ffffffff16610fd703611857578163ffffffff1660030361184b5763ffffffff831615806117e1575063ffffffff83166005145b806117f2575063ffffffff83166003145b156118005760009450611857565b63ffffffff83166001148061181b575063ffffffff83166002145b8061182c575063ffffffff83166006145b8061183d575063ffffffff83166004145b156116a95760019450611857565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b01526004019091169052611444610619565b60006118a2611bdf565b506080600063ffffffff87166010036118c0575060c0810151611a29565b8663ffffffff166011036118df5763ffffffff861660c0830152611a29565b8663ffffffff166012036118f8575060a0810151611a29565b8663ffffffff166013036119175763ffffffff861660a0830152611a29565b8663ffffffff1660180361194b5763ffffffff600387810b9087900b02602081901c821660c08501521660a0830152611a29565b8663ffffffff1660190361197c5763ffffffff86811681871602602081901c821660c08501521660a0830152611a29565b8663ffffffff16601a036119d2578460030b8660030b8161199f5761199f611d71565b0763ffffffff1660c0830152600385810b9087900b816119c1576119c1611d71565b0563ffffffff1660a0830152611a29565b8663ffffffff16601b03611a29578463ffffffff168663ffffffff16816119fb576119fb611d71565b0663ffffffff90811660c084015285811690871681611a1c57611a1c611d71565b0463ffffffff1660a08301525b63ffffffff841615611a6457808261016001518563ffffffff1660208110611a5357611a53611d1e565b63ffffffff90921660209290920201525b60808201805163ffffffff80821660608601526004909101169052611a87610619565b979650505050505050565b6000611a9d83611b36565b90506003841615611aad57600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b811015611b2b5760208401933582821c6001168015611afb5760018114611b1057611b21565b60008581526020839052604090209450611b21565b600082815260208690526040902094505b5050600101611ad3565b505060805250505050565b60ff811661038002610184810190369061050401811015611bd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f636865636b207468617420746865726520697320656e6f7567682063616c6c6460448201527f61746100000000000000000000000000000000000000000000000000000000006064820152608401610807565b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611c45611c4a565b905290565b6040518061040001604052806020906020820280368337509192915050565b60008083601f840112611c7b57600080fd5b50813567ffffffffffffffff811115611c9357600080fd5b602083019150836020828501011115611cab57600080fd5b9250929050565b60008060008060408587031215611cc857600080fd5b843567ffffffffffffffff80821115611ce057600080fd5b611cec88838901611c69565b90965094506020870135915080821115611d0557600080fd5b50611d1287828801611c69565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008060408385031215611d60
57600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c634300080f000a"
var
MIPSDeployedSourceMap
=
"1131:3
7346:105:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1710:45;;1745:10;1710:45;;;;;188:10:257;176:23;;;158:42;;146:2;131:18;1710:45:105;;;;;;;;2448:99;;;412:42:257;2534:6:105;400:55:257;382:74;;370:2;355:18;2448:99:105;211:251:257;24925:6339:105;;;;;;:::i;:::-;;:::i;:::-;;;1687:25:257;;;1675:2;1660:18;24925:6339:105;1541:177:257;24925:6339:105;25003:7;25046:18;;:::i;:::-;25193:4;25186:5;25183:15;25173:134;;25287:1;25284;25277:12;25173:134;25343:4;25337:11;25350;25334:28;25324:137;;25441:1;25438;25431:12;25324:137;25509:3;25491:16;25488:25;25478:150;;25608:1;25605;25598:12;25478:150;25672:3;25658:12;25655:21;25645:145;;25770:1;25767;25760:12;25645:145;26050:24;;26394:4;26096:20;26452:2;26154:21;;26050:24;26212:18;26096:20;26154:21;;;26050:24;26027:21;26023:52;;;26212:18;26096:20;;;26154:21;;;26050:24;26023:52;;26096:20;;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;;26212:18;26096:20;26154:21;;;26050:24;26027:21;26023:52;;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;27070:10;26212:18;27060:21;;;26154;;;;27168:1;27153:77;27178:2;27175:1;27172:9;27153:77;;;26050:24;;26027:21;26023:52;26096:20;;27226:1;26154:21;;;;26038:2;26212:18;;;;27196:1;27189:9;27153:77;;;27157:14;;;27308:5;:12;;;27304:71;;;27347:13;:11;:13::i;:::-;27340:20;;;;;27304:71;27389:10;;;:15;;27403:1;27389:15;;;;;27474:8;;;;-1:-1:-1;;27466:20:105;;-1:-1:-1;27466:7:105;:20::i;:::-;27452:34;-1:-1:-1;27516:10:105;27524:2;27516:10;;;;27593:1;27583:11;;;:26;;;27598:6;:11;;27608:1;27598:11;27583:26;27579:310;;;27739:13;27808:1;27786:4;27793:10;27786:17;27785:24;;;;27756:5;:12;;;27771:10;27756:25;27755:54;27739:70;;27834:40;27845:6;:11;;27855:1;27845:11;:20;;27863:2;27845:20;;;27859:1;27845:20;27834:40;;27867:6;27834:10;:40::i;:::-;27827:47;;;;;;;;27579:310;28138:15;;;;27933:9;;;;28070:4;28064:2;28056:10;;;28055:19;;;28138:15;28163:2;28155:10;;;28154:19;28138:36;;;;;;;:::i;:::-;;;;;;-1:-1:-1;28203:5:105;28227:11;;;;;:29;;;28242:6;:14;;28252:4;28242:14;28227:29;28223:832;;;28319:5;:15;;;28335:5;28319:22;;;;;;;;;:::i;:::-;;;;;;-1:-1:-1;;28382:4:105;28376:2;28368:10;;;28367:19;28223:832;;;28420:4;28411:6;:13;;;28407:648;;;28541:6;:13;;28551:3;28541:13;:30;;;;28558:6;:13;;28568:3;28558:13;28541:30;:47;;;;28575:6;:13;;28585:3;28575:13;28541:47;28537:253;;;28651:4;28658:6;28651:13;28646:18;;28407:648;;28537:253;28750:21;28753:4;28760:6;28753:13;28768:2;28750;:21::i;:::-;28745:26;;28407:648;;;28824:4;28814:6;:14;;;;:32;;;;28832:6;:14;;28842:4;28832:14;28814:32;:50;;;;28850:6;:14;;28860:4;28850:14;28814:50;28810:245;;;28934:5;:15;;;28950:5;28934:22;;;;;;;;;:::i;:::-;;;;;28929:27;;29035:5;29027:13;;28810:245;29084:1;29074:6;:11;;;;:25;;;;;29098:1;29089:6;:10;;;29074:25;29073:42;;;;29104:6;:11;;29114:1;29104:11;29073:42;29069:125;;;29142:37;29155:6;29163:4;29169:5;29176:2;29142:12;:37::i;:::-;29135:44;;;;;;;;;;;29069:125;29227:13;29208:16;29379:4;29369:14;;;;29365:446;;29448:21;29451:4;29458:6;29451:13;29466:2;29448;:21::i;:::-;29442:27;;;;29506:10;29501:15;;29540:16;29501:15;29554:1;29540:7;:16::i;:::-;29534:22;;29588:4;29578:6;:14;;;;:32;;;;;29596:6;:14;;29606:4;29596:14;;29578:32;29574:223;;;29675:4;29663:16;;29777:1;29769:9;;29574:223;29385:426;29365:446;29844:10;29857:26;29865:4;29871:2;29875;29879:3;29857:7;:26::i;:::-;29886:10;29857:39;;;;-1:-1:-1;29982:4:105;29975:11;;;30014;;;:24;;;;;30037:1;30029:4;:9;;;;30014:24;:39;;;;;30049:4;30042;:11;;;30014:39;30010:847;;;30077:4;:9;;30085:1;30077:9;:22;;;;30090:4;:9;;30098:1;30090:9;30077:22;30073:144;;;30161:37;30172:4;:9;;30180:1;30172:9;:21;;30188:5;30172:21;;;30184:1;30172:21;30195:2;30161:10;:37::i;:::-;30154:44;;;;;;;;;;;;;;;30073:144;30239:4;:11;;30247:3;30239:11;30235:121;;30309:28;30318:5;30325:2;30329:7;;;;30309:8;:28::i;30235:121::-;30377:4;:11;;30385:3;30377:11;30373:121;;30447:28;30456:5;30463:2;30467:7;;;;;30447:8;:28::i;30373:121::-;30564:4;:11;;30572:3;30564:11;30560:80;;30606:15;:13;:15::i;30560:80::-;30743:4;30735;:12;;;;:27;;;;;30758:4;30751;:11;;;30735:27;30731:112;;;30793:31;30804:4;30810:2;30814;30818:5;30793:10;:31::i;30731:112::-;30917:6;:14;;30927:4;30917:14;:28;;;;-1:-1:-1;30935:10:105;;;;;30917:28;30913:93;;;30990:1;30965:5;:15;;;30981:5;30965:22;;;;;;;;;:::i;:::-;:26;;;;:22;;;;;;:26;30913:93;31052:9;:26;;31065:13;31052:26;31048:92;;31098:27;31107:9;31118:1;31121:3;31098:8;:27::i;:::-;31221:26;31230:5;31237:3;31242:4;31221:8;:26::i;:::-;31214:33;;;;;;;;;;;;;24925:6339;;;;;;;:::o;3087:1709::-;3634:4;3628:11;;3550:4;3353:31;3342:43;;3413:13;3353:31;3752:2;3452:13;;3342:43;3359:24;3353:31;3452:13;;;3342:43;;;;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3128:12;;4337:13;;3452;;;3128:12;4417:84;4442:2;4439:1;4436:9;4417:84;;;3369:13;3359:24;;3353:31;3342:43;;3373:2;3413:13;;;;4497:1;3452:13;;;;4460:1;4453:9;4417:84;;;4421:14;4564:1;4560:2;4553:13;4659:5;4655:2;4651:14;4644:5;4639:27;4765:14;;;4748:32;;;3087:1709;-1:-1:-1;;3087:1709:105:o;20980:1831::-;21053:11;21164:14;21181:24;21193:11;21181;:24::i;:::-;21164:41;;21313:1;21306:5;21302:13;21299:33;;;21328:1;21325;21318:12;21299:33;21461:2;21449:15;;;21402:20;21891:5;21888:1;21884:13;21926:4;21962:1;21947:343;21972:2;21969:1;21966:9;21947:343;;;22095:2;22083:15;;;22032:20;22130:12;;;22144:1;22126:20;22167:42;;;;22235:1;22230:42;;;;22119:153;;22167:42;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;22176:31;;22167:42;;22230;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;22239:31;;22119:153;-1:-1:-1;;21990:1:105;21983:9;21947:343;;;21951:14;22400:4;22394:11;22379:26;;22486:7;22480:4;22477:17;22467:124;;22528:10;22525:1;22518:21;22570:2;22567:1;22560:13;22467:124;-1:-1:-1;;22718:2:105;22707:14;;;;22695:10;22691:31;22688:1;22684:39;22752:16;;;;22770:10;22748:33;;20980:1831;-1:-1:-1;;;20980:1831:105:o;18090:823::-;18159:12;18246:18;;:::i;:::-;18314:4;18305:13;;18366:5;:8;;;18377:1;18366:12;18350:28;;:5;:12;;;:28;;;18346:95;;18398:28;;;;;2114:2:257;18398:28:105;;;2096:21:257;2153:2;2133:18;;;2126:30;2192:20;2172:18;;;2165:48;2230:18;;18398:28:105;;;;;;;;18346:95;18530:8;;;;;18563:12;;;;;18552:23;;;;;;;18589:20;;;;;18530:8;18721:13;;;18717:90;;18782:6;18791:1;18782:10;18754:5;:15;;;18770:8;18754:25;;;;;;;;;:::i;:::-;:38;;;;:25;;;;;;:38;18717:90;18883:13;:11;:13::i;:::-;18876:20;18090:823;-1:-1:-1;;;;;18090:823:105:o;2645:334::-;2706:6;2765:18;;;;2774:8;;;;2765:18;;;;;;2764:25;;;;;2781:1;2828:2;:9;;;2822:16;;;;;2821:22;;2820:32;;;;;;;2882:9;;2881:15;2764:25;2939:21;;2959:1;2939:21;;;2950:6;2939:21;2924:11;;;;;:37;;-1:-1:-1;;;2645:334:105;;;;:::o;12951:2026::-;13048:12;13134:18;;:::i;:::-;13202:4;13193:13;;13234:17;13294:5;:8;;;13305:1;13294:12;13278:28;;:5;:12;;;:28;;;13274:97;;13326:30;;;;;2461:2:257;13326:30:105;;;2443:21:257;2500:2;2480:18;;;2473:30;2539:22;2519:18;;;2512:50;2579:18;;13326:30:105;2259:344:257;13274:97:105;13441:7;:12;;13452:1;13441:12;:28;;;;13457:7;:12;;13468:1;13457:12;13441:28;13437:947;;;13489:9;13501:5;:15;;;13517:6;13501:23;;;;;;;;;:::i;:::-;;;;;13489:35;;13565:2;13558:9;;:3;:9;;;:25;;;;;13571:7;:12;;13582:1;13571:12;13558:25;13557:58;;;;13596:2;13589:9;;:3;:9;;;;:25;;;;;13602:7;:12;;13613:1;13602:12;13589:25;13542:73;;13471:159;13437:947;;;13727:7;:12;;13738:1;13727:12;13723:661;;13788:1;13780:3;13774:15;;;;13759:30;;13723:661;;;13892:7;:12;;13903:1;13892:12;13888:496;;13952:1;13945:3;13939:14;;;13924:29;;13888:496;;;14073:7;:12;;14084:1;14073:12;14069:315;;14161:4;14155:2;14146:11;;;14145:20;14131:10;14188:8;;;14184:84;;14248:1;14241:3;14235:14;;;14220:29;;14184:84;14289:3;:8;;14296:1;14289:8;14285:85;;14350:1;14342:3;14336:15;;;;14321:30;;14285:85;14087:297;14069:315;14460:8;;;;;14538:12;;;;14527:23;;;;;14694:178;;;;14785:1;14759:22;14762:5;14770:6;14762:14;14778:2;14759;:22::i;:::-;:27;;;;;;;14745:42;;14754:1;14745:42;14730:57;:12;;;:57;14694:178;;;14841:12;;;;;14856:1;14841:16;14826:31;;;;14694:178;14947:13;:11;:13::i;:::-;14940:20;12951:2026;-1:-1:-1;;;;;;;;12951:2026:105:o;31310:7165::-;31397:6;31455:10;31463:2;31455:10;;;;;;31503:11;;31552:4;31543:13;;31539:6876;;;31683:1;31673:6;:11;;;;:27;;;;;31697:3;31688:6;:12;;;31673:27;31669:537;;;31728:6;:11;;31738:1;31728:11;31724:423;;-1:-1:-1;31748:4:105;31724:423;;;31792:6;:11;;31802:1;31792:11;31788:359;;-1:-1:-1;31812:4:105;31788:359;;;31857:6;:13;;31867:3;31857:13;31853:294;;-1:-1:-1;31879:4:105;31853:294;;;31923:6;:13;;31933:3;31923:13;31919:228;;-1:-1:-1;31945:4:105;31919:228;;;31990:6;:13;;32000:3;31990:13;31986:161;;-1:-1:-1;32012:4:105;31986:161;;;32056:6;:13;;32066:3;32056:13;32052:95;;-1:-1:-1;32078:4:105;32052:95;;;32121:6;:13;;32131:3;32121:13;32117:30;;-1:-1:-1;32143:4:105;32117:30;32186:1;32177:10;;31669:537;32267:6;:11;;32277:1;32267:11;32263:3554;;32331:4;32326:1;32318:9;;;32317:18;32368:4;32318:9;32361:11;;;32357:1319;;;32460:4;32452;:12;;;32448:1206;;32503:2;32496:9;;;;;;;32448:1206;32617:4;:12;;32625:4;32617:12;32613:1041;;32668:11;;;;;;;;-1:-1:-1;32661:18:105;;-1:-1:-1;;32661:18:105;32613:1041;32792:4;:12;;32800:4;32792:12;32788:866;;32843:11;;;;;;;;-1:-1:-1;32836:18:105;;-1:-1:-1;;32836:18:105;32788:866;32970:4;:12;;32978:4;32970:12;32966:688;;33021:27;33030:5;33024:11;;:2;:11;;;;33042:5;33037:2;:10;33021:2;:27::i;:::-;33014:34;;;;;;;32966:688;33170:4;:12;;33178:4;33170:12;33166:488;;-1:-1:-1;;;;33221:17:105;;;33233:4;33228:9;;33221:17;33214:24;;33166:488;33361:4;:12;;33369:4;33361:12;33357:297;;-1:-1:-1;;;;33412:17:105;;;33424:4;33419:9;;33412:17;33405:24;;33357:297;33555:4;:12;;33563:4;33555:12;33551:103;;33606:21;33615:2;33609:8;;:2;:8;;;;33624:2;33619;:7;33606:2;:21::i;33551:103::-;33836:4;:12;;33844:4;33836:12;:28;;;;33852:4;:12;;33860:4;33852:12;33836:28;33832:1151;;;33904:2;33899;:7;33892:14;;;;;;;33832:1151;33994:4;:12;;34002:4;33994:12;:28;;;;34010:4;:12;;34018:4;34010:12;33994:28;33990:993;;;34062:2;34057;:7;34050:14;;;;;;;33990:993;34144:4;:12;;34152:4;34144:12;34140:843;;34196:2;34191;:7;34184:14;;;;;;;34140:843;34277:4;:12;;34285:4;34277:12;34273:710;;34330:2;34325;:7;34317:16;;;;;;;34273:710;34413:4;:12;;34421:4;34413:12;34409:574;;34466:2;34461;:7;34453:16;;;;;;;34409:574;34549:4;:12;;34557:4;34549:12;34545:438;;-1:-1:-1;;;;34598:7:105;;;34596:10;34589:17;;34545:438;34709:4;:12;;34717:4;34709:12;34705:278;;34774:2;34756:21;;34762:2;34756:21;;;:29;;34784:1;34756:29;;;34780:1;34756:29;34749:36;;;;;;;;;34705:278;34898:4;:12;;34906:4;34898:12;34894:89;;34950:2;34945:7;;:2;:7;;;:15;;34959:1;34945:15;;34894:89;32280:2721;31539:6876;;32263:3554;35072:6;:13;;35082:3;35072:13;35068:749;;35122:2;35116;:8;;;;35109:15;;;;;;35068:749;35197:6;:14;;35207:4;35197:14;35193:624;;35266:4;:9;;35274:1;35266:9;35262:100;;-1:-1:-1;;;35317:21:105;;;35303:36;;35262:100;35414:4;:12;;35422:4;35414:12;:28;;;;35430:4;:12;;35438:4;35430:12;35414:28;35410:389;;;35474:4;:12;;35482:4;35474:12;35470:83;;35523:3;;;35470:83;35578:8;35616:127;35628:10;35623:15;;:20;35616:127;;35708:8;35675:3;35708:8;;;;;35675:3;35616:127;;;35775:1;-1:-1:-1;35768:8:105;;-1:-1:-1;;35768:8:105;35410:389;31539:6876;;;35850:4;35841:6;:13;;;35837:2578;;;35900:6;:14;;35910:4;35900:14;35896:1208;;35945:42;35963:2;35968:1;35963:6;35973:1;35962:12;35957:2;:17;35949:26;;:3;:26;;;;35979:4;35948:35;35985:1;35945:2;:42::i;:::-;35938:49;;;;;;35896:1208;36054:6;:14;;36064:4;36054:14;36050:1054;;36099:45;36117:2;36122:1;36117:6;36127:1;36116:12;36111:2;:17;36103:26;;:3;:26;;;;36133:6;36102:37;36141:2;36099;:45::i;36050:1054::-;36212:6;:14;;36222:4;36212:14;36208:896;;-1:-1:-1;;;36263:21:105;36282:1;36277;36272:6;;36271:12;36263:21;;36320:36;;;36391:5;36386:10;;36263:21;;;;;36385:18;36378:25;;36208:896;36470:6;:14;;36480:4;36470:14;36466:638;;36515:3;36508:10;;;;;;36466:638;36586:6;:14;;36596:4;36586:14;36582:522;;36646:2;36651:1;36646:6;36656:1;36645:12;36640:2;:17;36632:26;;:3;:26;;;;36662:4;36631:35;36624:42;;;;;;36582:522;36734:6;:14;;36744:4;36734:14;36730:374;;36794:2;36799:1;36794:6;36804:1;36793:12;36788:2;:17;36780:26;;:3;:26;;;;36810:6;36779:37;36772:44;;;;;;36730:374;36884:6;:14;;36894:4;36884:14;36880:224;;-1:-1:-1;;;36935:26:105;36959:1;36954;36949:6;;36948:12;36943:2;:17;36935:26;;36997:41;;;37073:5;37068:10;;36935:26;;;;;37067:18;37060:25;;35837:2578;37158:6;:14;;37168:4;37158:14;37154:1261;;-1:-1:-1;;;37211:4:105;37205:34;37237:1;37232;37227:6;;37226:12;37221:2;:17;37205:34;;37291:27;;;37271:48;;;37345:10;;37206:9;;;37205:34;;37344:18;37337:25;;37154:1261;37417:6;:14;;37427:4;37417:14;37413:1002;;-1:-1:-1;;;37470:6:105;37464:36;37498:1;37493;37488:6;;37487:12;37482:2;:17;37464:36;;37552:29;;;37532:50;;;37608:10;;37465:11;;;37464:36;;37607:18;37600:25;;37413:1002;37681:6;:14;;37691:4;37681:14;37677:738;;-1:-1:-1;;;37728:20:105;37746:1;37741;37736:6;;37735:12;37728:20;;37780:36;;;37848:5;37842:11;;37728:20;;;;;37841:19;37834:26;;37677:738;37915:6;:14;;37925:4;37915:14;37911:504;;37956:2;37949:9;;;;;;37911:504;38014:6;:14;;38024:4;38014:14;38010:405;;-1:-1:-1;;;38061:25:105;38084:1;38079;38074:6;;38073:12;38068:2;:17;38061:25;;38118:41;;;38191:5;38185:11;;38061:25;;;;;38184:19;38177:26;;38010:405;38258:6;:14;;38268:4;38258:14;38254:161;;38299:3;38292:10;;;;;;38254:161;38357:6;:14;;38367:4;38357:14;38353:62;;38398:2;38391:9;;;;;;38353:62;38429:29;;;;;2810:2:257;38429:29:105;;;2792:21:257;2849:2;2829:18;;;2822:30;2888:21;2868:18;;;2861:49;2927:18;;38429:29:105;2608:343:257;19194:782:105;19280:12;19367:18;;:::i;:::-;-1:-1:-1;19435:4:105;19542:2;19530:14;;;;19522:41;;;;;;;3158:2:257;19522:41:105;;;3140:21:257;3197:2;3177:18;;;3170:30;3236:16;3216:18;;;3209:44;3270:18;;19522:41:105;2956:338:257;19522:41:105;19659:14;;;;;;;:30;;;19677:12;19659:30;19655:102;;;19738:4;19709:5;:15;;;19725:9;19709:26;;;;;;;;;:::i;:::-;:33;;;;:26;;;;;;:33;19655:102;19812:12;;;;;19801:23;;;;:8;;;:23;19868:1;19853:16;;;19838:31;;;19946:13;:11;:13::i;4837:7728::-;4880:12;4966:18;;:::i;:::-;-1:-1:-1;5144:15:105;;:18;;;;5034:4;5304:18;;;;5348;;;;5392;;;;;5034:4;;5124:17;;;;5304:18;5348;5482;;;5496:4;5482:18;5478:6777;;5532:2;5561:4;5556:9;;:14;5552:144;;5672:4;5667:9;;5659:4;:18;5653:24;5552:144;5717:2;:7;;5723:1;5717:7;5713:161;;5753:10;;;;;5785:16;;;;;;;;5753:10;-1:-1:-1;5713:161:105;;;5853:2;5848:7;;5713:161;5502:386;5478:6777;;;5990:10;:18;;6004:4;5990:18;5986:6269;;1745:10;6028:14;;5986:6269;;;6126:10;:18;;6140:4;6126:18;6122:6133;;6169:1;6164:6;;6122:6133;;;6294:10;:18;;6308:4;6294:18;6290:5965;;6347:4;6332:12;;;:19;6369:26;;;:14;;;:26;6420:13;:11;:13::i;:::-;6413:20;;;;;;;;;4837:7728;:::o;6290:5965::-;6559:10;:18;;6573:4;6559:18;6555:5700;;6710:14;;;6706:2708;6555:5700;6706:2708;6880:22;;;;;6876:2538;;7005:10;7018:27;7026:2;7031:10;7026:15;7043:1;7018:7;:27::i;:::-;7129:17;;;;7005:40;;-1:-1:-1;7129:17:105;7107:19;7279:14;7298:1;7273:26;7269:131;;7341:36;7365:11;1277:21:106;1426:15;;;1467:8;1461:4;1454:22;1595:4;1582:18;;1602:19;1578:44;1624:11;1575:61;;1222:430;7341:36:105;7327:50;;7269:131;7486:20;;;;;7453:54;;;;;;;;3472:25:257;;;7453:54:105;3533:23:257;;;3513:18;;;3506:51;7422:11:105;;;;7453:19;:6;:19;;;;3445:18:257;;7453:54:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7421:86;;;;7734:1;7730:2;7726:10;7831:9;7828:1;7824:17;7913:6;7906:5;7903:17;7900:40;;;7933:5;7923:15;;7900:40;;8016:6;8012:2;8009:14;8006:34;;;8036:2;8026:12;;8006:34;8142:3;8137:1;8129:6;8125:14;8120:3;8116:24;8112:34;8105:41;;8242:3;8238:1;8226:9;8217:6;8214:1;8210:14;8206:30;8202:38;8198:48;8191:55;;8397:1;8393;8389;8377:9;8374:1;8370:17;8366:25;8362:33;8358:41;8524:1;8520;8516;8507:6;8495:9;8492:1;8488:17;8484:30;8480:38;8476:46;8472:54;8454:72;;8655:10;8651:15;8645:4;8641:26;8633:34;;8771:3;8763:4;8759:9;8754:3;8750:19;8747:28;8740:35;;;;8917:33;8926:2;8931:10;8926:15;8943:1;8946:3;8917:8;:33::i;:::-;8972:20;;;:38;;;;;;;;;-1:-1:-1;6876:2538:105;;-1:-1:-1;;;6876:2538:105;;9129:18;;;;;9125:289;;9299:2;9294:7;;6555:5700;;9125:289;9353:10;9348:15;;2053:3;9385:10;;9125:289;6555:5700;;;9543:10;:18;;9557:4;9543:18;9539:2716;;9697:15;;;1824:1;9697:15;;:34;;-1:-1:-1;9716:15:105;;;1859:1;9716:15;9697:34;:57;;;-1:-1:-1;9735:19:105;;;1936:1;9735:19;9697:57;9693:1593;;;9783:2;9778:7;;9539:2716;;9693:1593;9909:23;;;;;9905:1381;;9956:10;9969:27;9977:2;9982:10;9977:15;9994:1;9969:7;:27::i;:::-;10072:17;;;;9956:40;;-1:-1:-1;10315:1:105;10307:10;;10409:1;10405:17;10484:13;;;10481:32;;;10506:5;10500:11;;10481:32;10792:14;;;10598:1;10788:22;;;10784:32;;;;10681:26;10705:1;10590:10;;;10685:18;;;10681:26;10780:43;10586:20;;10888:12;11016:17;;;:23;11084:1;11061:20;;;:24;10594:2;-1:-1:-1;10594:2:105;6555:5700;;9539:2716;11488:10;:18;;11502:4;11488:18;11484:771;;11598:2;:7;;11604:1;11598:7;11594:647;;11691:14;;;;;:40;;-1:-1:-1;11709:22:105;;;1978:1;11709:22;11691:40;:62;;;-1:-1:-1;11735:18:105;;;1897:1;11735:18;11691:62;11687:404;;;11786:1;11781:6;;11594:647;;11687:404;11832:15;;;1824:1;11832:15;;:34;;-1:-1:-1;11851:15:105;;;1859:1;11851:15;11832:34;:61;;;-1:-1:-1;11870:23:105;;;2021:1;11870:23;11832:61;:84;;;-1:-1:-1;11897:19:105;;;1936:1;11897:19;11832:84;11828:263;;;11949:1;11944:6;;6555:5700;;11594:647;12142:10;12137:15;;2087:4;12174:11;;11594:647;12330:15;;;;;:23;;;;:18;;;;:23;;;;12367:15;;:23;;;:18;;;;:23;-1:-1:-1;12456:12:105;;;;12445:23;;;:8;;;:23;12512:1;12497:16;12482:31;;;;;12535:13;:11;:13::i;15318:2480::-;15412:12;15498:18;;:::i;:::-;-1:-1:-1;15566:4:105;15598:10;15706:13;;;15715:4;15706:13;15702:1705;;-1:-1:-1;15745:8:105;;;;15702:1705;;;15864:5;:13;;15873:4;15864:13;15860:1547;;15897:14;;;:8;;;:14;15860:1547;;;16027:5;:13;;16036:4;16027:13;16023:1384;;-1:-1:-1;16066:8:105;;;;16023:1384;;;16185:5;:13;;16194:4;16185:13;16181:1226;;16218:14;;;:8;;;:14;16181:1226;;;16359:5;:13;;16368:4;16359:13;16355:1052;;16486:9;16432:17;16412;;;16432;;;;16412:37;16493:2;16486:9;;;;;16468:8;;;:28;16514:22;:8;;;:22;16355:1052;;;16673:5;:13;;16682:4;16673:13;16669:738;;16740:11;16726;;;16740;;;16726:25;16795:2;16788:9;;;;;16770:8;;;:28;16816:22;:8;;;:22;16669:738;;;16997:5;:13;;17006:4;16997:13;16993:414;;17067:3;17048:23;;17054:3;17048:23;;;;;;;:::i;:::-;;17030:42;;:8;;;:42;17108:23;;;;;;;;;;;;;:::i;:::-;;17090:42;;:8;;;:42;16993:414;;;17301:5;:13;;17310:4;17301:13;17297:110;;17351:3;17345:9;;:3;:9;;;;;;;:::i;:::-;;17334:20;;;;:8;;;:20;17383:9;;;;;;;;;;;:::i;:::-;;17372:20;;:8;;;:20;17297:110;17500:14;;;;17496:85;;17563:3;17534:5;:15;;;17550:9;17534:26;;;;;;;;;:::i;:::-;:32;;;;:26;;;;;;:32;17496:85;17635:12;;;;;17624:23;;;;:8;;;:23;17691:1;17676:16;;;17661:31;;;17768:13;:11;:13::i;:::-;17761:20;15318:2480;-1:-1:-1;;;;;;;15318:2480:105:o;23147:1654::-;23323:14;23340:24;23352:11;23340;:24::i;:::-;23323:41;;23472:1;23465:5;23461:13;23458:33;;;23487:1;23484;23477:12;23458:33;23626:2;23820:15;;;23645:2;23634:14;;23622:10;23618:31;23615:1;23611:39;23776:16;;;23561:20;;23761:10;23750:22;;;23746:27;23736:38;23733:60;24262:5;24259:1;24255:13;24333:1;24318:343;24343:2;24340:1;24337:9;24318:343;;;24466:2;24454:15;;;24403:20;24501:12;;;24515:1;24497:20;24538:42;;;;24606:1;24601:42;;;;24490:153;;24538:42;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;24547:31;;24538:42;;24601;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;24610:31;;24490:153;-1:-1:-1;;24361:1:105;24354:9;24318:343;;;-1:-1:-1;;24760:4:105;24753:18;-1:-1:-1;;;;23147:1654:105:o;20180:586::-;20502:20;;;20526:7;20502:32;20495:3;:40;;;20608:14;;20663:17;;20657:24;;;20649:72;;;;;;;4209:2:257;20649:72:105;;;4191:21:257;4248:2;4228:18;;;4221:30;4287:34;4267:18;;;4260:62;4358:5;4338:18;;;4331:33;4381:19;;20649:72:105;4007:399:257;20649:72:105;20735:14;20180
:586;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;467:347:257:-;518:8;528:6;582:3;575:4;567:6;563:17;559:27;549:55;;600:1;597;590:12;549:55;-1:-1:-1;623:20:257;;666:18;655:30;;652:50;;;698:1;695;688:12;652:50;735:4;727:6;723:17;711:29;;787:3;780:4;771:6;763;759:19;755:30;752:39;749:59;;;804:1;801;794:12;749:59;467:347;;;;;:::o;819:717::-;909:6;917;925;933;986:2;974:9;965:7;961:23;957:32;954:52;;;1002:1;999;992:12;954:52;1042:9;1029:23;1071:18;1112:2;1104:6;1101:14;1098:34;;;1128:1;1125;1118:12;1098:34;1167:58;1217:7;1208:6;1197:9;1193:22;1167:58;:::i;:::-;1244:8;;-1:-1:-1;1141:84:257;-1:-1:-1;1332:2:257;1317:18;;1304:32;;-1:-1:-1;1348:16:257;;;1345:36;;;1377:1;1374;1367:12;1345:36;;1416:60;1468:7;1457:8;1446:9;1442:24;1416:60;:::i;:::-;819:717;;;;-1:-1:-1;1495:8:257;-1:-1:-1;;;;819:717:257:o;1723:184::-;1775:77;1772:1;1765:88;1872:4;1869:1;1862:15;1896:4;1893:1;1886:15;3568:245;3647:6;3655;3708:2;3696:9;3687:7;3683:23;3679:32;3676:52;;;3724:1;3721;3714:12;3676:52;-1:-1:-1;;3747:16:257;;3803:2;3788:18;;;3782:25;3747:16;;3782:25;;-1:-1:-1;3568:245:257:o;3818:184::-;3870:77;3867:1;3860:88;3967:4;3964:1;3957:15;3991:4;3988:1;3981:15"
var
MIPSDeployedSourceMap
=
"1131:3
8919:105:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1710:45;;1745:10;1710:45;;;;;188:10:257;176:23;;;158:42;;146:2;131:18;1710:45:105;;;;;;;;2448:99;;;412:42:257;2534:6:105;400:55:257;382:74;;370:2;355:18;2448:99:105;211:251:257;24930:6339:105;;;;;;:::i;:::-;;:::i;:::-;;;1687:25:257;;;1675:2;1660:18;24930:6339:105;1541:177:257;24930:6339:105;25008:7;25051:18;;:::i;:::-;25198:4;25191:5;25188:15;25178:134;;25292:1;25289;25282:12;25178:134;25348:4;25342:11;25355;25339:28;25329:137;;25446:1;25443;25436:12;25329:137;25514:3;25496:16;25493:25;25483:150;;25613:1;25610;25603:12;25483:150;25677:3;25663:12;25660:21;25650:145;;25775:1;25772;25765:12;25650:145;26055:24;;26399:4;26101:20;26457:2;26159:21;;26055:24;26217:18;26101:20;26159:21;;;26055:24;26032:21;26028:52;;;26217:18;26101:20;;;26159:21;;;26055:24;26028:52;;26101:20;;26159:21;;;26055:24;26028:52;;26217:18;26101:20;26159:21;;;26055:24;26028:52;;26217:18;26101:20;26159:21;;;26055:24;26028:52;;26217:18;26101:20;26159:21;;;26055:24;26028:52;;;26217:18;26101:20;26159:21;;;26055:24;26032:21;26028:52;;;26217:18;26101:20;26159:21;;;26055:24;26028:52;;26217:18;26101:20;26159:21;;;26055:24;26028:52;;26217:18;26101:20;27075:10;26217:18;27065:21;;;26159;;;;27173:1;27158:77;27183:2;27180:1;27177:9;27158:77;;;26055:24;;26032:21;26028:52;26101:20;;27231:1;26159:21;;;;26043:2;26217:18;;;;27201:1;27194:9;27158:77;;;27162:14;;;27313:5;:12;;;27309:71;;;27352:13;:11;:13::i;:::-;27345:20;;;;;27309:71;27394:10;;;:15;;27408:1;27394:15;;;;;27479:8;;;;-1:-1:-1;;27471:20:105;;-1:-1:-1;27471:7:105;:20::i;:::-;27457:34;-1:-1:-1;27521:10:105;27529:2;27521:10;;;;27598:1;27588:11;;;:26;;;27603:6;:11;;27613:1;27603:11;27588:26;27584:310;;;27744:13;27813:1;27791:4;27798:10;27791:17;27790:24;;;;27761:5;:12;;;27776:10;27761:25;27760:54;27744:70;;27839:40;27850:6;:11;;27860:1;27850:11;:20;;27868:2;27850:20;;;27864:1;27850:20;27839:40;;27872:6;27839:10;:40::i;:::-;27832:47;;;;;;;;27584:310;28143:15;;;;27938:9;;;;28075:4;28069:2;28061:10;;;28060:19;;;28143:15;28168:2;28160:10;;;28159:19;28143:36;;;;;;;:::i;:::-;;;;;;-1:-1:-1;28208:5:105;28232:11;;;;;:29;;;28247:6;:14;;28257:4;28247:14;28232:29;28228:832;;;28324:5;:15;;;28340:5;28324:22;;;;;;;;;:::i;:::-;;;;;;-1:-1:-1;;28387:4:105;28381:2;28373:10;;;28372:19;28228:832;;;28425:4;28416:6;:13;;;28412:648;;;28546:6;:13;;28556:3;28546:13;:30;;;;28563:6;:13;;28573:3;28563:13;28546:30;:47;;;;28580:6;:13;;28590:3;28580:13;28546:47;28542:253;;;28656:4;28663:6;28656:13;28651:18;;28412:648;;28542:253;28755:21;28758:4;28765:6;28758:13;28773:2;28755;:21::i;:::-;28750:26;;28412:648;;;28829:4;28819:6;:14;;;;:32;;;;28837:6;:14;;28847:4;28837:14;28819:32;:50;;;;28855:6;:14;;28865:4;28855:14;28819:50;28815:245;;;28939:5;:15;;;28955:5;28939:22;;;;;;;;;:::i;:::-;;;;;28934:27;;29040:5;29032:13;;28815:245;29089:1;29079:6;:11;;;;:25;;;;;29103:1;29094:6;:10;;;29079:25;29078:42;;;;29109:6;:11;;29119:1;29109:11;29078:42;29074:125;;;29147:37;29160:6;29168:4;29174:5;29181:2;29147:12;:37::i;:::-;29140:44;;;;;;;;;;;29074:125;29232:13;29213:16;29384:4;29374:14;;;;29370:446;;29453:21;29456:4;29463:6;29456:13;29471:2;29453;:21::i;:::-;29447:27;;;;29511:10;29506:15;;29545:16;29506:15;29559:1;29545:7;:16::i;:::-;29539:22;;29593:4;29583:6;:14;;;;:32;;;;;29601:6;:14;;29611:4;29601:14;;29583:32;29579:223;;;29680:4;29668:16;;29782:1;29774:9;;29579:223;29390:426;29370:446;29849:10;29862:26;29870:4;29876:2;29880;29884:3;29862:7;:26::i;:::-;29891:10;29862:39;;;;-1:-1:-1;29987:4:105;29980:11;;;30019;;;:24;;;;;30042:1;30034:4;:9;;;;30019:24;:39;;;;;30054:4;30047;:11;;;30019:39;30015:847;;;30082:4;:9;;30090:1;30082:9;:22;;;;30095:4;:9;;30103:1;30095:9;30082:22;30078:144;;;30166:37;30177:4;:9;;30185:1;30177:9;:21;;30193:5;30177:21;;;30189:1;30177:21;30200:2;30166:10;:37::i;:::-;30159:44;;;;;;;;;;;;;;;30078:144;30244:4;:11;;30252:3;30244:11;30240:121;;30314:28;30323:5;30330:2;30334:7;;;;30314:8;:28::i;30240:121::-;30382:4;:11;;30390:3;30382:11;30378:121;;30452:28;30461:5;30468:2;30472:7;;;;;30452:8;:28::i;30378:121::-;30569:4;:11;;30577:3;30569:11;30565:80;;30611:15;:13;:15::i;30565:80::-;30748:4;30740;:12;;;;:27;;;;;30763:4;30756;:11;;;30740:27;30736:112;;;30798:31;30809:4;30815:2;30819;30823:5;30798:10;:31::i;30736:112::-;30922:6;:14;;30932:4;30922:14;:28;;;;-1:-1:-1;30940:10:105;;;;;30922:28;30918:93;;;30995:1;30970:5;:15;;;30986:5;30970:22;;;;;;;;;:::i;:::-;:26;;;;:22;;;;;;:26;30918:93;31057:9;:26;;31070:13;31057:26;31053:92;;31103:27;31112:9;31123:1;31126:3;31103:8;:27::i;:::-;31226:26;31235:5;31242:3;31247:4;31226:8;:26::i;:::-;31219:33;;;;;;;;;;;;;24930:6339;;;;;;;:::o;3092:1709::-;3639:4;3633:11;;3555:4;3358:31;3347:43;;3418:13;3358:31;3757:2;3457:13;;3347:43;3364:24;3358:31;3457:13;;;3347:43;;;;3364:24;3358:31;3457:13;;;3347:43;3364:24;3358:31;3457:13;;;3347:43;3364:24;3358:31;3457:13;;;3347:43;3364:24;3358:31;3457:13;;;3347:43;3364:24;3358:31;3457:13;;;3347:43;3364:24;3358:31;3457:13;;;3347:43;3364:24;3358:31;3457:13;;;3347:43;3364:24;3358:31;3457:13;;;3347:43;3133:12;;4342:13;;3457;;;3133:12;4422:84;4447:2;4444:1;4441:9;4422:84;;;3374:13;3364:24;;3358:31;3347:43;;3378:2;3418:13;;;;4502:1;3457:13;;;;4465:1;4458:9;4422:84;;;4426:14;4569:1;4565:2;4558:13;4664:5;4660:2;4656:14;4649:5;4644:27;4770:14;;;4753:32;;;3092:1709;-1:-1:-1;;3092:1709:105:o;20985:1831::-;21058:11;21169:14;21186:24;21198:11;21186;:24::i;:::-;21169:41;;21318:1;21311:5;21307:13;21304:33;;;21333:1;21330;21323:12;21304:33;21466:2;21454:15;;;21407:20;21896:5;21893:1;21889:13;21931:4;21967:1;21952:343;21977:2;21974:1;21971:9;21952:343;;;22100:2;22088:15;;;22037:20;22135:12;;;22149:1;22131:20;22172:42;;;;22240:1;22235:42;;;;22124:153;;22172:42;21630:1;21623:12;;;21663:2;21656:13;;;21708:2;21695:16;;22181:31;;22172:42;;22235;21630:1;21623:12;;;21663:2;21656:13;;;21708:2;21695:16;;22244:31;;22124:153;-1:-1:-1;;21995:1:105;21988:9;21952:343;;;21956:14;22405:4;22399:11;22384:26;;22491:7;22485:4;22482:17;22472:124;;22533:10;22530:1;22523:21;22575:2;22572:1;22565:13;22472:124;-1:-1:-1;;22723:2:105;22712:14;;;;22700:10;22696:31;22693:1;22689:39;22757:16;;;;22775:10;22753:33;;20985:1831;-1:-1:-1;;;20985:1831:105:o;18095:823::-;18164:12;18251:18;;:::i;:::-;18319:4;18310:13;;18371:5;:8;;;18382:1;18371:12;18355:28;;:5;:12;;;:28;;;18351:95;;18403:28;;;;;2114:2:257;18403:28:105;;;2096:21:257;2153:2;2133:18;;;2126:30;2192:20;2172:18;;;2165:48;2230:18;;18403:28:105;;;;;;;;18351:95;18535:8;;;;;18568:12;;;;;18557:23;;;;;;;18594:20;;;;;18535:8;18726:13;;;18722:90;;18787:6;18796:1;18787:10;18759:5;:15;;;18775:8;18759:25;;;;;;;;;:::i;:::-;:38;;;;:25;;;;;;:38;18722:90;18888:13;:11;:13::i;:::-;18881:20;18095:823;-1:-1:-1;;;;;18095:823:105:o;2645:339::-;2706:11;2770:18;;;;2779:8;;;;2770:18;;;;;;2769:25;;;;;2786:1;2833:2;:9;;;2827:16;;;;;2826:22;;2825:32;;;;;;;2887:9;;2886:15;2769:25;2944:21;;2964:1;2944:21;;;2955:6;2944:21;2929:11;;;;;:37;;-1:-1:-1;;;2645:339:105;;;;:::o;12956:2026::-;13053:12;13139:18;;:::i;:::-;13207:4;13198:13;;13239:17;13299:5;:8;;;13310:1;13299:12;13283:28;;:5;:12;;;:28;;;13279:97;;13331:30;;;;;2461:2:257;13331:30:105;;;2443:21:257;2500:2;2480:18;;;2473:30;2539:22;2519:18;;;2512:50;2579:18;;13331:30:105;2259:344:257;13279:97:105;13446:7;:12;;13457:1;13446:12;:28;;;;13462:7;:12;;13473:1;13462:12;13446:28;13442:947;;;13494:9;13506:5;:15;;;13522:6;13506:23;;;;;;;;;:::i;:::-;;;;;13494:35;;13570:2;13563:9;;:3;:9;;;:25;;;;;13576:7;:12;;13587:1;13576:12;13563:25;13562:58;;;;13601:2;13594:9;;:3;:9;;;;:25;;;;;13607:7;:12;;13618:1;13607:12;13594:25;13547:73;;13476:159;13442:947;;;13732:7;:12;;13743:1;13732:12;13728:661;;13793:1;13785:3;13779:15;;;;13764:30;;13728:661;;;13897:7;:12;;13908:1;13897:12;13893:496;;13957:1;13950:3;13944:14;;;13929:29;;13893:496;;;14078:7;:12;;14089:1;14078:12;14074:315;;14166:4;14160:2;14151:11;;;14150:20;14136:10;14193:8;;;14189:84;;14253:1;14246:3;14240:14;;;14225:29;;14189:84;14294:3;:8;;14301:1;14294:8;14290:85;;14355:1;14347:3;14341:15;;;;14326:30;;14290:85;14092:297;14074:315;14465:8;;;;;14543:12;;;;14532:23;;;;;14699:178;;;;14790:1;14764:22;14767:5;14775:6;14767:14;14783:2;14764;:22::i;:::-;:27;;;;;;;14750:42;;14759:1;14750:42;14735:57;:12;;;:57;14699:178;;;14846:12;;;;;14861:1;14846:16;14831:31;;;;14699:178;14952:13;:11;:13::i;:::-;14945:20;12956:2026;-1:-1:-1;;;;;;;;12956:2026:105:o;31315:8733::-;31402:10;31464;31472:2;31464:10;;;;31503:11;;;:44;;;31529:1;31519:6;:11;;;;:27;;;;;31543:3;31534:6;:12;;;31519:27;31499:8490;;;31588:4;31581:11;;31712:6;31772:3;31767:25;;;;31847:3;31842:25;;;;31921:3;31916:25;;;;31996:3;31991:25;;;;32070:3;32065:25;;;;32143:3;32138:25;;;;32217:3;32212:25;;;;31705:532;;31767:25;31786:4;31778:12;;31767:25;;31842;31861:4;31853:12;;31842:25;;31916;31935:4;31927:12;;31916:25;;31991;32010:4;32002:12;;31991:25;;32065;32084:4;32076:12;;32065:25;;32138;32157:4;32149:12;;32138:25;;32212;32231:4;32223:12;;31705:532;;32300:4;:12;;32308:4;32300:12;32296:4023;;-1:-1:-1;;;32351:9:105;32343:26;;32364:4;32359:1;32351:9;;;32350:18;32343:26;32336:33;;32296:4023;32437:4;:12;;32445:4;32437:12;32433:3886;;-1:-1:-1;;;32488:9:105;32480:26;;32501:4;32496:1;32488:9;;;32487:18;32480:26;32473:33;;32433:3886;32574:4;:12;;32582:4;32574:12;32570:3749;;32639:4;32634:1;32626:9;;;32625:18;32672:27;32626:9;32675:11;;;;32688:2;:10;;;32672:2;:27::i;:::-;32665:34;;;;;;;32570:3749;32768:4;:12;;32776:4;32768:12;32764:3555;;-1:-1:-1;;;32811:17:105;;;32823:4;32818:9;;32811:17;32804:24;;32764:3555;32897:4;:11;;32905:3;32897:11;32893:3426;;-1:-1:-1;;;32939:17:105;;;32951:4;32946:9;;32939:17;32932:24;;32893:3426;33025:4;:12;;33033:4;33025:12;33021:3298;;33068:21;33077:2;33071:8;;:2;:8;;;;33086:2;33081;:7;33068:2;:21::i;:::-;33061:28;;;;;;33021:3298;33338:4;:12;;33346:4;33338:12;33334:2985;;33381:2;33374:9;;;;;;33334:2985;33452:4;:12;;33460:4;33452:12;33448:2871;;33495:2;33488:9;;;;;;33448:2871;33566:4;:12;;33574:4;33566:12;33562:2757;;33609:2;33602:9;;;;;;33562:2757;33680:4;:12;;33688:4;33680:12;33676:2643;;33723:2;33716:9;;;;;;33676:2643;33797:4;:12;;33805:4;33797:12;33793:2526;;33840:2;33833:9;;;;;;33793:2526;33957:4;:12;;33965:4;33957:12;33953:2366;;34000:2;33993:9;;;;;;33953:2366;34071:4;:12;;34079:4;34071:12;34067:2252;;34114:2;34107:9;;;;;;34067:2252;34185:4;:12;;34193:4;34185:12;34181:2138;;34228:2;34221:9;;;;;;34181:2138;34299:4;:12;;34307:4;34299:12;34295:2024;;34342:2;34335:9;;;;;;34295:2024;34413:4;:12;;34421:4;34413:12;34409:1910;;34456:2;34449:9;;;;;;34409:1910;34527:4;:12;;34535:4;34527:12;34523:1796;;34570:2;34563:9;;;;;;34523:1796;34642:4;:12;;34650:4;34642:12;34638:1681;;34685:2;34678:9;;;;;;34638:1681;34755:4;:12;;34763:4;34755:12;34751:1568;;34798:2;34791:9;;;;;;34751:1568;34869:4;:12;;34877:4;34869:12;34865:1454;;34912:2;34905:9;;;;;;34865:1454;35061:4;:12;;35069:4;35061:12;35057:1262;;-1:-1:-1;;;35105:7:105;;;35097:16;;35057:1262;35182:4;:12;;35190:4;35182:12;35178:1141;;-1:-1:-1;;;35226:7:105;;;35218:16;;35178:1141;35302:4;:12;;35310:4;35302:12;35298:1021;;-1:-1:-1;;;35346:7:105;;;35338:16;;35298:1021;35423:4;:12;;35431:4;35423:12;35419:900;;-1:-1:-1;;;35467:7:105;;;35459:16;;35419:900;35543:4;:12;;35551:4;35543:12;35539:780;;-1:-1:-1;;;35587:7:105;;;35579:16;;35539:780;35662:4;:12;;35670:4;35662:12;35658:661;;-1:-1:-1;;;35706:7:105;;;35698:16;;35658:661;35782:4;:12;;35790:4;35782:12;35778:541;;-1:-1:-1;;;35826:7:105;;;35818:16;;35778:541;35902:4;:12;;35910:4;35902:12;35898:421;;-1:-1:-1;;;35947:7:105;;;35945:10;35938:17;;35898:421;36024:4;:12;;36032:4;36024:12;36020:299;;36085:2;36067:21;;36073:2;36067:21;;;:29;;36095:1;36067:29;;;36091:1;36067:29;36060:36;;;;;;;;36020:299;36166:4;:12;;36174:4;36166:12;36162:157;;36214:2;36209:7;;:2;:7;;;:15;;36223:1;36209:15;;36162:157;36271:29;;;;;2810:2:257;36271:29:105;;;2792:21:257;2849:2;2829:18;;;2822:30;2888:21;2868:18;;;2861:49;2927:18;;36271:29:105;2608:343:257;36162:157:105;31549:4784;31499:8490;;;36389:6;:14;;36399:4;36389:14;36385:3590;;36448:4;36441:11;;36523:3;36515:11;;;36511:549;;-1:-1:-1;;;36568:21:105;;;36554:36;;36511:549;36675:4;:12;;36683:4;36675:12;:28;;;;36691:4;:12;;36699:4;36691:12;36675:28;36671:389;;;36735:4;:12;;36743:4;36735:12;36731:83;;36784:3;;;36731:83;36839:8;36877:127;36889:10;36884:15;;:20;36877:127;;36969:8;36936:3;36969:8;;;;;36936:3;36877:127;;;37036:1;-1:-1:-1;37029:8:105;;-1:-1:-1;;37029:8:105;36385:3590;37127:6;:14;;37137:4;37127:14;37123:2852;;-1:-1:-1;;37172:8:105;37178:2;37172:8;;;;37165:15;;37123:2852;37247:6;:14;;37257:4;37247:14;37243:2732;;37292:42;37310:2;37315:1;37310:6;37320:1;37309:12;37304:2;:17;37296:26;;:3;:26;;;;37326:4;37295:35;37332:1;37292:2;:42::i;37243:2732::-;37401:6;:14;;37411:4;37401:14;37397:2578;;37446:45;37464:2;37469:1;37464:6;37474:1;37463:12;37458:2;:17;37450:26;;:3;:26;;;;37480:6;37449:37;37488:2;37446;:45::i;37397:2578::-;37559:6;:14;;37569:4;37559:14;37555:2420;;-1:-1:-1;;37610:21:105;37629:1;37624;37619:6;;37618:12;37610:21;;37667:36;;;37738:5;37733:10;;37610:21;;;;;37732:18;37725:25;;37555:2420;37817:6;:14;;37827:4;37817:14;37813:2162;;37862:3;37855:10;;;;;37813:2162;37933:6;:14;;37943:4;37933:14;37929:2046;;37993:2;37998:1;37993:6;38003:1;37992:12;37987:2;:17;37979:26;;:3;:26;;;;38009:4;37978:35;37971:42;;;;;37929:2046;38082:6;:14;;38092:4;38082:14;38078:1897;;38142:2;38147:1;38142:6;38152:1;38141:12;38136:2;:17;38128:26;;:3;:26;;;;38158:6;38127:37;38120:44;;;;;38078:1897;38233:6;:14;;38243:4;38233:14;38229:1746;;-1:-1:-1;;38284:26:105;38308:1;38303;38298:6;;38297:12;38292:2;:17;38284:26;;38346:41;;;38422:5;38417:10;;38284:26;;;;;38416:18;38409:25;;38229:1746;38502:6;:14;;38512:4;38502:14;38498:1477;;-1:-1:-1;;38559:4:105;38553:34;38585:1;38580;38575:6;;38574:12;38569:2;:17;38553:34;;38643:27;;;38623:48;;;38701:10;;38554:9;;;38553:34;;38700:18;38693:25;;38498:1477;38786:6;:14;;38796:4;38786:14;38782:1193;;-1:-1:-1;;38843:6:105;38837:36;38871:1;38866;38861:6;;38860:12;38855:2;:17;38837:36;;38929:29;;;38909:50;;;38989:10;;38838:11;;;38837:36;;38988:18;38981:25;;38782:1193;39075:6;:14;;39085:4;39075:14;39071:904;;-1:-1:-1;;39126:20:105;39144:1;39139;39134:6;;39133:12;39126:20;;39182:36;;;39254:5;39248:11;;39126:20;;;;;39247:19;39240:26;;39071:904;39334:6;:14;;39344:4;39334:14;39330:645;;39379:2;39372:9;;;;;39330:645;39450:6;:14;;39460:4;39450:14;39446:529;;-1:-1:-1;;39501:25:105;39524:1;39519;39514:6;;39513:12;39508:2;:17;39501:25;;39562:41;;;39639:5;39633:11;;39501:25;;;;;39632:19;39625:26;;39446:529;39718:6;:14;;39728:4;39718:14;39714:261;;39763:3;39756:10;;;;;39714:261;39833:6;:14;;39843:4;39833:14;39829:146;;39878:2;39871:9;;;;;19199:782;19285:12;19372:18;;:::i;:::-;-1:-1:-1;19440:4:105;19547:2;19535:14;;;;19527:41;;;;;;;3158:2:257;19527:41:105;;;3140:21:257;3197:2;3177:18;;;3170:30;3236:16;3216:18;;;3209:44;3270:18;;19527:41:105;2956:338:257;19527:41:105;19664:14;;;;;;;:30;;;19682:12;19664:30;19660:102;;;19743:4;19714:5;:15;;;19730:9;19714:26;;;;;;;;;:::i;:::-;:33;;;;:26;;;;;;:33;19660:102;19817:12;;;;;19806:23;;;;:8;;;:23;19873:1;19858:16;;;19843:31;;;19951:13;:11;:13::i;4842:7728::-;4885:12;4971:18;;:::i;:::-;-1:-1:-1;5149:15:105;;:18;;;;5039:4;5309:18;;;;5353;;;;5397;;;;;5039:4;;5129:17;;;;5309:18;5353;5487;;;5501:4;5487:18;5483:6777;;5537:2;5566:4;5561:9;;:14;5557:144;;5677:4;5672:9;;5664:4;:18;5658:24;5557:144;5722:2;:7;;5728:1;5722:7;5718:161;;5758:10;;;;;5790:16;;;;;;;;5758:10;-1:-1:-1;5718:161:105;;;5858:2;5853:7;;5718:161;5507:386;5483:6777;;;5995:10;:18;;6009:4;5995:18;5991:6269;;1745:10;6033:14;;5991:6269;;;6131:10;:18;;6145:4;6131:18;6127:6133;;6174:1;6169:6;;6127:6133;;;6299:10;:18;;6313:4;6299:18;6295:5965;;6352:4;6337:12;;;:19;6374:26;;;:14;;;:26;6425:13;:11;:13::i;:::-;6418:20;;;;;;;;;4842:7728;:::o;6295:5965::-;6564:10;:18;;6578:4;6564:18;6560:5700;;6715:14;;;6711:2708;6560:5700;6711:2708;6885:22;;;;;6881:2538;;7010:10;7023:27;7031:2;7036:10;7031:15;7048:1;7023:7;:27::i;:::-;7134:17;;;;7010:40;;-1:-1:-1;7134:17:105;7112:19;7284:14;7303:1;7278:26;7274:131;;7346:36;7370:11;1277:21:106;1426:15;;;1467:8;1461:4;1454:22;1595:4;1582:18;;1602:19;1578:44;1624:11;1575:61;;1222:430;7346:36:105;7332:50;;7274:131;7491:20;;;;;7458:54;;;;;;;;3472:25:257;;;7458:54:105;3533:23:257;;;3513:18;;;3506:51;7427:11:105;;;;7458:19;:6;:19;;;;3445:18:257;;7458:54:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7426:86;;;;7739:1;7735:2;7731:10;7836:9;7833:1;7829:17;7918:6;7911:5;7908:17;7905:40;;;7938:5;7928:15;;7905:40;;8021:6;8017:2;8014:14;8011:34;;;8041:2;8031:12;;8011:34;8147:3;8142:1;8134:6;8130:14;8125:3;8121:24;8117:34;8110:41;;8247:3;8243:1;8231:9;8222:6;8219:1;8215:14;8211:30;8207:38;8203:48;8196:55;;8402:1;8398;8394;8382:9;8379:1;8375:17;8371:25;8367:33;8363:41;8529:1;8525;8521;8512:6;8500:9;8497:1;8493:17;8489:30;8485:38;8481:46;8477:54;8459:72;;8660:10;8656:15;8650:4;8646:26;8638:34;;8776:3;8768:4;8764:9;8759:3;8755:19;8752:28;8745:35;;;;8922:33;8931:2;8936:10;8931:15;8948:1;8951:3;8922:8;:33::i;:::-;8977:20;;;:38;;;;;;;;;-1:-1:-1;6881:2538:105;;-1:-1:-1;;;6881:2538:105;;9134:18;;;;;9130:289;;9304:2;9299:7;;6560:5700;;9130:289;9358:10;9353:15;;2053:3;9390:10;;9130:289;6560:5700;;;9548:10;:18;;9562:4;9548:18;9544:2716;;9702:15;;;1824:1;9702:15;;:34;;-1:-1:-1;9721:15:105;;;1859:1;9721:15;9702:34;:57;;;-1:-1:-1;9740:19:105;;;1936:1;9740:19;9702:57;9698:1593;;;9788:2;9783:7;;9544:2716;;9698:1593;9914:23;;;;;9910:1381;;9961:10;9974:27;9982:2;9987:10;9982:15;9999:1;9974:7;:27::i;:::-;10077:17;;;;9961:40;;-1:-1:-1;10320:1:105;10312:10;;10414:1;10410:17;10489:13;;;10486:32;;;10511:5;10505:11;;10486:32;10797:14;;;10603:1;10793:22;;;10789:32;;;;10686:26;10710:1;10595:10;;;10690:18;;;10686:26;10785:43;10591:20;;10893:12;11021:17;;;:23;11089:1;11066:20;;;:24;10599:2;-1:-1:-1;10599:2:105;6560:5700;;9544:2716;11493:10;:18;;11507:4;11493:18;11489:771;;11603:2;:7;;11609:1;11603:7;11599:647;;11696:14;;;;;:40;;-1:-1:-1;11714:22:105;;;1978:1;11714:22;11696:40;:62;;;-1:-1:-1;11740:18:105;;;1897:1;11740:18;11696:62;11692:404;;;11791:1;11786:6;;11599:647;;11692:404;11837:15;;;1824:1;11837:15;;:34;;-1:-1:-1;11856:15:105;;;1859:1;11856:15;11837:34;:61;;;-1:-1:-1;11875:23:105;;;2021:1;11875:23;11837:61;:84;;;-1:-1:-1;11902:19:105;;;1936:1;11902:19;11837:84;11833:263;;;11954:1;11949:6;;6560:5700;;11599:647;12147:10;12142:15;;2087:4;12179:11;;11599:647;12335:15;;;;;:23;;;;:18;;;;:23;;;;12372:15;;:23;;;:18;;;;:23;-1:-1:-1;12461:12:105;;;;12450:23;;;:8;;;:23;12517:1;12502:16;12487:31;;;;;12540:13;:11;:13::i;15323:2480::-;15417:12;15503:18;;:::i;:::-;-1:-1:-1;15571:4:105;15603:10;15711:13;;;15720:4;15711:13;15707:1705;;-1:-1:-1;15750:8:105;;;;15707:1705;;;15869:5;:13;;15878:4;15869:13;15865:1547;;15902:14;;;:8;;;:14;15865:1547;;;16032:5;:13;;16041:4;16032:13;16028:1384;;-1:-1:-1;16071:8:105;;;;16028:1384;;;16190:5;:13;;16199:4;16190:13;16186:1226;;16223:14;;;:8;;;:14;16186:1226;;;16364:5;:13;;16373:4;16364:13;16360:1052;;16491:9;16437:17;16417;;;16437;;;;16417:37;16498:2;16491:9;;;;;16473:8;;;:28;16519:22;:8;;;:22;16360:1052;;;16678:5;:13;;16687:4;16678:13;16674:738;;16745:11;16731;;;16745;;;16731:25;16800:2;16793:9;;;;;16775:8;;;:28;16821:22;:8;;;:22;16674:738;;;17002:5;:13;;17011:4;17002:13;16998:414;;17072:3;17053:23;;17059:3;17053:23;;;;;;;:::i;:::-;;17035:42;;:8;;;:42;17113:23;;;;;;;;;;;;;:::i;:::-;;17095:42;;:8;;;:42;16998:414;;;17306:5;:13;;17315:4;17306:13;17302:110;;17356:3;17350:9;;:3;:9;;;;;;;:::i;:::-;;17339:20;;;;:8;;;:20;17388:9;;;;;;;;;;;:::i;:::-;;17377:20;;:8;;;:20;17302:110;17505:14;;;;17501:85;;17568:3;17539:5;:15;;;17555:9;17539:26;;;;;;;;;:::i;:::-;:32;;;;:26;;;;;;:32;17501:85;17640:12;;;;;17629:23;;;;:8;;;:23;17696:1;17681:16;;;17666:31;;;17773:13;:11;:13::i;:::-;17766:20;15323:2480;-1:-1:-1;;;;;;;15323:2480:105:o;23152:1654::-;23328:14;23345:24;23357:11;23345;:24::i;:::-;23328:41;;23477:1;23470:5;23466:13;23463:33;;;23492:1;23489;23482:12;23463:33;23631:2;23825:15;;;23650:2;23639:14;;23627:10;23623:31;23620:1;23616:39;23781:16;;;23566:20;;23766:10;23755:22;;;23751:27;23741:38;23738:60;24267:5;24264:1;24260:13;24338:1;24323:343;24348:2;24345:1;24342:9;24323:343;;;24471:2;24459:15;;;24408:20;24506:12;;;24520:1;24502:20;24543:42;;;;24611:1;24606:42;;;;24495:153;;24543:42;21630:1;21623:12;;;21663:2;21656:13;;;21708:2;21695:16;;24552:31;;24543:42;;24606;21630:1;21623:12;;;21663:2;21656:13;;;21708:2;21695:16;;24615:31;;24495:153;-1:-1:-1;;24366:1:105;24359:9;24323:343;;;-1:-1:-1;;24765:4:105;24758:18;-1:-1:-1;;;;23152:1654:105:o;20185:586::-;20507:20;;;20531:7;20507:32;20500:3;:40;;;20613:14;;20668:17;;20662:24;;;20654:72;;;;;;;4209:2:257;20654:72:105;;;4191:21:257;4248:2;4228:18;;;4221:30;4287:34;4267:18;;;4260:62;4358:5;4338:18;;;4331:33;4381:19;;20654:72:105;4007:399:257;20654:72:105;20740:14;20185
:586;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;467:347:257:-;518:8;528:6;582:3;575:4;567:6;563:17;559:27;549:55;;600:1;597;590:12;549:55;-1:-1:-1;623:20:257;;666:18;655:30;;652:50;;;698:1;695;688:12;652:50;735:4;727:6;723:17;711:29;;787:3;780:4;771:6;763;759:19;755:30;752:39;749:59;;;804:1;801;794:12;749:59;467:347;;;;;:::o;819:717::-;909:6;917;925;933;986:2;974:9;965:7;961:23;957:32;954:52;;;1002:1;999;992:12;954:52;1042:9;1029:23;1071:18;1112:2;1104:6;1101:14;1098:34;;;1128:1;1125;1118:12;1098:34;1167:58;1217:7;1208:6;1197:9;1193:22;1167:58;:::i;:::-;1244:8;;-1:-1:-1;1141:84:257;-1:-1:-1;1332:2:257;1317:18;;1304:32;;-1:-1:-1;1348:16:257;;;1345:36;;;1377:1;1374;1367:12;1345:36;;1416:60;1468:7;1457:8;1446:9;1442:24;1416:60;:::i;:::-;819:717;;;;-1:-1:-1;1495:8:257;-1:-1:-1;;;;819:717:257:o;1723:184::-;1775:77;1772:1;1765:88;1872:4;1869:1;1862:15;1896:4;1893:1;1886:15;3568:245;3647:6;3655;3708:2;3696:9;3687:7;3683:23;3679:32;3676:52;;;3724:1;3721;3714:12;3676:52;-1:-1:-1;;3747:16:257;;3803:2;3788:18;;;3782:25;3747:16;;3782:25;;-1:-1:-1;3568:245:257:o;3818:184::-;3870:77;3867:1;3860:88;3967:4;3964:1;3957:15;3991:4;3988:1;3981:15"
func
init
()
{
if
err
:=
json
.
Unmarshal
([]
byte
(
MIPSStorageLayoutJSON
),
MIPSStorageLayout
);
err
!=
nil
{
...
...
op-challenger/cmd/main_test.go
View file @
887323bf
...
...
@@ -105,20 +105,20 @@ func TestGameFactoryAddress(t *testing.T) {
})
}
func
TestGameA
ddress
(
t
*
testing
.
T
)
{
func
TestGameA
llowlist
(
t
*
testing
.
T
)
{
t
.
Run
(
"Optional"
,
func
(
t
*
testing
.
T
)
{
cfg
:=
configForArgs
(
t
,
addRequiredArgsExcept
(
config
.
TraceTypeAlphabet
,
"--game-a
ddress
"
))
cfg
:=
configForArgs
(
t
,
addRequiredArgsExcept
(
config
.
TraceTypeAlphabet
,
"--game-a
llowlist
"
))
require
.
NoError
(
t
,
cfg
.
Check
())
})
t
.
Run
(
"Valid"
,
func
(
t
*
testing
.
T
)
{
addr
:=
common
.
Address
{
0xbb
,
0xcc
,
0xdd
}
cfg
:=
configForArgs
(
t
,
addRequiredArgsExcept
(
config
.
TraceTypeAlphabet
,
"--game-a
ddress"
,
"--game-address
="
+
addr
.
Hex
()))
require
.
Equal
(
t
,
addr
,
cfg
.
GameAddress
)
cfg
:=
configForArgs
(
t
,
addRequiredArgsExcept
(
config
.
TraceTypeAlphabet
,
"--game-a
llowlist"
,
"--game-allowlist
="
+
addr
.
Hex
()))
require
.
Contains
(
t
,
cfg
.
GameAllowlist
,
addr
)
})
t
.
Run
(
"Invalid"
,
func
(
t
*
testing
.
T
)
{
verifyArgsInvalid
(
t
,
"invalid address: foo"
,
addRequiredArgsExcept
(
config
.
TraceTypeAlphabet
,
"--game-a
ddress"
,
"--game-address
=foo"
))
verifyArgsInvalid
(
t
,
"invalid address: foo"
,
addRequiredArgsExcept
(
config
.
TraceTypeAlphabet
,
"--game-a
llowlist"
,
"--game-allowlist
=foo"
))
})
}
...
...
op-challenger/config/config.go
View file @
887323bf
...
...
@@ -4,11 +4,12 @@ import (
"errors"
"fmt"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum-optimism/optimism/op-node/chaincfg"
opmetrics
"github.com/ethereum-optimism/optimism/op-service/metrics"
oppprof
"github.com/ethereum-optimism/optimism/op-service/pprof"
"github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/common"
)
var
(
...
...
@@ -78,10 +79,10 @@ const DefaultCannonSnapshotFreq = uint(1_000_000_000)
// This also contains config options for auxiliary services.
// It is used to initialize the challenger.
type
Config
struct
{
L1EthRpc
string
// L1 RPC Url
GameFactoryAddress
common
.
Address
// Address of the dispute game factory
GameA
ddress
common
.
Address
// Address of the fault game
AgreeWithProposedOutput
bool
// Temporary config if we agree or disagree with the posted output
L1EthRpc
string
// L1 RPC Url
GameFactoryAddress
common
.
Address
// Address of the dispute game factory
GameA
llowlist
[]
common
.
Address
// Allowlist of fault game addresses
AgreeWithProposedOutput
bool
// Temporary config if we agree or disagree with the posted output
TraceType
TraceType
// Type of trace
...
...
@@ -157,7 +158,7 @@ func (c Config) Check() error {
if
c
.
CannonL2GenesisPath
!=
""
{
return
ErrCannonNetworkAndL2Genesis
}
if
_
,
ok
:=
chaincfg
.
NetworksByName
[
c
.
CannonNetwork
];
!
ok
{
if
ch
:=
chaincfg
.
ChainByName
(
c
.
CannonNetwork
);
ch
==
nil
{
return
fmt
.
Errorf
(
"%w: %v"
,
ErrCannonNetworkUnknown
,
c
.
CannonNetwork
)
}
}
...
...
op-challenger/config/config_test.go
View file @
887323bf
...
...
@@ -3,9 +3,10 @@ package config
import
(
"testing"
"github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/require"
"github.com/ethereum-optimism/optimism/op-service/txmgr"
)
var
(
...
...
@@ -68,9 +69,9 @@ func TestGameFactoryAddressRequired(t *testing.T) {
require
.
ErrorIs
(
t
,
config
.
Check
(),
ErrMissingGameFactoryAddress
)
}
func
TestGameA
ddress
NotRequired
(
t
*
testing
.
T
)
{
func
TestGameA
llowlist
NotRequired
(
t
*
testing
.
T
)
{
config
:=
validConfig
(
TraceTypeCannon
)
config
.
GameA
ddress
=
common
.
Address
{}
config
.
GameA
llowlist
=
[]
common
.
Address
{}
require
.
NoError
(
t
,
config
.
Check
())
}
...
...
op-challenger/fault/caller.go
View file @
887323bf
...
...
@@ -4,13 +4,11 @@ import (
"context"
"math/big"
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-challenger/fault/types"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-challenger/fault/types"
)
type
FaultDisputeGameCaller
interface
{
...
...
@@ -19,62 +17,39 @@ type FaultDisputeGameCaller interface {
}
type
FaultCaller
struct
{
FaultDisputeGameCaller
log
log
.
Logger
contract
FaultDisputeGameCaller
}
func
NewFaultCaller
(
caller
FaultDisputeGameCaller
,
log
log
.
Logger
)
*
FaultCaller
{
func
NewFaultCaller
(
caller
FaultDisputeGameCaller
)
*
FaultCaller
{
return
&
FaultCaller
{
caller
,
log
,
}
}
func
NewFaultCallerFromBindings
(
fdgAddr
common
.
Address
,
client
*
ethclient
.
Client
,
log
log
.
Logger
)
(
*
FaultCaller
,
error
)
{
func
NewFaultCallerFromBindings
(
fdgAddr
common
.
Address
,
client
*
ethclient
.
Client
)
(
*
FaultCaller
,
error
)
{
caller
,
err
:=
bindings
.
NewFaultDisputeGameCaller
(
fdgAddr
,
client
)
if
err
!=
nil
{
return
nil
,
err
}
return
&
FaultCaller
{
caller
,
log
,
},
nil
}
// LogGameInfo logs the game info.
func
(
fc
*
FaultCaller
)
LogGameInfo
(
ctx
context
.
Context
)
{
status
,
err
:=
fc
.
GetGameStatus
(
ctx
)
if
err
!=
nil
{
fc
.
log
.
Error
(
"failed to get game status"
,
"err"
,
err
)
return
}
claimLen
,
err
:=
fc
.
GetClaimDataLength
(
ctx
)
if
err
!=
nil
{
fc
.
log
.
Error
(
"failed to get claim count"
,
"err"
,
err
)
return
}
fc
.
log
.
Info
(
"Game info"
,
"claims"
,
claimLen
,
"status"
,
status
)
}
// GetGameStatus returns the current game status.
// 0: In Progress
// 1: Challenger Won
// 2: Defender Won
func
(
fc
*
FaultCaller
)
GetGameStatus
(
ctx
context
.
Context
)
(
types
.
GameStatus
,
error
)
{
status
,
err
:=
fc
.
Status
(
&
bind
.
CallOpts
{
Context
:
ctx
})
status
,
err
:=
fc
.
contract
.
Status
(
&
bind
.
CallOpts
{
Context
:
ctx
})
return
types
.
GameStatus
(
status
),
err
}
// GetClaimDataLength returns the number of claims in the game.
func
(
fc
*
FaultCaller
)
GetClaimDataLength
(
ctx
context
.
Context
)
(
*
big
.
Int
,
error
)
{
return
fc
.
ClaimDataLen
(
&
bind
.
CallOpts
{
Context
:
ctx
})
}
func
(
fc
*
FaultCaller
)
LogClaimDataLength
(
ctx
context
.
Context
)
{
claimLen
,
err
:=
fc
.
GetClaimDataLength
(
ctx
)
// GetClaimCount returns the number of claims in the game.
func
(
fc
*
FaultCaller
)
GetClaimCount
(
ctx
context
.
Context
)
(
uint64
,
error
)
{
count
,
err
:=
fc
.
contract
.
ClaimDataLen
(
&
bind
.
CallOpts
{
Context
:
ctx
})
if
err
!=
nil
{
fc
.
log
.
Error
(
"failed to get claim count"
,
"err"
,
err
)
return
return
0
,
err
}
fc
.
log
.
Info
(
"Number of claims"
,
"length"
,
claimLen
)
return
count
.
Uint64
(),
nil
}
op-challenger/fault/caller_test.go
View file @
887323bf
...
...
@@ -64,7 +64,7 @@ func TestFaultCaller_GetGameStatus(t *testing.T) {
for
_
,
test
:=
range
tests
{
t
.
Run
(
test
.
name
,
func
(
t
*
testing
.
T
)
{
fc
:=
NewFaultCaller
(
test
.
caller
,
nil
)
fc
:=
NewFaultCaller
(
test
.
caller
)
status
,
err
:=
fc
.
GetGameStatus
(
context
.
Background
())
require
.
Equal
(
t
,
test
.
expectedStatus
,
status
)
require
.
Equal
(
t
,
test
.
expectedErr
,
err
)
...
...
@@ -72,11 +72,11 @@ func TestFaultCaller_GetGameStatus(t *testing.T) {
}
}
func
TestFaultCaller_GetClaim
DataLength
(
t
*
testing
.
T
)
{
func
TestFaultCaller_GetClaim
Count
(
t
*
testing
.
T
)
{
tests
:=
[]
struct
{
name
string
caller
FaultDisputeGameCaller
expectedClaimDataLen
*
big
.
Int
expectedClaimDataLen
uint64
expectedErr
error
}{
{
...
...
@@ -84,7 +84,7 @@ func TestFaultCaller_GetClaimDataLength(t *testing.T) {
caller
:
&
mockFaultDisputeGameCaller
{
claimDataLen
:
big
.
NewInt
(
1
),
},
expectedClaimDataLen
:
big
.
NewInt
(
1
)
,
expectedClaimDataLen
:
1
,
expectedErr
:
nil
,
},
{
...
...
@@ -92,15 +92,15 @@ func TestFaultCaller_GetClaimDataLength(t *testing.T) {
caller
:
&
mockFaultDisputeGameCaller
{
errClaimDataLen
:
true
,
},
expectedClaimDataLen
:
nil
,
expectedClaimDataLen
:
0
,
expectedErr
:
errMock
,
},
}
for
_
,
test
:=
range
tests
{
t
.
Run
(
test
.
name
,
func
(
t
*
testing
.
T
)
{
fc
:=
NewFaultCaller
(
test
.
caller
,
nil
)
claimDataLen
,
err
:=
fc
.
GetClaim
DataLength
(
context
.
Background
())
fc
:=
NewFaultCaller
(
test
.
caller
)
claimDataLen
,
err
:=
fc
.
GetClaim
Count
(
context
.
Background
())
require
.
Equal
(
t
,
test
.
expectedClaimDataLen
,
claimDataLen
)
require
.
Equal
(
t
,
test
.
expectedErr
,
err
)
})
...
...
op-challenger/fault/monitor.go
View file @
887323bf
...
...
@@ -29,22 +29,34 @@ type gameMonitor struct {
source
gameSource
createPlayer
playerCreator
fetchBlockNumber
blockNumberFetcher
allowedGame
common
.
Address
allowedGame
s
[]
common
.
Address
players
map
[
common
.
Address
]
gamePlayer
}
func
newGameMonitor
(
logger
log
.
Logger
,
cl
clock
.
Clock
,
fetchBlockNumber
blockNumberFetcher
,
allowedGame
common
.
Address
,
source
gameSource
,
createGame
playerCreator
)
*
gameMonitor
{
func
newGameMonitor
(
logger
log
.
Logger
,
cl
clock
.
Clock
,
fetchBlockNumber
blockNumberFetcher
,
allowedGame
s
[]
common
.
Address
,
source
gameSource
,
createGame
playerCreator
)
*
gameMonitor
{
return
&
gameMonitor
{
logger
:
logger
,
clock
:
cl
,
source
:
source
,
createPlayer
:
createGame
,
fetchBlockNumber
:
fetchBlockNumber
,
allowedGame
:
allowedGame
,
allowedGame
s
:
allowedGames
,
players
:
make
(
map
[
common
.
Address
]
gamePlayer
),
}
}
func
(
m
*
gameMonitor
)
allowedGame
(
game
common
.
Address
)
bool
{
if
len
(
m
.
allowedGames
)
==
0
{
return
true
}
for
_
,
allowed
:=
range
m
.
allowedGames
{
if
allowed
==
game
{
return
true
}
}
return
false
}
func
(
m
*
gameMonitor
)
progressGames
(
ctx
context
.
Context
)
error
{
blockNum
,
err
:=
m
.
fetchBlockNumber
(
ctx
)
if
err
!=
nil
{
...
...
@@ -55,7 +67,7 @@ func (m *gameMonitor) progressGames(ctx context.Context) error {
return
fmt
.
Errorf
(
"failed to load games: %w"
,
err
)
}
for
_
,
game
:=
range
games
{
if
m
.
allowedGame
!=
(
common
.
Address
{})
&&
m
.
allowedGame
!=
game
.
Proxy
{
if
!
m
.
allowedGame
(
game
.
Proxy
)
{
m
.
logger
.
Debug
(
"Skipping game not on allow list"
,
"game"
,
game
.
Proxy
)
continue
}
...
...
op-challenger/fault/monitor_test.go
View file @
887323bf
...
...
@@ -14,7 +14,7 @@ import (
)
func
TestMonitorExitsWhenContextDone
(
t
*
testing
.
T
)
{
monitor
,
_
,
_
:=
setupMonitorTest
(
t
,
common
.
Address
{
})
monitor
,
_
,
_
:=
setupMonitorTest
(
t
,
[]
common
.
Address
{
common
.
Address
{}
})
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
cancel
()
err
:=
monitor
.
MonitorGames
(
ctx
)
...
...
@@ -22,7 +22,7 @@ func TestMonitorExitsWhenContextDone(t *testing.T) {
}
func
TestMonitorCreateAndProgressGameAgents
(
t
*
testing
.
T
)
{
monitor
,
source
,
games
:=
setupMonitorTest
(
t
,
common
.
Address
{})
monitor
,
source
,
games
:=
setupMonitorTest
(
t
,
[]
common
.
Address
{})
addr1
:=
common
.
Address
{
0xaa
}
addr2
:=
common
.
Address
{
0xbb
}
...
...
@@ -55,7 +55,7 @@ func TestMonitorCreateAndProgressGameAgents(t *testing.T) {
func
TestMonitorOnlyCreateSpecifiedGame
(
t
*
testing
.
T
)
{
addr1
:=
common
.
Address
{
0xaa
}
addr2
:=
common
.
Address
{
0xbb
}
monitor
,
source
,
games
:=
setupMonitorTest
(
t
,
addr2
)
monitor
,
source
,
games
:=
setupMonitorTest
(
t
,
[]
common
.
Address
{
addr2
}
)
source
.
games
=
[]
FaultDisputeGame
{
{
...
...
@@ -77,7 +77,7 @@ func TestMonitorOnlyCreateSpecifiedGame(t *testing.T) {
require
.
Equal
(
t
,
1
,
games
.
created
[
addr2
]
.
progressCount
)
}
func
setupMonitorTest
(
t
*
testing
.
T
,
allowedGame
common
.
Address
)
(
*
gameMonitor
,
*
stubGameSource
,
*
createdGames
)
{
func
setupMonitorTest
(
t
*
testing
.
T
,
allowedGame
s
[]
common
.
Address
)
(
*
gameMonitor
,
*
stubGameSource
,
*
createdGames
)
{
logger
:=
testlog
.
Logger
(
t
,
log
.
LvlDebug
)
source
:=
&
stubGameSource
{}
games
:=
&
createdGames
{
...
...
@@ -87,7 +87,7 @@ func setupMonitorTest(t *testing.T, allowedGame common.Address) (*gameMonitor, *
fetchBlockNum
:=
func
(
ctx
context
.
Context
)
(
uint64
,
error
)
{
return
1234
,
nil
}
monitor
:=
newGameMonitor
(
logger
,
clock
.
SystemClock
,
fetchBlockNum
,
allowedGame
,
source
,
games
.
CreateGame
)
monitor
:=
newGameMonitor
(
logger
,
clock
.
SystemClock
,
fetchBlockNum
,
allowedGame
s
,
source
,
games
.
CreateGame
)
return
monitor
,
source
,
games
}
...
...
op-challenger/fault/
game
.go
→
op-challenger/fault/
player
.go
View file @
887323bf
...
...
@@ -21,7 +21,7 @@ type Actor interface {
type
GameInfo
interface
{
GetGameStatus
(
context
.
Context
)
(
types
.
GameStatus
,
error
)
LogGameInfo
(
ctx
context
.
Context
)
GetClaimCount
(
context
.
Context
)
(
uint64
,
error
)
}
type
GamePlayer
struct
{
...
...
@@ -80,7 +80,7 @@ func NewGamePlayer(
return
nil
,
fmt
.
Errorf
(
"failed to create the responder: %w"
,
err
)
}
caller
,
err
:=
NewFaultCallerFromBindings
(
addr
,
client
,
logger
)
caller
,
err
:=
NewFaultCallerFromBindings
(
addr
,
client
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to bind the fault contract: %w"
,
err
)
}
...
...
@@ -100,21 +100,32 @@ func (g *GamePlayer) ProgressGame(ctx context.Context) bool {
}
if
status
,
err
:=
g
.
caller
.
GetGameStatus
(
ctx
);
err
!=
nil
{
g
.
logger
.
Warn
(
"Unable to retrieve game status"
,
"err"
,
err
)
}
else
if
status
!=
0
{
var
expectedStatus
types
.
GameStatus
if
g
.
agreeWithProposedOutput
{
expectedStatus
=
types
.
GameStatusChallengerWon
}
else
{
expectedStatus
=
types
.
GameStatusDefenderWon
}
if
expectedStatus
==
status
{
g
.
logger
.
Info
(
"Game won"
,
"status"
,
status
)
}
else
{
g
.
logger
.
Error
(
"Game lost"
,
"status"
,
status
)
}
return
true
}
else
{
g
.
caller
.
LogGameInfo
(
ctx
)
g
.
logGameStatus
(
ctx
,
status
)
return
status
!=
types
.
GameStatusInProgress
}
return
false
}
func
(
g
*
GamePlayer
)
logGameStatus
(
ctx
context
.
Context
,
status
types
.
GameStatus
)
{
if
status
==
types
.
GameStatusInProgress
{
claimCount
,
err
:=
g
.
caller
.
GetClaimCount
(
ctx
)
if
err
!=
nil
{
g
.
logger
.
Error
(
"Failed to get claim count for in progress game"
,
"err"
,
err
)
return
}
g
.
logger
.
Info
(
"Game info"
,
"claims"
,
claimCount
,
"status"
,
status
)
return
}
var
expectedStatus
types
.
GameStatus
if
g
.
agreeWithProposedOutput
{
expectedStatus
=
types
.
GameStatusChallengerWon
}
else
{
expectedStatus
=
types
.
GameStatusDefenderWon
}
if
expectedStatus
==
status
{
g
.
logger
.
Info
(
"Game won"
,
"status"
,
status
)
}
else
{
g
.
logger
.
Error
(
"Game lost"
,
"status"
,
status
)
}
}
op-challenger/fault/
game
_test.go
→
op-challenger/fault/
player
_test.go
View file @
887323bf
...
...
@@ -11,27 +11,23 @@ import (
"github.com/stretchr/testify/require"
)
func
TestProgressGameAndLogState
(
t
*
testing
.
T
)
{
_
,
game
,
actor
,
gameInfo
:=
setupProgressGameTest
(
t
,
true
)
done
:=
game
.
ProgressGame
(
context
.
Background
())
require
.
False
(
t
,
done
,
"should not be done"
)
require
.
Equal
(
t
,
1
,
actor
.
callCount
,
"should perform next actions"
)
require
.
Equal
(
t
,
1
,
gameInfo
.
logCount
,
"should log latest game state"
)
}
func
TestProgressGame_LogErrorFromAct
(
t
*
testing
.
T
)
{
handler
,
game
,
actor
,
gameInfo
:=
setupProgressGameTest
(
t
,
true
)
handler
,
game
,
actor
,
_
:=
setupProgressGameTest
(
t
,
true
)
actor
.
err
=
errors
.
New
(
"boom"
)
done
:=
game
.
ProgressGame
(
context
.
Background
())
require
.
False
(
t
,
done
,
"should not be done"
)
require
.
Equal
(
t
,
1
,
actor
.
callCount
,
"should perform next actions"
)
require
.
Equal
(
t
,
1
,
gameInfo
.
logCount
,
"should log latest game state"
)
errLog
:=
handler
.
FindLog
(
log
.
LvlError
,
"Error when acting on game"
)
require
.
NotNil
(
t
,
errLog
,
"should log error"
)
require
.
Equal
(
t
,
actor
.
err
,
errLog
.
GetContextValue
(
"err"
))
// Should still log game status
msg
:=
handler
.
FindLog
(
log
.
LvlInfo
,
"Game info"
)
require
.
NotNil
(
t
,
msg
)
require
.
Equal
(
t
,
uint64
(
1
),
msg
.
GetContextValue
(
"claims"
))
}
func
TestProgressGame_Log
ErrorWhenGameLost
(
t
*
testing
.
T
)
{
func
TestProgressGame_Log
GameStatus
(
t
*
testing
.
T
)
{
tests
:=
[]
struct
{
name
string
status
types
.
GameStatus
...
...
@@ -67,16 +63,23 @@ func TestProgressGame_LogErrorWhenGameLost(t *testing.T) {
logLevel
:
log
.
LvlInfo
,
logMsg
:
"Game won"
,
},
{
name
:
"GameInProgress"
,
status
:
types
.
GameStatusInProgress
,
agreeWithOutput
:
true
,
logLevel
:
log
.
LvlInfo
,
logMsg
:
"Game info"
,
},
}
for
_
,
test
:=
range
tests
{
test
:=
test
t
.
Run
(
test
.
name
,
func
(
t
*
testing
.
T
)
{
handler
,
game
,
_
,
gameInfo
:=
setupProgressGameTest
(
t
,
test
.
agreeWithOutput
)
handler
,
game
,
actor
,
gameInfo
:=
setupProgressGameTest
(
t
,
test
.
agreeWithOutput
)
gameInfo
.
status
=
test
.
status
done
:=
game
.
ProgressGame
(
context
.
Background
())
require
.
True
(
t
,
done
,
"should be done
"
)
require
.
Equal
(
t
,
0
,
gameInfo
.
logCount
,
"should not log latest game state
"
)
require
.
Equal
(
t
,
1
,
actor
.
callCount
,
"should perform next actions
"
)
require
.
Equal
(
t
,
test
.
status
!=
types
.
GameStatusInProgress
,
done
,
"should be done when not in progress
"
)
errLog
:=
handler
.
FindLog
(
test
.
logLevel
,
test
.
logMsg
)
require
.
NotNil
(
t
,
errLog
,
"should log game result"
)
require
.
Equal
(
t
,
test
.
status
,
errLog
.
GetContextValue
(
"status"
))
...
...
@@ -91,7 +94,7 @@ func setupProgressGameTest(t *testing.T, agreeWithProposedRoot bool) (*testlog.C
}
logger
.
SetHandler
(
handler
)
actor
:=
&
stubActor
{}
gameInfo
:=
&
stubGameInfo
{}
gameInfo
:=
&
stubGameInfo
{
claimCount
:
1
}
game
:=
&
GamePlayer
{
agent
:
actor
,
agreeWithProposedOutput
:
agreeWithProposedRoot
,
...
...
@@ -112,15 +115,15 @@ func (a *stubActor) Act(ctx context.Context) error {
}
type
stubGameInfo
struct
{
status
types
.
GameStatus
err
error
logCount
int
status
types
.
GameStatus
claimCount
uint64
err
error
}
func
(
s
*
stubGameInfo
)
GetGameStatus
(
ctx
context
.
Context
)
(
types
.
GameStatus
,
error
)
{
return
s
.
status
,
s
.
err
}
func
(
s
*
stubGameInfo
)
LogGameInfo
(
ctx
context
.
Context
)
{
s
.
logCount
++
func
(
s
*
stubGameInfo
)
GetClaimCount
(
ctx
context
.
Context
)
(
uint64
,
error
)
{
return
s
.
claimCount
,
s
.
err
}
op-challenger/fault/service.go
View file @
887323bf
...
...
@@ -73,7 +73,7 @@ func NewService(ctx context.Context, logger log.Logger, cfg *config.Config) (*se
}
loader
:=
NewGameLoader
(
factory
)
monitor
:=
newGameMonitor
(
logger
,
cl
,
client
.
BlockNumber
,
cfg
.
GameA
ddress
,
loader
,
func
(
addr
common
.
Address
)
(
gamePlayer
,
error
)
{
monitor
:=
newGameMonitor
(
logger
,
cl
,
client
.
BlockNumber
,
cfg
.
GameA
llowlist
,
loader
,
func
(
addr
common
.
Address
)
(
gamePlayer
,
error
)
{
return
NewGamePlayer
(
ctx
,
logger
,
cfg
,
addr
,
txMgr
,
client
)
})
...
...
op-challenger/fault/types/game.go
View file @
887323bf
...
...
@@ -60,7 +60,7 @@ func NewGameState(agreeWithProposedOutput bool, root Claim, depth uint64) *gameS
}
}
// AgreeWithLevel returns if the game state agrees with the provided claim level.
// AgreeWith
Claim
Level returns if the game state agrees with the provided claim level.
func
(
g
*
gameState
)
AgreeWithClaimLevel
(
claim
Claim
)
bool
{
isOddLevel
:=
claim
.
Depth
()
%
2
==
1
// If we agree with the proposed output, we agree with odd levels
...
...
op-challenger/flags/flags.go
View file @
887323bf
...
...
@@ -4,6 +4,9 @@ import (
"fmt"
"strings"
"github.com/ethereum/go-ethereum/common"
"github.com/urfave/cli/v2"
"github.com/ethereum-optimism/optimism/op-challenger/config"
"github.com/ethereum-optimism/optimism/op-node/chaincfg"
opservice
"github.com/ethereum-optimism/optimism/op-service"
...
...
@@ -12,9 +15,6 @@ import (
opmetrics
"github.com/ethereum-optimism/optimism/op-service/metrics"
oppprof
"github.com/ethereum-optimism/optimism/op-service/pprof"
"github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/common"
"github.com/urfave/cli/v2"
)
const
(
...
...
@@ -37,10 +37,11 @@ var (
Usage
:
"Address of the fault game factory contract."
,
EnvVars
:
prefixEnvVars
(
"GAME_FACTORY_ADDRESS"
),
}
GameAddressFlag
=
&
cli
.
StringFlag
{
Name
:
"game-address"
,
Usage
:
"Address of the Fault Game contract."
,
EnvVars
:
prefixEnvVars
(
"GAME_ADDRESS"
),
GameAllowlistFlag
=
&
cli
.
StringSliceFlag
{
Name
:
"game-allowlist"
,
Usage
:
"List of Fault Game contract addresses the challenger is allowed to play. "
+
"If empty, the challenger will play all games."
,
EnvVars
:
prefixEnvVars
(
"GAME_ALLOWLIST"
),
}
TraceTypeFlag
=
&
cli
.
GenericFlag
{
Name
:
"trace-type"
,
...
...
@@ -121,7 +122,7 @@ var requiredFlags = []cli.Flag{
// optionalFlags is a list of unchecked cli flags
var
optionalFlags
=
[]
cli
.
Flag
{
AlphabetFlag
,
GameA
ddress
Flag
,
GameA
llowlist
Flag
,
CannonNetworkFlag
,
CannonRollupConfigFlag
,
CannonL2GenesisFlag
,
...
...
@@ -154,11 +155,13 @@ func CheckRequired(ctx *cli.Context) error {
gameType
:=
config
.
TraceType
(
strings
.
ToLower
(
ctx
.
String
(
TraceTypeFlag
.
Name
)))
switch
gameType
{
case
config
.
TraceTypeCannon
:
if
!
ctx
.
IsSet
(
CannonNetworkFlag
.
Name
)
&&
!
(
ctx
.
IsSet
(
CannonRollupConfigFlag
.
Name
)
&&
ctx
.
IsSet
(
CannonL2GenesisFlag
.
Name
))
{
if
!
ctx
.
IsSet
(
CannonNetworkFlag
.
Name
)
&&
!
(
ctx
.
IsSet
(
CannonRollupConfigFlag
.
Name
)
&&
ctx
.
IsSet
(
CannonL2GenesisFlag
.
Name
))
{
return
fmt
.
Errorf
(
"flag %v or %v and %v is required"
,
CannonNetworkFlag
.
Name
,
CannonRollupConfigFlag
.
Name
,
CannonL2GenesisFlag
.
Name
)
}
if
ctx
.
IsSet
(
CannonNetworkFlag
.
Name
)
&&
(
ctx
.
IsSet
(
CannonRollupConfigFlag
.
Name
)
||
ctx
.
IsSet
(
CannonL2GenesisFlag
.
Name
))
{
if
ctx
.
IsSet
(
CannonNetworkFlag
.
Name
)
&&
(
ctx
.
IsSet
(
CannonRollupConfigFlag
.
Name
)
||
ctx
.
IsSet
(
CannonL2GenesisFlag
.
Name
))
{
return
fmt
.
Errorf
(
"flag %v can not be used with %v and %v"
,
CannonNetworkFlag
.
Name
,
CannonRollupConfigFlag
.
Name
,
CannonL2GenesisFlag
.
Name
)
}
...
...
@@ -196,11 +199,14 @@ func NewConfigFromCLI(ctx *cli.Context) (*config.Config, error) {
if
err
!=
nil
{
return
nil
,
err
}
var
gameAddress
common
.
Address
if
ctx
.
IsSet
(
GameAddressFlag
.
Name
)
{
gameAddress
,
err
=
opservice
.
ParseAddress
(
ctx
.
String
(
GameAddressFlag
.
Name
))
if
err
!=
nil
{
return
nil
,
err
var
allowedGames
[]
common
.
Address
if
ctx
.
StringSlice
(
GameAllowlistFlag
.
Name
)
!=
nil
{
for
_
,
addr
:=
range
ctx
.
StringSlice
(
GameAllowlistFlag
.
Name
)
{
gameAddress
,
err
:=
opservice
.
ParseAddress
(
addr
)
if
err
!=
nil
{
return
nil
,
err
}
allowedGames
=
append
(
allowedGames
,
gameAddress
)
}
}
...
...
@@ -215,7 +221,7 @@ func NewConfigFromCLI(ctx *cli.Context) (*config.Config, error) {
L1EthRpc
:
ctx
.
String
(
L1EthRpcFlag
.
Name
),
TraceType
:
traceTypeFlag
,
GameFactoryAddress
:
gameFactoryAddress
,
GameA
ddress
:
gameAddres
s
,
GameA
llowlist
:
allowedGame
s
,
AlphabetTrace
:
ctx
.
String
(
AlphabetFlag
.
Name
),
CannonNetwork
:
ctx
.
String
(
CannonNetworkFlag
.
Name
),
CannonRollupConfigPath
:
ctx
.
String
(
CannonRollupConfigFlag
.
Name
),
...
...
op-e2e/e2eutils/challenger/helper.go
View file @
887323bf
...
...
@@ -38,7 +38,10 @@ func WithFactoryAddress(addr common.Address) Option {
func
WithGameAddress
(
addr
common
.
Address
)
Option
{
return
func
(
c
*
config
.
Config
)
{
c
.
GameAddress
=
addr
if
c
.
GameAllowlist
==
nil
{
c
.
GameAllowlist
=
make
([]
common
.
Address
,
0
)
}
c
.
GameAllowlist
=
append
(
c
.
GameAllowlist
,
addr
)
}
}
...
...
op-e2e/e2eutils/disputegame/alphabet_helper.go
View file @
887323bf
...
...
@@ -5,6 +5,8 @@ import (
"github.com/ethereum-optimism/optimism/op-challenger/config"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/challenger"
"github.com/ethereum/go-ethereum/common"
)
type
AlphabetGameHelper
struct
{
...
...
@@ -16,7 +18,7 @@ func (g *AlphabetGameHelper) StartChallenger(ctx context.Context, l1Endpoint str
opts
:=
[]
challenger
.
Option
{
func
(
c
*
config
.
Config
)
{
c
.
GameFactoryAddress
=
g
.
factoryAddr
c
.
GameA
ddress
=
g
.
addr
c
.
GameA
llowlist
=
[]
common
.
Address
{
g
.
addr
}
c
.
TraceType
=
config
.
TraceTypeAlphabet
// By default the challenger agrees with the root claim (thus disagrees with the proposed output)
// This can be overridden by passing in options
...
...
op-e2e/e2eutils/wait/waits.go
View file @
887323bf
...
...
@@ -56,8 +56,11 @@ func (s *jsonRawString) UnmarshalJSON(input []byte) error {
// printDebugTrace logs debug_traceTransaction output to aid in debugging unexpected receipt statuses
func
printDebugTrace
(
ctx
context
.
Context
,
client
*
ethclient
.
Client
,
txHash
common
.
Hash
)
{
var
trace
jsonRawString
options
:=
map
[
string
]
any
{}
options
[
"enableReturnData"
]
=
true
options
:=
map
[
string
]
any
{
"enableReturnData"
:
true
,
"tracer"
:
"callTracer"
,
"tracerConfig"
:
map
[
string
]
any
{},
}
err
:=
client
.
Client
()
.
CallContext
(
ctx
,
&
trace
,
"debug_traceTransaction"
,
hexutil
.
Bytes
(
txHash
.
Bytes
()),
options
)
if
err
!=
nil
{
fmt
.
Printf
(
"TxTrace unavailable: %v
\n
"
,
err
)
...
...
op-e2e/geth.go
View file @
887323bf
...
...
@@ -24,6 +24,10 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/miner"
"github.com/ethereum/go-ethereum/node"
// Force-load the tracer engines to trigger registration
_
"github.com/ethereum/go-ethereum/eth/tracers/js"
_
"github.com/ethereum/go-ethereum/eth/tracers/native"
)
var
(
...
...
op-e2e/setup.go
View file @
887323bf
...
...
@@ -586,7 +586,7 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
}
}
c
.
Rollup
.
LogDescription
(
cfg
.
Loggers
[
name
],
chaincfg
.
L2ChainIDToNetworkName
)
c
.
Rollup
.
LogDescription
(
cfg
.
Loggers
[
name
],
chaincfg
.
L2ChainIDToNetwork
Display
Name
)
node
,
err
:=
rollupNode
.
New
(
context
.
Background
(),
&
c
,
cfg
.
Loggers
[
name
],
snapLog
,
""
,
metrics
.
NewMetrics
(
""
))
if
err
!=
nil
{
...
...
op-node/chaincfg/chains.go
View file @
887323bf
...
...
@@ -2,135 +2,100 @@ package chaincfg
import
(
"fmt"
"
math/big
"
"
strings
"
"github.com/ethereum
/go-ethereum/commo
n"
"github.com/ethereum
-optimism/superchain-registry/superchai
n"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-service/eth"
)
var
Mainnet
=
rollup
.
Config
{
Genesis
:
rollup
.
Genesis
{
L1
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x438335a20d98863a4c0c97999eb2481921ccd28553eac6f913af7c12aec04108"
),
Number
:
17422590
,
},
L2
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0xdbf6a80fef073de06add9b0d14026d6e5a86c85f6d102c36d3d8e9cf89c2afd3"
),
Number
:
105235063
,
},
L2Time
:
1686068903
,
SystemConfig
:
eth
.
SystemConfig
{
BatcherAddr
:
common
.
HexToAddress
(
"0x6887246668a3b87f54deb3b94ba47a6f63f32985"
),
Overhead
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000000bc"
)),
Scalar
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000a6fe0"
)),
GasLimit
:
30
_000_000
,
},
},
BlockTime
:
2
,
MaxSequencerDrift
:
600
,
SeqWindowSize
:
3600
,
ChannelTimeout
:
300
,
L1ChainID
:
big
.
NewInt
(
1
),
L2ChainID
:
big
.
NewInt
(
10
),
BatchInboxAddress
:
common
.
HexToAddress
(
"0xff00000000000000000000000000000000000010"
),
DepositContractAddress
:
common
.
HexToAddress
(
"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"
),
L1SystemConfigAddress
:
common
.
HexToAddress
(
"0x229047fed2591dbec1eF1118d64F7aF3dB9EB290"
),
RegolithTime
:
u64Ptr
(
0
),
}
var
Goerli
=
rollup
.
Config
{
Genesis
:
rollup
.
Genesis
{
L1
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x6ffc1bf3754c01f6bb9fe057c1578b87a8571ce2e9be5ca14bace6eccfd336c7"
),
Number
:
8300214
,
},
L2
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x0f783549ea4313b784eadd9b8e8a69913b368b7366363ea814d7707ac505175f"
),
Number
:
4061224
,
},
L2Time
:
1673550516
,
SystemConfig
:
eth
.
SystemConfig
{
BatcherAddr
:
common
.
HexToAddress
(
"0x7431310e026B69BFC676C0013E12A1A11411EEc9"
),
Overhead
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x0000000000000000000000000000000000000000000000000000000000000834"
)),
Scalar
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000f4240"
)),
GasLimit
:
25
_000_000
,
},
},
BlockTime
:
2
,
MaxSequencerDrift
:
600
,
SeqWindowSize
:
3600
,
ChannelTimeout
:
300
,
L1ChainID
:
big
.
NewInt
(
5
),
L2ChainID
:
big
.
NewInt
(
420
),
BatchInboxAddress
:
common
.
HexToAddress
(
"0xff00000000000000000000000000000000000420"
),
DepositContractAddress
:
common
.
HexToAddress
(
"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"
),
L1SystemConfigAddress
:
common
.
HexToAddress
(
"0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60"
),
RegolithTime
:
u64Ptr
(
1679079600
),
}
var
Sepolia
=
rollup
.
Config
{
Genesis
:
rollup
.
Genesis
{
L1
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x48f520cf4ddaf34c8336e6e490632ea3cf1e5e93b0b2bc6e917557e31845371b"
),
Number
:
4071408
,
},
L2
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x102de6ffb001480cc9b8b548fd05c34cd4f46ae4aa91759393db90ea0409887d"
),
Number
:
0
,
},
L2Time
:
1691802540
,
SystemConfig
:
eth
.
SystemConfig
{
BatcherAddr
:
common
.
HexToAddress
(
"0x8F23BB38F531600e5d8FDDaAEC41F13FaB46E98c"
),
Overhead
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000000bc"
)),
Scalar
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000a6fe0"
)),
GasLimit
:
30000000
,
},
},
BlockTime
:
2
,
MaxSequencerDrift
:
600
,
SeqWindowSize
:
3600
,
ChannelTimeout
:
300
,
L1ChainID
:
big
.
NewInt
(
11155111
),
L2ChainID
:
big
.
NewInt
(
11155420
),
BatchInboxAddress
:
common
.
HexToAddress
(
"0xff00000000000000000000000000000011155420"
),
DepositContractAddress
:
common
.
HexToAddress
(
"0x16fc5058f25648194471939df75cf27a2fdc48bc"
),
L1SystemConfigAddress
:
common
.
HexToAddress
(
"0x034edd2a225f7f429a63e0f1d2084b9e0a93b538"
),
RegolithTime
:
u64Ptr
(
0
),
}
var
Mainnet
,
Goerli
,
Sepolia
*
rollup
.
Config
var
NetworksByName
=
map
[
string
]
rollup
.
Config
{
"goerli"
:
Goerli
,
"mainnet"
:
Mainnet
,
"sepolia"
:
Sepolia
,
func
init
()
{
mustCfg
:=
func
(
name
string
)
*
rollup
.
Config
{
cfg
,
err
:=
GetRollupConfig
(
name
)
if
err
!=
nil
{
panic
(
fmt
.
Errorf
(
"failed to load rollup config %q: %w"
,
name
,
err
))
}
return
cfg
}
Mainnet
=
mustCfg
(
"op-mainnet"
)
Goerli
=
mustCfg
(
"op-goerli"
)
Sepolia
=
mustCfg
(
"op-sepolia"
)
}
var
L2ChainIDToNetworkName
=
func
()
map
[
string
]
string
{
var
L2ChainIDToNetwork
Display
Name
=
func
()
map
[
string
]
string
{
out
:=
make
(
map
[
string
]
string
)
for
name
,
netCfg
:=
range
NetworksByName
{
out
[
netCfg
.
L2ChainID
.
String
()]
=
n
ame
for
_
,
netCfg
:=
range
superchain
.
OPChains
{
out
[
fmt
.
Sprintf
(
"%d"
,
netCfg
.
ChainID
)]
=
netCfg
.
N
ame
}
return
out
}()
// AvailableNetworks returns the selection of network configurations that is available by default.
// Other configurations that are part of the superchain-registry can be used with the --beta.network flag.
func
AvailableNetworks
()
[]
string
{
return
[]
string
{
"op-mainnet"
,
"op-goerli"
,
"op-sepolia"
}
}
// BetaAvailableNetworks returns all available network configurations in the superchain-registry.
// This set of configurations is experimental, and may change at any time.
func
BetaAvailableNetworks
()
[]
string
{
var
networks
[]
string
for
name
:=
range
NetworksByName
{
networks
=
append
(
networks
,
name
)
for
_
,
cfg
:=
range
superchain
.
OPChains
{
networks
=
append
(
networks
,
cfg
.
Chain
+
"-"
+
cfg
.
Superchain
)
}
return
networks
}
func
GetRollupConfig
(
name
string
)
(
rollup
.
Config
,
error
)
{
network
,
ok
:=
NetworksByName
[
name
]
if
!
ok
{
return
rollup
.
Config
{},
fmt
.
Errorf
(
"invalid network %s"
,
name
)
func
IsAvailableNetwork
(
name
string
,
beta
bool
)
bool
{
name
=
handleLegacyName
(
name
)
available
:=
AvailableNetworks
()
if
beta
{
available
=
BetaAvailableNetworks
()
}
for
_
,
v
:=
range
available
{
if
v
==
name
{
return
true
}
}
return
false
}
func
handleLegacyName
(
name
string
)
string
{
switch
name
{
case
"goerli"
:
return
"op-goerli"
case
"mainnet"
:
return
"op-mainnet"
case
"sepolia"
:
return
"op-sepolia"
default
:
return
name
}
}
return
network
,
nil
// ChainByName returns a chain, from known available configurations, by name.
// ChainByName returns nil when the chain name is unknown.
func
ChainByName
(
name
string
)
*
superchain
.
ChainConfig
{
// Handle legacy name aliases
name
=
handleLegacyName
(
name
)
for
_
,
chainCfg
:=
range
superchain
.
OPChains
{
if
strings
.
EqualFold
(
chainCfg
.
Chain
+
"-"
+
chainCfg
.
Superchain
,
name
)
{
return
chainCfg
}
}
return
nil
}
func
u64Ptr
(
v
uint64
)
*
uint64
{
return
&
v
func
GetRollupConfig
(
name
string
)
(
*
rollup
.
Config
,
error
)
{
chainCfg
:=
ChainByName
(
name
)
if
chainCfg
==
nil
{
return
nil
,
fmt
.
Errorf
(
"invalid network %s"
,
name
)
}
rollupCfg
,
err
:=
rollup
.
LoadOPStackRollupConfig
(
chainCfg
.
ChainID
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to load rollup config: %w"
,
err
)
}
return
rollupCfg
,
nil
}
op-node/chaincfg/chains_test.go
0 → 100644
View file @
887323bf
package
chaincfg
import
(
"math/big"
"testing"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/require"
)
// TestGetRollupConfig tests that the configs sourced from the superchain-registry match
// the configs that were embedded in the op-node manually before the superchain-registry was utilized.
//
// The superchain-registry repository is a work in progress.
// At a later date, it will be proposed to, and must be approved by, Optimism Governance.
// Until that time, the configuration described in the superchain-registry is subject to change.
//
// This test ensures no op-node config-loading behavior changes before
// the superchain-registry is no longer deemed experimental.
func
TestGetRollupConfig
(
t
*
testing
.
T
)
{
var
configsByName
=
map
[
string
]
rollup
.
Config
{
"goerli"
:
goerliCfg
,
"mainnet"
:
mainnetCfg
,
"sepolia"
:
sepoliaCfg
,
}
for
name
,
expectedCfg
:=
range
configsByName
{
require
.
True
(
t
,
IsAvailableNetwork
(
name
,
false
))
gotCfg
,
err
:=
GetRollupConfig
(
name
)
require
.
NoError
(
t
,
err
)
require
.
Equal
(
t
,
expectedCfg
,
*
gotCfg
,
"rollup-configs from superchain-registry must match"
)
}
}
var
mainnetCfg
=
rollup
.
Config
{
Genesis
:
rollup
.
Genesis
{
L1
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x438335a20d98863a4c0c97999eb2481921ccd28553eac6f913af7c12aec04108"
),
Number
:
17422590
,
},
L2
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0xdbf6a80fef073de06add9b0d14026d6e5a86c85f6d102c36d3d8e9cf89c2afd3"
),
Number
:
105235063
,
},
L2Time
:
1686068903
,
SystemConfig
:
eth
.
SystemConfig
{
BatcherAddr
:
common
.
HexToAddress
(
"0x6887246668a3b87f54deb3b94ba47a6f63f32985"
),
Overhead
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000000bc"
)),
Scalar
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000a6fe0"
)),
GasLimit
:
30
_000_000
,
},
},
BlockTime
:
2
,
MaxSequencerDrift
:
600
,
SeqWindowSize
:
3600
,
ChannelTimeout
:
300
,
L1ChainID
:
big
.
NewInt
(
1
),
L2ChainID
:
big
.
NewInt
(
10
),
BatchInboxAddress
:
common
.
HexToAddress
(
"0xff00000000000000000000000000000000000010"
),
DepositContractAddress
:
common
.
HexToAddress
(
"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"
),
L1SystemConfigAddress
:
common
.
HexToAddress
(
"0x229047fed2591dbec1eF1118d64F7aF3dB9EB290"
),
RegolithTime
:
u64Ptr
(
0
),
}
var
goerliCfg
=
rollup
.
Config
{
Genesis
:
rollup
.
Genesis
{
L1
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x6ffc1bf3754c01f6bb9fe057c1578b87a8571ce2e9be5ca14bace6eccfd336c7"
),
Number
:
8300214
,
},
L2
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x0f783549ea4313b784eadd9b8e8a69913b368b7366363ea814d7707ac505175f"
),
Number
:
4061224
,
},
L2Time
:
1673550516
,
SystemConfig
:
eth
.
SystemConfig
{
BatcherAddr
:
common
.
HexToAddress
(
"0x7431310e026B69BFC676C0013E12A1A11411EEc9"
),
Overhead
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x0000000000000000000000000000000000000000000000000000000000000834"
)),
Scalar
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000f4240"
)),
GasLimit
:
25
_000_000
,
},
},
BlockTime
:
2
,
MaxSequencerDrift
:
600
,
SeqWindowSize
:
3600
,
ChannelTimeout
:
300
,
L1ChainID
:
big
.
NewInt
(
5
),
L2ChainID
:
big
.
NewInt
(
420
),
BatchInboxAddress
:
common
.
HexToAddress
(
"0xff00000000000000000000000000000000000420"
),
DepositContractAddress
:
common
.
HexToAddress
(
"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"
),
L1SystemConfigAddress
:
common
.
HexToAddress
(
"0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60"
),
RegolithTime
:
u64Ptr
(
1679079600
),
}
var
sepoliaCfg
=
rollup
.
Config
{
Genesis
:
rollup
.
Genesis
{
L1
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x48f520cf4ddaf34c8336e6e490632ea3cf1e5e93b0b2bc6e917557e31845371b"
),
Number
:
4071408
,
},
L2
:
eth
.
BlockID
{
Hash
:
common
.
HexToHash
(
"0x102de6ffb001480cc9b8b548fd05c34cd4f46ae4aa91759393db90ea0409887d"
),
Number
:
0
,
},
L2Time
:
1691802540
,
SystemConfig
:
eth
.
SystemConfig
{
BatcherAddr
:
common
.
HexToAddress
(
"0x8F23BB38F531600e5d8FDDaAEC41F13FaB46E98c"
),
Overhead
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000000bc"
)),
Scalar
:
eth
.
Bytes32
(
common
.
HexToHash
(
"0x00000000000000000000000000000000000000000000000000000000000a6fe0"
)),
GasLimit
:
30000000
,
},
},
BlockTime
:
2
,
MaxSequencerDrift
:
600
,
SeqWindowSize
:
3600
,
ChannelTimeout
:
300
,
L1ChainID
:
big
.
NewInt
(
11155111
),
L2ChainID
:
big
.
NewInt
(
11155420
),
BatchInboxAddress
:
common
.
HexToAddress
(
"0xff00000000000000000000000000000011155420"
),
DepositContractAddress
:
common
.
HexToAddress
(
"0x16fc5058f25648194471939df75cf27a2fdc48bc"
),
L1SystemConfigAddress
:
common
.
HexToAddress
(
"0x034edd2a225f7f429a63e0f1d2084b9e0a93b538"
),
RegolithTime
:
u64Ptr
(
0
),
}
func
u64Ptr
(
v
uint64
)
*
uint64
{
return
&
v
}
op-node/cmd/main.go
View file @
887323bf
...
...
@@ -104,9 +104,9 @@ func RollupNodeMain(ctx *cli.Context) error {
// Only pretty-print the banner if it is a terminal log. Other log it as key-value pairs.
if
logCfg
.
Format
==
"terminal"
{
log
.
Info
(
"rollup config:
\n
"
+
cfg
.
Rollup
.
Description
(
chaincfg
.
L2ChainIDToNetworkName
))
log
.
Info
(
"rollup config:
\n
"
+
cfg
.
Rollup
.
Description
(
chaincfg
.
L2ChainIDToNetwork
Display
Name
))
}
else
{
cfg
.
Rollup
.
LogDescription
(
log
,
chaincfg
.
L2ChainIDToNetworkName
)
cfg
.
Rollup
.
LogDescription
(
log
,
chaincfg
.
L2ChainIDToNetwork
Display
Name
)
}
n
,
err
:=
node
.
New
(
context
.
Background
(),
cfg
,
log
,
snapshotLog
,
VersionWithMeta
,
m
)
...
...
op-node/flags/flags.go
View file @
887323bf
...
...
@@ -229,6 +229,14 @@ var (
Required
:
false
,
Value
:
false
,
}
BetaExtraNetworks
=
&
cli
.
BoolFlag
{
Name
:
"beta.extra-networks"
,
Usage
:
fmt
.
Sprintf
(
"Beta feature: enable selection of a predefined-network from the superchain-registry. "
+
"The superchain-registry is experimental, and the availability of configurations may change."
+
"Available networks: %s"
,
strings
.
Join
(
chaincfg
.
BetaAvailableNetworks
(),
", "
)),
EnvVars
:
prefixEnvVars
(
"BETA_EXTRA_NETWORKS"
),
Hidden
:
true
,
}
)
var
requiredFlags
=
[]
cli
.
Flag
{
...
...
@@ -269,6 +277,7 @@ var optionalFlags = []cli.Flag{
BackupL2UnsafeSyncRPCTrustRPC
,
L2EngineSyncEnabled
,
SkipSyncStartCheck
,
BetaExtraNetworks
,
}
// Flags contains the list of configuration options available to the binary.
...
...
op-node/p2p/peer_params_test.go
View file @
887323bf
...
...
@@ -43,7 +43,7 @@ func (testSuite *PeerParamsTestSuite) TestNewPeerScoreThresholds() {
// TestGetPeerScoreParams validates the peer score parameters.
func
(
testSuite
*
PeerParamsTestSuite
)
TestGetPeerScoreParams_None
()
{
params
,
err
:=
GetScoringParams
(
"none"
,
&
chaincfg
.
Goerli
)
params
,
err
:=
GetScoringParams
(
"none"
,
chaincfg
.
Goerli
)
testSuite
.
NoError
(
err
)
testSuite
.
Nil
(
params
)
}
...
...
@@ -62,12 +62,12 @@ func (testSuite *PeerParamsTestSuite) TestGetPeerScoreParams_Light() {
testSuite
.
Equal
(
0.9261187281287935
,
decay
)
// Test the params
scoringParams
,
err
:=
GetScoringParams
(
"light"
,
&
cfg
)
scoringParams
,
err
:=
GetScoringParams
(
"light"
,
cfg
)
peerParams
:=
scoringParams
.
PeerScoring
testSuite
.
NoError
(
err
)
// Topics should contain options for block topic
testSuite
.
Len
(
peerParams
.
Topics
,
1
)
topicParams
,
ok
:=
peerParams
.
Topics
[
blocksTopicV1
(
&
cfg
)]
topicParams
,
ok
:=
peerParams
.
Topics
[
blocksTopicV1
(
cfg
)]
testSuite
.
True
(
ok
,
"should have block topic params"
)
testSuite
.
NotZero
(
topicParams
.
TimeInMeshQuantum
)
testSuite
.
Equal
(
peerParams
.
TopicScoreCap
,
float64
(
34
))
...
...
@@ -101,7 +101,7 @@ func (testSuite *PeerParamsTestSuite) TestParamsZeroBlockTime() {
cfg
:=
chaincfg
.
Goerli
cfg
.
BlockTime
=
0
slot
:=
2
*
time
.
Second
params
,
err
:=
GetScoringParams
(
"light"
,
&
cfg
)
params
,
err
:=
GetScoringParams
(
"light"
,
cfg
)
testSuite
.
NoError
(
err
)
testSuite
.
Equal
(
params
.
PeerScoring
.
DecayInterval
,
slot
)
testSuite
.
Equal
(
params
.
ApplicationScoring
.
DecayInterval
,
slot
)
...
...
op-node/rollup/superchain.go
0 → 100644
View file @
887323bf
package
rollup
import
(
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/superchain-registry/superchain"
)
const
(
opMainnet
=
10
opGoerli
=
420
opSepolia
=
11155420
baseGoerli
=
84531
baseMainnet
=
8453
pgnMainnet
=
424
pgnSepolia
=
58008
zoraGoerli
=
999
zoraMainnet
=
7777777
)
// LoadOPStackRollupConfig loads the rollup configuration of the requested chain ID from the superchain-registry.
// Some chains may require a SystemConfigProvider to retrieve any values not part of the registry.
func
LoadOPStackRollupConfig
(
chainID
uint64
)
(
*
Config
,
error
)
{
chConfig
,
ok
:=
superchain
.
OPChains
[
chainID
]
if
!
ok
{
return
nil
,
fmt
.
Errorf
(
"unknown chain ID: %d"
,
chainID
)
}
superChain
,
ok
:=
superchain
.
Superchains
[
chConfig
.
Superchain
]
if
!
ok
{
return
nil
,
fmt
.
Errorf
(
"chain %d specifies unknown superchain: %q"
,
chainID
,
chConfig
.
Superchain
)
}
var
genesisSysConfig
eth
.
SystemConfig
if
sysCfg
,
ok
:=
superchain
.
GenesisSystemConfigs
[
chainID
];
ok
{
genesisSysConfig
=
eth
.
SystemConfig
{
BatcherAddr
:
common
.
Address
(
sysCfg
.
BatcherAddr
),
Overhead
:
eth
.
Bytes32
(
sysCfg
.
Overhead
),
Scalar
:
eth
.
Bytes32
(
sysCfg
.
Scalar
),
GasLimit
:
sysCfg
.
GasLimit
,
}
}
else
{
return
nil
,
fmt
.
Errorf
(
"unable to retrieve genesis SystemConfig of chain %d"
,
chainID
)
}
var
depositContractAddress
common
.
Address
if
addrs
,
ok
:=
superchain
.
Addresses
[
chainID
];
ok
{
depositContractAddress
=
common
.
Address
(
addrs
.
OptimismPortalProxy
)
}
else
{
return
nil
,
fmt
.
Errorf
(
"unable to retrieve deposit contract address"
)
}
regolithTime
:=
uint64
(
0
)
// two goerli testnets test-ran Bedrock and later upgraded to Regolith.
// All other OP-Stack chains have Regolith enabled from the start.
switch
chainID
{
case
baseGoerli
:
regolithTime
=
1683219600
case
opGoerli
:
regolithTime
=
1679079600
}
cfg
:=
&
Config
{
Genesis
:
Genesis
{
L1
:
eth
.
BlockID
{
Hash
:
common
.
Hash
(
chConfig
.
Genesis
.
L1
.
Hash
),
Number
:
chConfig
.
Genesis
.
L1
.
Number
,
},
L2
:
eth
.
BlockID
{
Hash
:
common
.
Hash
(
chConfig
.
Genesis
.
L2
.
Hash
),
Number
:
chConfig
.
Genesis
.
L2
.
Number
,
},
L2Time
:
chConfig
.
Genesis
.
L2Time
,
SystemConfig
:
genesisSysConfig
,
},
// The below chain parameters can be different per OP-Stack chain,
// but since none of the superchain chains differ, it's not represented in the superchain-registry yet.
// This restriction on superchain-chains may change in the future.
// Test/Alt configurations can still load custom rollup-configs when necessary.
BlockTime
:
2
,
MaxSequencerDrift
:
600
,
SeqWindowSize
:
3600
,
ChannelTimeout
:
300
,
L1ChainID
:
new
(
big
.
Int
)
.
SetUint64
(
superChain
.
Config
.
L1
.
ChainID
),
L2ChainID
:
new
(
big
.
Int
)
.
SetUint64
(
chConfig
.
ChainID
),
RegolithTime
:
&
regolithTime
,
BatchInboxAddress
:
common
.
Address
(
chConfig
.
BatchInboxAddr
),
DepositContractAddress
:
depositContractAddress
,
L1SystemConfigAddress
:
common
.
Address
(
chConfig
.
SystemConfigAddr
),
}
return
cfg
,
nil
}
op-node/service.go
View file @
887323bf
...
...
@@ -182,12 +182,16 @@ Startup will proceed to use the network-parameter and ignore the rollup config.
Conflicting configuration is deprecated, and will stop the op-node from starting in the future.
`
,
"network"
,
network
,
"rollup_config"
,
rollupConfigPath
)
}
// check that the network is available
if
!
chaincfg
.
IsAvailableNetwork
(
network
,
ctx
.
Bool
(
flags
.
BetaExtraNetworks
.
Name
))
{
return
nil
,
fmt
.
Errorf
(
"unavailable network: %q"
,
network
)
}
config
,
err
:=
chaincfg
.
GetRollupConfig
(
network
)
if
err
!=
nil
{
return
nil
,
err
}
return
&
config
,
nil
return
config
,
nil
}
file
,
err
:=
os
.
Open
(
rollupConfigPath
)
...
...
op-program/chainconfig/chaincfg.go
View file @
887323bf
...
...
@@ -2,123 +2,40 @@ package chainconfig
import
(
"fmt"
"math/big"
"strconv"
"github.com/ethereum-optimism/optimism/op-node/chaincfg"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum/go-ethereum/params"
)
var
enabledFromBedrockBlock
=
uint64
(
0
)
var
OPGoerliChainConfig
,
OPSepoliaChainConfig
,
OPMainnetChainConfig
*
params
.
ChainConfig
var
OPGoerliChainConfig
=
&
params
.
ChainConfig
{
ChainID
:
big
.
NewInt
(
420
),
HomesteadBlock
:
big
.
NewInt
(
0
),
DAOForkBlock
:
nil
,
DAOForkSupport
:
false
,
EIP150Block
:
big
.
NewInt
(
0
),
EIP155Block
:
big
.
NewInt
(
0
),
EIP158Block
:
big
.
NewInt
(
0
),
ByzantiumBlock
:
big
.
NewInt
(
0
),
ConstantinopleBlock
:
big
.
NewInt
(
0
),
PetersburgBlock
:
big
.
NewInt
(
0
),
IstanbulBlock
:
big
.
NewInt
(
0
),
MuirGlacierBlock
:
big
.
NewInt
(
0
),
BerlinBlock
:
big
.
NewInt
(
0
),
LondonBlock
:
big
.
NewInt
(
4061224
),
ArrowGlacierBlock
:
big
.
NewInt
(
4061224
),
GrayGlacierBlock
:
big
.
NewInt
(
4061224
),
MergeNetsplitBlock
:
big
.
NewInt
(
4061224
),
BedrockBlock
:
big
.
NewInt
(
4061224
),
RegolithTime
:
&
params
.
OptimismGoerliRegolithTime
,
TerminalTotalDifficulty
:
big
.
NewInt
(
0
),
TerminalTotalDifficultyPassed
:
true
,
Optimism
:
&
params
.
OptimismConfig
{
EIP1559Elasticity
:
10
,
EIP1559Denominator
:
50
,
},
}
var
OPSepoliaChainConfig
=
&
params
.
ChainConfig
{
ChainID
:
big
.
NewInt
(
11155420
),
HomesteadBlock
:
big
.
NewInt
(
0
),
DAOForkBlock
:
nil
,
DAOForkSupport
:
false
,
EIP150Block
:
big
.
NewInt
(
0
),
EIP155Block
:
big
.
NewInt
(
0
),
EIP158Block
:
big
.
NewInt
(
0
),
ByzantiumBlock
:
big
.
NewInt
(
0
),
ConstantinopleBlock
:
big
.
NewInt
(
0
),
PetersburgBlock
:
big
.
NewInt
(
0
),
IstanbulBlock
:
big
.
NewInt
(
0
),
MuirGlacierBlock
:
big
.
NewInt
(
0
),
BerlinBlock
:
big
.
NewInt
(
0
),
LondonBlock
:
big
.
NewInt
(
0
),
ArrowGlacierBlock
:
big
.
NewInt
(
0
),
GrayGlacierBlock
:
big
.
NewInt
(
0
),
MergeNetsplitBlock
:
big
.
NewInt
(
0
),
BedrockBlock
:
big
.
NewInt
(
0
),
RegolithTime
:
&
enabledFromBedrockBlock
,
TerminalTotalDifficulty
:
big
.
NewInt
(
0
),
TerminalTotalDifficultyPassed
:
true
,
Optimism
:
&
params
.
OptimismConfig
{
EIP1559Elasticity
:
6
,
EIP1559Denominator
:
50
,
},
}
var
OPMainnetChainConfig
=
&
params
.
ChainConfig
{
ChainID
:
big
.
NewInt
(
10
),
HomesteadBlock
:
big
.
NewInt
(
0
),
DAOForkBlock
:
nil
,
DAOForkSupport
:
false
,
EIP150Block
:
big
.
NewInt
(
0
),
EIP155Block
:
big
.
NewInt
(
0
),
EIP158Block
:
big
.
NewInt
(
0
),
ByzantiumBlock
:
big
.
NewInt
(
0
),
ConstantinopleBlock
:
big
.
NewInt
(
0
),
PetersburgBlock
:
big
.
NewInt
(
0
),
IstanbulBlock
:
big
.
NewInt
(
0
),
MuirGlacierBlock
:
big
.
NewInt
(
0
),
BerlinBlock
:
big
.
NewInt
(
3950000
),
LondonBlock
:
big
.
NewInt
(
105235063
),
ArrowGlacierBlock
:
big
.
NewInt
(
105235063
),
GrayGlacierBlock
:
big
.
NewInt
(
105235063
),
MergeNetsplitBlock
:
big
.
NewInt
(
105235063
),
BedrockBlock
:
big
.
NewInt
(
105235063
),
RegolithTime
:
&
enabledFromBedrockBlock
,
TerminalTotalDifficulty
:
big
.
NewInt
(
0
),
TerminalTotalDifficultyPassed
:
true
,
Optimism
:
&
params
.
OptimismConfig
{
EIP1559Elasticity
:
6
,
EIP1559Denominator
:
50
,
},
func
init
()
{
mustLoadConfig
:=
func
(
chainID
uint64
)
*
params
.
ChainConfig
{
cfg
,
err
:=
params
.
LoadOPStackChainConfig
(
chainID
)
if
err
!=
nil
{
panic
(
err
)
}
return
cfg
}
OPGoerliChainConfig
=
mustLoadConfig
(
420
)
OPSepoliaChainConfig
=
mustLoadConfig
(
11155420
)
OPMainnetChainConfig
=
mustLoadConfig
(
10
)
}
var
L2ChainConfigsBy
Name
=
map
[
string
]
*
params
.
ChainConfig
{
"goerli"
:
OPGoerliChainConfig
,
"sepolia"
:
OPSepoliaChainConfig
,
"mainnet"
:
OPMainnetChainConfig
,
var
L2ChainConfigsBy
ChainID
=
map
[
uint64
]
*
params
.
ChainConfig
{
420
:
OPGoerliChainConfig
,
11155420
:
OPSepoliaChainConfig
,
10
:
OPMainnetChainConfig
,
}
func
RollupConfigByChainID
(
chainID
uint64
)
(
*
rollup
.
Config
,
error
)
{
network
:=
chaincfg
.
L2ChainIDToNetworkName
[
strconv
.
FormatUint
(
chainID
,
10
)]
if
network
==
""
{
return
nil
,
fmt
.
Errorf
(
"unknown chain ID: %d"
,
chainID
)
}
config
,
ok
:=
chaincfg
.
NetworksByName
[
network
]
if
!
ok
{
return
nil
,
fmt
.
Errorf
(
"unknown network %s for chain ID %d"
,
network
,
chainID
)
config
,
err
:=
rollup
.
LoadOPStackRollupConfig
(
chainID
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to get rollup config for chain ID %d: %w"
,
chainID
,
err
)
}
return
&
config
,
nil
return
config
,
nil
}
func
ChainConfigByChainID
(
chainID
uint64
)
(
*
params
.
ChainConfig
,
error
)
{
network
:=
chaincfg
.
L2ChainIDToNetworkName
[
strconv
.
FormatUint
(
chainID
,
10
)]
chainConfig
,
ok
:=
L2ChainConfigsByName
[
network
]
if
!
ok
{
return
nil
,
fmt
.
Errorf
(
"unknown network %s for chain ID %d"
,
network
,
chainID
)
}
return
chainConfig
,
nil
return
params
.
LoadOPStackChainConfig
(
chainID
)
}
op-program/client/boot_test.go
View file @
887323bf
...
...
@@ -21,7 +21,7 @@ func TestBootstrapClient(t *testing.T) {
L2ClaimBlockNumber
:
1
,
L2ChainID
:
chaincfg
.
Goerli
.
L2ChainID
.
Uint64
(),
L2ChainConfig
:
chainconfig
.
OPGoerliChainConfig
,
RollupConfig
:
&
chaincfg
.
Goerli
,
RollupConfig
:
chaincfg
.
Goerli
,
}
mockOracle
:=
&
mockBoostrapOracle
{
bootInfo
,
false
}
readBootInfo
:=
NewBootstrapClient
(
mockOracle
)
.
BootInfo
()
...
...
@@ -36,7 +36,7 @@ func TestBootstrapClient_CustomChain(t *testing.T) {
L2ClaimBlockNumber
:
1
,
L2ChainID
:
CustomChainIDIndicator
,
L2ChainConfig
:
chainconfig
.
OPGoerliChainConfig
,
RollupConfig
:
&
chaincfg
.
Goerli
,
RollupConfig
:
chaincfg
.
Goerli
,
}
mockOracle
:=
&
mockBoostrapOracle
{
bootInfo
,
true
}
readBootInfo
:=
NewBootstrapClient
(
mockOracle
)
.
BootInfo
()
...
...
op-program/client/l2/engine_test.go
View file @
887323bf
...
...
@@ -161,7 +161,7 @@ func createOracleEngine(t *testing.T) (*OracleEngine, *stubEngineBackend) {
}
engine
:=
OracleEngine
{
backend
:
backend
,
rollupCfg
:
&
chaincfg
.
Goerli
,
rollupCfg
:
chaincfg
.
Goerli
,
}
return
&
engine
,
backend
}
...
...
op-program/host/cmd/main_test.go
View file @
887323bf
...
...
@@ -45,8 +45,10 @@ func TestLogLevel(t *testing.T) {
func
TestDefaultCLIOptionsMatchDefaultConfig
(
t
*
testing
.
T
)
{
cfg
:=
configForArgs
(
t
,
addRequiredArgs
())
rollupCfg
,
err
:=
chaincfg
.
GetRollupConfig
(
"op-goerli"
)
require
.
NoError
(
t
,
err
)
defaultCfg
:=
config
.
NewConfig
(
&
chaincfg
.
Goerli
,
rollupCfg
,
chainconfig
.
OPGoerliChainConfig
,
common
.
HexToHash
(
l1HeadValue
),
common
.
HexToHash
(
l2HeadValue
),
...
...
@@ -58,7 +60,7 @@ func TestDefaultCLIOptionsMatchDefaultConfig(t *testing.T) {
func
TestNetwork
(
t
*
testing
.
T
)
{
t
.
Run
(
"Unknown"
,
func
(
t
*
testing
.
T
)
{
verifyArgsInvalid
(
t
,
"
invalid network bar
"
,
replaceRequiredArg
(
"--network"
,
"bar"
))
verifyArgsInvalid
(
t
,
"
unavailable network:
\"
bar
\"
"
,
replaceRequiredArg
(
"--network"
,
"bar"
))
})
t
.
Run
(
"Required"
,
func
(
t
*
testing
.
T
)
{
...
...
@@ -74,16 +76,17 @@ func TestNetwork(t *testing.T) {
genesisFile
:=
writeValidGenesis
(
t
)
cfg
:=
configForArgs
(
t
,
addRequiredArgsExcept
(
"--network"
,
"--rollup.config"
,
configFile
,
"--l2.genesis"
,
genesisFile
))
require
.
Equal
(
t
,
chaincfg
.
Goerli
,
*
cfg
.
Rollup
)
require
.
Equal
(
t
,
*
chaincfg
.
Goerli
,
*
cfg
.
Rollup
)
})
for
name
,
cfg
:=
range
chaincfg
.
NetworksByName
{
for
_
,
name
:=
range
chaincfg
.
AvailableNetworks
()
{
name
:=
name
expected
:=
cfg
expected
,
err
:=
chaincfg
.
GetRollupConfig
(
name
)
require
.
NoError
(
t
,
err
)
t
.
Run
(
"Network_"
+
name
,
func
(
t
*
testing
.
T
)
{
args
:=
replaceRequiredArg
(
"--network"
,
name
)
cfg
:=
configForArgs
(
t
,
args
)
require
.
Equal
(
t
,
expected
,
*
cfg
.
Rollup
)
require
.
Equal
(
t
,
*
expected
,
*
cfg
.
Rollup
)
})
}
}
...
...
op-program/host/config/config.go
View file @
887323bf
...
...
@@ -6,10 +6,11 @@ import (
"fmt"
"os"
"github.com/ethereum-optimism/optimism/op-node/chaincfg"
opnode
"github.com/ethereum-optimism/optimism/op-node"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum-optimism/optimism/op-program/chainconfig"
"github.com/ethereum-optimism/optimism/op-program/host/flags"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
...
...
@@ -157,10 +158,15 @@ func NewConfigFromCLI(log log.Logger, ctx *cli.Context) (*Config, error) {
var
l2ChainConfig
*
params
.
ChainConfig
if
l2GenesisPath
==
""
{
networkName
:=
ctx
.
String
(
flags
.
Network
.
Name
)
l2ChainConfig
=
chainconfig
.
L2ChainConfigsByName
[
networkName
]
if
l2ChainConfig
==
nil
{
ch
:=
chaincfg
.
ChainByName
(
networkName
)
if
ch
==
nil
{
return
nil
,
fmt
.
Errorf
(
"flag %s is required for network %s"
,
flags
.
L2GenesisPath
.
Name
,
networkName
)
}
cfg
,
err
:=
params
.
LoadOPStackChainConfig
(
ch
.
ChainID
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to load chain config for chain %d: %w"
,
ch
.
ChainID
,
err
)
}
l2ChainConfig
=
cfg
}
else
{
l2ChainConfig
,
err
=
loadChainConfigFromGenesis
(
l2GenesisPath
)
}
...
...
op-program/host/config/config_test.go
View file @
887323bf
...
...
@@ -11,7 +11,7 @@ import (
)
var
(
validRollupConfig
=
&
chaincfg
.
Goerli
validRollupConfig
=
chaincfg
.
Goerli
validL2Genesis
=
params
.
GoerliChainConfig
validL1Head
=
common
.
Hash
{
0xaa
}
validL2Head
=
common
.
Hash
{
0xbb
}
...
...
op-program/host/host.go
View file @
887323bf
...
...
@@ -35,7 +35,7 @@ func Main(logger log.Logger, cfg *config.Config) error {
return
fmt
.
Errorf
(
"invalid config: %w"
,
err
)
}
opservice
.
ValidateEnvVars
(
flags
.
EnvVarPrefix
,
flags
.
Flags
,
logger
)
cfg
.
Rollup
.
LogDescription
(
logger
,
chaincfg
.
L2ChainIDToNetworkName
)
cfg
.
Rollup
.
LogDescription
(
logger
,
chaincfg
.
L2ChainIDToNetwork
Display
Name
)
ctx
:=
context
.
Background
()
if
cfg
.
ServerMode
{
...
...
op-program/host/host_test.go
View file @
887323bf
...
...
@@ -25,7 +25,7 @@ func TestServerMode(t *testing.T) {
l1Head
:=
common
.
Hash
{
0x11
}
l2OutputRoot
:=
common
.
Hash
{
0x33
}
cfg
:=
config
.
NewConfig
(
&
chaincfg
.
Goerli
,
chainconfig
.
OPGoerliChainConfig
,
l1Head
,
common
.
Hash
{
0x22
},
l2OutputRoot
,
common
.
Hash
{
0x44
},
1000
)
cfg
:=
config
.
NewConfig
(
chaincfg
.
Goerli
,
chainconfig
.
OPGoerliChainConfig
,
l1Head
,
common
.
Hash
{
0x22
},
l2OutputRoot
,
common
.
Hash
{
0x44
},
1000
)
cfg
.
DataDir
=
dir
cfg
.
ServerMode
=
true
...
...
op-program/host/kvstore/local_test.go
View file @
887323bf
...
...
@@ -16,7 +16,7 @@ import (
func
TestLocalPreimageSource
(
t
*
testing
.
T
)
{
cfg
:=
&
config
.
Config
{
Rollup
:
&
chaincfg
.
Goerli
,
Rollup
:
chaincfg
.
Goerli
,
L1Head
:
common
.
HexToHash
(
"0x1111"
),
L2OutputRoot
:
common
.
HexToHash
(
"0x2222"
),
L2Claim
:
common
.
HexToHash
(
"0x3333"
),
...
...
op-service/enum/enum.go
View file @
887323bf
package
enum
import
(
"fmt"
"strings"
)
// Stringered wraps the string type to implement the fmt.Stringer interface.
type
Stringered
string
// String returns the string value.
func
(
s
Stringered
)
String
()
string
{
return
string
(
s
)
}
// StringeredList converts a list of strings to a list of Stringered.
func
StringeredList
(
values
[]
string
)
[]
Stringered
{
var
out
[]
Stringered
for
_
,
v
:=
range
values
{
out
=
append
(
out
,
Stringered
(
v
))
}
return
out
}
// EnumString returns a comma-separated string of the enum values.
// This is primarily used to generate a cli flag.
func
EnumString
[
T
fmt
.
Stringer
](
values
[]
T
)
string
{
func
EnumString
[
T
~
string
](
values
[]
T
)
string
{
var
out
strings
.
Builder
for
i
,
v
:=
range
values
{
out
.
WriteString
(
v
.
String
(
))
out
.
WriteString
(
string
(
v
))
if
i
+
1
<
len
(
values
)
{
out
.
WriteString
(
", "
)
}
...
...
op-service/enum/enum_test.go
View file @
887323bf
...
...
@@ -8,30 +8,15 @@ import (
// TestEnumString_MultipleInputs tests the EnumString function with multiple inputs.
func
TestEnumString_MultipleInputs
(
t
*
testing
.
T
)
{
require
.
Equal
(
t
,
"a, b, c"
,
EnumString
([]
Stringered
{
"a"
,
"b"
,
"c"
}))
require
.
Equal
(
t
,
"a, b, c"
,
EnumString
([]
string
{
"a"
,
"b"
,
"c"
}))
}
// TestEnumString_SingleString tests the EnumString function with a single input.
func
TestEnumString_SingleString
(
t
*
testing
.
T
)
{
require
.
Equal
(
t
,
"a"
,
EnumString
([]
Stringered
{
"a"
}))
require
.
Equal
(
t
,
"a"
,
EnumString
([]
string
{
"a"
}))
}
// TestEnumString_EmptyString tests the EnumString function with no inputs.
func
TestEnumString_EmptyString
(
t
*
testing
.
T
)
{
require
.
Equal
(
t
,
""
,
EnumString
([]
Stringered
{}))
}
// TestStringeredList_MultipleInputs tests the StringeredList function with multiple inputs.
func
TestStringeredList_MultipleInputs
(
t
*
testing
.
T
)
{
require
.
Equal
(
t
,
[]
Stringered
{
"a"
,
"b"
,
"c"
},
StringeredList
([]
string
{
"a"
,
"b"
,
"c"
}))
}
// TestStringeredList_SingleString tests the StringeredList function with a single input.
func
TestStringeredList_SingleString
(
t
*
testing
.
T
)
{
require
.
Equal
(
t
,
[]
Stringered
{
"a"
},
StringeredList
([]
string
{
"a"
}))
}
// TestStringeredList_EmptyString tests the StringeredList function with no inputs.
func
TestStringeredList_EmptyString
(
t
*
testing
.
T
)
{
require
.
Equal
(
t
,
[]
Stringered
(
nil
),
StringeredList
([]
string
{}))
require
.
Equal
(
t
,
""
,
EnumString
([]
string
{}))
}
packages/contracts-bedrock/.gas-snapshot
View file @
887323bf
...
...
@@ -298,12 +298,13 @@ LegacyERC20ETH_Test:test_transferFrom_doesNotExist_reverts() (gas: 12957)
LegacyERC20ETH_Test:test_transfer_doesNotExist_reverts() (gas: 10755)
LegacyMessagePasser_Test:test_passMessageToL1_succeeds() (gas: 34524)
LibPosition_Test:test_pos_correctness_succeeds() (gas: 38689)
MIPS_Test:test_add_succeeds() (gas: 121593)
MIPS_Test:test_addi_succeeds() (gas: 121918)
MIPS_Test:test_addu_succeeds() (gas: 121601)
MIPS_Test:test_addui_succeeds() (gas: 121975)
MIPS_Test:test_and_succeeds() (gas: 121650)
MIPS_Test:test_andi_succeeds() (gas: 121792)
MIPS_Test:test_add_succeeds() (gas: 122197)
MIPS_Test:test_addiSign_succeeds() (gas: 122188)
MIPS_Test:test_addi_succeeds() (gas: 122385)
MIPS_Test:test_addu_succeeds() (gas: 122239)
MIPS_Test:test_addui_succeeds() (gas: 122447)
MIPS_Test:test_and_succeeds() (gas: 122258)
MIPS_Test:test_andi_succeeds() (gas: 122191)
MIPS_Test:test_beq_succeeds() (gas: 202355)
MIPS_Test:test_bgez_succeeds() (gas: 121484)
MIPS_Test:test_bgtz_succeeds() (gas: 121405)
...
...
@@ -311,67 +312,67 @@ MIPS_Test:test_blez_succeeds() (gas: 121361)
MIPS_Test:test_bltz_succeeds() (gas: 121504)
MIPS_Test:test_bne_succeeds() (gas: 121570)
MIPS_Test:test_branch_inDelaySlot_fails() (gas: 85999)
MIPS_Test:test_brk_succeeds() (gas: 121
531
)
MIPS_Test:test_clo_succeeds() (gas: 1219
91
)
MIPS_Test:test_clone_succeeds() (gas: 121
484
)
MIPS_Test:test_clz_succeeds() (gas: 122
462
)
MIPS_Test:test_div_succeeds() (gas: 12
180
6)
MIPS_Test:test_divu_succeeds() (gas: 12
1762
)
MIPS_Test:test_exit_succeeds() (gas: 121
408
)
MIPS_Test:test_fcntl_succeeds() (gas: 203
129
)
MIPS_Test:test_illegal_instruction_fails() (gas: 91
175
)
MIPS_Test:test_invalid_root_fails() (gas: 4356
78
)
MIPS_Test:test_jal_nonzeroRegion_succeeds() (gas: 120
492
)
MIPS_Test:test_jal_succeeds() (gas: 120
481
)
MIPS_Test:test_jalr_succeeds() (gas: 121
349
)
MIPS_Test:test_jr_succeeds() (gas: 121
094
)
MIPS_Test:test_jump_inDelaySlot_fails() (gas: 853
45
)
MIPS_Test:test_jump_nonzeroRegion_succeeds() (gas: 1202
36
)
MIPS_Test:test_brk_succeeds() (gas: 121
869
)
MIPS_Test:test_clo_succeeds() (gas: 1219
26
)
MIPS_Test:test_clone_succeeds() (gas: 121
822
)
MIPS_Test:test_clz_succeeds() (gas: 122
397
)
MIPS_Test:test_div_succeeds() (gas: 12
237
6)
MIPS_Test:test_divu_succeeds() (gas: 12
2361
)
MIPS_Test:test_exit_succeeds() (gas: 121
746
)
MIPS_Test:test_fcntl_succeeds() (gas: 203
827
)
MIPS_Test:test_illegal_instruction_fails() (gas: 91
462
)
MIPS_Test:test_invalid_root_fails() (gas: 4356
36
)
MIPS_Test:test_jal_nonzeroRegion_succeeds() (gas: 120
514
)
MIPS_Test:test_jal_succeeds() (gas: 120
503
)
MIPS_Test:test_jalr_succeeds() (gas: 121
622
)
MIPS_Test:test_jr_succeeds() (gas: 121
316
)
MIPS_Test:test_jump_inDelaySlot_fails() (gas: 853
67
)
MIPS_Test:test_jump_nonzeroRegion_succeeds() (gas: 1202
58
)
MIPS_Test:test_jump_succeeds() (gas: 120188)
MIPS_Test:test_lb_succeeds() (gas: 127
346
)
MIPS_Test:test_lbu_succeeds() (gas: 127
222
)
MIPS_Test:test_lh_succeeds() (gas: 127
367
)
MIPS_Test:test_lhu_succeeds() (gas: 127
284
)
MIPS_Test:test_ll_succeeds() (gas: 127
304
)
MIPS_Test:test_lui_succeeds() (gas: 1214
88
)
MIPS_Test:test_lw_succeeds() (gas: 127
15
8)
MIPS_Test:test_lwl_succeeds() (gas: 241
434
)
MIPS_Test:test_lwr_succeeds() (gas: 241
722
)
MIPS_Test:test_mfhi_succeeds() (gas: 121
458
)
MIPS_Test:test_mflo_succeeds() (gas: 121
484
)
MIPS_Test:test_mmap_succeeds() (gas: 118
451
)
MIPS_Test:test_movn_succeeds() (gas: 20
2409
)
MIPS_Test:test_movz_succeeds() (gas: 202
313
)
MIPS_Test:test_mthi_succeeds() (gas: 121
450
)
MIPS_Test:test_mtlo_succeeds() (gas: 121
478
)
MIPS_Test:test_mul_succeeds() (gas: 121
563
)
MIPS_Test:test_mult_succeeds() (gas: 12
1667
)
MIPS_Test:test_multu_succeeds() (gas: 12
1675
)
MIPS_Test:test_nor_succeeds() (gas: 12
1697
)
MIPS_Test:test_or_succeeds() (gas: 12
1657
)
MIPS_Test:test_ori_succeeds() (gas: 12
1865
)
MIPS_Test:test_preimage_read_succeeds() (gas: 23
3847
)
MIPS_Test:test_preimage_write_succeeds() (gas: 126
473
)
MIPS_Test:test_lb_succeeds() (gas: 127
429
)
MIPS_Test:test_lbu_succeeds() (gas: 127
327
)
MIPS_Test:test_lh_succeeds() (gas: 127
450
)
MIPS_Test:test_lhu_succeeds() (gas: 127
367
)
MIPS_Test:test_ll_succeeds() (gas: 127
589
)
MIPS_Test:test_lui_succeeds() (gas: 1214
70
)
MIPS_Test:test_lw_succeeds() (gas: 127
21
8)
MIPS_Test:test_lwl_succeeds() (gas: 241
600
)
MIPS_Test:test_lwr_succeeds() (gas: 241
888
)
MIPS_Test:test_mfhi_succeeds() (gas: 121
831
)
MIPS_Test:test_mflo_succeeds() (gas: 121
960
)
MIPS_Test:test_mmap_succeeds() (gas: 118
789
)
MIPS_Test:test_movn_succeeds() (gas: 20
3027
)
MIPS_Test:test_movz_succeeds() (gas: 202
895
)
MIPS_Test:test_mthi_succeeds() (gas: 121
875
)
MIPS_Test:test_mtlo_succeeds() (gas: 121
983
)
MIPS_Test:test_mul_succeeds() (gas: 121
475
)
MIPS_Test:test_mult_succeeds() (gas: 12
2179
)
MIPS_Test:test_multu_succeeds() (gas: 12
2216
)
MIPS_Test:test_nor_succeeds() (gas: 12
2308
)
MIPS_Test:test_or_succeeds() (gas: 12
2265
)
MIPS_Test:test_ori_succeeds() (gas: 12
2268
)
MIPS_Test:test_preimage_read_succeeds() (gas: 23
4185
)
MIPS_Test:test_preimage_write_succeeds() (gas: 126
811
)
MIPS_Test:test_prestate_exited_succeeds() (gas: 112992)
MIPS_Test:test_sb_succeeds() (gas: 1
59993
)
MIPS_Test:test_sc_succeeds() (gas: 160
187
)
MIPS_Test:test_sh_succeeds() (gas: 160
052
)
MIPS_Test:test_sll_succeeds() (gas: 1214
5
6)
MIPS_Test:test_sllv_succeeds() (gas: 1216
46
)
MIPS_Test:test_slt_succeeds() (gas: 20
3266
)
MIPS_Test:test_sltu_succeeds() (gas: 12
1871
)
MIPS_Test:test_sra_succeeds() (gas: 121
763
)
MIPS_Test:test_srav_succeeds() (gas: 12195
9
)
MIPS_Test:test_srl_succeeds() (gas: 12151
4
)
MIPS_Test:test_srlv_succeeds() (gas: 121
707
)
MIPS_Test:test_step_abi_succeeds() (gas: 5
7876
)
MIPS_Test:test_sub_succeeds() (gas: 12
1696
)
MIPS_Test:test_subu_succeeds() (gas: 12
165
9)
MIPS_Test:test_sw_succeeds() (gas: 160
027
)
MIPS_Test:test_swl_succeeds() (gas: 160
088
)
MIPS_Test:test_swr_succeeds() (gas: 160
163
)
MIPS_Test:test_xor_succeeds() (gas: 12
1685
)
MIPS_Test:test_xori_succeeds() (gas: 12
1916
)
MIPS_Test:test_sb_succeeds() (gas: 1
60300
)
MIPS_Test:test_sc_succeeds() (gas: 160
494
)
MIPS_Test:test_sh_succeeds() (gas: 160
337
)
MIPS_Test:test_sll_succeeds() (gas: 1214
3
6)
MIPS_Test:test_sllv_succeeds() (gas: 1216
65
)
MIPS_Test:test_slt_succeeds() (gas: 20
4222
)
MIPS_Test:test_sltu_succeeds() (gas: 12
2482
)
MIPS_Test:test_sra_succeeds() (gas: 121
687
)
MIPS_Test:test_srav_succeeds() (gas: 12195
5
)
MIPS_Test:test_srl_succeeds() (gas: 12151
8
)
MIPS_Test:test_srlv_succeeds() (gas: 121
683
)
MIPS_Test:test_step_abi_succeeds() (gas: 5
8312
)
MIPS_Test:test_sub_succeeds() (gas: 12
2292
)
MIPS_Test:test_subu_succeeds() (gas: 12
228
9)
MIPS_Test:test_sw_succeeds() (gas: 160
312
)
MIPS_Test:test_swl_succeeds() (gas: 160
373
)
MIPS_Test:test_swr_succeeds() (gas: 160
448
)
MIPS_Test:test_xor_succeeds() (gas: 12
2293
)
MIPS_Test:test_xori_succeeds() (gas: 12
2345
)
MerkleTrie_get_Test:test_get_corruptedProof_reverts() (gas: 5733)
MerkleTrie_get_Test:test_get_extraProofElements_reverts() (gas: 58889)
MerkleTrie_get_Test:test_get_invalidDataRemainder_reverts() (gas: 35845)
...
...
packages/contracts-bedrock/src/cannon/MIPS.sol
View file @
887323bf
...
...
@@ -67,7 +67,7 @@ contract MIPS {
}
/// @notice Extends the value leftwards with its most significant bit (sign extension).
function SE(uint32 _dat, uint32 _idx) internal pure returns (uint32) {
function SE(uint32 _dat, uint32 _idx) internal pure returns (uint32
out_
) {
unchecked {
bool isSigned = (_dat >> (_idx - 1)) != 0;
uint256 signed = ((1 << (32 - _idx)) - 1) << _idx;
...
...
@@ -771,112 +771,168 @@ contract MIPS {
}
/// @notice Execute an instruction.
function execute(uint32 insn, uint32 rs, uint32 rt, uint32 mem) internal pure returns (uint32) {
function execute(uint32 insn, uint32 rs, uint32 rt, uint32 mem) internal pure returns (uint32
out
) {
unchecked {
uint32 opcode = insn >> 26; // 6-bits
uint32 func = insn & 0x3f; // 6-bits
if (opcode < 0x20) {
// transform ArithLogI
// TODO(CLI-4136): replace with table
if (opcode >= 8 && opcode < 0xF) {
if (opcode == 8) func = 0x20; // addi
else if (opcode == 9) func = 0x21; // addiu
else if (opcode == 0xa) func = 0x2a; // slti
else if (opcode == 0xb) func = 0x2B; // sltiu
else if (opcode == 0xc) func = 0x24; // andi
else if (opcode == 0xd) func = 0x25; // ori
else if (opcode == 0xe) func = 0x26; // xori
opcode = 0;
if (opcode == 0 || (opcode >= 8 && opcode < 0xF)) {
uint32 func = insn & 0x3f; // 6-bits
assembly {
// transform ArithLogI to SPECIAL
switch opcode
// addi
case 0x8 { func := 0x20 }
// addiu
case 0x9 { func := 0x21 }
// stli
case 0xA { func := 0x2A }
// sltiu
case 0xB { func := 0x2B }
// andi
case 0xC { func := 0x24 }
// ori
case 0xD { func := 0x25 }
// xori
case 0xE { func := 0x26 }
}
// 0 is opcode SPECIAL
if (opcode == 0) {
uint32 shamt = (insn >> 6) & 0x1f;
if (func < 0x20) {
// jr/jalr/div + others
if (func >= 0x08) {
return rs;
}
// sll: Logical Shift Left
else if (func == 0x00) {
return rt << shamt;
}
// srl: Logical Shift Right
else if (func == 0x02) {
return rt >> shamt;
}
// sra: Arithmetic Shift Right
else if (func == 0x03) {
return SE(rt >> shamt, 32 - shamt);
}
// sllv: Variable Logical Shift Left
else if (func == 0x04) {
return rt << (rs & 0x1F);
}
// srlv: Variable Logical Shift Right
else if (func == 0x06) {
return rt >> (rs & 0x1F);
}
// srav: Variable Arithmetic Shift Right
else if (func == 0x07) {
return SE(rt >> rs, 32 - rs);
}
}
// R-type (ArithLog)
// 0x10-0x13 = mfhi, mthi, mflo, mtlo
// add or addu
if (func == 0x20 || func == 0x21) {
return rs + rt;
}
// sub or subu
else if (func == 0x22 || func == 0x23) {
return rs - rt;
}
// and
else if (func == 0x24) {
return rs & rt;
}
// or
else if (func == 0x25) {
return (rs | rt);
}
// xor
else if (func == 0x26) {
return (rs ^ rt);
}
// nor
else if (func == 0x27) {
return ~(rs | rt);
}
// slt: Set to 1 if less than
else if (func == 0x2a) {
return int32(rs) < int32(rt) ? 1 : 0;
}
// sltu: Set to 1 if less than unsigned
else if (func == 0x2B) {
return rs < rt ? 1 : 0;
}
// sll
if (func == 0x00) {
return rt << ((insn >> 6) & 0x1F);
}
// lui: Load Upper Immediate
else if (opcode == 0xf) {
return rt << 16;
// srl
else if (func == 0x02) {
return rt >> ((insn >> 6) & 0x1F);
}
// sra
else if (func == 0x03) {
uint32 shamt = (insn >> 6) & 0x1F;
return SE(rt >> shamt, 32 - shamt);
}
// sllv
else if (func == 0x04) {
return rt << (rs & 0x1F);
}
// srlv
else if (func == 0x6) {
return rt >> (rs & 0x1F);
}
// srav
else if (func == 0x07) {
return SE(rt >> rs, 32 - rs);
}
// functs in range [0x8, 0x1b] are handled specially by other functions
// Explicitly enumerate each funct in range to reduce code diff against Go Vm
// jr
else if (func == 0x08) {
return rs;
}
// jalr
else if (func == 0x09) {
return rs;
}
// movz
else if (func == 0x0a) {
return rs;
}
// movn
else if (func == 0x0b) {
return rs;
}
// syscall
else if (func == 0x0c) {
return rs;
}
// 0x0d - break not supported
// sync
else if (func == 0x0f) {
return rs;
}
// mfhi
else if (func == 0x10) {
return rs;
}
// mthi
else if (func == 0x11) {
return rs;
}
// mflo
else if (func == 0x12) {
return rs;
}
// mtlo
else if (func == 0x13) {
return rs;
}
// mult
else if (func == 0x18) {
return rs;
}
// multu
else if (func == 0x19) {
return rs;
}
// div
else if (func == 0x1a) {
return rs;
}
// divu
else if (func == 0x1b) {
return rs;
}
// The rest includes transformed R-type arith imm instructions
// add
else if (func == 0x20) {
return (rs + rt);
}
// addu
else if (func == 0x21) {
return (rs + rt);
}
// sub
else if (func == 0x22) {
return (rs - rt);
}
// subu
else if (func == 0x23) {
return (rs - rt);
}
// and
else if (func == 0x24) {
return (rs & rt);
}
// or
else if (func == 0x25) {
return (rs | rt);
}
// xor
else if (func == 0x26) {
return (rs ^ rt);
}
// nor
else if (func == 0x27) {
return ~(rs | rt);
}
// slti
else if (func == 0x2a) {
return int32(rs) < int32(rt) ? 1 : 0;
}
// sltiu
else if (func == 0x2b) {
return rs < rt ? 1 : 0;
} else {
revert("invalid instruction");
}
} else {
// SPECIAL2
else if (opcode == 0x1c) {
if (opcode == 0x1C) {
uint32 func = insn & 0x3f; // 6-bits
// mul
if (func == 2) {
if (func ==
0x
2) {
return uint32(int32(rs) * int32(rt));
}
// clo
if (func == 0x20 || func == 0x21) {
// cl
z, cl
o
else
if (func == 0x20 || func == 0x21) {
if (func == 0x20) {
rs = ~rs;
}
...
...
@@ -888,9 +944,12 @@ contract MIPS {
return i;
}
}
} else if (opcode < 0x28) {
// lui
else if (opcode == 0x0F) {
return rt << 16;
}
// lb
if (opcode == 0x20) {
else
if (opcode == 0x20) {
return SE((mem >> (24 - (rs & 3) * 8)) & 0xFF, 8);
}
// lh
...
...
@@ -911,54 +970,55 @@ contract MIPS {
else if (opcode == 0x24) {
return (mem >> (24 - (rs & 3) * 8)) & 0xFF;
}
// lhu
//
lhu
else if (opcode == 0x25) {
return (mem >> (16 - (rs & 2) * 8)) & 0xFFFF;
}
// lwr
//
lwr
else if (opcode == 0x26) {
uint32 val = mem >> (24 - (rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) >> (24 - (rs & 3) * 8);
return (rt & ~mask) | val;
}
// sb
else if (opcode == 0x28) {
uint32 val = (rt & 0xFF) << (24 - (rs & 3) * 8);
uint32 mask = 0xFFFFFFFF ^ uint32(0xFF << (24 - (rs & 3) * 8));
return (mem & mask) | val;
}
// sh
else if (opcode == 0x29) {
uint32 val = (rt & 0xFFFF) << (16 - (rs & 2) * 8);
uint32 mask = 0xFFFFFFFF ^ uint32(0xFFFF << (16 - (rs & 2) * 8));
return (mem & mask) | val;
}
// swl
else if (opcode == 0x2a) {
uint32 val = rt >> ((rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) >> ((rs & 3) * 8);
return (mem & ~mask) | val;
}
// sw
else if (opcode == 0x2b) {
return rt;
}
// swr
else if (opcode == 0x2e) {
uint32 val = rt << (24 - (rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) << (24 - (rs & 3) * 8);
return (mem & ~mask) | val;
}
// ll
else if (opcode == 0x30) {
return mem;
}
// sc
else if (opcode == 0x38) {
return rt;
} else {
revert("invalid instruction");
}
}
// sb
else if (opcode == 0x28) {
uint32 val = (rt & 0xFF) << (24 - (rs & 3) * 8);
uint32 mask = 0xFFFFFFFF ^ uint32(0xFF << (24 - (rs & 3) * 8));
return (mem & mask) | val;
}
// sh
else if (opcode == 0x29) {
uint32 val = (rt & 0xFFFF) << (16 - (rs & 2) * 8);
uint32 mask = 0xFFFFFFFF ^ uint32(0xFFFF << (16 - (rs & 2) * 8));
return (mem & mask) | val;
}
// swl
else if (opcode == 0x2a) {
uint32 val = rt >> ((rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) >> ((rs & 3) * 8);
return (mem & ~mask) | val;
}
// sw
else if (opcode == 0x2b) {
return rt;
}
// swr
else if (opcode == 0x2e) {
uint32 val = rt << (24 - (rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) << (24 - (rs & 3) * 8);
return (mem & ~mask) | val;
}
// ll
else if (opcode == 0x30) {
return mem;
}
// sc
else if (opcode == 0x38) {
return rt;
}
revert("invalid instruction");
}
}
...
...
packages/contracts-bedrock/test/MIPS.t.sol
View file @
887323bf
...
...
@@ -102,6 +102,26 @@ contract MIPS_Test is CommonTest {
assertEq(postState, outputState(expect), "unexpected post state");
}
function test_addiSign_succeeds() external {
uint16 imm = 0xfffe; // -2
uint32 insn = encodeitype(0x8, 17, 8, imm); // addi t0, s1, 40
(MIPS.State memory state, bytes memory proof) = constructMIPSState(0, insn, 0x4, 0);
state.registers[8] = 1; // t0
state.registers[17] = 2; // s1
bytes memory encodedState = encodeState(state);
MIPS.State memory expect;
expect.memRoot = state.memRoot;
expect.pc = state.nextPC;
expect.nextPC = state.nextPC + 4;
expect.step = state.step + 1;
expect.registers[8] = 0;
expect.registers[17] = state.registers[17];
bytes32 postState = mips.step(encodedState, proof);
assertEq(postState, outputState(expect), "unexpected post state");
}
function test_addui_succeeds() external {
uint16 imm = 40;
uint32 insn = encodeitype(0x9, 17, 8, imm); // addui t0, s1, 40
...
...
@@ -305,15 +325,15 @@ contract MIPS_Test is CommonTest {
function test_slt_succeeds() external {
uint32 insn = encodespec(17, 18, 8, 0x2a); // slt t0, s1, s2
(MIPS.State memory state, bytes memory proof) = constructMIPSState(0, insn, 0x4, 0);
state.registers[17] =
1200;
state.registers[18] =
490
;
state.registers[17] =
0xFF_FF_FF_FE; // -2
state.registers[18] =
5
;
MIPS.State memory expect;
expect.memRoot = state.memRoot;
expect.pc = state.nextPC;
expect.nextPC = state.nextPC + 4;
expect.step = state.step + 1;
expect.registers[8] =
state.registers[17] < state.registers[18] ? 1 : 0
; // t0
expect.registers[8] =
1
; // t0
expect.registers[17] = state.registers[17];
expect.registers[18] = state.registers[18];
...
...
@@ -326,7 +346,7 @@ contract MIPS_Test is CommonTest {
state.registers[18] = tmp;
expect.registers[17] = state.registers[17];
expect.registers[18] = state.registers[18];
expect.registers[8] =
state.registers[17] < state.registers[18] ? 1 :
0; // t0
expect.registers[8] = 0; // t0
postState = mips.step(encodeState(state), proof);
assertEq(postState, outputState(expect), "unexpected post state");
}
...
...
@@ -1127,14 +1147,14 @@ contract MIPS_Test is CommonTest {
uint8 shiftamt = 4;
uint32 insn = encodespec(0x0, 0x9, 0x8, uint16(shiftamt) << 6 | 3); // sra t0, t1, 3
(MIPS.State memory state, bytes memory proof) = constructMIPSState(0, insn, 0x4, 0);
state.registers[9] = 0x20; // t1
state.registers[9] = 0x
80_00_00_
20; // t1
MIPS.State memory expect;
expect.memRoot = state.memRoot;
expect.pc = state.nextPC;
expect.nextPC = state.nextPC + 4;
expect.step = state.step + 1;
expect.registers[8] =
state.registers[9] >> shiftamt;
expect.registers[8] =
0xF8_00_00_02; // 4 shifts while preserving sign bit
expect.registers[9] = state.registers[9];
bytes memory enc = encodeState(state);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment