diff --git a/codec/block-ethereum.avsc b/codec/block-ethereum.avsc index be4a2ed5..467cfb7c 100644 --- a/codec/block-ethereum.avsc +++ b/codec/block-ethereum.avsc @@ -136,6 +136,30 @@ "string" ], "default":"null" + }, + { + "name":"blobGasUsed", + "type":[ + "null", + "int" + ], + "default":"null" + }, + { + "name":"excessBlobGas", + "type":[ + "null", + "int" + ], + "default":"null" + }, + { + "name":"parentBeaconBlockRoot", + "type":[ + "null", + "string" + ], + "default":"null" } ] } @@ -543,7 +567,7 @@ { "name":"codecVersion", "type":"double", - "default":0.35 + "default":0.36 } ] } \ No newline at end of file diff --git a/data/redis/dump.rdb b/data/redis/dump.rdb index f5193e31..a96d3a38 100644 Binary files a/data/redis/dump.rdb and b/data/redis/dump.rdb differ diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index 2559930f..ed638833 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -123,7 +123,7 @@ services: sleep 1; done; echo proof-chain contracts deployed!; - ./entry.sh; + ./bsp-agent --redis-url=redis://username:@redis:6379/0?topic=replication-2#replicate --avro-codec-path=./codec/block-ethereum.avsc --binary-file-path=./bin/block-ethereum/ --block-divisor=3 --log-folder ./logs/ --metrics --metrics.port 6063 --metrics.addr 0.0.0.0 --proof-chain-address=0xEa2ff902dbeEECcc828757B881b343F9316752e5 --consumer-timeout=15 --ipfs-pinner-server="http://ipfs-pinner:3001/"; exit 0;" environment: - MB_PRIVATE_KEY=${PRIVATE_KEY} diff --git a/docker-compose-local.yml b/docker-compose-local.yml index f7974972..ecffdfe2 100644 --- a/docker-compose-local.yml +++ b/docker-compose-local.yml @@ -123,7 +123,7 @@ services: sleep 1; done; echo proof-chain contracts deployed!; - ./bsp-agent --redis-url=redis://username:@redis:6379/0?topic=replication#replicate --avro-codec-path=./codec/block-ethereum.avsc --binary-file-path=./bin/block-ethereum/ --block-divisor=3 --log-folder ./logs/ --metrics --metrics.port 6063 --metrics.addr 0.0.0.0 --proof-chain-address=0xEa2ff902dbeEECcc828757B881b343F9316752e5 --consumer-timeout=100000 --ipfs-pinner-server="http://ipfs-pinner:3001/"; + ./bsp-agent --redis-url=redis://username:@redis:6379/0?topic=replication-2#replicate --avro-codec-path=./codec/block-ethereum.avsc --binary-file-path=./bin/block-ethereum/ --block-divisor=3 --log-folder ./logs/ --metrics --metrics.port 6063 --metrics.addr 0.0.0.0 --proof-chain-address=0xEa2ff902dbeEECcc828757B881b343F9316752e5 --consumer-timeout=100000 --ipfs-pinner-server="http://ipfs-pinner:3001/"; exit 0;" environment: - MB_PRIVATE_KEY=${PRIVATE_KEY} diff --git a/entry.sh b/entry.sh index 3e1d7907..251a8029 100755 --- a/entry.sh +++ b/entry.sh @@ -4,16 +4,18 @@ then timeout 120s ./bsp-agent --redis-url=redis://username:@redis:6379/0?topic=replication-2#replicate \ --avro-codec-path=./codec/block-elrond.avsc \ --binary-file-path=./bin/block-elrond/ \ - --proof-chain-address=0xea2ff902dbeeeccc828757b881b343f9316752e5\ + --proof-chain-address=0xEa2ff902dbeEECcc828757B881b343F9316752e5\ --consumer-timeout=15 \ --websocket-urls="34.69.250.147:20000 34.69.250.147:20001 34.69.250.147:20002 34.69.250.147:20003" else - ./bsp-agent --redis-url=redis://username:@redis:6379/0?topic=replication#replicate \ - --avro-codec-path=./codec/block-ethereum.avsc \ - --binary-file-path=./bin/block-ethereum/ \ - --block-divisor=3 \ - --proof-chain-address=0xea2ff902dbeeeccc828757b881b343f9316752e5 \ + ./bsp-agent --redis-url=redis://username:@redis:6379/0?topic=replication-2#replicate \ + --avro-codec-path=./codec/block-ethereum.avsc \ + --binary-file-path=./bin/block-ethereum/ \ + --block-divisor=3 \ + --log-folder ./logs/ \ + --proof-chain-address=0xEa2ff902dbeEECcc828757B881b343F9316752e5 \ + --metrics --metrics.port 6063 --metrics.addr 0.0.0.0 \ --consumer-timeout=15 \ --ipfs-pinner-server="http://ipfs-pinner:3001/" fi diff --git a/go.mod b/go.mod index 96742586..f8b7c792 100644 --- a/go.mod +++ b/go.mod @@ -62,7 +62,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/djherbis/times v1.5.0 // indirect - github.com/fatih/color v1.15.0 + github.com/fatih/color v1.16.0 github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect @@ -76,7 +76,7 @@ require ( github.com/influxdata/influxdb-client-go/v2 v2.13.0 github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/miekg/dns v1.1.43 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect diff --git a/go.sum b/go.sum index 4777c195..ef5e5a05 100644 --- a/go.sum +++ b/go.sum @@ -169,8 +169,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/ethereum/go-ethereum v1.11.5 h1:3M1uan+LAUvdn+7wCEFrcMM4LJTeuxDrPTg/f31a5QQ= github.com/ethereum/go-ethereum v1.11.5/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -383,8 +383,8 @@ github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqf github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104 h1:d8RFOZ2IiFtFWBcKEHAFYJcPTf0wY5q0exFNJZVWa1U= @@ -766,6 +766,8 @@ golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= diff --git a/internal/node/eth_node.go b/internal/node/eth_node.go index 7ccd3a6b..b2dbe53b 100644 --- a/internal/node/eth_node.go +++ b/internal/node/eth_node.go @@ -218,6 +218,8 @@ func (node *ethAgentNode) encodeProveAndUploadReplicaSegment(ctx context.Context return pTxHash, nil case strings.Contains(pTxHash, "already known"): return pTxHash, nil + case strings.Contains(pTxHash, "max submissions limit exceeded"): + return pTxHash, nil case pTxHash == "": return "", fmt.Errorf("failed to prove & upload block-replica segment event: %v", currentSegment.SegmentName) default: diff --git a/internal/proof/proof.go b/internal/proof/proof.go index 20bdf8fa..d6c9d0b7 100644 --- a/internal/proof/proof.go +++ b/internal/proof/proof.go @@ -143,6 +143,13 @@ func executeWithRetry(ctx context.Context, interactor *ProofchainInteractor, pro return } + if strings.Contains(err.Error(), "Max submissions limit exceeded") { + log.Error("max submissions limit exceeded, skipping: ", err) + txHash <- "max submissions limit exceeded" + + return + } + log.Error("error sending tx to deployed contract: ", err) txHash <- "" diff --git a/internal/proof/proofchain.abi b/internal/proof/proofchain.abi index d2763c21..3c8a9c15 100644 --- a/internal/proof/proofchain.abi +++ b/internal/proof/proofchain.abi @@ -129,7 +129,7 @@ { "indexed": false, "internalType": "uint256", - "name": "secondsPerBlock", + "name": "secondsPerBlockTargetChain", "type": "uint256" } ], @@ -294,11 +294,11 @@ { "indexed": true, "internalType": "uint64", - "name": "secondsPerBlock", + "name": "secondsPerBlockCurrentChain", "type": "uint64" } ], - "name": "SecondsPerBlockChanged", + "name": "SecondsPerBlockCurrentChainChanged", "type": "event" }, { @@ -594,7 +594,7 @@ }, { "internalType": "uint256", - "name": "secondsPerBlock", + "name": "secondsPerBlockTargetChain", "type": "uint256" }, { @@ -666,7 +666,7 @@ }, { "internalType": "uint256", - "name": "secondsPerBlock", + "name": "secondsPerBlockCurrentChain", "type": "uint256" } ], @@ -715,7 +715,7 @@ "inputs": [ { "internalType": "address", - "name": "initialOwner", + "name": "initialGovernor", "type": "address" }, { @@ -937,7 +937,7 @@ }, { "internalType": "uint256", - "name": "secondsPerBlock", + "name": "secondsPerBlockTargetChain", "type": "uint256" } ], @@ -1012,11 +1012,11 @@ "inputs": [ { "internalType": "uint64", - "name": "secondsPerBlock", + "name": "secondsPerBlockCurrentChain", "type": "uint64" } ], - "name": "setSecondsPerBlock", + "name": "setSecondsPerBlockCurrentChain", "outputs": [], "stateMutability": "nonpayable", "type": "function" diff --git a/internal/proof/proofchain.go b/internal/proof/proofchain.go index b55f99af..82522be8 100644 --- a/internal/proof/proofchain.go +++ b/internal/proof/proofchain.go @@ -1,6 +1,5 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -// ./abigen --abi generated-abis/ugly/BlockSpecimenProofChain.json --pkg=proof --type=ProofChain --out=proofchain.go package proof @@ -32,7 +31,7 @@ var ( // ProofChainMetaData contains all meta data concerning the ProofChain contract. var ProofChainMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"threshold\",\"type\":\"uint64\"}],\"name\":\"BlockHeightSubmissionThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"specimenHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"storageURL\",\"type\":\"string\"}],\"name\":\"BlockSpecimenProductionProofSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorBitMap\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"specimenHash\",\"type\":\"bytes32\"}],\"name\":\"BlockSpecimenQuorum\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newBlockSpecimenRewardAllocation\",\"type\":\"uint128\"}],\"name\":\"BlockSpecimenRewardChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockOnTargetChain\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockOnCurrentChain\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"secondsPerBlock\",\"type\":\"uint256\"}],\"name\":\"ChainSyncDataChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxSubmissions\",\"type\":\"uint256\"}],\"name\":\"MaxSubmissionsPerBlockHeightChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newStakeRequirement\",\"type\":\"uint128\"}],\"name\":\"MinimumRequiredStakeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"nthBlock\",\"type\":\"uint64\"}],\"name\":\"NthBlockChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"OperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"activeOperatorCount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"OperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"}],\"name\":\"QuorumNotReached\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"secondsPerBlock\",\"type\":\"uint64\"}],\"name\":\"SecondsPerBlockChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"deadline\",\"type\":\"uint64\"}],\"name\":\"SessionStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newSessionDuration\",\"type\":\"uint64\"}],\"name\":\"SpecimenSessionDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"minSubmissions\",\"type\":\"uint64\"}],\"name\":\"SpecimenSessionMinSubmissionChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newQuorumThreshold\",\"type\":\"uint256\"}],\"name\":\"SpecimenSessionQuorumChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newStakingManager\",\"type\":\"address\"}],\"name\":\"StakingManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"ValidatorDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"ValidatorEnabled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AUDITOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BLOCK_SPECIMEN_PRODUCER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"auditor\",\"type\":\"address\"}],\"name\":\"addAuditor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"addBSPOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"addGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"disableValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"enableValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"}],\"name\":\"finalizeSpecimenSession\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_bsps\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"__governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"__auditors\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBSPRoleData\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"requiredStake\",\"type\":\"uint128\"},{\"internalType\":\"address[]\",\"name\":\"activeMembers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"}],\"name\":\"getChainData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockOnTargetChain\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockOnCurrentChain\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondsPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"allowedThreshold\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"maxSubmissionsPerBlockHeight\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"nthBlock\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"getEnabledOperatorCount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMetadata\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"stakingManager\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"blockSpecimenRewardAllocation\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"blockSpecimenSessionDuration\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minSubmissionsRequired\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockSpecimenQuorum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondsPerBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"getOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"specimenhash\",\"type\":\"bytes32\"}],\"name\":\"getURLS\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"stakingManager\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isSessionOpen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"isValidatorEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"operatorRoles\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"auditor\",\"type\":\"address\"}],\"name\":\"removeAuditor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"removeBSPOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"removeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"threshold\",\"type\":\"uint64\"}],\"name\":\"setBlockHeightSubmissionsThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newBlockSpecimenReward\",\"type\":\"uint128\"}],\"name\":\"setBlockSpecimenReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newSessionDuration\",\"type\":\"uint64\"}],\"name\":\"setBlockSpecimenSessionDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockOnTargetChain\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockOnCurrentChain\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondsPerBlock\",\"type\":\"uint256\"}],\"name\":\"setChainSyncData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSubmissions\",\"type\":\"uint64\"}],\"name\":\"setMaxSubmissionsPerBlockHeight\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"minSubmissions\",\"type\":\"uint64\"}],\"name\":\"setMinSubmissionsRequired\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"n\",\"type\":\"uint64\"}],\"name\":\"setNthBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"quorum\",\"type\":\"uint256\"}],\"name\":\"setQuorumThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"secondsPerBlock\",\"type\":\"uint64\"}],\"name\":\"setSecondsPerBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingManagerAddress\",\"type\":\"address\"}],\"name\":\"setStakingManagerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"specimenHash\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"storageURL\",\"type\":\"string\"}],\"name\":\"submitBlockSpecimenProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"validatorIDs\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"threshold\",\"type\":\"uint64\"}],\"name\":\"BlockHeightSubmissionThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"specimenHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"storageURL\",\"type\":\"string\"}],\"name\":\"BlockSpecimenProductionProofSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorBitMap\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"specimenHash\",\"type\":\"bytes32\"}],\"name\":\"BlockSpecimenQuorum\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newBlockSpecimenRewardAllocation\",\"type\":\"uint128\"}],\"name\":\"BlockSpecimenRewardChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockOnTargetChain\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockOnCurrentChain\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"secondsPerBlockTargetChain\",\"type\":\"uint256\"}],\"name\":\"ChainSyncDataChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxSubmissions\",\"type\":\"uint256\"}],\"name\":\"MaxSubmissionsPerBlockHeightChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newStakeRequirement\",\"type\":\"uint128\"}],\"name\":\"MinimumRequiredStakeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"nthBlock\",\"type\":\"uint64\"}],\"name\":\"NthBlockChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"OperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"activeOperatorCount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"OperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"}],\"name\":\"QuorumNotReached\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"secondsPerBlockCurrentChain\",\"type\":\"uint64\"}],\"name\":\"SecondsPerBlockCurrentChainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"deadline\",\"type\":\"uint64\"}],\"name\":\"SessionStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newSessionDuration\",\"type\":\"uint64\"}],\"name\":\"SpecimenSessionDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"minSubmissions\",\"type\":\"uint64\"}],\"name\":\"SpecimenSessionMinSubmissionChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newQuorumThreshold\",\"type\":\"uint256\"}],\"name\":\"SpecimenSessionQuorumChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newStakingManager\",\"type\":\"address\"}],\"name\":\"StakingManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"ValidatorDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"ValidatorEnabled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AUDITOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BLOCK_SPECIMEN_PRODUCER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"auditor\",\"type\":\"address\"}],\"name\":\"addAuditor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"addBSPOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"addGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"disableValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"enableValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"}],\"name\":\"finalizeSpecimenSession\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_bsps\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"__governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"__auditors\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBSPRoleData\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"requiredStake\",\"type\":\"uint128\"},{\"internalType\":\"address[]\",\"name\":\"activeMembers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"}],\"name\":\"getChainData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockOnTargetChain\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockOnCurrentChain\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondsPerBlockTargetChain\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"allowedThreshold\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"maxSubmissionsPerBlockHeight\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"nthBlock\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"getEnabledOperatorCount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMetadata\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"stakingManager\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"blockSpecimenRewardAllocation\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"blockSpecimenSessionDuration\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minSubmissionsRequired\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockSpecimenQuorum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondsPerBlockCurrentChain\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"getOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"specimenhash\",\"type\":\"bytes32\"}],\"name\":\"getURLS\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialGovernor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"stakingManager\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isSessionOpen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"validatorId\",\"type\":\"uint128\"}],\"name\":\"isValidatorEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"operatorRoles\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"auditor\",\"type\":\"address\"}],\"name\":\"removeAuditor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"removeBSPOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"removeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"threshold\",\"type\":\"uint64\"}],\"name\":\"setBlockHeightSubmissionsThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newBlockSpecimenReward\",\"type\":\"uint128\"}],\"name\":\"setBlockSpecimenReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newSessionDuration\",\"type\":\"uint64\"}],\"name\":\"setBlockSpecimenSessionDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockOnTargetChain\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockOnCurrentChain\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondsPerBlockTargetChain\",\"type\":\"uint256\"}],\"name\":\"setChainSyncData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSubmissions\",\"type\":\"uint64\"}],\"name\":\"setMaxSubmissionsPerBlockHeight\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"minSubmissions\",\"type\":\"uint64\"}],\"name\":\"setMinSubmissionsRequired\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"n\",\"type\":\"uint64\"}],\"name\":\"setNthBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"quorum\",\"type\":\"uint256\"}],\"name\":\"setQuorumThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"secondsPerBlockCurrentChain\",\"type\":\"uint64\"}],\"name\":\"setSecondsPerBlockCurrentChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingManagerAddress\",\"type\":\"address\"}],\"name\":\"setStakingManagerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"specimenHash\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"storageURL\",\"type\":\"string\"}],\"name\":\"submitBlockSpecimenProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"validatorIDs\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } // ProofChainABI is the input ABI used to generate the binding from. @@ -371,11 +370,11 @@ func (_ProofChain *ProofChainCallerSession) GetBSPRoleData() (struct { // GetChainData is a free data retrieval call binding the contract method 0x54cfa69f. // -// Solidity: function getChainData(uint64 chainId) view returns(uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlock, uint128 allowedThreshold, uint128 maxSubmissionsPerBlockHeight, uint64 nthBlock) +// Solidity: function getChainData(uint64 chainId) view returns(uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlockTargetChain, uint128 allowedThreshold, uint128 maxSubmissionsPerBlockHeight, uint64 nthBlock) func (_ProofChain *ProofChainCaller) GetChainData(opts *bind.CallOpts, chainId uint64) (struct { BlockOnTargetChain *big.Int BlockOnCurrentChain *big.Int - SecondsPerBlock *big.Int + SecondsPerBlockTargetChain *big.Int AllowedThreshold *big.Int MaxSubmissionsPerBlockHeight *big.Int NthBlock uint64 @@ -386,7 +385,7 @@ func (_ProofChain *ProofChainCaller) GetChainData(opts *bind.CallOpts, chainId u outstruct := new(struct { BlockOnTargetChain *big.Int BlockOnCurrentChain *big.Int - SecondsPerBlock *big.Int + SecondsPerBlockTargetChain *big.Int AllowedThreshold *big.Int MaxSubmissionsPerBlockHeight *big.Int NthBlock uint64 @@ -397,7 +396,7 @@ func (_ProofChain *ProofChainCaller) GetChainData(opts *bind.CallOpts, chainId u outstruct.BlockOnTargetChain = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) outstruct.BlockOnCurrentChain = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.SecondsPerBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.SecondsPerBlockTargetChain = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) outstruct.AllowedThreshold = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) outstruct.MaxSubmissionsPerBlockHeight = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) outstruct.NthBlock = *abi.ConvertType(out[5], new(uint64)).(*uint64) @@ -408,11 +407,11 @@ func (_ProofChain *ProofChainCaller) GetChainData(opts *bind.CallOpts, chainId u // GetChainData is a free data retrieval call binding the contract method 0x54cfa69f. // -// Solidity: function getChainData(uint64 chainId) view returns(uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlock, uint128 allowedThreshold, uint128 maxSubmissionsPerBlockHeight, uint64 nthBlock) +// Solidity: function getChainData(uint64 chainId) view returns(uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlockTargetChain, uint128 allowedThreshold, uint128 maxSubmissionsPerBlockHeight, uint64 nthBlock) func (_ProofChain *ProofChainSession) GetChainData(chainId uint64) (struct { BlockOnTargetChain *big.Int BlockOnCurrentChain *big.Int - SecondsPerBlock *big.Int + SecondsPerBlockTargetChain *big.Int AllowedThreshold *big.Int MaxSubmissionsPerBlockHeight *big.Int NthBlock uint64 @@ -422,11 +421,11 @@ func (_ProofChain *ProofChainSession) GetChainData(chainId uint64) (struct { // GetChainData is a free data retrieval call binding the contract method 0x54cfa69f. // -// Solidity: function getChainData(uint64 chainId) view returns(uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlock, uint128 allowedThreshold, uint128 maxSubmissionsPerBlockHeight, uint64 nthBlock) +// Solidity: function getChainData(uint64 chainId) view returns(uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlockTargetChain, uint128 allowedThreshold, uint128 maxSubmissionsPerBlockHeight, uint64 nthBlock) func (_ProofChain *ProofChainCallerSession) GetChainData(chainId uint64) (struct { BlockOnTargetChain *big.Int BlockOnCurrentChain *big.Int - SecondsPerBlock *big.Int + SecondsPerBlockTargetChain *big.Int AllowedThreshold *big.Int MaxSubmissionsPerBlockHeight *big.Int NthBlock uint64 @@ -467,14 +466,14 @@ func (_ProofChain *ProofChainCallerSession) GetEnabledOperatorCount(validatorId // GetMetadata is a free data retrieval call binding the contract method 0x7a5b4f59. // -// Solidity: function getMetadata() view returns(address stakingManager, uint128 blockSpecimenRewardAllocation, uint64 blockSpecimenSessionDuration, uint64 minSubmissionsRequired, uint256 blockSpecimenQuorum, uint256 secondsPerBlock) +// Solidity: function getMetadata() view returns(address stakingManager, uint128 blockSpecimenRewardAllocation, uint64 blockSpecimenSessionDuration, uint64 minSubmissionsRequired, uint256 blockSpecimenQuorum, uint256 secondsPerBlockCurrentChain) func (_ProofChain *ProofChainCaller) GetMetadata(opts *bind.CallOpts) (struct { StakingManager common.Address BlockSpecimenRewardAllocation *big.Int BlockSpecimenSessionDuration uint64 MinSubmissionsRequired uint64 BlockSpecimenQuorum *big.Int - SecondsPerBlock *big.Int + SecondsPerBlockCurrentChain *big.Int }, error) { var out []interface{} err := _ProofChain.contract.Call(opts, &out, "getMetadata") @@ -485,7 +484,7 @@ func (_ProofChain *ProofChainCaller) GetMetadata(opts *bind.CallOpts) (struct { BlockSpecimenSessionDuration uint64 MinSubmissionsRequired uint64 BlockSpecimenQuorum *big.Int - SecondsPerBlock *big.Int + SecondsPerBlockCurrentChain *big.Int }) if err != nil { return *outstruct, err @@ -496,7 +495,7 @@ func (_ProofChain *ProofChainCaller) GetMetadata(opts *bind.CallOpts) (struct { outstruct.BlockSpecimenSessionDuration = *abi.ConvertType(out[2], new(uint64)).(*uint64) outstruct.MinSubmissionsRequired = *abi.ConvertType(out[3], new(uint64)).(*uint64) outstruct.BlockSpecimenQuorum = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - outstruct.SecondsPerBlock = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) + outstruct.SecondsPerBlockCurrentChain = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) return *outstruct, err @@ -504,28 +503,28 @@ func (_ProofChain *ProofChainCaller) GetMetadata(opts *bind.CallOpts) (struct { // GetMetadata is a free data retrieval call binding the contract method 0x7a5b4f59. // -// Solidity: function getMetadata() view returns(address stakingManager, uint128 blockSpecimenRewardAllocation, uint64 blockSpecimenSessionDuration, uint64 minSubmissionsRequired, uint256 blockSpecimenQuorum, uint256 secondsPerBlock) +// Solidity: function getMetadata() view returns(address stakingManager, uint128 blockSpecimenRewardAllocation, uint64 blockSpecimenSessionDuration, uint64 minSubmissionsRequired, uint256 blockSpecimenQuorum, uint256 secondsPerBlockCurrentChain) func (_ProofChain *ProofChainSession) GetMetadata() (struct { StakingManager common.Address BlockSpecimenRewardAllocation *big.Int BlockSpecimenSessionDuration uint64 MinSubmissionsRequired uint64 BlockSpecimenQuorum *big.Int - SecondsPerBlock *big.Int + SecondsPerBlockCurrentChain *big.Int }, error) { return _ProofChain.Contract.GetMetadata(&_ProofChain.CallOpts) } // GetMetadata is a free data retrieval call binding the contract method 0x7a5b4f59. // -// Solidity: function getMetadata() view returns(address stakingManager, uint128 blockSpecimenRewardAllocation, uint64 blockSpecimenSessionDuration, uint64 minSubmissionsRequired, uint256 blockSpecimenQuorum, uint256 secondsPerBlock) +// Solidity: function getMetadata() view returns(address stakingManager, uint128 blockSpecimenRewardAllocation, uint64 blockSpecimenSessionDuration, uint64 minSubmissionsRequired, uint256 blockSpecimenQuorum, uint256 secondsPerBlockCurrentChain) func (_ProofChain *ProofChainCallerSession) GetMetadata() (struct { StakingManager common.Address BlockSpecimenRewardAllocation *big.Int BlockSpecimenSessionDuration uint64 MinSubmissionsRequired uint64 BlockSpecimenQuorum *big.Int - SecondsPerBlock *big.Int + SecondsPerBlockCurrentChain *big.Int }, error) { return _ProofChain.Contract.GetMetadata(&_ProofChain.CallOpts) } @@ -906,23 +905,23 @@ func (_ProofChain *ProofChainTransactorSession) FinalizeSpecimenSession(chainId // Initialize is a paid mutator transaction binding the contract method 0x485cc955. // -// Solidity: function initialize(address initialOwner, address stakingManager) returns() -func (_ProofChain *ProofChainTransactor) Initialize(opts *bind.TransactOpts, initialOwner common.Address, stakingManager common.Address) (*types.Transaction, error) { - return _ProofChain.contract.Transact(opts, "initialize", initialOwner, stakingManager) +// Solidity: function initialize(address initialGovernor, address stakingManager) returns() +func (_ProofChain *ProofChainTransactor) Initialize(opts *bind.TransactOpts, initialGovernor common.Address, stakingManager common.Address) (*types.Transaction, error) { + return _ProofChain.contract.Transact(opts, "initialize", initialGovernor, stakingManager) } // Initialize is a paid mutator transaction binding the contract method 0x485cc955. // -// Solidity: function initialize(address initialOwner, address stakingManager) returns() -func (_ProofChain *ProofChainSession) Initialize(initialOwner common.Address, stakingManager common.Address) (*types.Transaction, error) { - return _ProofChain.Contract.Initialize(&_ProofChain.TransactOpts, initialOwner, stakingManager) +// Solidity: function initialize(address initialGovernor, address stakingManager) returns() +func (_ProofChain *ProofChainSession) Initialize(initialGovernor common.Address, stakingManager common.Address) (*types.Transaction, error) { + return _ProofChain.Contract.Initialize(&_ProofChain.TransactOpts, initialGovernor, stakingManager) } // Initialize is a paid mutator transaction binding the contract method 0x485cc955. // -// Solidity: function initialize(address initialOwner, address stakingManager) returns() -func (_ProofChain *ProofChainTransactorSession) Initialize(initialOwner common.Address, stakingManager common.Address) (*types.Transaction, error) { - return _ProofChain.Contract.Initialize(&_ProofChain.TransactOpts, initialOwner, stakingManager) +// Solidity: function initialize(address initialGovernor, address stakingManager) returns() +func (_ProofChain *ProofChainTransactorSession) Initialize(initialGovernor common.Address, stakingManager common.Address) (*types.Transaction, error) { + return _ProofChain.Contract.Initialize(&_ProofChain.TransactOpts, initialGovernor, stakingManager) } // RemoveAuditor is a paid mutator transaction binding the contract method 0xe6116cfd. @@ -1074,23 +1073,23 @@ func (_ProofChain *ProofChainTransactorSession) SetBlockSpecimenSessionDuration( // SetChainSyncData is a paid mutator transaction binding the contract method 0x99146284. // -// Solidity: function setChainSyncData(uint64 chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlock) returns() -func (_ProofChain *ProofChainTransactor) SetChainSyncData(opts *bind.TransactOpts, chainId uint64, blockOnTargetChain *big.Int, blockOnCurrentChain *big.Int, secondsPerBlock *big.Int) (*types.Transaction, error) { - return _ProofChain.contract.Transact(opts, "setChainSyncData", chainId, blockOnTargetChain, blockOnCurrentChain, secondsPerBlock) +// Solidity: function setChainSyncData(uint64 chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlockTargetChain) returns() +func (_ProofChain *ProofChainTransactor) SetChainSyncData(opts *bind.TransactOpts, chainId uint64, blockOnTargetChain *big.Int, blockOnCurrentChain *big.Int, secondsPerBlockTargetChain *big.Int) (*types.Transaction, error) { + return _ProofChain.contract.Transact(opts, "setChainSyncData", chainId, blockOnTargetChain, blockOnCurrentChain, secondsPerBlockTargetChain) } // SetChainSyncData is a paid mutator transaction binding the contract method 0x99146284. // -// Solidity: function setChainSyncData(uint64 chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlock) returns() -func (_ProofChain *ProofChainSession) SetChainSyncData(chainId uint64, blockOnTargetChain *big.Int, blockOnCurrentChain *big.Int, secondsPerBlock *big.Int) (*types.Transaction, error) { - return _ProofChain.Contract.SetChainSyncData(&_ProofChain.TransactOpts, chainId, blockOnTargetChain, blockOnCurrentChain, secondsPerBlock) +// Solidity: function setChainSyncData(uint64 chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlockTargetChain) returns() +func (_ProofChain *ProofChainSession) SetChainSyncData(chainId uint64, blockOnTargetChain *big.Int, blockOnCurrentChain *big.Int, secondsPerBlockTargetChain *big.Int) (*types.Transaction, error) { + return _ProofChain.Contract.SetChainSyncData(&_ProofChain.TransactOpts, chainId, blockOnTargetChain, blockOnCurrentChain, secondsPerBlockTargetChain) } // SetChainSyncData is a paid mutator transaction binding the contract method 0x99146284. // -// Solidity: function setChainSyncData(uint64 chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlock) returns() -func (_ProofChain *ProofChainTransactorSession) SetChainSyncData(chainId uint64, blockOnTargetChain *big.Int, blockOnCurrentChain *big.Int, secondsPerBlock *big.Int) (*types.Transaction, error) { - return _ProofChain.Contract.SetChainSyncData(&_ProofChain.TransactOpts, chainId, blockOnTargetChain, blockOnCurrentChain, secondsPerBlock) +// Solidity: function setChainSyncData(uint64 chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlockTargetChain) returns() +func (_ProofChain *ProofChainTransactorSession) SetChainSyncData(chainId uint64, blockOnTargetChain *big.Int, blockOnCurrentChain *big.Int, secondsPerBlockTargetChain *big.Int) (*types.Transaction, error) { + return _ProofChain.Contract.SetChainSyncData(&_ProofChain.TransactOpts, chainId, blockOnTargetChain, blockOnCurrentChain, secondsPerBlockTargetChain) } // SetMaxSubmissionsPerBlockHeight is a paid mutator transaction binding the contract method 0x67585e44. @@ -1177,25 +1176,25 @@ func (_ProofChain *ProofChainTransactorSession) SetQuorumThreshold(quorum *big.I return _ProofChain.Contract.SetQuorumThreshold(&_ProofChain.TransactOpts, quorum) } -// SetSecondsPerBlock is a paid mutator transaction binding the contract method 0xdd36a8d5. +// SetSecondsPerBlockCurrentChain is a paid mutator transaction binding the contract method 0x2ba719ad. // -// Solidity: function setSecondsPerBlock(uint64 secondsPerBlock) returns() -func (_ProofChain *ProofChainTransactor) SetSecondsPerBlock(opts *bind.TransactOpts, secondsPerBlock uint64) (*types.Transaction, error) { - return _ProofChain.contract.Transact(opts, "setSecondsPerBlock", secondsPerBlock) +// Solidity: function setSecondsPerBlockCurrentChain(uint64 secondsPerBlockCurrentChain) returns() +func (_ProofChain *ProofChainTransactor) SetSecondsPerBlockCurrentChain(opts *bind.TransactOpts, secondsPerBlockCurrentChain uint64) (*types.Transaction, error) { + return _ProofChain.contract.Transact(opts, "setSecondsPerBlockCurrentChain", secondsPerBlockCurrentChain) } -// SetSecondsPerBlock is a paid mutator transaction binding the contract method 0xdd36a8d5. +// SetSecondsPerBlockCurrentChain is a paid mutator transaction binding the contract method 0x2ba719ad. // -// Solidity: function setSecondsPerBlock(uint64 secondsPerBlock) returns() -func (_ProofChain *ProofChainSession) SetSecondsPerBlock(secondsPerBlock uint64) (*types.Transaction, error) { - return _ProofChain.Contract.SetSecondsPerBlock(&_ProofChain.TransactOpts, secondsPerBlock) +// Solidity: function setSecondsPerBlockCurrentChain(uint64 secondsPerBlockCurrentChain) returns() +func (_ProofChain *ProofChainSession) SetSecondsPerBlockCurrentChain(secondsPerBlockCurrentChain uint64) (*types.Transaction, error) { + return _ProofChain.Contract.SetSecondsPerBlockCurrentChain(&_ProofChain.TransactOpts, secondsPerBlockCurrentChain) } -// SetSecondsPerBlock is a paid mutator transaction binding the contract method 0xdd36a8d5. +// SetSecondsPerBlockCurrentChain is a paid mutator transaction binding the contract method 0x2ba719ad. // -// Solidity: function setSecondsPerBlock(uint64 secondsPerBlock) returns() -func (_ProofChain *ProofChainTransactorSession) SetSecondsPerBlock(secondsPerBlock uint64) (*types.Transaction, error) { - return _ProofChain.Contract.SetSecondsPerBlock(&_ProofChain.TransactOpts, secondsPerBlock) +// Solidity: function setSecondsPerBlockCurrentChain(uint64 secondsPerBlockCurrentChain) returns() +func (_ProofChain *ProofChainTransactorSession) SetSecondsPerBlockCurrentChain(secondsPerBlockCurrentChain uint64) (*types.Transaction, error) { + return _ProofChain.Contract.SetSecondsPerBlockCurrentChain(&_ProofChain.TransactOpts, secondsPerBlockCurrentChain) } // SetStakingManagerAddress is a paid mutator transaction binding the contract method 0x37e15bce. @@ -1913,16 +1912,16 @@ func (it *ProofChainChainSyncDataChangedIterator) Close() error { // ProofChainChainSyncDataChanged represents a ChainSyncDataChanged event raised by the ProofChain contract. type ProofChainChainSyncDataChanged struct { - ChainId uint64 - BlockOnTargetChain *big.Int - BlockOnCurrentChain *big.Int - SecondsPerBlock *big.Int - Raw types.Log // Blockchain specific contextual infos + ChainId uint64 + BlockOnTargetChain *big.Int + BlockOnCurrentChain *big.Int + SecondsPerBlockTargetChain *big.Int + Raw types.Log // Blockchain specific contextual infos } // FilterChainSyncDataChanged is a free log retrieval operation binding the contract event 0xfd97af399d19e6be9256c99c8e52b1809cdbc4dc96816739612b6fd4e6d940b0. // -// Solidity: event ChainSyncDataChanged(uint64 indexed chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlock) +// Solidity: event ChainSyncDataChanged(uint64 indexed chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlockTargetChain) func (_ProofChain *ProofChainFilterer) FilterChainSyncDataChanged(opts *bind.FilterOpts, chainId []uint64) (*ProofChainChainSyncDataChangedIterator, error) { var chainIdRule []interface{} @@ -1939,7 +1938,7 @@ func (_ProofChain *ProofChainFilterer) FilterChainSyncDataChanged(opts *bind.Fil // WatchChainSyncDataChanged is a free log subscription operation binding the contract event 0xfd97af399d19e6be9256c99c8e52b1809cdbc4dc96816739612b6fd4e6d940b0. // -// Solidity: event ChainSyncDataChanged(uint64 indexed chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlock) +// Solidity: event ChainSyncDataChanged(uint64 indexed chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlockTargetChain) func (_ProofChain *ProofChainFilterer) WatchChainSyncDataChanged(opts *bind.WatchOpts, sink chan<- *ProofChainChainSyncDataChanged, chainId []uint64) (event.Subscription, error) { var chainIdRule []interface{} @@ -1981,7 +1980,7 @@ func (_ProofChain *ProofChainFilterer) WatchChainSyncDataChanged(opts *bind.Watc // ParseChainSyncDataChanged is a log parse operation binding the contract event 0xfd97af399d19e6be9256c99c8e52b1809cdbc4dc96816739612b6fd4e6d940b0. // -// Solidity: event ChainSyncDataChanged(uint64 indexed chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlock) +// Solidity: event ChainSyncDataChanged(uint64 indexed chainId, uint256 blockOnTargetChain, uint256 blockOnCurrentChain, uint256 secondsPerBlockTargetChain) func (_ProofChain *ProofChainFilterer) ParseChainSyncDataChanged(log types.Log) (*ProofChainChainSyncDataChanged, error) { event := new(ProofChainChainSyncDataChanged) if err := _ProofChain.contract.UnpackLog(event, "ChainSyncDataChanged", log); err != nil { @@ -3117,9 +3116,9 @@ func (_ProofChain *ProofChainFilterer) ParseQuorumNotReached(log types.Log) (*Pr return event, nil } -// ProofChainSecondsPerBlockChangedIterator is returned from FilterSecondsPerBlockChanged and is used to iterate over the raw logs and unpacked data for SecondsPerBlockChanged events raised by the ProofChain contract. -type ProofChainSecondsPerBlockChangedIterator struct { - Event *ProofChainSecondsPerBlockChanged // Event containing the contract specifics and raw log +// ProofChainSecondsPerBlockCurrentChainChangedIterator is returned from FilterSecondsPerBlockCurrentChainChanged and is used to iterate over the raw logs and unpacked data for SecondsPerBlockCurrentChainChanged events raised by the ProofChain contract. +type ProofChainSecondsPerBlockCurrentChainChangedIterator struct { + Event *ProofChainSecondsPerBlockCurrentChainChanged // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -3133,7 +3132,7 @@ type ProofChainSecondsPerBlockChangedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *ProofChainSecondsPerBlockChangedIterator) Next() bool { +func (it *ProofChainSecondsPerBlockCurrentChainChangedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3142,7 +3141,7 @@ func (it *ProofChainSecondsPerBlockChangedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ProofChainSecondsPerBlockChanged) + it.Event = new(ProofChainSecondsPerBlockCurrentChainChanged) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3157,7 +3156,7 @@ func (it *ProofChainSecondsPerBlockChangedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ProofChainSecondsPerBlockChanged) + it.Event = new(ProofChainSecondsPerBlockCurrentChainChanged) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3173,51 +3172,51 @@ func (it *ProofChainSecondsPerBlockChangedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ProofChainSecondsPerBlockChangedIterator) Error() error { +func (it *ProofChainSecondsPerBlockCurrentChainChangedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ProofChainSecondsPerBlockChangedIterator) Close() error { +func (it *ProofChainSecondsPerBlockCurrentChainChangedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ProofChainSecondsPerBlockChanged represents a SecondsPerBlockChanged event raised by the ProofChain contract. -type ProofChainSecondsPerBlockChanged struct { - SecondsPerBlock uint64 - Raw types.Log // Blockchain specific contextual infos +// ProofChainSecondsPerBlockCurrentChainChanged represents a SecondsPerBlockCurrentChainChanged event raised by the ProofChain contract. +type ProofChainSecondsPerBlockCurrentChainChanged struct { + SecondsPerBlockCurrentChain uint64 + Raw types.Log // Blockchain specific contextual infos } -// FilterSecondsPerBlockChanged is a free log retrieval operation binding the contract event 0xcaf46ba335d93b98398af7142ea3e362a6b8e91c57da6bf1e8a704f86374dde0. +// FilterSecondsPerBlockCurrentChainChanged is a free log retrieval operation binding the contract event 0x52eb144349cf62d6190a9e1cbb6a601848aa63df834dd2a2e75bb0be3fef86f4. // -// Solidity: event SecondsPerBlockChanged(uint64 indexed secondsPerBlock) -func (_ProofChain *ProofChainFilterer) FilterSecondsPerBlockChanged(opts *bind.FilterOpts, secondsPerBlock []uint64) (*ProofChainSecondsPerBlockChangedIterator, error) { +// Solidity: event SecondsPerBlockCurrentChainChanged(uint64 indexed secondsPerBlockCurrentChain) +func (_ProofChain *ProofChainFilterer) FilterSecondsPerBlockCurrentChainChanged(opts *bind.FilterOpts, secondsPerBlockCurrentChain []uint64) (*ProofChainSecondsPerBlockCurrentChainChangedIterator, error) { - var secondsPerBlockRule []interface{} - for _, secondsPerBlockItem := range secondsPerBlock { - secondsPerBlockRule = append(secondsPerBlockRule, secondsPerBlockItem) + var secondsPerBlockCurrentChainRule []interface{} + for _, secondsPerBlockCurrentChainItem := range secondsPerBlockCurrentChain { + secondsPerBlockCurrentChainRule = append(secondsPerBlockCurrentChainRule, secondsPerBlockCurrentChainItem) } - logs, sub, err := _ProofChain.contract.FilterLogs(opts, "SecondsPerBlockChanged", secondsPerBlockRule) + logs, sub, err := _ProofChain.contract.FilterLogs(opts, "SecondsPerBlockCurrentChainChanged", secondsPerBlockCurrentChainRule) if err != nil { return nil, err } - return &ProofChainSecondsPerBlockChangedIterator{contract: _ProofChain.contract, event: "SecondsPerBlockChanged", logs: logs, sub: sub}, nil + return &ProofChainSecondsPerBlockCurrentChainChangedIterator{contract: _ProofChain.contract, event: "SecondsPerBlockCurrentChainChanged", logs: logs, sub: sub}, nil } -// WatchSecondsPerBlockChanged is a free log subscription operation binding the contract event 0xcaf46ba335d93b98398af7142ea3e362a6b8e91c57da6bf1e8a704f86374dde0. +// WatchSecondsPerBlockCurrentChainChanged is a free log subscription operation binding the contract event 0x52eb144349cf62d6190a9e1cbb6a601848aa63df834dd2a2e75bb0be3fef86f4. // -// Solidity: event SecondsPerBlockChanged(uint64 indexed secondsPerBlock) -func (_ProofChain *ProofChainFilterer) WatchSecondsPerBlockChanged(opts *bind.WatchOpts, sink chan<- *ProofChainSecondsPerBlockChanged, secondsPerBlock []uint64) (event.Subscription, error) { +// Solidity: event SecondsPerBlockCurrentChainChanged(uint64 indexed secondsPerBlockCurrentChain) +func (_ProofChain *ProofChainFilterer) WatchSecondsPerBlockCurrentChainChanged(opts *bind.WatchOpts, sink chan<- *ProofChainSecondsPerBlockCurrentChainChanged, secondsPerBlockCurrentChain []uint64) (event.Subscription, error) { - var secondsPerBlockRule []interface{} - for _, secondsPerBlockItem := range secondsPerBlock { - secondsPerBlockRule = append(secondsPerBlockRule, secondsPerBlockItem) + var secondsPerBlockCurrentChainRule []interface{} + for _, secondsPerBlockCurrentChainItem := range secondsPerBlockCurrentChain { + secondsPerBlockCurrentChainRule = append(secondsPerBlockCurrentChainRule, secondsPerBlockCurrentChainItem) } - logs, sub, err := _ProofChain.contract.WatchLogs(opts, "SecondsPerBlockChanged", secondsPerBlockRule) + logs, sub, err := _ProofChain.contract.WatchLogs(opts, "SecondsPerBlockCurrentChainChanged", secondsPerBlockCurrentChainRule) if err != nil { return nil, err } @@ -3227,8 +3226,8 @@ func (_ProofChain *ProofChainFilterer) WatchSecondsPerBlockChanged(opts *bind.Wa select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ProofChainSecondsPerBlockChanged) - if err := _ProofChain.contract.UnpackLog(event, "SecondsPerBlockChanged", log); err != nil { + event := new(ProofChainSecondsPerBlockCurrentChainChanged) + if err := _ProofChain.contract.UnpackLog(event, "SecondsPerBlockCurrentChainChanged", log); err != nil { return err } event.Raw = log @@ -3249,12 +3248,12 @@ func (_ProofChain *ProofChainFilterer) WatchSecondsPerBlockChanged(opts *bind.Wa }), nil } -// ParseSecondsPerBlockChanged is a log parse operation binding the contract event 0xcaf46ba335d93b98398af7142ea3e362a6b8e91c57da6bf1e8a704f86374dde0. +// ParseSecondsPerBlockCurrentChainChanged is a log parse operation binding the contract event 0x52eb144349cf62d6190a9e1cbb6a601848aa63df834dd2a2e75bb0be3fef86f4. // -// Solidity: event SecondsPerBlockChanged(uint64 indexed secondsPerBlock) -func (_ProofChain *ProofChainFilterer) ParseSecondsPerBlockChanged(log types.Log) (*ProofChainSecondsPerBlockChanged, error) { - event := new(ProofChainSecondsPerBlockChanged) - if err := _ProofChain.contract.UnpackLog(event, "SecondsPerBlockChanged", log); err != nil { +// Solidity: event SecondsPerBlockCurrentChainChanged(uint64 indexed secondsPerBlockCurrentChain) +func (_ProofChain *ProofChainFilterer) ParseSecondsPerBlockCurrentChainChanged(log types.Log) (*ProofChainSecondsPerBlockCurrentChainChanged, error) { + event := new(ProofChainSecondsPerBlockCurrentChainChanged) + if err := _ProofChain.contract.UnpackLog(event, "SecondsPerBlockCurrentChainChanged", log); err != nil { return nil, err } event.Raw = log diff --git a/internal/types/eth.go b/internal/types/eth.go index bb4b33c8..4005b66a 100644 --- a/internal/types/eth.go +++ b/internal/types/eth.go @@ -47,23 +47,26 @@ type BlockNonce [8]byte type Bloom [BloomByteLength]byte type Header struct { - ParentHash common.Hash `json:"parentHash"` - UncleHash common.Hash `json:"sha3Uncles"` - Coinbase common.Address `json:"miner"` - Root common.Hash `json:"stateRoot"` - TxHash common.Hash `json:"transactionsRoot"` - ReceiptHash common.Hash `json:"receiptsRoot"` - Bloom Bloom `json:"logsBloom"` - Difficulty *BigInt `json:"difficulty"` - Number *BigInt `json:"number"` - GasLimit uint64 `json:"gasLimit"` - GasUsed uint64 `json:"gasUsed"` - Time uint64 `json:"timestamp"` - Extra []byte `json:"extraData"` - MixDigest common.Hash `json:"mixHash"` - Nonce BlockNonce `json:"nonce"` - BaseFee *BigInt `json:"baseFeePerGas"` - WithdrawalsHash *common.Hash `json:"withdrawalsRoot" rlp:"nil,optional"` + ParentHash common.Hash `json:"parentHash"` + UncleHash common.Hash `json:"sha3Uncles"` + Coinbase common.Address `json:"miner"` + Root common.Hash `json:"stateRoot"` + TxHash common.Hash `json:"transactionsRoot"` + ReceiptHash common.Hash `json:"receiptsRoot"` + Bloom Bloom `json:"logsBloom"` + Difficulty *BigInt `json:"difficulty"` + Number *BigInt `json:"number"` + GasLimit uint64 `json:"gasLimit"` + GasUsed uint64 `json:"gasUsed"` + Time uint64 `json:"timestamp"` + Extra []byte `json:"extraData"` + MixDigest common.Hash `json:"mixHash"` + Nonce BlockNonce `json:"nonce"` + BaseFee *BigInt `json:"baseFeePerGas"` + WithdrawalsHash *common.Hash `json:"withdrawalsRoot" rlp:"nil,optional"` + BlobGasUsed *uint64 `json:"blobGasUsed" rlp:"optional"` + ExcessBlobGas *uint64 `json:"excessBlobGas" rlp:"optional"` + ParentBeaconRoot *common.Hash `json:"parentBeaconBlockRoot" rlp:"optional"` } type Transaction struct { diff --git a/internal/utils/lenspath.go b/internal/utils/lenspath.go index 0e207515..3fdf4325 100644 --- a/internal/utils/lenspath.go +++ b/internal/utils/lenspath.go @@ -16,7 +16,9 @@ var fromLens = composeLenspath(transactionsLens, []string{"from"}) var headerLens = composeLenspath(dataLens, []string{"Header"}) var withdrawalsRootLens = composeLenspath(headerLens, []string{"withdrawalsRoot"}) - +var blobGasUsedLens = composeLenspath(headerLens, []string{"blobGasUsed"}) +var excessBlobGasLens = composeLenspath(headerLens, []string{"excessBlobGas"}) +var parentBeaconRootLens = composeLenspath(headerLens, []string{"parentBeaconBlockRoot"}) var withdrawalsLens = composeLenspath(dataLens, []string{"Withdrawals"}) var uncleLens = composeLenspath(dataLens, []string{"Uncles"}) diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 6102efdd..e34bb205 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -234,6 +234,11 @@ func UnwrapAvroUnion(data map[string]interface{}) map[string]interface{} { unwrapType(data, withdrawalsLens, "array") unwrapType(data, uncleLens, "array") + // blobs + unwrapType(data, blobGasUsedLens, "int") + unwrapType(data, excessBlobGasLens, "int") + unwrapType(data, parentBeaconRootLens, "string") + return data } @@ -259,6 +264,11 @@ func MapToAvroUnion(data map[string]interface{}) map[string]interface{} { wrapType(data, withdrawalsLens, "array") wrapType(data, uncleLens, "array") + // blobs + wrapType(data, blobGasUsedLens, "int") + wrapType(data, excessBlobGasLens, "int") + wrapType(data, parentBeaconRootLens, "string") + return data }