diff --git a/Cargo.lock b/Cargo.lock index ae6333870..ec2f24e71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7730,7 +7730,7 @@ version = "0.1.1" [[package]] name = "ismp-grandpa" -version = "1.15.3" +version = "1.15.4" dependencies = [ "anyhow", "ckb-merkle-mountain-range", diff --git a/docs/pages/developers/network/relayer.mdx b/docs/pages/developers/network/relayer.mdx index 9353eb023..8ff6ddc7a 100644 --- a/docs/pages/developers/network/relayer.mdx +++ b/docs/pages/developers/network/relayer.mdx @@ -306,7 +306,7 @@ You can obtain the required etherscan API key by following [this guide](https:// ### Contract addresses -You can find the addresses for the `IsmpHost` contracts for [mainnet](developers/evm/contracts/mainnet) and [testnet](developers/evm/contracts/testnet) +You can find the addresses for the `IsmpHost` contracts for [mainnet](/developers/evm/contracts/mainnet) and [testnet](/developers/evm/contracts/testnet) ## Withdrawing Fees diff --git a/indexers/.arbitrum-sepolia-cid b/indexers/.arbitrum-sepolia-cid deleted file mode 100644 index 4a3c62695..000000000 --- a/indexers/.arbitrum-sepolia-cid +++ /dev/null @@ -1 +0,0 @@ -QmWuPXmvjQH2h4YkE9Twdzhuo2Ew5vQAEh9YxvdM6pFfZR \ No newline at end of file diff --git a/indexers/.base-sepolia-cid b/indexers/.base-sepolia-cid deleted file mode 100644 index a0ffac1a2..000000000 --- a/indexers/.base-sepolia-cid +++ /dev/null @@ -1 +0,0 @@ -QmQfejyC5s4AD2qJdgDdnZ1wTrVT9vx3bX6qa1GCrxf9DL \ No newline at end of file diff --git a/indexers/.bsc-chapel-cid b/indexers/.bsc-chapel-cid deleted file mode 100644 index 891aff609..000000000 --- a/indexers/.bsc-chapel-cid +++ /dev/null @@ -1 +0,0 @@ -QmPMeVs8dvdBE2hSa3ZMksHMfPvGKTvU3WdHYYRpJZhJUd \ No newline at end of file diff --git a/indexers/.ethereum-sepolia-cid b/indexers/.ethereum-sepolia-cid deleted file mode 100644 index af9b8f915..000000000 --- a/indexers/.ethereum-sepolia-cid +++ /dev/null @@ -1 +0,0 @@ -Qmdyn7yJRt9pj6GsqCULRNDE85riFdqVDtCRmf6PJYGMZT \ No newline at end of file diff --git a/indexers/.gitignore b/indexers/.gitignore deleted file mode 100644 index 66a5761b3..000000000 --- a/indexers/.gitignore +++ /dev/null @@ -1,62 +0,0 @@ -# These are some examples of commonly ignored file patterns. -# You should customize this list as applicable to your project. -# Learn more about .gitignore: -# https://www.atlassian.com/git/tutorials/saving-changes/gitignore - -# Node artifact files -node_modules/ -dist/ - -# lock files -yarn.lock -package-lock.json - -# Compiled Java class files -*.class - -# Compiled Python bytecode -*.py[cod] - -# Log files -*.log - -# Package files -*.jar - -# Generated files -target/ -dist/ -src/types -project.yaml - -# JetBrains IDE -.idea/ - -# Unit test reports -TEST*.xml - -# Generated by MacOS -.DS_Store - -# Generated by Windows -Thumbs.db - -# Applications -*.app -*.exe -*.war - -# Large media files -*.mp4 -*.tiff -*.avi -*.flv -*.mov -*.wmv - -.data -.yarn - -.DS_Store - -.env diff --git a/indexers/.hyperbridge-gargantua-cid b/indexers/.hyperbridge-gargantua-cid deleted file mode 100644 index 917555447..000000000 --- a/indexers/.hyperbridge-gargantua-cid +++ /dev/null @@ -1 +0,0 @@ -QmagqWdAaexQ9ojFek1ttGLkJ9FF5W8eWYWNEqF139haSb \ No newline at end of file diff --git a/indexers/.optimism-sepolia-cid b/indexers/.optimism-sepolia-cid deleted file mode 100644 index 017161565..000000000 --- a/indexers/.optimism-sepolia-cid +++ /dev/null @@ -1 +0,0 @@ -QmdaavjyCYXjgQCx67ykW8BXktofcZCQAz1LvWTiwvnCLi \ No newline at end of file diff --git a/indexers/README.md b/indexers/README.md deleted file mode 100644 index b43be214e..000000000 --- a/indexers/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Hyperbridge Indexers - -Multichain GraphQL API using [SubQuery](https://subquery.network) that provides access to Hyperbridge specific onchain data including but not limited to the following: - -- Hyperbridge operational metrics e.g number of post requests handled, total amount of fees payed to relayers etc. -- Relayer specific information e.g total amount of fees earned, networks supported by a relayer etc - -## GraphQL API - -The Hyperbridge GraphQL indexer API can be found at [Hyperbridge Indexer API](https://explorer.subquery.network/subquery/polytope-labs/hyperbridge-indexers?stage=true), alongside detailed documentation diff --git a/indexers/abis/ChainLinkAggregatorV3.abi.json b/indexers/abis/ChainLinkAggregatorV3.abi.json deleted file mode 100644 index 4a83418cd..000000000 --- a/indexers/abis/ChainLinkAggregatorV3.abi.json +++ /dev/null @@ -1,51 +0,0 @@ -[ - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "description", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint80", "name": "_roundId", "type": "uint80" } - ], - "name": "getRoundData", - "outputs": [ - { "internalType": "uint80", "name": "roundId", "type": "uint80" }, - { "internalType": "int256", "name": "answer", "type": "int256" }, - { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, - { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, - { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "latestRoundData", - "outputs": [ - { "internalType": "uint80", "name": "roundId", "type": "uint80" }, - { "internalType": "int256", "name": "answer", "type": "int256" }, - { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, - { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, - { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/indexers/abis/ERC6160Ext20.abi.json b/indexers/abis/ERC6160Ext20.abi.json deleted file mode 100644 index 71697ce5c..000000000 --- a/indexers/abis/ERC6160Ext20.abi.json +++ /dev/null @@ -1,261 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "admin", "type": "address" }, - { "internalType": "string", "name": "name", "type": "string" }, - { "internalType": "string", "name": "symbol", "type": "string" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "NotRoleAdmin", "type": "error" }, - { "inputs": [], "name": "PermissionDenied", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "BURNER_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_from", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "newAdmin", "type": "address" } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getBurnerRole", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getMinterRole", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "_role", "type": "bytes32" }, - { "internalType": "address", "name": "_account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "_role", "type": "bytes32" }, - { "internalType": "address", "name": "_account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "_role", "type": "bytes32" }, - { "internalType": "address", "name": "_account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes4", "name": "_interfaceId", "type": "bytes4" } - ], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/indexers/abis/EthereumHost.abi.json b/indexers/abis/EthereumHost.abi.json deleted file mode 100644 index 6e1b5e09a..000000000 --- a/indexers/abis/EthereumHost.abi.json +++ /dev/null @@ -1,1241 +0,0 @@ -[ - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "defaultTimeout", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "perByteFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stateCommitmentFee", - "type": "uint256" - }, - { "internalType": "address", "name": "feeToken", "type": "address" }, - { "internalType": "address", "name": "admin", "type": "address" }, - { "internalType": "address", "name": "handler", "type": "address" }, - { - "internalType": "address", - "name": "hostManager", - "type": "address" - }, - { "internalType": "address", "name": "uniswapV2", "type": "address" }, - { - "internalType": "uint256", - "name": "unStakingPeriod", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "challengePeriod", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consensusClient", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "stateMachines", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "fishermen", - "type": "address[]" - }, - { "internalType": "bytes", "name": "hyperbridge", "type": "bytes" } - ], - "internalType": "struct HostParams", - "name": "params", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "CannotChangeFeeToken", "type": "error" }, - { "inputs": [], "name": "DuplicateResponse", "type": "error" }, - { "inputs": [], "name": "FrozenHost", "type": "error" }, - { "inputs": [], "name": "InvalidAddressLength", "type": "error" }, - { "inputs": [], "name": "InvalidConsensusClient", "type": "error" }, - { "inputs": [], "name": "InvalidHandler", "type": "error" }, - { "inputs": [], "name": "InvalidHostManager", "type": "error" }, - { "inputs": [], "name": "InvalidHyperbridgeId", "type": "error" }, - { "inputs": [], "name": "InvalidStateMachinesLength", "type": "error" }, - { "inputs": [], "name": "InvalidUnstakingPeriod", "type": "error" }, - { "inputs": [], "name": "MaxFishermanCountExceeded", "type": "error" }, - { "inputs": [], "name": "UnauthorizedAccount", "type": "error" }, - { "inputs": [], "name": "UnauthorizedAction", "type": "error" }, - { "inputs": [], "name": "UnauthorizedResponse", "type": "error" }, - { "inputs": [], "name": "UnknownRequest", "type": "error" }, - { "inputs": [], "name": "UnknownResponse", "type": "error" }, - { "inputs": [], "name": "WithdrawalFailed", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "source", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "dest", - "type": "string" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "keys", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "height", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timeoutTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "GetRequestEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "relayer", - "type": "address" - } - ], - "name": "GetRequestHandled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "string", - "name": "dest", - "type": "string" - } - ], - "name": "GetRequestTimeoutHandled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum FrozenStatus", - "name": "status", - "type": "uint8" - } - ], - "name": "HostFrozen", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "defaultTimeout", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "perByteFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stateCommitmentFee", - "type": "uint256" - }, - { "internalType": "address", "name": "feeToken", "type": "address" }, - { "internalType": "address", "name": "admin", "type": "address" }, - { "internalType": "address", "name": "handler", "type": "address" }, - { - "internalType": "address", - "name": "hostManager", - "type": "address" - }, - { "internalType": "address", "name": "uniswapV2", "type": "address" }, - { - "internalType": "uint256", - "name": "unStakingPeriod", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "challengePeriod", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consensusClient", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "stateMachines", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "fishermen", - "type": "address[]" - }, - { "internalType": "bytes", "name": "hyperbridge", "type": "bytes" } - ], - "indexed": false, - "internalType": "struct HostParams", - "name": "oldParams", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "defaultTimeout", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "perByteFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stateCommitmentFee", - "type": "uint256" - }, - { "internalType": "address", "name": "feeToken", "type": "address" }, - { "internalType": "address", "name": "admin", "type": "address" }, - { "internalType": "address", "name": "handler", "type": "address" }, - { - "internalType": "address", - "name": "hostManager", - "type": "address" - }, - { "internalType": "address", "name": "uniswapV2", "type": "address" }, - { - "internalType": "uint256", - "name": "unStakingPeriod", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "challengePeriod", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consensusClient", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "stateMachines", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "fishermen", - "type": "address[]" - }, - { "internalType": "bytes", "name": "hyperbridge", "type": "bytes" } - ], - "indexed": false, - "internalType": "struct HostParams", - "name": "newParams", - "type": "tuple" - } - ], - "name": "HostParamsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "native", - "type": "bool" - } - ], - "name": "HostWithdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "source", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "dest", - "type": "string" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "to", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timeoutTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "body", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "PostRequestEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "relayer", - "type": "address" - } - ], - "name": "PostRequestHandled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "string", - "name": "dest", - "type": "string" - } - ], - "name": "PostRequestTimeoutHandled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "source", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "dest", - "type": "string" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "to", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timeoutTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "body", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "response", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "responseTimeoutTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "PostResponseEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newFee", - "type": "uint256" - } - ], - "name": "PostResponseFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "relayer", - "type": "address" - } - ], - "name": "PostResponseHandled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "string", - "name": "dest", - "type": "string" - } - ], - "name": "PostResponseTimeoutHandled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newFee", - "type": "uint256" - } - ], - "name": "RequestFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "StateCommitmentRead", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "stateMachineId", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "height", - "type": "uint256" - }, - { - "components": [ - { "internalType": "uint256", "name": "timestamp", "type": "uint256" }, - { - "internalType": "bytes32", - "name": "overlayRoot", - "type": "bytes32" - }, - { "internalType": "bytes32", "name": "stateRoot", "type": "bytes32" } - ], - "indexed": false, - "internalType": "struct StateCommitment", - "name": "stateCommitment", - "type": "tuple" - }, - { - "indexed": true, - "internalType": "address", - "name": "fisherman", - "type": "address" - } - ], - "name": "StateCommitmentVetoed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "stateMachineId", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "height", - "type": "uint256" - } - ], - "name": "StateMachineUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "CHAIN_ID", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainId", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "challengePeriod", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "consensusClient", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "consensusState", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "consensusUpdateTime", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - }, - { "internalType": "address", "name": "fisherman", "type": "address" } - ], - "name": "deleteStateMachineCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeToken", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "frozen", - "outputs": [ - { "internalType": "enum FrozenStatus", "name": "", "type": "uint8" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "commitment", "type": "bytes32" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "fundRequest", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "commitment", "type": "bytes32" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "fundResponse", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "host", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "hostParams", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "defaultTimeout", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "perByteFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stateCommitmentFee", - "type": "uint256" - }, - { "internalType": "address", "name": "feeToken", "type": "address" }, - { "internalType": "address", "name": "admin", "type": "address" }, - { "internalType": "address", "name": "handler", "type": "address" }, - { - "internalType": "address", - "name": "hostManager", - "type": "address" - }, - { "internalType": "address", "name": "uniswapV2", "type": "address" }, - { - "internalType": "uint256", - "name": "unStakingPeriod", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "challengePeriod", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consensusClient", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "stateMachines", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "fishermen", - "type": "address[]" - }, - { "internalType": "bytes", "name": "hyperbridge", "type": "bytes" } - ], - "internalType": "struct HostParams", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "hyperbridge", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "id", "type": "uint256" }], - "name": "latestStateMachineHeight", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nonce", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "perByteFee", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "commitment", "type": "bytes32" } - ], - "name": "requestCommitments", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "fee", "type": "uint256" }, - { "internalType": "address", "name": "sender", "type": "address" } - ], - "internalType": "struct FeeMetadata", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "commitment", "type": "bytes32" } - ], - "name": "requestReceipts", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "commitment", "type": "bytes32" } - ], - "name": "responded", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "commitment", "type": "bytes32" } - ], - "name": "responseCommitments", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "fee", "type": "uint256" }, - { "internalType": "address", "name": "sender", "type": "address" } - ], - "internalType": "struct FeeMetadata", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "commitment", "type": "bytes32" } - ], - "name": "responseReceipts", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "responseCommitment", - "type": "bytes32" - }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "internalType": "struct ResponseReceipt", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "state", "type": "bytes" }, - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "timestamp", "type": "uint256" }, - { - "internalType": "bytes32", - "name": "overlayRoot", - "type": "bytes32" - }, - { "internalType": "bytes32", "name": "stateRoot", "type": "bytes32" } - ], - "internalType": "struct StateCommitment", - "name": "commitment", - "type": "tuple" - } - ], - "name": "setConsensusState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum FrozenStatus", - "name": "newState", - "type": "uint8" - } - ], - "name": "setFrozenState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stateCommitmentFee", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - } - ], - "name": "stateMachineCommitment", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "timestamp", "type": "uint256" }, - { - "internalType": "bytes32", - "name": "overlayRoot", - "type": "bytes32" - }, - { "internalType": "bytes32", "name": "stateRoot", "type": "bytes32" } - ], - "internalType": "struct StateCommitment", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - } - ], - "name": "stateMachineCommitmentUpdateTime", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "parachainId", "type": "bytes" }, - { "internalType": "uint256", "name": "id", "type": "uint256" } - ], - "name": "stateMachineId", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "state", "type": "bytes" }], - "name": "storeConsensusState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "timestamp", "type": "uint256" }, - { - "internalType": "bytes32", - "name": "overlayRoot", - "type": "bytes32" - }, - { "internalType": "bytes32", "name": "stateRoot", "type": "bytes32" } - ], - "internalType": "struct StateCommitment", - "name": "commitment", - "type": "tuple" - } - ], - "name": "storeStateMachineCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "timestamp", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unStakingPeriod", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "uniswapV2Router", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "defaultTimeout", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "perByteFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stateCommitmentFee", - "type": "uint256" - }, - { "internalType": "address", "name": "feeToken", "type": "address" }, - { "internalType": "address", "name": "admin", "type": "address" }, - { "internalType": "address", "name": "handler", "type": "address" }, - { - "internalType": "address", - "name": "hostManager", - "type": "address" - }, - { "internalType": "address", "name": "uniswapV2", "type": "address" }, - { - "internalType": "uint256", - "name": "unStakingPeriod", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "challengePeriod", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consensusClient", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "stateMachines", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "fishermen", - "type": "address[]" - }, - { "internalType": "bytes", "name": "hyperbridge", "type": "bytes" } - ], - "internalType": "struct HostParams", - "name": "params", - "type": "tuple" - } - ], - "name": "updateHostParams", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - } - ], - "name": "vetoStateCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "paraId", "type": "uint256" }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "name": "vetoes", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "bool", "name": "native", "type": "bool" } - ], - "internalType": "struct WithdrawParams", - "name": "params", - "type": "tuple" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/indexers/abis/HandlerV1.abi.json b/indexers/abis/HandlerV1.abi.json deleted file mode 100644 index 6977be817..000000000 --- a/indexers/abis/HandlerV1.abi.json +++ /dev/null @@ -1,461 +0,0 @@ -[ - { "inputs": [], "name": "ChallengePeriodNotElapsed", "type": "error" }, - { "inputs": [], "name": "ConsensusClientExpired", "type": "error" }, - { "inputs": [], "name": "DuplicateMessage", "type": "error" }, - { "inputs": [], "name": "HostFrozen", "type": "error" }, - { "inputs": [], "name": "InvalidMessageDestination", "type": "error" }, - { "inputs": [], "name": "InvalidProof", "type": "error" }, - { "inputs": [], "name": "MessageNotTimedOut", "type": "error" }, - { "inputs": [], "name": "MessageTimedOut", "type": "error" }, - { "inputs": [], "name": "StateCommitmentNotFound", "type": "error" }, - { "inputs": [], "name": "UnknownMessage", "type": "error" }, - { - "inputs": [ - { - "internalType": "contract IIsmpHost", - "name": "host", - "type": "address" - }, - { "internalType": "bytes", "name": "proof", "type": "bytes" } - ], - "name": "handleConsensus", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IIsmpHost", - "name": "host", - "type": "address" - }, - { - "components": [ - { - "components": [ - { "internalType": "bytes", "name": "source", "type": "bytes" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "nonce", "type": "uint64" }, - { "internalType": "address", "name": "from", "type": "address" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes[]", "name": "keys", "type": "bytes[]" }, - { "internalType": "uint64", "name": "height", "type": "uint64" } - ], - "internalType": "struct GetRequest[]", - "name": "timeouts", - "type": "tuple[]" - } - ], - "internalType": "struct GetTimeoutMessage", - "name": "message", - "type": "tuple" - } - ], - "name": "handleGetRequestTimeouts", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IIsmpHost", - "name": "host", - "type": "address" - }, - { - "components": [ - { "internalType": "bytes[]", "name": "proof", "type": "bytes[]" }, - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - }, - { - "components": [ - { "internalType": "bytes", "name": "source", "type": "bytes" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "nonce", "type": "uint64" }, - { "internalType": "address", "name": "from", "type": "address" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes[]", "name": "keys", "type": "bytes[]" }, - { "internalType": "uint64", "name": "height", "type": "uint64" } - ], - "internalType": "struct GetRequest[]", - "name": "requests", - "type": "tuple[]" - } - ], - "internalType": "struct GetResponseMessage", - "name": "message", - "type": "tuple" - } - ], - "name": "handleGetResponses", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IIsmpHost", - "name": "host", - "type": "address" - }, - { - "components": [ - { - "components": [ - { "internalType": "bytes", "name": "source", "type": "bytes" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "nonce", "type": "uint64" }, - { "internalType": "bytes", "name": "from", "type": "bytes" }, - { "internalType": "bytes", "name": "to", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes", "name": "body", "type": "bytes" } - ], - "internalType": "struct PostRequest[]", - "name": "timeouts", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - }, - { "internalType": "bytes[]", "name": "proof", "type": "bytes[]" } - ], - "internalType": "struct PostRequestTimeoutMessage", - "name": "message", - "type": "tuple" - } - ], - "name": "handlePostRequestTimeouts", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IIsmpHost", - "name": "host", - "type": "address" - }, - { - "components": [ - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "height", - "type": "uint256" - } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - }, - { - "internalType": "bytes32[]", - "name": "multiproof", - "type": "bytes32[]" - }, - { - "internalType": "uint256", - "name": "leafCount", - "type": "uint256" - } - ], - "internalType": "struct Proof", - "name": "proof", - "type": "tuple" - }, - { - "components": [ - { - "components": [ - { - "internalType": "bytes", - "name": "source", - "type": "bytes" - }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { "internalType": "bytes", "name": "from", "type": "bytes" }, - { "internalType": "bytes", "name": "to", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes", "name": "body", "type": "bytes" } - ], - "internalType": "struct PostRequest", - "name": "request", - "type": "tuple" - }, - { "internalType": "uint256", "name": "index", "type": "uint256" }, - { "internalType": "uint256", "name": "kIndex", "type": "uint256" } - ], - "internalType": "struct PostRequestLeaf[]", - "name": "requests", - "type": "tuple[]" - } - ], - "internalType": "struct PostRequestMessage", - "name": "request", - "type": "tuple" - } - ], - "name": "handlePostRequests", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IIsmpHost", - "name": "host", - "type": "address" - }, - { - "components": [ - { - "components": [ - { - "components": [ - { - "internalType": "bytes", - "name": "source", - "type": "bytes" - }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { "internalType": "bytes", "name": "from", "type": "bytes" }, - { "internalType": "bytes", "name": "to", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes", "name": "body", "type": "bytes" } - ], - "internalType": "struct PostRequest", - "name": "request", - "type": "tuple" - }, - { "internalType": "bytes", "name": "response", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - } - ], - "internalType": "struct PostResponse[]", - "name": "timeouts", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { "internalType": "uint256", "name": "height", "type": "uint256" } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - }, - { "internalType": "bytes[]", "name": "proof", "type": "bytes[]" } - ], - "internalType": "struct PostResponseTimeoutMessage", - "name": "message", - "type": "tuple" - } - ], - "name": "handlePostResponseTimeouts", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IIsmpHost", - "name": "host", - "type": "address" - }, - { - "components": [ - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "stateMachineId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "height", - "type": "uint256" - } - ], - "internalType": "struct StateMachineHeight", - "name": "height", - "type": "tuple" - }, - { - "internalType": "bytes32[]", - "name": "multiproof", - "type": "bytes32[]" - }, - { - "internalType": "uint256", - "name": "leafCount", - "type": "uint256" - } - ], - "internalType": "struct Proof", - "name": "proof", - "type": "tuple" - }, - { - "components": [ - { - "components": [ - { - "components": [ - { - "internalType": "bytes", - "name": "source", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "dest", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "from", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "to", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "body", - "type": "bytes" - } - ], - "internalType": "struct PostRequest", - "name": "request", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "response", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - } - ], - "internalType": "struct PostResponse", - "name": "response", - "type": "tuple" - }, - { "internalType": "uint256", "name": "index", "type": "uint256" }, - { "internalType": "uint256", "name": "kIndex", "type": "uint256" } - ], - "internalType": "struct PostResponseLeaf[]", - "name": "responses", - "type": "tuple[]" - } - ], - "internalType": "struct PostResponseMessage", - "name": "response", - "type": "tuple" - } - ], - "name": "handlePostResponses", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } - ], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/indexers/abis/TokenGateway.abi.json b/indexers/abis/TokenGateway.abi.json deleted file mode 100644 index 258434909..000000000 --- a/indexers/abis/TokenGateway.abi.json +++ /dev/null @@ -1,796 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "admin", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "BidTooHigh", "type": "error" }, - { "inputs": [], "name": "InconsistentState", "type": "error" }, - { "inputs": [], "name": "InvalidAddressLength", "type": "error" }, - { "inputs": [], "name": "InvalidAmount", "type": "error" }, - { "inputs": [], "name": "NoExistingBid", "type": "error" }, - { "inputs": [], "name": "RequestAlreadyFulfilled", "type": "error" }, - { "inputs": [], "name": "RequestNotTimedOut", "type": "error" }, - { "inputs": [], "name": "RequestTimedOut", "type": "error" }, - { "inputs": [], "name": "UnauthorizedAccount", "type": "error" }, - { "inputs": [], "name": "UnauthorizedAction", "type": "error" }, - { "inputs": [], "name": "UnexpectedCall", "type": "error" }, - { "inputs": [], "name": "UnknownAsset", "type": "error" }, - { "inputs": [], "name": "UnsupportedChain", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AssetAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "from", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "assetId", - "type": "bytes32" - } - ], - "name": "AssetReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "assetId", - "type": "bytes32" - } - ], - "name": "AssetRefunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "erc20", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "erc6160", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "assetId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "initialSupply", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "beneficiary", - "type": "address" - } - ], - "name": "AssetRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "assetId", - "type": "bytes32" - } - ], - "name": "AssetRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "string", - "name": "dest", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "assetId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "redeem", - "type": "bool" - } - ], - "name": "AssetTeleported", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bid", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "assetId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "bidder", - "type": "address" - } - ], - "name": "BidPlaced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "assetId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "bidder", - "type": "address" - } - ], - "name": "BidRefunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "chain", - "type": "string" - }, - { - "indexed": false, - "internalType": "address", - "name": "moduleId", - "type": "address" - } - ], - "name": "NewContractInstance", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "host", "type": "address" }, - { "internalType": "address", "name": "dispatcher", "type": "address" } - ], - "indexed": false, - "internalType": "struct TokenGatewayParams", - "name": "oldParams", - "type": "tuple" - }, - { - "components": [ - { "internalType": "address", "name": "host", "type": "address" }, - { "internalType": "address", "name": "dispatcher", "type": "address" } - ], - "indexed": false, - "internalType": "struct TokenGatewayParams", - "name": "newParams", - "type": "tuple" - } - ], - "name": "ParamsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "bidder", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "assetId", - "type": "bytes32" - } - ], - "name": "RequestFulfilled", - "type": "event" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "bytes", "name": "source", "type": "bytes" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "nonce", "type": "uint64" }, - { "internalType": "bytes", "name": "from", "type": "bytes" }, - { "internalType": "bytes", "name": "to", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes", "name": "body", "type": "bytes" } - ], - "internalType": "struct PostRequest", - "name": "request", - "type": "tuple" - }, - { "internalType": "uint256", "name": "fee", "type": "uint256" } - ], - "name": "bid", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "commitment", "type": "bytes32" } - ], - "name": "bid", - "outputs": [ - { - "components": [ - { "internalType": "address", "name": "bidder", "type": "address" }, - { "internalType": "uint256", "name": "fee", "type": "uint256" } - ], - "internalType": "struct LiquidityBid", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "assetId", "type": "bytes32" } - ], - "name": "erc20", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "assetId", "type": "bytes32" } - ], - "name": "erc6160", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { "internalType": "address", "name": "host", "type": "address" }, - { - "internalType": "address", - "name": "dispatcher", - "type": "address" - } - ], - "internalType": "struct TokenGatewayParams", - "name": "params", - "type": "tuple" - }, - { - "components": [ - { "internalType": "address", "name": "erc20", "type": "address" }, - { - "internalType": "address", - "name": "erc6160", - "type": "address" - }, - { "internalType": "string", "name": "name", "type": "string" }, - { "internalType": "string", "name": "symbol", "type": "string" }, - { - "internalType": "uint256", - "name": "initialSupply", - "type": "uint256" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - } - ], - "internalType": "struct AssetMetadata[]", - "name": "assets", - "type": "tuple[]" - } - ], - "internalType": "struct TokenGatewayParamsExt", - "name": "teleportParams", - "type": "tuple" - } - ], - "name": "init", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "destination", "type": "bytes" } - ], - "name": "instance", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { "internalType": "bytes", "name": "source", "type": "bytes" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "nonce", "type": "uint64" }, - { "internalType": "bytes", "name": "from", "type": "bytes" }, - { "internalType": "bytes", "name": "to", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes", "name": "body", "type": "bytes" } - ], - "internalType": "struct PostRequest", - "name": "request", - "type": "tuple" - }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "internalType": "struct IncomingPostRequest", - "name": "incoming", - "type": "tuple" - } - ], - "name": "onAccept", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "components": [ - { - "internalType": "bytes", - "name": "source", - "type": "bytes" - }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { - "internalType": "bytes[]", - "name": "keys", - "type": "bytes[]" - }, - { - "internalType": "uint64", - "name": "height", - "type": "uint64" - } - ], - "internalType": "struct GetRequest", - "name": "request", - "type": "tuple" - }, - { - "components": [ - { "internalType": "bytes", "name": "key", "type": "bytes" }, - { "internalType": "bytes", "name": "value", "type": "bytes" } - ], - "internalType": "struct StorageValue[]", - "name": "values", - "type": "tuple[]" - } - ], - "internalType": "struct GetResponse", - "name": "response", - "type": "tuple" - }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "internalType": "struct IncomingGetResponse", - "name": "", - "type": "tuple" - } - ], - "name": "onGetResponse", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "bytes", "name": "source", "type": "bytes" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "nonce", "type": "uint64" }, - { "internalType": "address", "name": "from", "type": "address" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes[]", "name": "keys", "type": "bytes[]" }, - { "internalType": "uint64", "name": "height", "type": "uint64" } - ], - "internalType": "struct GetRequest", - "name": "", - "type": "tuple" - } - ], - "name": "onGetTimeout", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "bytes", "name": "source", "type": "bytes" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "nonce", "type": "uint64" }, - { "internalType": "bytes", "name": "from", "type": "bytes" }, - { "internalType": "bytes", "name": "to", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes", "name": "body", "type": "bytes" } - ], - "internalType": "struct PostRequest", - "name": "request", - "type": "tuple" - } - ], - "name": "onPostRequestTimeout", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "components": [ - { - "internalType": "bytes", - "name": "source", - "type": "bytes" - }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { "internalType": "bytes", "name": "from", "type": "bytes" }, - { "internalType": "bytes", "name": "to", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes", "name": "body", "type": "bytes" } - ], - "internalType": "struct PostRequest", - "name": "request", - "type": "tuple" - }, - { "internalType": "bytes", "name": "response", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - } - ], - "internalType": "struct PostResponse", - "name": "response", - "type": "tuple" - }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "internalType": "struct IncomingPostResponse", - "name": "", - "type": "tuple" - } - ], - "name": "onPostResponse", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { "internalType": "bytes", "name": "source", "type": "bytes" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "nonce", "type": "uint64" }, - { "internalType": "bytes", "name": "from", "type": "bytes" }, - { "internalType": "bytes", "name": "to", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes", "name": "body", "type": "bytes" } - ], - "internalType": "struct PostRequest", - "name": "request", - "type": "tuple" - }, - { "internalType": "bytes", "name": "response", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - } - ], - "internalType": "struct PostResponse", - "name": "", - "type": "tuple" - } - ], - "name": "onPostResponseTimeout", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "params", - "outputs": [ - { - "components": [ - { "internalType": "address", "name": "host", "type": "address" }, - { "internalType": "address", "name": "dispatcher", "type": "address" } - ], - "internalType": "struct TokenGatewayParams", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "bytes", "name": "source", "type": "bytes" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "nonce", "type": "uint64" }, - { "internalType": "bytes", "name": "from", "type": "bytes" }, - { "internalType": "bytes", "name": "to", "type": "bytes" }, - { - "internalType": "uint64", - "name": "timeoutTimestamp", - "type": "uint64" - }, - { "internalType": "bytes", "name": "body", "type": "bytes" } - ], - "internalType": "struct PostRequest", - "name": "request", - "type": "tuple" - } - ], - "name": "refundBid", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "uint256", "name": "maxFee", "type": "uint256" }, - { - "internalType": "uint256", - "name": "relayerFee", - "type": "uint256" - }, - { "internalType": "bytes32", "name": "assetId", "type": "bytes32" }, - { "internalType": "bool", "name": "redeem", "type": "bool" }, - { "internalType": "bytes32", "name": "to", "type": "bytes32" }, - { "internalType": "bytes", "name": "dest", "type": "bytes" }, - { "internalType": "uint64", "name": "timeout", "type": "uint64" }, - { "internalType": "bytes", "name": "data", "type": "bytes" }, - { "internalType": "uint256", "name": "nativeCost", "type": "uint256" } - ], - "internalType": "struct TeleportParams", - "name": "teleportParams", - "type": "tuple" - } - ], - "name": "teleport", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } -] diff --git a/indexers/arbitrum-sepolia.yaml b/indexers/arbitrum-sepolia.yaml deleted file mode 100644 index 15bb74055..000000000 --- a/indexers/arbitrum-sepolia.yaml +++ /dev/null @@ -1,156 +0,0 @@ -specVersion: 1.0.0 -version: 0.0.1 -name: arbitrum-sepolia -description: Arbitrum Sepolia Chain Indexer -runner: - node: - name: "@subql/node-ethereum" - version: ">=3.0.0" - query: - name: "@subql/query" - version: "*" -schema: - file: ./schema.graphql -network: - chainId: "421614" - endpoint: - - "https://sepolia-rollup.arbitrum.io/rpc" -dataSources: - # EthereumHost contract - - kind: ethereum/Runtime - startBlock: 68687736 - options: - abi: ethereumHost - address: "0xCA5508fB8abCDdeb330eAd57197feFBD62b5cb03" - assets: - ethereumHost: - file: ./abis/EthereumHost.abi.json - chainLinkAggregatorV3: - file: ./abis/ChainLinkAggregatorV3.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handlePostRequestEvent - filter: - topics: - - PostRequestEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,uint256) - - kind: ethereum/LogHandler - handler: handlePostResponseEvent - filter: - topics: - - PostResponseEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,bytes,uint256,uint256) - - kind: ethereum/LogHandler - handler: handlePostRequestHandledEvent - filter: - topics: - - "PostRequestHandled(bytes32, address)" - - kind: ethereum/LogHandler - handler: handlePostResponseHandledEvent - filter: - topics: - - "PostResponseHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handlePostRequestTimeoutHandledEvent - filter: - topics: - - "PostRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handlePostResponseTimeoutHandledEvent - filter: - topics: - - "PostResponseTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleGetRequestHandledEvent - filter: - topics: - - "GetRequestHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handleGetRequestTimeoutHandledEvent - filter: - topics: - - "GetRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleStateMachineUpdatedEvent - filter: - topics: - - "StateMachineUpdated(bytes,uint256)" - - # Protocol Fee Token - - kind: ethereum/Runtime - startBlock: 68687736 - options: - abi: erc6160ext20 - address: "0x83aF3a8a53bf0E379c17A8611AD697401A5970fD" - assets: - erc6160ext20: - file: ./abis/ERC6160Ext20.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleTransferEvent - filter: - topics: - - "Transfer(address indexed from, address indexed to, uint256 amount)" - - # Handler Contract - - kind: ethereum/Runtime - startBlock: 68687736 - options: - abi: handlerV1 - address: "0xaB9417415e83d15b5Dc058dB5A2177EaF755202e" - assets: - handlerV1: - file: ./abis/HandlerV1.abi.json - mapping: - file: ./dist/index.js - handlers: - - handler: handlePostRequestTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x9d38eb35" - - handler: handlePostResponseTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x72becccd" - - # TokenGateway Contract - - kind: ethereum/Runtime - startBlock: 68687736 - options: - abi: tokenGateway - address: "0x41867Dd678E3055649c04Fa10180ba90229cAd9F" - assets: - tokenGateway: - file: ./abis/TokenGateway.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleBidPlacedEvent - filter: - topics: - - "BidPlaced(bytes32,bytes32,uint256,address)" - - kind: ethereum/LogHandler - handler: handleBidRefundedEvent - filter: - topics: - - "BidRefunded(bytes32,bytes32,address)" - - kind: ethereum/LogHandler - handler: handleRequestFulfilledEvent - filter: - topics: - - "RequestFulfilled(address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetReceivedEvent - filter: - topics: - - "AssetReceived(bytes32,address,address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetTeleportedEvent - filter: - topics: - - "AssetTeleported(bytes32,address,bytes32,uint256,bytes32,bool)" - -repository: "https://github.com/polytope-labs/hyperbridge" diff --git a/indexers/base-sepolia.yaml b/indexers/base-sepolia.yaml deleted file mode 100644 index 979c6d9cb..000000000 --- a/indexers/base-sepolia.yaml +++ /dev/null @@ -1,158 +0,0 @@ -specVersion: 1.0.0 -version: 0.0.1 -name: base-sepolia -description: Base Sepolia Chain Indexer -runner: - node: - name: "@subql/node-ethereum" - version: ">=3.0.0" - query: - name: "@subql/query" - version: "*" -schema: - file: ./schema.graphql -network: - chainId: "84532" - endpoint: - - "https://base-sepolia.blockpi.network/v1/rpc/public" - - "https://base-sepolia-rpc.publicnode.com" - -dataSources: - # EthereumHost contract - - kind: ethereum/Runtime - startBlock: 13464107 - options: - abi: ethereumHost - address: "0xe7C43500e07E0Bb5fC0987db95fE57Ce29B9bb80" - assets: - ethereumHost: - file: ./abis/EthereumHost.abi.json - chainLinkAggregatorV3: - file: ./abis/ChainLinkAggregatorV3.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handlePostRequestEvent - filter: - topics: - - PostRequestEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,uint256) - - kind: ethereum/LogHandler - handler: handlePostResponseEvent - filter: - topics: - - PostResponseEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,bytes,uint256,uint256) - - kind: ethereum/LogHandler - handler: handlePostRequestHandledEvent - filter: - topics: - - "PostRequestHandled(bytes32, address)" - - kind: ethereum/LogHandler - handler: handlePostResponseHandledEvent - filter: - topics: - - "PostResponseHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handlePostRequestTimeoutHandledEvent - filter: - topics: - - "PostRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handlePostResponseTimeoutHandledEvent - filter: - topics: - - "PostResponseTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleGetRequestHandledEvent - filter: - topics: - - "GetRequestHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handleGetRequestTimeoutHandledEvent - filter: - topics: - - "GetRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleStateMachineUpdatedEvent - filter: - topics: - - "StateMachineUpdated(bytes,uint256)" - - # Protocol Fee Token - - kind: ethereum/Runtime - startBlock: 13464107 - options: - abi: erc6160ext20 - address: "0x83aF3a8a53bf0E379c17A8611AD697401A5970fD" - assets: - erc6160ext20: - file: ./abis/ERC6160Ext20.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleTransferEvent - filter: - topics: - - "Transfer(address indexed from, address indexed to, uint256 amount)" - - # Handler Contract - - kind: ethereum/Runtime - startBlock: 13464107 - options: - abi: handlerV1 - address: "0x0FAC5FfFa3C7F0C22CF0aa644ae68eEF8Db2456E" - assets: - handlerV1: - file: ./abis/HandlerV1.abi.json - mapping: - file: ./dist/index.js - handlers: - - handler: handlePostRequestTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x9d38eb35" - - handler: handlePostResponseTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x72becccd" - - # TokenGateway Contract - - kind: ethereum/Runtime - startBlock: 13464107 - options: - abi: tokenGateway - address: "0x41867Dd678E3055649c04Fa10180ba90229cAd9F" - assets: - tokenGateway: - file: ./abis/TokenGateway.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleBidPlacedEvent - filter: - topics: - - "BidPlaced(bytes32,bytes32,uint256,address)" - - kind: ethereum/LogHandler - handler: handleBidRefundedEvent - filter: - topics: - - "BidRefunded(bytes32,bytes32,address)" - - kind: ethereum/LogHandler - handler: handleRequestFulfilledEvent - filter: - topics: - - "RequestFulfilled(address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetReceivedEvent - filter: - topics: - - "AssetReceived(bytes32,address,address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetTeleportedEvent - filter: - topics: - - "AssetTeleported(bytes32,address,bytes32,uint256,bytes32,bool)" - -repository: "https://github.com/polytope-labs/hyperbridge" diff --git a/indexers/bsc-chapel.yaml b/indexers/bsc-chapel.yaml deleted file mode 100644 index 54240fc57..000000000 --- a/indexers/bsc-chapel.yaml +++ /dev/null @@ -1,156 +0,0 @@ -specVersion: 1.0.0 -version: 0.0.1 -name: bsc-chapel -description: BNB Smart Chain Testnet Indexer -runner: - node: - name: "@subql/node-ethereum" - version: ">=3.0.0" - query: - name: "@subql/query" - version: "*" -schema: - file: ./schema.graphql -network: - chainId: "97" - endpoint: - - "https://public.stackup.sh/api/v1/node/bsc-testnet" -dataSources: - # EthereumHost contract - - kind: ethereum/Runtime - startBlock: 42661624 - options: - abi: ethereumHost - address: "0xd24D7542C74B1f4ee14dC4bD077d5eed47107d51" - assets: - ethereumHost: - file: ./abis/EthereumHost.abi.json - chainLinkAggregatorV3: - file: ./abis/ChainLinkAggregatorV3.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handlePostRequestEvent - filter: - topics: - - PostRequestEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,uint256) - - kind: ethereum/LogHandler - handler: handlePostResponseEvent - filter: - topics: - - PostResponseEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,bytes,uint256,uint256) - - kind: ethereum/LogHandler - handler: handlePostRequestHandledEvent - filter: - topics: - - "PostRequestHandled(bytes32, address)" - - kind: ethereum/LogHandler - handler: handlePostResponseHandledEvent - filter: - topics: - - "PostResponseHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handlePostRequestTimeoutHandledEvent - filter: - topics: - - "PostRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handlePostResponseTimeoutHandledEvent - filter: - topics: - - "PostResponseTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleGetRequestHandledEvent - filter: - topics: - - "GetRequestHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handleGetRequestTimeoutHandledEvent - filter: - topics: - - "GetRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleStateMachineUpdatedEvent - filter: - topics: - - "StateMachineUpdated(bytes,uint256)" - - # Protocol Fee Token - - kind: ethereum/Runtime - startBlock: 42661624 - options: - abi: erc6160ext20 - address: "0x83aF3a8a53bf0E379c17A8611AD697401A5970fD" - assets: - erc6160ext20: - file: ./abis/ERC6160Ext20.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleTransferEvent - filter: - topics: - - "Transfer(address indexed from, address indexed to, uint256 amount)" - - # Handler Contract - - kind: ethereum/Runtime - startBlock: 42661624 - options: - abi: handlerV1 - address: "0x878F329319e0AE11F605468183bB5C6a8A642141" - assets: - handlerV1: - file: ./abis/HandlerV1.abi.json - mapping: - file: ./dist/index.js - handlers: - - handler: handlePostRequestTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x9d38eb35" - - handler: handlePostResponseTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x72becccd" - - # TokenGateway Contract - - kind: ethereum/Runtime - startBlock: 42661624 - options: - abi: tokenGateway - address: "0x41867Dd678E3055649c04Fa10180ba90229cAd9F" - assets: - tokenGateway: - file: ./abis/TokenGateway.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleBidPlacedEvent - filter: - topics: - - "BidPlaced(bytes32,bytes32,uint256,address)" - - kind: ethereum/LogHandler - handler: handleBidRefundedEvent - filter: - topics: - - "BidRefunded(bytes32,bytes32,address)" - - kind: ethereum/LogHandler - handler: handleRequestFulfilledEvent - filter: - topics: - - "RequestFulfilled(address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetReceivedEvent - filter: - topics: - - "AssetReceived(bytes32,address,address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetTeleportedEvent - filter: - topics: - - "AssetTeleported(bytes32,address,bytes32,uint256,bytes32,bool)" - -repository: "https://github.com/polytope-labs/hyperbridge" diff --git a/indexers/docker-compose.yml b/indexers/docker-compose.yml deleted file mode 100644 index a5126af39..000000000 --- a/indexers/docker-compose.yml +++ /dev/null @@ -1,251 +0,0 @@ -version: "3" - -services: - postgres: - build: - context: . - dockerfile: ./docker/pg-Dockerfile - ports: - - 5432:5432 - volumes: - - postgres_data:/var/lib/postgresql/data - environment: - POSTGRES_PASSWORD: postgres - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 5s - timeout: 5s - retries: 5 - - subquery-node-hyperbridge-gargantua: - image: onfinality/subql-node:v4.5.0 - depends_on: - "postgres": - condition: service_healthy - restart: unless-stopped - environment: - DB_USER: postgres - DB_PASS: postgres - DB_DATABASE: postgres - DB_HOST: postgres - DB_PORT: 5432 - volumes: - - ./:/app - command: - - ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests - - -f=app/hyperbridge-gargantua.yaml - - --db-schema=app - - --workers=5 - - --batch-size=10 - - --disable-historical - - --multi-chain - - --log-level=info - healthcheck: - test: - [ - "CMD", - "curl", - "-f", - "http://subquery-node-hyperbridge-gargantua:3000/ready", - ] - interval: 3s - timeout: 5s - retries: 10 - - subquery-node-ethereum-sepolia: - image: subquerynetwork/subql-node-ethereum:v3.11.0 - depends_on: - "postgres": - condition: service_healthy - restart: unless-stopped - environment: - DB_USER: postgres - DB_PASS: postgres - DB_DATABASE: postgres - DB_HOST: postgres - DB_PORT: 5432 - volumes: - - ./:/app - command: - - ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests - - -f=app/ethereum-sepolia.yaml - - --db-schema=app - - --workers=5 - - --batch-size=10 - - --disable-historical - - --multi-chain - - --log-level=info - healthcheck: - test: - [ - "CMD", - "curl", - "-f", - "http://subquery-node-ethereum-sepolia:3000/ready", - ] - interval: 3s - timeout: 5s - retries: 10 - - subquery-node-base-sepolia: - image: subquerynetwork/subql-node-ethereum:v3.11.0 - depends_on: - "postgres": - condition: service_healthy - restart: unless-stopped - environment: - DB_USER: postgres - DB_PASS: postgres - DB_DATABASE: postgres - DB_HOST: postgres - DB_PORT: 5432 - volumes: - - ./:/app - command: - - ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests - - -f=app/base-sepolia.yaml - - --db-schema=app - - --workers=5 - - --batch-size=10 - - --disable-historical - - --multi-chain - - --log-level=info - healthcheck: - test: - ["CMD", "curl", "-f", "http://subquery-node-base-sepolia:3000/ready"] - interval: 3s - timeout: 5s - retries: 10 - - subquery-node-optimism-sepolia: - image: subquerynetwork/subql-node-ethereum:v3.11.0 - depends_on: - "postgres": - condition: service_healthy - restart: unless-stopped - environment: - DB_USER: postgres - DB_PASS: postgres - DB_DATABASE: postgres - DB_HOST: postgres - DB_PORT: 5432 - volumes: - - ./:/app - command: - - ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests - - -f=app/optimism-sepolia.yaml - - --db-schema=app - - --workers=5 - - --batch-size=10 - - --disable-historical - - --multi-chain - - --log-level=info - healthcheck: - test: - [ - "CMD", - "curl", - "-f", - "http://subquery-node-optimism-sepolia:3000/ready", - ] - interval: 3s - timeout: 5s - retries: 10 - - subquery-node-arbitrum-sepolia: - image: subquerynetwork/subql-node-ethereum:v3.11.0 - depends_on: - "postgres": - condition: service_healthy - restart: unless-stopped - environment: - DB_USER: postgres - DB_PASS: postgres - DB_DATABASE: postgres - DB_HOST: postgres - DB_PORT: 5432 - volumes: - - ./:/app - command: - - ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests - - -f=app/arbitrum-sepolia.yaml - - --db-schema=app - - --workers=5 - - --batch-size=10 - - --disable-historical - - --multi-chain - - --log-level=info - healthcheck: - test: - [ - "CMD", - "curl", - "-f", - "http://subquery-node-arbitrum-sepolia:3000/ready", - ] - interval: 3s - timeout: 5s - retries: 10 - - subquery-node-bsc-chapel: - image: subquerynetwork/subql-node-ethereum:v3.11.0 - depends_on: - "postgres": - condition: service_healthy - restart: unless-stopped - environment: - DB_USER: postgres - DB_PASS: postgres - DB_DATABASE: postgres - DB_HOST: postgres - DB_PORT: 5432 - volumes: - - ./:/app - command: - - ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests - - -f=app/bsc-chapel.yaml - - --db-schema=app - - --workers=5 - - --batch-size=10 - - --disable-historical - - --multi-chain - - --log-level=info - - healthcheck: - test: ["CMD", "curl", "-f", "http://subquery-node-bsc-chapel:3000/ready"] - interval: 3s - timeout: 5s - retries: 10 - - graphql-engine: - image: subquerynetwork/subql-query:v2.9.0 - ports: - - 3000:3000 - depends_on: - "postgres": - condition: service_healthy - "subquery-node-ethereum-sepolia": - condition: service_healthy - "subquery-node-base-sepolia": - condition: service_healthy - "subquery-node-optimism-sepolia": - condition: service_healthy - "subquery-node-arbitrum-sepolia": - condition: service_healthy - "subquery-node-bsc-chapel": - condition: service_healthy - "subquery-node-hyperbridge-gargantua": - condition: service_healthy - restart: always - environment: - DB_USER: postgres - DB_PASS: postgres - DB_DATABASE: postgres - DB_HOST: postgres - DB_PORT: 5432 - command: - - --name=app - - --playground - -volumes: - postgres_data: diff --git a/indexers/docker/load-extensions.sh b/indexers/docker/load-extensions.sh deleted file mode 100644 index 7f5d0206a..000000000 --- a/indexers/docker/load-extensions.sh +++ /dev/null @@ -1,6 +0,0 @@ - -#!/bin/sh - -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <=3.0.0" - query: - name: "@subql/query" - version: "*" -schema: - file: ./schema.graphql -network: - chainId: "11155111" - endpoint: - - "https://ethereum-sepolia-rpc.publicnode.com" - - "https://sepolia.drpc.org" - - "https://rpc2.sepolia.org" -dataSources: - # EthereumHost contract - - kind: ethereum/Runtime - startBlock: 6429539 - options: - abi: ethereumHost - address: "0xfCA0c05bEb9564AC154f55173881B4DD221A18A8" - assets: - ethereumHost: - file: ./abis/EthereumHost.abi.json - chainLinkAggregatorV3: - file: ./abis/ChainLinkAggregatorV3.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handlePostRequestEvent - filter: - topics: - - PostRequestEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,uint256) - - kind: ethereum/LogHandler - handler: handlePostResponseEvent - filter: - topics: - - PostResponseEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,bytes,uint256,uint256) - - kind: ethereum/LogHandler - handler: handlePostRequestHandledEvent - filter: - topics: - - "PostRequestHandled(bytes32, address)" - - kind: ethereum/LogHandler - handler: handlePostResponseHandledEvent - filter: - topics: - - "PostResponseHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handlePostRequestTimeoutHandledEvent - filter: - topics: - - "PostRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handlePostResponseTimeoutHandledEvent - filter: - topics: - - "PostResponseTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleGetRequestHandledEvent - filter: - topics: - - "GetRequestHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handleGetRequestTimeoutHandledEvent - filter: - topics: - - "GetRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleStateMachineUpdatedEvent - filter: - topics: - - "StateMachineUpdated(bytes,uint256)" - - # # Protocol Fee Token - - kind: ethereum/Runtime - startBlock: 6429539 - options: - abi: erc6160ext20 - address: "0x83aF3a8a53bf0E379c17A8611AD697401A5970fD" - assets: - erc6160ext20: - file: ./abis/ERC6160Ext20.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleTransferEvent - filter: - topics: - - "Transfer(address indexed from, address indexed to, uint256 amount)" - - # # Handler Contract - - kind: ethereum/Runtime - startBlock: 6429539 - options: - abi: handlerV1 - address: "0x3a3A8BF5454a5ad98a3ca6b095cD6929aD441D7f" - assets: - handlerV1: - file: ./abis/HandlerV1.abi.json - mapping: - file: ./dist/index.js - handlers: - - handler: handlePostRequestTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x9d38eb35" - - handler: handlePostResponseTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x72becccd" - - # TokenGateway Contract - - kind: ethereum/Runtime - startBlock: 6429539 - options: - abi: tokenGateway - address: "0x41867Dd678E3055649c04Fa10180ba90229cAd9F" - assets: - tokenGateway: - file: ./abis/TokenGateway.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleBidPlacedEvent - filter: - topics: - - "BidPlaced(bytes32,bytes32,uint256,address)" - - kind: ethereum/LogHandler - handler: handleBidRefundedEvent - filter: - topics: - - "BidRefunded(bytes32,bytes32,address)" - - kind: ethereum/LogHandler - handler: handleRequestFulfilledEvent - filter: - topics: - - "RequestFulfilled(address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetReceivedEvent - filter: - topics: - - "AssetReceived(bytes32,address,address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetTeleportedEvent - filter: - topics: - - "AssetTeleported(bytes32,address,bytes32,uint256,bytes32,bool)" - -repository: "https://github.com/polytope-labs/hyperbridge" diff --git a/indexers/hyperbridge-gargantua.yaml b/indexers/hyperbridge-gargantua.yaml deleted file mode 100644 index dad021d76..000000000 --- a/indexers/hyperbridge-gargantua.yaml +++ /dev/null @@ -1,52 +0,0 @@ -specVersion: 1.0.0 -version: 0.0.1 -name: hyperbridge-parachain -description: Hyperbridge ParaChain Indexer -runner: - node: - name: "@subql/node" - version: ">=4.0.0" - query: - name: "@subql/query" - version: "*" -schema: - file: ./schema.graphql -network: - chainId: "0x5388faf792c5232566d21493929b32c1f20a9c2b03e95615eefec2aa26d64b73" - endpoint: - - "wss://hyperbridge-paseo-rpc.blockops.network" - chaintypes: - file: "./dist/hyperbridge-chaintypes.js" -dataSources: - - kind: substrate/Runtime - startBlock: 695 - mapping: - file: ./dist/index.js - handlers: - - handler: handleIsmpStateMachineUpdatedEvent - kind: substrate/EventHandler - filter: - module: ismp - method: StateMachineUpdated - - handler: handleHyperbridgeRequestEvent - kind: substrate/EventHandler - filter: - module: ismp - method: Request - - handler: handleHyperbridgeResponseEvent - kind: substrate/EventHandler - filter: - module: ismp - method: Response - - handler: handleHyperbridgePostRequestTimeoutHandledEvent - kind: substrate/EventHandler - filter: - module: ismp - method: PostRequestTimeoutHandled - - handler: handleHyperbridgePostResponseTimeoutHandledEvent - kind: substrate/EventHandler - filter: - module: ismp - method: PostResponseTimeoutHandled - -repository: "https://github.com/polytope-labs/hyperbridge" diff --git a/indexers/optimism-sepolia.yaml b/indexers/optimism-sepolia.yaml deleted file mode 100644 index 8eb375352..000000000 --- a/indexers/optimism-sepolia.yaml +++ /dev/null @@ -1,157 +0,0 @@ -specVersion: 1.0.0 -version: 0.0.1 -name: optimism-sepolia -description: Optimism Sepolia Chain Indexer -runner: - node: - name: "@subql/node-ethereum" - version: ">=3.0.0" - query: - name: "@subql/query" - version: "*" -schema: - file: ./schema.graphql -network: - chainId: "11155420" - endpoint: - - "https://sepolia.optimism.io" - - "https://optimism-sepolia-rpc.publicnode.com" -dataSources: - # EthereumHost contract - - kind: ethereum/Runtime - startBlock: 15446807 - options: - abi: ethereumHost - address: "0x37BBd9d3CF34c9143Ae01E33BA1eB59c3AD00a0f" - assets: - ethereumHost: - file: ./abis/EthereumHost.abi.json - chainLinkAggregatorV3: - file: ./abis/ChainLinkAggregatorV3.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handlePostRequestEvent - filter: - topics: - - PostRequestEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,uint256) - - kind: ethereum/LogHandler - handler: handlePostResponseEvent - filter: - topics: - - PostResponseEvent(bytes,bytes,bytes,bytes,uint256,uint256,bytes,bytes,uint256,uint256) - - kind: ethereum/LogHandler - handler: handlePostRequestHandledEvent - filter: - topics: - - "PostRequestHandled(bytes32, address)" - - kind: ethereum/LogHandler - handler: handlePostResponseHandledEvent - filter: - topics: - - "PostResponseHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handlePostRequestTimeoutHandledEvent - filter: - topics: - - "PostRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handlePostResponseTimeoutHandledEvent - filter: - topics: - - "PostResponseTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleGetRequestHandledEvent - filter: - topics: - - "GetRequestHandled(bytes32,address)" - - kind: ethereum/LogHandler - handler: handleGetRequestTimeoutHandledEvent - filter: - topics: - - "GetRequestTimeoutHandled(bytes32, bytes)" - - kind: ethereum/LogHandler - handler: handleStateMachineUpdatedEvent - filter: - topics: - - "StateMachineUpdated(bytes,uint256)" - - # Protocol Fee Token - - kind: ethereum/Runtime - startBlock: 15446807 - options: - abi: erc6160ext20 - address: "0x83aF3a8a53bf0E379c17A8611AD697401A5970fD" - assets: - erc6160ext20: - file: ./abis/ERC6160Ext20.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleTransferEvent - filter: - topics: - - "Transfer(address indexed from, address indexed to, uint256 amount)" - - # Handler Contract - - kind: ethereum/Runtime - startBlock: 15446807 - options: - abi: handlerV1 - address: "0xd1461c180876A02Ee2b6Da6e788C758C71B23504" - assets: - handlerV1: - file: ./abis/HandlerV1.abi.json - mapping: - file: ./dist/index.js - handlers: - - handler: handlePostRequestTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x9d38eb35" - - handler: handlePostResponseTransactionHandler - kind: ethereum/TransactionHandler - filter: - function: "0x72becccd" - - # TokenGateway Contract - - kind: ethereum/Runtime - startBlock: 15446807 - options: - abi: tokenGateway - address: "0x41867Dd678E3055649c04Fa10180ba90229cAd9F" - assets: - tokenGateway: - file: ./abis/TokenGateway.abi.json - mapping: - file: ./dist/index.js - handlers: - - kind: ethereum/LogHandler - handler: handleBidPlacedEvent - filter: - topics: - - "BidPlaced(bytes32,bytes32,uint256,address)" - - kind: ethereum/LogHandler - handler: handleBidRefundedEvent - filter: - topics: - - "BidRefunded(bytes32,bytes32,address)" - - kind: ethereum/LogHandler - handler: handleRequestFulfilledEvent - filter: - topics: - - "RequestFulfilled(address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetReceivedEvent - filter: - topics: - - "AssetReceived(bytes32,address,address,uint256,bytes32)" - - kind: ethereum/LogHandler - handler: handleAssetTeleportedEvent - filter: - topics: - - "AssetTeleported(bytes32,address,bytes32,uint256,bytes32,bool)" - -repository: "https://github.com/polytope-labs/hyperbridge" diff --git a/indexers/package.json b/indexers/package.json deleted file mode 100644 index 88ad063ee..000000000 --- a/indexers/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "hyperbridge-indexers", - "version": "0.0.1", - "description": "Indexers for Hyperbridge", - "main": "dist/index.js", - "scripts": { - "build": "subql build", - "codegen": "subql codegen", - "start:docker": "docker-compose pull && docker-compose up --remove-orphans", - "dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans", - "prepack": "rm -rf dist && npm run build", - "test": "subql build && subql-node-ethereum -f=ethereum-sepolia.yaml test" - }, - "homepage": "https://hyperbridge.network/", - "repository": "https://github.com/polytope-labs/hyperbridge", - "files": ["dist", "schema.graphql", "subquery-multichain.yaml"], - "author": "Polytope Labs", - "license": "MIT", - "dependencies": { - "@ethersproject/shims": "^5.7.0", - "@polkadot/api": "latest", - "@subql/common": "latest", - "@subql/types-ethereum": "latest", - "@subql/validator": "latest", - "assert": "^2.0.0" - }, - "devDependencies": { - "@subql/cli": "latest", - "@subql/node": "latest", - "@subql/node-core": "latest", - "@subql/node-ethereum": "latest", - "@subql/testing": "latest", - "@subql/types": "latest", - "ethers": "^5.7.2", - "typescript": "latest" - }, - "exports": { - "hyperbridge-chaintypes": "src/hyperbridge-chaintypes.ts" - } -} diff --git a/indexers/schema.graphql b/indexers/schema.graphql deleted file mode 100644 index 12ccd7d56..000000000 --- a/indexers/schema.graphql +++ /dev/null @@ -1,465 +0,0 @@ -# To improve query performance, we strongly suggest adding indexes to any field that you plan to filter or sort by -# Add the `@index` or `@index(unique: true)` annotation after any non-key field -# https://academy.subquery.network/build/graphql.html#indexing-by-non-primary-key-field - -""" -Assets currently supported by hyperbridge -""" -enum SupportedAssets { - WETH - WBTC - USDT - USDC - DAI - DOT -} - -""" -Supported Event Types -""" -enum EventType { - EVM_HOST_POST_REQUEST_HANDLED - EVM_HOST_POST_REQUEST_TIMEOUT_HANDLED - EVM_HOST_POST_RESPONSE_HANDLED - EVM_HOST_POST_RESPONSE_TIMEOUT_HANDLED - EVM_HOST_GET_REQUEST_HANDLED - EVM_HOST_GET_REQUEST_TIMEOUT_HANDLED - HANDLER_V1_STATE_MACHINE_UPDATED -} - -""" -The status of a request -""" -enum Status { - SOURCE - MESSAGE_RELAYED - DEST - TIMED_OUT -} - -""" -Types of participants in the Hyperbridge Protocol -""" -enum ProtocolParticipant { - RELAYER - FILLER - USER -} - -""" -System activity types related to reward points -""" -enum RewardPointsActivityType { - REWARD_POINTS_EARNED -} - -""" -Important Hyperbridge Stats for a specific chain -""" -type HyperBridgeChainStats @entity { - """ - The chain the metrics are for - """ - id: ID! - - """ - Total number of messages sent on Hyperbridge on this chain - """ - numberOfMessagesSent: BigInt! - - """ - Total number of messages delivered by Hyperbridge on this chain - """ - numberOfDeliveredMessages: BigInt! - - """ - Total number of failed messages sent by Hyperbridge on this chain - """ - numberOfFailedDeliveries: BigInt! - - """ - Total number of timed out messages on this chain - """ - numberOfTimedOutMessages: BigInt! - - """ - The total amount of transfers sent into the Hyperbridge Host Contracts (transfers in = protocol fee + relayer fee) - """ - totalTransfersIn: BigInt! - - """ - Total amount of fees earned by Hyperbridge on the chain (protocol fees) - """ - protocolFeesEarned: BigInt! - - """ - Total amount of fees payed out by Hyperbridge to relayers on the chain (relayer fees) - """ - feesPayedOutToRelayers: BigInt! -} - -""" -Hyperbridge Stats for a specific Relayer on a specific chain -""" -type RelayerStatsPerChain @entity { - """ - Unique identifier of the RelayerChainMetrics entry. - """ - id: ID! - - """ - The relayer the metrics are for - """ - relayer: Relayer! - - """ - The chain the metrics are for - """ - chain: String! - - """ - Total number of successful post requests or post responses handled by the Relayer - """ - numberOfSuccessfulMessagesDelivered: BigInt! - - """ - Total number of failed post requests handled by the Relayer - """ - numberOfFailedMessagesDelivered: BigInt! - - """ - Amount of gas spent on successful messages (Gas Cost) - """ - gasUsedForSuccessfulMessages: BigInt! - - """ - Amount of gas spent on failed messages (Gas Cost) - """ - gasUsedForFailedMessages: BigInt! - - """ - Gas fee spent on successful post requests (Gas Cost * Gas Price) - """ - gasFeeForSuccessfulMessages: BigInt! - - """ - Gas fee spent on failed post requests (Gas Cost * Gas Price) - """ - gasFeeForFailedMessages: BigInt! - - """ - The USD value of the gas fee spent on successful post requests (Gas Fee * USD Value of Eth at the time of the transaction) - """ - usdGasFeeForSuccessfulMessages: BigInt! - - """ - The USD value of the gas fee spent on failed post requests (Gas Fee * USD Value of Eth at the time of the transaction) - """ - usdGasFeeForFailedMessages: BigInt! - - """ - Total fees earned by the relayer - """ - feesEarned: BigInt! -} - -""" -A Hyperbridge Relayer -""" -type Relayer @entity { - """ - Unique identifier of the Relayer (also the relayer's address) - """ - id: ID! - - """ - A list of important stats for the Relayer on every network that they support - """ - perChainStats: [RelayerStatsPerChain]! @derivedFrom(field: "relayer") -} - -""" -Transfers made from/to the Hyperbridge Host -- The host transfers fees to Relayers -- The host receives fees from protocol users -""" -type Transfer @entity @compositeIndexes(fields: [["from", "to"]]) { - """ - Unique identifier of the Transfer - """ - id: ID! - - """ - The chain on which the transfer was made - """ - chain: String! - - """ - The amount transferred - """ - amount: BigInt! - - """ - The address that made the transfer (the hyperbridge host address) - """ - from: String! @index - - """ - The address that received the transfer (the relayer address) - """ - to: String! @index -} - -""" -An event that has occured on an EVM Host -""" -type Event @entity { - """ - The ID of the event (also the event commitment) - """ - id: ID! - type: EventType! - chain: String! - blockHash: String! - blockNumber: BigInt! - transactionHash: String! - transactionIndex: BigInt! - data: String! - destination: String - createdAt: Date! -} - -""" -A StateMachine Update Event -""" -type StateMachineUpdateEvent @entity { - """ - The ID of the StateMachineUpdate (hash of concatenation of stateMachineId and height) - """ - id: ID! - stateMachineId: String! - height: Int! - chain: String! - blockHash: String! - blockNumber: BigInt! - transactionHash: String! - transactionIndex: BigInt! - createdAt: Date! -} - -""" -A Hyperbridge Request -""" -type Request @entity { - """ - Unique identifier of the Request (This is the request commitment) - """ - id: ID! - - """ - The chain on which the request was made - """ - chain: String! - - """ - This is the statemachine id where this request originated from - """ - source: String - - """ - This is the statemachine where this request is been dispatched to - """ - dest: String - - """ - This is the timestamp when the request would timeout - """ - timeoutTimestamp: BigInt - - """ - The address that dispatched this request - """ - from: String @index - - """ - The address receiving this request - """ - to: String @index - - """ - Nonce of the request - """ - nonce: BigInt @index - - """ - Body of the request - """ - body: String @index - - """ - This is the fee set for this request - """ - fee: BigInt @index - - """ - Status of the request - """ - status: Status! - - """ - Metatdata about the request's progression through different statuses - """ - statusMetadata: [RequestStatusMetadata]! @derivedFrom(field: "request") -} - -""" -Metadata about the status of a Request -""" -type RequestStatusMetadata @entity { - id: ID! - status: Status! - chain: String! - timestamp: BigInt! - blockNumber: String! - blockHash: String! - transactionHash: String! - request: Request! -} - -""" -A Hyperbridge Response -""" -type Response @entity { - """ - Unique identifier of the Response (This is the response commitment) - """ - id: ID! - - """ - The chain on which the response was made - """ - chain: String! - - """ - The response message - """ - response_message: String - - """ - The Timestamp at which this response expires in seconds - """ - responseTimeoutTimestamp: BigInt - - """ - Status of the response - """ - status: Status! - - """ - The request that triggered this response - """ - request: Request - - """ - Metatdata about the response's progression through different statuses - """ - statusMetadata: [ResponseStatusMetadata]! @derivedFrom(field: "response") -} - -""" -Metadata about the status of a Response -""" -type ResponseStatusMetadata @entity { - id: ID! - status: Status! - chain: String! - timestamp: BigInt! - blockNumber: String! - blockHash: String! - transactionHash: String! - response: Response! -} - -""" -Bids placed by fillers to fulfill requests -""" -type Bid @entity { - id: ID! - assetId: String! - bid: BigInt! - bidder: String! - commitment: String! - chain: String! -} - -""" -Bids that have been refunded after the associated request has timed out -""" -type BidRefund @entity { - id: ID! - assetId: String! - bidder: String! - commitment: String! - chain: String! -} - -""" -Liquidity requests fulfilled by a filler -""" -type FulfilledRequest @entity { - id: ID! - assetId: String! - bidder: String! - amount: BigInt! - chain: String! -} - -""" -Asset received by a user -""" -type AssetReceived @entity { - id: ID! - amount: BigInt! - assetId: String! - beneficiary: String! - chain: String! - commitment: String! - from: String! -} - -""" -Asset sent by a user -""" -type AssetTeleported @entity { - id: ID! - amount: BigInt! - assetId: String! - chain: String! - commitment: String! - from: String! - to: String! - redeem: Boolean! -} - -""" -Reward points earned by participants in the hyperbridge protocol -""" -type RewardPoints @entity { - id: ID! - address: String! - chain: String! - points: BigInt! - earnerType: ProtocolParticipant! -} - -type RewardPointsActivityLog @entity { - id: ID! - chain: String! - points: BigInt! - transactionHash: String! - earnerAddress: String! - earnerType: ProtocolParticipant! - activityType: RewardPointsActivityType! - description: String! - createdAt: Date! -} diff --git a/indexers/src/addresses/chainlink-price-feeds.addresses.ts b/indexers/src/addresses/chainlink-price-feeds.addresses.ts deleted file mode 100644 index 309f611b6..000000000 --- a/indexers/src/addresses/chainlink-price-feeds.addresses.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const CHAINLINK_PRICE_FEED_CONTRACT_ADDRESSES: { - [key: string]: string; -} = { - "EVM-11155111": "0x694AA1769357215DE4FAC081bf1f309aDC325306", // Ethereum Sepolia - "EVM-84532": "0x4aDC67696bA383F43DD60A9e78F2C97Fbbfc7cb1", // Base Sepolia - "EVM-11155420": "0x61Ec26aA57019C486B10502285c5A3D4A4750AD7", // Optimism Sepolia - "EVM-421614": "0xd30e2101a97dcbAeBCBC04F14C3f624E67A35165", // Arbitrum Sepolia - "EVM-97": "0x2514895c72f50D8bd4B4F9b1110F0D6bD2c97526", // BSC Chapel -}; diff --git a/indexers/src/addresses/state-machine.addresses.ts b/indexers/src/addresses/state-machine.addresses.ts deleted file mode 100644 index 4d2178336..000000000 --- a/indexers/src/addresses/state-machine.addresses.ts +++ /dev/null @@ -1,58 +0,0 @@ -interface IStateMachineDetails { - chainId: string; - startBlock: number; - isEvm: boolean; - isEvmL2: boolean; - ethereumHostAddress: string; -} - -export const SUPPORTED_STATE_MACHINES: { [key: string]: IStateMachineDetails } = - { - "EVM-11155111": { - chainId: "11155111", - startBlock: 5659633, - isEvm: true, - isEvmL2: false, - ethereumHostAddress: "0x92F217a5e965EAa2aD356678D537A0A9ccC0AF41", - }, // Ethereum Sepolia - "EVM-84532": { - chainId: "84532", - startBlock: 8464600, - isEvm: true, - isEvmL2: true, - ethereumHostAddress: "0xB72759815CF029EFDb957A676C3593Ec762CFD4e", - }, // Base Sepolia - "EVM-11155420": { - chainId: "11155420", - startBlock: 8906802, - isEvm: true, - isEvmL2: true, - ethereumHostAddress: "0x27D689e361ab92aCab04Ea21c1B3F507A94a9DAd", - }, // Optimism Sepolia - "EVM-421614": { - chainId: "421614", - startBlock: 20034995, - isEvm: true, - isEvmL2: true, - ethereumHostAddress: "0x15Ba7e42BC2c3e8FeDEb30D13CEE611D97315E7F", - }, // Arbitrum Sepolia - "EVM-97": { - chainId: "97", - startBlock: 38301829, - isEvm: true, - isEvmL2: false, - ethereumHostAddress: "0x0cac3dF856aD8939955086AADd243a28f35988BE", - }, // BSC Chapel - }; - -export const GET_ETHEREUM_L2_STATE_MACHINES = () => { - return Object.entries(SUPPORTED_STATE_MACHINES) - .filter(([_, value]) => value.isEvmL2) - .map(([key, _]) => key); -}; - -export const GET_HOST_ADDRESSES = () => { - return Object.values(SUPPORTED_STATE_MACHINES).map( - (stateMachine) => stateMachine.ethereumHostAddress - ); -}; diff --git a/indexers/src/constants.ts b/indexers/src/constants.ts deleted file mode 100644 index 9d0c1c432..000000000 --- a/indexers/src/constants.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Purpose: Contains all the constants used in the application. - -import { SupportedAssets } from "./types/enums"; - -export const HYPERBRIDGE = "KUSAMA-4009"; - -export interface ITokenPriceFeedDetails { - name: SupportedAssets; - address: string; - chain_link_price_feed: string; -} - -export const SUPPORTED_ASSETS_CONTRACT_ADDRESSES: Record< - string, - Array -> = { - "EVM-11155111": [ - { - name: SupportedAssets.WETH, - address: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", - chain_link_price_feed: "0x694AA1769357215DE4FAC081bf1f309aDC325306", - }, - // { - // name: SupportedAssets.WBTC, - // address: "0x806D0637Fbbfb4EB9efD5119B0895A5C7Cbc66e7", - // }, - // { - // name: SupportedAssets.USDT, - // address: "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0", - // }, - // { - // name: SupportedAssets.USDC, - // address: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", - // }, - // { - // name: SupportedAssets.DAI, - // address: "0x6C7661e66256eaEb3B06d397089cda7C025b61b3s", - // }, - ], -}; diff --git a/indexers/src/handlers/events/erc6160ext20/transfer.event.handlers.ts b/indexers/src/handlers/events/erc6160ext20/transfer.event.handlers.ts deleted file mode 100644 index b7d353c99..000000000 --- a/indexers/src/handlers/events/erc6160ext20/transfer.event.handlers.ts +++ /dev/null @@ -1,52 +0,0 @@ -import assert from "assert"; -import { HyperBridgeService } from "../../../services/hyperbridge.service"; -import { RelayerService } from "../../../services/relayer.service"; -import { TransferService } from "../../../services/transfer.service"; -import { TransferLog } from "../../../types/abi-interfaces/ERC6160Ext20Abi"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; -import { GET_HOST_ADDRESSES } from "../../../addresses/state-machine.addresses"; - -/** - * Handles the Transfer event from the Fee Token contract - */ -export async function handleTransferEvent(event: TransferLog): Promise { - assert(event.args, "No handleTransferEvent args"); - const { args, transactionHash, transaction, blockNumber } = event; - const { from, to, value } = args; - const HOST_ADDRESSES = GET_HOST_ADDRESSES(); - - logger.info( - `Handling Transfer event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - // Only store transfers from/to the Hyperbridge host contracts - if (HOST_ADDRESSES.includes(from) || HOST_ADDRESSES.includes(to)) { - const transfer = await TransferService.storeTransfer({ - from, - to, - value, - transactionHash, - chain, - }); - - if (HOST_ADDRESSES.includes(from)) { - Promise.all([ - await RelayerService.updateFeesEarned(transfer), - await HyperBridgeService.handleTransferOutOfHostAccounts( - transfer, - chain - ), - ]); - } - - if (HOST_ADDRESSES.includes(to)) { - await HyperBridgeService.updateTotalTransfersIn(transfer, chain); - } - } -} diff --git a/indexers/src/handlers/events/evmHost/getRequestHandled.event.handler.ts b/indexers/src/handlers/events/evmHost/getRequestHandled.event.handler.ts deleted file mode 100644 index 8d485958b..000000000 --- a/indexers/src/handlers/events/evmHost/getRequestHandled.event.handler.ts +++ /dev/null @@ -1,50 +0,0 @@ -import assert from "assert"; -import { EventType } from "../../../types"; -import { GetRequestHandledLog } from "../../../types/abi-interfaces/EthereumHostAbi"; -import { EvmHostEventsService } from "../../../services/evmHostEvents.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the GetRequestHandled event - */ -export async function handleGetRequestHandledEvent( - event: GetRequestHandledLog -): Promise { - assert(event.args, "No handleGetRequestHandledEvent args"); - - const { - args, - block, - transaction, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - data, - } = event; - const { commitment } = args; - - logger.info( - `Handling GetRequestHandled Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - await EvmHostEventsService.createEvent( - { - commitment, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - data, - timestamp: Number(block.timestamp), - type: EventType.EVM_HOST_GET_REQUEST_HANDLED, - }, - chain - ); -} diff --git a/indexers/src/handlers/events/evmHost/getRequestTimeoutHandled.event.handler.ts b/indexers/src/handlers/events/evmHost/getRequestTimeoutHandled.event.handler.ts deleted file mode 100644 index 704668314..000000000 --- a/indexers/src/handlers/events/evmHost/getRequestTimeoutHandled.event.handler.ts +++ /dev/null @@ -1,51 +0,0 @@ -import assert from "assert"; -import { EventType } from "../../../types"; -import { GetRequestTimeoutHandledLog } from "../../../types/abi-interfaces/EthereumHostAbi"; -import { EvmHostEventsService } from "../../../services/evmHostEvents.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the GetRequestTimeoutHandled event - */ -export async function handleGetRequestTimeoutHandledEvent( - event: GetRequestTimeoutHandledLog -): Promise { - assert(event.args, "No handleGetRequestTimeoutHandledEvent args"); - - const { - args, - block, - transaction, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - data, - } = event; - const { commitment, dest } = args; - - logger.info( - `Handling GetRequestTimeoutHandled Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - await EvmHostEventsService.createEvent( - { - data, - commitment, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - dest, - timestamp: Number(block.timestamp), - type: EventType.EVM_HOST_GET_REQUEST_TIMEOUT_HANDLED, - }, - chain - ); -} diff --git a/indexers/src/handlers/events/evmHost/postRequest.event.handler.ts b/indexers/src/handlers/events/evmHost/postRequest.event.handler.ts deleted file mode 100644 index dbe13fd0d..000000000 --- a/indexers/src/handlers/events/evmHost/postRequest.event.handler.ts +++ /dev/null @@ -1,60 +0,0 @@ -import assert from "assert"; -import { HyperBridgeService } from "../../../services/hyperbridge.service"; -import { RequestService } from "../../../services/request.service"; -import { Status } from "../../../types"; -import { PostRequestEventLog } from "../../../types/abi-interfaces/EthereumHostAbi"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the PostRequest event from Evm Hosts - */ -export async function handlePostRequestEvent( - event: PostRequestEventLog -): Promise { - assert(event.args, "No handlePostRequestEvent args"); - - const { transaction, blockNumber, transactionHash, args, block } = event; - let { dest, fee, from, nonce, source, timeoutTimestamp, to, body } = args; - - logger.info( - `Handling PostRequest Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - await HyperBridgeService.handlePostRequestOrResponseEvent(chain, event); - - // Compute the request commitment - let request_commitment = RequestService.computeRequestCommitment( - source, - dest, - BigInt(nonce.toString()), - BigInt(timeoutTimestamp.toString()), - from, - to, - body - ); - - // Create the request entity - await RequestService.findOrCreate({ - chain, - commitment: request_commitment, - body, - dest, - fee: BigInt(fee.toString()), - from, - nonce: BigInt(nonce.toString()), - source, - status: Status.SOURCE, - timeoutTimestamp: BigInt(timeoutTimestamp.toString()), - to, - blockNumber: blockNumber.toString(), - blockHash: block.hash, - transactionHash, - blockTimestamp: block.timestamp, - }); -} diff --git a/indexers/src/handlers/events/evmHost/postRequestHandled.event.handler.ts b/indexers/src/handlers/events/evmHost/postRequestHandled.event.handler.ts deleted file mode 100644 index 55b70cc67..000000000 --- a/indexers/src/handlers/events/evmHost/postRequestHandled.event.handler.ts +++ /dev/null @@ -1,67 +0,0 @@ -import assert from "assert"; -import { HyperBridgeService } from "../../../services/hyperbridge.service"; -import { EventType, Status } from "../../../types"; -import { PostRequestHandledLog } from "../../../types/abi-interfaces/EthereumHostAbi"; -import { EvmHostEventsService } from "../../../services/evmHostEvents.service"; -import { RequestService } from "../../../services/request.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the PostRequestHandled event from Hyperbridge - */ -export async function handlePostRequestHandledEvent( - event: PostRequestHandledLog -): Promise { - assert(event.args, "No handlePostRequestHandledEvent args"); - - const { - args, - block, - transaction, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - data, - } = event; - const { relayer: relayer_id, commitment } = args; - - logger.info( - `Handling PostRequestHandled Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - Promise.all([ - await EvmHostEventsService.createEvent( - { - data, - commitment, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - timestamp: Number(block.timestamp), - type: EventType.EVM_HOST_POST_REQUEST_HANDLED, - }, - chain - ), - await HyperBridgeService.handlePostRequestOrResponseHandledEvent( - relayer_id, - chain - ), - await RequestService.updateStatus({ - commitment, - chain, - blockNumber: blockNumber.toString(), - blockHash: block.hash, - blockTimestamp: block.timestamp, - status: Status.DEST, - transactionHash, - }), - ]); -} diff --git a/indexers/src/handlers/events/evmHost/postRequestTimeoutHandled.event.handler.ts b/indexers/src/handlers/events/evmHost/postRequestTimeoutHandled.event.handler.ts deleted file mode 100644 index f2da1ac66..000000000 --- a/indexers/src/handlers/events/evmHost/postRequestTimeoutHandled.event.handler.ts +++ /dev/null @@ -1,65 +0,0 @@ -import assert from "assert"; -import { EventType, Status } from "../../../types"; -import { PostRequestTimeoutHandledLog } from "../../../types/abi-interfaces/EthereumHostAbi"; -import { EvmHostEventsService } from "../../../services/evmHostEvents.service"; -import { HyperBridgeService } from "../../../services/hyperbridge.service"; -import { RequestService } from "../../../services/request.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the PostRequestTimeoutHandled event - */ -export async function handlePostRequestTimeoutHandledEvent( - event: PostRequestTimeoutHandledLog -): Promise { - assert(event.args, "No handlePostRequestTimeoutHandledEvent args"); - - const { - args, - block, - transaction, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - data, - } = event; - const { commitment, dest } = args; - - logger.info( - `Handling PostRequestTimeoutHandled Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - Promise.all([ - await EvmHostEventsService.createEvent( - { - data, - commitment, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - dest, - timestamp: Number(block.timestamp), - type: EventType.EVM_HOST_POST_REQUEST_TIMEOUT_HANDLED, - }, - chain - ), - await HyperBridgeService.incrementNumberOfTimedOutMessagesSent(chain), - await RequestService.updateStatus({ - commitment, - chain, - blockNumber: blockNumber.toString(), - blockHash: block.hash, - blockTimestamp: block.timestamp, - status: Status.TIMED_OUT, - transactionHash, - }), - ]); -} diff --git a/indexers/src/handlers/events/evmHost/postResponse.event.handler.ts b/indexers/src/handlers/events/evmHost/postResponse.event.handler.ts deleted file mode 100644 index 0f07942d5..000000000 --- a/indexers/src/handlers/events/evmHost/postResponse.event.handler.ts +++ /dev/null @@ -1,89 +0,0 @@ -import assert from "assert"; -import { Status, Request } from "../../../types"; -import { PostResponseEventLog } from "../../../types/abi-interfaces/EthereumHostAbi"; -import { HyperBridgeService } from "../../../services/hyperbridge.service"; -import { ResponseService } from "../../../services/response.service"; -import { RequestService } from "../../../services/request.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the PostResponse event from Evm Hosts - */ -export async function handlePostResponseEvent( - event: PostResponseEventLog -): Promise { - assert(event.args, "No handlePostResponseEvent args"); - - const { transaction, blockNumber, transactionHash, args, block } = event; - let { - body, - dest, - fee, - from, - nonce, - source, - timeoutTimestamp, - to, - response, - responseTimeoutTimestamp, - } = args; - - logger.info( - `Handling PostResponse Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - await HyperBridgeService.handlePostRequestOrResponseEvent(chain, event); - - // Compute the response commitment - let response_commitment = ResponseService.computeResponseCommitment( - source, - dest, - BigInt(nonce.toString()), - BigInt(timeoutTimestamp.toString()), - from, - to, - body, - response, - BigInt(responseTimeoutTimestamp.toString()) - ); - - // Compute the request commitment - let request_commitment = RequestService.computeRequestCommitment( - source, - dest, - BigInt(nonce.toString()), - BigInt(timeoutTimestamp.toString()), - from, - to, - body - ); - - let request = await Request.get(request_commitment); - - if (typeof request === "undefined") { - logger.error( - `Error handling PostResponseEvent because request with commitment: ${request_commitment} was not found` - ); - return; - } - - // Create the response entity - await ResponseService.findOrCreate({ - chain, - commitment: response_commitment, - responseTimeoutTimestamp: BigInt(responseTimeoutTimestamp.toString()), - response_message: response, - status: Status.SOURCE, - request, - blockNumber: blockNumber.toString(), - blockHash: block.hash, - transactionHash, - blockTimestamp: block.timestamp, - }); -} diff --git a/indexers/src/handlers/events/evmHost/postResponseHandled.event.handler.ts b/indexers/src/handlers/events/evmHost/postResponseHandled.event.handler.ts deleted file mode 100644 index a03a4d726..000000000 --- a/indexers/src/handlers/events/evmHost/postResponseHandled.event.handler.ts +++ /dev/null @@ -1,68 +0,0 @@ -import assert from "assert"; -import { HyperBridgeService } from "../../../services/hyperbridge.service"; -import { EventType, Status } from "../../../types"; -import { PostResponseHandledLog } from "../../../types/abi-interfaces/EthereumHostAbi"; -import { EvmHostEventsService } from "../../../services/evmHostEvents.service"; -import { ResponseService } from "../../../services/response.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the PostResponseHandled event from Hyperbridge - */ -export async function handlePostResponseHandledEvent( - event: PostResponseHandledLog -): Promise { - assert(event.args, "No handlePostResponseHandledEvent args"); - - const { - args, - block, - transaction, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - data, - } = event; - const { relayer: relayer_id, commitment } = args; - - logger.info( - `Handling PostResponseHandled Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - Promise.all([ - await EvmHostEventsService.createEvent( - { - data, - commitment, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - timestamp: Number(block.timestamp), - type: EventType.EVM_HOST_POST_RESPONSE_HANDLED, - }, - chain - ), - await HyperBridgeService.handlePostRequestOrResponseHandledEvent( - relayer_id, - chain - ), - - await ResponseService.updateStatus({ - commitment, - chain, - blockNumber: blockNumber.toString(), - blockTimestamp: block.timestamp, - blockHash: block.hash, - status: Status.DEST, - transactionHash, - }), - ]); -} diff --git a/indexers/src/handlers/events/evmHost/postResponseTimeoutHandled.event.handler.ts b/indexers/src/handlers/events/evmHost/postResponseTimeoutHandled.event.handler.ts deleted file mode 100644 index 168380792..000000000 --- a/indexers/src/handlers/events/evmHost/postResponseTimeoutHandled.event.handler.ts +++ /dev/null @@ -1,65 +0,0 @@ -import assert from "assert"; -import { EventType, Status } from "../../../types"; -import { PostResponseTimeoutHandledLog } from "../../../types/abi-interfaces/EthereumHostAbi"; -import { EvmHostEventsService } from "../../../services/evmHostEvents.service"; -import { HyperBridgeService } from "../../../services/hyperbridge.service"; -import { ResponseService } from "../../../services/response.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the PostResponseTimeoutHandled event - */ -export async function handlePostResponseTimeoutHandledEvent( - event: PostResponseTimeoutHandledLog -): Promise { - assert(event.args, "No handlePostResponseTimeoutHandledEvent args"); - - const { - args, - block, - transaction, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - data, - } = event; - const { commitment, dest } = args; - - logger.info( - `Handling PostResponseTimeoutHandled Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - Promise.all([ - await EvmHostEventsService.createEvent( - { - data, - commitment, - transactionHash, - transactionIndex, - blockHash, - blockNumber, - dest, - timestamp: Number(block.timestamp), - type: EventType.EVM_HOST_POST_RESPONSE_TIMEOUT_HANDLED, - }, - chain - ), - await HyperBridgeService.incrementNumberOfTimedOutMessagesSent(chain), - await ResponseService.updateStatus({ - commitment, - chain, - blockNumber: blockNumber.toString(), - blockHash: block.hash, - blockTimestamp: block.timestamp, - status: Status.TIMED_OUT, - transactionHash, - }), - ]); -} diff --git a/indexers/src/handlers/events/evmHost/stateMachineUpdated.event.handler.ts b/indexers/src/handlers/events/evmHost/stateMachineUpdated.event.handler.ts deleted file mode 100644 index 5625bcce1..000000000 --- a/indexers/src/handlers/events/evmHost/stateMachineUpdated.event.handler.ts +++ /dev/null @@ -1,48 +0,0 @@ -import assert from "assert"; -import { StateMachineUpdatedLog } from "../../../types/abi-interfaces/EthereumHostAbi"; -import { StateMachineService } from "../../../services/stateMachine.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handle the StateMachineUpdated event - */ -export async function handleStateMachineUpdatedEvent( - event: StateMachineUpdatedLog -): Promise { - assert( - event.args, - `No handleStateMachineUpdatedEvent args. Tx Hash: ${event.transactionHash}` - ); - const { - blockHash, - blockNumber, - transactionHash, - transactionIndex, - block, - transaction, - args, - } = event; - const { stateMachineId, height } = args; - - logger.info( - `Handling StateMachineUpdated Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - await StateMachineService.createEvmStateMachineUpdatedEvent( - { - transactionHash, - transactionIndex, - blockHash, - blockNumber, - timestamp: Number(block.timestamp), - stateMachineId: stateMachineId, - height: height.toNumber(), - }, - chain - ); -} diff --git a/indexers/src/handlers/events/hyperbridge/handleIsmpStateMachineUpdatedEvent.handler.ts b/indexers/src/handlers/events/hyperbridge/handleIsmpStateMachineUpdatedEvent.handler.ts deleted file mode 100644 index a317e86f4..000000000 --- a/indexers/src/handlers/events/hyperbridge/handleIsmpStateMachineUpdatedEvent.handler.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { SubstrateEvent } from "@subql/types"; -import { StateMachineService } from "../../../services/stateMachine.service"; -import assert from "assert"; -import { extractStateMachineIdFromSubstrateEventData } from "../../../utils/substrate.helpers"; -import { HYPERBRIDGE } from "../../../constants"; - -export async function handleIsmpStateMachineUpdatedEvent( - event: SubstrateEvent -): Promise { - const { - event: { - data: [state_machine_id, latest_height], - }, - extrinsic, - block: { - timestamp, - block: { - header: { number: blockNumber, hash: blockHash }, - }, - }, - } = event; - - assert(extrinsic); - logger.info( - `Handling ISMP StateMachineUpdatedEvent. Block Number: ${blockNumber}` - ); - - const stateMachineId = extractStateMachineIdFromSubstrateEventData( - state_machine_id.toString() - ); - - if (typeof stateMachineId === "undefined") { - return; - } else { - await StateMachineService.createHyperbridgeStateMachineUpdatedEvent( - { - transactionHash: `${extrinsic.extrinsic.hash}`, - transactionIndex: extrinsic.idx, - blockNumber: blockNumber.toNumber(), - blockHash: blockHash.toString(), - timestamp: Date.parse(timestamp.toString()), - stateMachineId, - height: Number(latest_height.toString()), - }, - HYPERBRIDGE - ); - } -} diff --git a/indexers/src/handlers/events/hyperbridge/handlePostRequestTimeoutHandledEvent.handler.ts b/indexers/src/handlers/events/hyperbridge/handlePostRequestTimeoutHandledEvent.handler.ts deleted file mode 100644 index f946378a7..000000000 --- a/indexers/src/handlers/events/hyperbridge/handlePostRequestTimeoutHandledEvent.handler.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { SubstrateEvent } from "@subql/types"; -import { RequestService } from "../../../services/request.service"; -import { Status } from "../../../types"; -import assert from "assert"; -import { HYPERBRIDGE } from "../../../constants"; - -export async function handleHyperbridgePostRequestTimeoutHandledEvent( - event: SubstrateEvent -): Promise { - logger.info(`Handling ISMP PostRequestTimeoutHandled Event`); - - assert(event.extrinsic); - const { - event: { data }, - extrinsic, - block: { - timestamp, - block: { - header: { number: blockNumber, hash: blockHash }, - }, - }, - } = event; - - const eventData = data.toJSON(); - const timeoutData = Array.isArray(eventData) - ? (eventData[0] as { commitment: any; source: any; dest: any }) - : undefined; - assert(timeoutData); - - await RequestService.updateStatus({ - commitment: timeoutData.commitment.toString(), - chain: HYPERBRIDGE, - blockNumber: blockNumber.toString(), - blockHash: blockHash.toString(), - blockTimestamp: BigInt(Date.parse(timestamp.toString())), - status: Status.TIMED_OUT, - transactionHash: extrinsic.extrinsic.hash.toString(), - }); -} diff --git a/indexers/src/handlers/events/hyperbridge/handlePostResponseTimeoutHandledEvent.handler.ts b/indexers/src/handlers/events/hyperbridge/handlePostResponseTimeoutHandledEvent.handler.ts deleted file mode 100644 index 7d434d0d9..000000000 --- a/indexers/src/handlers/events/hyperbridge/handlePostResponseTimeoutHandledEvent.handler.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { SubstrateEvent } from "@subql/types"; -import { Status } from "../../../types"; -import assert from "assert"; -import { ResponseService } from "../../../services/response.service"; -import { HYPERBRIDGE } from "../../../constants"; - -export async function handleHyperbridgePostResponseTimeoutHandledEvent( - event: SubstrateEvent -): Promise { - logger.info(`Handling ISMP PostResponseTimeoutHandled Event`); - - assert(event.extrinsic); - const { - event: { data }, - extrinsic, - block: { - timestamp, - block: { - header: { number: blockNumber, hash: blockHash }, - }, - }, - } = event; - - const eventData = data.toJSON(); - const timeoutData = Array.isArray(eventData) - ? (eventData[0] as { commitment: any; source: any; dest: any }) - : undefined; - assert(timeoutData); - - await ResponseService.updateStatus({ - commitment: timeoutData.commitment.toString(), - chain: HYPERBRIDGE, - blockNumber: blockNumber.toString(), - blockHash: blockHash.toString(), - blockTimestamp: BigInt(Date.parse(timestamp.toString())), - status: Status.TIMED_OUT, - transactionHash: extrinsic.extrinsic.hash.toString(), - }); -} diff --git a/indexers/src/handlers/events/hyperbridge/handleRequestEvent.handler.ts b/indexers/src/handlers/events/hyperbridge/handleRequestEvent.handler.ts deleted file mode 100644 index 0ccc30736..000000000 --- a/indexers/src/handlers/events/hyperbridge/handleRequestEvent.handler.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { SubstrateEvent } from "@subql/types"; -import { RequestService } from "../../../services/request.service"; -import { Status } from "../../../types"; -import { HYPERBRIDGE } from "../../../constants"; - -export async function handleHyperbridgeRequestEvent( - event: SubstrateEvent -): Promise { - logger.info(`Handling ISMP Request Event`); - - const { - event: { - data: [dest_chain, source_chain, request_nonce, commitment], - }, - extrinsic, - block: { - timestamp, - block: { - header: { number: blockNumber, hash: blockHash }, - }, - }, - } = event; - - let transactionHash = ""; - if (extrinsic) { - transactionHash = extrinsic.extrinsic.hash.toString(); - } - - await RequestService.updateStatus({ - commitment: commitment.toString(), - chain: HYPERBRIDGE, - blockNumber: blockNumber.toString(), - blockHash: blockHash.toString(), - blockTimestamp: BigInt(Date.parse(timestamp.toString())), - status: Status.MESSAGE_RELAYED, - transactionHash, - }); -} diff --git a/indexers/src/handlers/events/hyperbridge/handleResponseEvent.handler.ts b/indexers/src/handlers/events/hyperbridge/handleResponseEvent.handler.ts deleted file mode 100644 index 77404cc29..000000000 --- a/indexers/src/handlers/events/hyperbridge/handleResponseEvent.handler.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { SubstrateEvent } from "@subql/types"; -import assert from "assert"; -import { ResponseService } from "../../../services/response.service"; -import { Status } from "../../../types"; -import { HYPERBRIDGE } from "../../../constants"; - -export async function handleHyperbridgeResponseEvent( - event: SubstrateEvent -): Promise { - logger.info(`Handling ISMP Response Event`); - - assert(event.extrinsic); - const { - event: { - data: [dest_chain, source_chain, request_nonce, commitment, req_commitment], - }, - extrinsic, - block: { - timestamp, - block: { - header: { number: blockNumber, hash: blockHash }, - }, - }, - } = event; - - await ResponseService.updateStatus({ - commitment: commitment.toString(), - chain: HYPERBRIDGE, - blockNumber: blockNumber.toString(), - blockHash: blockHash.toString(), - blockTimestamp: BigInt(Date.parse(timestamp.toString())), - status: Status.MESSAGE_RELAYED, - transactionHash: extrinsic.extrinsic.hash.toString(), - }); -} diff --git a/indexers/src/handlers/events/tokenGateway/handleAssetReceivedEvent.handler.ts b/indexers/src/handlers/events/tokenGateway/handleAssetReceivedEvent.handler.ts deleted file mode 100644 index 24565310b..000000000 --- a/indexers/src/handlers/events/tokenGateway/handleAssetReceivedEvent.handler.ts +++ /dev/null @@ -1,54 +0,0 @@ -import assert from "assert"; -import { ProtocolParticipant } from "../../../types"; -import { AssetReceivedLog } from "../../../types/abi-interfaces/TokenGatewayAbi"; -import { AssetService } from "../../../services/asset.service"; -import { RewardPointsService } from "../../../services/reward-points.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the AssetReceived event - */ -export async function handleAssetReceivedEvent( - event: AssetReceivedLog -): Promise { - assert(event.args, "No handleAssetReceivedEvent args"); - - const { - args, - transaction, - transactionHash, - blockNumber, - address: contract_address, - } = event; - const { commitment, from, beneficiary, amount, assetId } = args; - - logger.info( - `Handling AssetReceived Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - await AssetService.createReceivedAsset({ - id: commitment, - commitment, - amount: BigInt(amount.toString()), - assetId, - beneficiary, - from, - chain, - }); - - await RewardPointsService.assignRewardForAssetTransfer({ - address: from, - chain, - earnerType: ProtocolParticipant.USER, - amount: BigInt(amount.toString()), - asset_id: assetId, - contract_address, - transaction_hash: transactionHash, - }); -} diff --git a/indexers/src/handlers/events/tokenGateway/handleAssetTeleportedEvent.handler.ts b/indexers/src/handlers/events/tokenGateway/handleAssetTeleportedEvent.handler.ts deleted file mode 100644 index 03fe5a80e..000000000 --- a/indexers/src/handlers/events/tokenGateway/handleAssetTeleportedEvent.handler.ts +++ /dev/null @@ -1,55 +0,0 @@ -import assert from "assert"; -import { ProtocolParticipant } from "../../../types"; -import { AssetTeleportedLog } from "../../../types/abi-interfaces/TokenGatewayAbi"; -import { AssetService } from "../../../services/asset.service"; -import { RewardPointsService } from "../../../services/reward-points.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the AssetTeleported event - */ -export async function handleAssetTeleportedEvent( - event: AssetTeleportedLog -): Promise { - assert(event.args, "No handleAssetTeleportedEvent args"); - - const { - args, - transaction, - transactionHash, - blockNumber, - address: contract_address, - } = event; - const { commitment, from, to, amount, assetId, redeem } = args; - - logger.info( - `Handling AssetTeleported Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - await AssetService.createTeleportedAsset({ - id: commitment, - commitment, - amount: BigInt(amount.toString()), - assetId, - to, - from, - chain, - redeem, - }); - - await RewardPointsService.assignRewardForAssetTransfer({ - address: from, - chain, - earnerType: ProtocolParticipant.USER, - amount: BigInt(amount.toString()), - asset_id: assetId, - contract_address, - transaction_hash: transactionHash, - }); -} diff --git a/indexers/src/handlers/events/tokenGateway/handleBidPlacedEvent.handler.ts b/indexers/src/handlers/events/tokenGateway/handleBidPlacedEvent.handler.ts deleted file mode 100644 index 872717d97..000000000 --- a/indexers/src/handlers/events/tokenGateway/handleBidPlacedEvent.handler.ts +++ /dev/null @@ -1,33 +0,0 @@ -import assert from "assert"; -import { BidPlacedLog } from "../../../types/abi-interfaces/TokenGatewayAbi"; -import { BidService } from "../../../services/bid.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the BidPlaced event - */ -export async function handleBidPlacedEvent(event: BidPlacedLog): Promise { - assert(event.args, "No handleBidPlacedEvent args"); - - const { args, transaction, transactionHash, blockNumber } = event; - const { commitment, assetId, bid, bidder } = args; - - logger.info( - `Handling BidPlaced Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - await BidService.createBid({ - id: commitment, - commitment, - assetId, - bid: BigInt(bid.toString()), - bidder, - chain, - }); -} diff --git a/indexers/src/handlers/events/tokenGateway/handleBidRefundedEvent.handler.ts b/indexers/src/handlers/events/tokenGateway/handleBidRefundedEvent.handler.ts deleted file mode 100644 index 499cfa6b6..000000000 --- a/indexers/src/handlers/events/tokenGateway/handleBidRefundedEvent.handler.ts +++ /dev/null @@ -1,34 +0,0 @@ -import assert from "assert"; -import { BidRefundedLog } from "../../../types/abi-interfaces/TokenGatewayAbi"; -import { BidService } from "../../../services/bid.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the BidRefunded event - */ -export async function handleBidRefundedEvent( - event: BidRefundedLog -): Promise { - assert(event.args, "No handleBidRefundedEvent args"); - - const { args, transaction, transactionHash, blockNumber } = event; - const { commitment, assetId, bidder } = args; - - logger.info( - `Handling BidRefunded Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - await BidService.createBidRefund({ - id: commitment, - commitment, - assetId, - bidder, - chain, - }); -} diff --git a/indexers/src/handlers/events/tokenGateway/handleRequestFulfilledEvent.handler.ts b/indexers/src/handlers/events/tokenGateway/handleRequestFulfilledEvent.handler.ts deleted file mode 100644 index 355992d76..000000000 --- a/indexers/src/handlers/events/tokenGateway/handleRequestFulfilledEvent.handler.ts +++ /dev/null @@ -1,61 +0,0 @@ -import assert from "assert"; -import { ProtocolParticipant } from "../../../types"; -import { RequestFulfilledLog } from "../../../types/abi-interfaces/TokenGatewayAbi"; -import { BidService } from "../../../services/bid.service"; -import { RewardPointsService } from "../../../services/reward-points.service"; -import { TokenGatewayService } from "../../../services/tokenGateway.service"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the RequestFulfilled event - */ -export async function handleRequestFulfilledEvent( - event: RequestFulfilledLog -): Promise { - assert(event.args, "No handleRequestFulfilledEvent args"); - - const { - args, - transaction, - transactionHash, - blockNumber, - address: contract_address, - } = event; - const { assetId, amount, bidder } = args; - - logger.info( - `Handling RequestFulfilled Event: ${JSON.stringify({ - blockNumber, - transactionHash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - await BidService.createFulfilledRequest({ - id: transactionHash, - amount: BigInt(amount.toString()), - assetId, - bidder, - chain, - }); - - const assetDetails = await TokenGatewayService.getAssetDetails( - contract_address, - assetId - ); - - // If asset is an ERC20 token, assign reward points to the filler - if (assetDetails.is_erc20) { - await RewardPointsService.assignRewardForFulfilledRequest({ - address: bidder, - chain, - earnerType: ProtocolParticipant.FILLER, - amount: BigInt(amount.toString()), - asset_id: assetId, - contract_address, - transaction_hash: transactionHash, - }); - } -} diff --git a/indexers/src/handlers/transactions/handlerV1/handlePostRequestTransactionHandler.handler.ts b/indexers/src/handlers/transactions/handlerV1/handlePostRequestTransactionHandler.handler.ts deleted file mode 100644 index 506804c18..000000000 --- a/indexers/src/handlers/transactions/handlerV1/handlePostRequestTransactionHandler.handler.ts +++ /dev/null @@ -1,36 +0,0 @@ -import assert from "assert"; -import { HyperBridgeService } from "../../../services/hyperbridge.service"; -import { RelayerService } from "../../../services/relayer.service"; -import { HandlePostRequestsTransaction } from "../../../types/abi-interfaces/HandlerV1Abi"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the handlePostRequest transaction from handlerV1 contract - */ -export async function handlePostRequestTransactionHandler( - transaction: HandlePostRequestsTransaction -): Promise { - assert(transaction.args); - const { blockNumber, hash } = transaction; - - logger.info( - `Handling PostRequests Transaction: ${JSON.stringify({ - blockNumber, - transactionHash: hash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - Promise.all([ - await RelayerService.handlePostRequestOrResponseTransaction( - chain, - transaction - ), - await HyperBridgeService.handlePostRequestOrResponseTransaction( - chain, - transaction - ), - ]); -} diff --git a/indexers/src/handlers/transactions/handlerV1/handlePostResponseTransactionHandler.handler.ts b/indexers/src/handlers/transactions/handlerV1/handlePostResponseTransactionHandler.handler.ts deleted file mode 100644 index 1f9cab0eb..000000000 --- a/indexers/src/handlers/transactions/handlerV1/handlePostResponseTransactionHandler.handler.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { HyperBridgeService } from "../../../services/hyperbridge.service"; -import { RelayerService } from "../../../services/relayer.service"; -import { HandlePostRequestsTransaction } from "../../../types/abi-interfaces/HandlerV1Abi"; -import StateMachineHelpers from "../../../utils/stateMachine.helpers"; - -/** - * Handles the handlePostResponse transaction from handlerV1 contract - */ -export async function handlePostResponseTransactionHandler( - transaction: HandlePostRequestsTransaction -): Promise { - const { blockNumber, hash } = transaction; - - logger.info( - `Handling PostRequests Transaction: ${JSON.stringify({ - blockNumber, - transactionHash: hash, - })}` - ); - - const chain: string = - StateMachineHelpers.getEvmStateMachineIdFromTransaction(transaction); - - Promise.all([ - await RelayerService.handlePostRequestOrResponseTransaction( - chain, - transaction - ), - await HyperBridgeService.handlePostRequestOrResponseTransaction( - chain, - transaction - ), - ]); -} diff --git a/indexers/src/hyperbridge-chaintypes.ts b/indexers/src/hyperbridge-chaintypes.ts deleted file mode 100644 index 973356c59..000000000 --- a/indexers/src/hyperbridge-chaintypes.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { URL } from "url"; -// @ts-ignore -global.URL = URL; - -const definitions = { - hasher: "keccakAsU8a", -}; - -export default { typesBundle: { spec: { gargantua: definitions } } }; diff --git a/indexers/src/index.ts b/indexers/src/index.ts deleted file mode 100644 index 9c633edaf..000000000 --- a/indexers/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { URL } from "url"; -// @ts-ignore -global.URL = URL; - -// Required for ethers to work in node -import "@ethersproject/shims"; - -//Exports all handler functions -export * from "./mappings/mappingHandlers"; diff --git a/indexers/src/mappings/mappingHandlers.ts b/indexers/src/mappings/mappingHandlers.ts deleted file mode 100644 index 894625a90..000000000 --- a/indexers/src/mappings/mappingHandlers.ts +++ /dev/null @@ -1,32 +0,0 @@ -// EVM Host Handlers -export { handlePostRequestEvent } from "../handlers/events/evmHost/postRequest.event.handler"; -export { handlePostRequestHandledEvent } from "../handlers/events/evmHost/postRequestHandled.event.handler"; -export { handlePostRequestTimeoutHandledEvent } from "../handlers/events/evmHost/postRequestTimeoutHandled.event.handler"; - -export { handlePostResponseEvent } from "../handlers/events/evmHost/postResponse.event.handler"; -export { handlePostResponseHandledEvent } from "../handlers/events/evmHost/postResponseHandled.event.handler"; -export { handlePostResponseTimeoutHandledEvent } from "../handlers/events/evmHost/postResponseTimeoutHandled.event.handler"; - -export { handleGetRequestHandledEvent } from "../handlers/events/evmHost/getRequestHandled.event.handler"; -export { handleGetRequestTimeoutHandledEvent } from "../handlers/events/evmHost/getRequestTimeoutHandled.event.handler"; - -export { handleStateMachineUpdatedEvent } from "../handlers/events/evmHost/stateMachineUpdated.event.handler"; -export { handleTransferEvent } from "../handlers/events/erc6160ext20/transfer.event.handlers"; - -// HandlerV1 Handlers -export { handlePostRequestTransactionHandler } from "../handlers/transactions/handlerV1/handlePostRequestTransactionHandler.handler"; -export { handlePostResponseTransactionHandler } from "../handlers/transactions/handlerV1/handlePostResponseTransactionHandler.handler"; - -// Hyperbridge Handlers -export { handleIsmpStateMachineUpdatedEvent } from "../handlers/events/hyperbridge/handleIsmpStateMachineUpdatedEvent.handler"; -export { handleHyperbridgeRequestEvent } from "../handlers/events/hyperbridge/handleRequestEvent.handler"; -export { handleHyperbridgeResponseEvent } from "../handlers/events/hyperbridge/handleResponseEvent.handler"; -export { handleHyperbridgePostRequestTimeoutHandledEvent } from "../handlers/events/hyperbridge/handlePostRequestTimeoutHandledEvent.handler"; -export { handleHyperbridgePostResponseTimeoutHandledEvent } from "../handlers/events/hyperbridge/handlePostResponseTimeoutHandledEvent.handler"; - -// TokenGateway Handlers -export { handleBidPlacedEvent } from "../handlers/events/tokenGateway/handleBidPlacedEvent.handler"; -export { handleBidRefundedEvent } from "../handlers/events/tokenGateway/handleBidRefundedEvent.handler"; -export { handleRequestFulfilledEvent } from "../handlers/events/tokenGateway/handleRequestFulfilledEvent.handler"; -export { handleAssetReceivedEvent } from "../handlers/events/tokenGateway/handleAssetReceivedEvent.handler"; -export { handleAssetTeleportedEvent } from "../handlers/events/tokenGateway/handleAssetTeleportedEvent.handler"; diff --git a/indexers/src/services/asset.service.ts b/indexers/src/services/asset.service.ts deleted file mode 100644 index c7b71333c..000000000 --- a/indexers/src/services/asset.service.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Bid } from "../types/models"; -import { - AssetReceived, - AssetReceivedProps, -} from "../types/models/AssetReceived"; -import { - AssetTeleported, - AssetTeleportedProps, -} from "../types/models/AssetTeleported"; -import { BidProps } from "../types/models/Bid"; - -export class AssetService { - /** - * Create a new bid - */ - static async createBid(data: BidProps) { - let bid = await Bid.get(data.id); - - if (typeof bid === "undefined") { - bid = Bid.create(data); - await bid.save(); - } else { - logger.info( - `Attempted to create new bid with commitment ${data.id}, but a bid already exists with this commitment`, - ); - } - } - - /** - * Create a new received asset entity - */ - static async createReceivedAsset(data: AssetReceivedProps) { - let assetReceived = await AssetReceived.get(data.id); - - if (typeof assetReceived === "undefined") { - assetReceived = AssetReceived.create(data); - await assetReceived.save(); - } else { - logger.info( - `Attempted to create new asset received entity with existing id ${data.id}`, - ); - } - } - - /** - * Create a new teleported asset entity - */ - static async createTeleportedAsset(data: AssetTeleportedProps) { - let assetTeleported = await AssetTeleported.get(data.id); - - if (typeof assetTeleported === "undefined") { - assetTeleported = AssetTeleported.create(data); - await assetTeleported.save(); - } else { - logger.info( - `Attempted to create new asset teleported entity with existing id ${data.id}`, - ); - } - } -} diff --git a/indexers/src/services/bid.service.ts b/indexers/src/services/bid.service.ts deleted file mode 100644 index 6887ce972..000000000 --- a/indexers/src/services/bid.service.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Bid } from "../types/models"; -import { BidProps } from "../types/models/Bid"; -import { BidRefund, BidRefundProps } from "../types/models/BidRefund"; -import { - FulfilledRequest, - FulfilledRequestProps, -} from "../types/models/FulfilledRequest"; - -export class BidService { - /** - * Create a new bid - */ - static async createBid(data: BidProps) { - let bid = await Bid.get(data.id); - - if (typeof bid === "undefined") { - bid = Bid.create(data); - await bid.save(); - } else { - logger.info( - `Attempted to create new bid with commitment ${data.id}, but a bid already exists with this commitment`, - ); - } - } - - /** - * Create a new bid refund - */ - static async createBidRefund(data: BidRefundProps) { - let bidRefund = await BidRefund.get(data.id); - - if (typeof bidRefund === "undefined") { - bidRefund = BidRefund.create(data); - await bidRefund.save(); - } else { - logger.info( - `Attempted to create new bid refund with commitment ${data.id}, but a refund already exists with this commitment`, - ); - } - } - - /** - * Create a new fulfilled request - */ - static async createFulfilledRequest(data: FulfilledRequestProps) { - let fulfilledRequest = await FulfilledRequest.get(data.id); - - if (typeof fulfilledRequest === "undefined") { - fulfilledRequest = FulfilledRequest.create(data); - await fulfilledRequest.save(); - } else { - logger.info( - `Attempted to create new fulfilled request with id ${data.id}, but a fulfilled request already exists with this id`, - ); - } - } -} diff --git a/indexers/src/services/evmHostEvents.service.ts b/indexers/src/services/evmHostEvents.service.ts deleted file mode 100644 index fdcbf7ddf..000000000 --- a/indexers/src/services/evmHostEvents.service.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Event } from "../types/models"; -import { EventType } from "../types"; - -export interface IEvmHostEventArgs { - blockHash: string; - blockNumber: number; - transactionHash: string; - transactionIndex: number; - timestamp: number; -} - -// Arguments to functions that create EvmHost events -export interface ICreateEvmHostEventArgs extends IEvmHostEventArgs { - type: EventType; - commitment: string; - data: string; - dest?: string; -} - -export class EvmHostEventsService { - /** - * Create a new EVM Host event entity - */ - static async createEvent( - args: ICreateEvmHostEventArgs, - chain: string - ): Promise { - const { - commitment, - blockHash, - blockNumber, - transactionHash, - transactionIndex, - timestamp, - type, - data, - dest, - } = args; - - const event = Event.create({ - id: commitment, - data, - type, - chain, - transactionHash, - destination: dest, - transactionIndex: BigInt(transactionIndex), - blockHash, - blockNumber: BigInt(blockNumber), - createdAt: new Date(timestamp * 1000), - }); - - await event.save(); - } -} diff --git a/indexers/src/services/hyperbridge.service.ts b/indexers/src/services/hyperbridge.service.ts deleted file mode 100644 index b92d1d65c..000000000 --- a/indexers/src/services/hyperbridge.service.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { - PostRequestEventLog, - PostResponseEventLog, -} from "../types/abi-interfaces/EthereumHostAbi"; -import { Relayer, Transfer } from "../types/models"; -import { HyperBridgeChainStatsService } from "./hyperbridgeChainStats.service"; -import assert from "assert"; -import { isHexString } from "ethers/lib/utils"; -import { EthereumHostAbi__factory } from "../types/contracts"; -import { - HandlePostRequestsTransaction, - HandlePostResponsesTransaction, -} from "../types/abi-interfaces/HandlerV1Abi"; - -export class HyperBridgeService { - /** - * Perform the necessary actions related to Hyperbridge stats when a PostRequest/PostResponse event is indexed - */ - static async handlePostRequestOrResponseEvent( - chain: string, - event: PostRequestEventLog | PostResponseEventLog - ): Promise { - assert( - event.args, - "No handlePostRequestEvent/handlePostResponseEvent args" - ); - - const { args, address } = event; - let { body } = args; - - const protocolFee = await this.computeProtocolFeeFromHexData(address, body); - - Promise.all([ - await this.incrementProtocolFeesEarned(protocolFee, chain), - await this.incrementNumberOfSentMessages(chain), - ]); - } - - /** - * Perform the necessary actions related to Hyperbridge stats when a PostRequestHandled/PostResponseHandled event is indexed - */ - static async handlePostRequestOrResponseHandledEvent( - _relayer_id: string, - chain: string - ): Promise { - await this.incrementNumberOfDeliveredMessages(chain); - } - - /** - * Handle PostRequest or PostResponse transactions - */ - static async handlePostRequestOrResponseTransaction( - chain: string, - transaction: HandlePostRequestsTransaction | HandlePostResponsesTransaction - ): Promise { - const { status } = await transaction.receipt(); - - if (status === false) { - await this.incrementNumberOfFailedDeliveries(chain); - } - } - - /** - * Increment the total number of messages sent on hyperbridge - */ - static async incrementNumberOfSentMessages(chain: string): Promise { - // Update the specific chain stats - let chainStats = await HyperBridgeChainStatsService.findOrCreateChainStats( - chain - ); - chainStats.numberOfMessagesSent += BigInt(1); - - Promise.all([await chainStats.save()]); - } - - /** - * Increment the number of successful messages handled by hyperbridge - */ - static async incrementNumberOfDeliveredMessages( - chain: string - ): Promise { - // Update the specific chain stats - let chainStats = await HyperBridgeChainStatsService.findOrCreateChainStats( - chain - ); - chainStats.numberOfDeliveredMessages += BigInt(1); - - await chainStats.save(); - } - - /** - * Increment the number of failed deliveries by hyperbridge - */ - static async incrementNumberOfFailedDeliveries(chain: string): Promise { - // Update the specific chain stats - let chainStats = await HyperBridgeChainStatsService.findOrCreateChainStats( - chain - ); - chainStats.numberOfFailedDeliveries += BigInt(1); - - await chainStats.save(); - } - - /** - * Increment the number of timed-out messages handled by hyperbridge - */ - static async incrementNumberOfTimedOutMessagesSent( - chain: string - ): Promise { - // Update the specific chain stats - let chainStats = await HyperBridgeChainStatsService.findOrCreateChainStats( - chain - ); - chainStats.numberOfTimedOutMessages += BigInt(1); - - await chainStats.save(); - } - - /** - * Increment the protocol fees earned by hyperbridge - */ - static async incrementProtocolFeesEarned( - amount: bigint, - chain: string - ): Promise { - // Update the specific chain stats - let chainStats = await HyperBridgeChainStatsService.findOrCreateChainStats( - chain - ); - chainStats.protocolFeesEarned += amount; - - await chainStats.save(); - } - - /** - * Handle transfers out of the host account, incrementing the fees payed out to relayers - */ - static async handleTransferOutOfHostAccounts( - transfer: Transfer, - chain: string - ): Promise { - let relayer = await Relayer.get(transfer.to); - - if (typeof relayer !== "undefined") { - let chainStats = - await HyperBridgeChainStatsService.findOrCreateChainStats(chain); - - chainStats.feesPayedOutToRelayers += BigInt(transfer.amount); - - await chainStats.save(); - } - } - - /** - * Increment the total amount transferred to hyperbridge (protocol fees + relayer fees) - */ - static async updateTotalTransfersIn( - transfer: Transfer, - chain: string - ): Promise { - // Update the specific chain metrics - let chainStats = await HyperBridgeChainStatsService.findOrCreateChainStats( - chain - ); - chainStats.totalTransfersIn += BigInt(transfer.amount); - - await chainStats.save(); - } - - static async computeProtocolFeeFromHexData( - contract_address: string, - data: string - ): Promise { - data = isHexString(data) ? data.slice(2) : data; - const noOfBytesInData = data.length / 2; - const evmHostContract = EthereumHostAbi__factory.connect( - contract_address, - api - ); - const perByteFee = await evmHostContract.perByteFee(); - return perByteFee.mul(noOfBytesInData).toBigInt(); - } -} diff --git a/indexers/src/services/hyperbridgeChainStats.service.ts b/indexers/src/services/hyperbridgeChainStats.service.ts deleted file mode 100644 index 19b56adaa..000000000 --- a/indexers/src/services/hyperbridgeChainStats.service.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { HyperBridgeChainStats } from "../types"; - -export class HyperBridgeChainStatsService { - /** - * Find the HyperBridgeChainStats record for a chain, create it if it doesn't exist - */ - static async findOrCreateChainStats( - chain: string - ): Promise { - let chainStats = await HyperBridgeChainStats.get(chain); - - if (typeof chainStats === "undefined") { - chainStats = HyperBridgeChainStats.create({ - id: chain, - totalTransfersIn: BigInt(0), - protocolFeesEarned: BigInt(0), - feesPayedOutToRelayers: BigInt(0), - numberOfMessagesSent: BigInt(0), - numberOfDeliveredMessages: BigInt(0), - numberOfFailedDeliveries: BigInt(0), - numberOfTimedOutMessages: BigInt(0), - }); - await chainStats.save(); - } - - return chainStats; - } -} diff --git a/indexers/src/services/relayer.service.ts b/indexers/src/services/relayer.service.ts deleted file mode 100644 index 707fb9705..000000000 --- a/indexers/src/services/relayer.service.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { ProtocolParticipant } from "../types/enums"; -import { Relayer, Transfer } from "../types/models"; -import { RelayerChainStatsService } from "./relayerChainStats.service"; -import { - HandlePostRequestsTransaction, - HandlePostResponsesTransaction, -} from "../types/abi-interfaces/HandlerV1Abi"; -import { RewardPointsService } from "./reward-points.service"; -import PriceHelper from "../utils/price.helpers"; -import { GET_ETHEREUM_L2_STATE_MACHINES } from "../addresses/state-machine.addresses"; - -export class RelayerService { - /** - * Find a relayer by its id or create a new one if it doesn't exist - */ - static async findOrCreate( - relayer_id: string, - chain: string - ): Promise { - let relayer = await Relayer.get(relayer_id); - - if (typeof relayer === "undefined") { - relayer = Relayer.create({ - id: relayer_id, - }); - - await relayer.save(); - } - - return relayer; - } - - /** - * Update the total fees earned by a relayer - * Fees earned by a relayer == Sum of all transfers to the relayer from the hyperbridge host address - */ - static async updateFeesEarned(transfer: Transfer): Promise { - let relayer = await Relayer.get(transfer.to); - if (relayer) { - let relayer_chain_stats = await RelayerChainStatsService.findOrCreate( - relayer.id, - transfer.chain - ); - - relayer_chain_stats.feesEarned += transfer.amount; - - Promise.all([relayer.save(), relayer_chain_stats.save()]); - } - } - - /** - * Computes relayer specific stats from the handlePostRequest/handlePostResponse transactions on the handlerV1 contract - */ - static async handlePostRequestOrResponseTransaction( - chain: string, - transaction: HandlePostRequestsTransaction | HandlePostResponsesTransaction - ): Promise { - const { from: relayer_id, hash: transaction_hash } = transaction; - const receipt = await transaction.receipt(); - const { status, gasUsed, effectiveGasPrice } = receipt; - - const nativeCurrencyPrice = await PriceHelper.getNativeCurrencyPrice(chain); - - let gasFee = BigInt(effectiveGasPrice) * BigInt(gasUsed); - - // Add the L1 Gas Used for L2 chains - if (GET_ETHEREUM_L2_STATE_MACHINES().includes(chain)) { - if (!(receipt as any).l1Fee) { - logger.error( - `Could not find l1Fee in transaction receipt: ${JSON.stringify({ - chain, - transactionHash: transaction.hash, - })}` - ); - } - const l1Fee = BigInt((receipt as any).l1Fee ?? 0); - gasFee += l1Fee; - } - - const _gasFeeInEth = Number(gasFee) / Number(BigInt(10 ** 18)); - const usdFee = (gasFee * nativeCurrencyPrice) / BigInt(10 ** 18); - - const relayer = await RelayerService.findOrCreate(relayer_id, chain); - let relayer_chain_stats = await RelayerChainStatsService.findOrCreate( - relayer_id, - chain - ); - - if (status === true) { - relayer_chain_stats.numberOfSuccessfulMessagesDelivered += BigInt(1); - relayer_chain_stats.gasUsedForSuccessfulMessages += BigInt(gasUsed); - relayer_chain_stats.gasFeeForSuccessfulMessages += BigInt(gasFee); - relayer_chain_stats.usdGasFeeForSuccessfulMessages += usdFee; - await RewardPointsService.assignRewardToRelayer({ - chain, - is_success: true, - earnerType: ProtocolParticipant.RELAYER, - relayer_address: relayer_id, - transaction_hash, - }); - } else { - relayer_chain_stats.numberOfFailedMessagesDelivered += BigInt(1); - relayer_chain_stats.gasUsedForFailedMessages += BigInt(gasUsed); - relayer_chain_stats.gasFeeForFailedMessages += BigInt(gasFee); - relayer_chain_stats.usdGasFeeForFailedMessages += usdFee; - await RewardPointsService.assignRewardToRelayer({ - chain, - is_success: false, - earnerType: ProtocolParticipant.RELAYER, - relayer_address: relayer_id, - transaction_hash, - }); - } - - Promise.all([await relayer_chain_stats.save(), await relayer.save()]); - } -} diff --git a/indexers/src/services/relayerChainStats.service.ts b/indexers/src/services/relayerChainStats.service.ts deleted file mode 100644 index bae86d7fb..000000000 --- a/indexers/src/services/relayerChainStats.service.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { RelayerStatsPerChain } from "../types"; - -export class RelayerChainStatsService { - /* - * Find the RelayerChainMetrics record for a relayer on a chain, create it if it doesn't exist - */ - static async findOrCreate( - relayer_id: string, - chain: string - ): Promise { - let id = `${relayer_id}-${chain}`; - let metrics = await RelayerStatsPerChain.get(id); - - if (!metrics) { - metrics = RelayerStatsPerChain.create({ - id, - relayerId: relayer_id, - chain, - numberOfFailedMessagesDelivered: BigInt(0), - numberOfSuccessfulMessagesDelivered: BigInt(0), - gasUsedForFailedMessages: BigInt(0), - gasUsedForSuccessfulMessages: BigInt(0), - gasFeeForFailedMessages: BigInt(0), - gasFeeForSuccessfulMessages: BigInt(0), - usdGasFeeForFailedMessages: BigInt(0), - usdGasFeeForSuccessfulMessages: BigInt(0), - feesEarned: BigInt(0), - }); - await metrics.save(); - } - - return metrics; - } -} diff --git a/indexers/src/services/request.service.ts b/indexers/src/services/request.service.ts deleted file mode 100644 index 7c6d05d99..000000000 --- a/indexers/src/services/request.service.ts +++ /dev/null @@ -1,191 +0,0 @@ -import { Status } from "../types/enums"; -import { solidityKeccak256 } from "ethers/lib/utils"; -import { Request, RequestStatusMetadata } from "../types/models"; - -export interface ICreateRequestArgs { - chain: string; - commitment: string; - body?: string | undefined; - dest?: string | undefined; - fee?: bigint | undefined; - from?: string | undefined; - nonce?: bigint | undefined; - source?: string | undefined; - timeoutTimestamp?: bigint | undefined; - to?: string | undefined; - status: Status; - blockNumber: string; - blockHash: string; - transactionHash: string; - blockTimestamp: bigint; -} - -export interface IUpdateRequestStatusArgs { - commitment: string; - status: Status; - blockNumber: string; - blockHash: string; - transactionHash: string; - blockTimestamp: bigint; - chain: string; -} - -const REQUEST_STATUS_WEIGHTS = { - [Status.SOURCE]: 1, - [Status.MESSAGE_RELAYED]: 2, - [Status.DEST]: 3, - [Status.TIMED_OUT]: 4, -}; - -export class RequestService { - /** - * Finds a request enitity and creates a new one if it doesn't exist - */ - static async findOrCreate(args: ICreateRequestArgs): Promise { - const { - chain, - commitment, - body, - dest, - fee, - from, - nonce, - source, - status, - timeoutTimestamp, - to, - blockNumber, - blockHash, - transactionHash, - blockTimestamp, - } = args; - let request = await Request.get(commitment); - - if (typeof request === "undefined") { - request = Request.create({ - id: commitment, - chain, - body, - dest, - fee, - from, - nonce, - source, - status, - timeoutTimestamp, - to, - }); - - await request.save(); - - let requestStatusMetadata = RequestStatusMetadata.create({ - id: `${commitment}.${status}`, - requestId: commitment, - status, - chain, - timestamp: blockTimestamp, - blockNumber, - blockHash, - transactionHash, - }); - - await requestStatusMetadata.save(); - } - - return request; - } - - /** - * Update the status of a request - * Also adds a new entry to the request status metadata - */ - static async updateStatus(args: IUpdateRequestStatusArgs): Promise { - const { - commitment, - blockNumber, - blockHash, - blockTimestamp, - status, - transactionHash, - chain, - } = args; - - let request = await Request.get(commitment); - - if (request) { - if ( - REQUEST_STATUS_WEIGHTS[status] > REQUEST_STATUS_WEIGHTS[request.status] - ) { - logger.info( - `Updating Request Status: ${JSON.stringify({ - new_status: status, - old_status: request.status, - is_true: - REQUEST_STATUS_WEIGHTS[status] > - REQUEST_STATUS_WEIGHTS[request.status], - })}` - ); - - request.status = status; - await request.save(); - } - - let requestStatusMetadata = RequestStatusMetadata.create({ - id: `${commitment}.${status}`, - requestId: commitment, - status, - chain, - timestamp: blockTimestamp, - blockNumber, - blockHash, - transactionHash, - }); - - await requestStatusMetadata.save(); - } else { - // Create new request and request status metadata - await this.findOrCreate({ - commitment, - chain, - body: undefined, - dest: undefined, - fee: undefined, - from: undefined, - nonce: undefined, - source: undefined, - timeoutTimestamp: undefined, - to: undefined, - blockNumber, - blockHash, - blockTimestamp, - status, - transactionHash, - }); - - logger.info( - `Created new request while attempting request update with details ${JSON.stringify( - { commitment, transactionHash, status } - )}` - ); - } - } - - /** - * Compute the request commitment - */ - static computeRequestCommitment( - source: string, - dest: string, - nonce: bigint, - timeoutTimestamp: bigint, - from: string, - to: string, - body: string - ): string { - let hash = solidityKeccak256( - ["bytes", "bytes", "uint64", "uint64", "bytes", "bytes", "bytes"], - [source, dest, nonce, timeoutTimestamp, from, to, body] - ); - return hash; - } -} diff --git a/indexers/src/services/response.service.ts b/indexers/src/services/response.service.ts deleted file mode 100644 index db3be2fb4..000000000 --- a/indexers/src/services/response.service.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { solidityKeccak256 } from "ethers/lib/utils"; -import { Request, Status, Response, ResponseStatusMetadata } from "../types"; - -export interface ICreateResponseArgs { - chain: string; - commitment: string; - response_message?: string | undefined; - responseTimeoutTimestamp?: bigint | undefined; - request?: Request | undefined; - status: Status; - blockNumber: string; - blockHash: string; - transactionHash: string; - blockTimestamp: bigint; -} - -export interface IUpdateResponseStatusArgs { - commitment: string; - status: Status; - blockNumber: string; - blockHash: string; - transactionHash: string; - blockTimestamp: bigint; - chain: string; -} - -const RESPONSE_STATUS_WEIGHTS = { - [Status.SOURCE]: 1, - [Status.MESSAGE_RELAYED]: 2, - [Status.DEST]: 3, - [Status.TIMED_OUT]: 4, -}; - -export class ResponseService { - /** - * Finds a response enitity and creates a new one if it doesn't exist - */ - static async findOrCreate(args: ICreateResponseArgs): Promise { - const { - chain, - commitment, - request, - response_message, - responseTimeoutTimestamp, - status, - blockNumber, - blockHash, - blockTimestamp, - transactionHash, - } = args; - let response = await Response.get(commitment); - - if (typeof response === "undefined") { - response = Response.create({ - id: commitment, - chain, - response_message, - requestId: request?.id, - status, - responseTimeoutTimestamp, - }); - - await response.save(); - - let responseStatusMetadata = ResponseStatusMetadata.create({ - id: `${commitment}.${status}`, - responseId: commitment, - status, - chain, - timestamp: blockTimestamp, - blockNumber, - blockHash, - transactionHash, - }); - - await responseStatusMetadata.save(); - } - - return response; - } - - /** - * Update the status of a response - * Also adds a new entry to the response status metadata - */ - static async updateStatus(args: IUpdateResponseStatusArgs): Promise { - const { - commitment, - blockNumber, - blockHash, - blockTimestamp, - status, - transactionHash, - chain, - } = args; - - let response = await Response.get(commitment); - - if (response) { - if ( - RESPONSE_STATUS_WEIGHTS[status] > - RESPONSE_STATUS_WEIGHTS[response.status] - ) { - response.status = status; - await response.save(); - } - - let responseStatusMetadata = ResponseStatusMetadata.create({ - id: `${commitment}.${status}`, - responseId: commitment, - status, - chain, - timestamp: blockTimestamp, - blockNumber, - blockHash, - transactionHash, - }); - - await responseStatusMetadata.save(); - } else { - await this.findOrCreate({ - chain, - commitment, - blockHash, - blockNumber, - blockTimestamp, - status, - transactionHash, - request: undefined, - responseTimeoutTimestamp: undefined, - response_message: undefined, - }); - - logger.error( - `Attempted to update status of non-existent response with commitment: ${commitment} in transaction: ${transactionHash}` - ); - - logger.info( - `Created new response while attempting response update with details: ${JSON.stringify( - { commitment, transactionHash, status } - )}` - ); - } - } - - static computeResponseCommitment( - source: string, - dest: string, - nonce: bigint, - timeoutTimestamp: bigint, - from: string, - to: string, - body: string, - response: string, - responseTimeoutTimestamp: bigint - ): string { - let hash = solidityKeccak256( - [ - "bytes", - "bytes", - "uint64", - "uint64", - "bytes", - "bytes", - "bytes", - "bytes", - "uint64", - ], - [ - source, - dest, - nonce, - timeoutTimestamp, - from, - to, - body, - response, - responseTimeoutTimestamp, - ] - ); - return hash; - } -} diff --git a/indexers/src/services/reward-points.service.ts b/indexers/src/services/reward-points.service.ts deleted file mode 100644 index dd390f7bf..000000000 --- a/indexers/src/services/reward-points.service.ts +++ /dev/null @@ -1,195 +0,0 @@ -import { - ProtocolParticipant, - RewardPoints, - RewardPointsActivityLog, - RewardPointsActivityType, -} from "../types"; -import { TokenGatewayService } from "./tokenGateway.service"; - -export interface IAssignRewardPointsForFulfilledRequestInput { - address: string; - chain: string; - amount: bigint; - earnerType: ProtocolParticipant; - asset_id: string; - contract_address: string; - transaction_hash: string; -} - -export interface IAssignRewardPointsToRelayerInput { - relayer_address: string; - chain: string; - is_success: boolean; - earnerType: ProtocolParticipant; - transaction_hash: string; -} - -export interface IAssignRewardPointsForAssetTransferInput { - address: string; - chain: string; - amount: bigint; - earnerType: ProtocolParticipant; - asset_id: string; - contract_address: string; - transaction_hash: string; -} - -const REWARD_POINTS_TO_RELAYER_ON_SUCCESSFUL_TRANSACTION = BigInt(10); -const REWARD_POINTS_TO_RELAYER_ON_FAILED_TRANSACTION = BigInt(1); - -export class RewardPointsService { - /** - * Assign a reward for fulfilled requests - * @param data - */ - static async assignRewardForFulfilledRequest( - data: IAssignRewardPointsForFulfilledRequestInput - ) { - const { - address, - chain, - amount, - earnerType, - asset_id, - contract_address, - transaction_hash, - } = data; - - const usdValue = await TokenGatewayService.getUsdValueOfAsset( - chain, - contract_address, - asset_id, - amount - ); - - let rewardPointRecord = await RewardPoints.get( - `${address}-${chain}-${earnerType}` - ); - - if (typeof rewardPointRecord === "undefined") { - rewardPointRecord = RewardPoints.create({ - id: `${address}-${chain}-${earnerType}`, - address, - chain, - earnerType, - points: usdValue, - }); - } else { - rewardPointRecord.points += usdValue; - } - - await rewardPointRecord.save(); - await RewardPointsActivityLog.create({ - id: `${address}-${earnerType}-${transaction_hash}`, - chain, - points: usdValue, - transactionHash: transaction_hash, - earnerAddress: address, - earnerType, - activityType: RewardPointsActivityType.REWARD_POINTS_EARNED, - description: "Reward points awarded for fulfilling a request", - createdAt: new Date(), - }).save(); - } - - /** - * Assign reward points to a relayer based on the success/failure of a transaction - * @param data - */ - static async assignRewardToRelayer(data: IAssignRewardPointsToRelayerInput) { - const { chain, relayer_address, is_success, earnerType, transaction_hash } = - data; - - let rewardPointRecord = await RewardPoints.get( - `${relayer_address}-${chain}-${earnerType}` - ); - - const points = is_success - ? REWARD_POINTS_TO_RELAYER_ON_SUCCESSFUL_TRANSACTION - : REWARD_POINTS_TO_RELAYER_ON_FAILED_TRANSACTION; - - if (typeof rewardPointRecord === "undefined") { - rewardPointRecord = RewardPoints.create({ - id: `${relayer_address}-${chain}-${earnerType}`, - address: relayer_address, - chain, - earnerType, - points, - }); - } else { - rewardPointRecord.points += points; - } - - await rewardPointRecord.save(); - - const description = is_success - ? "Reward points earned for successfully relaying a message" - : "Reward points earned for failed relaying of a message"; - await RewardPointsActivityLog.create({ - id: `${relayer_address}-${earnerType}-${transaction_hash}`, - chain, - points, - transactionHash: transaction_hash, - earnerAddress: relayer_address, - earnerType, - activityType: RewardPointsActivityType.REWARD_POINTS_EARNED, - description, - createdAt: new Date(), - }).save(); - } - - /** - * Assign rewards for asset transfer - * @param data - */ - static async assignRewardForAssetTransfer( - data: IAssignRewardPointsForAssetTransferInput - ) { - const { - address, - chain, - amount, - earnerType, - asset_id, - contract_address, - transaction_hash, - } = data; - - const usdValue = await TokenGatewayService.getUsdValueOfAsset( - chain, - contract_address, - asset_id, - amount - ); - - let rewardPointRecord = await RewardPoints.get( - `${address}-${chain}-${earnerType}` - ); - - if (typeof rewardPointRecord === "undefined") { - rewardPointRecord = RewardPoints.create({ - id: `${address}-${chain}-${earnerType}`, - address, - chain, - earnerType, - points: usdValue, - }); - } else { - rewardPointRecord.points += usdValue; - } - - await rewardPointRecord.save(); - - await RewardPointsActivityLog.create({ - id: `${address}-${earnerType}-${transaction_hash}`, - chain, - points: usdValue, - transactionHash: transaction_hash, - earnerAddress: address, - earnerType, - activityType: RewardPointsActivityType.REWARD_POINTS_EARNED, - description: "Rewards points earned for asset transfer", - createdAt: new Date(), - }).save(); - } -} diff --git a/indexers/src/services/stateMachine.service.ts b/indexers/src/services/stateMachine.service.ts deleted file mode 100644 index f3c0e0c50..000000000 --- a/indexers/src/services/stateMachine.service.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { StateMachineUpdateEvent } from "../types"; -import { IEvmHostEventArgs } from "./evmHostEvents.service"; - -// Arguments to functions that create StateMachineUpdated events -export interface ICreateStateMachineUpdatedEventArgs extends IEvmHostEventArgs { - stateMachineId: string; - height: number; -} - -export class StateMachineService { - /** - * Create a new Evm Host StateMachineUpdated event entity - */ - static async createEvmStateMachineUpdatedEvent( - args: ICreateStateMachineUpdatedEventArgs, - chain: string - ): Promise { - const { - blockHash, - blockNumber, - transactionHash, - transactionIndex, - timestamp, - stateMachineId, - height, - } = args; - - const event = StateMachineUpdateEvent.create({ - id: `${chain}_${transactionHash}_${stateMachineId}_${height}`, - stateMachineId, - height, - chain, - transactionHash, - transactionIndex: BigInt(transactionIndex), - blockHash, - blockNumber: BigInt(blockNumber), - createdAt: new Date(timestamp * 1000), - }); - - await event.save(); - } - - /** - * Create a new Hyperbridge StateMachineUpdated event entity - */ - static async createHyperbridgeStateMachineUpdatedEvent( - args: ICreateStateMachineUpdatedEventArgs, - chain: string - ): Promise { - const { - blockHash, - blockNumber, - transactionHash, - transactionIndex, - timestamp, - stateMachineId, - height, - } = args; - - const event = StateMachineUpdateEvent.create({ - id: `${stateMachineId}-${transactionHash}-${height}`, - stateMachineId, - height, - chain, - transactionHash, - transactionIndex: BigInt(transactionIndex), - blockHash, - blockNumber: BigInt(blockNumber), - createdAt: new Date(timestamp * 1000), - }); - - await event.save(); - } -} diff --git a/indexers/src/services/tokenGateway.service.ts b/indexers/src/services/tokenGateway.service.ts deleted file mode 100644 index dcebf5597..000000000 --- a/indexers/src/services/tokenGateway.service.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { SUPPORTED_ASSETS_CONTRACT_ADDRESSES } from "../constants"; -import { TokenGatewayAbi__factory } from "../types/contracts"; -import PriceHelper from "../utils/price.helpers"; - -export interface IAssetDetails { - erc20_address: string; - erc6160_address: string; - is_erc20: boolean; - is_erc6160: boolean; -} - -export class TokenGatewayService { - /** - * Get asset details - */ - static async getAssetDetails( - contract_address: string, - asset_id: string - ): Promise { - const tokenGatewayContract = TokenGatewayAbi__factory.connect( - contract_address, - api - ); - - const erc20Address = await tokenGatewayContract.erc20(asset_id); - const erc6160Address = await tokenGatewayContract.erc6160(asset_id); - - return { - erc20_address: erc20Address, - erc6160_address: erc6160Address, - is_erc20: erc20Address !== null && erc20Address.trim().length > 0, - is_erc6160: erc6160Address !== null && erc6160Address.trim().length > 0, - }; - } - - /** - * Get the USD value of an asset transfer on TokenGateway - */ - static async getUsdValueOfAsset( - chain: string, - contract_address: string, - asset_id: string, - amount: bigint - ): Promise { - const assetDetails = await TokenGatewayService.getAssetDetails( - contract_address, - asset_id - ); - - const assetsSupportedForChain = SUPPORTED_ASSETS_CONTRACT_ADDRESSES[chain]; - - // Ensure we have a list of supported assets for the chain - if ((assetsSupportedForChain?.length ?? 0) === 0) { - logger.info(`Could not get supported assets for chain ${chain}`); - return BigInt(0); - } - - const priceFeedDetails = assetsSupportedForChain.find( - (asset) => - asset.address.toLowerCase() == assetDetails.erc20_address.toLowerCase() - ); - - if (typeof priceFeedDetails == "undefined") { - logger.info( - `Could not get asset contract address price feed details on chain ${chain} for asset with assetID ${asset_id}` - ); - return BigInt(0); - } - - const priceInUsd = await PriceHelper.getTokenPriceInUsd(priceFeedDetails); - return BigInt(priceInUsd * amount); - } -} diff --git a/indexers/src/services/transfer.service.ts b/indexers/src/services/transfer.service.ts deleted file mode 100644 index f8cd62ecc..000000000 --- a/indexers/src/services/transfer.service.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { BigNumber } from "ethers"; -import { Transfer } from "../types/models"; - -// Argument for storing transfer events -export interface IStoreTranferArgs { - from: string; - to: string; - value: BigNumber; - transactionHash: string; - chain: string; -} - -export class TransferService { - /** - * Increment the number of post requests handled by a relayer - */ - static async storeTransfer(arg: IStoreTranferArgs): Promise { - const { from, to, value, transactionHash, chain } = arg; - let transfer = Transfer.create({ - id: transactionHash, - amount: BigInt(value.toString()), - from, - to, - chain, - }); - - await transfer.save(); - return transfer; - } -} diff --git a/indexers/src/test/events/erc6160ext20/transfer.event.handler.test.ts b/indexers/src/test/events/erc6160ext20/transfer.event.handler.test.ts deleted file mode 100644 index a587e4872..000000000 --- a/indexers/src/test/events/erc6160ext20/transfer.event.handler.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { subqlTest } from "@subql/testing"; -import { Relayer, Transfer } from "../../../types"; - -const existingEntities = [ - Relayer.create({ - id: "0xbC50b90751bfCccbFa4c7220261909d0f528b00f", - }), -]; - -subqlTest( - "transferEventHandler correctly computes totalTransfersIn & feesPayedOutToRelayers", - 5854079, - existingEntities, - [ - Transfer.create({ - id: "0xbf94293f2dbd11e71510d9add4338d5f362a67c69df6055c1c4c9bc965ac1f31", - chain: "EVM-11155111", - amount: BigInt("24000000000000000000000"), - from: "0x92F217a5e965EAa2aD356678D537A0A9ccC0AF41", - to: "0xbC50b90751bfCccbFa4c7220261909d0f528b00f", - }), - ], - "handleTransferEvent" -); diff --git a/indexers/src/utils/enum.helpers.ts b/indexers/src/utils/enum.helpers.ts deleted file mode 100644 index 8d0431e11..000000000 --- a/indexers/src/utils/enum.helpers.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Convert a postgres formatted enumList to an Array - * @example "{SEPOLIA, BSC}" => ['SEPOLIA', 'BSC'] - * @see https://stackoverflow.com/questions/18234946/postgresql-insert-into-an-array-of-enums - */ -export const convertEnumListStringToArray = ( - enumListString: string, -): Array => { - // Remove the wrapping brackets, e.g. {SEPOLIA, BSC} ==> SEPOLIA, BSC - if ( - ["{", "["].includes(enumListString[0]) && - ["}", "]"].includes(enumListString[enumListString.length - 1]) - ) { - enumListString = enumListString.substring(1, enumListString.length - 1); - } - - let enumList = enumListString.split(","); - return enumList.map((item) => item.trim()); -}; - -/** - * Convert an array to a postgres formatted enumList - * @example "[SEPOLIA, BSC]" => {'SEPOLIA', 'BSC'} - * @see https://stackoverflow.com/questions/18234946/postgresql-insert-into-an-array-of-enums - */ -export const convertArrayToEnumListString = ( - enumsArray: Array, -): string => { - const enumListString = enumsArray.join(","); - return `{${enumListString}}`; -}; diff --git a/indexers/src/utils/price.helpers.ts b/indexers/src/utils/price.helpers.ts deleted file mode 100644 index 40ff9b7ab..000000000 --- a/indexers/src/utils/price.helpers.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { CHAINLINK_PRICE_FEED_CONTRACT_ADDRESSES } from "../addresses/chainlink-price-feeds.addresses"; -import { ITokenPriceFeedDetails } from "../constants"; -import { ChainLinkAggregatorV3Abi__factory } from "../types/contracts"; - -export default class PriceHelper { - static async getNativeCurrencyPrice(stateMachineId: string): Promise { - const priceFeedAddress = - CHAINLINK_PRICE_FEED_CONTRACT_ADDRESSES[stateMachineId]; - - if (!priceFeedAddress) { - throw new Error( - `Price feed address not found for state machine id: ${stateMachineId}` - ); - } - - const priceFeedContract = ChainLinkAggregatorV3Abi__factory.connect( - priceFeedAddress, - api - ); - - const roundData = await priceFeedContract.latestRoundData(); - const decimals = await priceFeedContract.decimals(); - let exponent = 18 - decimals; - - // Ensure we convert to the standard 18 decimals used by erc20. - return roundData.answer.toBigInt() * BigInt(10 ** exponent); - } - - /** - * Get the current price IN USD for an ERC20 token given it's contract address - */ - static async getTokenPriceInUsd( - priceFeedDetails: ITokenPriceFeedDetails - ): Promise { - const priceFeedContract = ChainLinkAggregatorV3Abi__factory.connect( - priceFeedDetails.chain_link_price_feed, - api - ); - - const roundData = await priceFeedContract.latestRoundData(); - const decimals = await priceFeedContract.decimals(); - let exponent = 18 - decimals; - - // Ensure we convert to the standard 18 decimals used by erc20. - return roundData.answer.toBigInt() * BigInt(10 ** exponent); - } -} diff --git a/indexers/src/utils/stateMachine.helpers.ts b/indexers/src/utils/stateMachine.helpers.ts deleted file mode 100644 index 4ae058a92..000000000 --- a/indexers/src/utils/stateMachine.helpers.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { EthereumTransaction, EthereumResult } from "@subql/types-ethereum"; -import { isHexString } from "ethers/lib/utils"; - -export default class StateMachineHelpers { - /** - * Get a state machine ID from an EVM transaction - */ - static getEvmStateMachineIdFromTransaction( - transaction: EthereumTransaction - ): string { - let chainId = transaction.chainId ? transaction.chainId.toString() : null; - - if (chainId === null) { - logger.info( - `Encountered null stateMachineId for transaction with hash: ${transaction.hash}` - ); - throw new Error("stateMachineId is null"); - } - - if (isHexString(chainId)) { - chainId = parseInt(chainId, 16).toString(); - } - - return `EVM-${chainId}`; - } -} diff --git a/indexers/src/utils/substrate.helpers.ts b/indexers/src/utils/substrate.helpers.ts deleted file mode 100644 index 82738fec1..000000000 --- a/indexers/src/utils/substrate.helpers.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Get the StateMachineID parsing the stringified object which substrate provides - */ -export const extractStateMachineIdFromSubstrateEventData = ( - substrateStateMachineId: string -): string | undefined => { - try { - const stateMachineId = JSON.parse(substrateStateMachineId); - if (stateMachineId && stateMachineId.stateId) { - const stateId = stateMachineId.stateId; - let main_key = ""; - let value = ""; - - // There will only be one key in the object - Object.keys(stateId).forEach((key) => { - main_key = key.toUpperCase(); - value = stateId[key] === null ? "" : stateId[key]; - }); - - switch (main_key) { - case "EVM": - return "EVM-".concat(value); - case "POLKADOT": - return "POLKADOT-".concat(value); - case "KUSAMA": - return "KUSAMA-".concat(value); - case "BEEFY": - return "BEEFY-".concat(value); - case "GRANDPA": - return "GRANDPA-".concat(value); - default: - throw new Error( - `Unknown state machine ID ${main_key} encountered in extractStateMachineIdFromSubstrateEventData` - ); - } - } else { - throw new Error( - `StateId not present in stateMachineId: ${substrateStateMachineId}` - ); - } - } catch (error) { - logger.error(error); - } -}; diff --git a/indexers/subquery-multichain.yaml b/indexers/subquery-multichain.yaml deleted file mode 100644 index 2710077c4..000000000 --- a/indexers/subquery-multichain.yaml +++ /dev/null @@ -1,11 +0,0 @@ -specVersion: 1.0.0 -query: - name: '@subql/query' - version: '*' -projects: - - ethereum-sepolia.yaml - - optimism-sepolia.yaml - - base-sepolia.yaml - - arbitrum-sepolia.yaml - - bsc-chapel.yaml - - hyperbridge-gargantua.yaml diff --git a/indexers/tsconfig.json b/indexers/tsconfig.json deleted file mode 100644 index 90e06e251..000000000 --- a/indexers/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "esModuleInterop": true, - "declaration": true, - "importHelpers": true, - "resolveJsonModule": true, - "module": "commonjs", - "outDir": "dist", - "rootDir": "src", - "target": "es2017", - "strict": true - }, - "include": [ - "src/**/*", - "node_modules/@subql/types-core/dist/global.d.ts", - "node_modules/@subql/types-ethereum/dist/global.d.ts" - ] -} diff --git a/modules/consensus/sync-committee/prover/src/lib.rs b/modules/consensus/sync-committee/prover/src/lib.rs index 1ecf7a91c..8d4a23729 100644 --- a/modules/consensus/sync-committee/prover/src/lib.rs +++ b/modules/consensus/sync-committee/prover/src/lib.rs @@ -251,8 +251,8 @@ impl SyncCommitteeProver, ) -> Result, anyhow::Error> { - if finality_checkpoint.root == Node::default() - || client_state.latest_finalized_epoch >= finality_checkpoint.epoch + if finality_checkpoint.root == Node::default() || + client_state.latest_finalized_epoch >= finality_checkpoint.epoch { trace!(target: "sync-committee-prover", "No new epoch finalized yet {}", finality_checkpoint.epoch); return Ok(None); @@ -287,9 +287,9 @@ impl SyncCommitteeProver(block.slot); - if num_signatures >= min_signatures - && (state_period..=state_period + 1).contains(&signature_period) - && parent_block_finality_checkpoint.epoch > client_state.latest_finalized_epoch + if num_signatures >= min_signatures && + (state_period..=state_period + 1).contains(&signature_period) && + parent_block_finality_checkpoint.epoch > client_state.latest_finalized_epoch { break; } @@ -354,10 +354,10 @@ impl SyncCommitteeProver Result { trace!(target: "sync-committee-prover", "latest_update_for_period {period}"); - let mut higest_slot_in_epoch = ((period * C::EPOCHS_PER_SYNC_COMMITTEE_PERIOD) - * C::SLOTS_PER_EPOCH) - + (C::EPOCHS_PER_SYNC_COMMITTEE_PERIOD * C::SLOTS_PER_EPOCH) - - 1; + let mut higest_slot_in_epoch = ((period * C::EPOCHS_PER_SYNC_COMMITTEE_PERIOD) * + C::SLOTS_PER_EPOCH) + + (C::EPOCHS_PER_SYNC_COMMITTEE_PERIOD * C::SLOTS_PER_EPOCH) - + 1; let mut count = 0; // Some slots are empty so we'll use a loop to fetch the highest available slot in an epoch let mut block = loop { @@ -494,8 +494,8 @@ pub fn prove_block_roots_proof( let epoch_for_header = compute_epoch_at_slot::(header.slot) as usize; let epoch_for_state = compute_epoch_at_slot::(state.slot) as usize; - if epoch_for_state.saturating_sub(epoch_for_header) - >= SLOTS_PER_HISTORICAL_ROOT / C::SLOTS_PER_EPOCH as usize + if epoch_for_state.saturating_sub(epoch_for_header) >= + SLOTS_PER_HISTORICAL_ROOT / C::SLOTS_PER_EPOCH as usize { // todo: Historical root proofs unimplemented!() diff --git a/modules/ismp/clients/grandpa/Cargo.toml b/modules/ismp/clients/grandpa/Cargo.toml index 3a33ef767..903955ca4 100644 --- a/modules/ismp/clients/grandpa/Cargo.toml +++ b/modules/ismp/clients/grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ismp-grandpa" -version = "1.15.3" +version = "1.15.4" edition = "2021" authors = ["Polytope Labs "] license = "Apache-2.0" @@ -70,4 +70,4 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-ismp/runtime-benchmarks", -] \ No newline at end of file +] diff --git a/modules/ismp/clients/grandpa/src/benchmarking.rs b/modules/ismp/clients/grandpa/src/benchmarking.rs index 4c9765f3a..b526dd1be 100644 --- a/modules/ismp/clients/grandpa/src/benchmarking.rs +++ b/modules/ismp/clients/grandpa/src/benchmarking.rs @@ -1,83 +1,88 @@ -#![cfg(feature = "runtime-benchmarks")] +// Copyright (c) 2024 Polytope Labs. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific lang + +//! Benchmarks for the ISMP GRANDPA pallet operations + use super::*; use frame_benchmarking::v2::*; -use frame_support::pallet_prelude::Weight; use frame_system::RawOrigin; use sp_std::prelude::*; -/// Benchmarks for the ISMP GRANDPA pallet operations #[benchmarks] mod benchmarks { - use super::*; + use super::*; - /// Benchmark for add_state_machines extrinsic - /// The benchmark creates n state machines and measures the time to add them - /// to the whitelist. - /// - /// Parameters: - /// - `n`: Number of state machines to add in a single call - #[benchmark] - fn add_state_machines(n: Linear<1, 100>) -> Result<(), BenchmarkError> { - let caller: T::AccountId = whitelisted_caller(); - - let state_machines: Vec = (0..n) - .map(|i| { - let id = [i as u8, 0, 0, 0]; // Create unique 4-byte identifier - AddStateMachine { - state_machine: StateMachine::Substrate(id), - slot_duration: 6000u64, - } - }) - .collect(); + /// Benchmark for add_state_machines extrinsic + /// The benchmark creates n state machines and measures the time to add them + /// to the whitelist. + /// + /// Parameters: + /// - `n`: Number of state machines to add in a single call + #[benchmark] + fn add_state_machines(n: Linear<1, 100>) -> Result<(), BenchmarkError> { + let state_machines: Vec = (0..n) + .map(|i| { + let id = [i as u8, 0, 0, 0]; // Create unique 4-byte identifier + AddStateMachine { + state_machine: StateMachine::Substrate(id), + slot_duration: 6000u64, + } + }) + .collect(); - #[extrinsic_call] - _(RawOrigin::Root, state_machines); + #[extrinsic_call] + _(RawOrigin::Root, state_machines); - // Verify operation was successful - assert!(SupportedStateMachines::::iter().count() == n as usize); - Ok(()) - } + // Verify operation was successful + assert!(SupportedStateMachines::::iter().count() == n as usize); + Ok(()) + } - /// Benchmark for remove_state_machines extrinsic - /// The benchmark first adds n state machines, then measures the time to remove them - /// from the whitelist. - /// - /// Parameters: - /// - `n`: Number of state machines to remove in a single call - #[benchmark] - fn remove_state_machines(n: Linear<1, 100>) -> Result<(), BenchmarkError> { - let caller: T::AccountId = whitelisted_caller(); - - // Setup: First add state machines that we'll remove - let setup_machines: Vec = (0..n) - .map(|i| { - let id = [i as u8, 0, 0, 0]; // Create unique 4-byte identifier - AddStateMachine { - state_machine: StateMachine::Substrate(id), - slot_duration: 6000u64, - } - }) - .collect(); + /// Benchmark for remove_state_machines extrinsic + /// The benchmark first adds n state machines, then measures the time to remove them + /// from the whitelist. + /// + /// Parameters: + /// - `n`: Number of state machines to remove in a single call + #[benchmark] + fn remove_state_machines(n: Linear<1, 100>) -> Result<(), BenchmarkError> { + // Setup: First add state machines that we'll remove + let setup_machines: Vec = (0..n) + .map(|i| { + let id = [i as u8, 0, 0, 0]; // Create unique 4-byte identifier + AddStateMachine { + state_machine: StateMachine::Substrate(id), + slot_duration: 6000u64, + } + }) + .collect(); - // Add the machines using root origin - Pallet::::add_state_machines( - RawOrigin::Root.into(), - setup_machines.clone(), - )?; + // Add the machines using root origin + Pallet::::add_state_machines(RawOrigin::Root.into(), setup_machines.clone())?; - // Create removal list - let remove_machines: Vec = - setup_machines.into_iter().map(|m| m.state_machine).collect(); + // Create removal list + let remove_machines: Vec = + setup_machines.into_iter().map(|m| m.state_machine).collect(); - // Verify initial state - assert!(SupportedStateMachines::::iter().count() == n as usize); + // Verify initial state + assert!(SupportedStateMachines::::iter().count() == n as usize); - #[extrinsic_call] - _(RawOrigin::Root, remove_machines); + #[extrinsic_call] + _(RawOrigin::Root, remove_machines); - // Verify all machines were removed - assert!(SupportedStateMachines::::iter().count() == 0); - Ok(()) - } + // Verify all machines were removed + assert!(SupportedStateMachines::::iter().count() == 0); + Ok(()) + } } - diff --git a/modules/ismp/clients/grandpa/src/lib.rs b/modules/ismp/clients/grandpa/src/lib.rs index a2c1cca9e..fe65c8e75 100644 --- a/modules/ismp/clients/grandpa/src/lib.rs +++ b/modules/ismp/clients/grandpa/src/lib.rs @@ -20,25 +20,25 @@ pub mod benchmarking; pub mod consensus; pub mod messages; +pub mod weights; -use alloc::vec::Vec; -use frame_support::pallet_prelude::Weight; use ismp::host::StateMachine; pub use pallet::*; -pub trait WeightInfo { - /// Weight for adding state machines, scaled by the number of machines - /// * n: The number of machines being added - fn add_state_machines(n: u32) -> Weight; - - /// Weight for removing state machines, scaled by the number of machines - /// * n: The number of machines being removed - fn remove_state_machines(n: u32) -> Weight; +pub use weights::WeightInfo; + +/// Update the state machine whitelist +#[derive(Clone, codec::Encode, codec::Decode, scale_info::TypeInfo, Debug, PartialEq, Eq)] +pub struct AddStateMachine { + /// State machine to add + pub state_machine: StateMachine, + /// It's slot duration + pub slot_duration: u64, } -pub mod weights; #[frame_support::pallet] pub mod pallet { use super::*; + use alloc::vec::Vec; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; use ismp::host::IsmpHost; @@ -55,6 +55,8 @@ pub mod pallet { /// IsmpHost implementation type IsmpHost: IsmpHost + Default; + + /// Weight information for dispatchable extrinsics type WeightInfo: WeightInfo; } @@ -121,12 +123,3 @@ pub mod pallet { } } } - -/// Update the state machine whitelist -#[derive(Clone, codec::Encode, codec::Decode, scale_info::TypeInfo, Debug, PartialEq, Eq)] -pub struct AddStateMachine { - /// State machine to add - pub state_machine: StateMachine, - /// It's slot duration - pub slot_duration: u64, -} diff --git a/modules/ismp/clients/grandpa/src/messages.rs b/modules/ismp/clients/grandpa/src/messages.rs index 33ff5a586..fcb106ac1 100644 --- a/modules/ismp/clients/grandpa/src/messages.rs +++ b/modules/ismp/clients/grandpa/src/messages.rs @@ -11,6 +11,7 @@ // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific lang + use alloc::collections::BTreeMap; use codec::{Decode, Encode}; use grandpa_verifier_primitives::{FinalityProof, ParachainHeaderProofs}; diff --git a/modules/ismp/clients/grandpa/src/weights.rs b/modules/ismp/clients/grandpa/src/weights.rs index c5a7564f6..2f411470d 100644 --- a/modules/ismp/clients/grandpa/src/weights.rs +++ b/modules/ismp/clients/grandpa/src/weights.rs @@ -13,37 +13,15 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weights for ismp_grandpa -pub struct WeightInfo(PhantomData); - -/// Weight functions for ismp-parachain pallet extrinsics. -impl crate::WeightInfo for WeightInfo { - /// Weight for adding state machines, scaled by the number of machines. - /// Values based on measured benchmarks: - /// - Base Weight: 5.525 µs - /// - Additional Weight per item: 1.458 µs - /// - DB Weight: n writes - fn add_state_machines(n: u32) -> Weight { - Weight::from_parts(5_525, 0) - .saturating_add(Weight::from_parts(1_458, 0).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().writes(n as u64)) - } - - /// Weight for removing state machines, scaled by the number of machines. - /// Values based on measured benchmarks: - /// - Base Weight: 4.914 µs - /// - Additional Weight per item: 1.419 µs - /// - DB Weight: n writes - fn remove_state_machines(n: u32) -> Weight { - Weight::from_parts(4_914, 0) - .saturating_add(Weight::from_parts(1_419, 0).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().writes(n as u64)) - } -} \ No newline at end of file +use frame_support::weights::Weight; + +/// The weight information provider trait for dispatchable extrinsics +pub trait WeightInfo { + /// Weight for adding state machines, scaled by the number of machines + /// * n: The number of machines being added + fn add_state_machines(n: u32) -> Weight; + + /// Weight for removing state machines, scaled by the number of machines + /// * n: The number of machines being removed + fn remove_state_machines(n: u32) -> Weight; +} diff --git a/parachain/runtimes/gargantua/src/ismp.rs b/parachain/runtimes/gargantua/src/ismp.rs index ffe1a49c5..e2dc15c15 100644 --- a/parachain/runtimes/gargantua/src/ismp.rs +++ b/parachain/runtimes/gargantua/src/ismp.rs @@ -74,7 +74,6 @@ impl pallet_state_coprocessor::Config for Runtime { type Mmr = Mmr; } - pub struct Coprocessor; impl Get> for Coprocessor { @@ -108,9 +107,9 @@ impl pallet_ismp::Config for Runtime { } impl ismp_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type IsmpHost = pallet_ismp::Pallet; - type WeightInfo = ismp_grandpa::weights::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type IsmpHost = pallet_ismp::Pallet; + type WeightInfo = weights::ismp_grandpa::WeightInfo; } impl pallet_token_governor::Config for Runtime { diff --git a/parachain/runtimes/gargantua/src/lib.rs b/parachain/runtimes/gargantua/src/lib.rs index 70a534dd5..5821a2022 100644 --- a/parachain/runtimes/gargantua/src/lib.rs +++ b/parachain/runtimes/gargantua/src/lib.rs @@ -13,6 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(non_local_definitions)] #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] diff --git a/parachain/runtimes/gargantua/src/weights/cumulus_pallet_parachain_system.rs b/parachain/runtimes/gargantua/src/weights/cumulus_pallet_parachain_system.rs index 5564caee7..31ce95794 100644 --- a/parachain/runtimes/gargantua/src/weights/cumulus_pallet_parachain_system.rs +++ b/parachain/runtimes/gargantua/src/weights/cumulus_pallet_parachain_system.rs @@ -1,28 +1,24 @@ //! Autogenerated weights for `cumulus_pallet_parachain_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=gargantua-2000 // --wasm-execution=compiled -// --pallet -// cumulus_pallet_parachain_system -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/cumulus_pallet_parachain_system.rs +// --pallet=cumulus_pallet_parachain_system +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/cumulus_pallet_parachain_system.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,13 +44,13 @@ impl cumulus_pallet_parachain_system::WeightInfo for We /// The range of component `n` is `[0, 1000]`. fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `82` + // Measured: `0` // Estimated: `3517` - // Minimum execution time: 2_625_000 picoseconds. - Weight::from_parts(2_715_000, 0) + // Minimum execution time: 841_000 picoseconds. + Weight::from_parts(891_000, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 218_839 - .saturating_add(Weight::from_parts(151_755_118, 0).saturating_mul(n.into())) + // Standard Error: 219_702 + .saturating_add(Weight::from_parts(141_674_793, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/parachain/runtimes/gargantua/src/weights/cumulus_pallet_xcmp_queue.rs b/parachain/runtimes/gargantua/src/weights/cumulus_pallet_xcmp_queue.rs index 52e4c5658..7bd6412e0 100644 --- a/parachain/runtimes/gargantua/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachain/runtimes/gargantua/src/weights/cumulus_pallet_xcmp_queue.rs @@ -1,28 +1,24 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=gargantua-2000 // --wasm-execution=compiled -// --pallet -// cumulus_pallet_xcmp_queue -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/cumulus_pallet_xcmp_queue.rs +// --pallet=cumulus_pallet_xcmp_queue +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/cumulus_pallet_xcmp_queue.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -36,58 +32,58 @@ use core::marker::PhantomData; pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) - /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) fn set_config_with_u32() -> Weight { // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `1527` - // Minimum execution time: 5_200_000 picoseconds. - Weight::from_parts(5_470_000, 0) - .saturating_add(Weight::from_parts(0, 1527)) + // Measured: `0` + // Estimated: `1497` + // Minimum execution time: 3_106_000 picoseconds. + Weight::from_parts(3_216_000, 0) + .saturating_add(Weight::from_parts(0, 1497)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) - /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) - /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::Pages` (r:0 w:1) /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn enqueue_xcmp_message() -> Weight { // Proof Size summary in bytes: - // Measured: `48` - // Estimated: `3517` - // Minimum execution time: 13_897_000 picoseconds. - Weight::from_parts(14_237_000, 0) - .saturating_add(Weight::from_parts(0, 3517)) + // Measured: `0` + // Estimated: `5487` + // Minimum execution time: 11_502_000 picoseconds. + Weight::from_parts(11_713_000, 0) + .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) fn suspend_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `1527` - // Minimum execution time: 2_975_000 picoseconds. - Weight::from_parts(3_216_000, 0) - .saturating_add(Weight::from_parts(0, 1527)) + // Measured: `0` + // Estimated: `2767` + // Minimum execution time: 1_183_000 picoseconds. + Weight::from_parts(1_283_000, 0) + .saturating_add(Weight::from_parts(0, 2767)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) fn resume_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `77` - // Estimated: `1562` - // Minimum execution time: 4_148_000 picoseconds. - Weight::from_parts(4_358_000, 0) - .saturating_add(Weight::from_parts(0, 1562)) + // Measured: `15` + // Estimated: `2767` + // Minimum execution time: 2_374_000 picoseconds. + Weight::from_parts(2_454_000, 0) + .saturating_add(Weight::from_parts(0, 2767)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -95,8 +91,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 61_817_000 picoseconds. - Weight::from_parts(62_087_000, 0) + // Minimum execution time: 8_847_000 picoseconds. + Weight::from_parts(9_047_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) @@ -108,18 +104,18 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) - /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) - /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::Pages` (r:0 w:1) /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn on_idle_good_msg() -> Weight { // Proof Size summary in bytes: - // Measured: `65677` - // Estimated: `69142` - // Minimum execution time: 92_365_000 picoseconds. - Weight::from_parts(93_217_000, 0) - .saturating_add(Weight::from_parts(0, 69142)) + // Measured: `65612` + // Estimated: `69077` + // Minimum execution time: 86_534_000 picoseconds. + Weight::from_parts(87_236_000, 0) + .saturating_add(Weight::from_parts(0, 69077)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -129,11 +125,11 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) fn on_idle_large_msg() -> Weight { // Proof Size summary in bytes: - // Measured: `65676` - // Estimated: `69141` - // Minimum execution time: 45_676_000 picoseconds. - Weight::from_parts(46_047_000, 0) - .saturating_add(Weight::from_parts(0, 69141)) + // Measured: `65617` + // Estimated: `69082` + // Minimum execution time: 42_020_000 picoseconds. + Weight::from_parts(42_841_000, 0) + .saturating_add(Weight::from_parts(0, 69082)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachain/runtimes/gargantua/src/weights/frame_system.rs b/parachain/runtimes/gargantua/src/weights/frame_system.rs index 2889da268..e0c88b974 100644 --- a/parachain/runtimes/gargantua/src/weights/frame_system.rs +++ b/parachain/runtimes/gargantua/src/weights/frame_system.rs @@ -1,28 +1,24 @@ //! Autogenerated weights for `frame_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=gargantua-2000 // --wasm-execution=compiled -// --pallet -// frame_system -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/frame_system.rs +// --pallet=frame_system +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/frame_system.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -40,22 +36,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_425_000 picoseconds. - Weight::from_parts(2_505_000, 0) + // Minimum execution time: 1_883_000 picoseconds. + Weight::from_parts(1_974_000, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(243, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(250, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_142_000 picoseconds. - Weight::from_parts(6_262_000, 0) + // Minimum execution time: 5_701_000 picoseconds. + Weight::from_parts(5_891_000, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 5 - .saturating_add(Weight::from_parts(2_774, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_725, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -65,8 +61,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 4_158_000 picoseconds. - Weight::from_parts(4_368_000, 0) + // Minimum execution time: 3_356_000 picoseconds. + Weight::from_parts(3_577_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -85,11 +81,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `198` - // Estimated: `1683` - // Minimum execution time: 110_920_275_000 picoseconds. - Weight::from_parts(114_228_698_000, 0) - .saturating_add(Weight::from_parts(0, 1683)) + // Measured: `106` + // Estimated: `1591` + // Minimum execution time: 109_383_163_000 picoseconds. + Weight::from_parts(118_325_798_000, 0) + .saturating_add(Weight::from_parts(0, 1591)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -100,11 +96,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_455_000 picoseconds. - Weight::from_parts(2_625_000, 0) + // Minimum execution time: 1_764_000 picoseconds. + Weight::from_parts(1_994_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_835 - .saturating_add(Weight::from_parts(811_020, 0).saturating_mul(i.into())) + // Standard Error: 2_888 + .saturating_add(Weight::from_parts(713_328, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -114,11 +110,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_565_000 picoseconds. - Weight::from_parts(2_615_000, 0) + // Minimum execution time: 1_884_000 picoseconds. + Weight::from_parts(2_014_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 820 - .saturating_add(Weight::from_parts(567_399, 0).saturating_mul(i.into())) + // Standard Error: 1_546 + .saturating_add(Weight::from_parts(508_396, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -126,13 +122,13 @@ impl frame_system::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `51 + p * (69 ±0)` - // Estimated: `65 + p * (70 ±0)` - // Minimum execution time: 4_869_000 picoseconds. - Weight::from_parts(5_000_000, 0) - .saturating_add(Weight::from_parts(0, 65)) - // Standard Error: 2_782 - .saturating_add(Weight::from_parts(990_222, 0).saturating_mul(p.into())) + // Measured: `0 + p * (69 ±0)` + // Estimated: `0 + p * (70 ±0)` + // Minimum execution time: 2_845_000 picoseconds. + Weight::from_parts(2_966_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_164 + .saturating_add(Weight::from_parts(941_594, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) @@ -143,8 +139,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_995_000 picoseconds. - Weight::from_parts(9_268_000, 0) + // Minimum execution time: 6_853_000 picoseconds. + Weight::from_parts(7_574_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -164,11 +160,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn apply_authorized_upgrade() -> Weight { // Proof Size summary in bytes: - // Measured: `220` - // Estimated: `1705` - // Minimum execution time: 108_475_700_000 picoseconds. - Weight::from_parts(116_709_148_000, 0) - .saturating_add(Weight::from_parts(0, 1705)) + // Measured: `127` + // Estimated: `1612` + // Minimum execution time: 117_461_434_000 picoseconds. + Weight::from_parts(124_827_424_000, 0) + .saturating_add(Weight::from_parts(0, 1612)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachain/runtimes/gargantua/src/weights/ismp_grandpa.rs b/parachain/runtimes/gargantua/src/weights/ismp_grandpa.rs new file mode 100644 index 000000000..0dabc3ae7 --- /dev/null +++ b/parachain/runtimes/gargantua/src/weights/ismp_grandpa.rs @@ -0,0 +1,62 @@ + +//! Autogenerated weights for `ismp_grandpa` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// target/release/hyperbridge +// benchmark +// pallet +// --wasm-execution=compiled +// --pallet=ismp_grandpa +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/ismp_grandpa.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `ismp_grandpa`. +pub struct WeightInfo(PhantomData); +impl ismp_grandpa::WeightInfo for WeightInfo { + /// Storage: `IsmpGrandpa::SupportedStateMachines` (r:0 w:100) + /// Proof: `IsmpGrandpa::SupportedStateMachines` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[1, 100]`. + fn add_state_machines(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_913_000 picoseconds. + Weight::from_parts(7_832_568, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 7_710 + .saturating_add(Weight::from_parts(1_434_418, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } + /// Storage: `IsmpGrandpa::SupportedStateMachines` (r:0 w:100) + /// Proof: `IsmpGrandpa::SupportedStateMachines` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[1, 100]`. + fn remove_state_machines(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_204_000 picoseconds. + Weight::from_parts(5_126_127, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 8_195 + .saturating_add(Weight::from_parts(1_417_249, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } +} diff --git a/parachain/runtimes/gargantua/src/weights/mod.rs b/parachain/runtimes/gargantua/src/weights/mod.rs index 412e43227..c312fb487 100644 --- a/parachain/runtimes/gargantua/src/weights/mod.rs +++ b/parachain/runtimes/gargantua/src/weights/mod.rs @@ -26,6 +26,7 @@ pub mod rocksdb_weights; pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod frame_system; +pub mod ismp_grandpa; pub mod pallet_asset_rate; pub mod pallet_assets; pub mod pallet_balances; diff --git a/parachain/runtimes/gargantua/src/weights/pallet_assets.rs b/parachain/runtimes/gargantua/src/weights/pallet_assets.rs index d5bd74f8e..cc736bc28 100644 --- a/parachain/runtimes/gargantua/src/weights/pallet_assets.rs +++ b/parachain/runtimes/gargantua/src/weights/pallet_assets.rs @@ -1,28 +1,24 @@ //! Autogenerated weights for `pallet_assets` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=gargantua-2000 // --wasm-execution=compiled -// --pallet -// pallet_assets -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/pallet_assets.rs +// --pallet=pallet_assets +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/pallet_assets.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -36,476 +32,476 @@ use core::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) + /// Storage: `Assets::NextAssetId` (r:1 w:0) + /// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `254` - // Estimated: `4273` - // Minimum execution time: 30_928_000 picoseconds. - Weight::from_parts(31_569_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `52` + // Estimated: `3703` + // Minimum execution time: 24_817_000 picoseconds. + Weight::from_parts(25_408_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) + /// Storage: `Assets::NextAssetId` (r:1 w:0) + /// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn force_create() -> Weight { // Proof Size summary in bytes: - // Measured: `114` - // Estimated: `4273` - // Minimum execution time: 13_506_000 picoseconds. - Weight::from_parts(13_967_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `0` + // Estimated: `3703` + // Minimum execution time: 10_069_000 picoseconds. + Weight::from_parts(10_349_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn start_destroy() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 15_259_000 picoseconds. - Weight::from_parts(15_700_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `284` + // Estimated: `3703` + // Minimum execution time: 10_851_000 picoseconds. + Weight::from_parts(11_241_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:6 w:5) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:5 w:5) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `c` is `[0, 5]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `348 + c * (217 ±0)` - // Estimated: `4273 + c * (3207 ±0)` - // Minimum execution time: 19_767_000 picoseconds. - Weight::from_parts(21_579_751, 0) - .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 34_915 - .saturating_add(Weight::from_parts(13_820_372, 0).saturating_mul(c.into())) + // Measured: `251 + c * (187 ±0)` + // Estimated: `3703 + c * (2637 ±0)` + // Minimum execution time: 14_077_000 picoseconds. + Weight::from_parts(15_765_361, 0) + .saturating_add(Weight::from_parts(0, 3703)) + // Standard Error: 40_395 + .saturating_add(Weight::from_parts(10_597_122, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 3207).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2637).saturating_mul(c.into())) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:6 w:5) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 5]`. fn destroy_approvals(a: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `393 + a * (91 ±0)` - // Estimated: `4273 + a * (3221 ±0)` - // Minimum execution time: 20_519_000 picoseconds. - Weight::from_parts(23_364_796, 0) - .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 49_087 - .saturating_add(Weight::from_parts(15_999_656, 0).saturating_mul(a.into())) + // Measured: `491 + a * (92 ±0)` + // Estimated: `3703 + a * (2651 ±0)` + // Minimum execution time: 14_187_000 picoseconds. + Weight::from_parts(19_985_981, 0) + .saturating_add(Weight::from_parts(0, 3703)) + // Standard Error: 104_212 + .saturating_add(Weight::from_parts(14_777_247, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_parts(0, 3221).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 2651).saturating_mul(a.into())) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:0) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) fn finish_destroy() -> Weight { // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 15_570_000 picoseconds. - Weight::from_parts(17_794_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 10_330_000 picoseconds. + Weight::from_parts(10_790_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn mint() -> Weight { // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 25_148_000 picoseconds. - Weight::from_parts(28_424_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 21_311_000 picoseconds. + Weight::from_parts(21_872_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn burn() -> Weight { // Proof Size summary in bytes: - // Measured: `425` - // Estimated: `4273` - // Minimum execution time: 32_311_000 picoseconds. - Weight::from_parts(37_241_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `387` + // Estimated: `3703` + // Minimum execution time: 31_109_000 picoseconds. + Weight::from_parts(31_780_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `464` - // Estimated: `7404` - // Minimum execution time: 49_083_000 picoseconds. - Weight::from_parts(50_225_000, 0) - .saturating_add(Weight::from_parts(0, 7404)) + // Measured: `387` + // Estimated: `6264` + // Minimum execution time: 42_952_000 picoseconds. + Weight::from_parts(43_532_000, 0) + .saturating_add(Weight::from_parts(0, 6264)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `464` - // Estimated: `7404` - // Minimum execution time: 39_585_000 picoseconds. - Weight::from_parts(45_656_000, 0) - .saturating_add(Weight::from_parts(0, 7404)) + // Measured: `387` + // Estimated: `6264` + // Minimum execution time: 38_323_000 picoseconds. + Weight::from_parts(39_144_000, 0) + .saturating_add(Weight::from_parts(0, 6264)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `464` - // Estimated: `7404` - // Minimum execution time: 49_103_000 picoseconds. - Weight::from_parts(50_686_000, 0) - .saturating_add(Weight::from_parts(0, 7404)) + // Measured: `387` + // Estimated: `6264` + // Minimum execution time: 43_102_000 picoseconds. + Weight::from_parts(43_803_000, 0) + .saturating_add(Weight::from_parts(0, 6264)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn freeze() -> Weight { // Proof Size summary in bytes: - // Measured: `425` - // Estimated: `4273` - // Minimum execution time: 19_838_000 picoseconds. - Weight::from_parts(20_278_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `387` + // Estimated: `3703` + // Minimum execution time: 15_439_000 picoseconds. + Weight::from_parts(15_770_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn thaw() -> Weight { // Proof Size summary in bytes: - // Measured: `425` - // Estimated: `4273` - // Minimum execution time: 19_607_000 picoseconds. - Weight::from_parts(20_258_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `387` + // Estimated: `3703` + // Minimum execution time: 15_610_000 picoseconds. + Weight::from_parts(15_860_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn freeze_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 15_008_000 picoseconds. - Weight::from_parts(15_469_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `284` + // Estimated: `3703` + // Minimum execution time: 10_490_000 picoseconds. + Weight::from_parts(10_750_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn thaw_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 14_819_000 picoseconds. - Weight::from_parts(15_279_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `284` + // Estimated: `3703` + // Minimum execution time: 10_550_000 picoseconds. + Weight::from_parts(10_901_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:0) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) fn transfer_ownership() -> Weight { // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 17_603_000 picoseconds. - Weight::from_parts(18_105_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 12_023_000 picoseconds. + Weight::from_parts(12_344_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn set_team() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 14_527_000 picoseconds. - Weight::from_parts(14_888_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 9_899_000 picoseconds. + Weight::from_parts(10_269_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(n: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 32_060_000 picoseconds. - Weight::from_parts(33_116_432, 0) - .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 655 - .saturating_add(Weight::from_parts(2_914, 0).saturating_mul(n.into())) - // Standard Error: 655 - .saturating_add(Weight::from_parts(1_543, 0).saturating_mul(s.into())) + fn set_metadata(_n: u32, _s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 23_354_000 picoseconds. + Weight::from_parts(27_936_970, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) fn clear_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `481` - // Estimated: `4273` - // Minimum execution time: 32_632_000 picoseconds. - Weight::from_parts(33_142_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `444` + // Estimated: `3703` + // Minimum execution time: 23_755_000 picoseconds. + Weight::from_parts(24_396_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn force_set_metadata(n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `187` - // Estimated: `4273` - // Minimum execution time: 16_772_000 picoseconds. - Weight::from_parts(17_431_503, 0) - .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 371 - .saturating_add(Weight::from_parts(2_407, 0).saturating_mul(n.into())) - // Standard Error: 371 - .saturating_add(Weight::from_parts(2_157, 0).saturating_mul(s.into())) + // Measured: `84` + // Estimated: `3703` + // Minimum execution time: 9_668_000 picoseconds. + Weight::from_parts(10_103_682, 0) + .saturating_add(Weight::from_parts(0, 3703)) + // Standard Error: 952 + .saturating_add(Weight::from_parts(5_363, 0).saturating_mul(n.into())) + // Standard Error: 952 + .saturating_add(Weight::from_parts(1_787, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) fn force_clear_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `481` - // Estimated: `4273` - // Minimum execution time: 31_720_000 picoseconds. - Weight::from_parts(32_531_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `444` + // Estimated: `3703` + // Minimum execution time: 23_485_000 picoseconds. + Weight::from_parts(26_781_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn force_asset_status() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 13_957_000 picoseconds. - Weight::from_parts(14_378_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 8_586_000 picoseconds. + Weight::from_parts(8_857_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) fn approve_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 35_287_000 picoseconds. - Weight::from_parts(36_119_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `284` + // Estimated: `3703` + // Minimum execution time: 31_840_000 picoseconds. + Weight::from_parts(32_511_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `634` - // Estimated: `7404` - // Minimum execution time: 73_368_000 picoseconds. - Weight::from_parts(74_491_000, 0) - .saturating_add(Weight::from_parts(0, 7404)) + // Measured: `586` + // Estimated: `6264` + // Minimum execution time: 64_423_000 picoseconds. + Weight::from_parts(65_684_000, 0) + .saturating_add(Weight::from_parts(0, 6264)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) fn cancel_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `484` - // Estimated: `4273` - // Minimum execution time: 37_912_000 picoseconds. - Weight::from_parts(38_603_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `483` + // Estimated: `3703` + // Minimum execution time: 32_873_000 picoseconds. + Weight::from_parts(33_413_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) fn force_cancel_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `484` - // Estimated: `4273` - // Minimum execution time: 38_863_000 picoseconds. - Weight::from_parts(39_404_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `483` + // Estimated: `3703` + // Minimum execution time: 33_454_000 picoseconds. + Weight::from_parts(33_844_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn set_min_balance() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 15_028_000 picoseconds. - Weight::from_parts(15_730_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 10_039_000 picoseconds. + Weight::from_parts(11_252_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn touch() -> Weight { // Proof Size summary in bytes: - // Measured: `451` - // Estimated: `4273` - // Minimum execution time: 36_750_000 picoseconds. - Weight::from_parts(37_842_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `298` + // Estimated: `3703` + // Minimum execution time: 26_650_000 picoseconds. + Weight::from_parts(27_673_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn touch_other() -> Weight { // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 35_257_000 picoseconds. - Weight::from_parts(35_708_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 26_110_000 picoseconds. + Weight::from_parts(26_901_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn refund() -> Weight { // Proof Size summary in bytes: - // Measured: `546` - // Estimated: `4273` - // Minimum execution time: 34_846_000 picoseconds. - Weight::from_parts(35_498_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `457` + // Estimated: `3703` + // Minimum execution time: 25_769_000 picoseconds. + Weight::from_parts(26_220_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn refund_other() -> Weight { // Proof Size summary in bytes: - // Measured: `476` - // Estimated: `4273` - // Minimum execution time: 34_074_000 picoseconds. - Weight::from_parts(34_546_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `438` + // Estimated: `3703` + // Minimum execution time: 25_027_000 picoseconds. + Weight::from_parts(25_468_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn block() -> Weight { // Proof Size summary in bytes: - // Measured: `425` - // Estimated: `4273` - // Minimum execution time: 19_757_000 picoseconds. - Weight::from_parts(20_399_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `387` + // Estimated: `3703` + // Minimum execution time: 13_606_000 picoseconds. + Weight::from_parts(13_806_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachain/runtimes/gargantua/src/weights/pallet_balances.rs b/parachain/runtimes/gargantua/src/weights/pallet_balances.rs index 242067108..053e13f68 100644 --- a/parachain/runtimes/gargantua/src/weights/pallet_balances.rs +++ b/parachain/runtimes/gargantua/src/weights/pallet_balances.rs @@ -2,29 +2,23 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 -//! DATE: 2024-08-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: -// ./target/release/hyperbridge +// target/release/hyperbridge // benchmark // pallet -// --chain -// gargantua-2000 -// --execution=wasm // --wasm-execution=compiled -// --pallet -// pallet_balances -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/pallet_balances.rs +// --pallet=pallet_balances +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/pallet_balances.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -43,8 +37,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 54_373_000 picoseconds. - Weight::from_parts(54_914_000, 0) + // Minimum execution time: 52_179_000 picoseconds. + Weight::from_parts(53_061_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -55,8 +49,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 43_222_000 picoseconds. - Weight::from_parts(43_913_000, 0) + // Minimum execution time: 41_418_000 picoseconds. + Weight::from_parts(42_100_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,10 +59,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: - // Measured: `174` + // Measured: `52` // Estimated: `3593` - // Minimum execution time: 15_760_000 picoseconds. - Weight::from_parts(16_021_000, 0) + // Minimum execution time: 13_476_000 picoseconds. + Weight::from_parts(13_856_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,10 +71,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: - // Measured: `174` + // Measured: `52` // Estimated: `3593` - // Minimum execution time: 21_080_000 picoseconds. - Weight::from_parts(21_591_000, 0) + // Minimum execution time: 19_186_000 picoseconds. + Weight::from_parts(19_417_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -89,10 +83,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `52` // Estimated: `6196` - // Minimum execution time: 55_646_000 picoseconds. - Weight::from_parts(56_527_000, 0) + // Minimum execution time: 52_900_000 picoseconds. + Weight::from_parts(53_672_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -103,8 +97,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 54_003_000 picoseconds. - Weight::from_parts(54_633_000, 0) + // Minimum execution time: 51_668_000 picoseconds. + Weight::from_parts(52_629_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -113,10 +107,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `174` + // Measured: `52` // Estimated: `3593` - // Minimum execution time: 19_126_000 picoseconds. - Weight::from_parts(19_557_000, 0) + // Minimum execution time: 16_872_000 picoseconds. + Weight::from_parts(17_242_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -128,11 +122,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 18_405_000 picoseconds. - Weight::from_parts(18_626_000, 0) + // Minimum execution time: 16_642_000 picoseconds. + Weight::from_parts(16_862_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 22_393 - .saturating_add(Weight::from_parts(14_911_607, 0).saturating_mul(u.into())) + // Standard Error: 26_228 + .saturating_add(Weight::from_parts(13_635_313, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) @@ -141,24 +135,24 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_522_000 picoseconds. - Weight::from_parts(6_773_000, 0) + // Minimum execution time: 4_980_000 picoseconds. + Weight::from_parts(5_350_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn burn_allow_death() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 34_375_000 picoseconds. - Weight::from_parts(34_806_000, 0) + // Minimum execution time: 28_544_000 picoseconds. + Weight::from_parts(29_226_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn burn_keep_alive() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 23_204_000 picoseconds. - Weight::from_parts(23_695_000, 0) + // Minimum execution time: 19_127_000 picoseconds. + Weight::from_parts(19_597_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachain/runtimes/gargantua/src/weights/pallet_message_queue.rs b/parachain/runtimes/gargantua/src/weights/pallet_message_queue.rs index 4839249b7..0f49a17e5 100644 --- a/parachain/runtimes/gargantua/src/weights/pallet_message_queue.rs +++ b/parachain/runtimes/gargantua/src/weights/pallet_message_queue.rs @@ -1,28 +1,24 @@ //! Autogenerated weights for `pallet_message_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=gargantua-2000 // --wasm-execution=compiled -// --pallet -// pallet_message_queue -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/pallet_message_queue.rs +// --pallet=pallet_message_queue +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/pallet_message_queue.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -41,10 +37,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn ready_ring_knit() -> Weight { // Proof Size summary in bytes: - // Measured: `223` + // Measured: `202` // Estimated: `6044` - // Minimum execution time: 14_046_000 picoseconds. - Weight::from_parts(14_437_000, 0) + // Minimum execution time: 13_396_000 picoseconds. + Weight::from_parts(13_766_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -55,10 +51,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) fn ready_ring_unknit() -> Weight { // Proof Size summary in bytes: - // Measured: `218` + // Measured: `197` // Estimated: `6044` - // Minimum execution time: 12_383_000 picoseconds. - Weight::from_parts(12_614_000, 0) + // Minimum execution time: 11_381_000 picoseconds. + Weight::from_parts(11_802_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -67,10 +63,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn service_queue_base() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `0` // Estimated: `3517` - // Minimum execution time: 4_498_000 picoseconds. - Weight::from_parts(4_719_000, 0) + // Minimum execution time: 3_296_000 picoseconds. + Weight::from_parts(3_497_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -79,10 +75,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `72` + // Measured: `47` // Estimated: `69050` - // Minimum execution time: 6_683_000 picoseconds. - Weight::from_parts(6_863_000, 0) + // Minimum execution time: 5_220_000 picoseconds. + Weight::from_parts(5_380_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,10 +87,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_no_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `72` + // Measured: `47` // Estimated: `69050` - // Minimum execution time: 6_873_000 picoseconds. - Weight::from_parts(7_063_000, 0) + // Minimum execution time: 5_380_000 picoseconds. + Weight::from_parts(5_501_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -107,8 +103,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 136_990_000 picoseconds. - Weight::from_parts(137_591_000, 0) + // Minimum execution time: 140_006_000 picoseconds. + Weight::from_parts(141_508_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -118,10 +114,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn bump_service_head() -> Weight { // Proof Size summary in bytes: - // Measured: `171` + // Measured: `150` // Estimated: `3517` - // Minimum execution time: 7_975_000 picoseconds. - Weight::from_parts(8_146_000, 0) + // Minimum execution time: 6_593_000 picoseconds. + Weight::from_parts(6_753_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -132,10 +128,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn reap_page() -> Weight { // Proof Size summary in bytes: - // Measured: `65667` + // Measured: `65646` // Estimated: `69050` - // Minimum execution time: 48_743_000 picoseconds. - Weight::from_parts(49_845_000, 0) + // Minimum execution time: 47_921_000 picoseconds. + Weight::from_parts(49_304_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -146,10 +142,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_removed() -> Weight { // Proof Size summary in bytes: - // Measured: `65667` + // Measured: `65646` // Estimated: `69050` - // Minimum execution time: 65_884_000 picoseconds. - Weight::from_parts(66_726_000, 0) + // Minimum execution time: 58_651_000 picoseconds. + Weight::from_parts(66_767_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -160,10 +156,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_updated() -> Weight { // Proof Size summary in bytes: - // Measured: `65667` + // Measured: `65646` // Estimated: `69050` - // Minimum execution time: 95_601_000 picoseconds. - Weight::from_parts(96_893_000, 0) + // Minimum execution time: 84_380_000 picoseconds. + Weight::from_parts(87_206_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/parachain/runtimes/gargantua/src/weights/pallet_session.rs b/parachain/runtimes/gargantua/src/weights/pallet_session.rs index b3a33085e..15e179f47 100644 --- a/parachain/runtimes/gargantua/src/weights/pallet_session.rs +++ b/parachain/runtimes/gargantua/src/weights/pallet_session.rs @@ -1,28 +1,24 @@ //! Autogenerated weights for `pallet_session` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=gargantua-2000 // --wasm-execution=compiled -// --pallet -// pallet_session -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/pallet_session.rs +// --pallet=pallet_session +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/pallet_session.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -41,11 +37,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `297` - // Estimated: `3762` - // Minimum execution time: 19_778_000 picoseconds. - Weight::from_parts(20_158_000, 0) - .saturating_add(Weight::from_parts(0, 3762)) + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 12_784_000 picoseconds. + Weight::from_parts(13_195_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -55,11 +51,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `279` - // Estimated: `3744` - // Minimum execution time: 13_836_000 picoseconds. - Weight::from_parts(14_177_000, 0) - .saturating_add(Weight::from_parts(0, 3744)) + // Measured: `60` + // Estimated: `3525` + // Minimum execution time: 9_227_000 picoseconds. + Weight::from_parts(9_508_000, 0) + .saturating_add(Weight::from_parts(0, 3525)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachain/runtimes/gargantua/src/weights/pallet_sudo.rs b/parachain/runtimes/gargantua/src/weights/pallet_sudo.rs index 877e3abef..01afb4e51 100644 --- a/parachain/runtimes/gargantua/src/weights/pallet_sudo.rs +++ b/parachain/runtimes/gargantua/src/weights/pallet_sudo.rs @@ -1,28 +1,24 @@ //! Autogenerated weights for `pallet_sudo` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=gargantua-2000 // --wasm-execution=compiled -// --pallet -// pallet_sudo -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/pallet_sudo.rs +// --pallet=pallet_sudo +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/pallet_sudo.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -39,10 +35,10 @@ impl pallet_sudo::WeightInfo for WeightInfo { /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn set_key() -> Weight { // Proof Size summary in bytes: - // Measured: `132` + // Measured: `37` // Estimated: `1517` - // Minimum execution time: 10_630_000 picoseconds. - Weight::from_parts(11_031_000, 0) + // Minimum execution time: 7_394_000 picoseconds. + Weight::from_parts(7_734_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -51,10 +47,10 @@ impl pallet_sudo::WeightInfo for WeightInfo { /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn sudo() -> Weight { // Proof Size summary in bytes: - // Measured: `132` + // Measured: `37` // Estimated: `1517` - // Minimum execution time: 11_893_000 picoseconds. - Weight::from_parts(12_293_000, 0) + // Minimum execution time: 8_476_000 picoseconds. + Weight::from_parts(8_787_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -62,10 +58,10 @@ impl pallet_sudo::WeightInfo for WeightInfo { /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn sudo_as() -> Weight { // Proof Size summary in bytes: - // Measured: `132` + // Measured: `37` // Estimated: `1517` - // Minimum execution time: 12_354_000 picoseconds. - Weight::from_parts(12_583_000, 0) + // Minimum execution time: 8_656_000 picoseconds. + Weight::from_parts(8_907_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -73,10 +69,10 @@ impl pallet_sudo::WeightInfo for WeightInfo { /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn remove_key() -> Weight { // Proof Size summary in bytes: - // Measured: `132` + // Measured: `37` // Estimated: `1517` - // Minimum execution time: 9_849_000 picoseconds. - Weight::from_parts(10_009_000, 0) + // Minimum execution time: 6_773_000 picoseconds. + Weight::from_parts(6_994_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/parachain/runtimes/gargantua/src/weights/pallet_timestamp.rs b/parachain/runtimes/gargantua/src/weights/pallet_timestamp.rs index 3078950fe..4fa91f447 100644 --- a/parachain/runtimes/gargantua/src/weights/pallet_timestamp.rs +++ b/parachain/runtimes/gargantua/src/weights/pallet_timestamp.rs @@ -1,28 +1,24 @@ //! Autogenerated weights for `pallet_timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=gargantua-2000 // --wasm-execution=compiled -// --pallet -// pallet_timestamp -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/pallet_timestamp.rs +// --pallet=pallet_timestamp +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/pallet_timestamp.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -41,20 +37,20 @@ impl pallet_timestamp::WeightInfo for WeightInfo { /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { // Proof Size summary in bytes: - // Measured: `120` + // Measured: `0` // Estimated: `1493` - // Minimum execution time: 7_865_000 picoseconds. - Weight::from_parts(8_126_000, 0) + // Minimum execution time: 4_057_000 picoseconds. + Weight::from_parts(4_258_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } fn on_finalize() -> Weight { // Proof Size summary in bytes: - // Measured: `57` + // Measured: `36` // Estimated: `0` - // Minimum execution time: 3_767_000 picoseconds. - Weight::from_parts(3_887_000, 0) + // Minimum execution time: 2_846_000 picoseconds. + Weight::from_parts(2_986_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachain/runtimes/gargantua/src/weights/pallet_utility.rs b/parachain/runtimes/gargantua/src/weights/pallet_utility.rs index af49872f5..c3c161a32 100644 --- a/parachain/runtimes/gargantua/src/weights/pallet_utility.rs +++ b/parachain/runtimes/gargantua/src/weights/pallet_utility.rs @@ -1,28 +1,24 @@ //! Autogenerated weights for `pallet_utility` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=gargantua-2000 // --wasm-execution=compiled -// --pallet -// pallet_utility -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --output -// parachain/runtimes/gargantua/src/weights/pallet_utility.rs +// --pallet=pallet_utility +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --output=parachain/runtimes/gargantua/src/weights/pallet_utility.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -40,18 +36,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_681_000 picoseconds. - Weight::from_parts(1_443_626, 0) + // Minimum execution time: 4_820_000 picoseconds. + Weight::from_parts(5_846_638, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_307 - .saturating_add(Weight::from_parts(4_609_427, 0).saturating_mul(c.into())) + // Standard Error: 14_259 + .saturating_add(Weight::from_parts(3_098_253, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_911_000 picoseconds. - Weight::from_parts(6_041_000, 0) + // Minimum execution time: 4_238_000 picoseconds. + Weight::from_parts(4_368_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -59,18 +55,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_681_000 picoseconds. - Weight::from_parts(6_536_975, 0) + // Minimum execution time: 4_178_000 picoseconds. + Weight::from_parts(9_217_307, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_486 - .saturating_add(Weight::from_parts(5_013_187, 0).saturating_mul(c.into())) + // Standard Error: 17_603 + .saturating_add(Weight::from_parts(3_433_894, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_656_000 picoseconds. - Weight::from_parts(8_937_000, 0) + // Minimum execution time: 6_082_000 picoseconds. + Weight::from_parts(6_363_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -78,10 +74,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_771_000 picoseconds. - Weight::from_parts(48_607_186, 0) + // Minimum execution time: 4_208_000 picoseconds. + Weight::from_parts(1_811_805, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 21_436 - .saturating_add(Weight::from_parts(4_249_197, 0).saturating_mul(c.into())) + // Standard Error: 15_287 + .saturating_add(Weight::from_parts(3_124_194, 0).saturating_mul(c.into())) } } diff --git a/parachain/runtimes/nexus/Cargo.toml b/parachain/runtimes/nexus/Cargo.toml index 235863521..928c982d4 100644 --- a/parachain/runtimes/nexus/Cargo.toml +++ b/parachain/runtimes/nexus/Cargo.toml @@ -227,7 +227,8 @@ runtime-benchmarks = [ "pallet-sudo/runtime-benchmarks", "parachains-common/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks" + "pallet-proxy/runtime-benchmarks", + "ismp-grandpa/runtime-benchmarks" ] try-runtime = [ diff --git a/parachain/runtimes/nexus/src/ismp.rs b/parachain/runtimes/nexus/src/ismp.rs index 1ff0e6e21..379d8c914 100644 --- a/parachain/runtimes/nexus/src/ismp.rs +++ b/parachain/runtimes/nexus/src/ismp.rs @@ -85,9 +85,9 @@ impl Get> for Coprocessor { } impl ismp_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type IsmpHost = pallet_ismp::Pallet; - type WeightInfo = ismp_grandpa::weights::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type IsmpHost = pallet_ismp::Pallet; + type WeightInfo = weights::ismp_grandpa::WeightInfo; } impl pallet_ismp::Config for Runtime { @@ -114,8 +114,6 @@ impl pallet_ismp::Config for Runtime { type WeightProvider = (); } - - impl pallet_ismp_relayer::Config for Runtime { type RuntimeEvent = RuntimeEvent; type IsmpHost = Ismp; diff --git a/parachain/runtimes/nexus/src/lib.rs b/parachain/runtimes/nexus/src/lib.rs index ded7ee6c8..024ac901d 100644 --- a/parachain/runtimes/nexus/src/lib.rs +++ b/parachain/runtimes/nexus/src/lib.rs @@ -13,6 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(non_local_definitions)] #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] @@ -890,6 +891,7 @@ mod benches { [pallet_proxy, Proxy] [cumulus_pallet_parachain_system, ParachainSystem] [pallet_session, SessionBench::] + [ismp_grandpa, IsmpGrandpa] ); } diff --git a/parachain/runtimes/nexus/src/weights/cumulus_pallet_parachain_system.rs b/parachain/runtimes/nexus/src/weights/cumulus_pallet_parachain_system.rs index 88b0d61d1..525e2e258 100644 --- a/parachain/runtimes/nexus/src/weights/cumulus_pallet_parachain_system.rs +++ b/parachain/runtimes/nexus/src/weights/cumulus_pallet_parachain_system.rs @@ -1,26 +1,23 @@ //! Autogenerated weights for `cumulus_pallet_parachain_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=nexus-2000 // --wasm-execution=compiled -// --pallet -// cumulus_pallet_parachain_system -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=cumulus_pallet_parachain_system +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output // parachain/runtimes/nexus/src/weights/cumulus_pallet_parachain_system.rs @@ -48,13 +45,13 @@ impl cumulus_pallet_parachain_system::WeightInfo for We /// The range of component `n` is `[0, 1000]`. fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `48` + // Measured: `0` // Estimated: `3517` - // Minimum execution time: 2_655_000 picoseconds. - Weight::from_parts(2_705_000, 0) + // Minimum execution time: 832_000 picoseconds. + Weight::from_parts(861_000, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 183_854 - .saturating_add(Weight::from_parts(153_105_407, 0).saturating_mul(n.into())) + // Standard Error: 256_534 + .saturating_add(Weight::from_parts(150_169_254, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/parachain/runtimes/nexus/src/weights/cumulus_pallet_xcmp_queue.rs b/parachain/runtimes/nexus/src/weights/cumulus_pallet_xcmp_queue.rs index 9ad221dd3..c51dea6ab 100644 --- a/parachain/runtimes/nexus/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachain/runtimes/nexus/src/weights/cumulus_pallet_xcmp_queue.rs @@ -1,26 +1,23 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=nexus-2000 // --wasm-execution=compiled -// --pallet -// cumulus_pallet_xcmp_queue -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=cumulus_pallet_xcmp_queue +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output // parachain/runtimes/nexus/src/weights/cumulus_pallet_xcmp_queue.rs @@ -36,58 +33,58 @@ use core::marker::PhantomData; pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) - /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) fn set_config_with_u32() -> Weight { // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `1527` - // Minimum execution time: 5_179_000 picoseconds. - Weight::from_parts(5_400_000, 0) - .saturating_add(Weight::from_parts(0, 1527)) + // Measured: `0` + // Estimated: `1497` + // Minimum execution time: 2_785_000 picoseconds. + Weight::from_parts(2_935_000, 0) + .saturating_add(Weight::from_parts(0, 1497)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) - /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) - /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::Pages` (r:0 w:1) /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn enqueue_xcmp_message() -> Weight { // Proof Size summary in bytes: - // Measured: `48` - // Estimated: `3517` - // Minimum execution time: 13_195_000 picoseconds. - Weight::from_parts(13_676_000, 0) - .saturating_add(Weight::from_parts(0, 3517)) + // Measured: `0` + // Estimated: `5487` + // Minimum execution time: 10_159_000 picoseconds. + Weight::from_parts(10_399_000, 0) + .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) fn suspend_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `1527` - // Minimum execution time: 3_005_000 picoseconds. - Weight::from_parts(3_156_000, 0) - .saturating_add(Weight::from_parts(0, 1527)) + // Measured: `0` + // Estimated: `2767` + // Minimum execution time: 1_062_000 picoseconds. + Weight::from_parts(1_162_000, 0) + .saturating_add(Weight::from_parts(0, 2767)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) fn resume_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `77` - // Estimated: `1562` - // Minimum execution time: 4_208_000 picoseconds. - Weight::from_parts(4_378_000, 0) - .saturating_add(Weight::from_parts(0, 1562)) + // Measured: `15` + // Estimated: `2767` + // Minimum execution time: 2_285_000 picoseconds. + Weight::from_parts(2_354_000, 0) + .saturating_add(Weight::from_parts(0, 2767)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -95,8 +92,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 61_437_000 picoseconds. - Weight::from_parts(61_706_000, 0) + // Minimum execution time: 8_205_000 picoseconds. + Weight::from_parts(8_406_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) @@ -108,18 +105,18 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) - /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) - /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::Pages` (r:0 w:1) /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn on_idle_good_msg() -> Weight { // Proof Size summary in bytes: - // Measured: `65677` - // Estimated: `69142` - // Minimum execution time: 92_034_000 picoseconds. - Weight::from_parts(92_816_000, 0) - .saturating_add(Weight::from_parts(0, 69142)) + // Measured: `65612` + // Estimated: `69077` + // Minimum execution time: 91_052_000 picoseconds. + Weight::from_parts(92_044_000, 0) + .saturating_add(Weight::from_parts(0, 69077)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -129,11 +126,11 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) fn on_idle_large_msg() -> Weight { // Proof Size summary in bytes: - // Measured: `65676` - // Estimated: `69141` - // Minimum execution time: 45_406_000 picoseconds. - Weight::from_parts(46_559_000, 0) - .saturating_add(Weight::from_parts(0, 69141)) + // Measured: `65617` + // Estimated: `69082` + // Minimum execution time: 45_226_000 picoseconds. + Weight::from_parts(46_047_000, 0) + .saturating_add(Weight::from_parts(0, 69082)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachain/runtimes/nexus/src/weights/frame_system.rs b/parachain/runtimes/nexus/src/weights/frame_system.rs index 74193e300..9338ea6b0 100644 --- a/parachain/runtimes/nexus/src/weights/frame_system.rs +++ b/parachain/runtimes/nexus/src/weights/frame_system.rs @@ -1,26 +1,23 @@ //! Autogenerated weights for `frame_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=nexus-2000 // --wasm-execution=compiled -// --pallet -// frame_system -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=frame_system +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output // parachain/runtimes/nexus/src/weights/frame_system.rs @@ -40,22 +37,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_425_000 picoseconds. - Weight::from_parts(2_937_481, 0) + // Minimum execution time: 1_924_000 picoseconds. + Weight::from_parts(8_871_733, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(251, 0).saturating_mul(b.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(287, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_074_000 picoseconds. - Weight::from_parts(35_495_237, 0) + // Minimum execution time: 4_870_000 picoseconds. + Weight::from_parts(5_070_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(2_849, 0).saturating_mul(b.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(2_716, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -65,8 +62,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 4_218_000 picoseconds. - Weight::from_parts(4_438_000, 0) + // Minimum execution time: 2_835_000 picoseconds. + Weight::from_parts(3_076_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -85,11 +82,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `164` - // Estimated: `1649` - // Minimum execution time: 110_033_700_000 picoseconds. - Weight::from_parts(113_517_949_000, 0) - .saturating_add(Weight::from_parts(0, 1649)) + // Measured: `106` + // Estimated: `1591` + // Minimum execution time: 111_305_921_000 picoseconds. + Weight::from_parts(117_091_145_000, 0) + .saturating_add(Weight::from_parts(0, 1591)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -100,11 +97,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_465_000 picoseconds. - Weight::from_parts(2_595_000, 0) + // Minimum execution time: 1_723_000 picoseconds. + Weight::from_parts(1_773_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_799 - .saturating_add(Weight::from_parts(827_351, 0).saturating_mul(i.into())) + // Standard Error: 2_877 + .saturating_add(Weight::from_parts(684_332, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -114,11 +111,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_495_000 picoseconds. - Weight::from_parts(2_575_000, 0) + // Minimum execution time: 1_934_000 picoseconds. + Weight::from_parts(2_024_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 819 - .saturating_add(Weight::from_parts(566_110, 0).saturating_mul(i.into())) + // Standard Error: 1_581 + .saturating_add(Weight::from_parts(508_454, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -126,13 +123,13 @@ impl frame_system::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `47 + p * (69 ±0)` - // Estimated: `61 + p * (70 ±0)` - // Minimum execution time: 4_950_000 picoseconds. - Weight::from_parts(5_080_000, 0) - .saturating_add(Weight::from_parts(0, 61)) - // Standard Error: 1_043 - .saturating_add(Weight::from_parts(1_036_851, 0).saturating_mul(p.into())) + // Measured: `0 + p * (69 ±0)` + // Estimated: `0 + p * (70 ±0)` + // Minimum execution time: 3_496_000 picoseconds. + Weight::from_parts(3_616_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_784 + .saturating_add(Weight::from_parts(955_297, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) @@ -143,8 +140,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_278_000 picoseconds. - Weight::from_parts(9_688_000, 0) + // Minimum execution time: 7_113_000 picoseconds. + Weight::from_parts(7_484_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -164,11 +161,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn apply_authorized_upgrade() -> Weight { // Proof Size summary in bytes: - // Measured: `186` - // Estimated: `1671` - // Minimum execution time: 119_127_674_000 picoseconds. - Weight::from_parts(122_174_164_000, 0) - .saturating_add(Weight::from_parts(0, 1671)) + // Measured: `127` + // Estimated: `1612` + // Minimum execution time: 119_868_824_000 picoseconds. + Weight::from_parts(124_949_002_000, 0) + .saturating_add(Weight::from_parts(0, 1612)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachain/runtimes/nexus/src/weights/ismp_grandpa.rs b/parachain/runtimes/nexus/src/weights/ismp_grandpa.rs new file mode 100644 index 000000000..663bfffc3 --- /dev/null +++ b/parachain/runtimes/nexus/src/weights/ismp_grandpa.rs @@ -0,0 +1,63 @@ + +//! Autogenerated weights for `ismp_grandpa` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// target/release/hyperbridge +// benchmark +// pallet +// --wasm-execution=compiled +// --pallet=ismp_grandpa +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm +// --output +// parachain/runtimes/nexus/src/weights/ismp_grandpa.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `ismp_grandpa`. +pub struct WeightInfo(PhantomData); +impl ismp_grandpa::WeightInfo for WeightInfo { + /// Storage: `IsmpGrandpa::SupportedStateMachines` (r:0 w:100) + /// Proof: `IsmpGrandpa::SupportedStateMachines` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[1, 100]`. + fn add_state_machines(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_893_000 picoseconds. + Weight::from_parts(7_240_686, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 7_005 + .saturating_add(Weight::from_parts(1_396_431, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } + /// Storage: `IsmpGrandpa::SupportedStateMachines` (r:0 w:100) + /// Proof: `IsmpGrandpa::SupportedStateMachines` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[1, 100]`. + fn remove_state_machines(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_103_000 picoseconds. + Weight::from_parts(4_598_936, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 8_582 + .saturating_add(Weight::from_parts(1_448_306, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } +} diff --git a/parachain/runtimes/nexus/src/weights/mod.rs b/parachain/runtimes/nexus/src/weights/mod.rs index 0529fe350..641f10c75 100644 --- a/parachain/runtimes/nexus/src/weights/mod.rs +++ b/parachain/runtimes/nexus/src/weights/mod.rs @@ -25,6 +25,7 @@ pub mod rocksdb_weights; pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod frame_system; +pub mod ismp_grandpa; pub mod pallet_asset_rate; pub mod pallet_assets; pub mod pallet_balances; diff --git a/parachain/runtimes/nexus/src/weights/pallet_assets.rs b/parachain/runtimes/nexus/src/weights/pallet_assets.rs index f1af8ecf1..effd0ae84 100644 --- a/parachain/runtimes/nexus/src/weights/pallet_assets.rs +++ b/parachain/runtimes/nexus/src/weights/pallet_assets.rs @@ -1,26 +1,23 @@ //! Autogenerated weights for `pallet_assets` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=nexus-2000 // --wasm-execution=compiled -// --pallet -// pallet_assets -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=pallet_assets +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output // parachain/runtimes/nexus/src/weights/pallet_assets.rs @@ -36,476 +33,476 @@ use core::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) + /// Storage: `Assets::NextAssetId` (r:1 w:0) + /// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `254` - // Estimated: `4273` - // Minimum execution time: 30_918_000 picoseconds. - Weight::from_parts(31_890_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `52` + // Estimated: `3703` + // Minimum execution time: 25_979_000 picoseconds. + Weight::from_parts(26_560_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) + /// Storage: `Assets::NextAssetId` (r:1 w:0) + /// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn force_create() -> Weight { // Proof Size summary in bytes: - // Measured: `114` - // Estimated: `4273` - // Minimum execution time: 13_535_000 picoseconds. - Weight::from_parts(13_916_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `0` + // Estimated: `3703` + // Minimum execution time: 10_310_000 picoseconds. + Weight::from_parts(10_640_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn start_destroy() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 15_419_000 picoseconds. - Weight::from_parts(15_830_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `284` + // Estimated: `3703` + // Minimum execution time: 11_211_000 picoseconds. + Weight::from_parts(11_632_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:6 w:5) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:5 w:5) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `c` is `[0, 5]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `348 + c * (217 ±0)` - // Estimated: `4273 + c * (3207 ±0)` - // Minimum execution time: 19_707_000 picoseconds. - Weight::from_parts(22_189_006, 0) - .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 78_767 - .saturating_add(Weight::from_parts(11_696_456, 0).saturating_mul(c.into())) + // Measured: `251 + c * (187 ±0)` + // Estimated: `3703 + c * (2637 ±0)` + // Minimum execution time: 14_597_000 picoseconds. + Weight::from_parts(15_997_215, 0) + .saturating_add(Weight::from_parts(0, 3703)) + // Standard Error: 57_033 + .saturating_add(Weight::from_parts(12_414_507, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 3207).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2637).saturating_mul(c.into())) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:6 w:5) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 5]`. fn destroy_approvals(a: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `393 + a * (91 ±0)` - // Estimated: `4273 + a * (3221 ±0)` - // Minimum execution time: 18_305_000 picoseconds. - Weight::from_parts(21_349_676, 0) - .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 87_567 - .saturating_add(Weight::from_parts(14_427_659, 0).saturating_mul(a.into())) + // Measured: `491 + a * (92 ±0)` + // Estimated: `3703 + a * (2651 ±0)` + // Minimum execution time: 14_818_000 picoseconds. + Weight::from_parts(17_497_459, 0) + .saturating_add(Weight::from_parts(0, 3703)) + // Standard Error: 77_544 + .saturating_add(Weight::from_parts(17_733_582, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_parts(0, 3221).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 2651).saturating_mul(a.into())) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:0) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) fn finish_destroy() -> Weight { // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 15_440_000 picoseconds. - Weight::from_parts(15_820_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 12_273_000 picoseconds. + Weight::from_parts(12_835_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn mint() -> Weight { // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 24_927_000 picoseconds. - Weight::from_parts(25_418_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 21_371_000 picoseconds. + Weight::from_parts(23_234_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn burn() -> Weight { // Proof Size summary in bytes: - // Measured: `425` - // Estimated: `4273` - // Minimum execution time: 32_231_000 picoseconds. - Weight::from_parts(33_133_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `387` + // Estimated: `3703` + // Minimum execution time: 28_614_000 picoseconds. + Weight::from_parts(32_701_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `464` - // Estimated: `7404` - // Minimum execution time: 44_354_000 picoseconds. - Weight::from_parts(45_035_000, 0) - .saturating_add(Weight::from_parts(0, 7404)) + // Measured: `387` + // Estimated: `6264` + // Minimum execution time: 38_824_000 picoseconds. + Weight::from_parts(39_956_000, 0) + .saturating_add(Weight::from_parts(0, 6264)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `464` - // Estimated: `7404` - // Minimum execution time: 40_477_000 picoseconds. - Weight::from_parts(45_276_000, 0) - .saturating_add(Weight::from_parts(0, 7404)) + // Measured: `387` + // Estimated: `6264` + // Minimum execution time: 35_497_000 picoseconds. + Weight::from_parts(35_998_000, 0) + .saturating_add(Weight::from_parts(0, 6264)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `464` - // Estimated: `7404` - // Minimum execution time: 50_235_000 picoseconds. - Weight::from_parts(50_946_000, 0) - .saturating_add(Weight::from_parts(0, 7404)) + // Measured: `387` + // Estimated: `6264` + // Minimum execution time: 39_224_000 picoseconds. + Weight::from_parts(39_776_000, 0) + .saturating_add(Weight::from_parts(0, 6264)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn freeze() -> Weight { // Proof Size summary in bytes: - // Measured: `425` - // Estimated: `4273` - // Minimum execution time: 17_693_000 picoseconds. - Weight::from_parts(20_358_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `387` + // Estimated: `3703` + // Minimum execution time: 13_866_000 picoseconds. + Weight::from_parts(15_660_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn thaw() -> Weight { // Proof Size summary in bytes: - // Measured: `425` - // Estimated: `4273` - // Minimum execution time: 17_533_000 picoseconds. - Weight::from_parts(17_944_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `387` + // Estimated: `3703` + // Minimum execution time: 13_927_000 picoseconds. + Weight::from_parts(14_227_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn freeze_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 13_436_000 picoseconds. - Weight::from_parts(14_628_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `284` + // Estimated: `3703` + // Minimum execution time: 9_518_000 picoseconds. + Weight::from_parts(9_779_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn thaw_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 12_925_000 picoseconds. - Weight::from_parts(13_566_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `284` + // Estimated: `3703` + // Minimum execution time: 9_408_000 picoseconds. + Weight::from_parts(9_668_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:0) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) fn transfer_ownership() -> Weight { // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 15_540_000 picoseconds. - Weight::from_parts(15_910_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 10_951_000 picoseconds. + Weight::from_parts(11_351_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn set_team() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 12_684_000 picoseconds. - Weight::from_parts(13_054_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 8_946_000 picoseconds. + Weight::from_parts(9_277_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn set_metadata(n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 28_634_000 picoseconds. - Weight::from_parts(28_327_077, 0) - .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 4_607 - .saturating_add(Weight::from_parts(39_646, 0).saturating_mul(n.into())) - // Standard Error: 4_607 - .saturating_add(Weight::from_parts(39_457, 0).saturating_mul(s.into())) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 24_336_000 picoseconds. + Weight::from_parts(24_969_539, 0) + .saturating_add(Weight::from_parts(0, 3703)) + // Standard Error: 3_236 + .saturating_add(Weight::from_parts(7_073, 0).saturating_mul(n.into())) + // Standard Error: 3_236 + .saturating_add(Weight::from_parts(18_194, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) fn clear_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `481` - // Estimated: `4273` - // Minimum execution time: 29_175_000 picoseconds. - Weight::from_parts(30_247_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `444` + // Estimated: `3703` + // Minimum execution time: 28_184_000 picoseconds. + Weight::from_parts(28_915_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(n: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `187` - // Estimated: `4273` - // Minimum execution time: 14_798_000 picoseconds. - Weight::from_parts(17_166_665, 0) - .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 618 - .saturating_add(Weight::from_parts(4_550, 0).saturating_mul(n.into())) - // Standard Error: 618 - .saturating_add(Weight::from_parts(2_760, 0).saturating_mul(s.into())) + fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `84` + // Estimated: `3703` + // Minimum execution time: 9_909_000 picoseconds. + Weight::from_parts(11_947_479, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) - /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(168), added: 2643, mode: `MaxEncodedLen`) fn force_clear_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `481` - // Estimated: `4273` - // Minimum execution time: 32_662_000 picoseconds. - Weight::from_parts(33_102_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `444` + // Estimated: `3703` + // Minimum execution time: 24_215_000 picoseconds. + Weight::from_parts(25_117_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn force_asset_status() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 13_897_000 picoseconds. - Weight::from_parts(14_317_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 8_787_000 picoseconds. + Weight::from_parts(9_017_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) fn approve_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 35_988_000 picoseconds. - Weight::from_parts(36_689_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `284` + // Estimated: `3703` + // Minimum execution time: 29_727_000 picoseconds. + Weight::from_parts(30_237_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `634` - // Estimated: `7404` - // Minimum execution time: 73_800_000 picoseconds. - Weight::from_parts(74_932_000, 0) - .saturating_add(Weight::from_parts(0, 7404)) + // Measured: `586` + // Estimated: `6264` + // Minimum execution time: 59_884_000 picoseconds. + Weight::from_parts(60_465_000, 0) + .saturating_add(Weight::from_parts(0, 6264)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) fn cancel_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `484` - // Estimated: `4273` - // Minimum execution time: 38_523_000 picoseconds. - Weight::from_parts(39_144_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `483` + // Estimated: `3703` + // Minimum execution time: 30_397_000 picoseconds. + Weight::from_parts(31_249_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) - /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(176), added: 2651, mode: `MaxEncodedLen`) fn force_cancel_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `484` - // Estimated: `4273` - // Minimum execution time: 39_374_000 picoseconds. - Weight::from_parts(40_196_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `483` + // Estimated: `3703` + // Minimum execution time: 30_457_000 picoseconds. + Weight::from_parts(31_209_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn set_min_balance() -> Weight { // Proof Size summary in bytes: - // Measured: `314` - // Estimated: `4273` - // Minimum execution time: 15_259_000 picoseconds. - Weight::from_parts(15_619_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 10_109_000 picoseconds. + Weight::from_parts(10_350_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn touch() -> Weight { // Proof Size summary in bytes: - // Measured: `451` - // Estimated: `4273` - // Minimum execution time: 37_631_000 picoseconds. - Weight::from_parts(38_002_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `298` + // Estimated: `3703` + // Minimum execution time: 28_384_000 picoseconds. + Weight::from_parts(28_794_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn touch_other() -> Weight { // Proof Size summary in bytes: - // Measured: `348` - // Estimated: `4273` - // Minimum execution time: 35_878_000 picoseconds. - Weight::from_parts(36_389_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `246` + // Estimated: `3703` + // Minimum execution time: 27_612_000 picoseconds. + Weight::from_parts(28_283_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn refund() -> Weight { // Proof Size summary in bytes: - // Measured: `546` - // Estimated: `4273` - // Minimum execution time: 35_578_000 picoseconds. - Weight::from_parts(36_208_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `457` + // Estimated: `3703` + // Minimum execution time: 26_741_000 picoseconds. + Weight::from_parts(27_603_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) fn refund_other() -> Weight { // Proof Size summary in bytes: - // Measured: `476` - // Estimated: `4273` - // Minimum execution time: 34_456_000 picoseconds. - Weight::from_parts(35_046_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `438` + // Estimated: `3703` + // Minimum execution time: 26_891_000 picoseconds. + Weight::from_parts(27_191_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Assets::Asset` (r:1 w:0) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn block() -> Weight { // Proof Size summary in bytes: - // Measured: `425` - // Estimated: `4273` - // Minimum execution time: 20_269_000 picoseconds. - Weight::from_parts(20_689_000, 0) - .saturating_add(Weight::from_parts(0, 4273)) + // Measured: `387` + // Estimated: `3703` + // Minimum execution time: 13_856_000 picoseconds. + Weight::from_parts(14_227_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachain/runtimes/nexus/src/weights/pallet_balances.rs b/parachain/runtimes/nexus/src/weights/pallet_balances.rs index 242067108..50ba4628b 100644 --- a/parachain/runtimes/nexus/src/weights/pallet_balances.rs +++ b/parachain/runtimes/nexus/src/weights/pallet_balances.rs @@ -2,29 +2,24 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 -//! DATE: 2024-08-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: -// ./target/release/hyperbridge +// target/release/hyperbridge // benchmark // pallet -// --chain -// gargantua-2000 -// --execution=wasm // --wasm-execution=compiled -// --pallet -// pallet_balances -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=pallet_balances +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output -// parachain/runtimes/gargantua/src/weights/pallet_balances.rs +// parachain/runtimes/nexus/src/weights/pallet_balances.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -43,8 +38,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 54_373_000 picoseconds. - Weight::from_parts(54_914_000, 0) + // Minimum execution time: 49_745_000 picoseconds. + Weight::from_parts(50_676_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -55,8 +50,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 43_222_000 picoseconds. - Weight::from_parts(43_913_000, 0) + // Minimum execution time: 39_595_000 picoseconds. + Weight::from_parts(40_236_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,10 +60,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: - // Measured: `174` + // Measured: `52` // Estimated: `3593` - // Minimum execution time: 15_760_000 picoseconds. - Weight::from_parts(16_021_000, 0) + // Minimum execution time: 12_955_000 picoseconds. + Weight::from_parts(13_366_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,10 +72,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: - // Measured: `174` + // Measured: `52` // Estimated: `3593` - // Minimum execution time: 21_080_000 picoseconds. - Weight::from_parts(21_591_000, 0) + // Minimum execution time: 18_195_000 picoseconds. + Weight::from_parts(18_876_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -89,10 +84,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `52` // Estimated: `6196` - // Minimum execution time: 55_646_000 picoseconds. - Weight::from_parts(56_527_000, 0) + // Minimum execution time: 51_036_000 picoseconds. + Weight::from_parts(51_778_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -103,8 +98,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 54_003_000 picoseconds. - Weight::from_parts(54_633_000, 0) + // Minimum execution time: 49_854_000 picoseconds. + Weight::from_parts(50_737_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -113,10 +108,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `174` + // Measured: `52` // Estimated: `3593` - // Minimum execution time: 19_126_000 picoseconds. - Weight::from_parts(19_557_000, 0) + // Minimum execution time: 16_121_000 picoseconds. + Weight::from_parts(16_452_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -128,11 +123,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 18_405_000 picoseconds. - Weight::from_parts(18_626_000, 0) + // Minimum execution time: 15_790_000 picoseconds. + Weight::from_parts(16_100_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 22_393 - .saturating_add(Weight::from_parts(14_911_607, 0).saturating_mul(u.into())) + // Standard Error: 28_028 + .saturating_add(Weight::from_parts(13_273_687, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) @@ -141,24 +136,24 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_522_000 picoseconds. - Weight::from_parts(6_773_000, 0) + // Minimum execution time: 4_999_000 picoseconds. + Weight::from_parts(5_230_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn burn_allow_death() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 34_375_000 picoseconds. - Weight::from_parts(34_806_000, 0) + // Minimum execution time: 27_692_000 picoseconds. + Weight::from_parts(28_434_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn burn_keep_alive() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 23_204_000 picoseconds. - Weight::from_parts(23_695_000, 0) + // Minimum execution time: 18_345_000 picoseconds. + Weight::from_parts(18_986_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachain/runtimes/nexus/src/weights/pallet_message_queue.rs b/parachain/runtimes/nexus/src/weights/pallet_message_queue.rs index 5fb9399e9..b219beb05 100644 --- a/parachain/runtimes/nexus/src/weights/pallet_message_queue.rs +++ b/parachain/runtimes/nexus/src/weights/pallet_message_queue.rs @@ -1,26 +1,23 @@ //! Autogenerated weights for `pallet_message_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=nexus-2000 // --wasm-execution=compiled -// --pallet -// pallet_message_queue -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=pallet_message_queue +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output // parachain/runtimes/nexus/src/weights/pallet_message_queue.rs @@ -41,10 +38,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn ready_ring_knit() -> Weight { // Proof Size summary in bytes: - // Measured: `223` + // Measured: `202` // Estimated: `6044` - // Minimum execution time: 14_267_000 picoseconds. - Weight::from_parts(14_768_000, 0) + // Minimum execution time: 12_795_000 picoseconds. + Weight::from_parts(13_135_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -55,10 +52,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) fn ready_ring_unknit() -> Weight { // Proof Size summary in bytes: - // Measured: `218` + // Measured: `197` // Estimated: `6044` - // Minimum execution time: 12_203_000 picoseconds. - Weight::from_parts(12_764_000, 0) + // Minimum execution time: 10_901_000 picoseconds. + Weight::from_parts(11_462_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -67,10 +64,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn service_queue_base() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `0` // Estimated: `3517` - // Minimum execution time: 4_728_000 picoseconds. - Weight::from_parts(4_959_000, 0) + // Minimum execution time: 3_196_000 picoseconds. + Weight::from_parts(3_357_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -79,10 +76,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `72` + // Measured: `47` // Estimated: `69050` - // Minimum execution time: 7_064_000 picoseconds. - Weight::from_parts(7_284_000, 0) + // Minimum execution time: 5_039_000 picoseconds. + Weight::from_parts(5_170_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,10 +88,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_no_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `72` + // Measured: `47` // Estimated: `69050` - // Minimum execution time: 6_973_000 picoseconds. - Weight::from_parts(7_153_000, 0) + // Minimum execution time: 5_110_000 picoseconds. + Weight::from_parts(5_300_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -107,8 +104,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 138_181_000 picoseconds. - Weight::from_parts(139_534_000, 0) + // Minimum execution time: 146_478_000 picoseconds. + Weight::from_parts(148_902_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -118,10 +115,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn bump_service_head() -> Weight { // Proof Size summary in bytes: - // Measured: `171` + // Measured: `150` // Estimated: `3517` - // Minimum execution time: 8_155_000 picoseconds. - Weight::from_parts(8_416_000, 0) + // Minimum execution time: 6_432_000 picoseconds. + Weight::from_parts(6_593_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -132,10 +129,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn reap_page() -> Weight { // Proof Size summary in bytes: - // Measured: `65667` + // Measured: `65646` // Estimated: `69050` - // Minimum execution time: 48_782_000 picoseconds. - Weight::from_parts(49_814_000, 0) + // Minimum execution time: 47_179_000 picoseconds. + Weight::from_parts(54_393_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -146,10 +143,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_removed() -> Weight { // Proof Size summary in bytes: - // Measured: `65667` + // Measured: `65646` // Estimated: `69050` - // Minimum execution time: 59_423_000 picoseconds. - Weight::from_parts(60_264_000, 0) + // Minimum execution time: 62_017_000 picoseconds. + Weight::from_parts(63_971_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -160,10 +157,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_updated() -> Weight { // Proof Size summary in bytes: - // Measured: `65667` + // Measured: `65646` // Estimated: `69050` - // Minimum execution time: 85_872_000 picoseconds. - Weight::from_parts(86_584_000, 0) + // Minimum execution time: 84_079_000 picoseconds. + Weight::from_parts(85_793_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/parachain/runtimes/nexus/src/weights/pallet_session.rs b/parachain/runtimes/nexus/src/weights/pallet_session.rs index 74a83974b..414347715 100644 --- a/parachain/runtimes/nexus/src/weights/pallet_session.rs +++ b/parachain/runtimes/nexus/src/weights/pallet_session.rs @@ -1,26 +1,23 @@ //! Autogenerated weights for `pallet_session` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=nexus-2000 // --wasm-execution=compiled -// --pallet -// pallet_session -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=pallet_session +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output // parachain/runtimes/nexus/src/weights/pallet_session.rs @@ -41,11 +38,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `297` - // Estimated: `3762` - // Minimum execution time: 21_380_000 picoseconds. - Weight::from_parts(23_334_000, 0) - .saturating_add(Weight::from_parts(0, 3762)) + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 12_393_000 picoseconds. + Weight::from_parts(12_985_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -55,11 +52,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `279` - // Estimated: `3744` - // Minimum execution time: 15_389_000 picoseconds. - Weight::from_parts(16_963_000, 0) - .saturating_add(Weight::from_parts(0, 3744)) + // Measured: `60` + // Estimated: `3525` + // Minimum execution time: 9_088_000 picoseconds. + Weight::from_parts(9_458_000, 0) + .saturating_add(Weight::from_parts(0, 3525)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachain/runtimes/nexus/src/weights/pallet_sudo.rs b/parachain/runtimes/nexus/src/weights/pallet_sudo.rs index 11cb901ed..1480b8da4 100644 --- a/parachain/runtimes/nexus/src/weights/pallet_sudo.rs +++ b/parachain/runtimes/nexus/src/weights/pallet_sudo.rs @@ -1,26 +1,23 @@ //! Autogenerated weights for `pallet_sudo` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=nexus-2000 // --wasm-execution=compiled -// --pallet -// pallet_sudo -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=pallet_sudo +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output // parachain/runtimes/nexus/src/weights/pallet_sudo.rs @@ -39,10 +36,10 @@ impl pallet_sudo::WeightInfo for WeightInfo { /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn set_key() -> Weight { // Proof Size summary in bytes: - // Measured: `132` + // Measured: `37` // Estimated: `1517` - // Minimum execution time: 10_991_000 picoseconds. - Weight::from_parts(11_301_000, 0) + // Minimum execution time: 7_314_000 picoseconds. + Weight::from_parts(7_544_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -51,10 +48,10 @@ impl pallet_sudo::WeightInfo for WeightInfo { /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn sudo() -> Weight { // Proof Size summary in bytes: - // Measured: `132` + // Measured: `37` // Estimated: `1517` - // Minimum execution time: 12_293_000 picoseconds. - Weight::from_parts(12_544_000, 0) + // Minimum execution time: 8_376_000 picoseconds. + Weight::from_parts(8_656_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -62,10 +59,10 @@ impl pallet_sudo::WeightInfo for WeightInfo { /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn sudo_as() -> Weight { // Proof Size summary in bytes: - // Measured: `132` + // Measured: `37` // Estimated: `1517` - // Minimum execution time: 12_524_000 picoseconds. - Weight::from_parts(12_785_000, 0) + // Minimum execution time: 8_566_000 picoseconds. + Weight::from_parts(8_776_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -73,10 +70,10 @@ impl pallet_sudo::WeightInfo for WeightInfo { /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn remove_key() -> Weight { // Proof Size summary in bytes: - // Measured: `132` + // Measured: `37` // Estimated: `1517` - // Minimum execution time: 9_959_000 picoseconds. - Weight::from_parts(10_290_000, 0) + // Minimum execution time: 6_622_000 picoseconds. + Weight::from_parts(6_802_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/parachain/runtimes/nexus/src/weights/pallet_timestamp.rs b/parachain/runtimes/nexus/src/weights/pallet_timestamp.rs index 932d6d28e..74f02bfe2 100644 --- a/parachain/runtimes/nexus/src/weights/pallet_timestamp.rs +++ b/parachain/runtimes/nexus/src/weights/pallet_timestamp.rs @@ -1,26 +1,23 @@ //! Autogenerated weights for `pallet_timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=nexus-2000 // --wasm-execution=compiled -// --pallet -// pallet_timestamp -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output // parachain/runtimes/nexus/src/weights/pallet_timestamp.rs @@ -41,20 +38,20 @@ impl pallet_timestamp::WeightInfo for WeightInfo { /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { // Proof Size summary in bytes: - // Measured: `120` + // Measured: `0` // Estimated: `1493` - // Minimum execution time: 8_055_000 picoseconds. - Weight::from_parts(8_296_000, 0) + // Minimum execution time: 4_128_000 picoseconds. + Weight::from_parts(4_329_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } fn on_finalize() -> Weight { // Proof Size summary in bytes: - // Measured: `57` + // Measured: `36` // Estimated: `0` - // Minimum execution time: 3_797_000 picoseconds. - Weight::from_parts(3_918_000, 0) + // Minimum execution time: 2_955_000 picoseconds. + Weight::from_parts(3_046_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachain/runtimes/nexus/src/weights/pallet_utility.rs b/parachain/runtimes/nexus/src/weights/pallet_utility.rs index 65ba22fb2..f30fca2f6 100644 --- a/parachain/runtimes/nexus/src/weights/pallet_utility.rs +++ b/parachain/runtimes/nexus/src/weights/pallet_utility.rs @@ -1,26 +1,23 @@ //! Autogenerated weights for `pallet_utility` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `polytope-labs`, CPU: `AMD Ryzen Threadripper PRO 5995WX 64-Cores` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // target/release/hyperbridge // benchmark // pallet -// --chain=nexus-2000 // --wasm-execution=compiled -// --pallet -// pallet_utility -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 +// --pallet=pallet_utility +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --genesis-builder=runtime +// --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm // --output // parachain/runtimes/nexus/src/weights/pallet_utility.rs @@ -40,18 +37,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_801_000 picoseconds. - Weight::from_parts(65_089_909, 0) + // Minimum execution time: 4_859_000 picoseconds. + Weight::from_parts(32_335_841, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 22_207 - .saturating_add(Weight::from_parts(4_733_556, 0).saturating_mul(c.into())) + // Standard Error: 7_108 + .saturating_add(Weight::from_parts(2_907_971, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_081_000 picoseconds. - Weight::from_parts(6_342_000, 0) + // Minimum execution time: 4_749_000 picoseconds. + Weight::from_parts(4_929_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -59,18 +56,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_640_000 picoseconds. - Weight::from_parts(2_861_766, 0) + // Minimum execution time: 4_799_000 picoseconds. + Weight::from_parts(12_192_045, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_750 - .saturating_add(Weight::from_parts(5_019_806, 0).saturating_mul(c.into())) + // Standard Error: 1_831 + .saturating_add(Weight::from_parts(3_234_418, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_737_000 picoseconds. - Weight::from_parts(8_897_000, 0) + // Minimum execution time: 6_001_000 picoseconds. + Weight::from_parts(6_262_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -78,10 +75,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_721_000 picoseconds. - Weight::from_parts(541_167, 0) + // Minimum execution time: 4_258_000 picoseconds. + Weight::from_parts(4_398_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_996 - .saturating_add(Weight::from_parts(4_656_083, 0).saturating_mul(c.into())) + // Standard Error: 6_892 + .saturating_add(Weight::from_parts(3_024_787, 0).saturating_mul(c.into())) } } diff --git a/scripts/benchmarking.sh b/scripts/benchmarking.sh index 8010b2761..1291592bc 100755 --- a/scripts/benchmarking.sh +++ b/scripts/benchmarking.sh @@ -12,43 +12,33 @@ declare -a arr=( "pallet_utility" "cumulus_pallet_parachain_system" "pallet_session" +"ismp_grandpa" ) # nexus runtime for i in "${arr[@]}" do - target/release/hyperbridge benchmark pallet \ - --chain=nexus-2000 \ + cargo run -F=runtime-benchmarks -rp hyperbridge benchmark pallet \ --wasm-execution=compiled \ - --pallet "$i" \ - --extrinsic "*" \ - --steps 50 \ - --repeat 20 \ + --pallet="$i" \ + --extrinsic="*" \ + --steps=50 \ + --repeat=20 \ + --genesis-builder=runtime \ + --runtime=./target/release/wbuild/nexus-runtime/nexus_runtime.compact.wasm \ --output "parachain/runtimes/nexus/src/weights/$i.rs" done -# messier runtime -# for i in "${arr[@]}" -# do -# target/release/hyperbridge benchmark pallet \ -# --chain=messier-2000 \ -# --wasm-execution=compiled \ -# --pallet "$i" \ -# --extrinsic "*" \ -# --steps 50 \ -# --repeat 20 \ -# --output "parachain/runtimes/messier/src/weights/$i.rs" -# done - # gargantua runtime for i in "${arr[@]}" do - target/release/hyperbridge benchmark pallet \ - --chain=gargantua-2000 \ + cargo run -F=runtime-benchmarks -rp hyperbridge benchmark pallet \ --wasm-execution=compiled \ - --pallet "$i" \ - --extrinsic "*" \ - --steps 50 \ - --repeat 20 \ - --output "parachain/runtimes/gargantua/src/weights/$i.rs" + --pallet="$i" \ + --extrinsic="*" \ + --steps=50 \ + --repeat=20 \ + --genesis-builder=runtime \ + --runtime=./target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm \ + --output="parachain/runtimes/gargantua/src/weights/$i.rs" done