From 56ffc1f8f5c6907f08eb218ec193b651dae0f47a Mon Sep 17 00:00:00 2001 From: Rawda Fawzy <47260239+rawdaGastan@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:10:46 +0200 Subject: [PATCH 01/44] add change power target to go client (#901) * add change power target to go client * rename function --- clients/tfchain-client-go/node.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/clients/tfchain-client-go/node.go b/clients/tfchain-client-go/node.go index 0d18362a1..b9b436e16 100644 --- a/clients/tfchain-client-go/node.go +++ b/clients/tfchain-client-go/node.go @@ -688,6 +688,32 @@ func (s *Substrate) SetNodePowerState(identity Identity, up bool) (hash types.Ha return callResponse.Hash, nil } +// SetNodePowerTarget updates the power target of a node +func (s *Substrate) SetNodePowerTarget(identity Identity, nodeID uint32, up bool) (hash types.Hash, err error) { + cl, meta, err := s.GetClient() + if err != nil { + return hash, err + } + + power := Power{ + IsUp: up, + IsDown: !up, + } + + c, err := types.NewCall(meta, "TfgridModule.change_power_target", nodeID, power) + + if err != nil { + return hash, errors.Wrap(err, "failed to create call") + } + + callResponse, err := s.Call(cl, meta, identity, c) + if err != nil { + return hash, errors.Wrap(err, "failed to change node power target") + } + + return callResponse.Hash, nil +} + // GetPowerTarget returns the power target for a node func (s *Substrate) GetPowerTarget(nodeID uint32) (power NodePower, err error) { cl, meta, err := s.GetClient() From 20cc03a2da604d06cfdd066ece66bf1567f1b197 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:27:38 -0300 Subject: [PATCH 02/44] chore(polkadot): upgrade to v1.0.0 (#898) --- clients/tfchain-client-go/readme.md | 101 ++++++------- docs/development/README.md | 26 ++-- docs/development/fork-off-substrate.md | 28 ++-- docs/development/local_multinode.md | 35 +++-- docs/misc/creating_validator.md | 78 +++++----- .../.devcontainer/devcontainer.json | 21 ++- substrate-node/Cargo.toml | 135 +++++++++--------- .../substrate-node/templates/deployment.yaml | 14 +- .../substrate-node/templates/service.yaml | 4 - .../charts/substrate-node/values.yaml | 6 +- substrate-node/node/Cargo.toml | 2 + .../{command_helper.rs => benchmarking.rs} | 108 +++++++++----- substrate-node/node/src/chain_spec.rs | 14 +- substrate-node/node/src/cli.rs | 1 + substrate-node/node/src/command.rs | 66 +++++---- substrate-node/node/src/main.rs | 4 +- substrate-node/node/src/rpc.rs | 4 +- substrate-node/node/src/service.rs | 49 ++++--- .../pallet-burning/src/benchmarking.rs | 4 +- .../pallets/pallet-burning/src/lib.rs | 4 +- .../pallets/pallet-burning/src/mock.rs | 30 ++-- substrate-node/pallets/pallet-dao/src/dao.rs | 5 +- substrate-node/pallets/pallet-dao/src/lib.rs | 6 +- substrate-node/pallets/pallet-dao/src/mock.rs | 28 ++-- .../pallets/pallet-kvstore/README.md | 52 ++++--- .../pallets/pallet-kvstore/src/tests.rs | 27 ++-- .../pallet-smart-contract/src/benchmarking.rs | 6 +- .../pallet-smart-contract/src/billing.rs | 9 +- .../pallets/pallet-smart-contract/src/lib.rs | 18 +-- .../src/migrations/v10.rs | 9 +- .../src/migrations/v11.rs | 38 +++-- .../src/migrations/v6.rs | 23 +-- .../src/migrations/v8.rs | 16 ++- .../src/migrations/v9.rs | 10 +- .../pallets/pallet-smart-contract/src/mock.rs | 33 ++--- .../pallets/pallet-tfgrid/src/benchmarking.rs | 8 +- .../pallets/pallet-tfgrid/src/farm.rs | 3 +- .../pallets/pallet-tfgrid/src/lib.rs | 60 ++------ .../pallet-tfgrid/src/migrations/v10.rs | 23 +-- .../pallet-tfgrid/src/migrations/v11.rs | 23 +-- .../pallet-tfgrid/src/migrations/v12.rs | 23 +-- .../pallet-tfgrid/src/migrations/v13.rs | 23 +-- .../pallet-tfgrid/src/migrations/v14.rs | 26 ++-- .../pallet-tfgrid/src/migrations/v15.rs | 23 +-- .../pallet-tfgrid/src/migrations/v17.rs | 23 +-- .../pallets/pallet-tfgrid/src/mock.rs | 35 ++--- .../pallets/pallet-tfgrid/src/pricing.rs | 13 +- .../pallets/pallet-tft-bridge/src/lib.rs | 36 ++--- .../pallet-tft-bridge/src/migrations/types.rs | 10 +- .../pallet-tft-bridge/src/migrations/v2.rs | 89 +++++++----- .../pallets/pallet-tft-bridge/src/mock.rs | 29 ++-- .../pallet-tft-bridge/src/tft_bridge.rs | 6 +- .../pallet-tft-price/src/benchmarking.rs | 4 +- .../pallets/pallet-tft-price/src/lib.rs | 20 +-- .../pallets/pallet-tft-price/src/mock.rs | 29 ++-- .../pallets/pallet-tft-price/src/tft_price.rs | 11 +- .../pallets/pallet-validator/src/lib.rs | 12 +- .../pallets/pallet-validator/src/mock.rs | 31 ++-- .../pallets/substrate-validator-set/readme.md | 29 ++-- .../substrate-validator-set/src/lib.rs | 22 +-- .../substrate-validator-set/src/mock.rs | 31 ++-- substrate-node/runtime/Cargo.toml | 2 +- substrate-node/runtime/src/lib.rs | 45 +++--- substrate-node/runtime/src/migrations/mod.rs | 3 +- .../tfgrid_v15_smart_contract_v8.rs | 23 +-- .../src/migrations/update_storage_version.rs | 36 +++++ substrate-node/rust-toolchain.toml | 2 +- substrate-node/tests/SubstrateNetwork.py | 29 ++-- 68 files changed, 944 insertions(+), 852 deletions(-) rename substrate-node/node/src/{command_helper.rs => benchmarking.rs} (59%) create mode 100644 substrate-node/runtime/src/migrations/update_storage_version.rs diff --git a/clients/tfchain-client-go/readme.md b/clients/tfchain-client-go/readme.md index b449ae9bc..190c55ef4 100644 --- a/clients/tfchain-client-go/readme.md +++ b/clients/tfchain-client-go/readme.md @@ -2,83 +2,84 @@ # **TFchain go client** -- This library is a go implementation of a client for the TFChain. -- Internally, our own [fork](https://github.com/threefoldtech/go-substrate-rpc-client) of is used to make substrate rpc calls. -- Used in multiple repos like [zos](https://github.com/threefoldtech/zos), [rmb-go](https://github.com/threefoldtech/rmb_go), and [terraform-provider-grid](https://github.com/threefoldtech/terraform-provider-grid). +* This library is a go implementation of a client for the TFChain. +* Internally, our own [fork](https://github.com/threefoldtech/go-substrate-rpc-client) of is used to make substrate rpc calls. +* Used in multiple repos like [zos](https://github.com/threefoldtech/zos), [rmb-go](https://github.com/threefoldtech/rmb_go), and [terraform-provider-grid](https://github.com/threefoldtech/terraform-provider-grid). ## **Usage** To make substrate calls: -- First, start a substrate connection against the desired url for the chain: +* First, start a substrate connection against the desired url for the chain: - ```go - manager := NewManager("wss://tfchain.grid.tf/ws") - substrateConnection, err := manager.Substrate() - ``` + ```go + manager := NewManager("wss://tfchain.grid.tf/ws") + substrateConnection, err := manager.Substrate() + ``` + +* These are the urls for different chain networks: -- These are the urls for different chain networks: - - - devnet: - - testnet: - - qanet: - - mainnet: + * devnet: + * testnet: + * qanet: + * mainnet: -- It is the user's responsibility to close the connection. +* It is the user's responsibility to close the connection. - ```go - defer substrateConnection.Close() - ``` + ```go + defer substrateConnection.Close() + ``` -- Then, a user could use the provided api calls to communicate with the chain. like: +* Then, a user could use the provided api calls to communicate with the chain. like: - ```go - contractID, err := substrateConnection.CreateNodeContract(identity, nodeID, body, hash, publicIPsCount, solutionProviderID) - ``` + ```go + contractID, err := substrateConnection.CreateNodeContract(identity, nodeID, body, hash, publicIPsCount, solutionProviderID) + ``` -- Also, if a connection is closed for some reason like timing out, internally, it is reopened if nothing blocks. -- All provided api calls are found under the Substrate struct. +* Also, if a connection is closed for some reason like timing out, internally, it is reopened if nothing blocks. + +* All provided api calls are found under the Substrate struct. ## **Run tests** - To run the tests, you could either run it against a local docker image of the TFChain, or against devnet +To run the tests, you could either run it against a local docker image of the TFChain, or against devnet -- ### **Run against local docker image** +* ### **Run against local docker image** - To run tests against a local docker image of tfchain, you need to set CI environment variable to anything actually. + To run tests against a local docker image of tfchain, you need to set CI environment variable to anything actually. - ```bash - docker run -d -p 9944:9944 threefolddev/tfchain:2.2.0-rc8 --dev --ws-external - sleep 3 - export CI="true" - go test . -v - ``` + ```bash + docker run -d -p 9944:9944 threefolddev/tfchain:2.2.0-rc8 --dev --rpc-external + sleep 3 + export CI="true" + go test . -v + ``` -- ### **Run against devnet** +* ### **Run against devnet** - ```bash - unset CI - go test . -v - ``` + ```bash + unset CI + go test . -v + ``` ### **Test Coverage** -- 30.6% of statements +* 30.6% of statements ## **Workflows** -- ### **Test** - - - This workflow runs all tests found in the root directory against a local docker image of the [TFChain](https://github.com/threefoldtech/tfchain) found [here](https://hub.docker.com/r/threefolddev/tfchain). +* ### **Test** -- ### **Lint** + * This workflow runs all tests found in the root directory against a local docker image of the [TFChain](https://github.com/threefoldtech/tfchain) found [here](https://hub.docker.com/r/threefolddev/tfchain). - - This workflow ensures linting, so make sure to run these commands without any errors before pushing code: +* ### **Lint** - ```bash - golangci-lint run - ``` + * This workflow ensures linting, so make sure to run these commands without any errors before pushing code: - ```bash - gofmt -d -l . - ``` + ```bash + golangci-lint run + ``` + + ```bash + gofmt -d -l . + ``` diff --git a/docs/development/README.md b/docs/development/README.md index aa721798b..1883d6db1 100644 --- a/docs/development/README.md +++ b/docs/development/README.md @@ -26,14 +26,16 @@ cargo build ``` ## Run a dev node + A dev node is a single-node network that runs on your local machine. It is useful for testing and debugging purposes. To run a dev node, you need to do the following: ```sh cd tfchain/substrate-node cargo build -./target/debug/tfchain --dev --ws-external --pruning archive +./target/debug/tfchain --dev --rpc-external --pruning archive ``` + This will run the node in default development mode. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. ## Run multiple local nodes @@ -45,11 +47,12 @@ If you want to run tfchain in a multi node network (more than one node), see [lo You can use the Polkadot JS Apps ui to connect to your dev node. You can access the web interface at https://polkadot.js.org/apps/ and change the settings to use a local node with the address `ws://127.0.0.1:9944`. This will allow you to interact with your dev node and perform basic operations. -- Use the Polkadot JS Apps to interact with your nodes. You can access the web interface at https://polkadot.js.org/apps/ and change the settings to use a local node or a remote node with the appropriate address. -- Use the `Accounts` tab to manage your accounts and balances. You can create new accounts, import existing accounts, transfer tokens, and view your transaction history. -- Use the `Explorer` tab to view the network status and activity. You can see the latest blocks, events, validators, and peers. -- Use the `Chain State` tab to query the state of the network. You can select a module and a storage item and see its value at any given block. -- Use the `Extrinsics` tab to submit extrinsics to the network. You can select an account, a module, and a function and provide any required parameters. + +* Use the Polkadot JS Apps to interact with your nodes. You can access the web interface at https://polkadot.js.org/apps/ and change the settings to use a local node or a remote node with the appropriate address. +* Use the `Accounts` tab to manage your accounts and balances. You can create new accounts, import existing accounts, transfer tokens, and view your transaction history. +* Use the `Explorer` tab to view the network status and activity. You can see the latest blocks, events, validators, and peers. +* Use the `Chain State` tab to query the state of the network. You can select a module and a storage item and see its value at any given block. +* Use the `Extrinsics` tab to submit extrinsics to the network. You can select an account, a module, and a function and provide any required parameters. ## Create an account @@ -79,19 +82,18 @@ A pallet is a modular component that defines some logic and functionality for th To learn about pallet development, you can start by checking these resources: -- Get start by reading The substrate [Build application logic tutorials](https://docs.substrate.io/tutorials/build-application-logic/). these tutorials focus on how you can customize the runtime using pallets, creating a custom pallet using macros, adding it to the runtime, and testing its functionality. - -- Check the [the Substrate collectibles workshop](https://docs.substrate.io/tutorials/collectibles-workshop/runtime-and-pallets/). This is an interactive, hands-on, and self-paced workshop that introduces the basic steps for building a blockchain-based application using Substrate. +* Get start by reading The substrate [Build application logic tutorials](https://docs.substrate.io/tutorials/build-application-logic/). these tutorials focus on how you can customize the runtime using pallets, creating a custom pallet using macros, adding it to the runtime, and testing its functionality. -- Explore other existing pallets on the [Substrate GitHub repository](https://github.com/paritytech/substrate/tree/master/frame) and learn from their code. You can see how different pallets implement different features and patterns, such as storage, events, errors, hooks, traits, weights, origins, calls, etc. +* Check the [the Substrate collectibles workshop](https://docs.substrate.io/tutorials/collectibles-workshop/runtime-and-pallets/). This is an interactive, hands-on, and self-paced workshop that introduces the basic steps for building a blockchain-based application using Substrate. +* Explore other existing pallets on the [Substrate GitHub repository](https://github.com/paritytech/substrate/tree/master/frame) and learn from their code. You can see how different pallets implement different features and patterns, such as storage, events, errors, hooks, traits, weights, origins, calls, etc. ## Writing tests for pallets Every pallet should have all functionality tested, you can write unit tests and integration tests for a pallet: -- Unit tests: check this [guide](https://docs.substrate.io/reference/how-to-guides/testing/) -- Integration tests: see this [document](../../substrate-node/tests/readme.md) +* Unit tests: check this [guide](https://docs.substrate.io/reference/how-to-guides/testing/) +* Integration tests: see this [document](../../substrate-node/tests/readme.md) ## Upgrading Substrate version diff --git a/docs/development/fork-off-substrate.md b/docs/development/fork-off-substrate.md index 382942c95..3937fbee8 100644 --- a/docs/development/fork-off-substrate.md +++ b/docs/development/fork-off-substrate.md @@ -5,51 +5,53 @@ The fork-off-substrate tool is a handy tool that allows you to download and run In this guide, we will show you how to use the tool to create a local fork of the TFchain network. ### Prerequisites + Before you start, you need to have the following items: -- The executable binary and the runtime WASM blob of the target blockchain. You can either compile them from the source code of the blockchain project, or copy them from a trusted node that runs the blockchain. For TFchain, you can find the source code [here](https://github.com/threefoldtech/tfchain) and the instructions on how to compile it [here](https://github.com/threefoldtech/tfchain/tree/development/docs/development). Find the Wasm binary file in the target directory. The file name should be `tfchain_runtime.compact.wasm` and the file path should be something like this: +* The executable binary and the runtime WASM blob of the target blockchain. You can either compile them from the source code of the blockchain project, or copy them from a trusted node that runs the blockchain. For TFchain, you can find the source code [here](https://github.com/threefoldtech/tfchain) and the instructions on how to compile it [here](https://github.com/threefoldtech/tfchain/tree/development/docs/development). Find the Wasm binary file in the target directory. The file name should be `tfchain_runtime.compact.wasm` and the file path should be something like this: ```bash ./substrate-node/target/debug/wbuild/tfchain-runtime/tfchain_runtime.compact.wasm ``` ### Steps -- Install the `fork-off-substrate` tool dependencies on your computer, go to `tfchain` directory then follow these steps: + +* Install the `fork-off-substrate` tool dependencies on your computer, go to `tfchain` directory then follow these steps: ```bash cd ./tools/fork-off-substrate npm i ``` -- Create a folder called data inside the top folder (fork-off-substrate). +* Create a folder called data inside the top folder (fork-off-substrate). ```bash mkdir data ``` -- Copy the executable/binary of your substrate based node inside the data folder and rename it to `binary` +* Copy the executable/binary of your substrate based node inside the data folder and rename it to `binary` ```bash cp ../../substrate-node/target/debug/tfchain ./data/binary ``` -- Copy the runtime WASM blob of your substrate based blockchain to the data folder and rename it to `runtime.wasm`. +* Copy the runtime WASM blob of your substrate based blockchain to the data folder and rename it to `runtime.wasm`. ```bash cp ../../substrate-node/target/debug/wbuild/tfchain-runtime/tfchain_runtime.compact.wasm ./data/runtime.wasm ``` -- Run a full node for your blockchain locally (Recommended but should be fully synced) or have an external endpoint handy (but should be running with `--rpc-methods Unsafe` flag) +* Run a full node for your blockchain locally (Recommended but should be fully synced) or have an external endpoint handy (but should be running with `--rpc-methods Unsafe` flag) ```bash - ../../substrate-node/target/debug/tfchain --chain ../../substrate-node/chainspecs/dev/chainSpecRaw.json --ws-external --rpc-methods Unsafe + ../../substrate-node/target/debug/tfchain --chain ../../substrate-node/chainspecs/dev/chainSpecRaw.json --rpc-external --rpc-methods Unsafe ``` -- Run the script +* Run the script - - If using a local node, simply run the script using + * If using a local node, simply run the script using ```bash npm start ``` - - If you are using an external/non-default endpoint, you need to provide it to the script via the HTTP_RPC_ENDPOINT environment variable + * If you are using an external/non-default endpoint, you need to provide it to the script via the HTTP\_RPC\_ENDPOINT environment variable ```bash HTTP_RPC_ENDPOINT=https:// npm start ``` -- You should have the genesis file for the forked chain inside the data folder. It will be called `fork.json`. -- You can now run a new chain using this genesis file +* You should have the genesis file for the forked chain inside the data folder. It will be called `fork.json`. +* You can now run a new chain using this genesis file ```bash ./data/binary --chain ./data/fork.json --alice ``` -for more information about this tool, you can read this [blog post](https://mudit.blog/fork-substrate-blockchain/). \ No newline at end of file +for more information about this tool, you can read this [blog post](https://mudit.blog/fork-substrate-blockchain/). diff --git a/docs/development/local_multinode.md b/docs/development/local_multinode.md index 43f2eb528..82cd5b21e 100644 --- a/docs/development/local_multinode.md +++ b/docs/development/local_multinode.md @@ -9,7 +9,8 @@ cd substrate-node cargo build ``` -you can +you can + ## Start the network In a terminal window execute the following command: @@ -20,8 +21,7 @@ In a terminal window execute the following command: --chain local \ --alice \ --port 30333 \ - --ws-port 9945 \ - --rpc-port 9933 \ + --rpc-port 9945 \ --node-key 0000000000000000000000000000000000000000000000000000000000000001 \ --validator ``` @@ -36,8 +36,7 @@ In a second terminal window executing the following command: --chain local \ --bob \ --port 30334 \ - --ws-port 9946 \ - --rpc-port 9934 \ + --rpc-port 9946 \ --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \ --validator \ --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp @@ -73,25 +72,23 @@ Verify that you see lines similar to the following in the terminal where you sta In these lines, you can see the following information about your blockchain: -- The second node identity was discovered on the network (12D3KooWBCbmQovz78Hq7MzPxdx9d1gZzXMsn6HtWj29bW51YUKB). -- The node has a one peer (1 peers). -- The nodes have produced some blocks (best: #3 (0x0c55…d51b)). -- The blocks are being finalized (finalized #1 (0xf086…9847)). +* The second node identity was discovered on the network (12D3KooWBCbmQovz78Hq7MzPxdx9d1gZzXMsn6HtWj29bW51YUKB). +* The node has a one peer (1 peers). +* The nodes have produced some blocks (best: #3 (0x0c55…d51b)). +* The blocks are being finalized (finalized #1 (0xf086…9847)). ## Review the command-line options Before moving on, have a look at how the following options are used to start the node. -- --base-path Specifies the directory for storing all of the data related to this chain. -- --chain local Specifies the chain specification to use. Valid predefined chain specifications include local, development, and staging. -- --alice Adds the predefined keys for the alice account to the node's keystore. With this setting, the alice account is used for block production and finalization. -- --port 30333 Specifies the port to listen on for peer-to-peer (p2p) traffic. Because this tutorial uses two nodes running on the same physical computer to simulate a network, you must explicitly specify a different port for at least one account. -- --ws-port 9945 Specifies the port to listen on for incoming WebSocket traffic. The default port is 9944. This tutorial uses a custom web socket port number (9945). -- --rpc-port 9933 Specifies the port to listen on for incoming RPC traffic. The default port is 9933. -- --node-key Specifies the Ed25519 secret key to use for libp2p networking. You should only use this option for development and testing. -- --telemetry-url Specifies where to send telemetry data. For this tutorial, you can send telemetry data to a server hosted by Parity that is available for anyone to use. -- --validator Specifies that this node participates in block production and finalization for the network. - +* \--base-path Specifies the directory for storing all of the data related to this chain. +* \--chain local Specifies the chain specification to use. Valid predefined chain specifications include local, development, and staging. +* \--alice Adds the predefined keys for the alice account to the node's keystore. With this setting, the alice account is used for block production and finalization. +* \--port 30333 Specifies the port to listen on for peer-to-peer (p2p) traffic. Because this tutorial uses two nodes running on the same physical computer to simulate a network, you must explicitly specify a different port for at least one account. +* \--rpc-port 9945 Specifies the port to listen on for incoming RPC traffic. The default port is 9944. +* \--node-key Specifies the Ed25519 secret key to use for libp2p networking. You should only use this option for development and testing. +* \--telemetry-url Specifies where to send telemetry data. For this tutorial, you can send telemetry data to a server hosted by Parity that is available for anyone to use. +* \--validator Specifies that this node participates in block production and finalization for the network. ## What next diff --git a/docs/misc/creating_validator.md b/docs/misc/creating_validator.md index 78a9b963e..97d43e24d 100644 --- a/docs/misc/creating_validator.md +++ b/docs/misc/creating_validator.md @@ -10,9 +10,9 @@ The transactions weights in TFchain were benchmarked on standard hardware. It is Standard Hardware For the full details of the standard hardware please see here. -- CPU - Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz -- Storage - A NVMe solid state drive. Should be reasonably sized to deal with blockchain growth. Starting around 80GB - 160GB will be okay for the first six months of TFchain, but will need to be re-evaluated every six months. -- Memory - 64GB ECC. +* CPU - Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz +* Storage - A NVMe solid state drive. Should be reasonably sized to deal with blockchain growth. Starting around 80GB - 160GB will be okay for the first six months of TFchain, but will need to be re-evaluated every six months. +* Memory - 64GB ECC. The specs posted above are by no means the minimum specs that you could use when running a validator, however you should be aware that if you are using less you may need to toggle some extra optimizations in order to be equal to other validators that are running the standard. @@ -101,9 +101,9 @@ You can now start synchronising chain data. Bootnodes examples: -- Devnet bootnode: `/ip4/185.206.122.7/tcp/30333/p2p/12D3KooWLcMLBg9itjQL1EXsAqkJFPhqESHqJKY7CBKmhhhL8fdp` -- Testnet bootnode: `/ip4/51.68.204.40/tcp/30333/p2p/12D3KooWHe8Wbn6dDbyxXietaXSRTZJfykPRgrkJDjXh9xZ4383k` -- Mainnet bootnode: `/ip4/185.206.122.83/tcp/30333/p2p/12D3KooWLtsdtQHswnXkLRH7e8vZJHktsh7gfuL5PoADV51JJ6wY` +* Devnet bootnode: `/ip4/185.206.122.7/tcp/30333/p2p/12D3KooWLcMLBg9itjQL1EXsAqkJFPhqESHqJKY7CBKmhhhL8fdp` +* Testnet bootnode: `/ip4/51.68.204.40/tcp/30333/p2p/12D3KooWHe8Wbn6dDbyxXietaXSRTZJfykPRgrkJDjXh9xZ4383k` +* Mainnet bootnode: `/ip4/185.206.122.83/tcp/30333/p2p/12D3KooWLtsdtQHswnXkLRH7e8vZJHktsh7gfuL5PoADV51JJ6wY` You can begin syncing your node by running the following command: @@ -147,16 +147,16 @@ If you are interested in determining how much longer you have to go, your server ## Create a Validator object -- dev: -- test: -- main: +* dev: +* test: +* main: Open polkadot js link in the browser based on the network you want to validate on. -- Browse to `accounts` and click `Add Account`, create an account and name it `VALIDATOR_ACCOUNT`. Take note of the mnemonic. - This account will be your account that manages the Validator and manages your council membership (voting). Make sure to send some TFT to this account. -- (Optional) Create another account and name it `ANYNAME_STASH`. This account will be your stash account. -- Create one more account and call it `VALIDATOR_NODE_ACCOUNT`, this account will be used to participate in consensus. +* Browse to `accounts` and click `Add Account`, create an account and name it `VALIDATOR_ACCOUNT`. Take note of the mnemonic. + This account will be your account that manages the Validator and manages your council membership (voting). Make sure to send some TFT to this account. +* (Optional) Create another account and name it `ANYNAME_STASH`. This account will be your stash account. +* Create one more account and call it `VALIDATOR_NODE_ACCOUNT`, this account will be used to participate in consensus. You now should have 3 accounts. @@ -180,11 +180,11 @@ This call needs to be signed with your account (`VALIDATOR_ACCOUNT`) that manage Information needed: -- validator_node_account: Account ID generated from previous step (`VALIDATOR_NODE_ACCOUNT`) -- stash_account: Stash account, can be your `VALIDATOR_ACCOUNT` -- description: Reason why I want to become a validator -- tfconnectid: Your Threefold connect name -- info: link to webpage or linked in profile +* validator\_node\_account: Account ID generated from previous step (`VALIDATOR_NODE_ACCOUNT`) +* stash\_account: Stash account, can be your `VALIDATOR_ACCOUNT` +* description: Reason why I want to become a validator +* tfconnectid: Your Threefold connect name +* info: link to webpage or linked in profile If all information is filled in correctly. Click on `Submit transaction` and sign. If all goes well, the Council will approve your request. @@ -204,7 +204,7 @@ Transfer some balance to this account (you can see the address in the polkadot U Restart tfchain with: ```sh -./target/release/tfchain ...otherArgs --ws-external --rpc-methods Unsafe --rpc-external --telemetry-url 'wss://shard1.telemetry.tfchain.grid.tf/submit 1' +./target/release/tfchain ...otherArgs --rpc-external --rpc-methods Unsafe --telemetry-url 'wss://shard1.telemetry.tfchain.grid.tf/submit 1' ``` #### Using polkodatjs @@ -220,7 +220,7 @@ yarn yarn start ``` -Browse to and connect to the new node over its public ip. Make sure to specify the port, like: ws://YOUR_MACHINE_PUBLIC_IP:9944 +Browse to and connect to the new node over its public ip. Make sure to specify the port, like: ws://YOUR\_MACHINE\_PUBLIC\_IP:9944 First insert the types: Go to `Settings` -> `Developer` -> Copy paste output of following [file](https://raw.githubusercontent.com/threefoldtech/tfchain_client_js/master/types.json) @@ -240,14 +240,12 @@ Go to `Extrinsics` -> `session` -> `setKeys` -> (make sure to use the created no input: -``` -keys: the key from rotate keys ouput -proofs: 0 -``` + keys: the key from rotate keys ouput + proofs: 0 Now we can start the node in Validator mode: -Restart tfchain and remove flags: `--ws-external --rpc-methods Unsafe --rpc-external` and replace that with `--validator` +Restart tfchain and remove flags: `--rpc-external --rpc-methods Unsafe` and replace that with `--validator` Your node is now running in validator mode. Next up you need to manually activate the validator. @@ -265,22 +263,20 @@ Select `ActivateValidatorNode` and click Submit Transaction. Example systemd file: -``` -[Unit] -Description=TFchain service -After=network.target -StartLimitIntervalSec=0 - -[Service] -Type=simple -Restart=always -RestartSec=1 -User=user -ExecStart=/home/user/tfchain/substrate-node/target/release/tfchain --chain /home/user/tfchain/substrate-node/chainspecs/dev/chainSpec.json --pruning=archive --bootnodes /ip4/185.206.122.7/tcp/30333/p2p/12D3KooWLcMLBg9itjQL1EXsAqkJFPhqESHqJKY7CBKmhhhL8fdp --validator --telemetry-url 'wss://shard1.telemetry.tfchain.grid.tf/submit 1' - -[Install] -WantedBy=multi-user.target -``` + [Unit] + Description=TFchain service + After=network.target + StartLimitIntervalSec=0 + + [Service] + Type=simple + Restart=always + RestartSec=1 + User=user + ExecStart=/home/user/tfchain/substrate-node/target/release/tfchain --chain /home/user/tfchain/substrate-node/chainspecs/dev/chainSpec.json --pruning=archive --bootnodes /ip4/185.206.122.7/tcp/30333/p2p/12D3KooWLcMLBg9itjQL1EXsAqkJFPhqESHqJKY7CBKmhhhL8fdp --validator --telemetry-url 'wss://shard1.telemetry.tfchain.grid.tf/submit 1' + + [Install] + WantedBy=multi-user.target Replace `user` by your username. diff --git a/substrate-node/.devcontainer/devcontainer.json b/substrate-node/.devcontainer/devcontainer.json index 9452e0ade..3dc8a239a 100644 --- a/substrate-node/.devcontainer/devcontainer.json +++ b/substrate-node/.devcontainer/devcontainer.json @@ -14,12 +14,19 @@ 3000, 9944 ], - "preCreateCommand": ["cargo build", "cargo check"], - "postStartCommand": "./target/debug/node-template --dev --ws-external", + "preCreateCommand": [ + "cargo build", + "cargo check" + ], + "postStartCommand": "./target/debug/node-template --dev --rpc-external", "menuActions": [ - {"id": "polkadotjs", - "label": "Open PolkadotJS Apps", - "type": "external-preview", - "args": ["https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F/$HOST/wss"]} + { + "id": "polkadotjs", + "label": "Open PolkadotJS Apps", + "type": "external-preview", + "args": [ + "https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F/$HOST/wss" + ] + } ] -} +} \ No newline at end of file diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index ca0599f98..a0caf5172 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -24,7 +24,7 @@ resolver = "2" base58 = {version = "0.2.0", default-features = false} bitflags = {version = "1.3.2", default-features = false} clap = "4.0.9" -parity-scale-codec = { version = "3.2.2", default-features = false } +parity-scale-codec = { version = "3.6.1", default-features = false } env_logger = "0.10.0" futures = {version = "0.3.21", default-features = false} hex = {version = "0.4.0", default-features = false} @@ -60,73 +60,74 @@ tfchain-support = { path = "support", default-features = false } tfchain-runtime = { path = "runtime", default-features = false } # Benchmarking (with default disabled) -frame-system-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} +frame-system-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} # Substrate (with default disabled) -frame-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -frame-executive = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -frame-support = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -frame-system = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -frame-system-rpc-runtime-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -frame-try-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-aura = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-authorship = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-balances = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-collective = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-grandpa = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-membership = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-scheduler = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-session = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-session-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-timestamp = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-transaction-payment = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-transaction-payment-rpc-runtime-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -pallet-utility = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-block-builder = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-consensus-aura = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-core = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-inherents = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-io = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-offchain = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-session = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-std = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-transaction-pool = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-version = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-storage = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -try-runtime-cli = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-keystore = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} -sp-staking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42"} +frame-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +frame-executive = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +frame-support = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +frame-system = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +frame-system-rpc-runtime-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +frame-try-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-aura = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-authorship = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-balances = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-collective = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-grandpa = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-membership = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-scheduler = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-session = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-session-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-timestamp = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-transaction-payment = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-transaction-payment-rpc-runtime-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +pallet-utility = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-block-builder = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-consensus-aura = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-core = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-inherents = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-io = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-offchain = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-session = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-std = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-transaction-pool = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-version = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-storage = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +try-runtime-cli = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-keystore = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +sp-staking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} # Client-only (with default enabled) -polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42"} -polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42"} -polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42"} -sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-consensus-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-rpc = { git = "https://github.com/paritytech/substrate.git", "branch" = "polkadot-v0.9.42" } -sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-sysinfo = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sp-keyring = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -substrate-frame-rpc-system = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} -substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42"} +polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0"} +polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0"} +polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0"} +sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-consensus-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-rpc = { git = "https://github.com/paritytech/substrate.git", "branch" = "polkadot-v1.0.0" } +sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-sysinfo = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sc-offchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" } +sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sp-keyring = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +substrate-frame-rpc-system = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} diff --git a/substrate-node/charts/substrate-node/templates/deployment.yaml b/substrate-node/charts/substrate-node/templates/deployment.yaml index a4ba61e16..de6a2111e 100644 --- a/substrate-node/charts/substrate-node/templates/deployment.yaml +++ b/substrate-node/charts/substrate-node/templates/deployment.yaml @@ -38,24 +38,19 @@ spec: - name: rpc containerPort: {{ .Values.rpc_port }} protocol: TCP - - name: ws - containerPort: {{ .Values.ws_port }} - protocol: TCP env: - name: SUBSTRATE_NAME value: {{ .Values.name }} - name: SUBSTRATE_PORT value: {{ .Values.port | quote }} - - name: SUBSTRATE_WS_PORT - value: {{ .Values.ws_port | quote }} - name: SUBSTRATE_RPC_PORT value: {{ .Values.rpc_port | quote }} - name: SUBSTRATE_BOOT_NODE value: {{ .Values.boot_node }} - name: CHAINSPEC value: {{ .Values.chainspec }} - - name: WS_MAX_CONNECTIONS - value: {{ .Values.ws_max_connections | quote }} + - name: RPC_MAX_CONNECTIONS + value: {{ .Values.rpc_max_connections | quote }} - name: SUBSTRATE_RPC_METHODS value: {{ .Values.rpc_methods }} args: [ @@ -66,7 +61,6 @@ spec: "--keystore-path=/keystore", "--chain=$(CHAINSPEC)", "--port", "$(SUBSTRATE_PORT)", - "--ws-port", "$(SUBSTRATE_WS_PORT)", "--rpc-port", "$(SUBSTRATE_RPC_PORT)", {{ if .Values.boot_node }} "--bootnodes", "$(SUBSTRATE_BOOT_NODE)", @@ -76,9 +70,9 @@ spec: "--validator", "--pruning", "archive", {{ else }} - "--ws-external", + "--rpc-external", {{ end }} - "--ws-max-connections", "$(WS_MAX_CONNECTIONS)", + "--rpc-max-connections", "$(RPC_MAX_CONNECTIONS)", {{ if .Values.telemetry_url }} "--telemetry-url", {{ .Values.telemetry_url | quote }}, {{ end }} diff --git a/substrate-node/charts/substrate-node/templates/service.yaml b/substrate-node/charts/substrate-node/templates/service.yaml index f2b1c6a95..b817b8c8c 100644 --- a/substrate-node/charts/substrate-node/templates/service.yaml +++ b/substrate-node/charts/substrate-node/templates/service.yaml @@ -8,10 +8,6 @@ metadata: spec: type: {{ .Values.service.type }} ports: - - port: 80 - targetPort: {{ .Values.ws_port }} - protocol: TCP - name: ws - port: {{ .Values.port }} protocol: TCP name: http diff --git a/substrate-node/charts/substrate-node/values.yaml b/substrate-node/charts/substrate-node/values.yaml index 114ead932..4ef36de3b 100644 --- a/substrate-node/charts/substrate-node/values.yaml +++ b/substrate-node/charts/substrate-node/values.yaml @@ -43,15 +43,13 @@ name: 'tfchainnode01' port: 30333 -ws_port: 9944 - -rpc_port: 9933 +rpc_port: 9944 is_validator: true chainspec: '/etc/chainspecs/dev/chainSpecRaw.json' -ws_max_connections: 1048576 +rpc_max_connections: 1048576 #rpc_methods: "Unsafe" diff --git a/substrate-node/node/Cargo.toml b/substrate-node/node/Cargo.toml index 45d2af21e..b759c1045 100644 --- a/substrate-node/node/Cargo.toml +++ b/substrate-node/node/Cargo.toml @@ -28,11 +28,13 @@ serde_json.workspace = true sc-cli.workspace = true sp-core.workspace = true sc-executor.workspace = true +sc-network.workspace = true sc-service.workspace = true sc-telemetry.workspace = true sc-keystore.workspace = true sc-transaction-pool.workspace = true sc-transaction-pool-api.workspace = true +sc-offchain.workspace = true sc-consensus-aura.workspace = true sp-consensus-aura.workspace = true sp-consensus.workspace = true diff --git a/substrate-node/node/src/command_helper.rs b/substrate-node/node/src/benchmarking.rs similarity index 59% rename from substrate-node/node/src/command_helper.rs rename to substrate-node/node/src/benchmarking.rs index de991eaf2..06f55b394 100644 --- a/substrate-node/node/src/command_helper.rs +++ b/substrate-node/node/src/benchmarking.rs @@ -1,53 +1,41 @@ -// This file is part of Substrate. - -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -//! Contains code to setup the command invocations in [`super::command`] which would -//! otherwise bloat that module. +//! Setup code for [`super::command`] which would otherwise bloat that module. +//! +//! Should only be used for benchmarking as it may break in other contexts. use crate::service::FullClient; -use runtime::SystemCall; +use runtime::{AccountId, Balance, BalancesCall, SystemCall}; use sc_cli::Result; use sc_client_api::BlockBackend; use sp_core::{Encode, Pair}; -use sp_inherents::InherentData; +use sp_inherents::{InherentData, InherentDataProvider}; use sp_keyring::Sr25519Keyring; use sp_runtime::{OpaqueExtrinsic, SaturatedConversion}; -use std::sync::Arc; use tfchain_runtime as runtime; +use std::{sync::Arc, time::Duration}; + /// Generates extrinsics for the `benchmark overhead` command. /// /// Note: Should only be used for benchmarking. -pub struct BenchmarkExtrinsicBuilder { +pub struct RemarkBuilder { client: Arc, } -impl BenchmarkExtrinsicBuilder { +impl RemarkBuilder { /// Creates a new [`Self`] from the given client. pub fn new(client: Arc) -> Self { Self { client } } } -impl frame_benchmarking_cli::ExtrinsicBuilder for BenchmarkExtrinsicBuilder { +impl frame_benchmarking_cli::ExtrinsicBuilder for RemarkBuilder { + fn pallet(&self) -> &str { + "system" + } + fn extrinsic(&self) -> &str { - todo!() + "remark" } fn build(&self, nonce: u32) -> std::result::Result { @@ -62,9 +50,52 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for BenchmarkExtrinsicBuilder { Ok(extrinsic) } +} + +/// Generates `Balances::TransferKeepAlive` extrinsics for the benchmarks. +/// +/// Note: Should only be used for benchmarking. +pub struct TransferKeepAliveBuilder { + client: Arc, + dest: AccountId, + value: Balance, +} + +impl TransferKeepAliveBuilder { + /// Creates a new [`Self`] from the given client. + pub fn new(client: Arc, dest: AccountId, value: Balance) -> Self { + Self { + client, + dest, + value, + } + } +} +impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder { fn pallet(&self) -> &str { - todo!() + "balances" + } + + fn extrinsic(&self) -> &str { + "transfer_keep_alive" + } + + fn build(&self, nonce: u32) -> std::result::Result { + let acc = Sr25519Keyring::Bob.pair(); + let extrinsic: OpaqueExtrinsic = create_benchmark_extrinsic( + self.client.as_ref(), + acc, + BalancesCall::transfer_keep_alive { + dest: self.dest.clone().into(), + value: self.value, + } + .into(), + nonce, + ) + .into(); + + Ok(extrinsic) } } @@ -120,10 +151,10 @@ pub fn create_benchmark_extrinsic( let signature = raw_payload.using_encoded(|e| sender.sign(e)); runtime::UncheckedExtrinsic::new_signed( - call.clone(), + call, sp_runtime::AccountId32::from(sender.public()).into(), - runtime::Signature::Sr25519(signature.clone()), - extra.clone(), + runtime::Signature::Sr25519(signature), + extra, ) } @@ -131,12 +162,11 @@ pub fn create_benchmark_extrinsic( /// /// Note: Should only be used for benchmarking. pub fn inherent_benchmark_data() -> Result { - // TODO, see if we can fix this later - // let mut inherent_data = InherentData::new(); - // let d = Duration::from_millis(0); - // let timestamp = sp_timestamp::InherentDataProvider::new(d.into()); - // timestamp - // .provide_inherent_data(&mut inherent_data) - // .map_err(|e| format!("creating inherent data: {:?}", e))?; - Ok(InherentData::new()) + let mut inherent_data = InherentData::new(); + let d = Duration::from_millis(0); + let timestamp = sp_timestamp::InherentDataProvider::new(d.into()); + + futures::executor::block_on(timestamp.provide_inherent_data(&mut inherent_data)) + .map_err(|e| format!("creating inherent data: {:?}", e))?; + Ok(inherent_data) } diff --git a/substrate-node/node/src/chain_spec.rs b/substrate-node/node/src/chain_spec.rs index d5c827ce2..50b809e22 100644 --- a/substrate-node/node/src/chain_spec.rs +++ b/substrate-node/node/src/chain_spec.rs @@ -6,8 +6,8 @@ use sp_runtime::traits::{IdentifyAccount, Verify}; use std::convert::TryInto; use tfchain_runtime::opaque::SessionKeys; use tfchain_runtime::{ - AccountId, AuraConfig, BalancesConfig, CouncilConfig, CouncilMembershipConfig, GenesisConfig, - GrandpaConfig, SessionConfig, Signature, SmartContractModuleConfig, SystemConfig, + AccountId, AuraConfig, BalancesConfig, CouncilConfig, CouncilMembershipConfig, GrandpaConfig, + RuntimeGenesisConfig, SessionConfig, Signature, SmartContractModuleConfig, SystemConfig, TFTBridgeModuleConfig, TFTPriceModuleConfig, TfgridModuleConfig, ValidatorSetConfig, WASM_BINARY, }; @@ -16,7 +16,7 @@ use tfchain_runtime::{ // const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; /// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = sc_service::GenericChainSpec; +pub type ChainSpec = sc_service::GenericChainSpec; /// Generate a crypto pair from seed. pub fn get_from_seed(seed: &str) -> ::Public { @@ -303,12 +303,12 @@ fn testnet_genesis( max_tft_price: u32, billing_frequency: u64, council_members: Vec, -) -> GenesisConfig { - GenesisConfig { +) -> RuntimeGenesisConfig { + RuntimeGenesisConfig { system: SystemConfig { // Add Wasm runtime to storage. code: wasm_binary.to_vec(), - // changes_trie_config: Default::default(), + ..Default::default() }, balances: BalancesConfig { // Configure endowed accounts with initial balance of 1 << 60. @@ -342,6 +342,7 @@ fn testnet_genesis( }, grandpa: GrandpaConfig { authorities: vec![], + ..Default::default() }, tfgrid_module: TfgridModuleConfig { su_price_value: 50000, @@ -388,6 +389,7 @@ fn testnet_genesis( }, smart_contract_module: SmartContractModuleConfig { billing_frequency: billing_frequency, + _data: std::marker::PhantomData, }, } } diff --git a/substrate-node/node/src/cli.rs b/substrate-node/node/src/cli.rs index 5d8513a1f..965bf3533 100644 --- a/substrate-node/node/src/cli.rs +++ b/substrate-node/node/src/cli.rs @@ -10,6 +10,7 @@ pub struct Cli { } #[derive(Debug, clap::Subcommand)] +#[allow(clippy::large_enum_variant)] pub enum Subcommand { /// Key management cli utilities #[clap(subcommand)] diff --git a/substrate-node/node/src/command.rs b/substrate-node/node/src/command.rs index 86c53e4f5..fb3bd365b 100644 --- a/substrate-node/node/src/command.rs +++ b/substrate-node/node/src/command.rs @@ -1,13 +1,14 @@ use crate::{ + benchmarking::{inherent_benchmark_data, RemarkBuilder, TransferKeepAliveBuilder}, chain_spec, cli::{Cli, Subcommand}, - command_helper::{inherent_benchmark_data, BenchmarkExtrinsicBuilder}, service, }; -use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; -use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli}; +use frame_benchmarking_cli::{BenchmarkCmd, ExtrinsicFactory, SUBSTRATE_REFERENCE_HARDWARE}; +use sc_cli::SubstrateCli; use sc_service::PartialComponents; -use tfchain_runtime::Block; +use sp_keyring::Sr25519Keyring; +use tfchain_runtime::{Block, EXISTENTIAL_DEPOSIT}; impl SubstrateCli for Cli { fn impl_name() -> String { @@ -44,10 +45,6 @@ impl SubstrateCli for Cli { )?), }) } - - fn native_runtime_version(_: &Box) -> &'static RuntimeVersion { - &tfchain_runtime::VERSION - } } /// Parse and run command line arguments @@ -142,7 +139,7 @@ pub fn run() -> sc_cli::Result<()> { ); } - cmd.run::(config) + cmd.run::(config) } BenchmarkCmd::Block(cmd) => { let PartialComponents { client, .. } = service::new_partial(&config)?; @@ -165,7 +162,7 @@ pub fn run() -> sc_cli::Result<()> { } BenchmarkCmd::Overhead(cmd) => { let PartialComponents { client, .. } = service::new_partial(&config)?; - let ext_builder = BenchmarkExtrinsicBuilder::new(client.clone()); + let ext_builder = RemarkBuilder::new(client.clone()); cmd.run( config, @@ -175,12 +172,23 @@ pub fn run() -> sc_cli::Result<()> { &ext_builder, ) } + BenchmarkCmd::Extrinsic(cmd) => { + let PartialComponents { client, .. } = service::new_partial(&config)?; + // Register the *Remark* and *TKA* builders. + let ext_factory = ExtrinsicFactory(vec![ + Box::new(RemarkBuilder::new(client.clone())), + Box::new(TransferKeepAliveBuilder::new( + client.clone(), + Sr25519Keyring::Alice.to_account_id(), + EXISTENTIAL_DEPOSIT, + )), + ]); + + cmd.run(client, inherent_benchmark_data()?, Vec::new(), &ext_factory) + } BenchmarkCmd::Machine(cmd) => { cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()) } - BenchmarkCmd::Extrinsic(_cmd) => { - todo!() - } } }) } @@ -192,22 +200,22 @@ pub fn run() -> sc_cli::Result<()> { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { - // we don't need any of the components of new_partial, just a runtime, or a task - // manager to do `async_run`. - let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); - let task_manager = - sc_service::TaskManager::new(config.tokio_handle.clone(), registry) - .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; - let info_provider = timestamp_with_aura_info(6000); - - Ok(( - cmd.run::::ExtendHostFunctions, - >, _>(Some(info_provider)), - task_manager, - )) - }) + // we don't need any of the components of new_partial, just a runtime, or a task + // manager to do `async_run`. + let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); + let task_manager = + sc_service::TaskManager::new(config.tokio_handle.clone(), registry) + .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; + let info_provider = timestamp_with_aura_info(6000); + + Ok(( + cmd.run::::ExtendHostFunctions, + >, _>(Some(info_provider)), + task_manager, + )) + }) } #[cfg(not(feature = "try-runtime"))] Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ diff --git a/substrate-node/node/src/main.rs b/substrate-node/node/src/main.rs index 5d5bd2d90..33c3195e0 100644 --- a/substrate-node/node/src/main.rs +++ b/substrate-node/node/src/main.rs @@ -4,11 +4,11 @@ mod chain_spec; #[macro_use] mod service; +mod benchmarking; mod cli; mod command; mod rpc; -mod command_helper; fn main() -> sc_cli::Result<()> { - command::run() + command::run() } diff --git a/substrate-node/node/src/rpc.rs b/substrate-node/node/src/rpc.rs index d02be6a23..d26b0d2cd 100644 --- a/substrate-node/node/src/rpc.rs +++ b/substrate-node/node/src/rpc.rs @@ -14,7 +14,7 @@ use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; -use tfchain_runtime::{opaque::Block, AccountId, Balance, Index}; +use tfchain_runtime::{opaque::Block, AccountId, Balance, Nonce}; /// Full client dependencies. pub struct FullDeps { @@ -34,7 +34,7 @@ where C: ProvideRuntimeApi, C: HeaderBackend + HeaderMetadata + 'static, C: Send + Sync + 'static, - C::Api: substrate_frame_rpc_system::AccountNonceApi, + C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, C::Api: BlockBuilder, P: TransactionPool + 'static, diff --git a/substrate-node/node/src/service.rs b/substrate-node/node/src/service.rs index b6320aaa0..4a93bef6f 100644 --- a/substrate-node/node/src/service.rs +++ b/substrate-node/node/src/service.rs @@ -1,11 +1,13 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. -use sc_client_api::BlockBackend; +use futures::FutureExt; +use sc_client_api::{Backend, BlockBackend}; use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams}; use sc_consensus_grandpa::SharedVoterState; pub use sc_executor::NativeElseWasmExecutor; use sc_service::{error::Error as ServiceError, Configuration, TaskManager, WarpSyncParams}; use sc_telemetry::{Telemetry, TelemetryWorker}; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; use std::{sync::Arc, time::Duration}; use tfchain_runtime::{self, opaque::Block, RuntimeApi}; @@ -35,6 +37,7 @@ pub type FullClient = type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; +#[allow(clippy::type_complexity)] pub fn new_partial( config: &Configuration, ) -> Result< @@ -68,8 +71,7 @@ pub fn new_partial( }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(&config); - + let executor = sc_service::new_native_or_wasm_executor(config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( &config, @@ -97,7 +99,7 @@ pub fn new_partial( let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( client.clone(), - &(client.clone() as Arc<_>), + &client, select_chain.clone(), telemetry.as_ref().map(|x| x.handle()), )?; @@ -156,7 +158,7 @@ pub fn new_partial( } /// Builds a new service for a full client. -pub fn new_full(mut config: Configuration) -> Result { +pub fn new_full(config: Configuration) -> Result { let sc_service::PartialComponents { client, backend, @@ -168,6 +170,8 @@ pub fn new_full(mut config: Configuration) -> Result other: (block_import, grandpa_link, mut telemetry), } = new_partial(&config)?; + let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); + let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name( &client .block_hash(0) @@ -176,13 +180,10 @@ pub fn new_full(mut config: Configuration) -> Result .expect("Genesis block exists; qed"), &config.chain_spec, ); + net_config.add_notification_protocol(sc_consensus_grandpa::grandpa_peers_set_config( + grandpa_protocol_name.clone(), + )); - config - .network - .extra_sets - .push(sc_consensus_grandpa::grandpa_peers_set_config( - grandpa_protocol_name.clone(), - )); let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( backend.clone(), grandpa_link.shared_authority_set().clone(), @@ -192,6 +193,7 @@ pub fn new_full(mut config: Configuration) -> Result let (network, system_rpc_tx, tx_handler_controller, network_starter, sync) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), @@ -201,11 +203,23 @@ pub fn new_full(mut config: Configuration) -> Result })?; if config.offchain_worker.enabled { - sc_service::build_offchain_workers( - &config, - task_manager.spawn_handle(), - client.clone(), - network.clone(), + task_manager.spawn_handle().spawn( + "offchain-workers-runner", + "offchain-worker", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + is_validator: config.role.is_authority(), + keystore: Some(keystore_container.keystore()), + offchain_db: backend.offchain_storage(), + transaction_pool: Some(OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + )), + network_provider: network.clone(), + enable_http_requests: true, + custom_extensions: |_| vec![], + }) + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); } @@ -265,7 +279,7 @@ pub fn new_full(mut config: Configuration) -> Result let proposer_factory = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), client.clone(), - transaction_pool, + transaction_pool.clone(), prometheus_registry.as_ref(), telemetry.as_ref().map(|x| x.handle()), ); @@ -344,6 +358,7 @@ pub fn new_full(mut config: Configuration) -> Result prometheus_registry, shared_voter_state: SharedVoterState::empty(), telemetry: telemetry.as_ref().map(|x| x.handle()), + offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool), }; // the GRANDPA voter task is considered infallible, i.e. diff --git a/substrate-node/pallets/pallet-burning/src/benchmarking.rs b/substrate-node/pallets/pallet-burning/src/benchmarking.rs index 6ce893530..591ec0bd3 100644 --- a/substrate-node/pallets/pallet-burning/src/benchmarking.rs +++ b/substrate-node/pallets/pallet-burning/src/benchmarking.rs @@ -4,7 +4,7 @@ use super::*; use crate::Pallet as BurningModule; use frame_benchmarking::{benchmarks, whitelisted_caller, Zero}; use frame_support::traits::Currency; -use frame_system::{EventRecord, Pallet as System, RawOrigin}; +use frame_system::{pallet_prelude::BlockNumberFor, EventRecord, Pallet as System, RawOrigin}; use sp_runtime::{traits::StaticLookup, SaturatedConversion}; use sp_std::vec; @@ -20,7 +20,7 @@ benchmarks! { verify { let burns = BurningModule::::burns().unwrap_or(vec![]); assert_eq!(burns.len(), 1); - let block = T::BlockNumber::from(1 as u32); + let block = BlockNumberFor::::from(1 as u32); assert_eq!(T::Currency::free_balance(&target), BalanceOf::::zero()); assert_last_event::(Event::BurnTransactionCreated(target, amount, block, message).into()); } diff --git a/substrate-node/pallets/pallet-burning/src/lib.rs b/substrate-node/pallets/pallet-burning/src/lib.rs index f957d94fc..2d63e18c4 100644 --- a/substrate-node/pallets/pallet-burning/src/lib.rs +++ b/substrate-node/pallets/pallet-burning/src/lib.rs @@ -51,7 +51,7 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - BurnTransactionCreated(T::AccountId, BalanceOf, T::BlockNumber, Vec), + BurnTransactionCreated(T::AccountId, BalanceOf, BlockNumberFor, Vec), } #[pallet::error] @@ -62,7 +62,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn burns)] pub type Burns = - StorageValue<_, Vec, T::BlockNumber>>, OptionQuery>; + StorageValue<_, Vec, BlockNumberFor>>, OptionQuery>; #[pallet::call] impl Pallet { diff --git a/substrate-node/pallets/pallet-burning/src/mock.rs b/substrate-node/pallets/pallet-burning/src/mock.rs index a8701a91e..24a7faac0 100644 --- a/substrate-node/pallets/pallet-burning/src/mock.rs +++ b/substrate-node/pallets/pallet-burning/src/mock.rs @@ -6,10 +6,9 @@ use frame_support::{construct_runtime, parameter_types, traits::ConstU32}; use pallet_balances; use sp_core::{sr25519, Pair, Public, H256}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, traits::{IdentifyAccount, Verify}, - MultiSignature, + BuildStorage, MultiSignature, }; use sp_std::convert::{TryFrom, TryInto}; @@ -17,16 +16,12 @@ pub type Signature = MultiSignature; pub type AccountId = <::Signer as IdentifyAccount>::AccountId; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum TestRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum TestRuntime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, BurningModule: pallet_burning::{Pallet, Call, Event}, } @@ -38,25 +33,24 @@ parameter_types! { impl frame_system::Config for TestRuntime { type BaseCallFilter = frame_support::traits::Everything; + type Block = Block; type BlockWeights = (); type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type AccountId = AccountId; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Lookup = IdentityLookup; + type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; type OnNewAccount = (); type OnKilledAccount = (); + type AccountData = pallet_balances::AccountData; type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); @@ -83,7 +77,7 @@ impl pallet_balances::Config for TestRuntime { type WeightInfo = pallet_balances::weights::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -121,8 +115,8 @@ pub fn bob() -> AccountId { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let genesis = pallet_balances::GenesisConfig:: { balances: vec![(alice(), 1000000000000), (bob(), 2500000000)], diff --git a/substrate-node/pallets/pallet-dao/src/dao.rs b/substrate-node/pallets/pallet-dao/src/dao.rs index 569ee1303..2a04497c4 100644 --- a/substrate-node/pallets/pallet-dao/src/dao.rs +++ b/substrate-node/pallets/pallet-dao/src/dao.rs @@ -14,6 +14,7 @@ use frame_support::{ traits::Get, weights::Weight, }; +use frame_system::pallet_prelude::BlockNumberFor; use pallet_tfgrid::pallet::{InterfaceOf, LocationOf, SerialNumberOf, TfgridNode}; use sp_runtime::traits::{Dispatchable, Hash}; use sp_std::prelude::*; @@ -29,7 +30,7 @@ impl Pallet { action: Box<::Proposal>, description: Vec, link: Vec, - duration: Option, + duration: Option>, ) -> DispatchResultWithPostInfo { Self::is_council_member(who.clone())?; @@ -43,7 +44,7 @@ impl Pallet { let mut end = now + T::MotionDuration::get(); if let Some(motion_duration) = duration { ensure!( - motion_duration < T::BlockNumber::from(constants::time::DAYS * 30), + motion_duration < BlockNumberFor::::from(constants::time::DAYS * 30), Error::::InvalidProposalDuration ); end = now + motion_duration; diff --git a/substrate-node/pallets/pallet-dao/src/lib.rs b/substrate-node/pallets/pallet-dao/src/lib.rs index 622d3c618..e87a2a036 100644 --- a/substrate-node/pallets/pallet-dao/src/lib.rs +++ b/substrate-node/pallets/pallet-dao/src/lib.rs @@ -57,7 +57,7 @@ pub mod pallet { + GetDispatchInfo; /// The time-out for council motions. - type MotionDuration: Get; + type MotionDuration: Get>; /// The minimum amount of vetos to dissaprove a proposal type MinVetos: Get; @@ -100,7 +100,7 @@ pub mod pallet { _, Identity, T::Hash, - proposal::DaoVotes, + proposal::DaoVotes, T::AccountId>, OptionQuery, >; @@ -189,7 +189,7 @@ pub mod pallet { action: Box<::Proposal>, description: Vec, link: Vec, - duration: Option, + duration: Option>, ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; Self::_propose(who, threshold, action, description, link, duration) diff --git a/substrate-node/pallets/pallet-dao/src/mock.rs b/substrate-node/pallets/pallet-dao/src/mock.rs index e15828f0a..3044ba6be 100644 --- a/substrate-node/pallets/pallet-dao/src/mock.rs +++ b/substrate-node/pallets/pallet-dao/src/mock.rs @@ -1,4 +1,3 @@ -use crate::mock::sp_api_hidden_includes_construct_runtime::hidden_include::traits::GenesisBuild; use crate::{self as pallet_dao}; use frame_support::{construct_runtime, parameter_types, traits::ConstU32, BoundedVec}; use frame_system::EnsureRoot; @@ -14,24 +13,20 @@ use pallet_tfgrid::{ use pallet_timestamp; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use sp_std::convert::{TryFrom, TryInto}; use tfchain_support::traits::{ChangeNode, PublicIpModifier}; use tfchain_support::types::PublicIP; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. construct_runtime!( - pub enum TestRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum TestRuntime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, DaoModule: pallet_dao::pallet::{Pallet, Call, Storage, Event}, TfgridModule: pallet_tfgrid::{Pallet, Call, Storage, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, @@ -46,25 +41,24 @@ parameter_types! { impl frame_system::Config for TestRuntime { type BaseCallFilter = frame_support::traits::Everything; + type Block = Block; type BlockWeights = (); type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type AccountId = u64; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Lookup = IdentityLookup; + type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); type PalletInfo = PalletInfo; - type AccountData = (); type OnNewAccount = (); type OnKilledAccount = (); + type AccountData = (); type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); @@ -235,8 +229,8 @@ pub(crate) fn get_longitude_input(longitude_input: &[u8]) -> LongitudeInput { // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let genesis = pallet_collective::GenesisConfig::::default(); diff --git a/substrate-node/pallets/pallet-kvstore/README.md b/substrate-node/pallets/pallet-kvstore/README.md index 6710d114c..47fcd9d51 100644 --- a/substrate-node/pallets/pallet-kvstore/README.md +++ b/substrate-node/pallets/pallet-kvstore/README.md @@ -7,9 +7,10 @@ Some use cases for this module are storing user profiles, preferences, or settin ## Overview The Key-value Store Pallet provides [dictionary-like data storage](https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageDoubleMap.html#) and functions for: -- Storing key-value pairs. -- Retrieving the value associated with the specified key. -- Removing a value associated with the specified key. + +* Storing key-value pairs. +* Retrieving the value associated with the specified key. +* Removing a value associated with the specified key. The key value store uses under hood a map with two keys @@ -17,36 +18,42 @@ The key value store uses under hood a map with two keys **Key1** is provided by the runtime set to the account that signed the extrinsic. **Key2** and **Value** are user provided -You can think of the key1 as namespace that make it easier to come up with unique names which distinguished from other accounts' names. +You can think of the key1 as namespace that make it easier to come up with unique names which distinguished from other accounts' names. The key value store pallet impose restrictions on the size of the keys and values. see [Assumptions](#assumptions) section. ## Terminology -- Key-value store: A key-value store, or key-value database is a simple database that uses an associative array (think of a map or dictionary) as the fundamental data model where each key is associated with one and only one value in a collection. This relationship is referred to as a key-value pair. + +* Key-value store: A key-value store, or key-value database is a simple database that uses an associative array (think of a map or dictionary) as the fundamental data model where each key is associated with one and only one value in a collection. This relationship is referred to as a key-value pair. ## Implementations + NA ## Interface + ### Dispatchable Functions -- `set(key: Vec, value: Vec)` store value for a pair of keys (key1, key2) in the store. The first key is automatically set to the account ID of the signer of the transaction, while the second key is given by the user. This way, you can assign ownership of a key to the account that created it, and also use freely any name for a key that might be already taken by someone else. If the key pair already exists in the store, the value is overwritten with the new one. Emits `EntrySet` event. -- `delete(key: Vec)` remove a value stored under a pair of keys (key1, key2) from the store. The first key is automatically set to the account ID of the sender of the transaction, while the second key is given by the user. so by design, only the owner of a key pair can delete it from the store. Emits `EntryTaken` event. +* `set(key: Vec, value: Vec)` store value for a pair of keys (key1, key2) in the store. The first key is automatically set to the account ID of the signer of the transaction, while the second key is given by the user. This way, you can assign ownership of a key to the account that created it, and also use freely any name for a key that might be already taken by someone else. If the key pair already exists in the store, the value is overwritten with the new one. Emits `EntrySet` event. +* `delete(key: Vec)` remove a value stored under a pair of keys (key1, key2) from the store. The first key is automatically set to the account ID of the sender of the transaction, while the second key is given by the user. so by design, only the owner of a key pair can delete it from the store. Emits `EntryTaken` event. ### Events -- `EntrySet(T::AccountId, Vec, Vec)` The value for the specified key has been stored/updated. -- `EntryGot(T::AccountId, Vec, Vec)` The value for the specified key has been queried. (This Event Defined But Not Used By the runtime) -- `EntryTaken(T::AccountId, Vec, Vec)` The value stored under the specified key has been removed. + +* `EntrySet(T::AccountId, Vec, Vec)` The value for the specified key has been stored/updated. +* `EntryGot(T::AccountId, Vec, Vec)` The value for the specified key has been queried. (This Event Defined But Not Used By the runtime) +* `EntryTaken(T::AccountId, Vec, Vec)` The value stored under the specified key has been removed. All events included account id, the user key name and the value. ### Errors -- `NoValueStored` The double key (Account ID, Provided Key) is not in the `StorageDoubleMap` -- `KeyIsTooLarge` The key length exceed the maximum length. see [Assumptions](#assumptions) section. -- `ValueIsTooLarge` The key length exceed the maximum length. see [Assumptions](#assumptions) section. + +* `NoValueStored` The double key (Account ID, Provided Key) is not in the `StorageDoubleMap` +* `KeyIsTooLarge` The key length exceed the maximum length. see [Assumptions](#assumptions) section. +* `ValueIsTooLarge` The key length exceed the maximum length. see [Assumptions](#assumptions) section. ## Config + ```rust pub trait Config: Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -59,6 +66,7 @@ The main purpose of this trait is to act as an interface between this pallet and Consequently, a runtime that wants to include this pallet must implement this trait. ### Required Associated Types + ```rust type RuntimeEvent: From> + IsType<::RuntimeEvent> ``` @@ -72,17 +80,16 @@ type WeightInfo: WeightInfo Weight information for extrinsics in this pallet. ## Usage + The following example shows how to use the key value store pallet in your runtime: + ```rust // Import the key value store pallet pub use pallet_kvstore; // Add it to your runtime configuration construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub enum Runtime { // ... KeyValueStore: pallet_kvstore::{Pallet, Call, Storage, Event}, @@ -95,11 +102,14 @@ impl pallet_kvstore::Config for Runtime { type WeightInfo = pallet_kvstore::weights::SubstrateWeight; } ``` + ## Genesis config + NA ## Assumptions -- The key length must not exceed 512 bytes. -- The value length must not exceed 2048 bytes. -- The user is responsible for ensuring the uniqueness of the key within their account, otherwise the previous value associated with the key will be replaced or updated. -- The stored information is publicly accessible and queryable. This means that anyone can see your data without your permission. The user must not store any sensitive information unencrypted, such as personal details, passwords, credit card numbers, or confidential information. Doing so can have serious consequences. Please use encryption tools to protect your sensitive data before storing it on this store. + +* The key length must not exceed 512 bytes. +* The value length must not exceed 2048 bytes. +* The user is responsible for ensuring the uniqueness of the key within their account, otherwise the previous value associated with the key will be replaced or updated. +* The stored information is publicly accessible and queryable. This means that anyone can see your data without your permission. The user must not store any sensitive information unencrypted, such as personal details, passwords, credit card numbers, or confidential information. Doing so can have serious consequences. Please use encryption tools to protect your sensitive data before storing it on this store. diff --git a/substrate-node/pallets/pallet-kvstore/src/tests.rs b/substrate-node/pallets/pallet-kvstore/src/tests.rs index 8f12d1e95..461060f1a 100644 --- a/substrate-node/pallets/pallet-kvstore/src/tests.rs +++ b/substrate-node/pallets/pallet-kvstore/src/tests.rs @@ -6,21 +6,17 @@ use frame_system::{EventRecord, Phase}; use sp_core::H256; use sp_io::TestExternalities; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use sp_std::convert::{TryFrom, TryInto}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum TestRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum TestRuntime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, TFKVStoreModule: pallet_kvstore::{Pallet, Call, Storage, Event}, } ); @@ -31,25 +27,24 @@ parameter_types! { impl frame_system::Config for TestRuntime { type BaseCallFilter = frame_support::traits::Everything; + type Block = Block; type BlockWeights = (); type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type AccountId = u64; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Lookup = IdentityLookup; + type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); type PalletInfo = PalletInfo; - type AccountData = (); type OnNewAccount = (); type OnKilledAccount = (); + type AccountData = (); type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); @@ -66,8 +61,8 @@ pub struct ExternalityBuilder; impl ExternalityBuilder { pub fn build() -> TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() + let storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let mut ext = TestExternalities::from(storage); ext.execute_with(|| System::set_block_number(1)); diff --git a/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs b/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs index 8e6ff1d37..a66fb40f2 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs @@ -8,7 +8,7 @@ use frame_support::{ traits::{OnFinalize, OnInitialize}, BoundedVec, }; -use frame_system::{EventRecord, Pallet as System, RawOrigin}; +use frame_system::{pallet_prelude::BlockNumberFor, EventRecord, Pallet as System, RawOrigin}; use pallet_balances::Pallet as Balances; use pallet_tfgrid::{ types::{self as tfgrid_types, LocationInput}, @@ -515,7 +515,7 @@ fn assert_last_event(generic_event: ::RuntimeEvent) { assert_eq!(event, &system_event); } -pub fn run_to_block(n: T::BlockNumber) { +pub fn run_to_block(n: BlockNumberFor) { while System::::block_number() < n { crate::Pallet::::on_finalize(System::::block_number()); System::::on_finalize(System::::block_number()); @@ -586,7 +586,7 @@ fn _create_farming_policy() { 10, 8, 9999, - ::BlockNumber::max_value(), + BlockNumberFor::::max_value(), true, true, NodeCertification::Diy, diff --git a/substrate-node/pallets/pallet-smart-contract/src/billing.rs b/substrate-node/pallets/pallet-smart-contract/src/billing.rs index 5e31716dc..8f5b8ff22 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/billing.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/billing.rs @@ -4,7 +4,10 @@ use frame_support::{ ensure, traits::{Currency, ExistenceRequirement, LockableCurrency, OnUnbalanced, WithdrawReasons}, }; -use frame_system::offchain::{SendSignedTransaction, SignMessage, Signer}; +use frame_system::{ + offchain::{SendSignedTransaction, SignMessage, Signer}, + pallet_prelude::BlockNumberFor, +}; use sp_core::Get; use sp_runtime::{ traits::{CheckedAdd, CheckedSub, Convert, Zero}, @@ -13,7 +16,7 @@ use sp_runtime::{ use sp_std::vec::Vec; impl Pallet { - pub fn bill_conttracts_for_block(block_number: T::BlockNumber) { + pub fn bill_conttracts_for_block(block_number: BlockNumberFor) { // Let offchain worker check if there are contracts on // billing loop at current index and try to bill them let index = Self::get_billing_loop_index_from_block_number(block_number); @@ -619,7 +622,7 @@ impl Pallet { // Billing index is block number % (mod) Billing Frequency // So index belongs to [0; billing_frequency - 1] range - pub fn get_billing_loop_index_from_block_number(block_number: T::BlockNumber) -> u64 { + pub fn get_billing_loop_index_from_block_number(block_number: BlockNumberFor) -> u64 { block_number.saturated_into::() % BillingFrequency::::get() } diff --git a/substrate-node/pallets/pallet-smart-contract/src/lib.rs b/substrate-node/pallets/pallet-smart-contract/src/lib.rs index 9b8fea12e..09726b04b 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/lib.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/lib.rs @@ -389,22 +389,14 @@ pub mod pallet { } #[pallet::genesis_config] - pub struct GenesisConfig { + #[derive(frame_support::DefaultNoBound)] + pub struct GenesisConfig { pub billing_frequency: u64, - } - - // The default value for the genesis config type. - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - billing_frequency: 600, - } - } + pub _data: PhantomData, } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { BillingFrequency::::put(self.billing_frequency); } @@ -670,7 +662,7 @@ pub mod pallet { weight_used } - fn offchain_worker(block_number: T::BlockNumber) { + fn offchain_worker(block_number: BlockNumberFor) { Self::bill_conttracts_for_block(block_number); } } diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v10.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v10.rs index ca180d44d..fa255505b 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v10.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v10.rs @@ -5,6 +5,8 @@ use sp_core::Get; use sp_runtime::Saturating; use sp_std::{marker::PhantomData, vec}; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use sp_std::vec::Vec; @@ -16,9 +18,12 @@ impl OnRuntimeUpgrade for ReworkBillingLoopInsertion { } #[cfg(feature = "try-runtime")] - fn post_upgrade(_: Vec) -> Result<(), &'static str> { + fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V10); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V10, + DispatchError::Other("Unexpected pallet version") + ); super::v9::check_contracts_to_bill_at::(); diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v11.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v11.rs index 4ea467536..3346a4e9d 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v11.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v11.rs @@ -8,6 +8,8 @@ use sp_core::Get; use sp_runtime::traits::Zero; use sp_std::marker::PhantomData; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use sp_std::{vec, vec::Vec}; @@ -23,9 +25,12 @@ pub type ContractLock = StorageMap< pub struct ExtendContractLock(PhantomData); impl OnRuntimeUpgrade for ExtendContractLock { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { debug!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V10); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V10, + DispatchError::Other("Unexpected pallet version") + ); debug!("👥 Smart Contract pallet to V11 passes PRE migrate checks ✅",); Ok(vec![]) @@ -41,18 +46,14 @@ impl OnRuntimeUpgrade for ExtendContractLock { } #[cfg(feature = "try-runtime")] - fn post_upgrade(_: Vec) -> Result<(), &'static str> { + fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { debug!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V11); - - check_contract_lock_v11::(); - - debug!( - "👥 Smart Contract pallet to {:?} passes POST migrate checks ✅", - PalletVersion::::get() + ensure!( + PalletVersion::::get() >= types::StorageVersion::V11, + DispatchError::Other("Unexpected pallet version") ); - Ok(()) + check_contract_lock_v11::() } } @@ -86,7 +87,8 @@ pub fn migrate_to_version_11() -> frame_support::weights::Weight { T::DbWeight::get().reads_writes(r, w) } -pub fn check_contract_lock_v11() { +#[cfg(feature = "try-runtime")] +pub fn check_contract_lock_v11() -> Result<(), sp_runtime::TryRuntimeError> { debug!( "🔎 Smart Contract pallet {:?} checking ContractLock storage map START", PalletVersion::::get() @@ -112,7 +114,10 @@ pub fn check_contract_lock_v11() { ); } else { // Ensure new field is set to zero - assert_eq!(contract_lock.extra_amount_locked, BalanceOf::::zero()); + ensure!( + contract_lock.extra_amount_locked == BalanceOf::::zero(), + DispatchError::Other("Unexpected lock amount") + ); } } @@ -120,4 +125,11 @@ pub fn check_contract_lock_v11() { "🏁 Smart Contract pallet {:?} checking ContractLock storage map END", PalletVersion::::get() ); + + debug!( + "👥 Smart Contract pallet to {:?} passes POST migrate checks ✅", + PalletVersion::::get() + ); + + Ok(()) } diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v6.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v6.rs index 7d6df417f..34010b446 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v6.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v6.rs @@ -4,6 +4,8 @@ use log::{debug, info}; use sp_core::Get; use sp_std::{marker::PhantomData, vec::Vec}; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; @@ -11,9 +13,12 @@ pub struct ContractMigrationV5(PhantomData); impl OnRuntimeUpgrade for ContractMigrationV5 { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V5); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V5, + DispatchError::Other("Unexpected pallet version") + ); let contracts_count: u64 = ContractsToBillAt::::iter().count() as u64; log::info!( @@ -30,17 +35,19 @@ impl OnRuntimeUpgrade for ContractMigrationV5 { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_contracts_count: Vec) -> Result<(), &'static str> { + fn post_upgrade(pre_contracts_count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V6); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V6, + DispatchError::Other("Unexpected pallet version") + ); // Check number of Contracts against pre-check result let pre_contracts_count: u64 = Decode::decode(&mut pre_contracts_count.as_slice()) .expect("the state parameter should be something that was generated by pre_upgrade"); - assert_eq!( - ContractsToBillAt::::iter().count() as u64, - pre_contracts_count, - "Number of Contracts migrated does not match" + ensure!( + ContractsToBillAt::::iter().count() as u64 == pre_contracts_count, + DispatchError::Other("Number of Contracts migrated does not match") ); info!( diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v8.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v8.rs index 9c2214474..4fcb53bf3 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v8.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v8.rs @@ -8,6 +8,8 @@ use sp_core::Get; use sp_runtime::traits::{CheckedSub, SaturatedConversion}; use sp_std::{collections::btree_map::BTreeMap, marker::PhantomData}; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use sp_std::{vec, vec::Vec}; @@ -15,9 +17,12 @@ pub struct FixTwinLockedBalances(PhantomData); impl OnRuntimeUpgrade for FixTwinLockedBalances { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { debug!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V6); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V6, + DispatchError::Other("Unexpected pallet version") + ); debug!("👥 Smart Contract pallet to V8 passes PRE migrate checks ✅",); Ok(vec![]) @@ -33,9 +38,12 @@ impl OnRuntimeUpgrade for FixTwinLockedBalances { } #[cfg(feature = "try-runtime")] - fn post_upgrade(_: Vec) -> Result<(), &'static str> { + fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { debug!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V8); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V8, + DispatchError::Other("Unexpected pallet version") + ); debug!( "👥 Smart Contract pallet to {:?} passes POST migrate checks ✅", diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs index d420af067..abc3ca0eb 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs @@ -6,6 +6,9 @@ use scale_info::prelude::string::String; use sp_core::Get; use sp_std::{marker::PhantomData, vec, vec::Vec}; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; + pub struct CleanStorageState(PhantomData); impl OnRuntimeUpgrade for CleanStorageState { @@ -24,9 +27,12 @@ impl OnRuntimeUpgrade for CleanStorageState { } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() == types::StorageVersion::V8 || PalletVersion::::get() == types::StorageVersion::V9); + ensure!( + PalletVersion::::get() == types::StorageVersion::V8 || PalletVersion::::get() == types::StorageVersion::V9, + DispatchError::Other("Unexpected pallet version") + ); check_pallet_smart_contract::(); diff --git a/substrate-node/pallets/pallet-smart-contract/src/mock.rs b/substrate-node/pallets/pallet-smart-contract/src/mock.rs index a79e65af6..cc765f286 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/mock.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/mock.rs @@ -6,7 +6,7 @@ use frame_support::{ dispatch::DispatchErrorWithPostInfo, dispatch::PostDispatchInfo, parameter_types, - traits::{ConstU32, EitherOfDiverse, GenesisBuild}, + traits::{ConstU32, EitherOfDiverse}, BoundedVec, }; use frame_system::EnsureRoot; @@ -33,11 +33,11 @@ use sp_keystore::{testing::MemoryKeystore, Keystore, KeystoreExt}; use sp_runtime::{ impl_opaque_keys, offchain::TransactionPool, - testing::{Header, TestXt, UintAuthorityId}, + testing::{TestXt, UintAuthorityId}, traits::{ BlakeTwo256, Extrinsic as ExtrinsicT, IdentifyAccount, IdentityLookup, OpaqueKeys, Verify, }, - AccountId32, MultiSignature, + AccountId32, BuildStorage, MultiSignature, }; use sp_std::{ convert::{TryFrom, TryInto}, @@ -96,16 +96,12 @@ pub type AccountId = <::Signer as IdentifyAccount>::Account pub type Moment = u64; pub type Extrinsic = TestXt; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum TestRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum TestRuntime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, TfgridModule: pallet_tfgrid::{Pallet, Call, Storage, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, @@ -125,25 +121,24 @@ parameter_types! { impl frame_system::Config for TestRuntime { type BaseCallFilter = frame_support::traits::Everything; + type Block = Block; type BlockWeights = (); type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type AccountId = AccountId; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Lookup = IdentityLookup; + type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; type OnNewAccount = (); type OnKilledAccount = (); + type AccountData = pallet_balances::AccountData; type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); @@ -172,7 +167,7 @@ impl pallet_balances::Config for TestRuntime { type WeightInfo = pallet_balances::weights::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -512,8 +507,8 @@ pub fn new_test_ext() -> sp_io::TestExternalities { // for showing logs in tests let _ = env_logger::try_init(); - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let genesis = pallet_balances::GenesisConfig:: { balances: vec![ diff --git a/substrate-node/pallets/pallet-tfgrid/src/benchmarking.rs b/substrate-node/pallets/pallet-tfgrid/src/benchmarking.rs index ba6c73d82..958880ad6 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/benchmarking.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/benchmarking.rs @@ -4,7 +4,7 @@ use super::*; use crate::Pallet as TfgridModule; use frame_benchmarking::{account, benchmarks, whitelisted_caller}; use frame_support::{assert_ok, BoundedVec}; -use frame_system::{EventRecord, Pallet as System, RawOrigin}; +use frame_system::{pallet_prelude::BlockNumberFor, EventRecord, Pallet as System, RawOrigin}; // use hex; // use scale_info::prelude::format; // use sp_core::{ed25519, Pair, Public}; @@ -497,7 +497,7 @@ benchmarks! { let nu = 10; let ipv4 = 8; let minimal_uptime = 9999; - let policy_end = T::BlockNumber::max_value(); + let policy_end = BlockNumberFor::::max_value(); let immutable = true; let default = true; let node_certification = NodeCertification::Diy; @@ -680,7 +680,7 @@ benchmarks! { let power = Power::Down; }: _(RawOrigin::Signed(caller), power) verify { - let power_state = PowerState::Down(T::BlockNumber::from(1 as u32)); + let power_state = PowerState::Down(BlockNumberFor::::from(1 as u32)); let node_power = TfgridModule::::node_power_state(node_id); assert_eq!(node_power.state, power_state); assert_last_event::(Event::PowerStateChanged { @@ -812,7 +812,7 @@ fn _create_farming_policy() { let nu = 10; let ipv4 = 8; let minimal_uptime = 9999; - let policy_end = T::BlockNumber::max_value(); + let policy_end = BlockNumberFor::::max_value(); let immutable = true; let default = true; let node_certification = NodeCertification::Diy; diff --git a/substrate-node/pallets/pallet-tfgrid/src/farm.rs b/substrate-node/pallets/pallet-tfgrid/src/farm.rs index c92f85172..d4f72a9d6 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/farm.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/farm.rs @@ -6,6 +6,7 @@ use frame_support::{ traits::Get, BoundedVec, RuntimeDebug, }; +use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_std::{marker::PhantomData, vec, vec::Vec}; @@ -269,7 +270,7 @@ impl Pallet { let now = frame_system::Pallet::::block_number(); // Policy end is expressed in number of blocks - if farming_policy.policy_end != T::BlockNumber::from(0 as u32) + if farming_policy.policy_end != BlockNumberFor::::from(0 as u32) && now >= farming_policy.policy_created + farming_policy.policy_end { return Err(DispatchErrorWithPostInfo::from( diff --git a/substrate-node/pallets/pallet-tfgrid/src/lib.rs b/substrate-node/pallets/pallet-tfgrid/src/lib.rs index 0c17d14f9..2888d5e14 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/lib.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/lib.rs @@ -201,7 +201,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn farming_policies_map)] pub type FarmingPoliciesMap = - StorageMap<_, Blake2_128Concat, u32, types::FarmingPolicy, ValueQuery>; + StorageMap<_, Blake2_128Concat, u32, types::FarmingPolicy>, ValueQuery>; // Concrete type for location pub type TermsAndConditionsOf = ::TermsAndConditions; @@ -259,7 +259,7 @@ pub mod pallet { _, Blake2_128Concat, u32, - tfchain_support::types::NodePower, + tfchain_support::types::NodePower>, ValueQuery, >; @@ -412,14 +412,14 @@ pub mod pallet { PricingPolicyStored(types::PricingPolicy), // CertificationCodeStored(types::CertificationCodes), - FarmingPolicyStored(types::FarmingPolicy), + FarmingPolicyStored(types::FarmingPolicy>), FarmPayoutV2AddressRegistered(u32, Vec), FarmMarkedAsDedicated(u32), ConnectionPriceSet(u32), NodeCertificationSet(u32, NodeCertification), NodeCertifierAdded(T::AccountId), NodeCertifierRemoved(T::AccountId), - FarmingPolicyUpdated(types::FarmingPolicy), + FarmingPolicyUpdated(types::FarmingPolicy>), FarmingPolicySet(u32, Option), FarmCertificationSet(u32, FarmCertification), @@ -434,7 +434,7 @@ pub mod pallet { PowerStateChanged { farm_id: u32, node_id: u32, - power_state: PowerState, + power_state: PowerState>, }, } @@ -572,6 +572,7 @@ pub mod pallet { } #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub su_price_value: u32, pub su_price_unit: u32, @@ -599,41 +600,8 @@ pub mod pallet { pub connection_price: u32, } - // The default value for the genesis config type. - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - su_price_value: Default::default(), - su_price_unit: Default::default(), - nu_price_value: Default::default(), - nu_price_unit: Default::default(), - ipu_price_value: Default::default(), - ipu_price_unit: Default::default(), - cu_price_value: Default::default(), - cu_price_unit: Default::default(), - domain_name_price_value: Default::default(), - unique_name_price_value: Default::default(), - foundation_account: None, - sales_account: None, - discount_for_dedication_nodes: Default::default(), - farming_policy_diy_cu: Default::default(), - farming_policy_diy_nu: Default::default(), - farming_policy_diy_su: Default::default(), - farming_policy_diy_ipu: Default::default(), - farming_policy_diy_minimal_uptime: Default::default(), - farming_policy_certified_cu: Default::default(), - farming_policy_certified_nu: Default::default(), - farming_policy_certified_su: Default::default(), - farming_policy_certified_ipu: Default::default(), - farming_policy_certified_minimal_uptime: Default::default(), - connection_price: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { let su = types::Policy { value: self.su_price_value, @@ -701,8 +669,8 @@ pub mod pallet { nu: self.farming_policy_diy_nu, ipv4: self.farming_policy_diy_ipu, minimal_uptime: self.farming_policy_diy_minimal_uptime, - policy_created: T::BlockNumber::from(0 as u32), - policy_end: T::BlockNumber::from(0 as u32), + policy_created: BlockNumberFor::::from(0 as u32), + policy_end: BlockNumberFor::::from(0 as u32), immutable: false, default: true, node_certification: NodeCertification::Diy, @@ -723,8 +691,8 @@ pub mod pallet { nu: self.farming_policy_certified_nu, ipv4: self.farming_policy_certified_ipu, minimal_uptime: self.farming_policy_certified_minimal_uptime, - policy_created: T::BlockNumber::from(0 as u32), - policy_end: T::BlockNumber::from(0 as u32), + policy_created: BlockNumberFor::::from(0 as u32), + policy_end: BlockNumberFor::::from(0 as u32), immutable: false, default: true, node_certification: NodeCertification::Certified, @@ -1069,7 +1037,7 @@ pub mod pallet { nu: u32, ipv4: u32, minimal_uptime: u16, - policy_end: T::BlockNumber, + policy_end: BlockNumberFor, immutable: bool, default: bool, node_certification: NodeCertification, @@ -1172,7 +1140,7 @@ pub mod pallet { nu: u32, ipv4: u32, minimal_uptime: u16, - policy_end: T::BlockNumber, + policy_end: BlockNumberFor, default: bool, node_certification: NodeCertification, farm_certification: FarmCertification, @@ -1266,4 +1234,4 @@ pub mod pallet { // #[pallet::call_index(39)] // #[pallet::weight(::WeightInfo::set_node_gpu_status())] } -} \ No newline at end of file +} diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v10.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v10.rs index 7863413e3..8e772f748 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v10.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v10.rs @@ -4,6 +4,8 @@ use log::{debug, info}; use sp_std::{collections::btree_map::BTreeMap, marker::PhantomData}; use sp_std::{vec, vec::Vec}; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; @@ -11,9 +13,12 @@ pub struct FixFarmNodeIndexMap(PhantomData); impl OnRuntimeUpgrade for FixFarmNodeIndexMap { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V9Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V9Struct, + DispatchError::Other("Unexpected pallet version") + ); let nodes_count: u64 = Nodes::::iter().count() as u64; log::info!( @@ -35,17 +40,19 @@ impl OnRuntimeUpgrade for FixFarmNodeIndexMap { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_nodes_count: Vec) -> Result<(), &'static str> { + fn post_upgrade(pre_nodes_count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V10Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V10Struct, + DispatchError::Other("Unexpected pallet version") + ); // Check number of nodes against pre-check result let pre_nodes_count: u64 = Decode::decode(&mut pre_nodes_count.as_slice()) .expect("the state parameter should be something that was generated by pre_upgrade"); - assert_eq!( - Nodes::::iter().count() as u64, - pre_nodes_count, - "Number of nodes migrated does not match" + ensure!( + Nodes::::iter().count() as u64 == pre_nodes_count, + DispatchError::Other("Number of nodes migrated does not match") ); info!( diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v11.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v11.rs index 2d0848e7c..a6bb51408 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v11.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v11.rs @@ -3,6 +3,8 @@ use frame_support::{traits::Get, traits::OnRuntimeUpgrade, weights::Weight}; use log::{debug, info}; use sp_std::marker::PhantomData; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] @@ -12,9 +14,12 @@ pub struct FixFarmingPolicy(PhantomData); impl OnRuntimeUpgrade for FixFarmingPolicy { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V10Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V10Struct, + DispatchError::Other("Unexpected pallet version") + ); let farms_count: u64 = Farms::::iter().count() as u64; log::info!( @@ -36,17 +41,19 @@ impl OnRuntimeUpgrade for FixFarmingPolicy { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_farms_count: Vec) -> Result<(), &'static str> { + fn post_upgrade(pre_farms_count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V11Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V11Struct, + DispatchError::Other("Unexpected pallet version") + ); // Check number of farms against pre-check result let pre_farms_count: u64 = Decode::decode(&mut pre_farms_count.as_slice()) .expect("the state parameter should be something that was generated by pre_upgrade"); - assert_eq!( - Farms::::iter().count() as u64, - pre_farms_count, - "Number of farms migrated does not match" + ensure!( + Farms::::iter().count() as u64 == pre_farms_count, + DispatchError::Other("Number of farms migrated does not match") ); info!( diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v12.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v12.rs index cbf9abd29..be66a58ae 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v12.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v12.rs @@ -6,6 +6,8 @@ use frame_support::{ use log::{debug, info}; use sp_std::marker::PhantomData; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] @@ -35,9 +37,12 @@ pub struct InputValidation(PhantomData); impl OnRuntimeUpgrade for InputValidation { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V11Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V11Struct, + DispatchError::Other("Unexpected pallet version") + ); let nodes_count: u64 = Nodes::::iter().count() as u64; log::info!( @@ -59,17 +64,19 @@ impl OnRuntimeUpgrade for InputValidation { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_nodes_count: Vec) -> Result<(), &'static str> { + fn post_upgrade(pre_nodes_count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V12Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V12Struct, + DispatchError::Other("Unexpected pallet version") + ); // Check number of nodes against pre-check result let pre_nodes_count: u64 = Decode::decode(&mut pre_nodes_count.as_slice()) .expect("the state parameter should be something that was generated by pre_upgrade"); - assert_eq!( - Nodes::::iter().count() as u64, - pre_nodes_count, - "Number of nodes migrated does not match" + ensure!( + Nodes::::iter().count() as u64 == pre_nodes_count, + DispatchError::Other("Number of nodes migrated does not match") ); info!( diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v13.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v13.rs index fe35d1fe9..8b70e9588 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v13.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v13.rs @@ -9,6 +9,8 @@ use tfchain_support::{ types::{Farm, Node, PublicIP, IP4}, }; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] @@ -18,9 +20,12 @@ pub struct FixPublicIP(PhantomData); impl OnRuntimeUpgrade for FixPublicIP { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() <= types::StorageVersion::V12Struct); + ensure!( + PalletVersion::::get() <= types::StorageVersion::V12Struct, + DispatchError::Other("Unexpected pallet version") + ); let nodes_count: u64 = Nodes::::iter().count() as u64; log::info!( @@ -42,17 +47,19 @@ impl OnRuntimeUpgrade for FixPublicIP { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_nodes_count: Vec) -> Result<(), &'static str> { + fn post_upgrade(pre_nodes_count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V13Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V13Struct, + DispatchError::Other("Unexpected pallet version") + ); // Check number of nodes against pre-check result let pre_nodes_count: u64 = Decode::decode(&mut pre_nodes_count.as_slice()) .expect("the state parameter should be something that was generated by pre_upgrade"); - assert_eq!( - Nodes::::iter().count() as u64, - pre_nodes_count, - "Number of nodes migrated does not match" + ensure!( + Nodes::::iter().count() as u64 == pre_nodes_count, + DispatchError::Other("Number of nodes migrated does not match") ); info!( diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v14.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v14.rs index 3ab9d9a53..68dd5c6ba 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v14.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v14.rs @@ -1,8 +1,11 @@ use crate::{types::FarmingPolicy, *}; use frame_support::{traits::Get, traits::OnRuntimeUpgrade, weights::Weight}; +use frame_system::pallet_prelude::BlockNumberFor; use log::{debug, info}; use sp_std::marker::PhantomData; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] @@ -12,9 +15,12 @@ pub struct FixFarmingPoliciesMap(PhantomData); impl OnRuntimeUpgrade for FixFarmingPoliciesMap { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V13Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V13Struct, + DispatchError::Other("Unexpected pallet version") + ); let policies_count: u64 = FarmingPoliciesMap::::iter().count() as u64; info!( @@ -36,17 +42,19 @@ impl OnRuntimeUpgrade for FixFarmingPoliciesMap { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_policies_count: Vec) -> Result<(), &'static str> { + fn post_upgrade(pre_policies_count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V14Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V14Struct, + DispatchError::Other("Unexpected pallet version") + ); // Check number of farming policies against pre-check result let pre_policies_count: u64 = Decode::decode(&mut pre_policies_count.as_slice()) .expect("the state parameter should be something that was generated by pre_upgrade"); - assert_eq!( - FarmingPoliciesMap::::iter().count() as u64, - pre_policies_count, - "Number of farming policies migrated does not match" + ensure!( + FarmingPoliciesMap::::iter().count() as u64 == pre_policies_count, + DispatchError::Other("Number of farming policies migrated does not match") ); info!( @@ -62,7 +70,7 @@ pub fn fix_farming_policies_map_migration_() -> frame_support::weight info!(" >>> Migrating farming policies storage..."); let mut read_writes = 0; - FarmingPoliciesMap::::translate::, _>(|k, fp| { + FarmingPoliciesMap::::translate::>, _>(|k, fp| { debug!("Farming policy #{:?}: start migrating", k); debug!(" id was: {:?}", fp.id); let mut new_farming_policy = fp.clone(); diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v15.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v15.rs index 341523adf..637160796 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v15.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v15.rs @@ -3,6 +3,8 @@ use frame_support::{traits::Get, traits::OnRuntimeUpgrade, weights::Weight}; use log::{debug, info}; use sp_std::marker::PhantomData; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use parity_scale_codec::Decode; #[cfg(feature = "try-runtime")] @@ -12,9 +14,12 @@ pub struct MigrateTwinsV15(PhantomData); impl OnRuntimeUpgrade for MigrateTwinsV15 { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V14Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V14Struct, + DispatchError::Other("Unexpected pallet version") + ); let twins_count: u64 = Twins::::iter().count() as u64; log::info!( @@ -36,17 +41,19 @@ impl OnRuntimeUpgrade for MigrateTwinsV15 { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_twins_count: Vec) -> Result<(), &'static str> { + fn post_upgrade(pre_twins_count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V15Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V15Struct, + DispatchError::Other("Unexpected pallet version") + ); // Check number of twins against pre-check result let pre_twins_count: u64 = Decode::decode(&mut pre_twins_count.as_slice()) .expect("the state parameter should be something that was generated by pre_upgrade"); - assert_eq!( - Twins::::iter().count() as u64, - pre_twins_count, - "Number of twins migrated does not match" + ensure!( + Twins::::iter().count() as u64 == pre_twins_count, + DispatchError::Other("Number of twins migrated does not match") ); info!( diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v17.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v17.rs index 7b21c5e62..3e95841c8 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v17.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v17.rs @@ -7,6 +7,8 @@ use sp_runtime::{BoundedVec, Saturating}; use sp_std::{marker::PhantomData, vec::Vec}; use tfchain_support::types::{PublicIP, IP4}; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; @@ -14,9 +16,12 @@ pub struct FixFarmPublicIps(PhantomData); impl OnRuntimeUpgrade for FixFarmPublicIps { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V16Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V16Struct, + DispatchError::Other("Unexpected pallet version") + ); let farms_count: u64 = Farms::::iter().count() as u64; info!( @@ -38,17 +43,19 @@ impl OnRuntimeUpgrade for FixFarmPublicIps { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_farms_count: Vec) -> Result<(), &'static str> { + fn post_upgrade(pre_farms_count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - assert!(PalletVersion::::get() >= types::StorageVersion::V17Struct); + ensure!( + PalletVersion::::get() >= types::StorageVersion::V17Struct, + DispatchError::Other("Unexpected pallet version") + ); // Check number of farms against pre-check result let pre_farms_count: u64 = Decode::decode(&mut pre_farms_count.as_slice()) .expect("the state parameter should be something that was generated by pre_upgrade"); - assert_eq!( - Farms::::iter().count() as u64, - pre_farms_count, - "Number of farms migrated does not match" + ensure!( + Farms::::iter().count() as u64 == pre_farms_count, + DispatchError::Other("Number of farms migrated does not match") ); info!( diff --git a/substrate-node/pallets/pallet-tfgrid/src/mock.rs b/substrate-node/pallets/pallet-tfgrid/src/mock.rs index e7c8d6d4d..5b636a10d 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/mock.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/mock.rs @@ -2,7 +2,6 @@ use crate::{ self as tfgridModule, farm::FarmName, interface::{InterfaceIp, InterfaceMac, InterfaceName}, - mock::sp_api_hidden_includes_construct_runtime::hidden_include::traits::GenesisBuild, node::{CityName, CountryName, Location, SerialNumber}, terms_cond::TermsAndConditions, weights, CityNameInput, Config, CountryNameInput, DocumentHashInput, DocumentLinkInput, @@ -15,9 +14,8 @@ use frame_system::EnsureRoot; use sp_core::{ed25519, sr25519, Pair, Public, H256}; use sp_io::TestExternalities; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Verify}, - MultiSignature, + BuildStorage, MultiSignature, }; use sp_std::prelude::*; @@ -29,17 +27,13 @@ pub type Signature = MultiSignature; pub type AccountId = <::Signer as IdentifyAccount>::AccountId; pub type Moment = u64; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum TestRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum TestRuntime { Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, TfgridModule: tfgridModule::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Council: pallet_collective::::{Pallet, Call, Origin, Event, Config}, @@ -54,25 +48,24 @@ parameter_types! { impl frame_system::Config for TestRuntime { type BaseCallFilter = frame_support::traits::Everything; + type Block = Block; type BlockWeights = (); type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type AccountId = AccountId; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Lookup = IdentityLookup; + type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; type OnNewAccount = (); type OnKilledAccount = (); + type AccountData = pallet_balances::AccountData; type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); @@ -158,7 +151,7 @@ impl pallet_balances::Config for TestRuntime { type WeightInfo = pallet_balances::weights::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -208,8 +201,8 @@ impl ExternalityBuilder { pub fn build() -> TestExternalities { let _ = env_logger::try_init(); - let storage = frame_system::GenesisConfig::default() - .build_storage::() + let storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let mut ext = TestExternalities::from(storage); ext.execute_with(|| System::set_block_number(1)); @@ -221,8 +214,8 @@ type AccountPublic = ::Signer; pub fn new_test_ext() -> sp_io::TestExternalities { let _ = env_logger::try_init(); - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let genesis = pallet_balances::GenesisConfig:: { diff --git a/substrate-node/pallets/pallet-tfgrid/src/pricing.rs b/substrate-node/pallets/pallet-tfgrid/src/pricing.rs index eb00645eb..9441bbcaf 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/pricing.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/pricing.rs @@ -4,6 +4,7 @@ use frame_support::{ ensure, sp_runtime::SaturatedConversion, }; +use frame_system::pallet_prelude::BlockNumberFor; use sp_std::vec::Vec; use tfchain_support::types::{FarmCertification, NodeCertification}; @@ -108,7 +109,7 @@ impl Pallet { nu: u32, ipv4: u32, minimal_uptime: u16, - policy_end: T::BlockNumber, + policy_end: BlockNumberFor, immutable: bool, default: bool, node_certification: NodeCertification, @@ -152,7 +153,7 @@ impl Pallet { nu: u32, ipv4: u32, minimal_uptime: u16, - policy_end: T::BlockNumber, + policy_end: BlockNumberFor, default: bool, node_certification: NodeCertification, farm_certification: FarmCertification, @@ -190,7 +191,7 @@ impl Pallet { pub fn get_farming_policy( node: &TfgridNode, - ) -> Result, DispatchErrorWithPostInfo> { + ) -> Result>, DispatchErrorWithPostInfo> { let mut farm = Farms::::get(node.farm_id).ok_or(Error::::FarmNotExists)?; // If there is a farming policy defined on the @@ -260,7 +261,7 @@ impl Pallet { // policy which certifications best fit the current // node and farm certifications, considering that in all // cases a default policy would be preferable - let mut policies: Vec> = + let mut policies: Vec>> = FarmingPoliciesMap::::iter().map(|p| p.1).collect(); policies.sort(); @@ -290,8 +291,8 @@ impl Pallet { // Set the default farming policy as the last best certified // farming policy amoung all the default farming policies fn get_default_farming_policy( - ) -> Result, DispatchErrorWithPostInfo> { - let mut policies: Vec> = + ) -> Result>, DispatchErrorWithPostInfo> { + let mut policies: Vec>> = FarmingPoliciesMap::::iter().map(|p| p.1).collect(); policies.sort(); diff --git a/substrate-node/pallets/pallet-tft-bridge/src/lib.rs b/substrate-node/pallets/pallet-tft-bridge/src/lib.rs index 6e6f41485..d0d9e85ea 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/lib.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/lib.rs @@ -61,7 +61,7 @@ pub mod pallet { _, Blake2_128Concat, Vec, - MintTransaction, + MintTransaction>, OptionQuery, >; @@ -71,7 +71,7 @@ pub mod pallet { _, Blake2_128Concat, Vec, - MintTransaction, + MintTransaction>, OptionQuery, >; @@ -81,7 +81,7 @@ pub mod pallet { _, Blake2_128Concat, u64, - BurnTransaction, + BurnTransaction>, OptionQuery, >; @@ -91,19 +91,19 @@ pub mod pallet { _, Blake2_128Concat, u64, - BurnTransaction, + BurnTransaction>, OptionQuery, >; #[pallet::storage] #[pallet::getter(fn refund_transactions)] pub type RefundTransactions = - StorageMap<_, Blake2_128Concat, Vec, RefundTransaction, ValueQuery>; + StorageMap<_, Blake2_128Concat, Vec, RefundTransaction>, ValueQuery>; #[pallet::storage] #[pallet::getter(fn executed_refund_transactions)] pub type ExecutedRefundTransactions = - StorageMap<_, Blake2_128Concat, Vec, RefundTransaction, ValueQuery>; + StorageMap<_, Blake2_128Concat, Vec, RefundTransaction>, ValueQuery>; #[pallet::storage] #[pallet::getter(fn burn_transaction_id)] @@ -147,20 +147,20 @@ pub mod pallet { // Minting events MintTransactionProposed(Vec, T::AccountId, u64), MintTransactionVoted(Vec), - MintCompleted(MintTransaction, Vec), + MintCompleted(MintTransaction>, Vec), MintTransactionExpired(Vec, u64, T::AccountId), // Burn events BurnTransactionCreated(u64, T::AccountId, Vec, u64), BurnTransactionProposed(u64, Vec, u64), BurnTransactionSignatureAdded(u64, StellarSignature), BurnTransactionReady(u64), - BurnTransactionProcessed(BurnTransaction), + BurnTransactionProcessed(BurnTransaction>), BurnTransactionExpired(u64, Option, Vec, u64), // Refund events RefundTransactionCreated(Vec, Vec, u64), RefundTransactionsignatureAdded(Vec, StellarSignature), RefundTransactionReady(Vec), - RefundTransactionProcessed(RefundTransaction), + RefundTransactionProcessed(RefundTransaction>), RefundTransactionExpired(Vec, Vec, u64), } @@ -190,6 +190,7 @@ pub mod pallet { } #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub validator_accounts: Option>, pub fee_account: Option, @@ -197,21 +198,8 @@ pub mod pallet { pub deposit_fee: u64, } - // The default value for the genesis config type. - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - validator_accounts: None, - fee_account: None, - withdraw_fee: Default::default(), - deposit_fee: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { if let Some(validator_accounts) = &self.validator_accounts { Validators::::put(validator_accounts); @@ -227,7 +215,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn on_finalize(block: T::BlockNumber) { + fn on_finalize(block: BlockNumberFor) { let current_block_u64: u64 = block.saturated_into::(); for (tx_id, mut tx) in BurnTransactions::::iter() { diff --git a/substrate-node/pallets/pallet-tft-bridge/src/migrations/types.rs b/substrate-node/pallets/pallet-tft-bridge/src/migrations/types.rs index ad24ae41b..11ae84552 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/migrations/types.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/migrations/types.rs @@ -1,5 +1,6 @@ pub mod v1 { use frame_support::{pallet_prelude::ValueQuery, storage_alias, Blake2_128Concat}; + use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode}; use scale_info::{prelude::vec::Vec, TypeInfo}; @@ -19,7 +20,7 @@ pub mod v1 { Pallet, Blake2_128Concat, u64, - BurnTransaction<::BlockNumber>, + BurnTransaction>, ValueQuery, >; @@ -28,13 +29,14 @@ pub mod v1 { Pallet, Blake2_128Concat, u64, - BurnTransaction<::BlockNumber>, + BurnTransaction>, ValueQuery, >; } pub mod v2 { use frame_support::{pallet_prelude::OptionQuery, storage_alias, Blake2_128Concat}; + use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode}; use scale_info::{prelude::vec::Vec, TypeInfo}; @@ -55,7 +57,7 @@ pub mod v2 { Pallet, Blake2_128Concat, u64, - BurnTransaction<::AccountId, ::BlockNumber>, + BurnTransaction<::AccountId, BlockNumberFor>, OptionQuery, >; @@ -64,7 +66,7 @@ pub mod v2 { Pallet, Blake2_128Concat, u64, - BurnTransaction<::AccountId, ::BlockNumber>, + BurnTransaction<::AccountId, BlockNumberFor>, OptionQuery, >; } diff --git a/substrate-node/pallets/pallet-tft-bridge/src/migrations/v2.rs b/substrate-node/pallets/pallet-tft-bridge/src/migrations/v2.rs index bceb91343..9518fca70 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/migrations/v2.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/migrations/v2.rs @@ -1,8 +1,15 @@ use crate::*; -use frame_support::log::{debug, info}; -use frame_support::{traits::Get, traits::OnRuntimeUpgrade, weights::Weight}; +use frame_support::{ + log::{debug, info}, + traits::Get, + traits::OnRuntimeUpgrade, + weights::Weight, +}; +use frame_system::pallet_prelude::BlockNumberFor; use sp_std::marker::PhantomData; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use sp_std::vec::Vec; @@ -10,11 +17,11 @@ pub struct MigrateBurnTransactionsV2(PhantomData); impl OnRuntimeUpgrade for MigrateBurnTransactionsV2 { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); if PalletVersion::::get() != types::StorageVersion::V1 { return Ok(Vec::::new()); - }; + } let burn_transactions_count: u64 = migrations::types::v1::BurnTransactions::::iter().count() as u64; @@ -31,7 +38,7 @@ impl OnRuntimeUpgrade for MigrateBurnTransactionsV2 { ); info!("👥 TFT-BRIDGE pallet to V1 passes PRE migrate checks ✅",); - return Ok(Vec::::new()); + Ok(Vec::::new()) } fn on_runtime_upgrade() -> Weight { @@ -44,12 +51,17 @@ impl OnRuntimeUpgrade for MigrateBurnTransactionsV2 { } #[cfg(feature = "try-runtime")] - fn post_upgrade(_pre_burn_transactions_count: Vec) -> Result<(), &'static str> { + fn post_upgrade( + _pre_burn_transactions_count: Vec, + ) -> Result<(), sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); - if PalletVersion::::get() != types::StorageVersion::V2 { - return Ok(()); - } - let burn_transactions_count: u64 = migrations::types::v2::BurnTransactions::::iter().count() as u64; + ensure!( + PalletVersion::::get() == types::StorageVersion::V2, + DispatchError::Other("Unexpected pallet version") + ); + + let burn_transactions_count: u64 = + migrations::types::v2::BurnTransactions::::iter().count() as u64; info!( "🔎 MigrateBurnTransactionsV2 post migration: Number of existing burn transactions {:?}", burn_transactions_count @@ -71,11 +83,14 @@ pub fn migrate_burn_transactions() -> frame_support::weights::Weight let mut read_writes = 0; - migrations::types::v2::BurnTransactions::::translate::, _>( - |k, burn_transaction| { - debug!("migrated burn transaction: {:?}", k); + migrations::types::v2::BurnTransactions::::translate::< + super::types::v1::BurnTransaction>, + _, + >(|k, burn_transaction| { + debug!("migrated burn transaction: {:?}", k); - let new_burn_transaction = migrations::types::v2::BurnTransaction:: { + let new_burn_transaction = + migrations::types::v2::BurnTransaction::> { block: burn_transaction.block, amount: burn_transaction.amount, source: None, @@ -84,29 +99,29 @@ pub fn migrate_burn_transactions() -> frame_support::weights::Weight sequence_number: burn_transaction.sequence_number, }; - read_writes += 1; - Some(new_burn_transaction) - }, - ); - - migrations::types::v2::ExecutedBurnTransactions::::translate::, _>( - |k, executed_burn_transaction| { - debug!("migrated executed burn transaction: {:?}", k); - - let new_executed_burn_transaction = - migrations::types::v2::BurnTransaction:: { - block: executed_burn_transaction.block, - amount: executed_burn_transaction.amount, - source: None, - target: executed_burn_transaction.target, - signatures: executed_burn_transaction.signatures, - sequence_number: executed_burn_transaction.sequence_number, - }; - - read_writes += 1; - Some(new_executed_burn_transaction) - }, - ); + read_writes += 1; + Some(new_burn_transaction) + }); + + migrations::types::v2::ExecutedBurnTransactions::::translate::< + super::types::v1::BurnTransaction>, + _, + >(|k, executed_burn_transaction| { + debug!("migrated executed burn transaction: {:?}", k); + + let new_executed_burn_transaction = + migrations::types::v2::BurnTransaction::> { + block: executed_burn_transaction.block, + amount: executed_burn_transaction.amount, + source: None, + target: executed_burn_transaction.target, + signatures: executed_burn_transaction.signatures, + sequence_number: executed_burn_transaction.sequence_number, + }; + + read_writes += 1; + Some(new_executed_burn_transaction) + }); // Update pallet storage version PalletVersion::::set(types::StorageVersion::V2); diff --git a/substrate-node/pallets/pallet-tft-bridge/src/mock.rs b/substrate-node/pallets/pallet-tft-bridge/src/mock.rs index 106df1d76..0f3c32605 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/mock.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/mock.rs @@ -8,8 +8,8 @@ use sp_core::{sr25519, Pair, Public, H256}; use sp_runtime::traits::{IdentifyAccount, Verify}; use sp_runtime::MultiSignature; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use pallet_balances; @@ -18,16 +18,12 @@ pub type Signature = MultiSignature; pub type AccountId = <::Signer as IdentifyAccount>::AccountId; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum TestRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum TestRuntime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, TFTBridgeModule: pallet_tft_bridge::{Pallet, Storage, Call, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, } @@ -42,25 +38,24 @@ parameter_types! { impl frame_system::Config for TestRuntime { type BaseCallFilter = frame_support::traits::Everything; + type Block = Block; type BlockWeights = (); type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type AccountId = AccountId; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Lookup = IdentityLookup; + type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; type OnNewAccount = (); type OnKilledAccount = (); + type AccountData = pallet_balances::AccountData; type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); @@ -86,7 +81,7 @@ impl pallet_balances::Config for TestRuntime { type WeightInfo = pallet_balances::weights::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -138,8 +133,8 @@ pub fn eve() -> AccountId { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let genesis = pallet_balances::GenesisConfig:: { balances: vec![(alice(), 1000000000000), (bob(), 2500000000)], diff --git a/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs b/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs index 2d4111ed0..4daf76b89 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs @@ -5,7 +5,7 @@ use frame_support::{ pallet_prelude::DispatchResultWithPostInfo, traits::{Currency, ExistenceRequirement, OnUnbalanced, WithdrawReasons}, }; -use frame_system as system; +use frame_system::pallet_prelude::BlockNumberFor; use sp_runtime::SaturatedConversion; use sp_std::prelude::*; use substrate_stellar_sdk as stellar; @@ -13,7 +13,7 @@ use substrate_stellar_sdk as stellar; impl Pallet { pub fn mint_tft( tx_id: Vec, - mut tx: MintTransaction, + mut tx: MintTransaction>, ) -> DispatchResultWithPostInfo { let deposit_fee = DepositFee::::get(); ensure!( @@ -37,7 +37,7 @@ impl Pallet { // Remove tx from storage MintTransactions::::remove(tx_id.clone()); // Insert into executed transactions - let now = >::block_number(); + let now = >::block_number(); tx.block = now; ExecutedMintTransactions::::insert(tx_id.clone(), &tx); diff --git a/substrate-node/pallets/pallet-tft-price/src/benchmarking.rs b/substrate-node/pallets/pallet-tft-price/src/benchmarking.rs index cbc14ed6e..3a5f92131 100644 --- a/substrate-node/pallets/pallet-tft-price/src/benchmarking.rs +++ b/substrate-node/pallets/pallet-tft-price/src/benchmarking.rs @@ -3,7 +3,7 @@ use super::*; use crate::Pallet as TFTPriceModule; use frame_benchmarking::benchmarks; -use frame_system::{EventRecord, Pallet as System, RawOrigin}; +use frame_system::{pallet_prelude::BlockNumberFor, EventRecord, Pallet as System, RawOrigin}; use pallet_session::Pallet as Session; benchmarks! { @@ -14,7 +14,7 @@ benchmarks! { // set_prices() set_prices { - let block = T::BlockNumber::from(1u32); + let block = BlockNumberFor::::from(1u32); let price = 500; let validators = Session::::validators(); diff --git a/substrate-node/pallets/pallet-tft-price/src/lib.rs b/substrate-node/pallets/pallet-tft-price/src/lib.rs index f07904c54..9357886ed 100644 --- a/substrate-node/pallets/pallet-tft-price/src/lib.rs +++ b/substrate-node/pallets/pallet-tft-price/src/lib.rs @@ -112,7 +112,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn last_block_set)] - pub type LastBlockSet = StorageValue<_, T::BlockNumber, ValueQuery>; + pub type LastBlockSet = StorageValue<_, BlockNumberFor, ValueQuery>; #[pallet::storage] #[pallet::getter(fn average_tft_price)] @@ -141,7 +141,7 @@ pub mod pallet { pub fn set_prices( origin: OriginFor, price: u32, - block_number: T::BlockNumber, + block_number: BlockNumberFor, ) -> DispatchResultWithPostInfo { let address = ensure_signed(origin)?; @@ -180,7 +180,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn offchain_worker(block_number: T::BlockNumber) { + fn offchain_worker(block_number: BlockNumberFor) { match Self::offchain_signed_tx(block_number) { Ok(_) => log::info!("offchain worker done."), Err(err) => log::error!("{:?}", err), @@ -189,25 +189,15 @@ pub mod pallet { } #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub min_tft_price: u32, pub max_tft_price: u32, pub _data: PhantomData, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - min_tft_price: 10, - max_tft_price: 1000, - _data: PhantomData, - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { MinTftPrice::::put(self.min_tft_price); MaxTftPrice::::put(self.max_tft_price); diff --git a/substrate-node/pallets/pallet-tft-price/src/mock.rs b/substrate-node/pallets/pallet-tft-price/src/mock.rs index d089ad626..2fe51e333 100644 --- a/substrate-node/pallets/pallet-tft-price/src/mock.rs +++ b/substrate-node/pallets/pallet-tft-price/src/mock.rs @@ -2,7 +2,6 @@ use super::*; use crate::{self as pallet_tft_price, tft_price::KEY_TYPE}; -use frame_support::traits::GenesisBuild; use frame_support::{construct_runtime, parameter_types, traits::ConstU32}; use frame_system::mocking; use frame_system::EnsureRoot; @@ -17,11 +16,11 @@ use sp_io::TestExternalities; use sp_keystore::{testing::MemoryKeystore, Keystore, KeystoreExt}; use sp_runtime::{ impl_opaque_keys, - testing::{Header, UintAuthorityId}, + testing::UintAuthorityId, traits::{ BlakeTwo256, Extrinsic as ExtrinsicT, IdentifyAccount, IdentityLookup, OpaqueKeys, Verify, }, - MultiSignature, + BuildStorage, MultiSignature, }; use sp_std::marker::PhantomData; use std::cell::RefCell; @@ -71,12 +70,9 @@ impl OpaqueKeys for PreUpgradeMockSessionKeys { // For testing the module, we construct a mock runtime. construct_runtime!( - pub enum TestRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum TestRuntime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, TFTPriceModule: pallet_tft_price::{Pallet, Call, Storage, Config, Event}, Authorship: pallet_authorship::{Pallet, Storage}, ValidatorSet: substrate_validator_set::{Event}, @@ -90,25 +86,24 @@ parameter_types! { impl frame_system::Config for TestRuntime { type BaseCallFilter = frame_support::traits::Everything; + type Block = Block; type BlockWeights = (); type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type AccountId = AccountId; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Lookup = IdentityLookup; + type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); type PalletInfo = PalletInfo; - type AccountData = (); type OnNewAccount = (); type OnKilledAccount = (); + type AccountData = (); type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); @@ -274,8 +269,8 @@ impl ExternalityBuilder { .sr25519_generate_new(KEY_TYPE, Some(&format!("{}/hunter1", PHRASE))) .unwrap(); - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let session_genesis = pallet_session::GenesisConfig:: { diff --git a/substrate-node/pallets/pallet-tft-price/src/tft_price.rs b/substrate-node/pallets/pallet-tft-price/src/tft_price.rs index a5609f466..9e9f0e6b0 100644 --- a/substrate-node/pallets/pallet-tft-price/src/tft_price.rs +++ b/substrate-node/pallets/pallet-tft-price/src/tft_price.rs @@ -1,6 +1,9 @@ use super::*; use frame_support::{dispatch::DispatchResultWithPostInfo, pallet_prelude::Pays}; -use frame_system::offchain::{SendSignedTransaction, SignMessage, Signer}; +use frame_system::{ + offchain::{SendSignedTransaction, SignMessage, Signer}, + pallet_prelude::BlockNumberFor, +}; use ringbuffer::{RingBufferTrait, RingBufferTransient}; use scale_info::prelude::format; use serde_json::Value; @@ -24,7 +27,7 @@ pub const DST_AMOUNT: u32 = 100; impl Pallet { pub(crate) fn calculate_and_set_price( price: u32, - block_number: T::BlockNumber, + block_number: BlockNumberFor, ) -> DispatchResultWithPostInfo { log::info!("price {:?}", price); @@ -111,7 +114,7 @@ impl Pallet { Ok(tft_usd) } - pub(crate) fn offchain_signed_tx(block_number: T::BlockNumber) -> Result<(), Error> { + pub(crate) fn offchain_signed_tx(block_number: BlockNumberFor) -> Result<(), Error> { let signer = Signer::::AuthorityId>::any_account(); // Only allow the author of the next block to trigger price fetching @@ -120,7 +123,7 @@ impl Pallet { Err(_) => return Ok(()), } - let last_block_set: T::BlockNumber = LastBlockSet::::get(); + let last_block_set: BlockNumberFor = LastBlockSet::::get(); // Fetch the price every 1 minutes if block_number.saturated_into::() - last_block_set.saturated_into::() < 10 { return Ok(()); diff --git a/substrate-node/pallets/pallet-validator/src/lib.rs b/substrate-node/pallets/pallet-validator/src/lib.rs index 1d71586ca..e8263a172 100644 --- a/substrate-node/pallets/pallet-validator/src/lib.rs +++ b/substrate-node/pallets/pallet-validator/src/lib.rs @@ -93,21 +93,13 @@ pub mod pallet { impl Hooks> for Pallet {} #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub validators: Vec, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - validators: Vec::new(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) {} } diff --git a/substrate-node/pallets/pallet-validator/src/mock.rs b/substrate-node/pallets/pallet-validator/src/mock.rs index 137208f5e..b89849f8b 100644 --- a/substrate-node/pallets/pallet-validator/src/mock.rs +++ b/substrate-node/pallets/pallet-validator/src/mock.rs @@ -1,27 +1,23 @@ use crate as pallet_validator; use core::cell::RefCell; -use frame_support::{bounded_vec, construct_runtime, parameter_types, traits::{ConstU32, GenesisBuild}}; +use frame_support::{bounded_vec, construct_runtime, parameter_types, traits::ConstU32}; use frame_system::EnsureRoot; use pallet_session::{SessionHandler, ShouldEndSession}; use sp_core::{crypto::key_types::DUMMY, H256}; use sp_runtime::{ impl_opaque_keys, - testing::{Header, UintAuthorityId}, + testing::UintAuthorityId, traits::{BlakeTwo256, IdentityLookup, OpaqueKeys}, - RuntimeAppPublic, + BuildStorage, RuntimeAppPublic, }; use sp_std::convert::{TryFrom, TryInto}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum TestRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum TestRuntime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, Session: pallet_session::{Pallet, Call, Storage, Event, Config}, ValidatorModule: pallet_validator::{Pallet, Call, Storage, Event}, Council: pallet_collective::::{Pallet, Call, Origin, Event, Config}, @@ -44,25 +40,24 @@ parameter_types! { impl frame_system::Config for TestRuntime { type BaseCallFilter = frame_support::traits::Everything; + type Block = Block; type BlockWeights = (); type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type AccountId = u64; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Lookup = IdentityLookup; + type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); type PalletInfo = PalletInfo; - type AccountData = (); type OnNewAccount = (); type OnKilledAccount = (); + type AccountData = (); type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); @@ -181,8 +176,8 @@ impl pallet_membership::Config for TestRuntime { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let genesis = pallet_collective::GenesisConfig::::default(); diff --git a/substrate-node/pallets/substrate-validator-set/readme.md b/substrate-node/pallets/substrate-validator-set/readme.md index 3780c09a7..e1eb2ca35 100644 --- a/substrate-node/pallets/substrate-validator-set/readme.md +++ b/substrate-node/pallets/substrate-validator-set/readme.md @@ -4,7 +4,7 @@ Code changes are in `diff.patch` -A [Substrate](https://github.com/paritytech/substrate/) pallet to add/remove validators using extrinsics, in Substrate-based PoA networks. +A [Substrate](https://github.com/paritytech/substrate/) pallet to add/remove validators using extrinsics, in Substrate-based PoA networks. **Note: Current build is compatible with Substrate [v3.0.0](https://github.com/paritytech/substrate/releases/tag/v3.0.0) release.** @@ -14,7 +14,7 @@ To see this pallet in action in a Substrate runtime, watch this video - https:// ## Setup with Substrate Node Template -* Add the module's dependency in the `Cargo.toml` of your runtime directory. Make sure to enter the correct path or git url of the pallet as per your setup. +* Add the module's dependency in the `Cargo.toml` of your runtime directory. Make sure to enter the correct path or git url of the pallet as per your setup. ```toml validatorset = { @@ -33,9 +33,9 @@ std = [ ] ``` -* Make sure that you also have the Substrate [session pallet](https://github.com/paritytech/substrate/tree/master/frame/session) as part of your runtime. This is because the validator-set pallet is based on the session pallet. +* Make sure that you also have the Substrate [session pallet](https://github.com/paritytech/substrate/tree/master/frame/session) as part of your runtime. This is because the validator-set pallet is based on the session pallet. -* Import `OpaqueKeys` in your `runtime/src/lib.rs`. +* Import `OpaqueKeys` in your `runtime/src/lib.rs`. ```rust use sp_runtime::traits::{ @@ -43,7 +43,7 @@ use sp_runtime::traits::{ }; ``` -* Declare the pallet in your `runtime/src/lib.rs`. +* Declare the pallet in your `runtime/src/lib.rs`. ```rust impl validatorset::Config for Runtime { @@ -51,7 +51,7 @@ impl validatorset::Config for Runtime { } ``` -* Also, declare the session pallet in your `runtime/src/lib.rs`. The type configuration of session pallet would depend on the ValidatorSet pallet as shown below. +* Also, declare the session pallet in your `runtime/src/lib.rs`. The type configuration of session pallet would depend on the ValidatorSet pallet as shown below. ```rust impl pallet_session::Config for Runtime { @@ -68,17 +68,14 @@ impl pallet_session::Config for Runtime { } ``` -* Add both `session` and `validatorset` pallets in `construct_runtime` macro. **Make sure to add them before `Aura` and `Grandpa` pallets and after `Balances`.** +* Add both `session` and `validatorset` pallets in `construct_runtime` macro. **Make sure to add them before `Aura` and `Grandpa` pallets and after `Balances`.** ```rust construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub enum Runtime { ... - Balances: pallet_balances::{Module, Call, Storage, Config, Event}, + Balances: pallet_balances::{Module, Call, Storage, Config, Event}, Session: pallet_session::{Module, Call, Storage, Event, Config}, ValidatorSet: validatorset::{Module, Call, Storage, Event, Config}, Aura: aura::{Module, Config, Inherent(Timestamp)}, @@ -89,7 +86,7 @@ construct_runtime!( ); ``` -* Add genesis config in the `chain_spec.rs` file for `session` and `validatorset` pallets, and update it for `Aura` and `Grandpa` pallets. Because the validators are provided by the `session` pallet, we do not initialize them explicitly for `Aura` and `Grandpa` pallets. Order is important, notice that `pallet_session` is declared after `pallet_balances` since it depends on it (session accounts should have some balance). +* Add genesis config in the `chain_spec.rs` file for `session` and `validatorset` pallets, and update it for `Aura` and `Grandpa` pallets. Because the validators are provided by the `session` pallet, we do not initialize them explicitly for `Aura` and `Grandpa` pallets. Order is important, notice that `pallet_session` is declared after `pallet_balances` since it depends on it (session accounts should have some balance). ```rust fn testnet_genesis(initial_authorities: Vec<(AccountId, AuraId, GrandpaId)>, @@ -119,7 +116,7 @@ fn testnet_genesis(initial_authorities: Vec<(AccountId, AuraId, GrandpaId)>, } ``` -* Make sure you have the same number and order of session keys for your runtime. First in `runtime/src/lib.rs`: +* Make sure you have the same number and order of session keys for your runtime. First in `runtime/src/lib.rs`: ```rust pub struct SessionKeys { @@ -128,7 +125,7 @@ pub struct SessionKeys { } ``` -* And then in `src/chain_spec.rs`: +* And then in `src/chain_spec.rs`: ```rust fn session_keys( @@ -151,7 +148,7 @@ pub fn authority_keys_from_seed(seed: &str) -> ( } ``` -* `cargo build --release` and then `cargo run --release -- --dev` +* `cargo build --release` and then `cargo run --release -- --dev` ## Sample diff --git a/substrate-node/pallets/substrate-validator-set/src/lib.rs b/substrate-node/pallets/substrate-validator-set/src/lib.rs index 73547359d..31c94b3e9 100644 --- a/substrate-node/pallets/substrate-validator-set/src/lib.rs +++ b/substrate-node/pallets/substrate-validator-set/src/lib.rs @@ -102,21 +102,13 @@ pub mod pallet { impl Hooks> for Pallet {} #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub initial_validators: Vec, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - initial_validators: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { Pallet::::initialize_validators(&self.initial_validators); } @@ -206,20 +198,20 @@ pub mod pallet { fn start_session(_start_index: u32) {} } - impl EstimateNextSessionRotation for Pallet { - fn average_session_length() -> T::BlockNumber { + impl EstimateNextSessionRotation> for Pallet { + fn average_session_length() -> BlockNumberFor { Zero::zero() } fn estimate_current_session_progress( - _now: T::BlockNumber, + _now: BlockNumberFor, ) -> (Option, frame_support::dispatch::Weight) { (None, Zero::zero()) } fn estimate_next_session_rotation( - _now: T::BlockNumber, - ) -> (Option, frame_support::dispatch::Weight) { + _now: BlockNumberFor, + ) -> (Option>, frame_support::dispatch::Weight) { (None, Zero::zero()) } } diff --git a/substrate-node/pallets/substrate-validator-set/src/mock.rs b/substrate-node/pallets/substrate-validator-set/src/mock.rs index 59baa0ea3..0b5ecdeec 100644 --- a/substrate-node/pallets/substrate-validator-set/src/mock.rs +++ b/substrate-node/pallets/substrate-validator-set/src/mock.rs @@ -3,16 +3,16 @@ #![cfg(test)] use crate as validator_set; -use frame_support::{parameter_types, traits::ConstU32, traits::GenesisBuild, BasicExternalities}; +use frame_support::{parameter_types, traits::ConstU32, BasicExternalities}; use frame_system::EnsureRoot; use pallet_session::*; use parity_scale_codec::{Decode, Encode}; use sp_core::{crypto::key_types::DUMMY, H256}; use sp_runtime::{ impl_opaque_keys, - testing::{Header, UintAuthorityId}, + testing::UintAuthorityId, traits::{BlakeTwo256, IdentityLookup, OpaqueKeys}, - KeyTypeId, RuntimeAppPublic, + BuildStorage, KeyTypeId, RuntimeAppPublic, }; use sp_std::convert::{TryFrom, TryInto}; use std::cell::RefCell; @@ -54,16 +54,12 @@ impl OpaqueKeys for PreUpgradeMockSessionKeys { } } -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum TestRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum TestRuntime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, ValidatorSet: validator_set::{Pallet, Call, Storage, Event, Config}, Session: pallet_session::{Pallet, Call, Storage, Event, Config}, } @@ -124,8 +120,8 @@ pub fn authorities() -> Vec { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let keys: Vec<_> = NEXT_VALIDATORS.with(|l| { l.borrow() @@ -159,25 +155,24 @@ parameter_types! { impl frame_system::Config for TestRuntime { type BaseCallFilter = frame_support::traits::Everything; + type Block = Block; type BlockWeights = (); type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type AccountId = u64; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Lookup = IdentityLookup; + type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); type PalletInfo = PalletInfo; - type AccountData = (); type OnNewAccount = (); type OnKilledAccount = (); + type AccountData = (); type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); diff --git a/substrate-node/runtime/Cargo.toml b/substrate-node/runtime/Cargo.toml index 095b6318e..9c2b11fec 100644 --- a/substrate-node/runtime/Cargo.toml +++ b/substrate-node/runtime/Cargo.toml @@ -14,7 +14,7 @@ version.workspace = true targets = ["x86_64-unknown-linux-gnu"] [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [dependencies] smallvec.workspace = true diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 679bd3c86..dadd2f0ee 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -35,7 +35,10 @@ use tfchain_support::{ // A few exports that help ease life for downstream crates. pub use frame_support::{ construct_runtime, parameter_types, - traits::{ConstU8, EitherOfDiverse, FindAuthor, KeyOwnerProofSystem, PrivilegeCmp, Randomness}, + traits::{ + ConstBool, ConstU8, EitherOfDiverse, FindAuthor, KeyOwnerProofSystem, PrivilegeCmp, + Randomness, + }, weights::{ constants::{ BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND, @@ -100,7 +103,7 @@ pub type AccountIndex = u32; pub type Balance = u128; /// Index of a transaction in the chain. -pub type Index = u32; +pub type Nonce = u32; /// A hash of some data used by the chain. pub type Hash = sp_core::H256; @@ -143,6 +146,7 @@ pub fn session_keys(aura: AuraId, grandpa: GrandpaId) -> SessionKeys { /// Constant values used within the runtime. pub mod constants; +#[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("substrate-threefold"), impl_name: create_runtime_str!("substrate-threefold"), @@ -188,6 +192,8 @@ parameter_types! { impl frame_system::Config for Runtime { /// The basic call filter to use in dispatchable. type BaseCallFilter = frame_support::traits::Everything; + /// The block type for the runtime. + type Block = Block; /// Block & extrinsics weights: base values and limits. type BlockWeights = BlockWeights; /// The maximum length of a block (in bytes). @@ -198,16 +204,12 @@ impl frame_system::Config for Runtime { type RuntimeCall = RuntimeCall; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; + /// The type for storing how many extrinsics an account has signed. + type Nonce = Nonce; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. @@ -246,6 +248,7 @@ impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; + type AllowMultipleBlocksPerSlot = ConstBool; } impl pallet_grandpa::Config for Runtime { @@ -271,8 +274,11 @@ impl pallet_timestamp::Config for Runtime { type WeightInfo = (); } +/// Existential deposit. +pub const EXISTENTIAL_DEPOSIT: u128 = 500; + parameter_types! { - pub const ExistentialDeposit: u128 = 500; + pub const ExistentialDeposit: u128 = EXISTENTIAL_DEPOSIT; pub const MaxLocks: u32 = 50; pub const MaxReserves: u32 = 50; } @@ -291,7 +297,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = pallet_balances::weights::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -514,7 +520,7 @@ where call: RuntimeCall, public: ::Signer, account: AccountId, - index: Index, + index: Nonce, ) -> Option<( RuntimeCall, ::SignaturePayload, @@ -690,10 +696,7 @@ impl pallet_utility::Config for Runtime { // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub enum Runtime { // System support System: frame_system = 0, @@ -770,7 +773,13 @@ pub type Executive = frame_executive::Executive< // All migrations executed on runtime upgrade as a nested tuple of types implementing // `OnRuntimeUpgrade`. -type Migrations = (pallet_tfgrid::migrations::v17::FixFarmPublicIps, pallet_tft_bridge::migrations::v2::MigrateBurnTransactionsV2); +type Migrations = ( + pallet_tfgrid::migrations::v17::FixFarmPublicIps, + pallet_tft_bridge::migrations::v2::MigrateBurnTransactionsV2, + pallet_scheduler::migration::v3::MigrateToV4, + migrations::update_storage_version::PalletBalancesToV1, + migrations::update_storage_version::PalletSessionToV1, +); // follows Substrate's non destructive way of eliminating otherwise required // repetion: https://github.com/paritytech/substrate/pull/10592 @@ -919,8 +928,8 @@ impl_runtime_apis! { } } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) } } diff --git a/substrate-node/runtime/src/migrations/mod.rs b/substrate-node/runtime/src/migrations/mod.rs index 5344a1c6c..1aadb54b3 100644 --- a/substrate-node/runtime/src/migrations/mod.rs +++ b/substrate-node/runtime/src/migrations/mod.rs @@ -1,2 +1,3 @@ +pub mod remove_sudo; pub mod tfgrid_v15_smart_contract_v8; -pub mod remove_sudo; \ No newline at end of file +pub mod update_storage_version; diff --git a/substrate-node/runtime/src/migrations/tfgrid_v15_smart_contract_v8.rs b/substrate-node/runtime/src/migrations/tfgrid_v15_smart_contract_v8.rs index aa208cdcf..df07f5f5a 100644 --- a/substrate-node/runtime/src/migrations/tfgrid_v15_smart_contract_v8.rs +++ b/substrate-node/runtime/src/migrations/tfgrid_v15_smart_contract_v8.rs @@ -15,6 +15,8 @@ use frame_support::{ use log::{debug, info}; use sp_std::{collections::btree_map::BTreeMap, marker::PhantomData}; +#[cfg(feature = "try-runtime")] +use frame_support::{dispatch::DispatchError, ensure}; #[cfg(feature = "try-runtime")] use parity_scale_codec::Decode; #[cfg(feature = "try-runtime")] @@ -34,14 +36,15 @@ pub struct Migrate(PhantomData); impl OnRuntimeUpgrade for Migrate { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!( "current pallet version: {:?}", pallet_tfgrid::PalletVersion::::get() ); - assert!( + ensure!( pallet_tfgrid::PalletVersion::::get() - >= pallet_tfgrid::types::StorageVersion::V14Struct + >= pallet_tfgrid::types::StorageVersion::V14Struct, + DispatchError::Other("Unexpected pallet version") ); let twins_count: u64 = pallet_tfgrid::Twins::::iter().count() as u64; @@ -92,23 +95,23 @@ impl OnRuntimeUpgrade for Migrate { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_twins_count: Vec) -> Result<(), &'static str> { + fn post_upgrade(pre_twins_count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { info!( "current pallet version: {:?}", pallet_tfgrid::PalletVersion::::get() ); - assert!( + ensure!( pallet_tfgrid::PalletVersion::::get() - >= pallet_tfgrid::types::StorageVersion::V15Struct + >= pallet_tfgrid::types::StorageVersion::V15Struct, + DispatchError::Other("Unexpected pallet version") ); // Check number of twins against pre-check result let pre_twins_count: u64 = Decode::decode(&mut pre_twins_count.as_slice()) .expect("the state parameter should be something that was generated by pre_upgrade"); - assert_eq!( - pallet_tfgrid::Twins::::iter().count() as u64, - pre_twins_count, - "Number of twins migrated does not match" + ensure!( + pallet_tfgrid::Twins::::iter().count() as u64 == pre_twins_count, + DispatchError::Other("Number of twins migrated does not match") ); info!( diff --git a/substrate-node/runtime/src/migrations/update_storage_version.rs b/substrate-node/runtime/src/migrations/update_storage_version.rs new file mode 100644 index 000000000..b994689ac --- /dev/null +++ b/substrate-node/runtime/src/migrations/update_storage_version.rs @@ -0,0 +1,36 @@ +use frame_support::pallet_prelude::{PalletInfoAccess, PhantomData}; + +use frame_support::{ + pallet_prelude::StorageVersion, + traits::{GetStorageVersion, OnRuntimeUpgrade}, + weights::Weight, +}; + +pub struct PalletBalancesToV1(PhantomData); +impl OnRuntimeUpgrade for PalletBalancesToV1 { + fn on_runtime_upgrade() -> Weight { + // Remove the old `StorageVersion` type. + frame_support::storage::unhashed::kill(&frame_support::storage::storage_prefix( + pallet_balances::Pallet::::name().as_bytes(), + "StorageVersion".as_bytes(), + )); + + StorageVersion::new(1).put::(); + + Weight::from_all(1) + } +} + +pub struct PalletSessionToV1(PhantomData); +impl OnRuntimeUpgrade for PalletSessionToV1 { + fn on_runtime_upgrade() -> Weight { + let on_chain_storage_version = + ::on_chain_storage_version(); + + if on_chain_storage_version < 1 { + return pallet_session::migrations::v1::migrate::(); + } + + Weight::zero() + } +} diff --git a/substrate-node/rust-toolchain.toml b/substrate-node/rust-toolchain.toml index aa33e4ae2..1405ae81a 100644 --- a/substrate-node/rust-toolchain.toml +++ b/substrate-node/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.69.0" +channel = "1.70.0" components = [ "cargo", "clippy", diff --git a/substrate-node/tests/SubstrateNetwork.py b/substrate-node/tests/SubstrateNetwork.py index 1daaf828d..d6b8794bc 100644 --- a/substrate-node/tests/SubstrateNetwork.py +++ b/substrate-node/tests/SubstrateNetwork.py @@ -13,9 +13,10 @@ SUBSTRATE_NODE_DIR = dirname(os.getcwd()) +TMP_DIR = "\tmp" TFCHAIN_EXE = join(SUBSTRATE_NODE_DIR, "target", "release", "tfchain") -RE_NODE_STARTED = re.compile("Running JSON-RPC WS server") +RE_NODE_STARTED = re.compile("Running JSON-RPC server") RE_FIRST_BLOCK = re.compile("Prepared block for proposing at") TIMEOUT_STARTUP_IN_SECONDS = 600 @@ -78,7 +79,7 @@ def execute_command(cmd: list, log_file: str | None = None): return p, fd -def run_node(log_file: str, base_path: str, predefined_account: str, port: int, ws_port: int, rpc_port: int, node_key: str | None = None, bootnodes: str | None = None): +def run_node(log_file: str, base_path: str, predefined_account: str, port: int, rpc_port: int, node_key: str | None = None, bootnodes: str | None = None): logging.info("Starting node with logfile %s", log_file) if not isfile(TFCHAIN_EXE): @@ -90,9 +91,8 @@ def run_node(log_file: str, base_path: str, predefined_account: str, port: int, "--chain", "local", f"--{predefined_account.lower()}", "--port", f"{port}", - "--ws-port", f"{ws_port}", "--rpc-port", f"{rpc_port}", - "--telemetry-url", "wss://telemetry.polkadot.io/submit/ 0", + "--no-telemetry", "--validator", "--rpc-methods", "Unsafe", "--rpc-cors", "all" @@ -108,7 +108,7 @@ def run_node(log_file: str, base_path: str, predefined_account: str, port: int, return execute_command(cmd, log_file) -def run_single_node(log_file: str, base_path: str, port: int, ws_port: int, rpc_port: int, node_key: str | None = None, bootnodes: str | None = None): +def run_single_node(log_file: str, base_path: str, port: int, rpc_port: int, node_key: str | None = None, bootnodes: str | None = None): logging.info("Starting node with logfile %s", log_file) if not isfile(TFCHAIN_EXE): @@ -117,10 +117,9 @@ def run_single_node(log_file: str, base_path: str, port: int, ws_port: int, rpc_ cmd = [TFCHAIN_EXE, "--dev", - "--ws-external", + "--rpc-external", "--base-path", f"{base_path}", "--port", f"{port}", - "--ws-port", f"{ws_port}", "--rpc-port", f"{rpc_port}", "--validator", "--rpc-methods", "Unsafe", @@ -153,34 +152,32 @@ def setup_multi_node_network(self, log_name: str = "", amt: int = 1): rmtree(output_dir_network, ignore_errors=True) port = 30333 - ws_port = 9944 - rpc_port = 9933 + rpc_port = 9944 if amt == 1: log_file_alice = join(output_dir_network, "node_alice.log") - self._nodes["alice"] = run_single_node(log_file_alice, "/tmp/alice", port, ws_port, rpc_port) + self._nodes["alice"] = run_single_node(log_file_alice, f"{TMP_DIR}/alice", port, rpc_port) wait_till_node_ready(log_file_alice) - setup_offchain_workers(ws_port, "Alice") + setup_offchain_workers(rpc_port, "Alice") wait_till_first_block(log_file_alice) else: log_file_alice = join(output_dir_network, "node_alice.log") - self._nodes["alice"] = run_node(log_file_alice, "/tmp/alice", "alice", port, ws_port, + self._nodes["alice"] = run_node(log_file_alice, f"{TMP_DIR}/alice", "alice", port, rpc_port, node_key="0000000000000000000000000000000000000000000000000000000000000001") wait_till_node_ready(log_file_alice) - setup_offchain_workers(ws_port, "Alice") + setup_offchain_workers(rpc_port, "Alice") log_file = "" for x in range(1, amt): port += 1 - ws_port += 1 rpc_port += 1 name = list(PREDEFINED_KEYS.keys())[x].lower() log_file = join(output_dir_network, f"node_{name}.log") - self._nodes[name] = run_node(log_file, f"/tmp/{name}", name, port, ws_port, rpc_port, node_key=None, + self._nodes[name] = run_node(log_file, f"{TMP_DIR}/{name}", name, port, rpc_port, node_key=None, bootnodes="/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp") wait_till_node_ready(log_file) - setup_offchain_workers(ws_port, "Bob") + setup_offchain_workers(rpc_port, "Bob") wait_till_first_block(log_file_alice) From 3b5bae20befd10c848d5a77abb5c72f7be928ef8 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Wed, 6 Dec 2023 15:49:35 -0300 Subject: [PATCH 03/44] chore: bump to version 2.7.0-rc1 (specVersion: 147) (#910) --- .../helm/tfchainactivationservice/Chart.yaml | 4 +- activation-service/package.json | 2 +- .../chart/tfchainbridge/Chart.yaml | 4 +- clients/tfchain-client-js/package.json | 2 +- scripts/package.json | 2 +- substrate-node/Cargo.lock | 2293 +++++++++-------- substrate-node/Cargo.toml | 2 +- .../charts/substrate-node/Chart.yaml | 4 +- substrate-node/runtime/src/lib.rs | 3 +- tools/fork-off-substrate/package.json | 2 +- 10 files changed, 1220 insertions(+), 1098 deletions(-) diff --git a/activation-service/helm/tfchainactivationservice/Chart.yaml b/activation-service/helm/tfchainactivationservice/Chart.yaml index 4b2942a85..3cedac633 100644 --- a/activation-service/helm/tfchainactivationservice/Chart.yaml +++ b/activation-service/helm/tfchainactivationservice/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainactivationservice description: TFchain account activation funding service type: application -version: 2.6.0-rc1 -appVersion: '2.6.0-rc1' +version: 2.7.0-rc1 +appVersion: '2.7.0-rc1' diff --git a/activation-service/package.json b/activation-service/package.json index 99e5b46e7..05e7f39e6 100644 --- a/activation-service/package.json +++ b/activation-service/package.json @@ -1,6 +1,6 @@ { "name": "substrate-funding-service", - "version": "2.6.0-rc1", + "version": "2.7.0-rc1", "description": "Substrate funding service", "main": "index.js", "scripts": { diff --git a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml index 3f81449dd..44bd7c23a 100644 --- a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml +++ b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainbridge description: Bridge for TFT between Tfchain Stellar type: application -version: 2.6.0-rc1 -appVersion: '2.6.0-rc1' +version: 2.7.0-rc1 +appVersion: '2.7.0-rc1' diff --git a/clients/tfchain-client-js/package.json b/clients/tfchain-client-js/package.json index f88a483b2..85eee6e48 100644 --- a/clients/tfchain-client-js/package.json +++ b/clients/tfchain-client-js/package.json @@ -1,6 +1,6 @@ { "name": "tfgrid-api-client", - "version": "2.6.0-rc1", + "version": "2.7.0-rc1", "description": "API client for the TF Grid", "main": "index.js", "scripts": { diff --git a/scripts/package.json b/scripts/package.json index 4695b06f7..836fca0fc 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -1,6 +1,6 @@ { "name": "tfchain-js-scripts", - "version": "2.6.0-rc1", + "version": "2.7.0-rc1", "description": "scripts to fetch data / write data to tfchain", "main": "index.js", "scripts": { diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index 80baf3d22..57a28f6e1 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -12,22 +12,13 @@ dependencies = [ "regex", ] -[[package]] -name = "addr2line" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" -dependencies = [ - "gimli 0.26.2", -] - [[package]] name = "addr2line" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.27.2", + "gimli", ] [[package]] @@ -214,16 +205,15 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] @@ -253,9 +243,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -284,9 +274,9 @@ checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" [[package]] name = "array-bytes" -version = "4.2.0" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" +checksum = "de17a919934ad8c5cc99a1a74de4e2dab95d6121a8f27f94755ff525b630382c" [[package]] name = "arrayref" @@ -319,7 +309,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.21", + "time", ] [[package]] @@ -335,7 +325,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.21", + "time", ] [[package]] @@ -373,12 +363,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - [[package]] name = "async-channel" version = "1.8.0" @@ -406,7 +390,7 @@ dependencies = [ "polling", "rustix 0.37.19", "slab", - "socket2", + "socket2 0.4.9", "waker-fn", ] @@ -421,13 +405,13 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -438,7 +422,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -451,7 +435,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", ] [[package]] @@ -483,12 +467,12 @@ version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "addr2line 0.19.0", + "addr2line", "cc", "cfg-if", "libc", "miniz_oxide 0.6.2", - "object 0.30.3", + "object", "rustc-demangle", ] @@ -548,22 +532,23 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.64.0" +version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "lazy_static", "lazycell", "peeking_take_while", + "prettyplease 0.2.15", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -572,6 +557,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "bitvec" version = "1.0.1" @@ -685,12 +676,12 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bounded-collections" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbd1d11282a1eb134d3c3b7cf8ce213b5161c6e5f73fb1b98618482c606b64" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" dependencies = [ "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", ] @@ -830,9 +821,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.10.3" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", ] @@ -851,53 +842,51 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chacha20" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher 0.4.4", "cpufeatures", - "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.4.3", + "aead 0.5.2", "chacha20", - "cipher 0.3.0", + "cipher 0.4.4", "poly1305", "zeroize", ] [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.0", ] [[package]] name = "cid" -version = "0.8.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" +checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash 0.16.3", + "multihash", "serde", "unsigned-varint", ] @@ -928,6 +917,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] @@ -943,45 +933,43 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.0" +version = "4.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93aae7a4192245f70fe75dd9157fc7b4a5bf53e88d30bd4396f7d8f9284d5acc" +checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.0" +version = "4.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f423e341edefb78c9caba2d9c7f7687d0e72e89df3ce3394554754393ac3990" +checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", "strsim", ] [[package]] name = "clap_derive" -version = "4.3.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "191d9573962933b4027f932c600cd252ce27a8ad5979418fe78e43c07996f27b" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "codespan-reporting" @@ -1001,12 +989,12 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "6.2.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] @@ -1019,12 +1007,45 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + [[package]] name = "const-oid" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +[[package]] +name = "const-random" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.9", + "once_cell", + "tiny-keccak", +] + [[package]] name = "constant_time_eq" version = "0.2.5" @@ -1076,28 +1097,27 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" dependencies = [ - "arrayvec 0.7.2", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", - "hashbrown 0.12.3", + "gimli", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -1106,33 +1126,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" [[package]] name = "cranelift-entity" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" dependencies = [ "cranelift-codegen", "log", @@ -1142,15 +1162,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" [[package]] name = "cranelift-native" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" dependencies = [ "cranelift-codegen", "libc", @@ -1159,9 +1179,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1347,18 +1367,32 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.1" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", "fiat-crypto", - "packed_simd_2", - "platforms 3.0.2", + "platforms", + "rustc_version", "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "cxx" version = "1.0.95" @@ -1383,7 +1417,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -1400,7 +1434,7 @@ checksum = "4a076022ece33e7686fb76513518e219cca4fce5750a8ae6d1ce6c0f48fd1af9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -1651,7 +1685,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -1660,12 +1694,6 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - [[package]] name = "dtoa" version = "1.0.6" @@ -1734,6 +1762,16 @@ dependencies = [ "signature 1.6.4", ] +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.1.0", +] + [[package]] name = "ed25519-dalek" version = "1.0.1" @@ -1741,13 +1779,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519", - "rand 0.7.3", - "serde", + "ed25519 1.5.3", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "ed25519-dalek" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519 2.2.3", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "ed25519-zebra" version = "3.1.0" @@ -1809,6 +1860,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "enum-as-inner" version = "0.5.1" @@ -1840,6 +1897,12 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.3.1" @@ -1878,15 +1941,15 @@ dependencies = [ [[package]] name = "expander" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ "blake2", "fs-err", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -1941,9 +2004,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "file-per-thread-logger" @@ -1978,7 +2041,7 @@ dependencies = [ "futures-timer", "log", "num-traits", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "scale-info", ] @@ -2030,9 +2093,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", ] [[package]] @@ -2053,14 +2116,14 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-support-procedural", "frame-system", "linregress", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "paste 1.0.12", "scale-info", "serde", @@ -2070,7 +2133,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-runtime-interface", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-storage", "static_assertions", ] @@ -2078,7 +2141,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "array-bytes", @@ -2094,7 +2157,7 @@ dependencies = [ "lazy_static", "linked-hash-map", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "rand 0.8.5", "rand_pcg", "sc-block-builder", @@ -2112,12 +2175,13 @@ dependencies = [ "sp-database", "sp-externalities", "sp-inherents", + "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", "sp-storage", "sp-trie", + "sp-wasm-interface", "thiserror", "thousands", ] @@ -2125,56 +2189,56 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-arithmetic", "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", "frame-try-runtime", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-tracing", ] [[package]] name = "frame-metadata" -version = "15.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", ] @@ -2182,35 +2246,38 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-recursion", "futures", + "indicatif", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "serde", "sp-core", "sp-io", "sp-runtime", + "spinners", "substrate-rpc-client", "tokio", + "tokio-retry", ] [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", - "once_cell", - "parity-scale-codec 3.5.0", + "macro_magic", + "parity-scale-codec 3.6.9", "paste 1.0.12", "scale-info", "serde", @@ -2219,12 +2286,13 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", + "sp-debug-derive", "sp-inherents", "sp-io", "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-tracing", "sp-weights", "tt-call", @@ -2233,55 +2301,58 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", + "expander", "frame-support-procedural-tools", "itertools", + "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "cfg-if", "frame-support", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-version", "sp-weights", ] @@ -2289,37 +2360,37 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sp-api", ] [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sp-api", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] @@ -2338,16 +2409,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fs4" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7672706608ecb74ab2e055c68327ffc25ae4cac1e12349204fd5fb0f3487cce2" -dependencies = [ - "rustix 0.37.19", - "windows-sys 0.48.0", -] - [[package]] name = "funty" version = "2.0.0" @@ -2414,7 +2475,7 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "waker-fn", ] @@ -2426,7 +2487,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -2471,7 +2532,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "pin-utils", "slab", ] @@ -2559,21 +2620,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" dependencies = [ "fallible-iterator", - "indexmap", + "indexmap 1.9.3", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" - [[package]] name = "glob" version = "0.3.1" @@ -2627,7 +2682,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -2681,6 +2736,12 @@ dependencies = [ "ahash 0.8.3", ] +[[package]] +name = "hashbrown" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" + [[package]] name = "heck" version = "0.4.1" @@ -2802,7 +2863,7 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", ] [[package]] @@ -2845,8 +2906,8 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.9", - "socket2", + "pin-project-lite 0.2.13", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -2865,10 +2926,26 @@ dependencies = [ "rustls 0.20.8", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "webpki-roots", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls 0.21.9", + "rustls-native-certs", + "tokio", + "tokio-rustls 0.24.1", +] + [[package]] name = "iana-time-zone" version = "0.1.56" @@ -2954,7 +3031,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", ] [[package]] @@ -2994,6 +3071,29 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.2", +] + +[[package]] +name = "indicatif" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "inout" version = "0.1.3" @@ -3063,7 +3163,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd302af1b90f2463a98fa5ad469fc212c8e3175a41c3068601bfa2727591c5be" dependencies = [ - "socket2", + "socket2 0.4.9", "widestring", "winapi", "winreg", @@ -3150,7 +3250,7 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tokio-util", "tracing", "webpki-roots", @@ -3192,7 +3292,7 @@ checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" dependencies = [ "async-trait", "hyper", - "hyper-rustls", + "hyper-rustls 0.23.2", "jsonrpsee-core", "jsonrpsee-types", "rustc-hash", @@ -3210,7 +3310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" dependencies = [ "heck", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -3274,7 +3374,7 @@ dependencies = [ "ecdsa 0.16.7", "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -3307,9 +3407,9 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7a749456510c45f795e8b04a6a3e0976d0139213ecbf465843830ad55e2217" +checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", @@ -3325,7 +3425,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "spin", + "spin 0.5.2", ] [[package]] @@ -3336,9 +3436,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -3350,36 +3450,26 @@ dependencies = [ "winapi", ] -[[package]] -name = "libm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" - -[[package]] -name = "libm" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" - [[package]] name = "libp2p" -version = "0.50.1" +version = "0.51.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" +checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" dependencies = [ "bytes", "futures", "futures-timer", "getrandom 0.2.9", "instant", - "libp2p-core 0.38.0", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core", "libp2p-dns", "libp2p-identify", + "libp2p-identity", "libp2p-kad", "libp2p-mdns", "libp2p-metrics", - "libp2p-mplex", "libp2p-noise", "libp2p-ping", "libp2p-quic", @@ -3390,44 +3480,32 @@ dependencies = [ "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", - "multiaddr 0.16.0", - "parking_lot 0.12.1", + "multiaddr", "pin-project", - "smallvec", ] [[package]] -name = "libp2p-core" -version = "0.38.0" +name = "libp2p-allow-block-list" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "log", - "multiaddr 0.16.0", - "multihash 0.16.3", - "multistream-select", - "once_cell", - "parking_lot 0.12.1", - "pin-project", - "prost", - "prost-build", - "rand 0.8.5", - "rw-stream-sink", - "sec1 0.3.0", - "sha2 0.10.6", - "smallvec", - "thiserror", - "unsigned-varint", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", "void", - "zeroize", ] [[package]] @@ -3443,8 +3521,8 @@ dependencies = [ "instant", "libp2p-identity", "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multiaddr", + "multihash", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -3460,12 +3538,12 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core", "log", "parking_lot 0.12.1", "smallvec", @@ -3474,20 +3552,21 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", + "either", "futures", "futures-timer", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", "lru", - "prost", - "prost-build", - "prost-codec", + "quick-protobuf", + "quick-protobuf-codec", "smallvec", "thiserror", "void", @@ -3495,27 +3574,27 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2d584751cecb2aabaa56106be6be91338a60a0f4e420cf2af639204f596fc1" +checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58", - "ed25519-dalek", + "ed25519-dalek 2.1.0", "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multiaddr", + "multihash", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "zeroize", ] [[package]] name = "libp2p-kad" -version = "0.42.1" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", @@ -3525,13 +3604,13 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.8", "smallvec", "thiserror", "uint", @@ -3541,19 +3620,20 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", "futures", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", "rand 0.8.5", "smallvec", - "socket2", + "socket2 0.4.9", "tokio", "trust-dns-proto", "void", @@ -3561,11 +3641,11 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-identify", "libp2p-kad", "libp2p-ping", @@ -3573,40 +3653,22 @@ dependencies = [ "prometheus-client", ] -[[package]] -name = "libp2p-mplex" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core 0.38.0", - "log", - "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "unsigned-varint", -] - [[package]] name = "libp2p-noise" -version = "0.41.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "log", "once_cell", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.8", "snow", "static_assertions", "thiserror", @@ -3616,14 +3678,15 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ + "either", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.8.5", @@ -3632,15 +3695,16 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -3653,49 +3717,46 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "bytes", "futures", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", - "log", "rand 0.8.5", "smallvec", - "unsigned-varint", ] [[package]] name = "libp2p-swarm" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm-derive", "log", - "pin-project", "rand 0.8.5", "smallvec", - "thiserror", "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ "heck", "quote", @@ -3704,17 +3765,17 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ "futures", "futures-timer", "if-watch", "libc", - "libp2p-core 0.38.0", + "libp2p-core", "log", - "socket2", + "socket2 0.4.9", "tokio", ] @@ -3726,10 +3787,10 @@ checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.2", + "libp2p-core", "libp2p-identity", "rcgen 0.10.0", - "ring", + "ring 0.16.20", "rustls 0.20.8", "thiserror", "webpki 0.22.0", @@ -3739,13 +3800,13 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb1a35299860e0d4b3c02a3e74e3b293ad35ae0cee8a056363b0c862d082069" +checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ "futures", "js-sys", - "libp2p-core 0.38.0", + "libp2p-core", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -3753,9 +3814,9 @@ dependencies = [ [[package]] name = "libp2p-webrtc" -version = "0.4.0-alpha" +version = "0.4.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" +checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" dependencies = [ "async-trait", "asynchronous-codec", @@ -3764,13 +3825,13 @@ dependencies = [ "futures-timer", "hex", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-noise", "log", - "multihash 0.16.3", - "prost", - "prost-build", - "prost-codec", + "multihash", + "quick-protobuf", + "quick-protobuf-codec", "rand 0.8.5", "rcgen 0.9.3", "serde", @@ -3784,14 +3845,14 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.40.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d705506030d5c0aaf2882437c70dab437605f21c5f9811978f694e6917a3b54" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ "either", "futures", "futures-rustls", - "libp2p-core 0.38.0", + "libp2p-core", "log", "parking_lot 0.12.1", "quicksink", @@ -3803,23 +3864,22 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core", "log", - "parking_lot 0.12.1", "thiserror", "yamux", ] [[package]] name = "librocksdb-sys" -version = "0.10.0+7.9.2" +version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe4d5874f5ff2bc616e55e8c6086d478fcda13faf9495768a4aa1c22042d30b" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ "bindgen", "bzip2-sys", @@ -3970,11 +4030,11 @@ checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" [[package]] name = "lru" -version = "0.8.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.13.2", ] [[package]] @@ -4015,6 +4075,60 @@ dependencies = [ "libc", ] +[[package]] +name = "macro_magic" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "macro_magic_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "macro_magic_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "match_cfg" version = "0.1.0" @@ -4106,12 +4220,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -4150,9 +4258,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -4186,24 +4294,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "multiaddr" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aebdb21e90f81d13ed01dc84123320838e53963c2ca94b60b305d3fa64f31e" -dependencies = [ - "arrayref", - "byteorder", - "data-encoding", - "multibase", - "multihash 0.16.3", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint", - "url", -] - [[package]] name = "multiaddr" version = "0.17.1" @@ -4215,7 +4305,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", @@ -4236,9 +4326,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.16.3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "blake2b_simd", "blake2s_simd", @@ -4246,29 +4336,18 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", "unsigned-varint", ] -[[package]] -name = "multihash" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" -dependencies = [ - "core2", - "multihash-derive", - "unsigned-varint", -] - [[package]] name = "multihash-derive" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro-error", "proc-macro2", "quote", @@ -4351,7 +4430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" dependencies = [ "anyhow", - "bitflags", + "bitflags 1.3.2", "byteorder", "libc", "netlink-packet-core", @@ -4404,7 +4483,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.6.5", @@ -4479,7 +4558,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", - "num-bigint", "num-integer", "num-traits", ] @@ -4504,16 +4582,10 @@ dependencies = [ ] [[package]] -name = "object" -version = "0.29.0" +name = "number_prefix" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" -dependencies = [ - "crc32fast", - "hashbrown 0.12.3", - "indexmap", - "memchr", -] +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" @@ -4521,6 +4593,9 @@ version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ + "crc32fast", + "hashbrown 0.13.2", + "indexmap 1.9.3", "memchr", ] @@ -4574,7 +4649,7 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -4585,102 +4660,92 @@ checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", -] - -[[package]] -name = "packed_simd_2" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" -dependencies = [ - "cfg-if", - "libm 0.1.4", + "sha2 0.10.8", ] [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-burning" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-balances", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-storage", ] [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-dao" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "env_logger", "frame-benchmarking", @@ -4691,20 +4756,20 @@ dependencies = [ "pallet-membership", "pallet-tfgrid", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "tfchain-support", ] [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4712,7 +4777,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-application-crypto", "sp-consensus-grandpa", @@ -4721,96 +4786,96 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-kvstore" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-storage", ] [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-runtime-upgrade" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-io", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "log", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-io", "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-trie", ] [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4820,12 +4885,12 @@ dependencies = [ "rand 0.8.5", "sp-runtime", "sp-session", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-smart-contract" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "env_logger", "frame-benchmarking", @@ -4840,7 +4905,7 @@ dependencies = [ "pallet-tfgrid", "pallet-tft-price", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.11.2", "parking_lot 0.12.1", "scale-info", @@ -4848,7 +4913,7 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "substrate-fixed", "substrate-validator-set", "tfchain-support", @@ -4857,7 +4922,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4866,19 +4931,19 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-application-crypto", "sp-io", "sp-runtime", "sp-staking", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-tfgrid" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "env_logger", "frame-benchmarking", @@ -4892,13 +4957,13 @@ dependencies = [ "pallet-collective", "pallet-membership", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde_json", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-storage", "tfchain-support", "valip", @@ -4906,25 +4971,25 @@ dependencies = [ [[package]] name = "pallet-tft-bridge" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-storage", "substrate-stellar-sdk", ] [[package]] name = "pallet-tft-price" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "frame-benchmarking", "frame-support", @@ -4933,7 +4998,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.11.2", "scale-info", "serde", @@ -4942,7 +5007,7 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "substrate-fixed", "substrate-validator-set", "tfchain-support", @@ -4951,45 +5016,45 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-inherents", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sp-api", "sp-blockchain", "sp-core", @@ -5001,10 +5066,10 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "pallet-transaction-payment", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sp-api", "sp-runtime", "sp-weights", @@ -5013,22 +5078,22 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "pallet-validator" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5036,12 +5101,12 @@ dependencies = [ "pallet-collective", "pallet-membership", "pallet-session", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "substrate-validator-set", ] @@ -5079,16 +5144,16 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.5.0" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec 0.7.2", "bitvec", "byte-slice-cast", "bytes", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.1.4", + "parity-scale-codec-derive 3.6.9", "serde", ] @@ -5098,7 +5163,7 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -5106,11 +5171,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.4" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -5182,6 +5247,12 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + [[package]] name = "paste" version = "0.1.18" @@ -5285,7 +5356,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -5296,7 +5367,7 @@ checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -5306,7 +5377,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.3", ] [[package]] @@ -5326,7 +5397,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -5337,9 +5408,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -5373,12 +5444,6 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "platforms" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" - [[package]] name = "platforms" version = "3.0.2" @@ -5392,24 +5457,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if", "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "windows-sys 0.48.0", ] [[package]] name = "poly1305" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash 0.5.1", ] [[package]] @@ -5436,6 +5501,12 @@ dependencies = [ "universal-hash 0.5.1", ] +[[package]] +name = "portable-atomic" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -5482,6 +5553,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prettyplease" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +dependencies = [ + "proc-macro2", + "syn 2.0.39", +] + [[package]] name = "primitive-types" version = "0.12.1" @@ -5505,6 +5586,15 @@ dependencies = [ "toml 0.5.11", ] +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -5537,20 +5627,20 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro-warning" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" +checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -5571,25 +5661,25 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" +checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", "parking_lot 0.12.1", - "prometheus-client-derive-text-encode", + "prometheus-client-derive-encode", ] [[package]] -name = "prometheus-client-derive-text-encode" -version = "0.3.0" +name = "prometheus-client-derive-encode" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -5615,7 +5705,7 @@ dependencies = [ "log", "multimap", "petgraph", - "prettyplease", + "prettyplease 0.1.25", "prost", "prost-types", "regex", @@ -5624,19 +5714,6 @@ dependencies = [ "which", ] -[[package]] -name = "prost-codec" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" -dependencies = [ - "asynchronous-codec", - "bytes", - "prost", - "thiserror", - "unsigned-varint", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -5683,6 +5760,19 @@ dependencies = [ "byteorder", ] +[[package]] +name = "quick-protobuf-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +dependencies = [ + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint", +] + [[package]] name = "quicksink" version = "0.1.2" @@ -5702,7 +5792,7 @@ checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", "rustls 0.20.8", "slab", @@ -5714,9 +5804,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -5842,8 +5932,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", - "ring", - "time 0.3.21", + "ring 0.16.20", + "time", "x509-parser 0.13.2", "yasna", ] @@ -5855,8 +5945,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", - "time 0.3.21", + "ring 0.16.20", + "time", "yasna", ] @@ -5866,7 +5956,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -5875,7 +5965,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -5906,14 +5996,14 @@ checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "regalloc2" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ "fxhash", "log", @@ -5953,18 +6043,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" -[[package]] -name = "region" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", -] - [[package]] name = "resolv-conf" version = "0.7.0" @@ -6005,17 +6083,31 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" +dependencies = [ + "cc", + "getrandom 0.2.9", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rocksdb" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015439787fce1e75d55f279078d33ff14b4af5d93d995e8838ee4631301c8a99" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ "libc", "librocksdb-sys", @@ -6124,7 +6216,7 @@ version = "0.36.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -6138,7 +6230,7 @@ version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -6154,7 +6246,7 @@ checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64 0.13.1", "log", - "ring", + "ring 0.16.20", "sct 0.6.1", "webpki 0.21.4", ] @@ -6166,11 +6258,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct 0.7.0", "webpki 0.22.0", ] +[[package]] +name = "rustls" +version = "0.21.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +dependencies = [ + "log", + "ring 0.17.3", + "rustls-webpki", + "sct 0.7.0", +] + [[package]] name = "rustls-native-certs" version = "0.6.2" @@ -6192,6 +6296,16 @@ dependencies = [ "base64 0.21.2", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.3", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.12" @@ -6236,7 +6350,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "sp-core", @@ -6247,12 +6361,12 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sc-block-builder", "sc-client-api", "sc-proposer-metrics", @@ -6270,9 +6384,9 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sc-client-api", "sp-api", "sp-block-builder", @@ -6285,7 +6399,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -6304,28 +6418,28 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", "chrono", "clap", "fdlimit", "futures", - "libp2p", + "libp2p-identity", "log", "names", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "rand 0.8.5", "regex", "rpassword", @@ -6333,7 +6447,6 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -6355,12 +6468,12 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "fnv", "futures", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", @@ -6371,9 +6484,9 @@ dependencies = [ "sp-core", "sp-database", "sp-externalities", - "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-statement-store", "sp-storage", "substrate-prometheus-endpoint", ] @@ -6381,7 +6494,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db", "kvdb", @@ -6390,7 +6503,7 @@ dependencies = [ "linked-hash-map", "log", "parity-db", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "sc-client-api", "sc-state-db", @@ -6407,12 +6520,12 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p", + "libp2p-identity", "log", "mockall", "parking_lot 0.12.1", @@ -6432,12 +6545,12 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -6461,7 +6574,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ahash 0.8.3", "array-bytes", @@ -6472,7 +6585,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "rand 0.8.5", "sc-block-builder", @@ -6483,6 +6596,7 @@ dependencies = [ "sc-network-common", "sc-network-gossip", "sc-telemetry", + "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", @@ -6501,13 +6615,13 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "futures-timer", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sc-client-api", "sc-consensus", "sc-telemetry", @@ -6524,14 +6638,13 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "lru", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "sc-executor-common", - "sc-executor-wasmi", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", "sp-externalities", @@ -6542,45 +6655,29 @@ dependencies = [ "sp-version", "sp-wasm-interface", "tracing", - "wasmi", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", "sp-wasm-interface", "thiserror", "wasm-instrument", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" -dependencies = [ - "log", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "anyhow", "cfg-if", "libc", "log", - "once_cell", "rustix 0.36.14", "sc-allocator", "sc-executor-common", @@ -6592,7 +6689,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "futures", @@ -6608,10 +6705,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", - "async-trait", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -6623,7 +6719,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", "async-channel", @@ -6638,47 +6734,43 @@ dependencies = [ "libp2p", "linked_hash_set", "log", - "lru", "mockall", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", + "partial_sort", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-client-api", - "sc-consensus", "sc-network-common", - "sc-peerset", "sc-utils", "serde", "serde_json", "smallvec", - "snow", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", + "wasm-timer", "zeroize", ] [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "async-channel", "cid", "futures", - "libp2p", + "libp2p-identity", "log", "prost", "prost-build", "sc-client-api", "sc-network", - "sc-network-common", "sp-blockchain", "sp-runtime", "thiserror", @@ -6688,45 +6780,33 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes", "async-trait", - "bitflags", - "bytes", + "bitflags 1.3.2", "futures", - "futures-timer", - "libp2p", - "parity-scale-codec 3.5.0", + "libp2p-identity", + "parity-scale-codec 3.6.9", "prost-build", "sc-consensus", - "sc-peerset", - "sc-utils", - "serde", - "smallvec", - "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ahash 0.8.3", "futures", "futures-timer", "libp2p", "log", - "lru", "sc-network", "sc-network-common", - "sc-peerset", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -6735,19 +6815,18 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", + "async-channel", "futures", - "libp2p", + "libp2p-identity", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "prost", "prost-build", "sc-client-api", "sc-network", - "sc-network-common", - "sc-peerset", "sp-blockchain", "sp-core", "sp-runtime", @@ -6757,26 +6836,26 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", + "async-channel", "async-trait", "fork-tree", "futures", "futures-timer", "libp2p", "log", - "lru", "mockall", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "prost", "prost-build", "sc-client-api", "sc-consensus", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -6791,17 +6870,15 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", "futures", "libp2p", "log", - "parity-scale-codec 3.5.0", - "pin-project", + "parity-scale-codec 3.6.9", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "sp-consensus", "sp-runtime", @@ -6811,7 +6888,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", "bytes", @@ -6819,43 +6896,33 @@ dependencies = [ "futures", "futures-timer", "hyper", - "hyper-rustls", + "hyper-rustls 0.24.2", "libp2p", + "log", "num_cpus", "once_cell", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "rand 0.8.5", "sc-client-api", "sc-network", "sc-network-common", - "sc-peerset", + "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", + "sp-externalities", + "sp-keystore", "sp-offchain", "sp-runtime", "threadpool", "tracing", ] -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" -dependencies = [ - "futures", - "libp2p", - "log", - "sc-utils", - "serde_json", - "wasm-timer", -] - [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -6864,12 +6931,12 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", @@ -6887,6 +6954,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", + "sp-statement-store", "sp-version", "tokio", ] @@ -6894,10 +6962,10 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -6913,7 +6981,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "http", "jsonrpsee", @@ -6928,7 +6996,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", "futures", @@ -6936,7 +7004,7 @@ dependencies = [ "hex", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "sc-chain-spec", "sc-client-api", @@ -6954,7 +7022,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "directories", @@ -6963,7 +7031,7 @@ dependencies = [ "futures-timer", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "pin-project", "rand 0.8.5", @@ -6981,11 +7049,9 @@ dependencies = [ "sc-network-light", "sc-network-sync", "sc-network-transactions", - "sc-offchain", "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -7020,34 +7086,18 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "sp-core", ] -[[package]] -name = "sc-storage-monitor" -version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" -dependencies = [ - "clap", - "fs4", - "futures", - "log", - "sc-client-db", - "sc-utils", - "sp-core", - "thiserror", - "tokio", -] - [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "libc", @@ -7060,13 +7110,13 @@ dependencies = [ "serde_json", "sp-core", "sp-io", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "chrono", "futures", @@ -7085,7 +7135,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "atty", @@ -7093,12 +7143,10 @@ dependencies = [ "lazy_static", "libc", "log", - "once_cell", "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", - "sc-rpc-server", "sc-tracing-proc-macro", "serde", "sp-api", @@ -7116,26 +7164,25 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "futures-timer", "linked-hash-map", "log", - "num-traits", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -7154,13 +7201,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "log", + "parity-scale-codec 3.6.9", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -7168,7 +7217,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-channel", "futures", @@ -7182,25 +7231,25 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.7.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b569c32c806ec3abdf3b5869fb8bf1e0d275a7c1c9b0b05603d9464632649edf" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", "derive_more", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info-derive", "serde", ] [[package]] name = "scale-info-derive" -version = "2.6.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -7262,8 +7311,8 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -7272,8 +7321,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -7349,7 +7398,7 @@ version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -7392,29 +7441,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -7423,9 +7472,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -7481,9 +7530,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -7580,9 +7629,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snap" @@ -7592,18 +7641,18 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" +checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ - "aes-gcm 0.9.4", + "aes-gcm 0.10.2", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.1", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring", + "ring 0.17.3", "rustc_version", - "sha2 0.10.6", + "sha2 0.10.8", "subtle", ] @@ -7617,6 +7666,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "sodalite" version = "0.4.0" @@ -7646,18 +7705,19 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-trie", "sp-version", "thiserror", @@ -7666,66 +7726,65 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "blake2", "expander", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "23.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-core", "sp-io", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "16.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "integer-sqrt", "num-traits", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "static_assertions", ] [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", "sp-api", "sp-inherents", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "log", - "lru", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -7737,7 +7796,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", @@ -7752,50 +7811,47 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-keystore", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "finality-grandpa", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-api", @@ -7803,28 +7859,28 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "21.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", - "bitflags", + "bitflags 1.3.2", "blake2", "bounded-collections", "bs58", @@ -7838,7 +7894,7 @@ dependencies = [ "libsecp256k1", "log", "merlin", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "paste 1.0.12", "primitive-types", @@ -7853,44 +7909,43 @@ dependencies = [ "sp-debug-derive", "sp-externalities", "sp-runtime-interface", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", + "tracing", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "9.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "9.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -7898,52 +7953,50 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "0.19.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "environmental", - "parity-scale-codec 3.5.0", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "parity-scale-codec 3.6.9", + "sp-std 8.0.0", "sp-storage", ] [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "impl-trait-for-tuples", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", - "sp-core", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "23.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bytes", - "ed25519", - "ed25519-dalek", - "futures", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", "libsecp256k1", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "rustversion", "secp256k1", "sp-core", @@ -7951,7 +8004,7 @@ dependencies = [ "sp-keystore", "sp-runtime-interface", "sp-state-machine", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-tracing", "sp-trie", "tracing", @@ -7960,24 +8013,22 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "24.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "lazy_static", "sp-core", "sp-runtime", - "strum", + "strum 0.24.1", ] [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "0.27.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "futures", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", - "serde", "sp-core", "sp-externalities", "thiserror", @@ -7986,41 +8037,41 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "thiserror", - "zstd 0.12.3+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-metadata", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sp-api", "sp-core", @@ -8029,8 +8080,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "backtrace", "lazy_static", @@ -8040,7 +8091,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "rustc-hash", "serde", @@ -8049,14 +8100,14 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "24.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "paste 1.0.12", "rand 0.8.5", "scale-info", @@ -8065,22 +8116,22 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "17.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bytes", "impl-trait-for-tuples", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-storage", "sp-tracing", "sp-wasm-interface", @@ -8089,61 +8140,81 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "11.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "impl-trait-for-tuples", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "0.28.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "rand 0.8.5", "smallvec", "sp-core", "sp-externalities", "sp-panic-handler", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-trie", "thiserror", "tracing", + "trie-db", +] + +[[package]] +name = "sp-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "parity-scale-codec 3.6.9", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-std 8.0.0", + "thiserror", ] [[package]] @@ -8153,44 +8224,42 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#6f [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "13.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "impl-serde", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "ref-cast", "serde", "sp-debug-derive", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "futures-timer", - "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sp-inherents", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "10.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "parity-scale-codec 3.6.9", + "sp-std 8.0.0", "tracing", "tracing-core", "tracing-subscriber", @@ -8199,7 +8268,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sp-api", "sp-runtime", @@ -8208,23 +8277,22 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-core", "sp-inherents", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-trie", ] [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "22.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ahash 0.8.3", "hash-db", @@ -8232,12 +8300,12 @@ dependencies = [ "lazy_static", "memory-db", "nohash-hasher", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "scale-info", "schnellru", "sp-core", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "thiserror", "tracing", "trie-db", @@ -8246,59 +8314,58 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "22.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "impl-serde", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "parity-wasm", "scale-info", "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "14.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.5.0", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", - "wasmi", + "parity-scale-codec 3.6.9", + "sp-std 8.0.0", "wasmtime", ] [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +version = "20.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "smallvec", "sp-arithmetic", "sp-core", "sp-debug-derive", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] @@ -8307,6 +8374,23 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spinners" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" +dependencies = [ + "lazy_static", + "maplit", + "strum 0.24.1", +] + [[package]] name = "spki" version = "0.6.0" @@ -8360,7 +8444,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg_aliases", "libc", "parking_lot 0.11.2", @@ -8394,9 +8478,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "strum_macros" version = "0.24.3" @@ -8410,6 +8500,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.39", +] + [[package]] name = "stun" version = "0.4.4" @@ -8421,7 +8524,7 @@ dependencies = [ "lazy_static", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "subtle", "thiserror", "tokio", @@ -8445,10 +8548,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" -dependencies = [ - "platforms 2.0.0", -] +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" [[package]] name = "substrate-fixed" @@ -8462,13 +8562,13 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-system-rpc-runtime-api", "futures", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sc-rpc-api", "sc-transaction-pool-api", "sp-api", @@ -8481,7 +8581,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hyper", "log", @@ -8493,7 +8593,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "jsonrpsee", @@ -8514,39 +8614,40 @@ dependencies = [ "num-rational", "sha2 0.9.9", "sodalite", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37)", + "sp-std 5.0.0", ] [[package]] name = "substrate-validator-set" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "pallet-session", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", "toml 0.7.4", "walkdir", @@ -8581,9 +8682,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -8608,7 +8709,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] @@ -8665,7 +8766,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "tfchain" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "clap", "frame-benchmarking", @@ -8683,6 +8784,8 @@ dependencies = [ "sc-consensus-grandpa", "sc-executor", "sc-keystore", + "sc-network", + "sc-offchain", "sc-rpc", "sc-rpc-api", "sc-service", @@ -8709,7 +8812,7 @@ dependencies = [ [[package]] name = "tfchain-runtime" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "frame-benchmarking", "frame-executive", @@ -8742,7 +8845,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-validator", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "smallvec", "sp-api", @@ -8753,7 +8856,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "substrate-validator-set", @@ -8763,35 +8866,35 @@ dependencies = [ [[package]] name = "tfchain-support" -version = "2.6.0-rc1" +version = "2.7.0-rc1" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "scale-info", "sp-runtime", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-std 8.0.0", "valip", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -8829,17 +8932,6 @@ dependencies = [ "libc", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.21" @@ -8879,13 +8971,22 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", "zeroize", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -8913,32 +9014,43 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", +] + +[[package]] +name = "tokio-retry" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" +dependencies = [ + "pin-project", + "rand 0.8.5", + "tokio", ] [[package]] @@ -8952,6 +9064,16 @@ dependencies = [ "webpki 0.22.0", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.9", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -8959,7 +9081,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tokio", "tokio-util", ] @@ -8974,7 +9096,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tokio", "tracing", ] @@ -8997,14 +9119,14 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.19.10", ] [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -9015,11 +9137,22 @@ version = "0.19.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" dependencies = [ - "indexmap", + "indexmap 1.9.3", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.4.6", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow 0.5.19", ] [[package]] @@ -9035,18 +9168,18 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags", + "bitflags 2.4.1", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tower-layer", "tower-service", ] @@ -9071,7 +9204,7 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "log", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", ] @@ -9084,7 +9217,7 @@ checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -9191,7 +9324,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2", + "socket2 0.4.9", "thiserror", "tinyvec", "tokio", @@ -9228,7 +9361,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "clap", @@ -9236,10 +9369,9 @@ dependencies = [ "frame-try-runtime", "hex", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.9", "sc-cli", "sc-executor", - "sc-service", "serde", "serde_json", "sp-api", @@ -9259,7 +9391,7 @@ dependencies = [ "sp-version", "sp-weights", "substrate-rpc-client", - "zstd 0.12.3+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] @@ -9280,7 +9412,7 @@ dependencies = [ "log", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "stun", "thiserror", "tokio", @@ -9394,6 +9526,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.3.1" @@ -9491,12 +9629,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -9524,7 +9656,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", "wasm-bindgen-shared", ] @@ -9558,7 +9690,7 @@ checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9580,14 +9712,14 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" +checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -9596,9 +9728,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" +checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" dependencies = [ "anyhow", "cxx", @@ -9608,15 +9740,14 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" +checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" dependencies = [ "anyhow", "cc", "cxx", "cxx-build", - "regex", ] [[package]] @@ -9634,63 +9765,29 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wasmi" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" -dependencies = [ - "parity-wasm", - "wasmi-validation", - "wasmi_core", -] - -[[package]] -name = "wasmi-validation" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] - -[[package]] -name = "wasmi_core" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" -dependencies = [ - "downcast-rs", - "libm 0.2.7", - "memory_units", - "num-rational", - "num-traits", - "region", -] - [[package]] name = "wasmparser" -version = "0.100.0" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ - "indexmap", + "indexmap 1.9.3", "url", ] [[package]] name = "wasmtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", - "object 0.29.0", + "object", "once_cell", "paste 1.0.12", "psm", @@ -9703,43 +9800,43 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-asm-macros" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.13.1", + "base64 0.21.2", "bincode", "directories-next", "file-per-thread-logger", "log", "rustix 0.36.14", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "toml 0.5.11", - "windows-sys 0.42.0", + "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "wasmtime-cranelift" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", @@ -9747,27 +9844,43 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.2", + "gimli", "log", - "object 0.29.0", + "object", "target-lexicon", "thiserror", "wasmparser", + "wasmtime-cranelift-shared", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli", + "object", + "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.2", - "indexmap", + "gimli", + "indexmap 1.9.3", "log", - "object 0.29.0", + "object", "serde", "target-lexicon", "thiserror", @@ -9777,18 +9890,18 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line 0.17.0", + "addr2line", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.2", + "gimli", "log", - "object 0.29.0", + "object", "rustc-demangle", "serde", "target-lexicon", @@ -9796,60 +9909,60 @@ dependencies = [ "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-jit-debug" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object 0.29.0", + "object", "once_cell", "rustix 0.36.14", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ "cfg-if", "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-runtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ "anyhow", "cc", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", "mach", "memfd", - "memoffset 0.6.5", + "memoffset 0.8.0", "paste 1.0.12", "rand 0.8.5", "rustix 0.36.14", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-types" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ "cranelift-entity", "serde", @@ -9873,8 +9986,8 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -9883,8 +9996,8 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -9912,17 +10025,17 @@ dependencies = [ "rand 0.8.5", "rcgen 0.9.3", "regex", - "ring", + "ring 0.16.20", "rtcp", "rtp", "rustls 0.19.1", "sdp", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "stun", "thiserror", - "time 0.3.21", + "time", "tokio", "turn", "url", @@ -9977,19 +10090,19 @@ dependencies = [ "rand 0.8.5", "rand_core 0.6.4", "rcgen 0.9.3", - "ring", + "ring 0.16.20", "rustls 0.19.1", "sec1 0.3.0", "serde", "sha1", - "sha2 0.10.6", + "sha2 0.10.8", "signature 1.6.4", "subtle", "thiserror", "tokio", "webpki 0.21.4", "webrtc-util", - "x25519-dalek 2.0.0-pre.1", + "x25519-dalek 2.0.0", "x509-parser 0.13.2", ] @@ -10024,7 +10137,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" dependencies = [ "log", - "socket2", + "socket2 0.4.9", "thiserror", "tokio", "webrtc-util", @@ -10091,7 +10204,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" dependencies = [ "async-trait", - "bitflags", + "bitflags 1.3.2", "bytes", "cc", "ipnet", @@ -10371,6 +10484,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" @@ -10402,12 +10524,13 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0-pre.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", + "serde", "zeroize", ] @@ -10424,10 +10547,10 @@ dependencies = [ "lazy_static", "nom", "oid-registry 0.4.0", - "ring", + "ring 0.16.20", "rusticata-macros", "thiserror", - "time 0.3.21", + "time", ] [[package]] @@ -10445,7 +10568,7 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.21", + "time", ] [[package]] @@ -10468,7 +10591,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.21", + "time", ] [[package]] @@ -10488,7 +10611,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -10502,9 +10625,9 @@ dependencies = [ [[package]] name = "zstd" -version = "0.12.3+zstd.1.5.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" dependencies = [ "zstd-safe 6.0.5+zstd.1.5.4", ] diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index a0caf5172..41c5c7556 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://threefold.io/" license-file = "LICENSE" readme = "README.md" repository = "https://github.com/threefoldtech/tfchain3" -version = "2.6.0-rc1" +version = "2.7.0-rc1" [workspace] members = [ diff --git a/substrate-node/charts/substrate-node/Chart.yaml b/substrate-node/charts/substrate-node/Chart.yaml index 72610c2bb..a2710bdd3 100644 --- a/substrate-node/charts/substrate-node/Chart.yaml +++ b/substrate-node/charts/substrate-node/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: substrate-node description: Tfchain node type: application -version: 2.6.0-rc1 -appVersion: '2.6.0-rc1' +version: 2.7.0-rc1 +appVersion: '2.7.0-rc1' diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index dadd2f0ee..26f5662e1 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -151,7 +151,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("substrate-threefold"), impl_name: create_runtime_str!("substrate-threefold"), authoring_version: 1, - spec_version: 146, + spec_version: 147, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -774,7 +774,6 @@ pub type Executive = frame_executive::Executive< // All migrations executed on runtime upgrade as a nested tuple of types implementing // `OnRuntimeUpgrade`. type Migrations = ( - pallet_tfgrid::migrations::v17::FixFarmPublicIps, pallet_tft_bridge::migrations::v2::MigrateBurnTransactionsV2, pallet_scheduler::migration::v3::MigrateToV4, migrations::update_storage_version::PalletBalancesToV1, diff --git a/tools/fork-off-substrate/package.json b/tools/fork-off-substrate/package.json index 4b8a8e171..2f38c7889 100644 --- a/tools/fork-off-substrate/package.json +++ b/tools/fork-off-substrate/package.json @@ -1,6 +1,6 @@ { "name": "fork-off-substrate", - "version": "2.6.0-rc1", + "version": "2.7.0-rc1", "description": "This script allows bootstrapping a new substrate chain with the current state of a live chain", "main": "index.js", "scripts": { From 42cf314eec645ca3cd44524bf0f4ab8abf70f94f Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Mon, 18 Dec 2023 14:00:33 +0200 Subject: [PATCH 04/44] Development feat structured logging (#881) * feat: instrumenting bridge for better observibility and log correlation * fix: fixing override global logger after configuring it * feat: making log messages more consistent * feat: making log messages more consistent * feat: making log messages more consistent * fix: use provided context insted of new one * feat: improvme log schema and log messages * doc: add obeservation and log schema documentaion * doc: minor update * feat: adding metric for wallet balance * doc: update observibility doc * doc: update observability doc * doc: fix typo * doc: fix typo * feat: retrive tx hash from mintCompleted event * doc: add usage examples * doc: revise docs * avoid naming conflicts in context values + change few names * fix go format --- bridge/docs/observability.md | 1422 +++++++++++++++++ bridge/docs/readme.md | 6 +- bridge/tfchain_bridge/main.go | 42 +- bridge/tfchain_bridge/pkg/bridge/bridge.go | 85 +- bridge/tfchain_bridge/pkg/bridge/mint.go | 59 +- bridge/tfchain_bridge/pkg/bridge/refund.go | 62 +- bridge/tfchain_bridge/pkg/bridge/withdraw.go | 82 +- bridge/tfchain_bridge/pkg/logger/logger.go | 41 + bridge/tfchain_bridge/pkg/persistency.go | 16 +- bridge/tfchain_bridge/pkg/stellar/stellar.go | 94 +- bridge/tfchain_bridge/pkg/substrate/events.go | 90 +- 11 files changed, 1889 insertions(+), 110 deletions(-) create mode 100644 bridge/docs/observability.md create mode 100644 bridge/tfchain_bridge/pkg/logger/logger.go diff --git a/bridge/docs/observability.md b/bridge/docs/observability.md new file mode 100644 index 000000000..59b41eec4 --- /dev/null +++ b/bridge/docs/observability.md @@ -0,0 +1,1422 @@ +# Bridge Observability +The bridge is event-driven distributed system, it can be challenging to understand how requests or transfers move through the system and where bottlenecks may occur. +This is where techniques like distributed tracing, structured logs, and structured events comes in to allows developers and operators to monitor and understand the behavior of complex systems. + +By using these techniques, developers and operators can gain a more complete understanding of how their applications are performing in production and quickly identify issues when they arise. + +## Structured events +This section describes the structure and contents of the bridge logs. +It defines a common set of field names and data types, as well as descriptions and examples of how to use them. + +Bridge logs are structured and represented in JSON format. +It uses a common structure for logs, making it easier to ingest, correlate, search, and aggregate on individual fields within your logs. + +For interfaces designed for humans, they can simply display the "message" key and hide the other metadata, making the log easy to ready without sacrificing the metadata. + +The logs entries serve as events (represents an immutable event that occurred in the past), and adopting past-tense verb naming schema. + +### Events: +#### Operational Events: +These events to audit how the bridge system is operating. + +##### Bridge availability events +- `bridge_init_aborted`: The bridge failed to initiated mostly due to misconfiguration. +- `bridge_started`: The bridge started successfully. +- `bridge_unexpectedly_exited`: The bridge panicked. +- `bridge_stopped`: The bridge stopped normally mostly for maintenance or new version enrollment. + +##### Persistency events +- `stellar_cursor_saved`: The bridge saved the account operation cursor. + +##### Stellar monitor events +- `transactions_fetched`: The bridge fetched transactions data from stellar network. Should be received periodically and can be used as a mark message to detect availability issues. Also include stellar cursor position. +- `fetch_transactions_failed`: The bridge failed to fetch transactions data from stellar network. + +##### TFChain monitor events +- `block_events_fetched`: The bridge fetched transactions data from TFChain network for a block. Should be received every block and can be used as a mark message to detect availability issues. Also include the TFChain height. +- `fetch_finalized_Heads_failed`: The bridge failed to fetch transactions data from TFChain network. + +#### Business Events: +These events are for business intelligence and always tied to a user transfer, and include a `trace_id` field. + +you can use `trace_id` to correlate multiple log entries and track an transfer from one chain to the other. it is simply a stellar tx ID or TFChain burn ID depend on the side the transfer initiated from. + +For example, if a customer is complaining that their deposit never bridged, you could filter logs using `trace_id` field with the id of the customer deposit to get overview of all events related to this deposit id and see what went wrong. + +##### Cross-chain transfer events +- `transfer_initiated`: The bridge initiated a cross chain transfer (after receiving a deposit from stellar side or burn event from TFChain side). +- `transfer_completed`: The bridge has completed a cross chain transfer (either by bridging tokens to the other chain or issuing a refund if something went wrong). +- `transfer_failed`: a withdraw can not be completed and refund is not possible as well. + +##### Cross-chain transfer phases +##### Mint related +- `mint_skipped`: a mint request skipped by the bridge instance as it has already been minted. +- `mint_proposed`: a mint has proposed or voted by the bridge instance. +- `mint_completed`: a mint has completed and received on the target TFChain account. + +##### Refund related +- `event_refund_tx_ready_received`: The bridge instance has received TFChain `RefundTransactionReady` event which means all bridge validators signed a refund transaction. +- `event_refund_tx_expired_received`: The bridge instance has received TFChain `RefundTransactionExpired` event. +- `refund_skipped`: a refund request skipped by the bridge instance as it has already been refunded. +- `refund_proposed`: a refund has proposed or signed by the bridge instance. +- `refund_completed`: a refund has completed and received on the target stellar account. + +##### Withdraw related +- `event_burn_tx_created_received`: The bridge instance has received TFChain `BurnTransactionCreated` event. +- `event_burn_tx_ready_received`: The bridge instance has received TFChain `BurnTransactionReady` event which means all bridge validators signed a withdraw transaction. +- `event_burn_tx_expired_received`: The bridge instance has received TFChain `BurnTransactionExpired` event. +- `withdraw_skipped`: a refund request skipped by the bridge instance as it has already been refunded. +- `withdraw_proposed`: a withdraw has proposed or signed by the bridge instance. +- `withdraw_completed`: a withdraw has completed and received on the target stellar account. + +##### Bridge vault account related +- `payment_received` : This event represents successful payment to the bridge account (a deposit). +- `stellar_transaction_submitted` : This event represents successful transaction from the bridge account (a refund or a withdraw). + +### Metrics: + +This events describes a numeric measurement taken at given point in time. +Metric events are often collected on a predictable frequency. + +#### Bridge vault account related +- `wallet_balance`: This event describes a tft balance locked on the bridge and collected once a minute. + +### Log schema: + +#### Base fields +The base field set contains all fields which are at the root of the events. These fields are common across all types of events. + +| Field | Type | Description | Required | +| --- | --- | --- | --- | +| level | string | yes | The level or severity of the log event | +| version | number | yes |Log schema version | +| source | object | yes | Information about the bridge instance | +| event_action | string | yes | The action captured by the event | +| event_kind | string | yes | Can gives high-level information about what type of information the event contains, without being specific to the contents of the event. One of `Event`, `Alert`, `Error`, `metric` | +| metadata | object | no | Only present for logs that contain meta data about the event | +| message | string | yes | The log message | +| time | time | yes | The timestamp of the log event | +| error | string | no | Only present for logs that contain an exception or error. The message of the exception or error | +| category | string | no | One of `availability`, `persistency`, `stellar_monitor`, `tfchain_monitor`, `transfer`, `mint`, `refund`, `withdraw`, `vault` | +| trace_id | string | no | Only present on business events. a unique identifier that is assigned to a trace, which represents a complete cross-chain transfer flow. | + +#### Categorization Fields +##### event_kind field +The value of this field can be used to inform how these kinds of events should be handled. + +- alert: This value indicates an event such as an alert or notable event. + +- event: This value is the most general and most common value for this field. It is used to represent events that indicate that something happened. + +- error: This value indicates that an error occurred during the operation of the bridge. + +- metric: This events describes a numeric measurement taken at given point in time. + +##### category field +The value of this represents the "big buckets" of event categories + +- availability +- persistency +- stellar_monitor +- tfchain_monitor +- transfer +- mint +- refund +- withdraw +- vault + +#### source object +the source field set contains all fields which are included in the source object, it is common across all types of events except of `bridge_init_aborted` error event. + +| Field | Type | Required | Description | +| --- | --- | --- | --- | +| Instance_public_key | string | yes | Instance public key which you can use to filter logs by instance | +| Bridge_wallet_address | string | yes | The bridge account address which you can use to filter logs by bridge | +| Stellar_network | string | yes | Stellar network name which you can use to filter logs by environment | +| Tfchain_url | string | yes | The url of the substrate rpc node which you can use to filter logs by environment | + +#### Event-specific fields: + +##### bridge_init_aborted + +- kind: error + +- category: availability + + + + + + + + + + + + + + + + +
bridge_init_aborted Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### bridge_started + +- kind: event + +- category: availability + + + + + + + + + + + + + + + + + + + + + + + + + +
bridge_started Event Properties
PropertyTypeRequiredDescription
rescan_flagboolyesThe value of the bridge configuration flag which used to instruct the bridge to scan the vault account from the earliest known operation.
deposit_feenumberyesThe bridge fees to charge per deposit which fetched from TFChain.
+ +##### bridge_unexpectedly_exited + +- kind: error + +- category: availability + + + + + + + + + + + + + + + + +
bridge_unexpectedly_exited Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### bridge_stopped + +- kind: event + +- category: availability + + + + + + + + + + + + + + + + +
bridge_stopped Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### stellar_cursor_saved + +- kind: event + +- category: persistency + + + + + + + + + + + + + + + + + + + +
stellar_cursor_saved Event Properties
PropertyTypeRequiredDescription
cursornumberyesthe Cursor is an integer that points to a specific location in a collection of horizon responses.
+ +##### transactions_fetched + +- kind: event + +- category: stellar_monitor + + + + + + + + + + + + + + + + + + + + + + + + + +
transactions_fetched Event Properties
PropertyTypeRequiredDescription
cursornumberyesthe Cursor is an integer that points to a specific location in a collection of horizon responses.
countnumberyesThe count of the fetched transactions from horizon.
+ +##### fetch_transactions_failed + +- kind: alert + +- category: stellar_monitor + + + + + + + + + + + + + + + + + + + +
fetch_transactions_failed Event Properties
PropertyTypeRequiredDescription
cursornumberyesthe Cursor is an integer that points to a specific location in a collection of horizon responses.
+ +##### block_events_fetched + +- kind: event + +- category: tfchain_monitor + + + + + + + + + + + + + + + + + + + +
block_events_fetched Event Properties
PropertyTypeRequiredDescription
heightnumberyesThe block height of a TFChain
+ +##### fetch_finalized_Heads_failed + +- kind: alert + +- category: tfchain_monitor + + + + + + + + + + + + + + + + +
fetch_finalized_Heads_failed Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### transfer_initiated + +- kind: event + +- category: transfer + + + + + + + + + + + + + + + + + + + +
transfer_initiated Event Properties
PropertyTypeRequiredDescription
typestringyesThe type of this transfer. One of `burn` (from tfchain side) or `deposit` (from stellar side).
+ +##### transfer_completed + +- kind: event + +- category: transfer + + + + + + + + + + + + + + + + + + + +
transfer_completed Event Properties
PropertyTypeRequiredDescription
outcomestringyesOne of `refunded` or `bridged`.
+ +##### transfer_failed + +- kind: alert + +- category: transfer + + + + + + + + + + + + + + + + + + + + + + + + + +
transfer_failed Event Properties
PropertyTypeRequiredDescription
reasonstringyesThe reason behind the failure of this transfer.
typestringyesThe type of this transfer. One of `burn` (from tfchain side) or `deposit` (from stellar side).
+ +##### mint_skipped + +- kind: event + +- category: mint + + + + + + + + + + + + + + + + +
mint_skipped Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### mint_proposed + +- kind: event + +- category: mint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
mint_proposed Event Properties
PropertyTypeRequiredDescription
amountnumberyesdeposited amount to be minted on tfchain.
tx_idnumberyesThe stellar deposit tx ID.
tostringyesThe tfchain target account address.
+ +##### mint_completed + +- kind: event + +- category: mint + + + + + + + + + + + + + + + + +
mint_completed Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### event_refund_tx_ready_received + +- kind: event + +- category: refund + + + + + + + + + + + + + + + + +
event_refund_tx_ready_received Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### event_refund_tx_expired_received + +- kind: alert + +- category: refund + + + + + + + + + + + + + + + + +
event_refund_tx_expired_received Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### refund_skipped + +- kind: event + +- category: refund + + + + + + + + + + + + + + + + +
refund_skipped Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### refund_proposed + +- kind: event + +- category: refund + + + + + + + + + + + + + + + + + + + +
refund_proposed Event Properties
PropertyTypeRequiredDescription
reasonstringyesThe reason for refunding this transaction.
+ +##### refund_completed + +- kind: event + +- category: refund + + + + + + + + + + + + + + + + +
refund_completed Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### event_burn_tx_created_received + +- kind: event + +- category: withdraw + + + + + + + + + + + + + + + + +
event_burn_tx_created_received Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### event_burn_tx_ready_received + +- kind: event + +- category: withdraw + + + + + + + + + + + + + + + + +
event_burn_tx_ready_received Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### event_burn_tx_expired_received + +- kind: alert + +- category: withdraw + + + + + + + + + + + + + + + + +
event_burn_tx_expired_received Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### withdraw_skipped + +- kind: event + +- category: withdraw + + + + + + + + + + + + + + + + +
withdraw_skipped Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### withdraw_proposed + +- kind: event + +- category: withdraw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
withdraw_proposed Event Properties
PropertyTypeRequiredDescription
amountnumberyesBurned amount.
tx_idnumberyesThe burn ID.
tostringyesThe stellar target account address.
+ +##### withdraw_completed + +- kind: event + +- category: withdraw + + + + + + + + + + + + + + + + +
withdraw_completed Event Properties
PropertyTypeRequiredDescription
No metadata
+ +##### payment_received + +- kind: event + +- category: vault + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
payment_received Event Properties
PropertyTypeRequiredDescription
fromstringyesThe stellar source account address
amountdecimalyesDeposit amount
tx_hashstringyestransaction hash
ledger_close_timetimeyestransaction time
+ +##### stellar_transaction_submitted + +- kind: event + +- category: vault + + + + + + + + + + + + + + + + + + + +
stellar_transaction_submitted Event Properties
PropertyTypeRequiredDescription
result_tx_idstringyesThe stellar id of the bridge executed transaction.
+ +##### wallet_balance + +- kind: metric + +- category: vault + + + + + + + + + + + + + + + + + + + +
wallet_balance Event Properties
PropertyTypeRequiredDescription
tftnumberyesThe tft amount locked in the bridge vault account. collected once a minute
+ +## Usage examples: + +### Example 1 + +One example, if a customer is complaining that their deposit never bridged, you could filter logs using `trace_id` field with the id of the customer deposit to get overview of all events related to this deposit id and see what went wrong. + + - trace_id = `16d8b06b59aaa5514c645260263e5477bb8aad211502c56cb8849ed5b423d354` + +The result would be an array of well defined events, and for a well behave cross-transfer from stellar network to tfchain network it should include these events in the same order: + +*payment_received* --> *transfer_initiated* --> *mint_proposed* --> *mint_completed* --> *transfer_completed* + +the filtered result would be similar to the one below: + +``` +[ + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "16d8b06b59aaa5514c645260263e5477bb8aad211502c56cb8849ed5b423d354", + "event_action": "payment_received", + "event_kind": "event", + "category": "vault", + "metadata": { + "from": "GD4MUF7FTWOGNREGKMQWC3NOJGBNASEFNEOUJTLNW4FDONV5CEUTGKS4", + "amount": "5.0000000" + }, + "tx_hash": "16d8b06b59aaa5514c645260263e5477bb8aad211502c56cb8849ed5b423d354", + "ledger_close_time": "2023-11-05 17:08:28 +0000 UTC", + "time": "2023-11-05T19:08:32+02:00", + "message": "a payment has received on bridge Stellar account" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "16d8b06b59aaa5514c645260263e5477bb8aad211502c56cb8849ed5b423d354", + "event_action": "transfer_initiated", + "event_kind": "event", + "category": "transfer", + "metadata": { + "type": "deposit" + }, + "time": "2023-11-05T19:08:33+02:00", + "message": "a transfer has initiated" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "16d8b06b59aaa5514c645260263e5477bb8aad211502c56cb8849ed5b423d354", + "event_action": "mint_proposed", + "event_kind": "event", + "category": "mint", + "metadata": { + "amount": 50000000, + "tx_id": "16d8b06b59aaa5514c645260263e5477bb8aad211502c56cb8849ed5b423d354", + "to": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" + }, + "time": "2023-11-05T19:08:36+02:00", + "message": "a mint has proposed with the target substrate address of 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "16d8b06b59aaa5514c645260263e5477bb8aad211502c56cb8849ed5b423d354", + "event_action": "mint_completed", + "event_kind": "event", + "category": "mint", + "time": "2023-11-05T19:08:49+02:00", + "message": "found MintCompleted event" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "16d8b06b59aaa5514c645260263e5477bb8aad211502c56cb8849ed5b423d354", + "event_action": "transfer_completed", + "event_kind": "event", + "category": "transfer", + "metadata": { + "outcome": "bridged" + }, + "time": "2023-11-05T19:08:49+02:00", + "message": "transfer has completed" + } +] +``` + +The `transfer_completed` event’s `outcome` field value of `bridged` indicates that the TFT was successfully transferred. + +### Example 2 + +For a cross-chain transfer from TFChain to Stellar, the trace_id will be an integer. + + - trace_id = `10` + +Let’s examine the event actions for this transfer: + +*event_burn_tx_created_received* --> *transfer_initiated* --> *mint_proposed* --> *mint_completed* --> *transfer_completed* + +This time, the transfer was not completed on the other network and was instead refunded. However, using the `trace_id`, you can still trace the transfer from start to end. The filtered result would be similar to the one below: + + +``` +[ + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "10", + "event_action": "event_burn_tx_created_received", + "event_kind": "event", + "category": "withdraw", + "time": "2023-11-05T20:16:31+02:00", + "message": "found BurnTransactionCreated event" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "10", + "event_action": "transfer_initiated", + "event_kind": "event", + "category": "transfer", + "metadata": { + "type": "burn" + }, + "time": "2023-11-05T20:16:31+02:00", + "message": "a transfer has initiated" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "10", + "event_action": "mint_proposed", + "event_kind": "event", + "category": "mint", + "metadata": { + "amount": 40000000, + "tx_id": "10", + "to": "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d" + }, + "time": "2023-11-05T20:16:36+02:00", + "message": "a mint has proposed with the target substrate address of 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "10", + "event_action": "mint_completed", + "event_kind": "event", + "category": "mint", + "time": "2023-11-05T20:16:50+02:00", + "message": "found MintCompleted event" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "10", + "event_action": "transfer_completed", + "event_kind": "event", + "category": "transfer", + "metadata": { + "outcome": "refunded" + }, + "time": "2023-11-05T20:16:50+02:00", + "message": "transfer has completed" + } +] +``` + +Notably, the `transfer_completed` event’s `outcome` field value of refunded indicates that the TFT was refunded to the source account. + +### Example 3 + +Here is another example of a cross-chain transfer from TFChain to Stellar, where the events show that the transfer was successful. + + - trace_id = `13` + +*event_burn_tx_created_received* --> *transfer_initiated* --> *withdraw_proposed* --> *event_burn_tx_ready_received* --> *stellar_transaction_submitted* --> *withdraw_completed* --> *transfer_completed* + +For a more simplified view, you can filter events by the transfer category to display only the start and end events of the transfer in question. + +``` +[ + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "13", + "event_action": "event_burn_tx_created_received", + "event_kind": "event", + "category": "withdraw", + "time": "2023-11-05T20:57:08+02:00", + "message": "found BurnTransactionCreated event" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "13", + "event_action": "transfer_initiated", + "event_kind": "event", + "category": "transfer", + "metadata": { + "type": "burn" + }, + "time": "2023-11-05T20:57:08+02:00", + "message": "a transfer has initiated" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "13", + "event_action": "withdraw_proposed", + "event_kind": "event", + "category": "withdraw", + "metadata": { + "amount": 40000000, + "tx_id": "13", + "to": "GBK4SQ5HUMWKMSYVEAFPPO4W27YRPGHE4CGQOKEFQ3WGPTSNURZPISO3" + }, + "time": "2023-11-05T20:57:12+02:00", + "message": "a withdraw has proposed with the target stellar address of GBK4SQ5HUMWKMSYVEAFPPO4W27YRPGHE4CGQOKEFQ3WGPTSNURZPISO3" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "13", + "event_action": "event_burn_tx_ready_received", + "event_kind": "event", + "category": "withdraw", + "time": "2023-11-05T20:57:25+02:00", + "message": "found BurnTransactionReady event" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "13", + "event_action": "stellar_transaction_submitted", + "event_kind": "event", + "category": "vault", + "metadata": { + "result_tx_id": "777f561a4b91928f4679ad182be2178a29d5f0a3ee28a0461708d183d0a00a7d" + }, + "time": "2023-11-05T20:57:32+02:00", + "message": "the transaction submitted to the Stellar network, and its unique identifier is 777f561a4b91928f4679ad182be2178a29d5f0a3ee28a0461708d183d0a00a7d" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "13", + "event_action": "withdraw_completed", + "event_kind": "event", + "category": "withdraw", + "time": "2023-11-05T20:57:32+02:00", + "message": "the withdraw has proceed" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "13", + "event_action": "transfer_completed", + "event_kind": "event", + "category": "transfer", + "metadata": { + "outcome": "bridged" + }, + "time": "2023-11-05T20:57:32+02:00", + "message": "the transfer has completed" + } +] +``` + +### Example 4 + +The final example illustrates the expected events when a transfer from Stellar to TFChin fails. We will filter the events using the `trace_id`, which is the deposit transaction ID. + + - trace_id = `7f0406ad7b8d4f0de6dade19eb3979ef93857a56c6daa4bf9f2b0bb22a21d84f` + +The `transfer_completed` event contains the `outcome` of the transfer, which is refunded. + +Also Upon reviewing the `refund_proposed` event, we found that the `reason` field indicates that the memo was not properly formatted. + +``` +[ + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "7f0406ad7b8d4f0de6dade19eb3979ef93857a56c6daa4bf9f2b0bb22a21d84f", + "event_action": "payment_received", + "event_kind": "event", + "category": "vault", + "metadata": { + "from": "GD4MUF7FTWOGNREGKMQWC3NOJGBNASEFNEOUJTLNW4FDONV5CEUTGKS4", + "amount": "5.0000000" + }, + "tx_hash": "7f0406ad7b8d4f0de6dade19eb3979ef93857a56c6daa4bf9f2b0bb22a21d84f", + "ledger_close_time": "2023-11-05 19:05:48 +0000 UTC", + "time": "2023-11-05T21:05:57+02:00", + "message": "a payment has received on bridge Stellar account" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "7f0406ad7b8d4f0de6dade19eb3979ef93857a56c6daa4bf9f2b0bb22a21d84f", + "event_action": "transfer_initiated", + "event_kind": "event", + "category": "transfer", + "metadata": { + "type": "deposit" + }, + "time": "2023-11-05T21:05:57+02:00", + "message": "a transfer has initiated" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "7f0406ad7b8d4f0de6dade19eb3979ef93857a56c6daa4bf9f2b0bb22a21d84f", + "event_action": "refund_proposed", + "event_kind": "event", + "category": "refund", + "metadata": { + "reason": "memo is not properly formatted" + }, + "time": "2023-11-05T21:06:00+02:00", + "message": "a refund has proposed due to memo is not properly formatted" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "7f0406ad7b8d4f0de6dade19eb3979ef93857a56c6daa4bf9f2b0bb22a21d84f", + "event_action": "event_refund_tx_ready_received", + "event_kind": "event", + "category": "refund", + "time": "2023-11-05T21:06:12+02:00", + "message": "found RefundTransactionReady event" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "7f0406ad7b8d4f0de6dade19eb3979ef93857a56c6daa4bf9f2b0bb22a21d84f", + "event_action": "stellar_transaction_submitted", + "event_kind": "event", + "category": "vault", + "metadata": { + "result_tx_id": "161c06d9ebd518beee0147c5e9e8b67c851f1c443b30444aff415668e76b09de" + }, + "time": "2023-11-05T21:06:16+02:00", + "message": "the transaction submitted to the Stellar network, and its unique identifier is 161c06d9ebd518beee0147c5e9e8b67c851f1c443b30444aff415668e76b09de" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "7f0406ad7b8d4f0de6dade19eb3979ef93857a56c6daa4bf9f2b0bb22a21d84f", + "event_action": "refund_completed", + "event_kind": "event", + "category": "refund", + "time": "2023-11-05T21:06:18+02:00", + "message": "the transaction has refunded" + }, + { + "level": "info", + "version": 1, + "source": { + "Instance_public_key": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Bridge_wallet_address": "GBD3PXJEQOCQ5VR2JSMFNXYBBQF5RDEZP5GMTXDYZWMNZQJHR6HFX3AJ", + "Stellar_network": "testnet", + "Tfchain_url": "ws://localhost:9944" + }, + "trace_id": "7f0406ad7b8d4f0de6dade19eb3979ef93857a56c6daa4bf9f2b0bb22a21d84f", + "event_action": "transfer_completed", + "event_kind": "event", + "category": "transfer", + "metadata": { + "outcome": "refunded" + }, + "time": "2023-11-05T21:06:18+02:00", + "message": "the transfer has completed" + } +] +``` diff --git a/bridge/docs/readme.md b/bridge/docs/readme.md index 65eb72780..66e030883 100644 --- a/bridge/docs/readme.md +++ b/bridge/docs/readme.md @@ -37,4 +37,8 @@ Refer to [production](./production.md) for more information on how to setup a pr When you have setup the bridge in either development or production mode you can start bridging. -See [bridging](./bridging.md) for more information on how to bridge. \ No newline at end of file +See [bridging](./bridging.md) for more information on how to bridge. + +## Log schema +Bridge validators use simple event log for the sake of improving observability and perform tracing on workflows and data. +you can find more about the log schema and how it can improve the observability of the system in [the bride observability document](./observability.md). diff --git a/bridge/tfchain_bridge/main.go b/bridge/tfchain_bridge/main.go index 43fba8724..c6d2a630b 100644 --- a/bridge/tfchain_bridge/main.go +++ b/bridge/tfchain_bridge/main.go @@ -7,11 +7,11 @@ import ( "syscall" "time" - "github.com/rs/zerolog" "github.com/rs/zerolog/log" flag "github.com/spf13/pflag" "github.com/threefoldtech/tfchain_bridge/pkg" "github.com/threefoldtech/tfchain_bridge/pkg/bridge" + "github.com/threefoldtech/tfchain_bridge/pkg/logger" ) func main() { @@ -30,12 +30,7 @@ func main() { flag.Parse() - log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stdout}) - zerolog.SetGlobalLevel(zerolog.InfoLevel) - if debug { - zerolog.SetGlobalLevel(zerolog.DebugLevel) - log.Debug().Msg("debug mode enabled") - } + logger.InitLogger(debug) ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -43,23 +38,46 @@ func main() { timeout, timeoutCancel := context.WithTimeout(ctx, time.Second*15) defer timeoutCancel() - br, err := bridge.NewBridge(timeout, bridgeCfg) + br, address, err := bridge.NewBridge(timeout, bridgeCfg) if err != nil { - panic(err) + log.Fatal(). + Err(err). + Str("event_action", "bridge_init_aborted"). + Str("event_kind", "error"). + Str("category", "availability"). + Msg("the bridge instance cannot be started") + } + sourceLogEntry := logger.SourceCommonLogEntry{ + Instance_public_key: address, + Bridge_wallet_address: bridgeCfg.StellarBridgeAccount, + Stellar_network: bridgeCfg.StellarNetwork, + Tfchain_url: bridgeCfg.TfchainURL, } + log.Logger = log.Logger.With().Interface("source", sourceLogEntry).Logger() + sigs := make(chan os.Signal, 1) signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) go func() { - log.Info().Msg("awaiting signal") + log.Debug().Msg("awaiting signal") <-sigs - log.Info().Msg("shutting now") + log.Debug().Msg("shutting now") cancel() }() if err = br.Start(ctx); err != nil && err != context.Canceled { - log.Fatal().Err(err).Msg("exited unexpectedly") + log.Fatal(). + Err(err). + Str("event_action", "bridge_unexpectedly_exited"). + Str("event_kind", "error"). + Str("category", "availability"). + Msg("the bridge instance has exited unexpectedly") } + log.Info(). + Str("event_action", "bridge_stopped"). + Str("event_kind", "event"). + Str("category", "availability"). + Msg("the bridge instance has stopped") } diff --git a/bridge/tfchain_bridge/pkg/bridge/bridge.go b/bridge/tfchain_bridge/pkg/bridge/bridge.go index 6dc7c69cb..85c233b6c 100644 --- a/bridge/tfchain_bridge/pkg/bridge/bridge.go +++ b/bridge/tfchain_bridge/pkg/bridge/bridge.go @@ -2,8 +2,10 @@ package bridge import ( "context" + "time" "github.com/pkg/errors" + "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/threefoldtech/tfchain_bridge/pkg" "github.com/threefoldtech/tfchain_bridge/pkg/stellar" @@ -24,20 +26,20 @@ type Bridge struct { depositFee int64 } -func NewBridge(ctx context.Context, cfg pkg.BridgeConfig) (*Bridge, error) { +func NewBridge(ctx context.Context, cfg pkg.BridgeConfig) (*Bridge, string, error) { subClient, err := subpkg.NewSubstrateClient(cfg.TfchainURL, cfg.TfchainSeed) if err != nil { - return nil, err + return nil, "", err } blockPersistency, err := pkg.InitPersist(cfg.PersistencyFile) if err != nil { - return nil, err + return nil, "", err } wallet, err := stellar.NewStellarWallet(ctx, &cfg.StellarConfig) if err != nil { - return nil, err + return nil, "", err } if cfg.RescanBridgeAccount { @@ -46,18 +48,18 @@ func NewBridge(ctx context.Context, cfg pkg.BridgeConfig) (*Bridge, error) { // and mint accordingly err = blockPersistency.SaveStellarCursor("0") if err != nil { - return nil, err + return nil, "", err } err = blockPersistency.SaveHeight(0) if err != nil { - return nil, err + return nil, "", err } } // fetch the configured depositfee depositFee, err := subClient.GetDepositFee() if err != nil { - return nil, err + return nil, "", err } bridge := &Bridge{ @@ -67,39 +69,60 @@ func NewBridge(ctx context.Context, cfg pkg.BridgeConfig) (*Bridge, error) { config: &cfg, depositFee: depositFee, } - - return bridge, nil + // stat deposit fee? + return bridge, wallet.GetKeypair().Address(), nil } func (bridge *Bridge) Start(ctx context.Context) error { + log.Info(). + Str("event_action", "bridge_started"). + Str("event_kind", "event"). + Str("category", "availability"). + Dict("metadata", zerolog.Dict(). + Bool("rescan_flag", bridge.config.RescanBridgeAccount). + Int64("deposit_fee", bridge.depositFee)). + Msg("the bridge instance has started") height, err := bridge.blockPersistency.GetHeight() if err != nil { - return errors.Wrap(err, "failed to get block height from persistency") + return errors.Wrap(err, "an error occurred while reading block height from persistency") } - log.Info().Msg("starting stellar subscription...") + log.Debug(). + Msg("The Stellar subscription is starting") stellarSub := make(chan stellar.MintEventSubscription) go func() { defer close(stellarSub) if err = bridge.wallet.StreamBridgeStellarTransactions(ctx, stellarSub, height.StellarCursor); err != nil { - log.Fatal().Msgf("failed to monitor bridge account %s", err.Error()) + log.Fatal(). + Err(err). + Str("event_action", "bridge_unexpectedly_exited"). + Str("event_kind", "error"). + Str("category", "availability"). + Msg("the bridge instance has exited unexpectedly") } }() - log.Info().Msg("starting tfchain subscription...") + log.Debug(). + Msg("The TFChain subscription is starting") tfchainSub := make(chan subpkg.EventSubscription) go func() { defer close(tfchainSub) if err := bridge.subClient.SubscribeTfchainBridgeEvents(ctx, tfchainSub); err != nil { - log.Fatal().Msgf("failed to subscribe to tfchain %s", err.Error()) + log.Fatal(). + Err(err). + Str("event_action", "bridge_unexpectedly_exited"). + Str("event_kind", "error"). + Str("category", "availability"). + Msg("the bridge instance has exited unexpectedly") } }() + afterMinute := time.After(60 * time.Second) for { select { case data := <-tfchainSub: if data.Err != nil { - return errors.Wrap(err, "failed to process events") + return errors.Wrap(err, "failed to get tfchain events") } for _, withdrawCreatedEvent := range data.Events.WithdrawCreatedEvents { err := bridge.handleWithdrawCreated(ctx, withdrawCreatedEvent) @@ -108,13 +131,13 @@ func (bridge *Bridge) Start(ctx context.Context) error { if errors.Is(err, pkg.ErrTransactionAlreadyBurned) || errors.Is(err, pkg.ErrTransactionAlreadyMinted) { continue } - return errors.Wrap(err, "failed to handle withdraw created") + return errors.Wrap(err, "an error occurred while handling WithdrawCreatedEvents") } } for _, withdrawExpiredEvent := range data.Events.WithdrawExpiredEvents { err := bridge.handleWithdrawExpired(ctx, withdrawExpiredEvent) if err != nil { - return errors.Wrap(err, "failed to handle withdraw expired") + return errors.Wrap(err, "an error occurred while handling WithdrawExpiredEvents") } } for _, withdawReadyEvent := range data.Events.WithdrawReadyEvents { @@ -123,14 +146,13 @@ func (bridge *Bridge) Start(ctx context.Context) error { if errors.Is(err, pkg.ErrTransactionAlreadyBurned) { continue } - return errors.Wrap(err, "failed to handle withdraw ready") + return errors.Wrap(err, "an error occurred while handling WithdrawReadyEvents") } - log.Info().Uint64("ID", withdawReadyEvent.ID).Msg("withdraw processed") } for _, refundExpiredEvent := range data.Events.RefundExpiredEvents { err := bridge.handleRefundExpired(ctx, refundExpiredEvent) if err != nil { - return errors.Wrap(err, "failed to handle refund expired") + return errors.Wrap(err, "an error occurred while handling RefundExpiredEvents") } } for _, refundReadyEvent := range data.Events.RefundReadyEvents { @@ -139,13 +161,12 @@ func (bridge *Bridge) Start(ctx context.Context) error { if errors.Is(err, pkg.ErrTransactionAlreadyRefunded) { continue } - return errors.Wrap(err, "failed to handle refund ready") + return errors.Wrap(err, "an error occurred while handling RefundReadyEvents") } - log.Info().Str("hash", refundReadyEvent.Hash).Msg("refund processed") } case data := <-stellarSub: if data.Err != nil { - return errors.Wrap(err, "failed to get mint events") + return errors.Wrap(err, "failed to get stellar payments") } for _, mEvent := range data.Events { @@ -154,12 +175,26 @@ func (bridge *Bridge) Start(ctx context.Context) error { if errors.Is(err, pkg.ErrTransactionAlreadyMinted) { continue } - return errors.Wrap(err, "failed to handle mint") + return errors.Wrap(err, "an error occurred while processing the payment received") // mint could be initiated already but there is a problem saving the cursor } - log.Info().Str("hash", mEvent.Tx.Hash).Msg("mint processed") } + time.Sleep(0) + case <-afterMinute: + balance, err := bridge.wallet.StatBridgeAccount() + if err != nil { + log.Logger.Warn().Err(err).Msgf("Can't retrieve the wallet balance at the moment") + } + log.Logger.Info(). + Str("event_action", "wallet_balance"). + Str("event_kind", "metric"). + Str("category", "vault"). + Dict("metadata", zerolog.Dict(). + Str("tft", balance)). + Msgf("TFT Balance is %s", balance) + afterMinute = time.After(60 * time.Second) case <-ctx.Done(): return ctx.Err() } + time.Sleep(1 * time.Second) } } diff --git a/bridge/tfchain_bridge/pkg/bridge/mint.go b/bridge/tfchain_bridge/pkg/bridge/mint.go index 38479d470..9228f547f 100644 --- a/bridge/tfchain_bridge/pkg/bridge/mint.go +++ b/bridge/tfchain_bridge/pkg/bridge/mint.go @@ -7,14 +7,18 @@ import ( "strings" "github.com/pkg/errors" + "github.com/rs/zerolog" "github.com/rs/zerolog/log" hProtocol "github.com/stellar/go/protocols/horizon" substrate "github.com/threefoldtech/tfchain/clients/tfchain-client-go" "github.com/threefoldtech/tfchain_bridge/pkg" + _logger "github.com/threefoldtech/tfchain_bridge/pkg/logger" ) // mint handler for stellar func (bridge *Bridge) mint(ctx context.Context, senders map[string]*big.Int, tx hProtocol.Transaction) error { + logger := log.Logger.With().Str("trace_id", tx.ID).Logger() + minted, err := bridge.subClient.IsMintedAlready(tx.Hash) if err != nil { if !errors.Is(err, substrate.ErrMintTransactionNotFound) { @@ -23,18 +27,30 @@ func (bridge *Bridge) mint(ctx context.Context, senders map[string]*big.Int, tx } if minted { - log.Info().Str("tx_id", tx.Hash).Msg("transaction is already minted") + logger.Info(). + Str("event_action", "mint_skipped"). + Str("event_kind", "event"). + Str("category", "mint"). + Msg("the transaction has already been minted") return pkg.ErrTransactionAlreadyMinted } if len(senders) == 0 { return nil } - + logger.Info(). + Str("event_action", "transfer_initiated"). + Str("event_kind", "event"). + Str("category", "transfer"). + Dict("metadata", zerolog.Dict(). + Str("type", "deposit")). + Msg("a transfer has initiated") + + // only one payment in transaction is allowed if len(senders) > 1 { - log.Info().Msgf("cannot process mint transaction, multiple senders found, refunding now") + ctx = _logger.WithRefundReason(ctx, "multiple senders found") for sender, depositAmount := range senders { - return bridge.refund(context.Background(), sender, depositAmount.Int64(), tx) + return bridge.refund(ctx, sender, depositAmount.Int64(), tx) // so how this should refund the multiple senders ? } } @@ -46,37 +62,35 @@ func (bridge *Bridge) mint(ctx context.Context, senders map[string]*big.Int, tx } if tx.Memo == "" { - log.Info().Str("tx_id", tx.Hash).Msg("transaction has empty memo, refunding now") - return bridge.refund(context.Background(), receiver, depositedAmount.Int64(), tx) + ctx = _logger.WithRefundReason(ctx, "no memo in transaction") + return bridge.refund(ctx, receiver, depositedAmount.Int64(), tx) } if tx.MemoType == "return" { - log.Debug().Str("tx_id", tx.Hash).Msg("transaction has a return memo hash, skipping this transaction") + logger.Debug().Str("tx_id", tx.Hash).Msg("the transaction is being skipped because it contains a return memo") // save cursor cursor := tx.PagingToken() err := bridge.blockPersistency.SaveStellarCursor(cursor) if err != nil { - log.Err(err).Msg("error while saving cursor") - return err + return errors.Wrap(err, "an error occurred while saving stellar cursor") } - log.Info().Msg("stellar cursor saved") return nil } - // if the deposited amount is lower than the depositfee, trigger a refund + // if the deposited amount is lower than the deposit fee, trigger a refund if depositedAmount.Cmp(big.NewInt(bridge.depositFee)) <= 0 { - return bridge.refund(context.Background(), receiver, depositedAmount.Int64(), tx) + ctx = _logger.WithRefundReason(ctx, "insufficient deposit amount to cover fee") + return bridge.refund(ctx, receiver, depositedAmount.Int64(), tx) } destinationSubstrateAddress, err := bridge.getSubstrateAddressFromMemo(tx.Memo) if err != nil { - log.Info().Msgf("error while decoding tx memo: %s", err.Error()) + logger.Debug().Err(err).Msg("there was an issue decoding the memo for the transaction") // memo is not formatted correctly, issue a refund - return bridge.refund(context.Background(), receiver, depositedAmount.Int64(), tx) + ctx = _logger.WithRefundReason(ctx, "memo is not properly formatted") + return bridge.refund(ctx, receiver, depositedAmount.Int64(), tx) } - log.Info().Int64("amount", depositedAmount.Int64()).Str("tx_id", tx.Hash).Msgf("target substrate address to mint on: %s", destinationSubstrateAddress) - accountID, err := substrate.FromAddress(destinationSubstrateAddress) if err != nil { return err @@ -87,11 +101,20 @@ func (bridge *Bridge) mint(ctx context.Context, senders map[string]*big.Int, tx return err } + logger.Info(). + Str("event_action", "mint_proposed"). + Str("event_kind", "event"). + Str("category", "mint"). + Dict("metadata", zerolog.Dict(). + Int64("amount", depositedAmount.Int64()). + Str("tx_id", tx.Hash). + Str("to", destinationSubstrateAddress)). + Msgf("a mint has proposed with the target substrate address of %s", destinationSubstrateAddress) + // save cursor cursor := tx.PagingToken() if err = bridge.blockPersistency.SaveStellarCursor(cursor); err != nil { - log.Err(err).Msgf("error while saving cursor") - return err + return errors.Wrap(err, "an error occurred while saving stellar cursor") } return nil diff --git a/bridge/tfchain_bridge/pkg/bridge/refund.go b/bridge/tfchain_bridge/pkg/bridge/refund.go index ffa2e055a..7efbcfb2b 100644 --- a/bridge/tfchain_bridge/pkg/bridge/refund.go +++ b/bridge/tfchain_bridge/pkg/bridge/refund.go @@ -2,10 +2,14 @@ package bridge import ( "context" + "fmt" + "github.com/pkg/errors" + "github.com/rs/zerolog" "github.com/rs/zerolog/log" hProtocol "github.com/stellar/go/protocols/horizon" "github.com/threefoldtech/tfchain_bridge/pkg" + _logger "github.com/threefoldtech/tfchain_bridge/pkg/logger" subpkg "github.com/threefoldtech/tfchain_bridge/pkg/substrate" ) @@ -22,22 +26,25 @@ func (bridge *Bridge) refund(ctx context.Context, destination string, amount int // save cursor cursor := tx.PagingToken() - log.Info().Msgf("saving cursor now %s", cursor) - if err = bridge.blockPersistency.SaveStellarCursor(cursor); err != nil { - log.Error().Msgf("error while saving cursor: %s", err.Error()) - return err - } - return nil + err = bridge.blockPersistency.SaveStellarCursor(cursor) + // no need to check for err, if err is nil, Wrap returns nil. + return errors.Wrap(err, "an error occurred while saving stellar cursor") } func (bridge *Bridge) handleRefundExpired(ctx context.Context, refundExpiredEvent subpkg.RefundTransactionExpiredEvent) error { + logger := log.Logger.With().Str("trace_id", refundExpiredEvent.Hash).Logger() + refunded, err := bridge.subClient.IsRefundedAlready(refundExpiredEvent.Hash) if err != nil { return err } if refunded { - log.Info().Str("tx_id", refundExpiredEvent.Hash).Msg("tx is refunded already, skipping...") + logger.Info(). + Str("event_action", "refund_skipped"). + Str("event_kind", "event"). + Str("category", "refund"). + Msg("the transaction has already been refunded") return nil } @@ -46,17 +53,35 @@ func (bridge *Bridge) handleRefundExpired(ctx context.Context, refundExpiredEven return err } - return bridge.subClient.RetryCreateRefundTransactionOrAddSig(ctx, refundExpiredEvent.Hash, refundExpiredEvent.Target, int64(refundExpiredEvent.Amount), signature, bridge.wallet.GetKeypair().Address(), sequenceNumber) + err = bridge.subClient.RetryCreateRefundTransactionOrAddSig(ctx, refundExpiredEvent.Hash, refundExpiredEvent.Target, int64(refundExpiredEvent.Amount), signature, bridge.wallet.GetKeypair().Address(), sequenceNumber) + if err != nil { + return err + } + + reason := fmt.Sprint(_logger.GetRefundReason(ctx)) + logger.Info(). + Str("event_action", "refund_proposed"). + Str("event_kind", "event"). + Str("category", "refund"). + Dict("metadata", zerolog.Dict(). + Str("reason", reason)). + Msgf("a refund has proposed due to %s", reason) + return nil } func (bridge *Bridge) handleRefundReady(ctx context.Context, refundReadyEvent subpkg.RefundTransactionReadyEvent) error { + logger := log.Logger.With().Str("trace_id", refundReadyEvent.Hash).Logger() refunded, err := bridge.subClient.IsRefundedAlready(refundReadyEvent.Hash) if err != nil { return err } if refunded { - log.Info().Str("tx_id", refundReadyEvent.Hash).Msg("tx is refunded already, skipping...") + logger.Info(). + Str("event_action", "refund_skipped"). + Str("event_kind", "event"). + Str("category", "refund"). + Msg("the transaction has already been refunded") return pkg.ErrTransactionAlreadyRefunded } @@ -70,5 +95,22 @@ func (bridge *Bridge) handleRefundReady(ctx context.Context, refundReadyEvent su return err } - return bridge.subClient.RetrySetRefundTransactionExecutedTx(ctx, refund.TxHash) + err = bridge.subClient.RetrySetRefundTransactionExecutedTx(ctx, refund.TxHash) + if err != nil { + return err + } + logger.Info(). + Str("event_action", "refund_completed"). + Str("event_kind", "event"). + Str("category", "refund"). + Msg("the transaction has refunded") + logger.Info(). + Str("event_action", "transfer_completed"). + Str("event_kind", "event"). + Str("category", "transfer"). + Dict("metadata", zerolog.Dict(). + Str("outcome", "refunded")). + Msg("the transfer has completed") + + return nil } diff --git a/bridge/tfchain_bridge/pkg/bridge/withdraw.go b/bridge/tfchain_bridge/pkg/bridge/withdraw.go index 0dc82961b..177faeacb 100644 --- a/bridge/tfchain_bridge/pkg/bridge/withdraw.go +++ b/bridge/tfchain_bridge/pkg/bridge/withdraw.go @@ -7,6 +7,7 @@ import ( "math/big" "github.com/centrifuge/go-substrate-rpc-client/v4/types" + "github.com/rs/zerolog" "github.com/rs/zerolog/log" substrate "github.com/threefoldtech/tfchain/clients/tfchain-client-go" "github.com/threefoldtech/tfchain_bridge/pkg" @@ -14,16 +15,31 @@ import ( ) func (bridge *Bridge) handleWithdrawCreated(ctx context.Context, withdraw subpkg.WithdrawCreatedEvent) error { + logger := log.Logger.With().Str("trace_id", fmt.Sprint(withdraw.ID)).Logger() + burned, err := bridge.subClient.IsBurnedAlready(types.U64(withdraw.ID)) if err != nil { return err } if burned { - log.Info().Uint64("ID", uint64(withdraw.ID)).Msgf("tx is burned already, skipping...") + logger.Info(). + Str("event_action", "withdraw_skipped"). + Str("event_kind", "event"). + Str("category", "withdraw"). + Msg("the withdraw transaction has already been processed") return pkg.ErrTransactionAlreadyBurned } + logger.Info(). + Str("event_action", "transfer_initiated"). + Str("event_kind", "event"). + Str("category", "transfer"). + Dict("metadata", zerolog.Dict(). + Str("type", "burn")). + Msg("a transfer has initiated") + + // check if it can hold tft : TODO check trust line TFT limit if it can receive the amount if err := bridge.wallet.CheckAccount(withdraw.Target); err != nil { return bridge.handleBadWithdraw(ctx, withdraw) } @@ -34,17 +50,35 @@ func (bridge *Bridge) handleWithdrawCreated(ctx context.Context, withdraw subpkg } log.Debug().Msgf("stellar account sequence number: %d", sequenceNumber) - return bridge.subClient.RetryProposeWithdrawOrAddSig(ctx, withdraw.ID, withdraw.Target, big.NewInt(int64(withdraw.Amount)), signature, bridge.wallet.GetKeypair().Address(), sequenceNumber) + err = bridge.subClient.RetryProposeWithdrawOrAddSig(ctx, withdraw.ID, withdraw.Target, big.NewInt(int64(withdraw.Amount)), signature, bridge.wallet.GetKeypair().Address(), sequenceNumber) + if err != nil { + return nil + } + + logger.Info(). + Str("event_action", "withdraw_proposed"). + Str("event_kind", "event"). + Str("category", "withdraw"). + Dict("metadata", zerolog.Dict(). + Uint64("amount", withdraw.Amount). + Str("tx_id", fmt.Sprint(withdraw.ID)). + Str("to", withdraw.Target)). + Msgf("a withdraw has proposed with the target stellar address of %s", withdraw.Target) + return nil } func (bridge *Bridge) handleWithdrawExpired(ctx context.Context, withdrawExpired subpkg.WithdrawExpiredEvent) error { + logger := log.Logger.With().Str("trace_id", fmt.Sprint(withdrawExpired.ID)).Logger() + ok, source := withdrawExpired.Source.Unwrap() if !ok { - // log and skip + // log and skip ? FATAL ? + logger.Error().Msg("this should never be triggered unless this bridge release was deployed before the runtime 147 upgrade!") return nil } + // refundable path (starting from tfchain runtime 147) return bridge.handleWithdrawCreated(ctx, subpkg.WithdrawCreatedEvent{ ID: withdrawExpired.ID, Source: source, @@ -54,13 +88,19 @@ func (bridge *Bridge) handleWithdrawExpired(ctx context.Context, withdrawExpired } func (bridge *Bridge) handleWithdrawReady(ctx context.Context, withdrawReady subpkg.WithdrawReadyEvent) error { + logger := log.Logger.With().Str("trace_id", fmt.Sprint(withdrawReady.ID)).Logger() + // ctx_with_trace_id := context.WithValue(ctx, "trace_id", fmt.Sprint(withdrawReady.ID)) burned, err := bridge.subClient.IsBurnedAlready(types.U64(withdrawReady.ID)) if err != nil { return err } if burned { - log.Info().Uint64("ID", uint64(withdrawReady.ID)).Msg("tx is burned already, skipping...") + logger.Info(). + Str("event_action", "withdraw_skipped"). + Str("event_kind", "event"). + Str("category", "withdraw"). + Msg("the withdraw transaction has already been processed") return pkg.ErrTransactionAlreadyBurned } @@ -70,21 +110,32 @@ func (bridge *Bridge) handleWithdrawReady(ctx context.Context, withdrawReady sub } if len(burnTx.Signatures) == 0 { - log.Info().Msg("found 0 signatures, aborting") return pkg.ErrNoSignatures } // todo add memo hash - err = bridge.wallet.CreatePaymentWithSignaturesAndSubmit(ctx, burnTx.Target, uint64(burnTx.Amount), "", burnTx.Signatures, int64(burnTx.SequenceNumber)) + err = bridge.wallet.CreatePaymentWithSignaturesAndSubmit(ctx, burnTx.Target, uint64(burnTx.Amount), fmt.Sprint(withdrawReady.ID), burnTx.Signatures, int64(burnTx.SequenceNumber)) if err != nil { return err } + logger.Info(). + Str("event_action", "withdraw_completed"). + Str("event_kind", "event"). + Str("category", "withdraw"). + Msg("the withdraw has proceed") + logger.Info(). + Str("event_action", "transfer_completed"). + Str("event_kind", "event"). + Str("category", "transfer"). + Dict("metadata", zerolog.Dict(). + Str("outcome", "bridged")). + Msg("the transfer has completed") return bridge.subClient.RetrySetWithdrawExecuted(ctx, withdrawReady.ID) } func (bridge *Bridge) handleBadWithdraw(ctx context.Context, withdraw subpkg.WithdrawCreatedEvent) error { - log.Info().Uint64("ID", uint64(withdraw.ID)).Msg("tx is an invalid burn transaction, minting on chain again...") + logger := log.Logger.With().Str("trace_id", fmt.Sprint(withdraw.ID)).Logger() mintID := fmt.Sprintf("refund-%d", withdraw.ID) minted, err := bridge.subClient.IsMintedAlready(mintID) @@ -95,16 +146,27 @@ func (bridge *Bridge) handleBadWithdraw(ctx context.Context, withdraw subpkg.Wit } if minted { - log.Debug().Str("txHash", mintID).Msg("transaction is already minted") + logger.Info(). + Str("event_action", "mint_skipped"). + Str("event_kind", "event"). + Str("category", "mint"). + Msg("the transaction has already been minted") return pkg.ErrTransactionAlreadyMinted } - log.Info().Str("mintID", mintID).Msg("going to propose mint transaction") err = bridge.subClient.RetryProposeMintOrVote(ctx, mintID, substrate.AccountID(withdraw.Source), big.NewInt(int64(withdraw.Amount))) if err != nil { return err } - log.Info().Uint64("ID", uint64(withdraw.ID)).Msg("setting invalid burn transaction as executed") + logger.Info(). + Str("event_action", "mint_proposed"). + Str("event_kind", "event"). + Str("category", "mint"). + Dict("metadata", zerolog.Dict(). + Int64("amount", int64(withdraw.Amount)). + Str("tx_id", fmt.Sprint(withdraw.ID)). + Str("to", withdraw.Source.ToHexString())). + Msgf("a mint has proposed with the target substrate address of %s", withdraw.Source.ToHexString()) return bridge.subClient.RetrySetWithdrawExecuted(ctx, withdraw.ID) } diff --git a/bridge/tfchain_bridge/pkg/logger/logger.go b/bridge/tfchain_bridge/pkg/logger/logger.go new file mode 100644 index 000000000..43e3201c9 --- /dev/null +++ b/bridge/tfchain_bridge/pkg/logger/logger.go @@ -0,0 +1,41 @@ +package logger + +import ( + "context" + "os" + + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" +) + +const VERSION = 1 + +func InitLogger(isDebug bool) { + log.Logger = zerolog.New(os.Stdout).With().Timestamp().Uint("version", VERSION).Logger() + logLevel := zerolog.InfoLevel + if isDebug { + logLevel = zerolog.DebugLevel + log.Logger = log.Logger.With().Caller().Logger() + } + + zerolog.SetGlobalLevel(logLevel) +} + +type SourceCommonLogEntry struct { + Instance_public_key string + Bridge_wallet_address string + Stellar_network string + Tfchain_url string +} + +type refundReasonKey struct{} + +func WithRefundReason(ctx context.Context, reason string) context.Context { + return context.WithValue(ctx, refundReasonKey{}, reason) +} + +func GetRefundReason(ctx context.Context) string { + return ctx.Value(refundReasonKey{}).(string) +} + +// TODO: event log interfaces diff --git a/bridge/tfchain_bridge/pkg/persistency.go b/bridge/tfchain_bridge/pkg/persistency.go index da5c8d0a0..8d68beee6 100644 --- a/bridge/tfchain_bridge/pkg/persistency.go +++ b/bridge/tfchain_bridge/pkg/persistency.go @@ -3,6 +3,9 @@ package pkg import ( "encoding/json" "os" + + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" ) type Blockheight struct { @@ -37,7 +40,18 @@ func (b *ChainPersistency) SaveStellarCursor(cursor string) error { } blockheight.StellarCursor = cursor - return b.Save(blockheight) + err = b.Save(blockheight) + if err != nil { + return err + } + log.Debug(). + Str("event_action", "stellar_cursor_saved"). + Str("event_kind", "event"). + Str("category", "persistency"). + Dict("metadata", zerolog.Dict(). + Str("cursor", cursor)). + Msg("the Stellar cursor has been saved") + return nil } func (b *ChainPersistency) GetHeight() (*Blockheight, error) { diff --git a/bridge/tfchain_bridge/pkg/stellar/stellar.go b/bridge/tfchain_bridge/pkg/stellar/stellar.go index 71380146c..6acb1e02d 100644 --- a/bridge/tfchain_bridge/pkg/stellar/stellar.go +++ b/bridge/tfchain_bridge/pkg/stellar/stellar.go @@ -11,6 +11,7 @@ import ( "time" "github.com/pkg/errors" + "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/stellar/go/amount" "github.com/stellar/go/clients/horizonclient" @@ -92,6 +93,8 @@ func (w *StellarWallet) CreatePaymentAndReturnSignature(ctx context.Context, tar } func (w *StellarWallet) CreatePaymentWithSignaturesAndSubmit(ctx context.Context, target string, amount uint64, txHash string, signatures []substrate.StellarSignature, sequenceNumber int64) error { + ctx_with_trace_id := context.WithValue(ctx, "trace_id", txHash) + txnBuild, err := w.generatePaymentOperation(amount, target, sequenceNumber) if err != nil { return err @@ -115,10 +118,11 @@ func (w *StellarWallet) CreatePaymentWithSignaturesAndSubmit(ctx context.Context } } - return w.submitTransaction(ctx, txn) + return w.submitTransaction(ctx_with_trace_id, txn) } func (w *StellarWallet) CreateRefundPaymentWithSignaturesAndSubmit(ctx context.Context, target string, amount uint64, txHash string, signatures []substrate.StellarSignature, sequenceNumber int64) error { + ctx_with_trace_id := context.WithValue(ctx, "trace_id", txHash) txnBuild, err := w.generatePaymentOperation(amount, target, sequenceNumber) if err != nil { return err @@ -152,7 +156,7 @@ func (w *StellarWallet) CreateRefundPaymentWithSignaturesAndSubmit(ctx context.C } } - return w.submitTransaction(ctx, txn) + return w.submitTransaction(ctx_with_trace_id, txn) } func (w *StellarWallet) CreateRefundAndReturnSignature(ctx context.Context, target string, amount uint64, message string) (string, uint64, error) { @@ -215,7 +219,7 @@ func (w *StellarWallet) generatePaymentOperation(amount uint64, destination stri sourceAccount, err := w.getAccountDetails(w.config.StellarBridgeAccount) if err != nil { - return txnbuild.TransactionParams{}, errors.Wrap(err, "failed to get source account") + return txnbuild.TransactionParams{}, errors.Wrap(err, "an error occurred while getting source account details") } asset := w.getAssetCodeAndIssuer() @@ -252,7 +256,7 @@ func (w *StellarWallet) generatePaymentOperation(amount uint64, destination stri func (w *StellarWallet) createTransaction(ctx context.Context, txn txnbuild.TransactionParams, sign bool) (*txnbuild.Transaction, error) { tx, err := txnbuild.NewTransaction(txn) if err != nil { - return nil, errors.Wrap(err, "failed to build transaction") + return nil, errors.Wrap(err, "an error occurred while building the transaction") } if sign { @@ -261,7 +265,7 @@ func (w *StellarWallet) createTransaction(ctx context.Context, txn txnbuild.Tran if hError, ok := err.(*horizonclient.Error); ok { log.Error().Msgf("Error submitting tx %+v", hError.Problem.Extras) } - return nil, errors.Wrap(err, "failed to sign transaction with keypair") + return nil, errors.Wrap(err, "an error occurred while signing the transaction with keypair") } } @@ -271,7 +275,7 @@ func (w *StellarWallet) createTransaction(ctx context.Context, txn txnbuild.Tran func (w *StellarWallet) submitTransaction(ctx context.Context, txn *txnbuild.Transaction) error { client, err := w.getHorizonClient() if err != nil { - return errors.Wrap(err, "failed to get horizon client") + return errors.Wrap(err, "an error occurred while getting horizon client") } // Submit the transaction @@ -287,9 +291,16 @@ func (w *StellarWallet) submitTransaction(ctx context.Context, txn *txnbuild.Tra if errSequence != nil { return errSequence } - return errors.Wrap(err, "error submitting transaction") - } - log.Info().Str("hash", txResult.Hash).Msg("transaction submitted to the stellar network") + return errors.Wrap(err, "an error occurred while submitting the transaction") + } + log.Info(). + Str("trace_id", fmt.Sprint(ctx.Value("trace_id"))). + Str("event_action", "stellar_transaction_submitted"). + Str("event_kind", "event"). + Str("category", "vault"). + Dict("metadata", zerolog.Dict(). + Str("result_tx_id", txResult.ID)). + Msgf("the transaction submitted to the Stellar network, and its unique identifier is %s", txResult.ID) return nil } @@ -353,10 +364,16 @@ func (w *StellarWallet) StreamBridgeStellarTransactions(ctx context.Context, min case <-ctx.Done(): return ctx.Err() default: - log.Info().Str("account", opRequest.ForAccount).Str("horizon", client.HorizonURL).Str("cursor", opRequest.Cursor).Msgf("fetching stellar transactions") response, err := client.Transactions(opRequest) if err != nil { - log.Err(err).Msg("Error getting transactions for stellar account") + log.Logger.Warn(). + Err(err). + Str("event_action", "fetch_transactions_failed"). + Str("event_kind", "alert"). + Str("category", "stellar_monitor"). + Dict("metadata", zerolog.Dict(). + Str("cursor", opRequest.Cursor)). + Msg("encountered an error while retrieving transactions for bridge Stellar account, retrying in 5 sec") select { case <-ctx.Done(): return ctx.Err() @@ -365,6 +382,15 @@ func (w *StellarWallet) StreamBridgeStellarTransactions(ctx context.Context, min } } + log.Logger.Info(). + Str("event_action", "transactions_fetched"). + Str("event_kind", "event"). + Str("category", "stellar_monitor"). + Dict("metadata", zerolog.Dict(). + Str("cursor", opRequest.Cursor). + Int("count", len(response.Embedded.Records))). + Msg("stellar transactions fetched") + for _, tx := range response.Embedded.Records { mintEvents, err := w.processTransaction(tx) if err != nil { @@ -388,15 +414,15 @@ func (w *StellarWallet) StreamBridgeStellarTransactions(ctx context.Context, min } func (w *StellarWallet) processTransaction(tx hProtocol.Transaction) ([]MintEvent, error) { + logger := log.Logger.With().Str("trace_id", tx.ID).Logger() + if !tx.Successful { return nil, nil } - log.Info().Str("hash", tx.Hash).Msg("received transaction on bridge stellar account") effects, err := w.getTransactionEffects(tx.Hash) if err != nil { - log.Error().Str("error while fetching transaction effects:", err.Error()) - return nil, err + return nil, errors.Wrapf(err, "failed to fetch transaction effects for transaction with id is %s", tx.ID) } asset := w.getAssetCodeAndIssuer() @@ -427,23 +453,33 @@ func (w *StellarWallet) processTransaction(tx hProtocol.Transaction) ([]MintEven return nil, nil } - paymentOpation := op.(operations.Payment) - if paymentOpation.To != w.config.StellarBridgeAccount { + PaymentOperation := op.(operations.Payment) + if PaymentOperation.To != w.config.StellarBridgeAccount { continue } - parsedAmount, err := amount.ParseInt64(paymentOpation.Amount) + parsedAmount, err := amount.ParseInt64(PaymentOperation.Amount) if err != nil { continue } depositedAmount := big.NewInt(int64(parsedAmount)) - if _, ok := senders[paymentOpation.From]; !ok { - senders[paymentOpation.From] = depositedAmount + logger.Info(). + Str("event_action", "payment_received"). + Str("event_kind", "event"). + Str("category", "vault"). + Dict("metadata", zerolog.Dict(). + Str("from", PaymentOperation.From). + Str("amount", PaymentOperation.Amount)). + Str("tx_hash", PaymentOperation.TransactionHash). + Str("ledger_close_time", PaymentOperation.LedgerCloseTime.String()). + Msg("a payment has received on bridge Stellar account") + if _, ok := senders[PaymentOperation.From]; !ok { + senders[PaymentOperation.From] = depositedAmount } else { - senderAmount := senders[paymentOpation.From] + senderAmount := senders[PaymentOperation.From] senderAmount = senderAmount.Add(senderAmount, depositedAmount) - senders[paymentOpation.From] = senderAmount + senders[PaymentOperation.From] = senderAmount } } @@ -529,3 +565,19 @@ func (w *StellarWallet) getAssetCodeAndIssuer() []string { return strings.Split(TFTTest, ":") } } + +func (w *StellarWallet) StatBridgeAccount() (string, error) { + acc, err := w.getAccountDetails(w.config.StellarBridgeAccount) + if err != nil { + return "", err + } + + asset := w.getAssetCodeAndIssuer() + + for _, balance := range acc.Balances { + if balance.Code == asset[0] || balance.Issuer == asset[1] { + return balance.Balance, nil + } + } + return "", nil +} diff --git a/bridge/tfchain_bridge/pkg/substrate/events.go b/bridge/tfchain_bridge/pkg/substrate/events.go index 44be57afd..466ac8655 100644 --- a/bridge/tfchain_bridge/pkg/substrate/events.go +++ b/bridge/tfchain_bridge/pkg/substrate/events.go @@ -2,11 +2,15 @@ package substrate import ( "context" + "fmt" + "strings" "time" "github.com/cenkalti/backoff/v4" "github.com/centrifuge/go-substrate-rpc-client/v4/types" + "github.com/rs/zerolog" "github.com/rs/zerolog/log" + "github.com/stellar/go/support/errors" substrate "github.com/threefoldtech/tfchain/clients/tfchain-client-go" ) @@ -60,14 +64,15 @@ type RefundTransactionExpiredEvent struct { } func (client *SubstrateClient) SubscribeTfchainBridgeEvents(ctx context.Context, eventChannel chan<- EventSubscription) error { + cl, _, err := client.GetClient() if err != nil { - log.Fatal().Msg("failed to get client") + return errors.Wrap(err, "an error occurred while getting substrate client") } chainHeadsSub, err := cl.RPC.Chain.SubscribeFinalizedHeads() if err != nil { - log.Fatal().Msg("failed to subscribe to finalized heads") + return errors.Wrap(err, "an error occurred while subscribing to finalized heads") } for { @@ -80,7 +85,6 @@ func (client *SubstrateClient) SubscribeTfchainBridgeEvents(ctx context.Context, } eventChannel <- data case err := <-chainHeadsSub.Err(): - log.Err(err).Msg("error with subscription") bo := backoff.NewExponentialBackOff() bo.MaxElapsedTime = time.Duration(time.Minute * 10) // 10 minutes @@ -88,7 +92,12 @@ func (client *SubstrateClient) SubscribeTfchainBridgeEvents(ctx context.Context, chainHeadsSub, err = cl.RPC.Chain.SubscribeFinalizedHeads() return err }, bo, func(err error, d time.Duration) { - log.Warn().Err(err).Msgf("connection to chain lost, reopening connection in %s", d.String()) + log.Warn(). + Err(err). + Str("event_action", "fetch_finalized_Heads_failed"). + Str("event_kind", "alert"). + Str("category", "tfchain_monitor"). + Msgf("connection to chain lost, reopening connection in %s", d.String()) }) case <-ctx.Done(): @@ -99,16 +108,23 @@ func (client *SubstrateClient) SubscribeTfchainBridgeEvents(ctx context.Context, } func (client *SubstrateClient) processEventsForHeight(height uint32) (Events, error) { - log.Info().Uint32("ID", height).Msg("fetching events for blockheight") + if height == 0 { return Events{}, nil } records, err := client.GetEventsForBlock(height) if err != nil { - log.Err(err).Uint32("ID", height).Msg("failed to decode block for height") - return Events{}, err + return Events{}, errors.Wrapf(err, "an error occurred while decoding events for height %d", height) + } + log.Info(). + Str("event_action", "block_events_fetched"). + Str("event_kind", "event"). + Str("category", "tfchain_monitor"). + Dict("metadata", zerolog.Dict(). + Uint32("height", height)). + Msg("tfchain events fetched") return client.processEventRecords(records), nil } @@ -121,14 +137,24 @@ func (client *SubstrateClient) processEventRecords(events *substrate.EventRecord var withdrawExpiredEvents []WithdrawExpiredEvent for _, e := range events.TFTBridgeModule_RefundTransactionReady { - log.Info().Str("hash", string(e.RefundTransactionHash)).Msg("found refund transaction ready event") + log.Info(). + Str("trace_id", string(e.RefundTransactionHash)). + Str("event_action", "event_refund_tx_ready_received"). + Str("event_kind", "event"). + Str("category", "refund"). + Msg("found RefundTransactionReady event") refundTransactionReadyEvents = append(refundTransactionReadyEvents, RefundTransactionReadyEvent{ Hash: string(e.RefundTransactionHash), }) } for _, e := range events.TFTBridgeModule_RefundTransactionExpired { - log.Info().Str("hash", string(e.RefundTransactionHash)).Msgf("found expired refund transaction") + log.Info(). + Str("trace_id", string(e.RefundTransactionHash)). + Str("event_action", "event_refund_tx_expired_received"). + Str("event_kind", "alert"). + Str("category", "refund"). + Msgf("found RefundTransactionExpired event") refundTransactionExpiredEvents = append(refundTransactionExpiredEvents, RefundTransactionExpiredEvent{ Hash: string(e.RefundTransactionHash), Target: string(e.Target), @@ -137,7 +163,12 @@ func (client *SubstrateClient) processEventRecords(events *substrate.EventRecord } for _, e := range events.TFTBridgeModule_BurnTransactionCreated { - log.Info().Uint64("ID", uint64(e.BurnTransactionID)).Msg("found burn transaction created event") + log.Info(). + Str("trace_id", fmt.Sprint(e.BurnTransactionID)). + Str("event_action", "event_burn_tx_created_received"). + Str("event_kind", "event"). + Str("category", "withdraw"). + Msg("found BurnTransactionCreated event") withdrawCreatedEvents = append(withdrawCreatedEvents, WithdrawCreatedEvent{ ID: uint64(e.BurnTransactionID), Source: e.Source, @@ -147,14 +178,24 @@ func (client *SubstrateClient) processEventRecords(events *substrate.EventRecord } for _, e := range events.TFTBridgeModule_BurnTransactionReady { - log.Info().Uint64("ID", uint64(e.BurnTransactionID)).Msg("found burn transaction ready event") + log.Info(). + Str("trace_id", fmt.Sprint(e.BurnTransactionID)). + Str("event_action", "event_burn_tx_ready_received"). + Str("event_kind", "event"). + Str("category", "withdraw"). + Msg("found BurnTransactionReady event") withdrawReadyEvents = append(withdrawReadyEvents, WithdrawReadyEvent{ ID: uint64(e.BurnTransactionID), }) } for _, e := range events.TFTBridgeModule_BurnTransactionExpired { - log.Info().Uint64("ID", uint64(e.BurnTransactionID)).Msg("found burn transaction expired event") + log.Info(). + Str("trace_id", fmt.Sprint(e.BurnTransactionID)). + Str("event_action", "event_burn_tx_expired_received"). + Str("event_kind", "alert"). + Str("category", "withdraw"). + Msg("found BurnTransactionExpired event") withdrawExpiredEvents = append(withdrawExpiredEvents, WithdrawExpiredEvent{ ID: uint64(e.BurnTransactionID), Source: e.Source, @@ -163,6 +204,31 @@ func (client *SubstrateClient) processEventRecords(events *substrate.EventRecord }) } + for _, e := range events.TFTBridgeModule_MintCompleted { + trace_id := e.TxHash + logger := log.Logger.With().Str("trace_id", strings.TrimLeft(trace_id, "refund-")).Logger() + outcome := "" + if strings.HasPrefix(trace_id, "refund") { + outcome = "refunded" + } else { + outcome = "bridged" + } + + logger.Info(). + Str("event_action", "mint_completed"). + Str("event_kind", "event"). + Str("category", "mint"). + Msg("found MintCompleted event") + + logger.Info(). + Str("event_action", "transfer_completed"). + Str("event_kind", "event"). + Str("category", "transfer"). + Dict("metadata", zerolog.Dict(). + Str("outcome", outcome)). + Msg("transfer has completed") + } + return Events{ WithdrawCreatedEvents: withdrawCreatedEvents, WithdrawReadyEvents: withdrawReadyEvents, From e2e5d703c0a04b82cc4b6a1cb9ae8b6c97c71022 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Mon, 18 Dec 2023 19:14:41 +0200 Subject: [PATCH 05/44] new ips for tfchain unsafe nodes (#918) Co-authored-by: coesensbert --- docs/misc/try_runtime.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/misc/try_runtime.md b/docs/misc/try_runtime.md index 11a67ccde..92ea510a2 100644 --- a/docs/misc/try_runtime.md +++ b/docs/misc/try_runtime.md @@ -2,10 +2,10 @@ List of available endpoints for our networks: -- Devnet: 10.10.0.151 -- QAnet: 10.10.0.152 -- Testnet: 10.10.0.22 -- Mainnet: 10.10.0.19 +- Devnet: 10.10.0.44 +- QAnet: 10.10.0.43 +- Testnet: 10.10.0.100 +- Mainnet: 10.10.0.154 (If you are not in lochristi office you probably need vpn to reach to ips) From 55d2f8e63f47cff82932a03103aad03f1ea19a0e Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Tue, 19 Dec 2023 19:24:15 +0200 Subject: [PATCH 06/44] update cargo.lock file (#919) --- substrate-node/Cargo.lock | 2729 +++++++++++++------------------------ 1 file changed, 912 insertions(+), 1817 deletions(-) diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index 57a28f6e1..f14372693 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -18,33 +18,23 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.3", ] [[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aead" -version = "0.3.2" +name = "addr2line" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "generic-array 0.14.7", + "gimli 0.28.1", ] [[package]] -name = "aead" -version = "0.4.3" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", -] +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aead" @@ -58,123 +48,58 @@ dependencies = [ [[package]] name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", - "cipher 0.4.4", + "cipher", "cpufeatures", ] [[package]] name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", - "ghash 0.4.4", - "subtle", -] - -[[package]] -name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead 0.5.2", - "aes 0.8.2", - "cipher 0.4.4", - "ctr 0.9.2", - "ghash 0.5.0", + "aead", + "aes", + "cipher", + "ctr", + "ghash", "subtle", ] -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", - "getrandom 0.2.9", + "getrandom 0.2.11", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -205,9 +130,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" dependencies = [ "anstyle", "anstyle-parse", @@ -219,43 +144,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "approx" @@ -266,17 +191,11 @@ dependencies = [ "num-traits", ] -[[package]] -name = "arc-swap" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" - [[package]] name = "array-bytes" -version = "6.2.0" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de17a919934ad8c5cc99a1a74de4e2dab95d6121a8f27f94755ff525b630382c" +checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" [[package]] name = "arrayref" @@ -292,25 +211,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" - -[[package]] -name = "asn1-rs" -version = "0.3.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" -dependencies = [ - "asn1-rs-derive 0.1.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time", -] +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "asn1-rs" @@ -318,7 +221,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "asn1-rs-derive 0.4.0", + "asn1-rs-derive", "asn1-rs-impl", "displaydoc", "nom", @@ -328,18 +231,6 @@ dependencies = [ "time", ] -[[package]] -name = "asn1-rs-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "asn1-rs-derive" version = "0.4.0" @@ -365,42 +256,52 @@ dependencies = [ [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-io" -version = "1.13.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" dependencies = [ - "async-lock", - "autocfg", + "async-lock 3.2.0", "cfg-if", "concurrent-queue", + "futures-io", "futures-lite", - "log", "parking", "polling", - "rustix 0.37.19", + "rustix 0.38.28", "slab", - "socket2 0.4.9", - "waker-fn", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", ] [[package]] name = "async-lock" -version = "2.7.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" dependencies = [ - "event-listener", + "event-listener 4.0.0", + "event-listener-strategy", + "pin-project-lite 0.2.13", ] [[package]] @@ -411,25 +312,25 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] name = "asynchronous-codec" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" +checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" dependencies = [ "bytes", "futures-sink", @@ -438,12 +339,6 @@ dependencies = [ "pin-project-lite 0.2.13", ] -[[package]] -name = "atomic-waker" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" - [[package]] name = "atty" version = "0.2.14" @@ -463,16 +358,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line", + "addr2line 0.21.0", "cc", "cfg-if", "libc", - "miniz_oxide 0.6.2", - "object", + "miniz_oxide", + "object 0.32.1", "rustc-demangle", ] @@ -482,12 +377,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -502,9 +391,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -548,7 +437,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -586,34 +475,34 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "constant_time_eq", ] [[package]] name = "blake2s_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "constant_time_eq", ] [[package]] name = "blake3" -version = "1.3.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "cc", "cfg-if", "constant_time_eq", @@ -625,7 +514,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -649,16 +538,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", -] - [[package]] name = "block-padding" version = "0.1.5" @@ -668,12 +547,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "bounded-collections" version = "0.1.9" @@ -694,9 +567,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.5.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" dependencies = [ "memchr", "serde", @@ -713,9 +586,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -731,21 +604,21 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bzip2-sys" @@ -760,18 +633,18 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" dependencies = [ "serde", ] @@ -784,7 +657,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.17", + "semver 1.0.20", "serde", "serde_json", "thiserror", @@ -792,22 +665,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", -] - -[[package]] -name = "ccm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" -dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle", + "libc", ] [[package]] @@ -847,7 +710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher 0.4.4", + "cipher", "cpufeatures", ] @@ -857,9 +720,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.5.2", + "aead", "chacha20", - "cipher 0.4.4", + "cipher", "poly1305", "zeroize", ] @@ -875,7 +738,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -891,24 +754,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "cipher" version = "0.4.4" @@ -933,9 +778,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.10" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", "clap_derive", @@ -943,9 +788,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.9" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstream", "anstyle", @@ -962,7 +807,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -1000,9 +845,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -1022,9 +867,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const-random" @@ -1041,22 +886,22 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", "once_cell", "tiny-keccak", ] [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1064,9 +909,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core2" @@ -1088,9 +933,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1116,7 +961,7 @@ dependencies = [ "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.27.3", "hashbrown 0.13.2", "log", "regalloc2", @@ -1193,21 +1038,6 @@ dependencies = [ "wasmtime-types", ] -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - [[package]] name = "crc32fast" version = "1.3.2" @@ -1217,21 +1047,11 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -1240,22 +1060,21 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", - "scopeguard", + "memoffset 0.9.0", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ "cfg-if", ] @@ -1268,21 +1087,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-bigint" -version = "0.5.2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", @@ -1321,22 +1128,13 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher 0.3.0", -] - [[package]] name = "ctr" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -1390,14 +1188,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] name = "cxx" -version = "1.0.95" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109308c20e8445959c2792e81871054c6a17e6976489a93d2769641a2ba5839c" +checksum = "e9fc0c733f71e58dedf4f034cd2a266f80b94cc9ed512729e1798651b68c2cba" dependencies = [ "cc", "cxxbridge-flags", @@ -1407,9 +1205,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.95" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf4c6755cdf10798b97510e0e2b3edb9573032bd9379de8fffa59d68165494f" +checksum = "51bc81d2664db24cf1d35405f66e18a85cffd4d49ab930c71a5c6342a410f38c" dependencies = [ "cc", "codespan-reporting", @@ -1417,103 +1215,57 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] name = "cxxbridge-flags" -version = "1.0.95" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882074421238e84fe3b4c65d0081de34e5b323bf64555d3e61991f76eb64a7bb" +checksum = "8511afbe34ea242697784da5cb2c5d4a0afb224ca8b136bdf93bfe180cbe5884" [[package]] name = "cxxbridge-macro" -version = "1.0.95" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a076022ece33e7686fb76513518e219cca4fce5750a8ae6d1ce6c0f48fd1af9" +checksum = "5c6888cd161769d65134846d4d4981d5a6654307cc46ec83fb917e530aea5f84" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] -name = "darling" -version = "0.14.4" +name = "data-encoding" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core", - "darling_macro", -] +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] -name = "darling_core" -version = "0.14.4" +name = "data-encoding-macro" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", + "data-encoding", + "data-encoding-macro-internal", ] [[package]] -name = "darling_macro" -version = "0.14.4" +name = "data-encoding-macro-internal" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" dependencies = [ - "darling_core", - "quote", + "data-encoding", "syn 1.0.109", ] -[[package]] -name = "data-encoding" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" - -[[package]] -name = "data-encoding-macro" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" -dependencies = [ - "data-encoding", - "data-encoding-macro-internal", -] - -[[package]] -name = "data-encoding-macro-internal" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" -dependencies = [ - "data-encoding", - "syn 1.0.109", -] - -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", -] - [[package]] name = "der" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", @@ -1521,11 +1273,11 @@ dependencies = [ [[package]] name = "der-parser" -version = "7.0.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.3.1", + "asn1-rs", "displaydoc", "nom", "num-bigint", @@ -1534,17 +1286,12 @@ dependencies = [ ] [[package]] -name = "der-parser" -version = "8.2.0" +name = "deranged" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" dependencies = [ - "asn1-rs 0.5.2", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", + "powerfmt", ] [[package]] @@ -1558,37 +1305,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core", - "syn 1.0.109", -] - [[package]] name = "derive_more" version = "0.99.17" @@ -1685,7 +1401,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -1696,9 +1412,9 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dtoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dyn-clonable" @@ -1723,34 +1439,22 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" - -[[package]] -name = "ecdsa" -version = "0.14.8" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der 0.7.6", + "der", "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", + "elliptic-curve", + "rfc6979", + "signature 2.2.0", + "spki", ] [[package]] @@ -1768,8 +1472,8 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "pkcs8 0.10.2", - "signature 2.1.0", + "pkcs8", + "signature 2.2.0", ] [[package]] @@ -1815,47 +1519,25 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" - -[[package]] -name = "elliptic-curve" -version = "0.12.3" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array 0.14.7", - "group 0.12.1", - "hkdf", - "pem-rfc7468", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle", - "zeroize", -] +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" -version = "0.13.5" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array 0.14.7", - "group 0.13.0", - "pkcs8 0.10.2", + "group", + "pkcs8", "rand_core 0.6.4", - "sec1 0.7.2", + "sec1", "subtle", "zeroize", ] @@ -1880,9 +1562,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ "humantime", "is-terminal", @@ -1905,30 +1587,40 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "errno-dragonfly", "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" dependencies = [ - "cc", - "libc", + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", ] [[package]] -name = "event-listener" -version = "2.5.3" +name = "event-listener-strategy" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.0", + "pin-project-lite 0.2.13", +] [[package]] name = "exit-future" @@ -1949,7 +1641,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -1966,12 +1658,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdlimit" @@ -1982,16 +1671,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "ff" version = "0.13.0" @@ -2020,14 +1699,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", - "windows-sys 0.48.0", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] @@ -2066,13 +1745,13 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -2100,9 +1779,9 @@ dependencies = [ [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -2124,7 +1803,7 @@ dependencies = [ "linregress", "log", "parity-scale-codec 3.6.9", - "paste 1.0.12", + "paste 1.0.14", "scale-info", "serde", "sp-api", @@ -2194,7 +1873,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2278,7 +1957,7 @@ dependencies = [ "log", "macro_magic", "parity-scale-codec 3.6.9", - "paste 1.0.12", + "paste 1.0.14", "scale-info", "serde", "smallvec", @@ -2313,7 +1992,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2325,7 +2004,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2335,7 +2014,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2395,9 +2074,12 @@ dependencies = [ [[package]] name = "fs-err" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] [[package]] name = "fs2" @@ -2417,9 +2099,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -2432,9 +2114,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -2442,15 +2124,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -2460,34 +2142,29 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" -version = "1.13.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" dependencies = [ - "fastrand", "futures-core", - "futures-io", - "memchr", - "parking", "pin-project-lite 0.2.13", - "waker-fn", ] [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2497,21 +2174,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls 0.20.8", - "webpki 0.22.0", + "rustls 0.20.9", + "webpki", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" @@ -2521,9 +2198,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -2589,25 +2266,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.5.3", -] - [[package]] name = "ghash" version = "0.5.0" @@ -2615,20 +2282,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug 0.3.0", - "polyval 0.6.0", + "polyval", ] [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", "indexmap 1.9.3", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "glob" version = "0.3.1" @@ -2637,26 +2310,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", - "fnv", "log", - "regex", -] - -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -2665,16 +2327,16 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core 0.6.4", "subtle", ] [[package]] name = "h2" -version = "0.3.19" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -2682,7 +2344,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -2691,9 +2353,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.3.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" dependencies = [ "log", "pest", @@ -2724,7 +2386,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] @@ -2733,14 +2395,14 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -2759,18 +2421,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -2784,15 +2437,6 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "hkdf" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" -dependencies = [ - "hmac 0.12.1", -] - [[package]] name = "hmac" version = "0.8.1" @@ -2833,6 +2477,15 @@ dependencies = [ "hmac 0.8.1", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "hostname" version = "0.3.1" @@ -2846,9 +2499,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -2857,9 +2510,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -2868,9 +2521,9 @@ dependencies = [ [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" @@ -2880,9 +2533,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -2892,9 +2545,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -2907,29 +2560,13 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.13", - "socket2 0.4.9", + "socket2 0.5.5", "tokio", "tower-service", "tracing", "want", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "log", - "rustls 0.20.8", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", - "webpki-roots", -] - [[package]] name = "hyper-rustls" version = "0.24.2" @@ -2940,24 +2577,25 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.9", + "rustls 0.21.10", "rustls-native-certs", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", + "webpki-roots 0.25.3", ] [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -2969,12 +2607,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -2988,9 +2620,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2998,19 +2630,19 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.7.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "if-watch" -version = "3.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ "async-io", "core-foundation", @@ -3022,7 +2654,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows 0.34.0", + "windows", ] [[package]] @@ -3078,7 +2710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -3121,32 +2753,13 @@ dependencies = [ "num-traits", ] -[[package]] -name = "interceptor" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" -dependencies = [ - "async-trait", - "bytes", - "log", - "rand 0.8.5", - "rtcp", - "rtp", - "thiserror", - "tokio", - "waitgroup", - "webrtc-srtp", - "webrtc-util", -] - [[package]] name = "io-lifetimes" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.3", "libc", "windows-sys 0.48.0", ] @@ -3159,31 +2772,30 @@ checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" [[package]] name = "ipconfig" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd302af1b90f2463a98fa5ad469fc212c8e3175a41c3068601bfa2727591c5be" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.4.9", + "socket2 0.5.5", "widestring", - "winapi", + "windows-sys 0.48.0", "winreg", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix 0.37.19", + "hermit-abi 0.3.3", + "rustix 0.38.28", "windows-sys 0.48.0", ] @@ -3198,33 +2810,33 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-client", @@ -3237,9 +2849,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ "futures-util", "http", @@ -3250,21 +2862,21 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls 0.23.4", + "tokio-rustls", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.25.3", ] [[package]] name = "jsonrpsee-core" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", - "arrayvec 0.7.2", - "async-lock", + "arrayvec 0.7.4", + "async-lock 2.8.0", "async-trait", "beef", "futures-channel", @@ -3286,13 +2898,13 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" dependencies = [ "async-trait", "hyper", - "hyper-rustls 0.23.2", + "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", "rustc-hash", @@ -3305,9 +2917,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", "proc-macro-crate 1.1.3", @@ -3318,9 +2930,9 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" dependencies = [ "futures-channel", "futures-util", @@ -3340,9 +2952,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" dependencies = [ "anyhow", "beef", @@ -3354,9 +2966,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", "jsonrpsee-client-transport", @@ -3366,13 +2978,13 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ "cfg-if", - "ecdsa 0.16.7", - "elliptic-curve 0.13.5", + "ecdsa", + "elliptic-curve", "once_cell", "sha2 0.10.8", ] @@ -3436,9 +3048,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libloading" @@ -3452,14 +3064,14 @@ dependencies = [ [[package]] name = "libp2p" -version = "0.51.3" +version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" +checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.9", + "getrandom 0.2.11", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -3477,7 +3089,6 @@ dependencies = [ "libp2p-swarm", "libp2p-tcp", "libp2p-wasm-ext", - "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", "multiaddr", @@ -3596,7 +3207,7 @@ version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "asynchronous-codec", "bytes", "either", @@ -3633,7 +3244,7 @@ dependencies = [ "log", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", "trust-dns-proto", "void", @@ -3672,7 +3283,7 @@ dependencies = [ "snow", "static_assertions", "thiserror", - "x25519-dalek 1.1.1", + "x25519-dalek", "zeroize", ] @@ -3710,7 +3321,7 @@ dependencies = [ "parking_lot 0.12.1", "quinn-proto", "rand 0.8.5", - "rustls 0.20.8", + "rustls 0.20.9", "thiserror", "tokio", ] @@ -3775,7 +3386,7 @@ dependencies = [ "libc", "libp2p-core", "log", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", ] @@ -3789,12 +3400,12 @@ dependencies = [ "futures-rustls", "libp2p-core", "libp2p-identity", - "rcgen 0.10.0", + "rcgen", "ring 0.16.20", - "rustls 0.20.8", + "rustls 0.20.9", "thiserror", - "webpki 0.22.0", - "x509-parser 0.14.0", + "webpki", + "x509-parser", "yasna", ] @@ -3813,43 +3424,12 @@ dependencies = [ ] [[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha.4" +name = "libp2p-websocket" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ - "async-trait", - "asynchronous-codec", - "bytes", - "futures", - "futures-timer", - "hex", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-noise", - "log", - "multihash", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.5", - "rcgen 0.9.3", - "serde", - "stun", - "thiserror", - "tinytemplate", - "tokio", - "tokio-util", - "webrtc", -] - -[[package]] -name = "libp2p-websocket" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" -dependencies = [ - "either", + "either", "futures", "futures-rustls", "libp2p-core", @@ -3859,7 +3439,7 @@ dependencies = [ "rw-stream-sink", "soketto", "url", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -3875,6 +3455,17 @@ dependencies = [ "yamux", ] +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "librocksdb-sys" version = "0.11.0+8.1.1" @@ -3940,9 +3531,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "pkg-config", @@ -3951,9 +3542,9 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" dependencies = [ "cc", ] @@ -3975,9 +3566,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475015a7f8f017edb28d2e69813be23500ad4b32cfe3421c4148efc97324ee52" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ "nalgebra", ] @@ -3990,9 +3581,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lite-json" @@ -4014,9 +3605,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -4024,9 +3615,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" @@ -4084,7 +3675,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -4098,7 +3689,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -4109,7 +3700,7 @@ checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -4120,7 +3711,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -4141,7 +3732,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -4152,36 +3743,27 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ "autocfg", "rawpointer", ] -[[package]] -name = "md-5" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memfd" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.37.19", + "rustix 0.38.28", ] [[package]] @@ -4195,18 +3777,18 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -4238,15 +3820,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -4258,9 +3831,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -4377,9 +3950,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ "approx", "matrixmultiply", @@ -4393,9 +3966,9 @@ dependencies = [ [[package]] name = "nalgebra-macros" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ "proc-macro2", "quote", @@ -4445,7 +4018,7 @@ checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" dependencies = [ "anyhow", "byteorder", - "paste 1.0.12", + "paste 1.0.14", "thiserror", ] @@ -4486,7 +4059,6 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", ] [[package]] @@ -4513,9 +4085,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -4524,9 +4096,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -4537,7 +4109,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "itoa", ] @@ -4564,20 +4136,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.3", "libc", ] @@ -4589,9 +4161,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.30.3" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", "hashbrown 0.13.2", @@ -4600,12 +4172,12 @@ dependencies = [ ] [[package]] -name = "oid-registry" -version = "0.4.0" +name = "object" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ - "asn1-rs 0.3.1", + "memchr", ] [[package]] @@ -4614,14 +4186,14 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", ] [[package]] name = "once_cell" -version = "1.17.2" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -4641,28 +4213,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - [[package]] name = "pallet-aura" version = "4.0.0-dev" @@ -5112,9 +4662,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.8" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4890dcb9556136a4ec2b0c51fa4a08c8b733b829506af8fff2e853f3a065985b" +checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" dependencies = [ "blake2", "crc32fast", @@ -5136,7 +4686,7 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive 2.3.1", @@ -5148,7 +4698,7 @@ version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bitvec", "byte-slice-cast", "bytes", @@ -5175,7 +4725,7 @@ version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", "syn 1.0.109", @@ -5195,9 +4745,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -5217,7 +4767,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.9", ] [[package]] @@ -5236,15 +4786,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.4.1", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] [[package]] @@ -5265,9 +4815,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "paste-impl" @@ -5311,36 +4861,28 @@ dependencies = [ "base64 0.13.1", ] -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.6.0" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.6.0" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" dependencies = [ "pest", "pest_generator", @@ -5348,22 +4890,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.0" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] name = "pest_meta" -version = "2.6.0" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" dependencies = [ "once_cell", "pest", @@ -5372,32 +4914,32 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 1.9.3", + "indexmap 2.1.0", ] [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -5418,24 +4960,14 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der 0.6.1", - "spki 0.6.0", -] - [[package]] name = "pkcs8" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.6", - "spki 0.7.2", + "der", + "spki", ] [[package]] @@ -5446,24 +4978,22 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" -version = "3.0.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polling" -version = "2.8.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" dependencies = [ - "autocfg", - "bitflags 1.3.2", "cfg-if", "concurrent-queue", - "libc", - "log", "pin-project-lite 0.2.13", - "windows-sys 0.48.0", + "rustix 0.38.28", + "tracing", + "windows-sys 0.52.0", ] [[package]] @@ -5474,38 +5004,32 @@ checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.5.1", + "universal-hash", ] [[package]] name = "polyval" -version = "0.5.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash", ] [[package]] -name = "polyval" -version = "0.6.0" +name = "portable-atomic" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.5.1", -] +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] -name = "portable-atomic" -version = "1.5.1" +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" @@ -5560,14 +5084,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -5588,11 +5112,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" dependencies = [ - "toml_edit 0.20.7", + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -5633,7 +5158,7 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -5679,7 +5204,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -5786,20 +5311,20 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", "rand 0.8.5", "ring 0.16.20", "rustc-hash", - "rustls 0.20.8", + "rustls 0.20.9", "slab", "thiserror", "tinyvec", "tracing", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -5876,7 +5401,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", ] [[package]] @@ -5905,9 +5430,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -5915,27 +5440,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "rcgen" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem", - "ring 0.16.20", - "time", - "x509-parser 0.13.2", - "yasna", ] [[package]] @@ -5961,42 +5471,42 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.9", - "redox_syscall 0.2.16", + "getrandom 0.2.11", + "libredox", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "53313ec9f12686aeeffb43462c3ac77aa25f590a5f630eb2cde0de59417b29c7" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "2566c4bf6845f2c2e83b27043c3f5dfcd5ba8f2937d6c00dc009bfb51a079dc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -6013,13 +5523,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.3" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ - "aho-corasick 1.0.1", + "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -6031,6 +5542,17 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + [[package]] name = "regex-syntax" version = "0.6.29" @@ -6039,9 +5561,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "resolv-conf" @@ -6053,17 +5575,6 @@ dependencies = [ "quick-error", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -6091,12 +5602,12 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.3" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.9", + "getrandom 0.2.11", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -6115,24 +5626,13 @@ dependencies = [ [[package]] name = "rpassword" -version = "7.2.0" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ "libc", "rtoolbox", - "winapi", -] - -[[package]] -name = "rtcp" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" -dependencies = [ - "bytes", - "thiserror", - "webrtc-util", + "windows-sys 0.48.0", ] [[package]] @@ -6152,26 +5652,12 @@ dependencies = [ [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", -] - -[[package]] -name = "rtp" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" -dependencies = [ - "async-trait", - "bytes", - "rand 0.8.5", - "serde", - "thiserror", - "webrtc-util", + "windows-sys 0.48.0", ] [[package]] @@ -6198,7 +5684,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.20", ] [[package]] @@ -6212,9 +5698,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.14" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ "bitflags 1.3.2", "errno", @@ -6226,60 +5712,46 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "errno", - "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.1", - "log", - "ring 0.16.20", - "sct 0.6.1", - "webpki 0.21.4", + "linux-raw-sys 0.4.12", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring 0.16.20", - "sct 0.7.0", - "webpki 0.22.0", + "sct", + "webpki", ] [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.3", + "ring 0.17.7", "rustls-webpki", - "sct 0.7.0", + "sct", ] [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -6289,11 +5761,11 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.2", + "base64 0.21.5", ] [[package]] @@ -6302,15 +5774,15 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.3", + "ring 0.17.7", "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rw-stream-sink" @@ -6325,15 +5797,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "safe_arch" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794821e4ccb0d9f979512f9c1973480123f9bd62a90d74ab0f9426fcf8f4a529" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" dependencies = [ "bytemuck", ] @@ -6423,7 +5895,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -6576,7 +6048,7 @@ name = "sc-consensus-grandpa" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "array-bytes", "async-trait", "dyn-clone", @@ -6678,7 +6150,7 @@ dependencies = [ "cfg-if", "libc", "log", - "rustix 0.36.14", + "rustix 0.36.17", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -6799,7 +6271,7 @@ name = "sc-network-gossip" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "futures", "futures-timer", "libp2p", @@ -6896,7 +6368,7 @@ dependencies = [ "futures", "futures-timer", "hyper", - "hyper-rustls 0.24.2", + "hyper-rustls", "libp2p", "log", "num_cpus", @@ -7169,7 +6641,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -7257,11 +6729,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -7270,7 +6742,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "cfg-if", "hashbrown 0.13.2", ] @@ -7295,81 +6767,45 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scratch" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" [[package]] name = "sct" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] -name = "sct" -version = "0.7.0" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle", + "zeroize", ] [[package]] -name = "sdp" -version = "0.5.3" +name = "secp256k1" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" -dependencies = [ - "rand 0.8.5", - "substring", - "thiserror", - "url", -] - -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array 0.14.7", - "pkcs8 0.9.0", - "subtle", - "zeroize", -] - -[[package]] -name = "sec1" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" -dependencies = [ - "base16ct 0.2.0", - "der 0.7.6", - "generic-array 0.14.7", - "pkcs8 0.10.2", - "subtle", - "zeroize", -] - -[[package]] -name = "secp256k1" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" dependencies = [ "secp256k1-sys", ] @@ -7394,9 +6830,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -7407,9 +6843,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -7426,9 +6862,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] @@ -7456,7 +6892,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -7492,17 +6928,6 @@ dependencies = [ "opaque-debug 0.3.0", ] -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha2" version = "0.8.2" @@ -7551,18 +6976,18 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook-registry" @@ -7578,16 +7003,12 @@ name = "signature" version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -7602,21 +7023,21 @@ dependencies = [ "approx", "num-complex", "num-traits", - "paste 1.0.12", + "paste 1.0.14", "wide", ] [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -7635,9 +7056,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snap" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "snow" @@ -7645,12 +7066,12 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ - "aes-gcm 0.10.2", + "aes-gcm", "blake2", "chacha20poly1305", "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring 0.17.3", + "ring 0.17.7", "rustc_version", "sha2 0.10.8", "subtle", @@ -7658,9 +7079,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -7734,7 +7155,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -7896,7 +7317,7 @@ dependencies = [ "merlin", "parity-scale-codec 3.6.9", "parking_lot 0.12.1", - "paste 1.0.12", + "paste 1.0.14", "primitive-types", "rand 0.8.5", "regex", @@ -7939,7 +7360,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -7958,7 +7379,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -8108,7 +7529,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec 3.6.9", - "paste 1.0.12", + "paste 1.0.14", "rand 0.8.5", "scale-info", "serde", @@ -8147,7 +7568,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -8294,7 +7715,7 @@ name = "sp-trie" version = "22.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "hash-db", "hashbrown 0.13.2", "lazy_static", @@ -8337,7 +7758,7 @@ dependencies = [ "parity-scale-codec 3.6.9", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -8393,29 +7814,19 @@ dependencies = [ [[package]] name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] - -[[package]] -name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.6", + "der", ] [[package]] name = "ss58-registry" -version = "1.40.0" +version = "1.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" +checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" dependencies = [ "Inflector", "num-format", @@ -8510,33 +7921,14 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.39", -] - -[[package]] -name = "stun" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" -dependencies = [ - "base64 0.13.1", - "crc", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "subtle", - "thiserror", - "tokio", - "url", - "webrtc-util", + "syn 2.0.41", ] [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", @@ -8606,7 +7998,7 @@ dependencies = [ [[package]] name = "substrate-stellar-sdk" version = "0.2.4" -source = "git+https://github.com/pendulum-chain/substrate-stellar-sdk#e299b3936aad5dd457a8de9ca5aeaf194baf6641" +source = "git+https://github.com/pendulum-chain/substrate-stellar-sdk#740389c7ec47a8725c32d8a68061ffb1bdfd013b" dependencies = [ "base64 0.13.1", "hex", @@ -8649,20 +8041,11 @@ dependencies = [ "sp-maybe-compressed-blob", "strum 0.24.1", "tempfile", - "toml 0.7.4", + "toml 0.7.8", "walkdir", "wasm-opt", ] -[[package]] -name = "substring" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" -dependencies = [ - "autocfg", -] - [[package]] name = "subtle" version = "2.4.1" @@ -8682,9 +8065,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" dependencies = [ "proc-macro2", "quote", @@ -8732,28 +8115,28 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", - "rustix 0.37.19", - "windows-sys 0.45.0", + "redox_syscall 0.4.1", + "rustix 0.38.28", + "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -8879,22 +8262,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -8924,9 +8307,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.5.3+5.3.0-patched" +version = "0.5.4+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" dependencies = [ "cc", "libc", @@ -8934,11 +8317,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ + "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -8946,15 +8331,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -8987,16 +8372,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -9014,9 +8389,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" dependencies = [ "backtrace", "bytes", @@ -9039,7 +8414,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -9053,24 +8428,13 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki 0.22.0", -] - [[package]] name = "tokio-rustls" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.9", + "rustls 0.21.10", "tokio", ] @@ -9088,9 +8452,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -9112,47 +8476,47 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.10", + "toml_edit 0.19.15", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.4.6", + "winnow", ] [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.1.0", "toml_datetime", - "winnow 0.5.19", + "winnow", ] [[package]] @@ -9198,11 +8562,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite 0.2.13", "tracing-attributes", @@ -9211,20 +8574,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -9242,12 +8605,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -9324,7 +8687,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tinyvec", "tokio", @@ -9354,9 +8717,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" @@ -9400,25 +8763,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" -[[package]] -name = "turn" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" -dependencies = [ - "async-trait", - "base64 0.13.1", - "futures", - "log", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "stun", - "thiserror", - "tokio", - "webrtc-util", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -9433,15 +8777,15 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -9457,15 +8801,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -9478,9 +8822,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -9488,16 +8832,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.7", - "subtle", -] - [[package]] name = "universal-hash" version = "0.5.1" @@ -9510,9 +8844,9 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ "asynchronous-codec", "bytes", @@ -9534,12 +8868,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.3.0", + "idna 0.5.0", "percent-encoding", ] @@ -9549,15 +8883,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" -dependencies = [ - "getrandom 0.2.9", -] - [[package]] name = "valip" version = "0.4.0" @@ -9588,26 +8913,11 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -[[package]] -name = "waitgroup" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" -dependencies = [ - "atomic-waker", -] - -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -9615,11 +8925,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -9637,9 +8946,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -9647,24 +8956,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if", "js-sys", @@ -9674,9 +8983,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9684,22 +8993,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "wasm-instrument" @@ -9787,9 +9096,9 @@ dependencies = [ "indexmap 1.9.3", "libc", "log", - "object", + "object 0.30.4", "once_cell", - "paste 1.0.12", + "paste 1.0.14", "psm", "rayon", "serde", @@ -9819,12 +9128,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.5", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.14", + "rustix 0.36.17", "serde", "sha2 0.10.8", "toml 0.5.11", @@ -9844,9 +9153,9 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.27.3", "log", - "object", + "object 0.30.4", "target-lexicon", "thiserror", "wasmparser", @@ -9863,8 +9172,8 @@ dependencies = [ "anyhow", "cranelift-codegen", "cranelift-native", - "gimli", - "object", + "gimli 0.27.3", + "object 0.30.4", "target-lexicon", "wasmtime-environ", ] @@ -9877,10 +9186,10 @@ checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.27.3", "indexmap 1.9.3", "log", - "object", + "object 0.30.4", "serde", "target-lexicon", "thiserror", @@ -9894,14 +9203,14 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli", + "gimli 0.27.3", "log", - "object", + "object 0.30.4", "rustc-demangle", "serde", "target-lexicon", @@ -9918,9 +9227,9 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object", + "object 0.30.4", "once_cell", - "rustix 0.36.14", + "rustix 0.36.17", ] [[package]] @@ -9949,9 +9258,9 @@ dependencies = [ "mach", "memfd", "memoffset 0.8.0", - "paste 1.0.12", + "paste 1.0.14", "rand 0.8.5", - "rustix 0.36.14", + "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -9972,9 +9281,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -9982,22 +9291,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.21.4" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -10006,234 +9305,32 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.0", -] - -[[package]] -name = "webrtc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "hex", - "interceptor", - "lazy_static", - "log", - "rand 0.8.5", - "rcgen 0.9.3", - "regex", - "ring 0.16.20", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.8", - "stun", - "thiserror", - "time", - "tokio", - "turn", - "url", - "waitgroup", - "webrtc-data", - "webrtc-dtls", - "webrtc-ice", - "webrtc-mdns", - "webrtc-media", - "webrtc-sctp", - "webrtc-srtp", - "webrtc-util", -] - -[[package]] -name = "webrtc-data" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" -dependencies = [ - "bytes", - "derive_builder", - "log", - "thiserror", - "tokio", - "webrtc-sctp", - "webrtc-util", -] - -[[package]] -name = "webrtc-dtls" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05" -dependencies = [ - "aes 0.6.0", - "aes-gcm 0.10.2", - "async-trait", - "bincode", - "block-modes", - "byteorder", - "ccm", - "curve25519-dalek 3.2.0", - "der-parser 8.2.0", - "elliptic-curve 0.12.3", - "hkdf", - "hmac 0.12.1", - "log", - "oid-registry 0.6.1", - "p256", - "p384", - "rand 0.8.5", - "rand_core 0.6.4", - "rcgen 0.9.3", - "ring 0.16.20", - "rustls 0.19.1", - "sec1 0.3.0", - "serde", - "sha1", - "sha2 0.10.8", - "signature 1.6.4", - "subtle", - "thiserror", - "tokio", - "webpki 0.21.4", - "webrtc-util", - "x25519-dalek 2.0.0", - "x509-parser 0.13.2", -] - -[[package]] -name = "webrtc-ice" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" -dependencies = [ - "arc-swap", - "async-trait", - "crc", - "log", - "rand 0.8.5", - "serde", - "serde_json", - "stun", - "thiserror", - "tokio", - "turn", - "url", - "uuid", - "waitgroup", - "webrtc-mdns", - "webrtc-util", -] - -[[package]] -name = "webrtc-mdns" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" -dependencies = [ - "log", - "socket2 0.4.9", - "thiserror", - "tokio", - "webrtc-util", + "webpki", ] [[package]] -name = "webrtc-media" -version = "0.5.1" +name = "webpki-roots" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" -dependencies = [ - "byteorder", - "bytes", - "rand 0.8.5", - "rtp", - "thiserror", -] - -[[package]] -name = "webrtc-sctp" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "crc", - "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-srtp" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "aes-gcm 0.9.4", - "async-trait", - "byteorder", - "bytes", - "ctr 0.8.0", - "hmac 0.11.0", - "log", - "rtcp", - "rtp", - "sha-1", - "subtle", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-util" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" -dependencies = [ - "async-trait", - "bitflags 1.3.2", - "bytes", - "cc", - "ipnet", - "lazy_static", - "libc", - "log", - "nix", - "rand 0.8.5", - "thiserror", - "tokio", - "winapi", -] +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.28", ] [[package]] name = "wide" -version = "0.7.9" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd0496a71f3cc6bc4bf0ed91346426a5099e93d89807e663162dc5a1069ff65" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" dependencies = [ "bytemuck", "safe_arch", @@ -10241,9 +9338,9 @@ dependencies = [ [[package]] name = "widestring" -version = "0.5.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" [[package]] name = "winapi" @@ -10263,9 +9360,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -10278,57 +9375,48 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.34.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", + "windows-core", + "windows-targets 0.48.5", ] [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.42.2", ] [[package]] name = "windows-sys" -version = "0.45.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.42.2", + "windows-targets 0.48.5", ] [[package]] name = "windows-sys" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.52.0", ] [[package]] @@ -10348,17 +9436,32 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -10369,15 +9472,15 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" +name = "windows_aarch64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" @@ -10387,15 +9490,15 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] -name = "windows_i686_gnu" -version = "0.34.0" +name = "windows_aarch64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" @@ -10405,15 +9508,15 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] -name = "windows_i686_msvc" -version = "0.34.0" +name = "windows_i686_gnu" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" @@ -10423,15 +9526,15 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] -name = "windows_x86_64_gnu" -version = "0.34.0" +name = "windows_i686_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" @@ -10441,9 +9544,15 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" @@ -10453,15 +9562,15 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] -name = "windows_x86_64_msvc" -version = "0.34.0" +name = "windows_x86_64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" @@ -10471,35 +9580,33 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] -name = "winnow" -version = "0.4.6" +name = "windows_x86_64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" -dependencies = [ - "memchr", -] +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -10522,50 +9629,19 @@ dependencies = [ "zeroize", ] -[[package]] -name = "x25519-dalek" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" -dependencies = [ - "curve25519-dalek 4.1.1", - "rand_core 0.6.4", - "serde", - "zeroize", -] - -[[package]] -name = "x509-parser" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" -dependencies = [ - "asn1-rs 0.3.1", - "base64 0.13.1", - "data-encoding", - "der-parser 7.0.0", - "lazy_static", - "nom", - "oid-registry 0.4.0", - "ring 0.16.20", - "rusticata-macros", - "thiserror", - "time", -] - [[package]] name = "x509-parser" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "base64 0.13.1", "data-encoding", - "der-parser 8.2.0", + "der-parser", "lazy_static", "nom", - "oid-registry 0.6.1", + "oid-registry", "rusticata-macros", "thiserror", "time", @@ -10594,11 +9670,31 @@ dependencies = [ "time", ] +[[package]] +name = "zerocopy" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -10611,7 +9707,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -10629,7 +9725,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" dependencies = [ - "zstd-safe 6.0.5+zstd.1.5.4", + "zstd-safe 6.0.6", ] [[package]] @@ -10644,9 +9740,9 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "6.0.5+zstd.1.5.4" +version = "6.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" dependencies = [ "libc", "zstd-sys", @@ -10654,11 +9750,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] From 36c891c02a1758a6bd6769357fdef230886940ff Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Thu, 21 Dec 2023 17:15:52 +0200 Subject: [PATCH 07/44] Bridge: fix daemon stop when encounter error submitting stellar tx (#920) * update cargo.lock file * fix: pre-check wallet and continue on stellar error * fix go fmt --- bridge/docs/observability.md | 29 +++++++++++++++++++- bridge/tfchain_bridge/pkg/bridge/bridge.go | 26 +++++++++++++++++- bridge/tfchain_bridge/pkg/bridge/withdraw.go | 11 +++++++- bridge/tfchain_bridge/pkg/stellar/stellar.go | 2 +- 4 files changed, 64 insertions(+), 4 deletions(-) diff --git a/bridge/docs/observability.md b/bridge/docs/observability.md index 59b41eec4..0288a8205 100644 --- a/bridge/docs/observability.md +++ b/bridge/docs/observability.md @@ -66,7 +66,8 @@ For example, if a customer is complaining that their deposit never bridged, you - `event_burn_tx_ready_received`: The bridge instance has received TFChain `BurnTransactionReady` event which means all bridge validators signed a withdraw transaction. - `event_burn_tx_expired_received`: The bridge instance has received TFChain `BurnTransactionExpired` event. - `withdraw_skipped`: a refund request skipped by the bridge instance as it has already been refunded. -- `withdraw_proposed`: a withdraw has proposed or signed by the bridge instance. +- `withdraw_proposed`: a withdraw has proposed or signed by the bridge instance. +- `withdraw_postponed`: a withdraw has postponed due to a problem in sending this transaction to the stellar network and will be retried later. - `withdraw_completed`: a withdraw has completed and received on the target stellar account. ##### Bridge vault account related @@ -787,6 +788,32 @@ the source field set contains all fields which are included in the source object +##### withdraw_postponed + +- kind: event + +- category: withdraw + + + + + + + + + + + + + + + + + + + +
withdraw_postponed Event Properties
PropertyTypeRequiredDescription
reasonstringyesThe reason behind the postponed of this transfer.
+ ##### withdraw_completed - kind: event diff --git a/bridge/tfchain_bridge/pkg/bridge/bridge.go b/bridge/tfchain_bridge/pkg/bridge/bridge.go index 85c233b6c..28f17ab25 100644 --- a/bridge/tfchain_bridge/pkg/bridge/bridge.go +++ b/bridge/tfchain_bridge/pkg/bridge/bridge.go @@ -2,6 +2,7 @@ package bridge import ( "context" + "strconv" "time" "github.com/pkg/errors" @@ -13,7 +14,8 @@ import ( ) const ( - BridgeNetwork = "stellar" + BridgeNetwork = "stellar" + MinimumBalance = 0 ) // Bridge is a high lvl structure which listens on contract events and bridge-related @@ -73,7 +75,29 @@ func NewBridge(ctx context.Context, cfg pkg.BridgeConfig) (*Bridge, string, erro return bridge, wallet.GetKeypair().Address(), nil } +func (bridge *Bridge) preCheckBalance(ctx context.Context) error { + balance, err := bridge.wallet.StatBridgeAccount() + + if err != nil { + return errors.Wrap(err, "can't retrieve the wallet balance at the moment") + } + s, err := strconv.ParseFloat(balance, 64) + if err != nil { + return errors.Wrap(err, "can't parse the wallet balance") + } + + if s < MinimumBalance { + return errors.Errorf("wallet balance insufficient: %s", balance) + } + return nil +} + func (bridge *Bridge) Start(ctx context.Context) error { + // pre-check wallet balance + if err := bridge.preCheckBalance(ctx); err != nil { + return err + } + log.Info(). Str("event_action", "bridge_started"). Str("event_kind", "event"). diff --git a/bridge/tfchain_bridge/pkg/bridge/withdraw.go b/bridge/tfchain_bridge/pkg/bridge/withdraw.go index 177faeacb..e5c43afd3 100644 --- a/bridge/tfchain_bridge/pkg/bridge/withdraw.go +++ b/bridge/tfchain_bridge/pkg/bridge/withdraw.go @@ -116,7 +116,16 @@ func (bridge *Bridge) handleWithdrawReady(ctx context.Context, withdrawReady sub // todo add memo hash err = bridge.wallet.CreatePaymentWithSignaturesAndSubmit(ctx, burnTx.Target, uint64(burnTx.Amount), fmt.Sprint(withdrawReady.ID), burnTx.Signatures, int64(burnTx.SequenceNumber)) if err != nil { - return err + // we can log and skip here as we could depend on tfcahin retry mechanism + // to notify us again about related burn tx + logger.Info(). + Str("event_action", "withdraw_postponed"). + Str("event_kind", "event"). + Str("category", "withdraw"). + Dict("metadata", zerolog.Dict(). + Str("reason", err.Error())). + Msgf("the withdraw has been postponed due to a problem in sending this transaction to the stellar network. error was %s", err.Error()) + return nil } logger.Info(). Str("event_action", "withdraw_completed"). diff --git a/bridge/tfchain_bridge/pkg/stellar/stellar.go b/bridge/tfchain_bridge/pkg/stellar/stellar.go index 6acb1e02d..4c9c1cb21 100644 --- a/bridge/tfchain_bridge/pkg/stellar/stellar.go +++ b/bridge/tfchain_bridge/pkg/stellar/stellar.go @@ -579,5 +579,5 @@ func (w *StellarWallet) StatBridgeAccount() (string, error) { return balance.Balance, nil } } - return "", nil + return "", errors.New("source account does not have trustline") } From 4667b3b479ce8c58b1358f1dbbf31fedb22b1c8e Mon Sep 17 00:00:00 2001 From: sameh-farouk Date: Sun, 24 Dec 2023 14:57:27 +0200 Subject: [PATCH 08/44] ci: build tfchain image --- .../workflows/060_publish_tfchain_image.yml | 42 +++++++++++++++++++ substrate-node/Dockerfile | 42 ++++++++++--------- 2 files changed, 65 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/060_publish_tfchain_image.yml diff --git a/.github/workflows/060_publish_tfchain_image.yml b/.github/workflows/060_publish_tfchain_image.yml new file mode 100644 index 000000000..d4f9551d5 --- /dev/null +++ b/.github/workflows/060_publish_tfchain_image.yml @@ -0,0 +1,42 @@ +name: Publish tfchain image + +on: + push: + tags: + - v* + workflow_dispatch: + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout the repo + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/threefoldtech/tfchain + tags: | + type=semver,pattern={{version}} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + file: ./substrate-node/Dockerfile + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/substrate-node/Dockerfile b/substrate-node/Dockerfile index f9404b778..fc9abd6e5 100644 --- a/substrate-node/Dockerfile +++ b/substrate-node/Dockerfile @@ -1,38 +1,42 @@ FROM docker.io/paritytech/ci-linux:production as builder WORKDIR /tfchain - ARG FEATURES=default - COPY . . - RUN cargo build --locked --release --features $FEATURES # ===== SECOND STAGE ====== - -FROM docker.io/library/ubuntu:20.04 -LABEL maintainer="dylan@threefold.tech" -LABEL description="This is the 2nd stage: a very small image where we copy the tfchain binary." +FROM docker.io/library/ubuntu:22.04 ARG PROFILE=release +# metadata +ARG DOC_URL="https://github.com/threefoldtech/tfchain" -COPY --from=builder /tfchain/target/$PROFILE/tfchain /usr/local/bin -COPY --from=builder /tfchain/chainspecs /etc/chainspecs/ +LABEL io.threefoldtech.image.authors="https://www.threefold.tech" \ + io.threefoldtech.image.vendor="Threefold Tech" \ + io.threefoldtech.image.title="threefoldtech/tfchain" \ + io.threefoldtech.image.description="A base image for standard binary distribution" \ + io.threefoldtech.image.source="https://github.com/threefoldtech/tfchain/blob/development/substrate-node/Dockerfile" \ + io.threefoldtech.image.documentation="${DOC_URL}" -# checks -RUN ldd /usr/local/bin/tfchain && \ - /usr/local/bin/tfchain --version +# show backtraces +ENV RUST_BACKTRACE 1 -# Install CA certificates not present in base image -RUN apt-get update -RUN apt-get install -y curl -RUN apt-get install -y ca-certificates +COPY --from=builder /tfchain/target/$PROFILE/tfchain /usr/local/bin +COPY --from=builder /tfchain/chainspecs /etc/chainspecs/ -# Shrinking -RUN rm -rf /usr/lib/python* && \ +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libssl3 ca-certificates && \ + apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* && \ + rm -rf /usr/lib/python* && \ rm -rf /src && \ rm -rf /usr/share/man +# checks +RUN ldd /usr/local/bin/tfchain && \ + /usr/local/bin/tfchain --version + EXPOSE 30333 9933 9944 9615 VOLUME ["/tfchain"] -ENTRYPOINT ["/usr/local/bin/tfchain"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/tfchain"] From 7a72c63cbb441ccb9d46bea08f4fada57040327b Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Mon, 1 Jan 2024 15:04:27 +0200 Subject: [PATCH 09/44] fix failing yarn install on docker build (#925) --- activation-service/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/activation-service/Dockerfile b/activation-service/Dockerfile index 1491a9ce4..f1519b299 100644 --- a/activation-service/Dockerfile +++ b/activation-service/Dockerfile @@ -4,11 +4,10 @@ FROM node:16 WORKDIR /usr/src/app # Install app dependencies -# A wildcard is used to ensure both package.json AND package-lock.json are copied -# where available (npm@5+) -COPY package*.json ./ +COPY package.json yarn.lock ./ + +RUN yarn install && yarn cache clean -RUN yarn install # If you are building your code for production # RUN npm ci --only=production From ee4564d9aa0bb796325aa6e5bad73f51d0bd8bb2 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Mon, 1 Jan 2024 15:04:46 +0200 Subject: [PATCH 10/44] bump to version 2.7.0-rc2 (specVersion: 147) (#926) * chore: bump to version 2.7.0-rc2 (specVersion: 147) * chore: bump to version 2.7.0-rc2 --- activation-service/helm/tfchainactivationservice/Chart.yaml | 4 ++-- activation-service/package.json | 2 +- bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml | 4 ++-- clients/tfchain-client-js/package.json | 2 +- scripts/package.json | 2 +- substrate-node/Cargo.toml | 2 +- substrate-node/charts/substrate-node/Chart.yaml | 4 ++-- tools/fork-off-substrate/package.json | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/activation-service/helm/tfchainactivationservice/Chart.yaml b/activation-service/helm/tfchainactivationservice/Chart.yaml index 3cedac633..65f862d03 100644 --- a/activation-service/helm/tfchainactivationservice/Chart.yaml +++ b/activation-service/helm/tfchainactivationservice/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainactivationservice description: TFchain account activation funding service type: application -version: 2.7.0-rc1 -appVersion: '2.7.0-rc1' +version: 2.7.0-rc2 +appVersion: '2.7.0-rc2' diff --git a/activation-service/package.json b/activation-service/package.json index 05e7f39e6..9d82971e3 100644 --- a/activation-service/package.json +++ b/activation-service/package.json @@ -1,6 +1,6 @@ { "name": "substrate-funding-service", - "version": "2.7.0-rc1", + "version": "2.7.0-rc2", "description": "Substrate funding service", "main": "index.js", "scripts": { diff --git a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml index 44bd7c23a..a97e25795 100644 --- a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml +++ b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainbridge description: Bridge for TFT between Tfchain Stellar type: application -version: 2.7.0-rc1 -appVersion: '2.7.0-rc1' +version: 2.7.0-rc2 +appVersion: '2.7.0-rc2' diff --git a/clients/tfchain-client-js/package.json b/clients/tfchain-client-js/package.json index 85eee6e48..b97b867d3 100644 --- a/clients/tfchain-client-js/package.json +++ b/clients/tfchain-client-js/package.json @@ -1,6 +1,6 @@ { "name": "tfgrid-api-client", - "version": "2.7.0-rc1", + "version": "2.7.0-rc2", "description": "API client for the TF Grid", "main": "index.js", "scripts": { diff --git a/scripts/package.json b/scripts/package.json index 836fca0fc..a98c01c80 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -1,6 +1,6 @@ { "name": "tfchain-js-scripts", - "version": "2.7.0-rc1", + "version": "2.7.0-rc2", "description": "scripts to fetch data / write data to tfchain", "main": "index.js", "scripts": { diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index 41c5c7556..802693e99 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://threefold.io/" license-file = "LICENSE" readme = "README.md" repository = "https://github.com/threefoldtech/tfchain3" -version = "2.7.0-rc1" +version = "2.7.0-rc2" [workspace] members = [ diff --git a/substrate-node/charts/substrate-node/Chart.yaml b/substrate-node/charts/substrate-node/Chart.yaml index a2710bdd3..b104ddfb2 100644 --- a/substrate-node/charts/substrate-node/Chart.yaml +++ b/substrate-node/charts/substrate-node/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: substrate-node description: Tfchain node type: application -version: 2.7.0-rc1 -appVersion: '2.7.0-rc1' +version: 2.7.0-rc2 +appVersion: '2.7.0-rc2' diff --git a/tools/fork-off-substrate/package.json b/tools/fork-off-substrate/package.json index 2f38c7889..de9c5a1e1 100644 --- a/tools/fork-off-substrate/package.json +++ b/tools/fork-off-substrate/package.json @@ -1,6 +1,6 @@ { "name": "fork-off-substrate", - "version": "2.7.0-rc1", + "version": "2.7.0-rc2", "description": "This script allows bootstrapping a new substrate chain with the current state of a live chain", "main": "index.js", "scripts": { @@ -29,4 +29,4 @@ "cli-progress": "^3.9.1", "dotenv": "^10.0.0" } -} \ No newline at end of file +} From cd8709a0017fc30245031b9aff7065f1c6067065 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Mon, 1 Jan 2024 17:55:28 +0200 Subject: [PATCH 11/44] ci: fix docker build context (#927) --- .github/workflows/060_publish_tfchain_image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/060_publish_tfchain_image.yml b/.github/workflows/060_publish_tfchain_image.yml index d4f9551d5..3f487bbdb 100644 --- a/.github/workflows/060_publish_tfchain_image.yml +++ b/.github/workflows/060_publish_tfchain_image.yml @@ -36,7 +36,7 @@ jobs: uses: docker/build-push-action@v5 with: file: ./substrate-node/Dockerfile - context: . + context: ./substrate-node/. push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 8dfb941263450b62c2b4eb5e3d51bc9f18ba9966 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Mon, 1 Jan 2024 17:55:45 +0200 Subject: [PATCH 12/44] update Cargo.lock (#928) --- substrate-node/Cargo.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index f14372693..831696f83 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -4260,7 +4260,7 @@ dependencies = [ [[package]] name = "pallet-burning" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "frame-benchmarking", "frame-support", @@ -4295,7 +4295,7 @@ dependencies = [ [[package]] name = "pallet-dao" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "env_logger", "frame-benchmarking", @@ -4341,7 +4341,7 @@ dependencies = [ [[package]] name = "pallet-kvstore" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "frame-benchmarking", "frame-support", @@ -4374,7 +4374,7 @@ dependencies = [ [[package]] name = "pallet-runtime-upgrade" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "frame-support", "frame-system", @@ -4440,7 +4440,7 @@ dependencies = [ [[package]] name = "pallet-smart-contract" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "env_logger", "frame-benchmarking", @@ -4493,7 +4493,7 @@ dependencies = [ [[package]] name = "pallet-tfgrid" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "env_logger", "frame-benchmarking", @@ -4521,7 +4521,7 @@ dependencies = [ [[package]] name = "pallet-tft-bridge" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "frame-benchmarking", "frame-support", @@ -4539,7 +4539,7 @@ dependencies = [ [[package]] name = "pallet-tft-price" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "frame-benchmarking", "frame-support", @@ -4643,7 +4643,7 @@ dependencies = [ [[package]] name = "pallet-validator" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "frame-benchmarking", "frame-support", @@ -8011,7 +8011,7 @@ dependencies = [ [[package]] name = "substrate-validator-set" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "frame-benchmarking", "frame-support", @@ -8149,7 +8149,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "tfchain" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "clap", "frame-benchmarking", @@ -8195,7 +8195,7 @@ dependencies = [ [[package]] name = "tfchain-runtime" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "frame-benchmarking", "frame-executive", @@ -8249,7 +8249,7 @@ dependencies = [ [[package]] name = "tfchain-support" -version = "2.7.0-rc1" +version = "2.7.0-rc2" dependencies = [ "frame-support", "frame-system", From 34002e6d77a8e16b643d1433b340ec125409496e Mon Sep 17 00:00:00 2001 From: Muhamad Awad Date: Tue, 16 Jan 2024 17:25:21 +0100 Subject: [PATCH 13/44] restore the set noder certificate without sudo (#937) --- clients/tfchain-client-go/burning.go | 2 +- clients/tfchain-client-go/node.go | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/clients/tfchain-client-go/burning.go b/clients/tfchain-client-go/burning.go index 03489df4f..b2079b6a7 100644 --- a/clients/tfchain-client-go/burning.go +++ b/clients/tfchain-client-go/burning.go @@ -15,7 +15,7 @@ var ( ) type BurnTransaction struct { - Block types.U32 `json:"block"` + Block BlockNumber `json:"block"` Amount types.U64 `json:"amount"` Source types.OptionAccountID `json:"source"` Target string `json:"target"` diff --git a/clients/tfchain-client-go/node.go b/clients/tfchain-client-go/node.go index b9b436e16..6eade3661 100644 --- a/clients/tfchain-client-go/node.go +++ b/clients/tfchain-client-go/node.go @@ -804,3 +804,24 @@ func (s *Substrate) GetDedicatedNodePrice(nodeID uint32) (uint64, error) { return uint64(price), nil } + +// SetNodeCertificate sets the node certificate type +func (s *Substrate) SetNodeCertificate(identity Identity, id uint32, cert NodeCertification) error { + cl, meta, err := s.GetClient() + if err != nil { + return err + } + + c, err := types.NewCall(meta, "TfgridModule.set_node_certification", + id, cert, + ) + if err != nil { + return errors.Wrap(err, "failed to create call") + } + + if _, err := s.Call(cl, meta, identity, c); err != nil { + return errors.Wrap(err, "failed to set node certificate") + } + + return nil +} From 68c63d80a9e072ab8162f51c5a080a3609c9b748 Mon Sep 17 00:00:00 2001 From: Peter Nashaat Date: Tue, 16 Jan 2024 18:37:57 +0200 Subject: [PATCH 14/44] uppdating tfchain values file (#935) --- substrate-node/charts/substrate-node/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/substrate-node/charts/substrate-node/values.yaml b/substrate-node/charts/substrate-node/values.yaml index 4ef36de3b..e72783cf9 100644 --- a/substrate-node/charts/substrate-node/values.yaml +++ b/substrate-node/charts/substrate-node/values.yaml @@ -49,14 +49,14 @@ is_validator: true chainspec: '/etc/chainspecs/dev/chainSpecRaw.json' -rpc_max_connections: 1048576 +rpc_max_connections: "1048576" #rpc_methods: "Unsafe" rpc_methods: 'safe' # Archive will keep all history, otherwise only the last 256 blocks will be kept -archive: true +#archive: true # Telemetry dashboard url # telemetry_url: "" @@ -76,7 +76,7 @@ global: certresolver: le ingress: - enabled: true + enabled: false annotations: hosts: - host: dev.substrate01.threefold.io From e1e6d3e4cf5ece47891148cf9877187718881184 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:46:01 -0300 Subject: [PATCH 15/44] Update types.rs (#943) --- substrate-node/pallets/pallet-smart-contract/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate-node/pallets/pallet-smart-contract/src/types.rs b/substrate-node/pallets/pallet-smart-contract/src/types.rs index 797ea010c..6885292bf 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/types.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/types.rs @@ -134,9 +134,9 @@ pub enum ContractState { #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum Cause { - CanceledByCollective, CanceledByUser, OutOfFunds, + CanceledByCollective, } impl Default for ContractState { From c4ae928a4a8256e3175b9f277e08dfd7d385c666 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Thu, 18 Jan 2024 12:16:19 -0300 Subject: [PATCH 16/44] chore: bump to version 2.7.0-rc3 (specVersion: 148) (#944) --- .../helm/tfchainactivationservice/Chart.yaml | 4 +- activation-service/package.json | 2 +- .../chart/tfchainbridge/Chart.yaml | 4 +- clients/tfchain-client-js/package.json | 2 +- scripts/package.json | 2 +- substrate-node/Cargo.lock | 592 +++++++++--------- substrate-node/Cargo.toml | 2 +- .../charts/substrate-node/Chart.yaml | 4 +- substrate-node/runtime/src/lib.rs | 2 +- tools/fork-off-substrate/package.json | 4 +- 10 files changed, 306 insertions(+), 312 deletions(-) diff --git a/activation-service/helm/tfchainactivationservice/Chart.yaml b/activation-service/helm/tfchainactivationservice/Chart.yaml index 65f862d03..280219fd8 100644 --- a/activation-service/helm/tfchainactivationservice/Chart.yaml +++ b/activation-service/helm/tfchainactivationservice/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainactivationservice description: TFchain account activation funding service type: application -version: 2.7.0-rc2 -appVersion: '2.7.0-rc2' +version: 2.7.0-rc3 +appVersion: '2.7.0-rc3' diff --git a/activation-service/package.json b/activation-service/package.json index 9d82971e3..3454b9dab 100644 --- a/activation-service/package.json +++ b/activation-service/package.json @@ -1,6 +1,6 @@ { "name": "substrate-funding-service", - "version": "2.7.0-rc2", + "version": "2.7.0-rc3", "description": "Substrate funding service", "main": "index.js", "scripts": { diff --git a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml index a97e25795..342250c8b 100644 --- a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml +++ b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainbridge description: Bridge for TFT between Tfchain Stellar type: application -version: 2.7.0-rc2 -appVersion: '2.7.0-rc2' +version: 2.7.0-rc3 +appVersion: '2.7.0-rc3' diff --git a/clients/tfchain-client-js/package.json b/clients/tfchain-client-js/package.json index b97b867d3..b777d04d9 100644 --- a/clients/tfchain-client-js/package.json +++ b/clients/tfchain-client-js/package.json @@ -1,6 +1,6 @@ { "name": "tfgrid-api-client", - "version": "2.7.0-rc2", + "version": "2.7.0-rc3", "description": "API client for the TF Grid", "main": "index.js", "scripts": { diff --git a/scripts/package.json b/scripts/package.json index a98c01c80..8e090023f 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -1,6 +1,6 @@ { "name": "tfchain-js-scripts", - "version": "2.7.0-rc2", + "version": "2.7.0-rc3", "description": "scripts to fetch data / write data to tfchain", "main": "index.js", "scripts": { diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index 831696f83..fb072d4f1 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -77,19 +77,19 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -130,9 +130,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.5" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +checksum = "3fde6067df7359f2d6335ec1a50c1f8f825801687d10da0cc4c6b08e3f6afd15" dependencies = [ "anstyle", "anstyle-parse", @@ -178,9 +178,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "approx" @@ -267,18 +267,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.2.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" +checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite", "parking", "polling", - "rustix 0.38.28", + "rustix 0.38.30", "slab", "tracing", "windows-sys 0.52.0", @@ -295,11 +295,11 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener 4.0.0", + "event-listener 4.0.3", "event-listener-strategy", "pin-project-lite 0.2.13", ] @@ -312,18 +312,18 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -367,7 +367,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.1", + "object 0.32.2", "rustc-demangle", ] @@ -391,9 +391,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -431,13 +431,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.15", + "prettyplease 0.2.16", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -448,9 +448,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -567,9 +567,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", "serde", @@ -642,9 +642,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" dependencies = [ "serde", ] @@ -657,7 +657,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "thiserror", @@ -684,9 +684,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.5" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" +checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" dependencies = [ "smallvec", ] @@ -767,9 +767,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", @@ -778,9 +778,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.11" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive", @@ -788,9 +788,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.11" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", @@ -807,7 +807,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -854,15 +854,15 @@ dependencies = [ [[package]] name = "console" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.45.0", + "windows-sys 0.52.0", ] [[package]] @@ -886,7 +886,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "tiny-keccak", ] @@ -933,9 +933,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -1049,35 +1049,28 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.16" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", ] [[package]] name = "crossbeam-utils" -version = "0.8.17" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -1188,14 +1181,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "cxx" -version = "1.0.111" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9fc0c733f71e58dedf4f034cd2a266f80b94cc9ed512729e1798651b68c2cba" +checksum = "8de00f15a6fa069c99b88c5c78c4541d0e7899a33b86f7480e23df2431fce0bc" dependencies = [ "cc", "cxxbridge-flags", @@ -1205,9 +1198,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.111" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51bc81d2664db24cf1d35405f66e18a85cffd4d49ab930c71a5c6342a410f38c" +checksum = "0a71e1e631fa2f2f5f92e8b0d860a00c198c6771623a6cefcc863e3554f0d8d6" dependencies = [ "cc", "codespan-reporting", @@ -1215,24 +1208,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "cxxbridge-flags" -version = "1.0.111" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8511afbe34ea242697784da5cb2c5d4a0afb224ca8b136bdf93bfe180cbe5884" +checksum = "6f3fed61d56ba497c4efef9144dfdbaa25aa58f2f6b3a7cf441d4591c583745c" [[package]] name = "cxxbridge-macro" -version = "1.0.111" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6888cd161769d65134846d4d4981d5a6654307cc46ec83fb917e530aea5f84" +checksum = "8908e380a8efd42150c017b0cfa31509fc49b6d47f7cb6b33e93ffb8f4e3661e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -1287,9 +1280,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", ] @@ -1401,7 +1394,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -1562,9 +1555,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -1603,9 +1596,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "4.0.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", @@ -1618,7 +1611,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 4.0.0", + "event-listener 4.0.3", "pin-project-lite 0.2.13", ] @@ -1641,7 +1634,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -1873,7 +1866,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -1992,7 +1985,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -2004,7 +1997,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -2014,7 +2007,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -2099,9 +2092,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -2114,9 +2107,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -2124,15 +2117,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -2142,15 +2135,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ "futures-core", "pin-project-lite 0.2.13", @@ -2158,13 +2151,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -2180,15 +2173,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" @@ -2198,9 +2191,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -2266,9 +2259,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -2334,9 +2327,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.22" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -2395,7 +2388,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", ] [[package]] @@ -2421,9 +2414,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -2586,16 +2579,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -2759,7 +2752,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "libc", "windows-sys 0.48.0", ] @@ -2790,13 +2783,13 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ - "hermit-abi 0.3.3", - "rustix 0.38.28", - "windows-sys 0.48.0", + "hermit-abi 0.3.4", + "rustix 0.38.30", + "windows-sys 0.52.0", ] [[package]] @@ -2825,9 +2818,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -2978,9 +2971,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", @@ -2991,9 +2984,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -3048,18 +3041,18 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -3071,7 +3064,7 @@ dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.11", + "getrandom 0.2.12", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -3461,7 +3454,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", "redox_syscall 0.4.1", ] @@ -3531,9 +3524,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "295c17e837573c8c821dbaeb3cceb3d745ad082f7572191409e69cbc1b3fd050" dependencies = [ "cc", "pkg-config", @@ -3581,9 +3574,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lite-json" @@ -3675,7 +3668,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -3689,7 +3682,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -3700,7 +3693,7 @@ checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -3711,7 +3704,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -3753,9 +3746,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memfd" @@ -3763,7 +3756,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.28", + "rustix 0.38.30", ] [[package]] @@ -3784,15 +3777,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "memory-db" version = "0.32.0" @@ -4149,7 +4133,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "libc", ] @@ -4173,9 +4157,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -4260,7 +4244,7 @@ dependencies = [ [[package]] name = "pallet-burning" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "frame-benchmarking", "frame-support", @@ -4295,7 +4279,7 @@ dependencies = [ [[package]] name = "pallet-dao" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "env_logger", "frame-benchmarking", @@ -4341,7 +4325,7 @@ dependencies = [ [[package]] name = "pallet-kvstore" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "frame-benchmarking", "frame-support", @@ -4374,7 +4358,7 @@ dependencies = [ [[package]] name = "pallet-runtime-upgrade" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "frame-support", "frame-system", @@ -4440,7 +4424,7 @@ dependencies = [ [[package]] name = "pallet-smart-contract" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "env_logger", "frame-benchmarking", @@ -4493,7 +4477,7 @@ dependencies = [ [[package]] name = "pallet-tfgrid" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "env_logger", "frame-benchmarking", @@ -4521,7 +4505,7 @@ dependencies = [ [[package]] name = "pallet-tft-bridge" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "frame-benchmarking", "frame-support", @@ -4539,7 +4523,7 @@ dependencies = [ [[package]] name = "pallet-tft-price" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "frame-benchmarking", "frame-support", @@ -4643,7 +4627,7 @@ dependencies = [ [[package]] name = "pallet-validator" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "frame-benchmarking", "frame-support", @@ -4662,9 +4646,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" +checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ "blake2", "crc32fast", @@ -4678,6 +4662,7 @@ dependencies = [ "rand 0.8.5", "siphasher", "snap", + "winapi", ] [[package]] @@ -4869,9 +4854,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" dependencies = [ "memchr", "thiserror", @@ -4880,9 +4865,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" +checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" dependencies = [ "pest", "pest_generator", @@ -4890,22 +4875,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" +checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "pest_meta" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" +checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" dependencies = [ "once_cell", "pest", @@ -4939,7 +4924,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -4972,26 +4957,26 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "platforms" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] name = "polling" -version = "3.3.1" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite 0.2.13", - "rustix 0.38.28", + "rustix 0.38.30", "tracing", "windows-sys 0.52.0", ] @@ -5079,12 +5064,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -5158,14 +5143,14 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -5204,7 +5189,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -5329,9 +5314,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -5401,7 +5386,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", ] [[package]] @@ -5430,9 +5415,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -5440,9 +5425,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -5484,29 +5469,29 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "libredox", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53313ec9f12686aeeffb43462c3ac77aa25f590a5f630eb2cde0de59417b29c7" +checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2566c4bf6845f2c2e83b27043c3f5dfcd5ba8f2937d6c00dc009bfb51a079dc4" +checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -5607,7 +5592,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom 0.2.12", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -5684,7 +5669,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", + "semver 1.0.21", ] [[package]] @@ -5712,14 +5697,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys 0.4.13", "windows-sys 0.52.0", ] @@ -5765,7 +5750,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] @@ -5895,7 +5880,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -6048,7 +6033,7 @@ name = "sc-consensus-grandpa" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "array-bytes", "async-trait", "dyn-clone", @@ -6271,7 +6256,7 @@ name = "sc-network-gossip" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "futures", "futures-timer", "libp2p", @@ -6641,7 +6626,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -6729,11 +6714,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -6742,7 +6727,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "cfg-if", "hashbrown 0.13.2", ] @@ -6862,9 +6847,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" dependencies = [ "serde", ] @@ -6877,29 +6862,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -6908,9 +6893,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -7050,9 +7035,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.11.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" [[package]] name = "snap" @@ -7155,7 +7140,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -7360,7 +7345,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -7379,7 +7364,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -7568,7 +7553,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -7715,7 +7700,7 @@ name = "sp-trie" version = "22.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "hash-db", "hashbrown 0.13.2", "lazy_static", @@ -7758,7 +7743,7 @@ dependencies = [ "parity-scale-codec 3.6.9", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -7824,9 +7809,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.44.0" +version = "1.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" +checksum = "3c0c74081753a8ce1c8eb10b9f262ab6f7017e5ad3317c17a54c7ab65fcb3c6e" dependencies = [ "Inflector", "num-format", @@ -7921,7 +7906,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -8011,7 +7996,7 @@ dependencies = [ [[package]] name = "substrate-validator-set" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "frame-benchmarking", "frame-support", @@ -8065,9 +8050,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.41" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -8115,28 +8100,28 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.12" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tempfile" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.4.1", - "rustix 0.38.28", - "windows-sys 0.48.0", + "rustix 0.38.30", + "windows-sys 0.52.0", ] [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -8149,7 +8134,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "tfchain" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "clap", "frame-benchmarking", @@ -8195,7 +8180,7 @@ dependencies = [ [[package]] name = "tfchain-runtime" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "frame-benchmarking", "frame-executive", @@ -8249,7 +8234,7 @@ dependencies = [ [[package]] name = "tfchain-support" -version = "2.7.0-rc2" +version = "2.7.0-rc3" dependencies = [ "frame-support", "frame-system", @@ -8262,22 +8247,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.51" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.51" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -8317,9 +8302,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", "itoa", @@ -8337,9 +8322,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] @@ -8389,9 +8374,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", @@ -8414,7 +8399,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -8536,7 +8521,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "bytes", "futures-core", "futures-util", @@ -8580,7 +8565,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -8801,9 +8786,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -8946,9 +8931,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -8956,24 +8941,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -8983,9 +8968,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8993,22 +8978,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wasm-instrument" @@ -9128,7 +9113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.5", + "base64 0.21.7", "bincode", "directories-next", "file-per-thread-logger", @@ -9257,7 +9242,7 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.8.0", + "memoffset", "paste 1.0.14", "rand 0.8.5", "rustix 0.36.17", @@ -9281,9 +9266,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -9323,7 +9308,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.28", + "rustix 0.38.30", ] [[package]] @@ -9379,7 +9364,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core", + "windows-core 0.51.1", "windows-targets 0.48.5", ] @@ -9392,6 +9377,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -9592,9 +9586,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.28" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] @@ -9672,22 +9666,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.31" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.31" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -9707,7 +9701,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index 802693e99..0326ec791 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://threefold.io/" license-file = "LICENSE" readme = "README.md" repository = "https://github.com/threefoldtech/tfchain3" -version = "2.7.0-rc2" +version = "2.7.0-rc3" [workspace] members = [ diff --git a/substrate-node/charts/substrate-node/Chart.yaml b/substrate-node/charts/substrate-node/Chart.yaml index b104ddfb2..c5d269483 100644 --- a/substrate-node/charts/substrate-node/Chart.yaml +++ b/substrate-node/charts/substrate-node/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: substrate-node description: Tfchain node type: application -version: 2.7.0-rc2 -appVersion: '2.7.0-rc2' +version: 2.7.0-rc3 +appVersion: '2.7.0-rc3' diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 26f5662e1..0ba4764b1 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -151,7 +151,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("substrate-threefold"), impl_name: create_runtime_str!("substrate-threefold"), authoring_version: 1, - spec_version: 147, + spec_version: 148, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/tools/fork-off-substrate/package.json b/tools/fork-off-substrate/package.json index de9c5a1e1..c2af09f30 100644 --- a/tools/fork-off-substrate/package.json +++ b/tools/fork-off-substrate/package.json @@ -1,6 +1,6 @@ { "name": "fork-off-substrate", - "version": "2.7.0-rc2", + "version": "2.7.0-rc3", "description": "This script allows bootstrapping a new substrate chain with the current state of a live chain", "main": "index.js", "scripts": { @@ -29,4 +29,4 @@ "cli-progress": "^3.9.1", "dotenv": "^10.0.0" } -} +} \ No newline at end of file From 25d5f9d1da347e9218e27b4774eec379048b09ad Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:14:37 -0300 Subject: [PATCH 17/44] fix(clients): propagate Cause enum new entry --- clients/tfchain-client-go/contract.go | 9 +++++++-- clients/tfchain-client-js/types.json | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/clients/tfchain-client-go/contract.go b/clients/tfchain-client-go/contract.go index f6f966d13..45296b93a 100644 --- a/clients/tfchain-client-go/contract.go +++ b/clients/tfchain-client-go/contract.go @@ -9,8 +9,9 @@ import ( ) type DeletedState struct { - IsCanceledByUser bool `json:"is_canceled_by_user"` - IsOutOfFunds bool `json:"is_out_of_funds"` + IsCanceledByUser bool `json:"is_canceled_by_user"` + IsOutOfFunds bool `json:"is_out_of_funds"` + IsCanceledByCollective bool `json:"is_canceled_by_collective"` } // Decode implementation for the enum type @@ -25,6 +26,8 @@ func (r *DeletedState) Decode(decoder scale.Decoder) error { r.IsCanceledByUser = true case 1: r.IsOutOfFunds = true + case 2: + r.IsCanceledByCollective = true default: return fmt.Errorf("unknown deleted state value") } @@ -38,6 +41,8 @@ func (r DeletedState) Encode(encoder scale.Encoder) (err error) { err = encoder.PushByte(0) } else if r.IsOutOfFunds { err = encoder.PushByte(1) + } else if r.IsCanceledByCollective { + err = encoder.PushByte(2) } return } diff --git a/clients/tfchain-client-js/types.json b/clients/tfchain-client-js/types.json index ce15a1412..11461013e 100644 --- a/clients/tfchain-client-js/types.json +++ b/clients/tfchain-client-js/types.json @@ -168,7 +168,8 @@ "Cause": { "_enum": [ "CanceledByUser", - "OutOfFunds" + "OutOfFunds", + "CanceledByCollective" ] }, "NruConsumption": { @@ -334,4 +335,4 @@ "farm_id": "u32", "weight": "u64" } -} +} \ No newline at end of file From 70bca81e234e7a9658113d3bdb12ede4e8c12b7d Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Mon, 22 Jan 2024 10:06:26 -0300 Subject: [PATCH 18/44] feat(pallet-smart-contract): allow renting standby node (#933) --- .github/workflows/010_build_and_test.yaml | 1 + .../0018-allow-renting-standby-node.md | 21 ++++++ substrate-node/pallets/pallet-dao/src/dao.rs | 2 + substrate-node/pallets/pallet-dao/src/lib.rs | 10 +-- substrate-node/pallets/pallet-dao/src/mock.rs | 3 +- .../pallet-smart-contract/src/billing.rs | 15 +++- .../src/grid_contract.rs | 23 +++++- .../pallets/pallet-smart-contract/src/lib.rs | 6 +- .../pallets/pallet-smart-contract/src/mock.rs | 4 +- .../pallet-smart-contract/src/tests.rs | 75 +++++++++++++++++-- .../pallets/pallet-tfgrid/src/mock.rs | 1 + .../pallets/pallet-tfgrid/src/node.rs | 7 +- substrate-node/runtime/src/lib.rs | 6 +- substrate-node/support/src/traits.rs | 1 + substrate-node/support/src/types.rs | 12 ++- 15 files changed, 154 insertions(+), 33 deletions(-) create mode 100644 docs/architecture/0018-allow-renting-standby-node.md diff --git a/.github/workflows/010_build_and_test.yaml b/.github/workflows/010_build_and_test.yaml index 5db61fcd2..7f150a3df 100644 --- a/.github/workflows/010_build_and_test.yaml +++ b/.github/workflows/010_build_and_test.yaml @@ -39,6 +39,7 @@ jobs: - name: Build run: | cd substrate-node + cargo clean cargo build --release - name: Unit tests diff --git a/docs/architecture/0018-allow-renting-standby-node.md b/docs/architecture/0018-allow-renting-standby-node.md new file mode 100644 index 000000000..dd3e18b46 --- /dev/null +++ b/docs/architecture/0018-allow-renting-standby-node.md @@ -0,0 +1,21 @@ +# 18. Allow renting standby node + +Date: 2024-01-09 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/923) for more details. + +## Decision + +We want to be able to create a rent contract on node even if it is in standby phase. +Moreover, user should be billed for this contract only during online periods. + +In `pallet-smart-contract`: + +* Remove the `node_power.is_down()` restriction when trying to create a rent contract in `create_rent_contract()` extrinsic. restriction +* Modify rent contract billing logic by allowing billing only if the node is online (`PowerState` = `Up`). To skip the billing during the standby period we update the contract lock when the node power state is switched to `Up`. diff --git a/substrate-node/pallets/pallet-dao/src/dao.rs b/substrate-node/pallets/pallet-dao/src/dao.rs index 2a04497c4..b5c04955d 100644 --- a/substrate-node/pallets/pallet-dao/src/dao.rs +++ b/substrate-node/pallets/pallet-dao/src/dao.rs @@ -367,4 +367,6 @@ impl ChangeNode, InterfaceOf, SerialNumberOf> for farm_weight = farm_weight.checked_sub(node_weight).unwrap_or(0); FarmWeight::::insert(node.farm_id, farm_weight); } + + fn node_power_state_changed(_node: &TfgridNode) {} } diff --git a/substrate-node/pallets/pallet-dao/src/lib.rs b/substrate-node/pallets/pallet-dao/src/lib.rs index e87a2a036..e11873660 100644 --- a/substrate-node/pallets/pallet-dao/src/lib.rs +++ b/substrate-node/pallets/pallet-dao/src/lib.rs @@ -20,12 +20,10 @@ pub use pallet::*; #[frame_support::pallet] pub mod pallet { - use pallet_tfgrid::pallet::{InterfaceOf, LocationOf, SerialNumberOf}; - use sp_std::prelude::*; - use crate::proposal; use crate::proposal::ProposalIndex; use crate::weights::WeightInfo; + use frame_support::pallet_prelude::*; use frame_support::{ dispatch::{ DispatchResult, DispatchResultWithPostInfo, Dispatchable, GetDispatchInfo, @@ -33,12 +31,11 @@ pub mod pallet { }, traits::{EnsureOrigin, Get}, }; - use tfchain_support::traits::{ChangeNode, Tfgrid}; - - use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; use pallet_tfgrid::farm::FarmName; use sp_std::convert::TryInto; + use sp_std::prelude::*; + use tfchain_support::traits::Tfgrid; #[pallet::config] pub trait Config: @@ -63,7 +60,6 @@ pub mod pallet { type MinVetos: Get; type Tfgrid: Tfgrid>; - type NodeChanged: ChangeNode, InterfaceOf, SerialNumberOf>; /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; diff --git a/substrate-node/pallets/pallet-dao/src/mock.rs b/substrate-node/pallets/pallet-dao/src/mock.rs index 3044ba6be..a4fd93313 100644 --- a/substrate-node/pallets/pallet-dao/src/mock.rs +++ b/substrate-node/pallets/pallet-dao/src/mock.rs @@ -85,6 +85,8 @@ impl ChangeNode for NodeChanged { fn node_deleted(node: &TfgridNode) { DaoModule::node_deleted(node); } + + fn node_power_state_changed(_node: &TfgridNode) {} } pub struct PublicIpModifierType; @@ -100,7 +102,6 @@ impl pallet_dao::pallet::Config for TestRuntime { type MotionDuration = DaoMotionDuration; type MinVetos = MinVetos; type Tfgrid = TfgridModule; - type NodeChanged = NodeChanged; type WeightInfo = weights::SubstrateWeight; } diff --git a/substrate-node/pallets/pallet-smart-contract/src/billing.rs b/substrate-node/pallets/pallet-smart-contract/src/billing.rs index 8f5b8ff22..9ae4f8721 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/billing.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/billing.rs @@ -16,7 +16,7 @@ use sp_runtime::{ use sp_std::vec::Vec; impl Pallet { - pub fn bill_conttracts_for_block(block_number: BlockNumberFor) { + pub fn bill_contracts_for_block(block_number: BlockNumberFor) { // Let offchain worker check if there are contracts on // billing loop at current index and try to bill them let index = Self::get_billing_loop_index_from_block_number(block_number); @@ -57,8 +57,8 @@ impl Pallet { continue; } } + let _res = Self::bill_contract_using_signed_transaction(contract_id); } - let _res = Self::bill_contract_using_signed_transaction(contract_id); } } @@ -103,6 +103,17 @@ impl Pallet { pub fn bill_contract(contract_id: u64) -> DispatchResultWithPostInfo { let mut contract = Contracts::::get(contract_id).ok_or(Error::::ContractNotExists)?; + // Bill rent contract only if node is online + if let types::ContractData::RentContract(rc) = &contract.contract_type { + if let Some(node) = pallet_tfgrid::Nodes::::get(rc.node_id) { + // No need for preliminary call to contains_key() because default node power value is Up + let node_power = pallet_tfgrid::NodePower::::get(node.id); + if node_power.is_standby() { + return Ok(().into()); + } + } + } + let twin = pallet_tfgrid::Twins::::get(contract.twin_id).ok_or(Error::::TwinNotExists)?; let usable_balance = Self::get_usable_balance(&twin.account_id); diff --git a/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs b/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs index cd3faf7e7..c6ef076d9 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs @@ -27,8 +27,12 @@ impl Pallet { let node = pallet_tfgrid::Nodes::::get(node_id).ok_or(Error::::NodeNotExists)?; + // Don't deploy if node is (or is switched to) standby let node_power = pallet_tfgrid::NodePower::::get(node_id); - ensure!(!node_power.is_down(), Error::::NodeNotAvailableToDeploy); + ensure!( + !node_power.is_standby_phase(), + Error::::NodeNotAvailableToDeploy + ); let farm = pallet_tfgrid::Farms::::get(node.farm_id).ok_or(Error::::FarmNotExists)?; @@ -123,9 +127,6 @@ impl Pallet { Error::::FarmNotExists ); - let node_power = pallet_tfgrid::NodePower::::get(node_id); - ensure!(!node_power.is_down(), Error::::NodeNotAvailableToDeploy); - let active_node_contracts = ActiveNodeContracts::::get(node_id); let farm = pallet_tfgrid::Farms::::get(node.farm_id).ok_or(Error::::FarmNotExists)?; ensure!( @@ -718,6 +719,20 @@ impl ChangeNode, InterfaceOf, SerialNumberOf> for } } } + + fn node_power_state_changed(node: &TfgridNode) { + // Avoid billing rent contract for standby period + // So update contract lock timestamp when node power state comes back to Up + let node_power = pallet_tfgrid::NodePower::::get(node.id); + if !node_power.is_standby() { + if let Some(rc_id) = ActiveRentContractForNode::::get(node.id) { + let mut contract_lock = ContractLock::::get(rc_id); + let now = Self::get_current_timestamp_in_secs(); + contract_lock.lock_updated = now; + ContractLock::::insert(rc_id, &contract_lock); + } + } + } } /// A Name Contract Name. diff --git a/substrate-node/pallets/pallet-smart-contract/src/lib.rs b/substrate-node/pallets/pallet-smart-contract/src/lib.rs index 09726b04b..8def850e4 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/lib.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/lib.rs @@ -70,7 +70,6 @@ pub mod pallet { offchain::{AppCrypto, CreateSignedTransaction}, pallet_prelude::*, }; - use pallet_tfgrid::pallet::{InterfaceOf, LocationOf, SerialNumberOf}; use parity_scale_codec::FullCodec; use sp_core::H256; use sp_std::{ @@ -78,7 +77,7 @@ pub mod pallet { fmt::Debug, vec::Vec, }; - use tfchain_support::traits::{ChangeNode, PublicIpModifier}; + use tfchain_support::traits::PublicIpModifier; pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; @@ -217,7 +216,6 @@ pub mod pallet { type DistributionFrequency: Get; type GracePeriod: Get; type WeightInfo: weights::WeightInfo; - type NodeChanged: ChangeNode, InterfaceOf, SerialNumberOf>; type PublicIpModifier: PublicIpModifier; type AuthorityId: AppCrypto; type Call: From>; @@ -663,7 +661,7 @@ pub mod pallet { } fn offchain_worker(block_number: BlockNumberFor) { - Self::bill_conttracts_for_block(block_number); + Self::bill_contracts_for_block(block_number); } } } diff --git a/substrate-node/pallets/pallet-smart-contract/src/mock.rs b/substrate-node/pallets/pallet-smart-contract/src/mock.rs index cc765f286..a970dbf30 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/mock.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/mock.rs @@ -183,6 +183,9 @@ impl ChangeNode for NodeChanged { fn node_deleted(node: &TfgridNode) { SmartContractModule::node_deleted(node); } + fn node_power_state_changed(node: &TfgridNode) { + SmartContractModule::node_power_state_changed(node); + } } pub struct PublicIpModifierType; @@ -279,7 +282,6 @@ impl pallet_smart_contract::Config for TestRuntime { type DistributionFrequency = DistributionFrequency; type GracePeriod = GracePeriod; type WeightInfo = weights::SubstrateWeight; - type NodeChanged = NodeChanged; type MaxNameContractNameLength = MaxNameContractNameLength; type NameContractName = TestNameContractName; type RestrictedOrigin = EnsureRootOrCouncilApproval; diff --git a/substrate-node/pallets/pallet-smart-contract/src/tests.rs b/substrate-node/pallets/pallet-smart-contract/src/tests.rs index fad3debb3..0ba94b1b0 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/tests.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/tests.rs @@ -49,7 +49,7 @@ fn test_create_node_contract_works() { } #[test] -fn test_create_node_contract_on_offline_node_fails() { +fn test_create_node_contract_on_standby_node_fails() { new_test_ext().execute_with(|| { run_to_block(1, None); prepare_farm_and_node(); @@ -669,7 +669,7 @@ fn test_create_rent_contract_works() { } #[test] -fn test_create_rent_contract_on_offline_node_fails() { +fn test_create_rent_contract_on_standby_node_works() { new_test_ext().execute_with(|| { run_to_block(1, None); prepare_dedicated_farm_and_node(); @@ -680,10 +680,11 @@ fn test_create_rent_contract_on_offline_node_fails() { tfchain_support::types::Power::Down )); - assert_noop!( - SmartContractModule::create_rent_contract(RuntimeOrigin::signed(bob()), node_id, None), - Error::::NodeNotAvailableToDeploy - ); + assert_ok!(SmartContractModule::create_rent_contract( + RuntimeOrigin::signed(bob()), + node_id, + None + )); }); } @@ -1798,6 +1799,12 @@ fn test_rent_contract_billing() { prepare_dedicated_farm_and_node(); let node_id = 1; + // switch node to standby at block 1 + assert_ok!(TfgridModule::change_power_state( + RuntimeOrigin::signed(alice()), + tfchain_support::types::Power::Down + )); + TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); assert_ok!(SmartContractModule::create_rent_contract( @@ -1814,14 +1821,66 @@ fn test_rent_contract_billing() { types::ContractData::RentContract(rent_contract) ); + // go to end of cycle 1 [1-11] and expect a call to bill_contract() pool_state .write() .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 11); run_to_block(11, Some(&mut pool_state)); - let (amount_due_as_u128, discount_received) = calculate_tft_cost(1, 2, 10); + // wake up node at block 15, in the middle of cycle 2 [11-21] + run_to_block(15, Some(&mut pool_state)); + assert_ok!(TfgridModule::change_power_state( + RuntimeOrigin::signed(alice()), + tfchain_support::types::Power::Up + )); + + // go to end of cycle 2 [11-21] and expect a call to bill_contract() + pool_state + .write() + .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 21); + run_to_block(21, Some(&mut pool_state)); + + // should bill partial cycle 2 [15-21], 6 blocks + let (amount_due_as_u128, discount_received) = calculate_tft_cost(contract_id, 2, 6); assert_ne!(amount_due_as_u128, 0); - check_report_cost(1, amount_due_as_u128, 11, discount_received); + check_report_cost(contract_id, amount_due_as_u128, 21, discount_received); + + // switch node to standby at block 25, in the middle of cycle 3 [21-31] + run_to_block(25, Some(&mut pool_state)); + assert_ok!(TfgridModule::change_power_state( + RuntimeOrigin::signed(alice()), + tfchain_support::types::Power::Down + )); + + // go to end of cycle 3 [21-31] and expect a call to bill_contract() + pool_state + .write() + .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 31); + run_to_block(31, Some(&mut pool_state)); + + // go to end of cycle 4 [31-41] and expect a call to bill_contract() + pool_state + .write() + .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 41); + run_to_block(41, Some(&mut pool_state)); + + // wake up node at block 45, in the middle of cycle 5 [41-51] + run_to_block(45, Some(&mut pool_state)); + assert_ok!(TfgridModule::change_power_state( + RuntimeOrigin::signed(alice()), + tfchain_support::types::Power::Up + )); + + // go to end of cycle 5 [41-51] and expect a call to bill_contract() + pool_state + .write() + .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 51); + run_to_block(51, Some(&mut pool_state)); + + // should bill partial cycle 5 [45-51], 6 blocks + let (amount_due_as_u128, discount_received) = calculate_tft_cost(contract_id, 2, 6); + assert_ne!(amount_due_as_u128, 0); + check_report_cost(contract_id, amount_due_as_u128, 51, discount_received); }); } diff --git a/substrate-node/pallets/pallet-tfgrid/src/mock.rs b/substrate-node/pallets/pallet-tfgrid/src/mock.rs index 5b636a10d..0f7372fa8 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/mock.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/mock.rs @@ -82,6 +82,7 @@ pub struct NodeChanged; impl tfchain_support::traits::ChangeNode for NodeChanged { fn node_changed(_old_node: Option<&TfgridNode>, _new_node: &TfgridNode) {} fn node_deleted(_node: &TfgridNode) {} + fn node_power_state_changed(_node: &TfgridNode) {} } pub struct PublicIpModifier; diff --git a/substrate-node/pallets/pallet-tfgrid/src/node.rs b/substrate-node/pallets/pallet-tfgrid/src/node.rs index 45656967f..a28fb15a0 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/node.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/node.rs @@ -335,11 +335,14 @@ impl Pallet { let mut node_power = NodePower::::get(node_id); - // if the power state is not correct => change it and emit event + // if the power state is different from what is set, change it and emit event if node_power.state != power_state { node_power.state = power_state.clone(); - NodePower::::insert(node_id, node_power); + + // Call node power state changed + T::NodeChanged::node_power_state_changed(&node); + Self::deposit_event(Event::PowerStateChanged { farm_id: node.farm_id, node_id, diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 0ba4764b1..a395657fe 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -330,6 +330,10 @@ impl ChangeNode for NodeChanged { SmartContractModule::node_deleted(node); Dao::node_deleted(node); } + + fn node_power_state_changed(node: &TfgridNode) { + SmartContractModule::node_power_state_changed(node); + } } pub struct PublicIpModifierType; @@ -397,7 +401,6 @@ impl pallet_smart_contract::Config for Runtime { type DistributionFrequency = DistributionFrequency; type GracePeriod = GracePeriod; type WeightInfo = pallet_smart_contract::weights::SubstrateWeight; - type NodeChanged = NodeChanged; type PublicIpModifier = PublicIpModifierType; type AuthorityId = pallet_smart_contract::crypto::AuthId; type Call = RuntimeCall; @@ -467,7 +470,6 @@ impl pallet_dao::Config for Runtime { type Proposal = RuntimeCall; type MotionDuration = DaoMotionDuration; type Tfgrid = TfgridModule; - type NodeChanged = NodeChanged; type WeightInfo = pallet_dao::weights::SubstrateWeight; type MinVetos = MinVetos; } diff --git a/substrate-node/support/src/traits.rs b/substrate-node/support/src/traits.rs index c5907fdca..582ea3cfa 100644 --- a/substrate-node/support/src/traits.rs +++ b/substrate-node/support/src/traits.rs @@ -9,6 +9,7 @@ pub trait ChangeNode { new_node: &super::types::Node, ); fn node_deleted(node: &super::types::Node); + fn node_power_state_changed(node: &super::types::Node); } pub trait PublicIpModifier { diff --git a/substrate-node/support/src/types.rs b/substrate-node/support/src/types.rs index 85404b465..e8837589f 100644 --- a/substrate-node/support/src/types.rs +++ b/substrate-node/support/src/types.rs @@ -238,8 +238,16 @@ pub struct NodePower { } impl NodePower { - pub fn is_down(&self) -> bool { - matches!(self.state, PowerState::Down(_)) || matches!(self.target, Power::Down) + pub fn is_standby(&self) -> bool { + matches!(self.state, PowerState::Down(_)) + } + + pub fn is_switched_to_standby(&self) -> bool { + matches!(self.target, Power::Down) + } + + pub fn is_standby_phase(&self) -> bool { + self.is_standby() || self.is_switched_to_standby() } } From c749b55c7c0c40ea58937d763d2f6fb5b3abe6c1 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Mon, 22 Jan 2024 10:18:13 -0300 Subject: [PATCH 19/44] fix(pallet-smart-contract): discount level calculation (#946) --- substrate-node/Cargo.lock | 8 ++++---- .../pallets/pallet-smart-contract/src/benchmarking.rs | 4 ++-- substrate-node/pallets/pallet-smart-contract/src/cost.rs | 5 +++-- substrate-node/pallets/pallet-smart-contract/src/tests.rs | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index fb072d4f1..02bab0c88 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -130,9 +130,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fde6067df7359f2d6335ec1a50c1f8f825801687d10da0cc4c6b08e3f6afd15" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -7035,9 +7035,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" +checksum = "3b187f0231d56fe41bfb12034819dd2bf336422a5866de41bc3fec4b2e3883e8" [[package]] name = "snap" diff --git a/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs b/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs index a66fb40f2..d19457f4a 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs @@ -305,7 +305,7 @@ benchmarks! { let contract = SmartContractModule::::contracts(contract_id).unwrap(); // Get contract cost before billing to take into account nu - let (cost, _) = contract.calculate_contract_cost_tft(balance_init_amount, elapsed_seconds).unwrap(); + let (cost, discount_level) = contract.calculate_contract_cost_tft(balance_init_amount, elapsed_seconds).unwrap(); }: _(RawOrigin::Signed(farmer), contract_id) verify { let lock = SmartContractModule::::contract_number_of_cylces_billed(contract_id); @@ -313,7 +313,7 @@ benchmarks! { let contract_bill = types::ContractBill { contract_id, timestamp: SmartContractModule::::get_current_timestamp_in_secs(), - discount_level: types::DiscountLevel::Gold, + discount_level, amount_billed: cost.saturated_into::(), }; assert_last_event::(Event::ContractBilled(contract_bill).into()); diff --git a/substrate-node/pallets/pallet-smart-contract/src/cost.rs b/substrate-node/pallets/pallet-smart-contract/src/cost.rs index c228ad16c..64686ac60 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/cost.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/cost.rs @@ -305,8 +305,9 @@ pub fn calculate_discount_tft( // calculate amount due on a monthly basis // first get the normalized amount per hour - let amount_due_hourly = U64F64::from_num(amount_due) * U64F64::from_num(seconds_elapsed) - / U64F64::from_num(SECS_PER_HOUR); + // amount_due / seconds_elapsed = amount_due_hourly / 3600 + let amount_due_hourly = U64F64::from_num(amount_due) * U64F64::from_num(SECS_PER_HOUR) + / U64F64::from_num(seconds_elapsed); // then we can infer the amount due monthly (30 days ish) let amount_due_monthly = (amount_due_hourly * 24 * 30).round().to_num::(); diff --git a/substrate-node/pallets/pallet-smart-contract/src/tests.rs b/substrate-node/pallets/pallet-smart-contract/src/tests.rs index 0ba94b1b0..bf32f510e 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/tests.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/tests.rs @@ -1766,7 +1766,7 @@ fn test_name_contract_billing() { let twin = TfgridModule::twins(twin_id).unwrap(); let balance = Balances::free_balance(&twin.account_id); let second_elapsed = BillingFrequency::get() * SECS_PER_BLOCK; - let (contract_cost, _) = contract + let (contract_cost, discount_level) = contract .calculate_contract_cost_tft(balance, second_elapsed) .unwrap(); @@ -1774,7 +1774,7 @@ fn test_name_contract_billing() { let contract_bill_event = types::ContractBill { contract_id, timestamp: 1628082066, - discount_level: types::DiscountLevel::Gold, + discount_level, amount_billed: contract_cost as u128, }; From 7a78a0f574b58c1a680b4c221aaddc57804cd4d3 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Tue, 23 Jan 2024 18:13:29 +0200 Subject: [PATCH 20/44] fix: retain old handler for expired withdraws (#947) --- bridge/tfchain_bridge/pkg/bridge/withdraw.go | 47 ++++++++++++++++++-- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/bridge/tfchain_bridge/pkg/bridge/withdraw.go b/bridge/tfchain_bridge/pkg/bridge/withdraw.go index e5c43afd3..a37ee2060 100644 --- a/bridge/tfchain_bridge/pkg/bridge/withdraw.go +++ b/bridge/tfchain_bridge/pkg/bridge/withdraw.go @@ -70,12 +70,51 @@ func (bridge *Bridge) handleWithdrawCreated(ctx context.Context, withdraw subpkg func (bridge *Bridge) handleWithdrawExpired(ctx context.Context, withdrawExpired subpkg.WithdrawExpiredEvent) error { logger := log.Logger.With().Str("trace_id", fmt.Sprint(withdrawExpired.ID)).Logger() - ok, source := withdrawExpired.Source.Unwrap() + ok, source := withdrawExpired.Source.Unwrap() // transfers from the previous runtime before 147 has no source address if !ok { - // log and skip ? FATAL ? - logger.Error().Msg("this should never be triggered unless this bridge release was deployed before the runtime 147 upgrade!") - return nil + // This path is intended solely for processing transfers that lack a source address + // and should be retained until the network has been verified to have no transfers from the previous runtime before 147. + + if err := bridge.wallet.CheckAccount(withdrawExpired.Target); err != nil { + logger.Warn(). + Str("event_action", "transfer_failed"). + Str("event_kind", "alert"). + Str("category", "transfer"). + Dict("metadata", zerolog.Dict(). + Str("reason", err.Error())). + Str("type", "burn"). + Msg("a withdraw failed with no way to refund!") + return bridge.subClient.RetrySetWithdrawExecuted(ctx, withdrawExpired.ID) + } + + signature, sequenceNumber, err := bridge.wallet.CreatePaymentAndReturnSignature(ctx, withdrawExpired.Target, withdrawExpired.Amount, withdrawExpired.ID) + if err != nil { + return err + } + log.Debug().Msgf("stellar account sequence number: %d", sequenceNumber) + + err = bridge.subClient.RetryProposeWithdrawOrAddSig(ctx, withdrawExpired.ID, withdrawExpired.Target, big.NewInt(int64(withdrawExpired.Amount)), signature, bridge.wallet.GetKeypair().Address(), sequenceNumber) + if err != nil { + return err + } + logger.Info(). + Str("event_action", "transfer_initiated"). + Str("event_kind", "event"). + Str("category", "transfer"). + Dict("metadata", zerolog.Dict(). + Str("type", "burn")). + Msg("a transfer has initiated") + logger.Info(). + Str("event_action", "withdraw_proposed"). + Str("event_kind", "event"). + Str("category", "withdraw"). + Dict("metadata", zerolog.Dict(). + Uint64("amount", withdrawExpired.Amount). + Str("tx_id", fmt.Sprint(withdrawExpired.ID)). + Str("to", withdrawExpired.Target)). + Msgf("a withdraw has proposed with the target stellar address of %s", withdrawExpired.Target) + return nil } // refundable path (starting from tfchain runtime 147) From 4f03e939361d49388a44a80db8fc9c3661964ac3 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Tue, 23 Jan 2024 18:13:43 +0200 Subject: [PATCH 21/44] Fix interface is nil not string error (#948) * fix: fix interface is nil not string err * fmt: remove extra whitespaces --- bridge/tfchain_bridge/pkg/bridge/refund.go | 3 +-- bridge/tfchain_bridge/pkg/logger/logger.go | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bridge/tfchain_bridge/pkg/bridge/refund.go b/bridge/tfchain_bridge/pkg/bridge/refund.go index 7efbcfb2b..9f36b9f47 100644 --- a/bridge/tfchain_bridge/pkg/bridge/refund.go +++ b/bridge/tfchain_bridge/pkg/bridge/refund.go @@ -2,7 +2,6 @@ package bridge import ( "context" - "fmt" "github.com/pkg/errors" "github.com/rs/zerolog" @@ -58,7 +57,7 @@ func (bridge *Bridge) handleRefundExpired(ctx context.Context, refundExpiredEven return err } - reason := fmt.Sprint(_logger.GetRefundReason(ctx)) + reason := _logger.GetRefundReason(ctx) logger.Info(). Str("event_action", "refund_proposed"). Str("event_kind", "event"). diff --git a/bridge/tfchain_bridge/pkg/logger/logger.go b/bridge/tfchain_bridge/pkg/logger/logger.go index 43e3201c9..e4b371818 100644 --- a/bridge/tfchain_bridge/pkg/logger/logger.go +++ b/bridge/tfchain_bridge/pkg/logger/logger.go @@ -35,7 +35,11 @@ func WithRefundReason(ctx context.Context, reason string) context.Context { } func GetRefundReason(ctx context.Context) string { - return ctx.Value(refundReasonKey{}).(string) + reason := ctx.Value(refundReasonKey{}) + if reason == nil { + return "" + } + return reason.(string) } // TODO: event log interfaces From 3a9f332656b1b6244fee7e2f599f5605d07d7c29 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:20:32 -0300 Subject: [PATCH 22/44] feat(pallet-tfgrid): rework change power target on node (#934) --- clients/tfchain-client-go/utils.go | 1 + .../0019-rework_change_power_target.md | 15 ++++ substrate-node/pallets/pallet-dao/src/mock.rs | 10 ++- .../src/grid_contract.rs | 14 +++- .../pallets/pallet-smart-contract/src/mock.rs | 12 ++- .../pallet-smart-contract/src/tests.rs | 78 +++++++++++++++++++ .../pallets/pallet-tfgrid/src/lib.rs | 5 +- .../pallets/pallet-tfgrid/src/mock.rs | 21 +++-- .../pallets/pallet-tfgrid/src/node.rs | 27 +++---- substrate-node/runtime/src/lib.rs | 10 ++- substrate-node/support/src/traits.rs | 4 + 11 files changed, 170 insertions(+), 27 deletions(-) create mode 100644 docs/architecture/0019-rework_change_power_target.md diff --git a/clients/tfchain-client-go/utils.go b/clients/tfchain-client-go/utils.go index 1ec6c3356..1151a489d 100644 --- a/clients/tfchain-client-go/utils.go +++ b/clients/tfchain-client-go/utils.go @@ -243,6 +243,7 @@ var tfgridModuleErrors = []string{ "InvalidDocumentHashInput", "InvalidPublicConfig", "UnauthorizedToChangePowerTarget", + "NodeHasActiveContracts", "InvalidRelayAddress", "InvalidTimestampHint", } diff --git a/docs/architecture/0019-rework_change_power_target.md b/docs/architecture/0019-rework_change_power_target.md new file mode 100644 index 000000000..d30252fe8 --- /dev/null +++ b/docs/architecture/0019-rework_change_power_target.md @@ -0,0 +1,15 @@ +# 19. Rework change power target on node + +Date: 2024-01-09 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/924) for more details. + +## Decision + +Make sure that node has no active contracts on it to be able to change its `PowerTarget` to `Down` when calling `change_power_target()` extrinsic. diff --git a/substrate-node/pallets/pallet-dao/src/mock.rs b/substrate-node/pallets/pallet-dao/src/mock.rs index a4fd93313..f11eac99a 100644 --- a/substrate-node/pallets/pallet-dao/src/mock.rs +++ b/substrate-node/pallets/pallet-dao/src/mock.rs @@ -17,7 +17,7 @@ use sp_runtime::{ BuildStorage, }; use sp_std::convert::{TryFrom, TryInto}; -use tfchain_support::traits::{ChangeNode, PublicIpModifier}; +use tfchain_support::traits::{ChangeNode, NodeActiveContracts, PublicIpModifier}; use tfchain_support::types::PublicIP; type Block = frame_system::mocking::MockBlock; @@ -94,6 +94,13 @@ impl PublicIpModifier for PublicIpModifierType { fn ip_removed(_ip: &PublicIP) {} } +pub struct NodeActiveContractsType; +impl NodeActiveContracts for NodeActiveContractsType { + fn node_has_no_active_contracts(_node_id: u32) -> bool { + true + } +} + use crate::weights; impl pallet_dao::pallet::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; @@ -132,6 +139,7 @@ impl pallet_tfgrid::Config for TestRuntime { type WeightInfo = pallet_tfgrid::weights::SubstrateWeight; type NodeChanged = NodeChanged; type PublicIpModifier = PublicIpModifierType; + type NodeActiveContracts = NodeActiveContractsType; type TermsAndConditions = TestTermsAndConditions; type FarmName = TestFarmName; type MaxFarmNameLength = MaxFarmNameLength; diff --git a/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs b/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs index c6ef076d9..e8bee251e 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs @@ -9,7 +9,7 @@ use pallet_tfgrid::pallet::{InterfaceOf, LocationOf, SerialNumberOf, TfgridNode} use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use sp_std::{marker::PhantomData, vec, vec::Vec}; use tfchain_support::{ - traits::{ChangeNode, PublicIpModifier}, + traits::{ChangeNode, NodeActiveContracts, PublicIpModifier}, types::PublicIP, }; @@ -315,7 +315,7 @@ impl Pallet { let rent_contract = Self::get_rent_contract(&contract)?; let active_node_contracts = ActiveNodeContracts::::get(rent_contract.node_id); ensure!( - active_node_contracts.len() == 0, + active_node_contracts.is_empty(), Error::::NodeHasActiveContracts ); } @@ -657,8 +657,7 @@ impl Pallet { // Make sure there is no active node or rent contract on this node ensure!( - ActiveRentContractForNode::::get(node_id).is_none() - && ActiveNodeContracts::::get(&node_id).is_empty(), + Self::node_has_no_active_contracts(node_id), Error::::NodeHasActiveContracts ); @@ -735,6 +734,13 @@ impl ChangeNode, InterfaceOf, SerialNumberOf> for } } +impl NodeActiveContracts for Pallet { + fn node_has_no_active_contracts(node_id: u32) -> bool { + ActiveNodeContracts::::get(node_id).is_empty() + && ActiveRentContractForNode::::get(node_id).is_none() + } +} + /// A Name Contract Name. #[derive(Encode, Decode, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] diff --git a/substrate-node/pallets/pallet-smart-contract/src/mock.rs b/substrate-node/pallets/pallet-smart-contract/src/mock.rs index a970dbf30..e19775bb9 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/mock.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/mock.rs @@ -46,7 +46,7 @@ use sp_std::{ use std::{cell::RefCell, panic, thread}; use tfchain_support::{ constants::time::{MINUTES, SECS_PER_HOUR}, - traits::{ChangeNode, PublicIpModifier}, + traits::{ChangeNode, NodeActiveContracts, PublicIpModifier}, types::PublicIP, }; @@ -103,7 +103,7 @@ construct_runtime!( { System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - TfgridModule: pallet_tfgrid::{Pallet, Call, Storage, Event}, + TfgridModule: pallet_tfgrid::{Pallet, Call, Storage, Event, Error}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, SmartContractModule: pallet_smart_contract::{Pallet, Call, Storage, Event}, TFTPriceModule: pallet_tft_price::{Pallet, Call, Storage, Event}, @@ -195,6 +195,13 @@ impl PublicIpModifier for PublicIpModifierType { } } +pub struct NodeActiveContractsType; +impl NodeActiveContracts for NodeActiveContractsType { + fn node_has_no_active_contracts(node_id: u32) -> bool { + SmartContractModule::node_has_no_active_contracts(node_id) + } +} + parameter_types! { pub const MaxFarmNameLength: u32 = 40; pub const MaxInterfaceIpsLength: u32 = 5; @@ -222,6 +229,7 @@ impl pallet_tfgrid::Config for TestRuntime { type WeightInfo = pallet_tfgrid::weights::SubstrateWeight; type NodeChanged = NodeChanged; type PublicIpModifier = PublicIpModifierType; + type NodeActiveContracts = NodeActiveContractsType; type TermsAndConditions = TestTermsAndConditions; type FarmName = TestFarmName; type MaxFarmNameLength = MaxFarmNameLength; diff --git a/substrate-node/pallets/pallet-smart-contract/src/tests.rs b/substrate-node/pallets/pallet-smart-contract/src/tests.rs index bf32f510e..82ee73c40 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/tests.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/tests.rs @@ -74,6 +74,33 @@ fn test_create_node_contract_on_standby_node_fails() { }); } +#[test] +fn test_create_node_contract_and_switch_node_to_standby_fails() { + new_test_ext().execute_with(|| { + run_to_block(1, None); + prepare_farm_and_node(); + let node_id = 1; + + assert_ok!(SmartContractModule::create_node_contract( + RuntimeOrigin::signed(bob()), + node_id, + generate_deployment_hash(), + get_deployment_data(), + 0, + None + )); + + assert_noop!( + TfgridModule::change_power_target( + RuntimeOrigin::signed(alice()), + node_id, + tfchain_support::types::Power::Down + ), + pallet_tfgrid::Error::::NodeHasActiveContracts + ); + }); +} + #[test] fn test_create_node_contract_with_public_ips_works() { new_test_ext().execute_with(|| { @@ -688,6 +715,57 @@ fn test_create_rent_contract_on_standby_node_works() { }); } +#[test] +fn test_create_rent_contract_and_switch_node_to_standby_fails() { + new_test_ext().execute_with(|| { + run_to_block(1, None); + prepare_dedicated_farm_and_node(); + let node_id = 1; + + assert_ok!(SmartContractModule::create_rent_contract( + RuntimeOrigin::signed(bob()), + node_id, + None + )); + + assert_noop!( + TfgridModule::change_power_target( + RuntimeOrigin::signed(alice()), + node_id, + tfchain_support::types::Power::Down + ), + pallet_tfgrid::Error::::NodeHasActiveContracts + ); + }); +} + +#[test] +fn test_create_rent_contract_on_standby_node_and_wake_it_up_works() { + new_test_ext().execute_with(|| { + run_to_block(1, None); + prepare_dedicated_farm_and_node(); + let node_id = 1; + + assert_ok!(TfgridModule::change_power_target( + RuntimeOrigin::signed(alice()), + node_id, + tfchain_support::types::Power::Down, + )); + + assert_ok!(SmartContractModule::create_rent_contract( + RuntimeOrigin::signed(bob()), + node_id, + None + )); + + assert_ok!(TfgridModule::change_power_target( + RuntimeOrigin::signed(alice()), + node_id, + tfchain_support::types::Power::Up, + )); + }); +} + #[test] fn test_cancel_rent_contract_works() { new_test_ext().execute_with(|| { diff --git a/substrate-node/pallets/pallet-tfgrid/src/lib.rs b/substrate-node/pallets/pallet-tfgrid/src/lib.rs index 2888d5e14..1fea9fcca 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/lib.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/lib.rs @@ -41,7 +41,7 @@ pub mod pallet { use sp_std::{convert::TryInto, fmt::Debug, vec, vec::Vec}; use tfchain_support::{ resources::Resources, - traits::{ChangeNode, PublicIpModifier}, + traits::{ChangeNode, NodeActiveContracts, PublicIpModifier}, types::*, }; @@ -281,6 +281,8 @@ pub mod pallet { type PublicIpModifier: PublicIpModifier; + type NodeActiveContracts: NodeActiveContracts; + /// The type of terms and conditions. type TermsAndConditions: FullCodec + Debug @@ -567,6 +569,7 @@ pub mod pallet { InvalidPublicConfig, UnauthorizedToChangePowerTarget, + NodeHasActiveContracts, InvalidRelayAddress, InvalidTimestampHint, } diff --git a/substrate-node/pallets/pallet-tfgrid/src/mock.rs b/substrate-node/pallets/pallet-tfgrid/src/mock.rs index 0f7372fa8..39eaa9534 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/mock.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/mock.rs @@ -20,7 +20,10 @@ use sp_runtime::{ use sp_std::prelude::*; use hex; -use tfchain_support::types::PublicIP; +use tfchain_support::{ + traits::{ChangeNode, NodeActiveContracts, PublicIpModifier}, + types::PublicIP, +}; pub type Signature = MultiSignature; @@ -79,17 +82,24 @@ pub(crate) type Interface = crate::InterfaceOf; pub(crate) type TfgridNode = crate::TfgridNode; pub struct NodeChanged; -impl tfchain_support::traits::ChangeNode for NodeChanged { +impl ChangeNode for NodeChanged { fn node_changed(_old_node: Option<&TfgridNode>, _new_node: &TfgridNode) {} fn node_deleted(_node: &TfgridNode) {} fn node_power_state_changed(_node: &TfgridNode) {} } -pub struct PublicIpModifier; -impl tfchain_support::traits::PublicIpModifier for PublicIpModifier { +pub struct PublicIpModifierType; +impl PublicIpModifier for PublicIpModifierType { fn ip_removed(_ip: &PublicIP) {} } +pub struct NodeActiveContractsType; +impl NodeActiveContracts for NodeActiveContractsType { + fn node_has_no_active_contracts(_node_id: u32) -> bool { + true + } +} + parameter_types! { pub const MaxFarmNameLength: u32 = 40; pub const MaxInterfaceIpsLength: u32 = 5; @@ -116,7 +126,8 @@ impl Config for TestRuntime { type RestrictedOrigin = EnsureRoot; type WeightInfo = weights::SubstrateWeight; type NodeChanged = NodeChanged; - type PublicIpModifier = PublicIpModifier; + type PublicIpModifier = PublicIpModifierType; + type NodeActiveContracts = NodeActiveContractsType; type TermsAndConditions = TestTermsAndConditions; type FarmName = TestFarmName; type MaxFarmNameLength = MaxFarmNameLength; diff --git a/substrate-node/pallets/pallet-tfgrid/src/node.rs b/substrate-node/pallets/pallet-tfgrid/src/node.rs index a28fb15a0..2a219319b 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/node.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/node.rs @@ -13,7 +13,7 @@ use sp_std::marker::PhantomData; use sp_std::{vec, vec::Vec}; use tfchain_support::{ resources::Resources, - traits::ChangeNode, + traits::{ChangeNode, NodeActiveContracts}, types::{Interface, Node, NodeCertification, Power, PowerState, PublicConfig}, }; @@ -335,7 +335,7 @@ impl Pallet { let mut node_power = NodePower::::get(node_id); - // if the power state is different from what is set, change it and emit event + // If the power state is different from what is set, change it and emit event if node_power.state != power_state { node_power.state = power_state.clone(); NodePower::::insert(node_id, node_power); @@ -361,31 +361,32 @@ impl Pallet { let twin_id = TwinIdByAccountID::::get(account_id).ok_or(Error::::TwinNotExists)?; let node = Nodes::::get(node_id).ok_or(Error::::NodeNotExists)?; let farm = Farms::::get(node.farm_id).ok_or(Error::::FarmNotExists)?; - ensure!( - twin_id == farm.twin_id, - Error::::UnauthorizedToChangePowerTarget - ); + // Make sure only the farmer that owns this node can change the power target ensure!( - node.farm_id == farm.id, + twin_id == farm.twin_id, Error::::UnauthorizedToChangePowerTarget ); - Self::_change_power_target_on_node(node.id, node.farm_id, power_target); - - Ok(().into()) - } + // If power target is switched to Down, make sure there are no active contracts on node + if power_target == Power::Down { + ensure!( + T::NodeActiveContracts::node_has_no_active_contracts(node_id), + Error::::NodeHasActiveContracts + ); + } - fn _change_power_target_on_node(node_id: u32, farm_id: u32, power_target: Power) { let mut node_power = NodePower::::get(node_id); node_power.target = power_target.clone(); NodePower::::insert(node_id, &node_power); Self::deposit_event(Event::PowerTargetChanged { - farm_id, + farm_id: node.farm_id, node_id, power_target, }); + + Ok(().into()) } fn get_resources( diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index a395657fe..694786b73 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -28,7 +28,7 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use tfchain_support::{ constants::time::*, - traits::{ChangeNode, PublicIpModifier}, + traits::{ChangeNode, NodeActiveContracts, PublicIpModifier}, types::PublicIP, }; @@ -343,6 +343,13 @@ impl PublicIpModifier for PublicIpModifierType { } } +pub struct NodeActiveContractsType; +impl NodeActiveContracts for NodeActiveContractsType { + fn node_has_no_active_contracts(node_id: u32) -> bool { + SmartContractModule::node_has_no_active_contracts(node_id) + } +} + parameter_types! { pub const MaxFarmNameLength: u32 = 40; pub const MaxInterfaceIpsLength: u32 = 10; @@ -357,6 +364,7 @@ impl pallet_tfgrid::Config for Runtime { type WeightInfo = pallet_tfgrid::weights::SubstrateWeight; type NodeChanged = NodeChanged; type PublicIpModifier = SmartContractModule; + type NodeActiveContracts = NodeActiveContractsType; type TermsAndConditions = pallet_tfgrid::terms_cond::TermsAndConditions; type MaxFarmNameLength = MaxFarmNameLength; type MaxFarmPublicIps = MaxFarmPublicIps; diff --git a/substrate-node/support/src/traits.rs b/substrate-node/support/src/traits.rs index 582ea3cfa..0050c4bb2 100644 --- a/substrate-node/support/src/traits.rs +++ b/substrate-node/support/src/traits.rs @@ -15,3 +15,7 @@ pub trait ChangeNode { pub trait PublicIpModifier { fn ip_removed(ip: &PublicIP); } + +pub trait NodeActiveContracts { + fn node_has_no_active_contracts(node_id: u32) -> bool; +} From ea18a6e124561119e3bcafe628750718e6513224 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:20:57 -0300 Subject: [PATCH 23/44] chore: bump to version 2.7.0-rc4 (specVersion: 149) (#949) --- .../helm/tfchainactivationservice/Chart.yaml | 4 +-- activation-service/package.json | 2 +- .../chart/tfchainbridge/Chart.yaml | 4 +-- clients/tfchain-client-js/package.json | 2 +- scripts/package.json | 2 +- substrate-node/Cargo.lock | 26 +++++++++---------- substrate-node/Cargo.toml | 2 +- .../charts/substrate-node/Chart.yaml | 4 +-- substrate-node/runtime/src/lib.rs | 2 +- tools/fork-off-substrate/package.json | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/activation-service/helm/tfchainactivationservice/Chart.yaml b/activation-service/helm/tfchainactivationservice/Chart.yaml index 280219fd8..b1c8d0e1c 100644 --- a/activation-service/helm/tfchainactivationservice/Chart.yaml +++ b/activation-service/helm/tfchainactivationservice/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainactivationservice description: TFchain account activation funding service type: application -version: 2.7.0-rc3 -appVersion: '2.7.0-rc3' +version: 2.7.0-rc4 +appVersion: '2.7.0-rc4' diff --git a/activation-service/package.json b/activation-service/package.json index 3454b9dab..687e9b811 100644 --- a/activation-service/package.json +++ b/activation-service/package.json @@ -1,6 +1,6 @@ { "name": "substrate-funding-service", - "version": "2.7.0-rc3", + "version": "2.7.0-rc4", "description": "Substrate funding service", "main": "index.js", "scripts": { diff --git a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml index 342250c8b..4e3e46ed1 100644 --- a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml +++ b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainbridge description: Bridge for TFT between Tfchain Stellar type: application -version: 2.7.0-rc3 -appVersion: '2.7.0-rc3' +version: 2.7.0-rc4 +appVersion: '2.7.0-rc4' diff --git a/clients/tfchain-client-js/package.json b/clients/tfchain-client-js/package.json index b777d04d9..53b9f560a 100644 --- a/clients/tfchain-client-js/package.json +++ b/clients/tfchain-client-js/package.json @@ -1,6 +1,6 @@ { "name": "tfgrid-api-client", - "version": "2.7.0-rc3", + "version": "2.7.0-rc4", "description": "API client for the TF Grid", "main": "index.js", "scripts": { diff --git a/scripts/package.json b/scripts/package.json index 8e090023f..90090c230 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -1,6 +1,6 @@ { "name": "tfchain-js-scripts", - "version": "2.7.0-rc3", + "version": "2.7.0-rc4", "description": "scripts to fetch data / write data to tfchain", "main": "index.js", "scripts": { diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index 02bab0c88..238e2e959 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -4244,7 +4244,7 @@ dependencies = [ [[package]] name = "pallet-burning" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "frame-benchmarking", "frame-support", @@ -4279,7 +4279,7 @@ dependencies = [ [[package]] name = "pallet-dao" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "env_logger", "frame-benchmarking", @@ -4325,7 +4325,7 @@ dependencies = [ [[package]] name = "pallet-kvstore" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "frame-benchmarking", "frame-support", @@ -4358,7 +4358,7 @@ dependencies = [ [[package]] name = "pallet-runtime-upgrade" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "frame-support", "frame-system", @@ -4424,7 +4424,7 @@ dependencies = [ [[package]] name = "pallet-smart-contract" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "env_logger", "frame-benchmarking", @@ -4477,7 +4477,7 @@ dependencies = [ [[package]] name = "pallet-tfgrid" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "env_logger", "frame-benchmarking", @@ -4505,7 +4505,7 @@ dependencies = [ [[package]] name = "pallet-tft-bridge" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "frame-benchmarking", "frame-support", @@ -4523,7 +4523,7 @@ dependencies = [ [[package]] name = "pallet-tft-price" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "frame-benchmarking", "frame-support", @@ -4627,7 +4627,7 @@ dependencies = [ [[package]] name = "pallet-validator" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "frame-benchmarking", "frame-support", @@ -7996,7 +7996,7 @@ dependencies = [ [[package]] name = "substrate-validator-set" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "frame-benchmarking", "frame-support", @@ -8134,7 +8134,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "tfchain" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "clap", "frame-benchmarking", @@ -8180,7 +8180,7 @@ dependencies = [ [[package]] name = "tfchain-runtime" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "frame-benchmarking", "frame-executive", @@ -8234,7 +8234,7 @@ dependencies = [ [[package]] name = "tfchain-support" -version = "2.7.0-rc3" +version = "2.7.0-rc4" dependencies = [ "frame-support", "frame-system", diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index 0326ec791..1d5bcbc0d 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://threefold.io/" license-file = "LICENSE" readme = "README.md" repository = "https://github.com/threefoldtech/tfchain3" -version = "2.7.0-rc3" +version = "2.7.0-rc4" [workspace] members = [ diff --git a/substrate-node/charts/substrate-node/Chart.yaml b/substrate-node/charts/substrate-node/Chart.yaml index c5d269483..b7f75976b 100644 --- a/substrate-node/charts/substrate-node/Chart.yaml +++ b/substrate-node/charts/substrate-node/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: substrate-node description: Tfchain node type: application -version: 2.7.0-rc3 -appVersion: '2.7.0-rc3' +version: 2.7.0-rc4 +appVersion: '2.7.0-rc4' diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 694786b73..adcec67b0 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -151,7 +151,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("substrate-threefold"), impl_name: create_runtime_str!("substrate-threefold"), authoring_version: 1, - spec_version: 148, + spec_version: 149, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/tools/fork-off-substrate/package.json b/tools/fork-off-substrate/package.json index c2af09f30..935c976f0 100644 --- a/tools/fork-off-substrate/package.json +++ b/tools/fork-off-substrate/package.json @@ -1,6 +1,6 @@ { "name": "fork-off-substrate", - "version": "2.7.0-rc3", + "version": "2.7.0-rc4", "description": "This script allows bootstrapping a new substrate chain with the current state of a live chain", "main": "index.js", "scripts": { From f59ddc4a0eddebf566313b2be42a4dbe55aea6a5 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Wed, 24 Jan 2024 15:37:37 -0300 Subject: [PATCH 24/44] chore(bridge): go formatting (#950) --- bridge/tfchain_bridge/pkg/bridge/withdraw.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bridge/tfchain_bridge/pkg/bridge/withdraw.go b/bridge/tfchain_bridge/pkg/bridge/withdraw.go index a37ee2060..d55dc48c9 100644 --- a/bridge/tfchain_bridge/pkg/bridge/withdraw.go +++ b/bridge/tfchain_bridge/pkg/bridge/withdraw.go @@ -83,8 +83,8 @@ func (bridge *Bridge) handleWithdrawExpired(ctx context.Context, withdrawExpired Str("category", "transfer"). Dict("metadata", zerolog.Dict(). Str("reason", err.Error())). - Str("type", "burn"). - Msg("a withdraw failed with no way to refund!") + Str("type", "burn"). + Msg("a withdraw failed with no way to refund!") return bridge.subClient.RetrySetWithdrawExecuted(ctx, withdrawExpired.ID) } @@ -93,7 +93,7 @@ func (bridge *Bridge) handleWithdrawExpired(ctx context.Context, withdrawExpired return err } log.Debug().Msgf("stellar account sequence number: %d", sequenceNumber) - + err = bridge.subClient.RetryProposeWithdrawOrAddSig(ctx, withdrawExpired.ID, withdrawExpired.Target, big.NewInt(int64(withdrawExpired.Amount)), signature, bridge.wallet.GetKeypair().Address(), sequenceNumber) if err != nil { return err @@ -114,7 +114,7 @@ func (bridge *Bridge) handleWithdrawExpired(ctx context.Context, withdrawExpired Str("tx_id", fmt.Sprint(withdrawExpired.ID)). Str("to", withdrawExpired.Target)). Msgf("a withdraw has proposed with the target stellar address of %s", withdrawExpired.Target) - return nil + return nil } // refundable path (starting from tfchain runtime 147) From ca26776ca3d39ddf63bbe224e4f76b53f34132a3 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:17:01 -0300 Subject: [PATCH 25/44] feat(go-client): improve lint and test workflow (#951) --- .../020_lint_and_test_go_client.yaml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/020_lint_and_test_go_client.yaml b/.github/workflows/020_lint_and_test_go_client.yaml index 5d8362908..5694ef912 100644 --- a/.github/workflows/020_lint_and_test_go_client.yaml +++ b/.github/workflows/020_lint_and_test_go_client.yaml @@ -6,29 +6,28 @@ on: - clients/tfchain-client-go/** workflow_dispatch: -defaults: - run: - working-directory: clients/tfchain-client-go - jobs: lint: name: lint runs-on: ubuntu-latest timeout-minutes: 5 - steps: + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + with: + submodules: "true" + sparse-checkout: clients/tfchain-client-go + - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "1.20" + cache: false + # cache-dependency-path: clients/tfchain-client-go/go.sum id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v3.5.0 - with: - submodules: "true" - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v3.7.0 with: args: --timeout 3m --verbose working-directory: clients/tfchain-client-go @@ -44,4 +43,5 @@ jobs: - name: gofmt uses: Jerome1337/gofmt-action@v1.0.5 with: - gofmt-flags: "-l -d" \ No newline at end of file + gofmt-path: './clients/tfchain-client-go' + gofmt-flags: "-l -d" From 34604705d74566b69e28fccddd407f2eef020f82 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:17:38 -0300 Subject: [PATCH 26/44] feat(bridge): add lint and test workflow (#952) --- .../070_lint_and_test_go_bridge.yaml | 49 +++++++++++++++++++ bridge/tfchain_bridge/go.mod | 4 +- bridge/tfchain_bridge/main.go | 6 +-- bridge/tfchain_bridge/pkg/bridge/bridge.go | 6 +-- bridge/tfchain_bridge/pkg/bridge/mint.go | 4 +- bridge/tfchain_bridge/pkg/bridge/refund.go | 6 +-- bridge/tfchain_bridge/pkg/bridge/withdraw.go | 4 +- bridge/tfchain_bridge/pkg/stellar/stellar.go | 8 +-- 8 files changed, 69 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/070_lint_and_test_go_bridge.yaml diff --git a/.github/workflows/070_lint_and_test_go_bridge.yaml b/.github/workflows/070_lint_and_test_go_bridge.yaml new file mode 100644 index 000000000..41c6aad90 --- /dev/null +++ b/.github/workflows/070_lint_and_test_go_bridge.yaml @@ -0,0 +1,49 @@ +name: Lint Go bridge + +on: + push: + paths: + - bridge/tfchain_bridge/** + workflow_dispatch: + +jobs: + lint: + name: lint + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + with: + submodules: "true" + sparse-checkout: | + clients/tfchain-client-go + bridge/tfchain_bridge + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.20" + cache: false + # cache-dependency-path: bridge/tfchain_bridge/go.sum + id: go + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3.7.0 + with: + args: --timeout 3m --verbose + working-directory: bridge/tfchain_bridge + + - name: staticcheck + uses: dominikh/staticcheck-action@v1.3.0 + with: + version: "2022.1.3" + working-directory: bridge/tfchain_bridge + env: + GO111MODULE: on + + - name: gofmt + uses: Jerome1337/gofmt-action@v1.0.5 + with: + gofmt-path: './bridge/tfchain_bridge' + gofmt-flags: "-l -d" diff --git a/bridge/tfchain_bridge/go.mod b/bridge/tfchain_bridge/go.mod index 9e95a6ebb..da1ebb8a0 100644 --- a/bridge/tfchain_bridge/go.mod +++ b/bridge/tfchain_bridge/go.mod @@ -1,4 +1,4 @@ -module github.com/threefoldtech/tfchain_bridge +module github.com/threefoldtech/tfchain/bridge/tfchain_bridge go 1.17 @@ -52,4 +52,4 @@ require ( gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) -replace github.com/threefoldtech/tfchain/clients/tfchain-client-go => ../../clients/tfchain-client-go \ No newline at end of file +replace github.com/threefoldtech/tfchain/clients/tfchain-client-go => ../../clients/tfchain-client-go diff --git a/bridge/tfchain_bridge/main.go b/bridge/tfchain_bridge/main.go index c6d2a630b..f8f677567 100644 --- a/bridge/tfchain_bridge/main.go +++ b/bridge/tfchain_bridge/main.go @@ -9,9 +9,9 @@ import ( "github.com/rs/zerolog/log" flag "github.com/spf13/pflag" - "github.com/threefoldtech/tfchain_bridge/pkg" - "github.com/threefoldtech/tfchain_bridge/pkg/bridge" - "github.com/threefoldtech/tfchain_bridge/pkg/logger" + "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg" + "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg/bridge" + "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg/logger" ) func main() { diff --git a/bridge/tfchain_bridge/pkg/bridge/bridge.go b/bridge/tfchain_bridge/pkg/bridge/bridge.go index 28f17ab25..92c9d48d7 100644 --- a/bridge/tfchain_bridge/pkg/bridge/bridge.go +++ b/bridge/tfchain_bridge/pkg/bridge/bridge.go @@ -8,9 +8,9 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "github.com/threefoldtech/tfchain_bridge/pkg" - "github.com/threefoldtech/tfchain_bridge/pkg/stellar" - subpkg "github.com/threefoldtech/tfchain_bridge/pkg/substrate" + "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg" + "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg/stellar" + subpkg "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg/substrate" ) const ( diff --git a/bridge/tfchain_bridge/pkg/bridge/mint.go b/bridge/tfchain_bridge/pkg/bridge/mint.go index 9228f547f..244f001b8 100644 --- a/bridge/tfchain_bridge/pkg/bridge/mint.go +++ b/bridge/tfchain_bridge/pkg/bridge/mint.go @@ -10,9 +10,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" hProtocol "github.com/stellar/go/protocols/horizon" + "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg" + _logger "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg/logger" substrate "github.com/threefoldtech/tfchain/clients/tfchain-client-go" - "github.com/threefoldtech/tfchain_bridge/pkg" - _logger "github.com/threefoldtech/tfchain_bridge/pkg/logger" ) // mint handler for stellar diff --git a/bridge/tfchain_bridge/pkg/bridge/refund.go b/bridge/tfchain_bridge/pkg/bridge/refund.go index 9f36b9f47..f713595ac 100644 --- a/bridge/tfchain_bridge/pkg/bridge/refund.go +++ b/bridge/tfchain_bridge/pkg/bridge/refund.go @@ -7,9 +7,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" hProtocol "github.com/stellar/go/protocols/horizon" - "github.com/threefoldtech/tfchain_bridge/pkg" - _logger "github.com/threefoldtech/tfchain_bridge/pkg/logger" - subpkg "github.com/threefoldtech/tfchain_bridge/pkg/substrate" + "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg" + _logger "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg/logger" + subpkg "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg/substrate" ) // refund handler for stellar diff --git a/bridge/tfchain_bridge/pkg/bridge/withdraw.go b/bridge/tfchain_bridge/pkg/bridge/withdraw.go index d55dc48c9..55c4a5450 100644 --- a/bridge/tfchain_bridge/pkg/bridge/withdraw.go +++ b/bridge/tfchain_bridge/pkg/bridge/withdraw.go @@ -9,9 +9,9 @@ import ( "github.com/centrifuge/go-substrate-rpc-client/v4/types" "github.com/rs/zerolog" "github.com/rs/zerolog/log" + "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg" + subpkg "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg/substrate" substrate "github.com/threefoldtech/tfchain/clients/tfchain-client-go" - "github.com/threefoldtech/tfchain_bridge/pkg" - subpkg "github.com/threefoldtech/tfchain_bridge/pkg/substrate" ) func (bridge *Bridge) handleWithdrawCreated(ctx context.Context, withdraw subpkg.WithdrawCreatedEvent) error { diff --git a/bridge/tfchain_bridge/pkg/stellar/stellar.go b/bridge/tfchain_bridge/pkg/stellar/stellar.go index 4c9c1cb21..b498e02a2 100644 --- a/bridge/tfchain_bridge/pkg/stellar/stellar.go +++ b/bridge/tfchain_bridge/pkg/stellar/stellar.go @@ -21,8 +21,8 @@ import ( horizoneffects "github.com/stellar/go/protocols/horizon/effects" "github.com/stellar/go/protocols/horizon/operations" "github.com/stellar/go/txnbuild" + "github.com/threefoldtech/tfchain/bridge/tfchain_bridge/pkg" substrate "github.com/threefoldtech/tfchain/clients/tfchain-client-go" - "github.com/threefoldtech/tfchain_bridge/pkg" ) const ( @@ -42,6 +42,8 @@ type StellarWallet struct { sequenceNumber int64 } +type TraceIdKey struct{} + func NewStellarWallet(ctx context.Context, config *pkg.StellarConfig) (*StellarWallet, error) { kp, err := keypair.ParseFull(config.StellarSeed) @@ -93,7 +95,7 @@ func (w *StellarWallet) CreatePaymentAndReturnSignature(ctx context.Context, tar } func (w *StellarWallet) CreatePaymentWithSignaturesAndSubmit(ctx context.Context, target string, amount uint64, txHash string, signatures []substrate.StellarSignature, sequenceNumber int64) error { - ctx_with_trace_id := context.WithValue(ctx, "trace_id", txHash) + ctx_with_trace_id := context.WithValue(ctx, TraceIdKey{}, txHash) txnBuild, err := w.generatePaymentOperation(amount, target, sequenceNumber) if err != nil { @@ -122,7 +124,7 @@ func (w *StellarWallet) CreatePaymentWithSignaturesAndSubmit(ctx context.Context } func (w *StellarWallet) CreateRefundPaymentWithSignaturesAndSubmit(ctx context.Context, target string, amount uint64, txHash string, signatures []substrate.StellarSignature, sequenceNumber int64) error { - ctx_with_trace_id := context.WithValue(ctx, "trace_id", txHash) + ctx_with_trace_id := context.WithValue(ctx, TraceIdKey{}, txHash) txnBuild, err := w.generatePaymentOperation(amount, target, sequenceNumber) if err != nil { return err From f5262a58319be3af458f188e56332aed71c2be69 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:13:53 -0300 Subject: [PATCH 27/44] doc(try_runtime): update try_runtime.md internal ips (#957) --- docs/misc/try_runtime.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/misc/try_runtime.md b/docs/misc/try_runtime.md index 92ea510a2..5951abd10 100644 --- a/docs/misc/try_runtime.md +++ b/docs/misc/try_runtime.md @@ -2,17 +2,28 @@ List of available endpoints for our networks: -- Devnet: 10.10.0.44 -- QAnet: 10.10.0.43 +- Devnet: 10.10.0.40 +- QAnet: 10.10.0.42 - Testnet: 10.10.0.100 - Mainnet: 10.10.0.154 -(If you are not in lochristi office you probably need vpn to reach to ips) +(If you are not in Lochristi office you probably need VPN to reach to ips) ## Select a network you wish to try the runtime upgrade upon -Now go the release you want to test with try-runtime and compile as following: +Now select the release you want to test with `try-runtime` and follow instructions [here](https://paritytech.github.io/try-runtime-cli/try_runtime/). +Example of commands sequence for running migrations of a given runtime on top of Devnet live state: ```sh -cargo run --release --features=try-runtime try-runtime --runtime ./target/release/wbuild/tfchain-runtime/tfchain_runtime.compact.wasm --chain chainspecs/NETWORK/chainSpecRaw.json on-runtime-upgrade live --uri NETWORK_URL +# Install try-runtime latest version (recommended for local development) +cargo install --git https://github.com/paritytech/try-runtime-cli --locked +``` +```sh +# Compile substrate node +cd substrate-node +cargo build --features try-runtime --release +``` +```sh +# Run the runtime migrations on top of Devnet live state +try-runtime --runtime ./target/release/wbuild/tfchain-runtime/tfchain_runtime.compact.compressed.wasm on-runtime-upgrade live --uri ws://10.10.0.40:9944 ``` From a0d30d08c5208b9d298ca7cd43e534cda3ce7d0a Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:17:34 -0300 Subject: [PATCH 28/44] feat(benchmark): create workflow for generating benchmark weights (#868) --- .../060_generate_benchmark_weights.yml | 74 ++++++++++++++++++ .../workflows/080_check_benchmark_weights.yml | 77 +++++++++++++++++++ substrate-node/.maintain/benchmark.sh | 18 ++--- substrate-node/Cargo.toml | 10 +++ .../pallets/pallet-runtime-upgrade/src/lib.rs | 4 +- substrate-node/runtime/src/lib.rs | 3 +- 6 files changed, 175 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/060_generate_benchmark_weights.yml create mode 100644 .github/workflows/080_check_benchmark_weights.yml diff --git a/.github/workflows/060_generate_benchmark_weights.yml b/.github/workflows/060_generate_benchmark_weights.yml new file mode 100644 index 000000000..872ae8712 --- /dev/null +++ b/.github/workflows/060_generate_benchmark_weights.yml @@ -0,0 +1,74 @@ +name: Generate benchmark weights + +on: + workflow_dispatch: + +jobs: + generate-benchmark-weights: + runs-on: [self-hosted, tfchainrunner01] + container: + image: threefolddev/tfchain:4 + env: + DEBIAN_FRONTEND: noninteractive + PATH: /root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin + RUSTUP_HOME: /root/.rustup + CARGO_HOME: /root/.cargo + + steps: + - name: Fail if branch is main + if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/development' + run: | + echo "This workflow should not be triggered with workflow_dispatch on main branch" + exit 1 + + - name: Checkout the repo + uses: actions/checkout@v3 + + - name: Chown user + run: | + chown -R $USER:$USER $GITHUB_WORKSPACE + + - name: Cache build + uses: actions/cache@v3 + timeout-minutes: 6 + continue-on-error: true + with: + path: | + /root/.cargo/bin/ + /root/.cargo/registry/index/ + /root/.cargo/registry/cache/ + /root/.cargo/git/db/ + substrate-node/target/ + key: ${{ runner.os }}-tfchain-build-cache-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-tfchain-build-cache + + - name: Build + run: | + cd substrate-node + cargo build --profile=production --features runtime-benchmarks + + - name: Run benchmarking + run: | + cd substrate-node + for weights_rs_file in ./pallets/*/src/weights.rs + do + rm $weights_rs_file + pal_name=$(awk -F'pallets/|/src' '{print $2}' <<< $weights_rs_file) + ./target/production/tfchain benchmark pallet \ + --chain=dev \ + --wasm-execution=compiled \ + --pallet="$pal_name" \ + --extrinsic="*" \ + --steps=50 \ + --repeat=20 \ + --heap-pages=409 \ + --output ./pallets/"$pal_name"/src/weights.rs \ + --template ./.maintain/frame-weight-template.hbs + done + + - name: Commit & Push changes + uses: actions-js/push@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + message: 'chore(pallets): update benchmark `weights.rs` files ${date}' + branch: ${{ github.ref_name }} diff --git a/.github/workflows/080_check_benchmark_weights.yml b/.github/workflows/080_check_benchmark_weights.yml new file mode 100644 index 000000000..06ba6edf4 --- /dev/null +++ b/.github/workflows/080_check_benchmark_weights.yml @@ -0,0 +1,77 @@ +name: Check benchmark weights + +on: + push: + branches-ignore: + - development + paths: + - '**.rs' + - 'substrate-node/pallets/**' + +jobs: + check-benchmark-weights: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout the repo + uses: actions/checkout@v3 + + - name: Get all rust files that have changed in pallets + id: pallets-changed-rust-files + uses: tj-actions/changed-files@v42 + with: + files: | + substrate-node/pallets/**/src/*.rs + + - name: Get all pallets with changes in src dir + id: pallets-changed-src-dir + uses: tj-actions/changed-files@v42 + with: + dir_names: "true" + files: | + substrate-node/pallets/**/src/*.rs + + - name: List all changed files + env: + ALL_CHANGED_FILES: ${{ steps.pallets-changed-rust-files.outputs.all_changed_files }} + run: | + for file in ${ALL_CHANGED_FILES}; do + echo "$file file was changed" + done + + - name: List all changed dir + env: + ALL_CHANGED_DIR: ${{ steps.pallets-changed-src-dir.outputs.all_changed_files }} + run: | + for dir in ${ALL_CHANGED_DIR}; do + echo "$dir has changes" + done + + - name: Run benchmarking + env: + ALL_CHANGED_PALLETS_SRC_DIR: ${{ steps.pallets-changed-src-dir.outputs.all_changed_files }} + ALL_CHANGED_PALLETS_FILES: ${{ steps.pallets-changed-rust-files.outputs.all_changed_files }} + run: | + count=0 + for pallet_src_dir in ${ALL_CHANGED_PALLETS_SRC_DIR}; do + echo "pallet src dir: $pallet_src_dir" + weights_file="$pallet_src_dir"/weights.rs + echo "weights file: $weights_file" + updated_weights=false + for changed_file in ${ALL_CHANGED_PALLETS_FILES}; do + if [ "$changed_file" = "$weights_file" ]; then + updated_weights=true + break + fi + done + if [ "$updated_weights" = false ] ; then + let "count=count+1" + fi + done + if [ "$count" -gt 0 ]; then + echo "Found changes on src rust file(s) for $count pallet(s) and respective weights.rs file(s) was not updated." + echo "Make sure to generate these files again if pallet logic has changed by running generate_benchmark_weights workflow on branch." + exit 1 + else + echo "Found changes on src rust file(s) and respective weights.rs file(s) was updated." + fi diff --git a/substrate-node/.maintain/benchmark.sh b/substrate-node/.maintain/benchmark.sh index 73abcbca1..dda20655c 100644 --- a/substrate-node/.maintain/benchmark.sh +++ b/substrate-node/.maintain/benchmark.sh @@ -3,37 +3,37 @@ echo "starting benchmark" echo "generating pallet-burning" -cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_burning --extrinsic="*" --steps=50 --repeat=20 --execution=wasm --heap-pages=409 --output ../pallets/pallet-burning/src/weights.rs --template ./frame-weight-template.hbs" +cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_burning --extrinsic="*" --steps=50 --repeat=20 --heap-pages=409 --output ../pallets/pallet-burning/src/weights.rs --template ./frame-weight-template.hbs" $cmd echo "generating pallet-dao" -cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_dao --extrinsic="*" --steps=50 --repeat=20 --execution=wasm --heap-pages=409 --output ../pallets/pallet-dao/src/weights.rs --template ./frame-weight-template.hbs" +cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_dao --extrinsic="*" --steps=50 --repeat=20 --heap-pages=409 --output ../pallets/pallet-dao/src/weights.rs --template ./frame-weight-template.hbs" $cmd echo "generating pallet-kvstore" -cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_kvstore --extrinsic="*" --steps=50 --repeat=20 --execution=wasm --heap-pages=409 --output ../pallets/pallet-kvstore/src/weights.rs --template ./frame-weight-template.hbs" +cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_kvstore --extrinsic="*" --steps=50 --repeat=20 --heap-pages=409 --output ../pallets/pallet-kvstore/src/weights.rs --template ./frame-weight-template.hbs" $cmd echo "generating pallet-smart-contract" -cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_smart_contract --extrinsic="*" --steps=50 --repeat=20 --execution=wasm --heap-pages=409 --output ../pallets/pallet-smart-contract/src/weights.rs --template ./frame-weight-template.hbs" +cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_smart_contract --extrinsic="*" --steps=50 --repeat=20 --heap-pages=409 --output ../pallets/pallet-smart-contract/src/weights.rs --template ./frame-weight-template.hbs" $cmd echo "generating pallet-tfgrid weights" -cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_tfgrid --extrinsic="*" --steps=50 --repeat=20 --execution=wasm --heap-pages=409 --output ../pallets/pallet-tfgrid/src/weights.rs --template ./frame-weight-template.hbs" +cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_tfgrid --extrinsic="*" --steps=50 --repeat=20 --heap-pages=409 --output ../pallets/pallet-tfgrid/src/weights.rs --template ./frame-weight-template.hbs" $cmd echo "generating pallet-tft-bridge" -cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_tft_bridge --extrinsic="*" --steps=50 --repeat=20 --execution=wasm --heap-pages=409 --output ../pallets/pallet-tft-bridge/src/weights.rs --template ./frame-weight-template.hbs" +cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_tft_bridge --extrinsic="*" --steps=50 --repeat=20 --heap-pages=409 --output ../pallets/pallet-tft-bridge/src/weights.rs --template ./frame-weight-template.hbs" $cmd echo "generating pallet-tft-price" -cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_tft_price --extrinsic="*" --steps=50 --repeat=20 --execution=wasm --heap-pages=409 --output ../pallets/pallet-tft-price/src/weights.rs --template ./frame-weight-template.hbs" +cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_tft_price --extrinsic="*" --steps=50 --repeat=20 --heap-pages=409 --output ../pallets/pallet-tft-price/src/weights.rs --template ./frame-weight-template.hbs" $cmd echo "generating pallet-validator" -cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_validator --extrinsic="*" --steps=50 --repeat=20 --execution=wasm --heap-pages=409 --output ../pallets/pallet-validator/src/weights.rs --template ./frame-weight-template.hbs" +cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=pallet_validator --extrinsic="*" --steps=50 --repeat=20 --heap-pages=409 --output ../pallets/pallet-validator/src/weights.rs --template ./frame-weight-template.hbs" $cmd echo "generating substrate-validator-set" -cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=validatorset --extrinsic="*" --steps=50 --repeat=20 --execution=wasm --heap-pages=409 --output ../pallets/substrate-validator-set/src/weights.rs --template ./frame-weight-template.hbs" +cmd="../target/release/tfchain benchmark pallet --chain=dev --pallet=substrate_validator_set --extrinsic="*" --steps=50 --repeat=20 --heap-pages=409 --output ../pallets/substrate-validator-set/src/weights.rs --template ./frame-weight-template.hbs" $cmd \ No newline at end of file diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index 1d5bcbc0d..cabf4190c 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -131,3 +131,13 @@ sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polka substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} substrate-frame-rpc-system = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} + +[profile.production] +inherits = "release" + +# Sacrifice compile speed for execution speed by using optimization flags: + +# https://doc.rust-lang.org/rustc/linker-plugin-lto.html +lto = "fat" +# https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units +codegen-units = 1 \ No newline at end of file diff --git a/substrate-node/pallets/pallet-runtime-upgrade/src/lib.rs b/substrate-node/pallets/pallet-runtime-upgrade/src/lib.rs index f18903ec6..7d29ea90b 100644 --- a/substrate-node/pallets/pallet-runtime-upgrade/src/lib.rs +++ b/substrate-node/pallets/pallet-runtime-upgrade/src/lib.rs @@ -6,6 +6,7 @@ pub use pallet::*; pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; + use frame_system::weights::WeightInfo; use sp_std::vec::Vec; #[pallet::pallet] @@ -16,13 +17,14 @@ pub mod pallet { pub trait Config: frame_system::Config { /// Origin for runtime upgrades type SetCodeOrigin: EnsureOrigin; + type WeightInfo: WeightInfo; } #[pallet::call] impl Pallet { #[pallet::call_index(0)] // Give same weight as set_code() wrapped extrinsic from frame_system - #[pallet::weight((T::BlockWeights::get().base_block, DispatchClass::Operational))] + #[pallet::weight((::WeightInfo::set_code(), DispatchClass::Operational))] pub fn set_code(origin: OriginFor, code: Vec) -> DispatchResultWithPostInfo { T::SetCodeOrigin::ensure_origin(origin)?; frame_system::Pallet::::set_code(frame_system::RawOrigin::Root.into(), code)?; diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index adcec67b0..8f7f96efa 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -673,6 +673,7 @@ type EnsureRootOrCouncilApproval = EitherOfDiverse< impl pallet_runtime_upgrade::Config for Runtime { type SetCodeOrigin = EnsureRootOrCouncilApproval; + type WeightInfo = (); } pub struct AuraAccountAdapter; @@ -805,7 +806,7 @@ mod benches { [pallet_burning, BurningModule] [pallet_dao, Dao] [pallet_kvstore, TFKVStore] - [validatorset, ValidatorSet] + [substrate_validator_set, ValidatorSet] [pallet_validator, Validator] [pallet_tft_bridge, TFTBridgeModule] // Substrate From f2a20ee3e965cb8897d7561c0dba0bf033924b31 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:10:40 -0300 Subject: [PATCH 29/44] chore(pallets): update benchmark `weights.rs` file for all pallets (#959) --- .../060_generate_benchmark_weights.yml | 8 +- .../pallets/pallet-burning/src/weights.rs | 42 +- .../pallets/pallet-dao/src/weights.rs | 214 +-- .../pallets/pallet-kvstore/src/weights.rs | 50 +- .../pallet-smart-contract/src/weights.rs | 1332 +++++++++-------- .../pallets/pallet-tfgrid/src/weights.rs | 1068 ++++++------- .../pallets/pallet-tft-bridge/src/weights.rs | 360 ++--- .../pallets/pallet-tft-price/src/weights.rs | 138 +- .../pallets/pallet-validator/src/weights.rs | 226 +-- .../substrate-validator-set/src/weights.rs | 96 +- 10 files changed, 1793 insertions(+), 1741 deletions(-) diff --git a/.github/workflows/060_generate_benchmark_weights.yml b/.github/workflows/060_generate_benchmark_weights.yml index 872ae8712..3d60c0b08 100644 --- a/.github/workflows/060_generate_benchmark_weights.yml +++ b/.github/workflows/060_generate_benchmark_weights.yml @@ -48,6 +48,7 @@ jobs: cargo build --profile=production --features runtime-benchmarks - name: Run benchmarking + shell: bash run: | cd substrate-node for weights_rs_file in ./pallets/*/src/weights.rs @@ -65,10 +66,15 @@ jobs: --output ./pallets/"$pal_name"/src/weights.rs \ --template ./.maintain/frame-weight-template.hbs done + + - name: Git config + run: | + git config --global --add safe.directory /__w/tfchain/tfchain + git status - name: Commit & Push changes uses: actions-js/push@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - message: 'chore(pallets): update benchmark `weights.rs` files ${date}' + message: 'chore: update benchmark `weights.rs` file for all pallets' branch: ${{ github.ref_name }} diff --git a/substrate-node/pallets/pallet-burning/src/weights.rs b/substrate-node/pallets/pallet-burning/src/weights.rs index 9d39aecf7..d98c3e26b 100644 --- a/substrate-node/pallets/pallet-burning/src/weights.rs +++ b/substrate-node/pallets/pallet-burning/src/weights.rs @@ -2,26 +2,26 @@ //! Autogenerated weights for pallet_burning //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ragnar`, CPU: `Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ../target/release/tfchain +// ./target/production/tfchain // benchmark // pallet // --chain=dev -// --pallet=pallet_burning +// --wasm-execution=compiled +// --pallet=pallet-burning // --extrinsic=* // --steps=50 // --repeat=20 -// --execution=wasm // --heap-pages=409 // --output -// ../pallets/pallet-burning/src/weights.rs +// ./pallets/pallet-burning/src/weights.rs // --template -// ./frame-weight-template.hbs +// ./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -39,14 +39,14 @@ pub trait WeightInfo { /// Weights for pallet_burning using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: BurningModule Burns (r:1 w:1) - /// Proof Skipped: BurningModule Burns (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `BurningModule::Burns` (r:1 w:1) + /// Proof: `BurningModule::Burns` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn burn_tft() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 48_921_000 picoseconds. - Weight::from_parts(49_647_000, 1627) + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 42_280_000 picoseconds. + Weight::from_parts(42_982_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -54,15 +54,15 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: BurningModule Burns (r:1 w:1) - /// Proof Skipped: BurningModule Burns (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `BurningModule::Burns` (r:1 w:1) + /// Proof: `BurningModule::Burns` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn burn_tft() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 48_921_000 picoseconds. - Weight::from_parts(49_647_000, 1627) + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 42_280_000 picoseconds. + Weight::from_parts(42_982_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } -} \ No newline at end of file +} diff --git a/substrate-node/pallets/pallet-dao/src/weights.rs b/substrate-node/pallets/pallet-dao/src/weights.rs index f97d29ba3..0adb7f7bc 100644 --- a/substrate-node/pallets/pallet-dao/src/weights.rs +++ b/substrate-node/pallets/pallet-dao/src/weights.rs @@ -2,26 +2,26 @@ //! Autogenerated weights for pallet_dao //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ragnar`, CPU: `Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ../target/release/tfchain +// ./target/production/tfchain // benchmark // pallet // --chain=dev -// --pallet=pallet_dao +// --wasm-execution=compiled +// --pallet=pallet-dao // --extrinsic=* // --steps=50 // --repeat=20 -// --execution=wasm // --heap-pages=409 // --output -// ../pallets/pallet-dao/src/weights.rs +// ./pallets/pallet-dao/src/weights.rs // --template -// ./frame-weight-template.hbs +// ./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -42,77 +42,77 @@ pub trait WeightInfo { /// Weights for pallet_dao using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: CouncilMembership Members (r:1 w:0) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Dao ProposalOf (r:1 w:1) - /// Proof Skipped: Dao ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao ProposalCount (r:1 w:1) - /// Proof Skipped: Dao ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dao ProposalList (r:1 w:1) - /// Proof Skipped: Dao ProposalList (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dao Voting (r:0 w:1) - /// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao Proposals (r:0 w:1) - /// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:0) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Dao::ProposalOf` (r:1 w:1) + /// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::ProposalCount` (r:1 w:1) + /// Proof: `Dao::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dao::ProposalList` (r:1 w:1) + /// Proof: `Dao::ProposalList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Voting` (r:0 w:1) + /// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Proposals` (r:0 w:1) + /// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose() -> Weight { // Proof Size summary in bytes: - // Measured: `240` + // Measured: `208` // Estimated: `4687` - // Minimum execution time: 36_618_000 picoseconds. - Weight::from_parts(37_170_000, 4687) + // Minimum execution time: 60_124_000 picoseconds. + Weight::from_parts(61_897_000, 4687) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao Proposals (r:1 w:0) - /// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao Voting (r:1 w:1) - /// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:0) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Proposals` (r:1 w:0) + /// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Voting` (r:1 w:1) + /// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:0) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) fn vote() -> Weight { // Proof Size summary in bytes: // Measured: `979` // Estimated: `4444` - // Minimum execution time: 43_016_000 picoseconds. - Weight::from_parts(43_672_000, 4444) + // Minimum execution time: 35_097_000 picoseconds. + Weight::from_parts(35_647_000, 4444) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: CouncilMembership Members (r:1 w:0) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Dao Proposals (r:1 w:0) - /// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao Voting (r:1 w:1) - /// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:0) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Dao::Proposals` (r:1 w:0) + /// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Voting` (r:1 w:1) + /// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn veto() -> Weight { // Proof Size summary in bytes: - // Measured: `519` + // Measured: `487` // Estimated: `4687` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(31_599_000, 4687) + // Minimum execution time: 25_068_000 picoseconds. + Weight::from_parts(25_618_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: CouncilMembership Members (r:1 w:0) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Dao Voting (r:1 w:1) - /// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao ProposalList (r:1 w:1) - /// Proof Skipped: Dao ProposalList (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dao Proposals (r:0 w:1) - /// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao ProposalOf (r:0 w:1) - /// Proof Skipped: Dao ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:0) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Dao::Voting` (r:1 w:1) + /// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::ProposalList` (r:1 w:1) + /// Proof: `Dao::ProposalList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Proposals` (r:0 w:1) + /// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::ProposalOf` (r:0 w:1) + /// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close() -> Weight { // Proof Size summary in bytes: - // Measured: `501` + // Measured: `469` // Estimated: `4687` - // Minimum execution time: 40_325_000 picoseconds. - Weight::from_parts(43_227_000, 4687) + // Minimum execution time: 34_275_000 picoseconds. + Weight::from_parts(34_786_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -120,78 +120,78 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: CouncilMembership Members (r:1 w:0) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Dao ProposalOf (r:1 w:1) - /// Proof Skipped: Dao ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao ProposalCount (r:1 w:1) - /// Proof Skipped: Dao ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dao ProposalList (r:1 w:1) - /// Proof Skipped: Dao ProposalList (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dao Voting (r:0 w:1) - /// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao Proposals (r:0 w:1) - /// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:0) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Dao::ProposalOf` (r:1 w:1) + /// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::ProposalCount` (r:1 w:1) + /// Proof: `Dao::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dao::ProposalList` (r:1 w:1) + /// Proof: `Dao::ProposalList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Voting` (r:0 w:1) + /// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Proposals` (r:0 w:1) + /// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose() -> Weight { // Proof Size summary in bytes: - // Measured: `240` + // Measured: `208` // Estimated: `4687` - // Minimum execution time: 36_618_000 picoseconds. - Weight::from_parts(37_170_000, 4687) + // Minimum execution time: 60_124_000 picoseconds. + Weight::from_parts(61_897_000, 4687) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao Proposals (r:1 w:0) - /// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao Voting (r:1 w:1) - /// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:0) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Proposals` (r:1 w:0) + /// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Voting` (r:1 w:1) + /// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:0) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) fn vote() -> Weight { // Proof Size summary in bytes: // Measured: `979` // Estimated: `4444` - // Minimum execution time: 43_016_000 picoseconds. - Weight::from_parts(43_672_000, 4444) + // Minimum execution time: 35_097_000 picoseconds. + Weight::from_parts(35_647_000, 4444) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: CouncilMembership Members (r:1 w:0) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Dao Proposals (r:1 w:0) - /// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao Voting (r:1 w:1) - /// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:0) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Dao::Proposals` (r:1 w:0) + /// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Voting` (r:1 w:1) + /// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn veto() -> Weight { // Proof Size summary in bytes: - // Measured: `519` + // Measured: `487` // Estimated: `4687` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(31_599_000, 4687) + // Minimum execution time: 25_068_000 picoseconds. + Weight::from_parts(25_618_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: CouncilMembership Members (r:1 w:0) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Dao Voting (r:1 w:1) - /// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao ProposalList (r:1 w:1) - /// Proof Skipped: Dao ProposalList (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dao Proposals (r:0 w:1) - /// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao ProposalOf (r:0 w:1) - /// Proof Skipped: Dao ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:0) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Dao::Voting` (r:1 w:1) + /// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::ProposalList` (r:1 w:1) + /// Proof: `Dao::ProposalList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dao::Proposals` (r:0 w:1) + /// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::ProposalOf` (r:0 w:1) + /// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close() -> Weight { // Proof Size summary in bytes: - // Measured: `501` + // Measured: `469` // Estimated: `4687` - // Minimum execution time: 40_325_000 picoseconds. - Weight::from_parts(43_227_000, 4687) + // Minimum execution time: 34_275_000 picoseconds. + Weight::from_parts(34_786_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } -} \ No newline at end of file +} diff --git a/substrate-node/pallets/pallet-kvstore/src/weights.rs b/substrate-node/pallets/pallet-kvstore/src/weights.rs index 664d718a7..2508659b7 100644 --- a/substrate-node/pallets/pallet-kvstore/src/weights.rs +++ b/substrate-node/pallets/pallet-kvstore/src/weights.rs @@ -2,26 +2,26 @@ //! Autogenerated weights for pallet_kvstore //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ragnar`, CPU: `Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ../target/release/tfchain +// ./target/production/tfchain // benchmark // pallet // --chain=dev -// --pallet=pallet_kvstore +// --wasm-execution=compiled +// --pallet=pallet-kvstore // --extrinsic=* // --steps=50 // --repeat=20 -// --execution=wasm // --heap-pages=409 // --output -// ../pallets/pallet-kvstore/src/weights.rs +// ./pallets/pallet-kvstore/src/weights.rs // --template -// ./frame-weight-template.hbs +// ./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -40,24 +40,24 @@ pub trait WeightInfo { /// Weights for pallet_kvstore using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: TFKVStore TFKVStore (r:0 w:1) - /// Proof Skipped: TFKVStore TFKVStore (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFKVStore::TFKVStore` (r:0 w:1) + /// Proof: `TFKVStore::TFKVStore` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 15_031_000 picoseconds. - Weight::from_parts(15_410_000, 0) + // Minimum execution time: 8_647_000 picoseconds. + Weight::from_parts(11_722_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TFKVStore TFKVStore (r:1 w:1) - /// Proof Skipped: TFKVStore TFKVStore (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFKVStore::TFKVStore` (r:1 w:1) + /// Proof: `TFKVStore::TFKVStore` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delete() -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3611` - // Minimum execution time: 23_038_000 picoseconds. - Weight::from_parts(23_587_000, 3611) + // Minimum execution time: 20_228_000 picoseconds. + Weight::from_parts(21_210_000, 3611) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -65,25 +65,25 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: TFKVStore TFKVStore (r:0 w:1) - /// Proof Skipped: TFKVStore TFKVStore (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFKVStore::TFKVStore` (r:0 w:1) + /// Proof: `TFKVStore::TFKVStore` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 15_031_000 picoseconds. - Weight::from_parts(15_410_000, 0) + // Minimum execution time: 8_647_000 picoseconds. + Weight::from_parts(11_722_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TFKVStore TFKVStore (r:1 w:1) - /// Proof Skipped: TFKVStore TFKVStore (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFKVStore::TFKVStore` (r:1 w:1) + /// Proof: `TFKVStore::TFKVStore` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delete() -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3611` - // Minimum execution time: 23_038_000 picoseconds. - Weight::from_parts(23_587_000, 3611) + // Minimum execution time: 20_228_000 picoseconds. + Weight::from_parts(21_210_000, 3611) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } -} \ No newline at end of file +} diff --git a/substrate-node/pallets/pallet-smart-contract/src/weights.rs b/substrate-node/pallets/pallet-smart-contract/src/weights.rs index cb4119f02..efdc05598 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/weights.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/weights.rs @@ -2,21 +2,21 @@ //! Autogenerated weights for pallet_smart_contract //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `R1-HP-ProBook-630-G8`, CPU: `11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ./target/release/tfchain +// ./target/production/tfchain // benchmark // pallet // --chain=dev -// --pallet=pallet_smart_contract +// --wasm-execution=compiled +// --pallet=pallet-smart-contract // --extrinsic=* // --steps=50 // --repeat=20 -// --execution=wasm // --heap-pages=409 // --output // ./pallets/pallet-smart-contract/src/weights.rs @@ -61,473 +61,494 @@ pub trait WeightInfo { /// Weights for pallet_smart_contract using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodePower (r:1 w:0) - /// Proof Skipped: TfgridModule NodePower (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule DedicatedNodesExtraFee (r:1 w:0) - /// Proof Skipped: SmartContractModule DedicatedNodesExtraFee (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNodeIDAndHash (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNodeIDAndHash (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractID (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule Contracts (r:0 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractBillingInformationByID (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractBillingInformationByID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractLock (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:0) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::DedicatedNodesExtraFee` (r:1 w:0) + /// Proof: `SmartContractModule::DedicatedNodesExtraFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNodeIDAndHash` (r:1 w:1) + /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::Contracts` (r:0 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:0 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_node_contract() -> Weight { // Proof Size summary in bytes: // Measured: `868` // Estimated: `4333` - // Minimum execution time: 119_629_000 picoseconds. - Weight::from_parts(124_124_000, 4333) + // Minimum execution time: 102_203_000 picoseconds. + Weight::from_parts(104_197_000, 4333) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNodeIDAndHash (r:0 w:2) - /// Proof Skipped: SmartContractModule ContractIDByNodeIDAndHash (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNodeIDAndHash` (r:0 w:2) + /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_node_contract() -> Weight { // Proof Size summary in bytes: // Measured: `892` // Estimated: `4357` - // Minimum execution time: 64_128_000 picoseconds. - Weight::from_parts(67_016_000, 4357) + // Minimum execution time: 26_891_000 picoseconds. + Weight::from_parts(27_472_000, 4357) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractBillingInformationByID (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractBillingInformationByID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule NodeContractResources (r:0 w:1) - /// Proof Skipped: SmartContractModule NodeContractResources (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNodeIDAndHash (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNodeIDAndHash (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:0 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::NodeContractResources` (r:0 w:1) + /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNodeIDAndHash` (r:0 w:1) + /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_contract() -> Weight { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 134_164_000 picoseconds. - Weight::from_parts(138_183_000, 4668) + // Minimum execution time: 60_284_000 picoseconds. + Weight::from_parts(61_346_000, 4668) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNameRegistration (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNameRegistration (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractID (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule Contracts (r:0 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractLock (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNameRegistration` (r:1 w:1) + /// Proof: `SmartContractModule::ContractIDByNameRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::Contracts` (r:0 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_name_contract() -> Weight { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3805` - // Minimum execution time: 54_724_000 picoseconds. - Weight::from_parts(57_496_000, 3805) + // Minimum execution time: 24_977_000 picoseconds. + Weight::from_parts(25_658_000, 3805) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNameRegistration (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNameRegistration (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNameRegistration` (r:0 w:1) + /// Proof: `SmartContractModule::ContractIDByNameRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_name_contract() -> Weight { // Proof Size summary in bytes: // Measured: `919` // Estimated: `4384` - // Minimum execution time: 101_753_000 picoseconds. - Weight::from_parts(105_128_000, 4384) + // Minimum execution time: 46_538_000 picoseconds. + Weight::from_parts(47_230_000, 4384) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule Contracts (r:1 w:0) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractBillingInformationByID (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractBillingInformationByID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::Contracts` (r:1 w:0) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_nru_reports() -> Weight { // Proof Size summary in bytes: // Measured: `1292` // Estimated: `4757` - // Minimum execution time: 77_126_000 picoseconds. - Weight::from_parts(79_222_000, 4757) + // Minimum execution time: 38_072_000 picoseconds. + Weight::from_parts(38_763_000, 4757) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule Contracts (r:1 w:0) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule NodeContractResources (r:0 w:1) - /// Proof Skipped: SmartContractModule NodeContractResources (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::Contracts` (r:1 w:0) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::NodeContractResources` (r:0 w:1) + /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) fn report_contract_resources() -> Weight { // Proof Size summary in bytes: // Measured: `771` // Estimated: `4236` - // Minimum execution time: 47_460_000 picoseconds. - Weight::from_parts(48_914_000, 4236) + // Minimum execution time: 23_194_000 picoseconds. + Weight::from_parts(23_485_000, 4236) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodePower (r:1 w:0) - /// Proof Skipped: TfgridModule NodePower (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractID (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule Contracts (r:0 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractLock (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::Contracts` (r:0 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_rent_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `868` - // Estimated: `4333` - // Minimum execution time: 78_140_000 picoseconds. - Weight::from_parts(81_100_000, 4333) - .saturating_add(T::DbWeight::get().reads(10_u64)) + // Measured: `776` + // Estimated: `4241` + // Minimum execution time: 34_876_000 picoseconds. + Weight::from_parts(35_417_000, 4241) + .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule DedicatedNodesExtraFee (r:1 w:0) - /// Proof Skipped: SmartContractModule DedicatedNodesExtraFee (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:0 w:1) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:0) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::DedicatedNodesExtraFee` (r:1 w:0) + /// Proof: `SmartContractModule::DedicatedNodesExtraFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:0 w:1) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_rent_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `1071` - // Estimated: `4536` - // Minimum execution time: 114_334_000 picoseconds. - Weight::from_parts(118_126_000, 4536) - .saturating_add(T::DbWeight::get().reads(10_u64)) + // Measured: `1284` + // Estimated: `4749` + // Minimum execution time: 60_275_000 picoseconds. + Weight::from_parts(60_955_000, 4749) + .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: SmartContractModule SolutionProviderID (r:1 w:1) - /// Proof Skipped: SmartContractModule SolutionProviderID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule SolutionProviders (r:0 w:1) - /// Proof Skipped: SmartContractModule SolutionProviders (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::SolutionProviderID` (r:1 w:1) + /// Proof: `SmartContractModule::SolutionProviderID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::SolutionProviders` (r:0 w:1) + /// Proof: `SmartContractModule::SolutionProviders` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_solution_provider() -> Weight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 24_361_000 picoseconds. - Weight::from_parts(25_532_000, 1522) + // Minimum execution time: 10_290_000 picoseconds. + Weight::from_parts(10_560_000, 1522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: SmartContractModule SolutionProviders (r:1 w:1) - /// Proof Skipped: SmartContractModule SolutionProviders (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::SolutionProviders` (r:1 w:1) + /// Proof: `SmartContractModule::SolutionProviders` (`max_values`: None, `max_size`: None, mode: `Measured`) fn approve_solution_provider() -> Weight { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3680` - // Minimum execution time: 28_651_000 picoseconds. - Weight::from_parts(29_486_000, 3680) + // Minimum execution time: 13_215_000 picoseconds. + Weight::from_parts(13_535_000, 3680) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:0) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:0) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:0) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::NodeContractResources` (r:1 w:0) + /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::AverageTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::AverageTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MinTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MaxTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn bill_contract_for_block() -> Weight { // Proof Size summary in bytes: - // Measured: `1216` - // Estimated: `4681` - // Minimum execution time: 56_839_000 picoseconds. - Weight::from_parts(58_569_000, 4681) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Measured: `1608` + // Estimated: `5073` + // Minimum execution time: 80_642_000 picoseconds. + Weight::from_parts(81_735_000, 5073) + .saturating_add(T::DbWeight::get().reads(16_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:2 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContractID (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContractID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:0 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:2 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContractID` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContractID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:0 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_create() -> Weight { // Proof Size summary in bytes: // Measured: `395` // Estimated: `6335` - // Minimum execution time: 40_172_000 picoseconds. - Weight::from_parts(41_719_000, 6335) + // Minimum execution time: 18_926_000 picoseconds. + Weight::from_parts(19_386_000, 6335) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_set_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 35_442_000 picoseconds. - Weight::from_parts(36_518_000, 3954) + // Minimum execution time: 16_892_000 picoseconds. + Weight::from_parts(17_293_000, 3954) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_set_fees() -> Weight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 34_663_000 picoseconds. - Weight::from_parts(35_371_000, 3954) + // Minimum execution time: 16_562_000 picoseconds. + Weight::from_parts(16_732_000, 3954) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_approve() -> Weight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 34_967_000 picoseconds. - Weight::from_parts(36_503_000, 3967) + // Minimum execution time: 16_821_000 picoseconds. + Weight::from_parts(17_292_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_reject() -> Weight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 36_210_000 picoseconds. - Weight::from_parts(37_826_000, 3967) + // Minimum execution time: 17_693_000 picoseconds. + Weight::from_parts(18_014_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_cancel() -> Weight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 33_426_000 picoseconds. - Weight::from_parts(34_600_000, 3967) + // Minimum execution time: 16_401_000 picoseconds. + Weight::from_parts(16_662_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: TfgridModule Twins (r:2 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::Twins` (r:2 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn service_contract_bill() -> Weight { // Proof Size summary in bytes: // Measured: `841` // Estimated: `6781` - // Minimum execution time: 61_064_000 picoseconds. - Weight::from_parts(64_267_000, 6781) + // Minimum execution time: 30_327_000 picoseconds. + Weight::from_parts(31_189_000, 6781) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule BillingFrequency (r:1 w:1) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:1) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn change_billing_frequency() -> Weight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 17_066_000 picoseconds. - Weight::from_parts(17_649_000, 1522) + // Minimum execution time: 7_855_000 picoseconds. + Weight::from_parts(8_076_000, 1522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule SolutionProviders (r:1 w:0) - /// Proof Skipped: SmartContractModule SolutionProviders (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::SolutionProviders` (r:1 w:0) + /// Proof: `SmartContractModule::SolutionProviders` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn attach_solution_provider_id() -> Weight { // Proof Size summary in bytes: // Measured: `971` // Estimated: `4436` - // Minimum execution time: 44_207_000 picoseconds. - Weight::from_parts(46_180_000, 4436) + // Minimum execution time: 22_222_000 picoseconds. + Weight::from_parts(22_462_000, 4436) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule DedicatedNodesExtraFee (r:0 w:1) - /// Proof Skipped: SmartContractModule DedicatedNodesExtraFee (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::DedicatedNodesExtraFee` (r:0 w:1) + /// Proof: `SmartContractModule::DedicatedNodesExtraFee` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_dedicated_node_extra_fee() -> Weight { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 46_778_000 picoseconds. - Weight::from_parts(48_978_000, 4198) + // Minimum execution time: 23_424_000 picoseconds. + Weight::from_parts(23_775_000, 4198) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractBillingInformationByID (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractBillingInformationByID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule NodeContractResources (r:0 w:1) - /// Proof Skipped: SmartContractModule NodeContractResources (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNodeIDAndHash (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNodeIDAndHash (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:0 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::NodeContractResources` (r:0 w:1) + /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNodeIDAndHash` (r:0 w:1) + /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_contract_collective() -> Weight { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 90_735_000 picoseconds. - Weight::from_parts(92_827_000, 4668) + // Minimum execution time: 58_861_000 picoseconds. + Weight::from_parts(59_413_000, 4668) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -535,474 +556,495 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodePower (r:1 w:0) - /// Proof Skipped: TfgridModule NodePower (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule DedicatedNodesExtraFee (r:1 w:0) - /// Proof Skipped: SmartContractModule DedicatedNodesExtraFee (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNodeIDAndHash (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNodeIDAndHash (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractID (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule Contracts (r:0 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractBillingInformationByID (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractBillingInformationByID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractLock (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:0) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::DedicatedNodesExtraFee` (r:1 w:0) + /// Proof: `SmartContractModule::DedicatedNodesExtraFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNodeIDAndHash` (r:1 w:1) + /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::Contracts` (r:0 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:0 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_node_contract() -> Weight { // Proof Size summary in bytes: // Measured: `868` // Estimated: `4333` - // Minimum execution time: 119_629_000 picoseconds. - Weight::from_parts(124_124_000, 4333) + // Minimum execution time: 102_203_000 picoseconds. + Weight::from_parts(104_197_000, 4333) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNodeIDAndHash (r:0 w:2) - /// Proof Skipped: SmartContractModule ContractIDByNodeIDAndHash (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNodeIDAndHash` (r:0 w:2) + /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_node_contract() -> Weight { // Proof Size summary in bytes: // Measured: `892` // Estimated: `4357` - // Minimum execution time: 64_128_000 picoseconds. - Weight::from_parts(67_016_000, 4357) + // Minimum execution time: 26_891_000 picoseconds. + Weight::from_parts(27_472_000, 4357) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractBillingInformationByID (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractBillingInformationByID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule NodeContractResources (r:0 w:1) - /// Proof Skipped: SmartContractModule NodeContractResources (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNodeIDAndHash (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNodeIDAndHash (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:0 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::NodeContractResources` (r:0 w:1) + /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNodeIDAndHash` (r:0 w:1) + /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_contract() -> Weight { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 134_164_000 picoseconds. - Weight::from_parts(138_183_000, 4668) + // Minimum execution time: 60_284_000 picoseconds. + Weight::from_parts(61_346_000, 4668) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNameRegistration (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNameRegistration (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractID (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule Contracts (r:0 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractLock (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNameRegistration` (r:1 w:1) + /// Proof: `SmartContractModule::ContractIDByNameRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::Contracts` (r:0 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_name_contract() -> Weight { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3805` - // Minimum execution time: 54_724_000 picoseconds. - Weight::from_parts(57_496_000, 3805) + // Minimum execution time: 24_977_000 picoseconds. + Weight::from_parts(25_658_000, 3805) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNameRegistration (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNameRegistration (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNameRegistration` (r:0 w:1) + /// Proof: `SmartContractModule::ContractIDByNameRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_name_contract() -> Weight { // Proof Size summary in bytes: // Measured: `919` // Estimated: `4384` - // Minimum execution time: 101_753_000 picoseconds. - Weight::from_parts(105_128_000, 4384) + // Minimum execution time: 46_538_000 picoseconds. + Weight::from_parts(47_230_000, 4384) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule Contracts (r:1 w:0) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractBillingInformationByID (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractBillingInformationByID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::Contracts` (r:1 w:0) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_nru_reports() -> Weight { // Proof Size summary in bytes: // Measured: `1292` // Estimated: `4757` - // Minimum execution time: 77_126_000 picoseconds. - Weight::from_parts(79_222_000, 4757) + // Minimum execution time: 38_072_000 picoseconds. + Weight::from_parts(38_763_000, 4757) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule Contracts (r:1 w:0) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule NodeContractResources (r:0 w:1) - /// Proof Skipped: SmartContractModule NodeContractResources (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::Contracts` (r:1 w:0) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::NodeContractResources` (r:0 w:1) + /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) fn report_contract_resources() -> Weight { // Proof Size summary in bytes: // Measured: `771` // Estimated: `4236` - // Minimum execution time: 47_460_000 picoseconds. - Weight::from_parts(48_914_000, 4236) + // Minimum execution time: 23_194_000 picoseconds. + Weight::from_parts(23_485_000, 4236) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodePower (r:1 w:0) - /// Proof Skipped: TfgridModule NodePower (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractID (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule Contracts (r:0 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractLock (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::Contracts` (r:0 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_rent_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `868` - // Estimated: `4333` - // Minimum execution time: 78_140_000 picoseconds. - Weight::from_parts(81_100_000, 4333) - .saturating_add(RocksDbWeight::get().reads(10_u64)) + // Measured: `776` + // Estimated: `4241` + // Minimum execution time: 34_876_000 picoseconds. + Weight::from_parts(35_417_000, 4241) + .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule DedicatedNodesExtraFee (r:1 w:0) - /// Proof Skipped: SmartContractModule DedicatedNodesExtraFee (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:0 w:1) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:0) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::DedicatedNodesExtraFee` (r:1 w:0) + /// Proof: `SmartContractModule::DedicatedNodesExtraFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:0 w:1) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_rent_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `1071` - // Estimated: `4536` - // Minimum execution time: 114_334_000 picoseconds. - Weight::from_parts(118_126_000, 4536) - .saturating_add(RocksDbWeight::get().reads(10_u64)) + // Measured: `1284` + // Estimated: `4749` + // Minimum execution time: 60_275_000 picoseconds. + Weight::from_parts(60_955_000, 4749) + .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: SmartContractModule SolutionProviderID (r:1 w:1) - /// Proof Skipped: SmartContractModule SolutionProviderID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule SolutionProviders (r:0 w:1) - /// Proof Skipped: SmartContractModule SolutionProviders (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::SolutionProviderID` (r:1 w:1) + /// Proof: `SmartContractModule::SolutionProviderID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::SolutionProviders` (r:0 w:1) + /// Proof: `SmartContractModule::SolutionProviders` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_solution_provider() -> Weight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 24_361_000 picoseconds. - Weight::from_parts(25_532_000, 1522) + // Minimum execution time: 10_290_000 picoseconds. + Weight::from_parts(10_560_000, 1522) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: SmartContractModule SolutionProviders (r:1 w:1) - /// Proof Skipped: SmartContractModule SolutionProviders (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::SolutionProviders` (r:1 w:1) + /// Proof: `SmartContractModule::SolutionProviders` (`max_values`: None, `max_size`: None, mode: `Measured`) fn approve_solution_provider() -> Weight { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3680` - // Minimum execution time: 28_651_000 picoseconds. - Weight::from_parts(29_486_000, 3680) + // Minimum execution time: 13_215_000 picoseconds. + Weight::from_parts(13_535_000, 3680) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:0) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:0) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:0) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:1 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::NodeContractResources` (r:1 w:0) + /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::AverageTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::AverageTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MinTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MaxTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn bill_contract_for_block() -> Weight { // Proof Size summary in bytes: - // Measured: `1216` - // Estimated: `4681` - // Minimum execution time: 56_839_000 picoseconds. - Weight::from_parts(58_569_000, 4681) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Measured: `1608` + // Estimated: `5073` + // Minimum execution time: 80_642_000 picoseconds. + Weight::from_parts(81_735_000, 5073) + .saturating_add(RocksDbWeight::get().reads(16_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:2 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContractID (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContractID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:0 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:2 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContractID` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContractID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:0 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_create() -> Weight { // Proof Size summary in bytes: // Measured: `395` // Estimated: `6335` - // Minimum execution time: 40_172_000 picoseconds. - Weight::from_parts(41_719_000, 6335) + // Minimum execution time: 18_926_000 picoseconds. + Weight::from_parts(19_386_000, 6335) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_set_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 35_442_000 picoseconds. - Weight::from_parts(36_518_000, 3954) + // Minimum execution time: 16_892_000 picoseconds. + Weight::from_parts(17_293_000, 3954) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_set_fees() -> Weight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 34_663_000 picoseconds. - Weight::from_parts(35_371_000, 3954) + // Minimum execution time: 16_562_000 picoseconds. + Weight::from_parts(16_732_000, 3954) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_approve() -> Weight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 34_967_000 picoseconds. - Weight::from_parts(36_503_000, 3967) + // Minimum execution time: 16_821_000 picoseconds. + Weight::from_parts(17_292_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_reject() -> Weight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 36_210_000 picoseconds. - Weight::from_parts(37_826_000, 3967) + // Minimum execution time: 17_693_000 picoseconds. + Weight::from_parts(18_014_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn service_contract_cancel() -> Weight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 33_426_000 picoseconds. - Weight::from_parts(34_600_000, 3967) + // Minimum execution time: 16_401_000 picoseconds. + Weight::from_parts(16_662_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ServiceContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ServiceContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: TfgridModule Twins (r:2 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ServiceContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ServiceContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::Twins` (r:2 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn service_contract_bill() -> Weight { // Proof Size summary in bytes: // Measured: `841` // Estimated: `6781` - // Minimum execution time: 61_064_000 picoseconds. - Weight::from_parts(64_267_000, 6781) + // Minimum execution time: 30_327_000 picoseconds. + Weight::from_parts(31_189_000, 6781) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule BillingFrequency (r:1 w:1) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:1) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn change_billing_frequency() -> Weight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 17_066_000 picoseconds. - Weight::from_parts(17_649_000, 1522) + // Minimum execution time: 7_855_000 picoseconds. + Weight::from_parts(8_076_000, 1522) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule SolutionProviders (r:1 w:0) - /// Proof Skipped: SmartContractModule SolutionProviders (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::SolutionProviders` (r:1 w:0) + /// Proof: `SmartContractModule::SolutionProviders` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn attach_solution_provider_id() -> Weight { // Proof Size summary in bytes: // Measured: `971` // Estimated: `4436` - // Minimum execution time: 44_207_000 picoseconds. - Weight::from_parts(46_180_000, 4436) + // Minimum execution time: 22_222_000 picoseconds. + Weight::from_parts(22_462_000, 4436) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule DedicatedNodesExtraFee (r:0 w:1) - /// Proof Skipped: SmartContractModule DedicatedNodesExtraFee (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::DedicatedNodesExtraFee` (r:0 w:1) + /// Proof: `SmartContractModule::DedicatedNodesExtraFee` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_dedicated_node_extra_fee() -> Weight { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 46_778_000 picoseconds. - Weight::from_parts(48_978_000, 4198) + // Minimum execution time: 23_424_000 picoseconds. + Weight::from_parts(23_775_000, 4198) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: SmartContractModule Contracts (r:1 w:1) - /// Proof Skipped: SmartContractModule Contracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:1) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: SmartContractModule ContractLock (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractLock (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:1 w:0) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule BillingFrequency (r:1 w:0) - /// Proof Skipped: SmartContractModule BillingFrequency (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractsToBillAt (r:1 w:1) - /// Proof Skipped: SmartContractModule ContractsToBillAt (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractBillingInformationByID (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractBillingInformationByID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule NodeContractResources (r:0 w:1) - /// Proof Skipped: SmartContractModule NodeContractResources (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ContractIDByNodeIDAndHash (r:0 w:1) - /// Proof Skipped: SmartContractModule ContractIDByNodeIDAndHash (max_values: None, max_size: None, mode: Measured) + /// Storage: `SmartContractModule::Contracts` (r:1 w:1) + /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) + /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) + /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) + /// Proof: `SmartContractModule::ContractsToBillAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:0 w:1) + /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::NodeContractResources` (r:0 w:1) + /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractIDByNodeIDAndHash` (r:0 w:1) + /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_contract_collective() -> Weight { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 90_735_000 picoseconds. - Weight::from_parts(92_827_000, 4668) + // Minimum execution time: 58_861_000 picoseconds. + Weight::from_parts(59_413_000, 4668) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } -} \ No newline at end of file +} diff --git a/substrate-node/pallets/pallet-tfgrid/src/weights.rs b/substrate-node/pallets/pallet-tfgrid/src/weights.rs index f01cfff92..1e883699a 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/weights.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/weights.rs @@ -2,21 +2,21 @@ //! Autogenerated weights for pallet_tfgrid //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `R1-HP-ProBook-630-G8`, CPU: `11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ./target/release/tfchain +// ./target/production/tfchain // benchmark // pallet // --chain=dev -// --pallet=pallet_tfgrid +// --wasm-execution=compiled +// --pallet=pallet-tfgrid // --extrinsic=* // --steps=50 // --repeat=20 -// --execution=wasm // --heap-pages=409 // --output // ./pallets/pallet-tfgrid/src/weights.rs @@ -70,960 +70,964 @@ pub trait WeightInfo { /// Weights for pallet_tfgrid using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: TfgridModule PalletVersion (r:0 w:1) - /// Proof Skipped: TfgridModule PalletVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::PalletVersion` (r:0 w:1) + /// Proof: `TfgridModule::PalletVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_storage_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_385_000 picoseconds. - Weight::from_parts(5_643_000, 0) + // Minimum execution time: 3_857_000 picoseconds. + Weight::from_parts(4_047_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule FarmID (r:1 w:1) - /// Proof Skipped: TfgridModule FarmID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule FarmIdByName (r:1 w:1) - /// Proof Skipped: TfgridModule FarmIdByName (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:0 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmIdByName` (r:1 w:1) + /// Proof: `TfgridModule::FarmIdByName` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmID` (r:1 w:1) + /// Proof: `TfgridModule::FarmID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:0 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_farm() -> Weight { // Proof Size summary in bytes: // Measured: `496` // Estimated: `3961` - // Minimum execution time: 31_394_000 picoseconds. - Weight::from_parts(32_172_000, 3961) + // Minimum execution time: 32_251_000 picoseconds. + Weight::from_parts(32_712_000, 3961) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule FarmIdByName (r:1 w:1) - /// Proof Skipped: TfgridModule FarmIdByName (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmIdByName` (r:1 w:2) + /// Proof: `TfgridModule::FarmIdByName` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_farm() -> Weight { // Proof Size summary in bytes: // Measured: `507` // Estimated: `3972` - // Minimum execution time: 33_504_000 picoseconds. - Weight::from_parts(34_515_000, 3972) + // Minimum execution time: 34_135_000 picoseconds. + Weight::from_parts(35_327_000, 3972) .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule FarmPayoutV2AddressByFarmID (r:0 w:1) - /// Proof Skipped: TfgridModule FarmPayoutV2AddressByFarmID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmPayoutV2AddressByFarmID` (r:0 w:1) + /// Proof: `TfgridModule::FarmPayoutV2AddressByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_stellar_payout_v2address() -> Weight { // Proof Size summary in bytes: // Measured: `453` // Estimated: `3918` - // Minimum execution time: 24_636_000 picoseconds. - Weight::from_parts(25_319_000, 3918) + // Minimum execution time: 18_865_000 picoseconds. + Weight::from_parts(25_378_000, 3918) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_farm_certification() -> Weight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 20_870_000 picoseconds. - Weight::from_parts(21_177_000, 3877) + // Minimum execution time: 13_105_000 picoseconds. + Weight::from_parts(13_406_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_farm_ip() -> Weight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 27_994_000 picoseconds. - Weight::from_parts(31_496_000, 4034) + // Minimum execution time: 17_734_000 picoseconds. + Weight::from_parts(18_165_000, 4034) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_farm_ip() -> Weight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 26_365_000 picoseconds. - Weight::from_parts(27_079_000, 4034) + // Minimum execution time: 16_922_000 picoseconds. + Weight::from_parts(17_473_000, 4034) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:1) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeID (r:1 w:1) - /// Proof Skipped: TfgridModule NodeID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: TfgridModule ConnectionPrice (r:1 w:0) - /// Proof Skipped: TfgridModule ConnectionPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule FarmingPoliciesMap (r:4 w:0) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodesByFarmID (r:1 w:1) - /// Proof Skipped: TfgridModule NodesByFarmID (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:1) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:0 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:1) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeID` (r:1 w:1) + /// Proof: `TfgridModule::NodeID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::ConnectionPrice` (r:1 w:0) + /// Proof: `TfgridModule::ConnectionPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:4 w:0) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodesByFarmID` (r:1 w:1) + /// Proof: `TfgridModule::NodesByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:1) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:0 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_node() -> Weight { // Proof Size summary in bytes: // Measured: `905` // Estimated: `11795` - // Minimum execution time: 71_884_000 picoseconds. - Weight::from_parts(74_159_000, 11795) + // Minimum execution time: 47_360_000 picoseconds. + Weight::from_parts(48_562_000, 11795) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:1) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:1) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_node() -> Weight { // Proof Size summary in bytes: // Measured: `661` // Estimated: `4126` - // Minimum execution time: 41_641_000 picoseconds. - Weight::from_parts(42_797_000, 4126) + // Minimum execution time: 27_062_000 picoseconds. + Weight::from_parts(27_723_000, 4126) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule FarmingPoliciesMap (r:4 w:0) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:4 w:0) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_node_certification() -> Weight { // Proof Size summary in bytes: // Measured: `956` // Estimated: `11846` - // Minimum execution time: 53_080_000 picoseconds. - Weight::from_parts(54_350_000, 11846) + // Minimum execution time: 34_295_000 picoseconds. + Weight::from_parts(35_096_000, 11846) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) fn report_uptime() -> Weight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 28_159_000 picoseconds. - Weight::from_parts(28_543_000, 3919) + // Minimum execution time: 18_635_000 picoseconds. + Weight::from_parts(19_006_000, 3919) .saturating_add(T::DbWeight::get().reads(4_u64)) } - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_node_public_config() -> Weight { // Proof Size summary in bytes: // Measured: `779` // Estimated: `4244` - // Minimum execution time: 37_090_000 picoseconds. - Weight::from_parts(38_269_000, 4244) + // Minimum execution time: 24_637_000 picoseconds. + Weight::from_parts(25_277_000, 4244) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodesByFarmID (r:1 w:1) - /// Proof Skipped: TfgridModule NodesByFarmID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:1) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodesByFarmID` (r:1 w:1) + /// Proof: `TfgridModule::NodesByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:1) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delete_node() -> Weight { // Proof Size summary in bytes: // Measured: `682` // Estimated: `4147` - // Minimum execution time: 40_802_000 picoseconds. - Weight::from_parts(41_890_000, 4147) + // Minimum execution time: 27_362_000 picoseconds. + Weight::from_parts(27_943_000, 4147) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule UsersTermsAndConditions (r:1 w:0) - /// Proof Skipped: TfgridModule UsersTermsAndConditions (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:1) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinID (r:1 w:1) - /// Proof Skipped: TfgridModule TwinID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:0 w:1) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::UsersTermsAndConditions` (r:1 w:0) + /// Proof: `TfgridModule::UsersTermsAndConditions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:1) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinID` (r:1 w:1) + /// Proof: `TfgridModule::TwinID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:0 w:1) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_twin() -> Weight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 23_943_000 picoseconds. - Weight::from_parts(24_477_000, 3700) + // Minimum execution time: 14_568_000 picoseconds. + Weight::from_parts(14_808_000, 3700) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:1) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:1) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_twin() -> Weight { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3893` - // Minimum execution time: 23_757_000 picoseconds. - Weight::from_parts(24_337_000, 3893) + // Minimum execution time: 15_088_000 picoseconds. + Weight::from_parts(15_479_000, 3893) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule PricingPolicyIdByName (r:1 w:1) - /// Proof Skipped: TfgridModule PricingPolicyIdByName (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicyID (r:1 w:1) - /// Proof Skipped: TfgridModule PricingPolicyID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:0 w:1) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::PricingPolicyIdByName` (r:1 w:1) + /// Proof: `TfgridModule::PricingPolicyIdByName` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicyID` (r:1 w:1) + /// Proof: `TfgridModule::PricingPolicyID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:0 w:1) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_pricing_policy() -> Weight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `3599` - // Minimum execution time: 20_931_000 picoseconds. - Weight::from_parts(21_633_000, 3599) + // Minimum execution time: 12_373_000 picoseconds. + Weight::from_parts(12_624_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule PricingPolicies (r:1 w:1) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicyIdByName (r:1 w:1) - /// Proof Skipped: TfgridModule PricingPolicyIdByName (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicyID (r:0 w:1) - /// Proof Skipped: TfgridModule PricingPolicyID (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:1) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicyIdByName` (r:1 w:1) + /// Proof: `TfgridModule::PricingPolicyIdByName` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicyID` (r:0 w:1) + /// Proof: `TfgridModule::PricingPolicyID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn update_pricing_policy() -> Weight { // Proof Size summary in bytes: // Measured: `382` // Estimated: `3847` - // Minimum execution time: 26_466_000 picoseconds. - Weight::from_parts(27_478_000, 3847) + // Minimum execution time: 16_632_000 picoseconds. + Weight::from_parts(17_143_000, 3847) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule FarmingPolicyID (r:1 w:1) - /// Proof Skipped: TfgridModule FarmingPolicyID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule FarmingPoliciesMap (r:0 w:1) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::FarmingPolicyID` (r:1 w:1) + /// Proof: `TfgridModule::FarmingPolicyID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:0 w:1) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_farming_policy() -> Weight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 17_653_000 picoseconds. - Weight::from_parts(18_085_000, 1619) + // Minimum execution time: 10_439_000 picoseconds. + Weight::from_parts(10_610_000, 1619) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: TfgridModule UsersTermsAndConditions (r:1 w:1) - /// Proof Skipped: TfgridModule UsersTermsAndConditions (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::UsersTermsAndConditions` (r:1 w:1) + /// Proof: `TfgridModule::UsersTermsAndConditions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn user_accept_tc() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3605` - // Minimum execution time: 12_183_000 picoseconds. - Weight::from_parts(12_508_000, 3605) + // Minimum execution time: 7_514_000 picoseconds. + Weight::from_parts(7_644_000, 3605) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodesByFarmID (r:1 w:1) - /// Proof Skipped: TfgridModule NodesByFarmID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:1) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:0 w:1) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodesByFarmID` (r:1 w:1) + /// Proof: `TfgridModule::NodesByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:1) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:0 w:1) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delete_node_farm() -> Weight { // Proof Size summary in bytes: - // Measured: `985` - // Estimated: `4450` - // Minimum execution time: 55_311_000 picoseconds. - Weight::from_parts(56_386_000, 4450) - .saturating_add(T::DbWeight::get().reads(8_u64)) + // Measured: `828` + // Estimated: `4293` + // Minimum execution time: 32_582_000 picoseconds. + Weight::from_parts(33_443_000, 4293) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_farm_dedicated() -> Weight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 21_411_000 picoseconds. - Weight::from_parts(21_921_000, 3877) + // Minimum execution time: 13_716_000 picoseconds. + Weight::from_parts(14_277_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_reset_farm_ip() -> Weight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 23_493_000 picoseconds. - Weight::from_parts(24_448_000, 3877) + // Minimum execution time: 13_846_000 picoseconds. + Weight::from_parts(14_117_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule ConnectionPrice (r:0 w:1) - /// Proof Skipped: TfgridModule ConnectionPrice (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::ConnectionPrice` (r:0 w:1) + /// Proof: `TfgridModule::ConnectionPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_connection_price() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_801_000 picoseconds. - Weight::from_parts(10_091_000, 0) + // Minimum execution time: 5_721_000 picoseconds. + Weight::from_parts(5_861_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule AllowedNodeCertifiers (r:1 w:1) - /// Proof Skipped: TfgridModule AllowedNodeCertifiers (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) + /// Proof: `TfgridModule::AllowedNodeCertifiers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_node_certifier() -> Weight { // Proof Size summary in bytes: // Measured: `355` // Estimated: `1840` - // Minimum execution time: 15_518_000 picoseconds. - Weight::from_parts(16_227_000, 1840) + // Minimum execution time: 9_819_000 picoseconds. + Weight::from_parts(10_039_000, 1840) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule AllowedNodeCertifiers (r:1 w:1) - /// Proof Skipped: TfgridModule AllowedNodeCertifiers (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) + /// Proof: `TfgridModule::AllowedNodeCertifiers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_node_certifier() -> Weight { // Proof Size summary in bytes: // Measured: `413` // Estimated: `1898` - // Minimum execution time: 18_573_000 picoseconds. - Weight::from_parts(19_049_000, 1898) + // Minimum execution time: 11_982_000 picoseconds. + Weight::from_parts(12_323_000, 1898) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule FarmingPoliciesMap (r:1 w:1) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:1 w:1) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_farming_policy() -> Weight { // Proof Size summary in bytes: // Measured: `294` // Estimated: `3759` - // Minimum execution time: 21_450_000 picoseconds. - Weight::from_parts(22_654_000, 3759) + // Minimum execution time: 13_335_000 picoseconds. + Weight::from_parts(13_675_000, 3759) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule FarmingPoliciesMap (r:1 w:0) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodesByFarmID (r:1 w:0) - /// Proof Skipped: TfgridModule NodesByFarmID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:1 w:0) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodesByFarmID` (r:1 w:0) + /// Proof: `TfgridModule::NodesByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn attach_policy_to_farm() -> Weight { // Proof Size summary in bytes: // Measured: `572` // Estimated: `4037` - // Minimum execution time: 35_866_000 picoseconds. - Weight::from_parts(36_635_000, 4037) + // Minimum execution time: 22_172_000 picoseconds. + Weight::from_parts(22_693_000, 4037) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule ZosVersion (r:1 w:1) - /// Proof Skipped: TfgridModule ZosVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::ZosVersion` (r:1 w:1) + /// Proof: `TfgridModule::ZosVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_zos_version() -> Weight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 13_431_000 picoseconds. - Weight::from_parts(14_115_000, 1619) + // Minimum execution time: 8_055_000 picoseconds. + Weight::from_parts(8_216_000, 1619) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodePower (r:1 w:1) - /// Proof Skipped: TfgridModule NodePower (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:1) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_power_state() -> Weight { // Proof Size summary in bytes: // Measured: `621` // Estimated: `4086` - // Minimum execution time: 33_189_000 picoseconds. - Weight::from_parts(34_120_000, 4086) + // Minimum execution time: 22_723_000 picoseconds. + Weight::from_parts(23_154_000, 4086) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodePower (r:1 w:1) - /// Proof Skipped: TfgridModule NodePower (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:1) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_power_target() -> Weight { // Proof Size summary in bytes: - // Measured: `755` - // Estimated: `4220` - // Minimum execution time: 32_593_000 picoseconds. - Weight::from_parts(33_063_000, 4220) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `792` + // Estimated: `4257` + // Minimum execution time: 26_440_000 picoseconds. + Weight::from_parts(27_042_000, 4257) + .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:0 w:1) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:0 w:1) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn bond_twin_account() -> Weight { // Proof Size summary in bytes: // Measured: `387` // Estimated: `3852` - // Minimum execution time: 19_181_000 picoseconds. - Weight::from_parts(19_630_000, 3852) + // Minimum execution time: 11_832_000 picoseconds. + Weight::from_parts(12_083_000, 3852) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn report_uptime_v2() -> Weight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 26_974_000 picoseconds. - Weight::from_parts(28_212_000, 3919) + // Minimum execution time: 18_144_000 picoseconds. + Weight::from_parts(18_385_000, 3919) .saturating_add(T::DbWeight::get().reads(4_u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: TfgridModule PalletVersion (r:0 w:1) - /// Proof Skipped: TfgridModule PalletVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::PalletVersion` (r:0 w:1) + /// Proof: `TfgridModule::PalletVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_storage_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_385_000 picoseconds. - Weight::from_parts(5_643_000, 0) + // Minimum execution time: 3_857_000 picoseconds. + Weight::from_parts(4_047_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule FarmID (r:1 w:1) - /// Proof Skipped: TfgridModule FarmID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule FarmIdByName (r:1 w:1) - /// Proof Skipped: TfgridModule FarmIdByName (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:0 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmIdByName` (r:1 w:1) + /// Proof: `TfgridModule::FarmIdByName` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmID` (r:1 w:1) + /// Proof: `TfgridModule::FarmID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:0 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_farm() -> Weight { // Proof Size summary in bytes: // Measured: `496` // Estimated: `3961` - // Minimum execution time: 31_394_000 picoseconds. - Weight::from_parts(32_172_000, 3961) + // Minimum execution time: 32_251_000 picoseconds. + Weight::from_parts(32_712_000, 3961) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule FarmIdByName (r:1 w:1) - /// Proof Skipped: TfgridModule FarmIdByName (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmIdByName` (r:1 w:2) + /// Proof: `TfgridModule::FarmIdByName` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_farm() -> Weight { // Proof Size summary in bytes: // Measured: `507` // Estimated: `3972` - // Minimum execution time: 33_504_000 picoseconds. - Weight::from_parts(34_515_000, 3972) + // Minimum execution time: 34_135_000 picoseconds. + Weight::from_parts(35_327_000, 3972) .saturating_add(RocksDbWeight::get().reads(3_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule FarmPayoutV2AddressByFarmID (r:0 w:1) - /// Proof Skipped: TfgridModule FarmPayoutV2AddressByFarmID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmPayoutV2AddressByFarmID` (r:0 w:1) + /// Proof: `TfgridModule::FarmPayoutV2AddressByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_stellar_payout_v2address() -> Weight { // Proof Size summary in bytes: // Measured: `453` // Estimated: `3918` - // Minimum execution time: 24_636_000 picoseconds. - Weight::from_parts(25_319_000, 3918) + // Minimum execution time: 18_865_000 picoseconds. + Weight::from_parts(25_378_000, 3918) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_farm_certification() -> Weight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 20_870_000 picoseconds. - Weight::from_parts(21_177_000, 3877) + // Minimum execution time: 13_105_000 picoseconds. + Weight::from_parts(13_406_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_farm_ip() -> Weight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 27_994_000 picoseconds. - Weight::from_parts(31_496_000, 4034) + // Minimum execution time: 17_734_000 picoseconds. + Weight::from_parts(18_165_000, 4034) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_farm_ip() -> Weight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 26_365_000 picoseconds. - Weight::from_parts(27_079_000, 4034) + // Minimum execution time: 16_922_000 picoseconds. + Weight::from_parts(17_473_000, 4034) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:1) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeID (r:1 w:1) - /// Proof Skipped: TfgridModule NodeID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: TfgridModule ConnectionPrice (r:1 w:0) - /// Proof Skipped: TfgridModule ConnectionPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule FarmingPoliciesMap (r:4 w:0) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodesByFarmID (r:1 w:1) - /// Proof Skipped: TfgridModule NodesByFarmID (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:1) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:0 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:1) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeID` (r:1 w:1) + /// Proof: `TfgridModule::NodeID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::ConnectionPrice` (r:1 w:0) + /// Proof: `TfgridModule::ConnectionPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:4 w:0) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodesByFarmID` (r:1 w:1) + /// Proof: `TfgridModule::NodesByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:1) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:0 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_node() -> Weight { // Proof Size summary in bytes: // Measured: `905` // Estimated: `11795` - // Minimum execution time: 71_884_000 picoseconds. - Weight::from_parts(74_159_000, 11795) + // Minimum execution time: 47_360_000 picoseconds. + Weight::from_parts(48_562_000, 11795) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:1) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:1) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_node() -> Weight { // Proof Size summary in bytes: // Measured: `661` // Estimated: `4126` - // Minimum execution time: 41_641_000 picoseconds. - Weight::from_parts(42_797_000, 4126) + // Minimum execution time: 27_062_000 picoseconds. + Weight::from_parts(27_723_000, 4126) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule FarmingPoliciesMap (r:4 w:0) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:4 w:0) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_node_certification() -> Weight { // Proof Size summary in bytes: // Measured: `956` // Estimated: `11846` - // Minimum execution time: 53_080_000 picoseconds. - Weight::from_parts(54_350_000, 11846) + // Minimum execution time: 34_295_000 picoseconds. + Weight::from_parts(35_096_000, 11846) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) fn report_uptime() -> Weight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 28_159_000 picoseconds. - Weight::from_parts(28_543_000, 3919) + // Minimum execution time: 18_635_000 picoseconds. + Weight::from_parts(19_006_000, 3919) .saturating_add(RocksDbWeight::get().reads(4_u64)) } - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_node_public_config() -> Weight { // Proof Size summary in bytes: // Measured: `779` // Estimated: `4244` - // Minimum execution time: 37_090_000 picoseconds. - Weight::from_parts(38_269_000, 4244) + // Minimum execution time: 24_637_000 picoseconds. + Weight::from_parts(25_277_000, 4244) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodesByFarmID (r:1 w:1) - /// Proof Skipped: TfgridModule NodesByFarmID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:1) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodesByFarmID` (r:1 w:1) + /// Proof: `TfgridModule::NodesByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:1) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delete_node() -> Weight { // Proof Size summary in bytes: // Measured: `682` // Estimated: `4147` - // Minimum execution time: 40_802_000 picoseconds. - Weight::from_parts(41_890_000, 4147) + // Minimum execution time: 27_362_000 picoseconds. + Weight::from_parts(27_943_000, 4147) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule UsersTermsAndConditions (r:1 w:0) - /// Proof Skipped: TfgridModule UsersTermsAndConditions (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:1) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinID (r:1 w:1) - /// Proof Skipped: TfgridModule TwinID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:0 w:1) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::UsersTermsAndConditions` (r:1 w:0) + /// Proof: `TfgridModule::UsersTermsAndConditions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:1) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinID` (r:1 w:1) + /// Proof: `TfgridModule::TwinID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:0 w:1) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_twin() -> Weight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 23_943_000 picoseconds. - Weight::from_parts(24_477_000, 3700) + // Minimum execution time: 14_568_000 picoseconds. + Weight::from_parts(14_808_000, 3700) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:1) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Twins` (r:1 w:1) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_twin() -> Weight { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3893` - // Minimum execution time: 23_757_000 picoseconds. - Weight::from_parts(24_337_000, 3893) + // Minimum execution time: 15_088_000 picoseconds. + Weight::from_parts(15_479_000, 3893) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule PricingPolicyIdByName (r:1 w:1) - /// Proof Skipped: TfgridModule PricingPolicyIdByName (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicyID (r:1 w:1) - /// Proof Skipped: TfgridModule PricingPolicyID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicies (r:0 w:1) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::PricingPolicyIdByName` (r:1 w:1) + /// Proof: `TfgridModule::PricingPolicyIdByName` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicyID` (r:1 w:1) + /// Proof: `TfgridModule::PricingPolicyID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:0 w:1) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_pricing_policy() -> Weight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `3599` - // Minimum execution time: 20_931_000 picoseconds. - Weight::from_parts(21_633_000, 3599) + // Minimum execution time: 12_373_000 picoseconds. + Weight::from_parts(12_624_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule PricingPolicies (r:1 w:1) - /// Proof Skipped: TfgridModule PricingPolicies (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicyIdByName (r:1 w:1) - /// Proof Skipped: TfgridModule PricingPolicyIdByName (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule PricingPolicyID (r:0 w:1) - /// Proof Skipped: TfgridModule PricingPolicyID (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:1) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicyIdByName` (r:1 w:1) + /// Proof: `TfgridModule::PricingPolicyIdByName` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicyID` (r:0 w:1) + /// Proof: `TfgridModule::PricingPolicyID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn update_pricing_policy() -> Weight { // Proof Size summary in bytes: // Measured: `382` // Estimated: `3847` - // Minimum execution time: 26_466_000 picoseconds. - Weight::from_parts(27_478_000, 3847) + // Minimum execution time: 16_632_000 picoseconds. + Weight::from_parts(17_143_000, 3847) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: TfgridModule FarmingPolicyID (r:1 w:1) - /// Proof Skipped: TfgridModule FarmingPolicyID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TfgridModule FarmingPoliciesMap (r:0 w:1) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::FarmingPolicyID` (r:1 w:1) + /// Proof: `TfgridModule::FarmingPolicyID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:0 w:1) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_farming_policy() -> Weight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 17_653_000 picoseconds. - Weight::from_parts(18_085_000, 1619) + // Minimum execution time: 10_439_000 picoseconds. + Weight::from_parts(10_610_000, 1619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: TfgridModule UsersTermsAndConditions (r:1 w:1) - /// Proof Skipped: TfgridModule UsersTermsAndConditions (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `TfgridModule::UsersTermsAndConditions` (r:1 w:1) + /// Proof: `TfgridModule::UsersTermsAndConditions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn user_accept_tc() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3605` - // Minimum execution time: 12_183_000 picoseconds. - Weight::from_parts(12_508_000, 3605) + // Minimum execution time: 7_514_000 picoseconds. + Weight::from_parts(7_644_000, 3605) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:1) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodesByFarmID (r:1 w:1) - /// Proof Skipped: TfgridModule NodesByFarmID (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveNodeContracts (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveNodeContracts (max_values: None, max_size: None, mode: Measured) - /// Storage: SmartContractModule ActiveRentContractForNode (r:1 w:0) - /// Proof Skipped: SmartContractModule ActiveRentContractForNode (max_values: None, max_size: None, mode: Measured) - /// Storage: Dao FarmWeight (r:1 w:1) - /// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:0 w:1) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:1) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodesByFarmID` (r:1 w:1) + /// Proof: `TfgridModule::NodesByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dao::FarmWeight` (r:1 w:1) + /// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:0 w:1) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delete_node_farm() -> Weight { // Proof Size summary in bytes: - // Measured: `985` - // Estimated: `4450` - // Minimum execution time: 55_311_000 picoseconds. - Weight::from_parts(56_386_000, 4450) - .saturating_add(RocksDbWeight::get().reads(8_u64)) + // Measured: `828` + // Estimated: `4293` + // Minimum execution time: 32_582_000 picoseconds. + Weight::from_parts(33_443_000, 4293) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_farm_dedicated() -> Weight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 21_411_000 picoseconds. - Weight::from_parts(21_921_000, 3877) + // Minimum execution time: 13_716_000 picoseconds. + Weight::from_parts(14_277_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_reset_farm_ip() -> Weight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 23_493_000 picoseconds. - Weight::from_parts(24_448_000, 3877) + // Minimum execution time: 13_846_000 picoseconds. + Weight::from_parts(14_117_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule ConnectionPrice (r:0 w:1) - /// Proof Skipped: TfgridModule ConnectionPrice (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::ConnectionPrice` (r:0 w:1) + /// Proof: `TfgridModule::ConnectionPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_connection_price() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_801_000 picoseconds. - Weight::from_parts(10_091_000, 0) + // Minimum execution time: 5_721_000 picoseconds. + Weight::from_parts(5_861_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule AllowedNodeCertifiers (r:1 w:1) - /// Proof Skipped: TfgridModule AllowedNodeCertifiers (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) + /// Proof: `TfgridModule::AllowedNodeCertifiers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_node_certifier() -> Weight { // Proof Size summary in bytes: // Measured: `355` // Estimated: `1840` - // Minimum execution time: 15_518_000 picoseconds. - Weight::from_parts(16_227_000, 1840) + // Minimum execution time: 9_819_000 picoseconds. + Weight::from_parts(10_039_000, 1840) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule AllowedNodeCertifiers (r:1 w:1) - /// Proof Skipped: TfgridModule AllowedNodeCertifiers (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) + /// Proof: `TfgridModule::AllowedNodeCertifiers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_node_certifier() -> Weight { // Proof Size summary in bytes: // Measured: `413` // Estimated: `1898` - // Minimum execution time: 18_573_000 picoseconds. - Weight::from_parts(19_049_000, 1898) + // Minimum execution time: 11_982_000 picoseconds. + Weight::from_parts(12_323_000, 1898) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule FarmingPoliciesMap (r:1 w:1) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:1 w:1) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_farming_policy() -> Weight { // Proof Size summary in bytes: // Measured: `294` // Estimated: `3759` - // Minimum execution time: 21_450_000 picoseconds. - Weight::from_parts(22_654_000, 3759) + // Minimum execution time: 13_335_000 picoseconds. + Weight::from_parts(13_675_000, 3759) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule FarmingPoliciesMap (r:1 w:0) - /// Proof Skipped: TfgridModule FarmingPoliciesMap (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:1) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodesByFarmID (r:1 w:0) - /// Proof Skipped: TfgridModule NodesByFarmID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::FarmingPoliciesMap` (r:1 w:0) + /// Proof: `TfgridModule::FarmingPoliciesMap` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:1) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodesByFarmID` (r:1 w:0) + /// Proof: `TfgridModule::NodesByFarmID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn attach_policy_to_farm() -> Weight { // Proof Size summary in bytes: // Measured: `572` // Estimated: `4037` - // Minimum execution time: 35_866_000 picoseconds. - Weight::from_parts(36_635_000, 4037) + // Minimum execution time: 22_172_000 picoseconds. + Weight::from_parts(22_693_000, 4037) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule ZosVersion (r:1 w:1) - /// Proof Skipped: TfgridModule ZosVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TfgridModule::ZosVersion` (r:1 w:1) + /// Proof: `TfgridModule::ZosVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_zos_version() -> Weight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 13_431_000 picoseconds. - Weight::from_parts(14_115_000, 1619) + // Minimum execution time: 8_055_000 picoseconds. + Weight::from_parts(8_216_000, 1619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodePower (r:1 w:1) - /// Proof Skipped: TfgridModule NodePower (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:1) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_power_state() -> Weight { // Proof Size summary in bytes: // Measured: `621` // Estimated: `4086` - // Minimum execution time: 33_189_000 picoseconds. - Weight::from_parts(34_120_000, 4086) + // Minimum execution time: 22_723_000 picoseconds. + Weight::from_parts(23_154_000, 4086) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Farms (r:1 w:0) - /// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodePower (r:1 w:1) - /// Proof Skipped: TfgridModule NodePower (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) + /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:1) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_power_target() -> Weight { // Proof Size summary in bytes: - // Measured: `755` - // Estimated: `4220` - // Minimum execution time: 32_593_000 picoseconds. - Weight::from_parts(33_063_000, 4220) - .saturating_add(RocksDbWeight::get().reads(4_u64)) + // Measured: `792` + // Estimated: `4257` + // Minimum execution time: 26_440_000 picoseconds. + Weight::from_parts(27_042_000, 4257) + .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule Twins (r:1 w:0) - /// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule TwinBoundedAccountID (r:0 w:1) - /// Proof Skipped: TfgridModule TwinBoundedAccountID (max_values: None, max_size: None, mode: Measured) + /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::TwinBoundedAccountID` (r:0 w:1) + /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn bond_twin_account() -> Weight { // Proof Size summary in bytes: // Measured: `387` // Estimated: `3852` - // Minimum execution time: 19_181_000 picoseconds. - Weight::from_parts(19_630_000, 3852) + // Minimum execution time: 11_832_000 picoseconds. + Weight::from_parts(12_083_000, 3852) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TfgridModule TwinIdByAccountID (r:1 w:0) - /// Proof Skipped: TfgridModule TwinIdByAccountID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule NodeIdByTwinID (r:1 w:0) - /// Proof Skipped: TfgridModule NodeIdByTwinID (max_values: None, max_size: None, mode: Measured) - /// Storage: TfgridModule Nodes (r:1 w:0) - /// Proof Skipped: TfgridModule Nodes (max_values: None, max_size: None, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) + /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodeIdByTwinID` (r:1 w:0) + /// Proof: `TfgridModule::NodeIdByTwinID` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn report_uptime_v2() -> Weight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 26_974_000 picoseconds. - Weight::from_parts(28_212_000, 3919) + // Minimum execution time: 18_144_000 picoseconds. + Weight::from_parts(18_385_000, 3919) .saturating_add(RocksDbWeight::get().reads(4_u64)) } } diff --git a/substrate-node/pallets/pallet-tft-bridge/src/weights.rs b/substrate-node/pallets/pallet-tft-bridge/src/weights.rs index a0e511b88..a1284a98e 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/weights.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/weights.rs @@ -2,21 +2,21 @@ //! Autogenerated weights for pallet_tft_bridge //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `R1-HP-ProBook-630-G8`, CPU: `11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ./target/release/tfchain +// ./target/production/tfchain // benchmark // pallet // --chain=dev -// --pallet=pallet_tft_bridge +// --wasm-execution=compiled +// --pallet=pallet-tft-bridge // --extrinsic=* // --steps=50 // --repeat=20 -// --execution=wasm // --heap-pages=409 // --output // ./pallets/pallet-tft-bridge/src/weights.rs @@ -49,153 +49,153 @@ pub trait WeightInfo { /// Weights for pallet_tft_bridge using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: TFTBridgeModule Validators (r:1 w:1) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:1) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_bridge_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `289` - // Estimated: `1774` - // Minimum execution time: 18_778_000 picoseconds. - Weight::from_parts(20_233_000, 1774) + // Measured: `256` + // Estimated: `1741` + // Minimum execution time: 15_099_000 picoseconds. + Weight::from_parts(16_281_000, 1741) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:1) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:1) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_bridge_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `322` - // Estimated: `1807` - // Minimum execution time: 12_346_000 picoseconds. - Weight::from_parts(17_998_000, 1807) + // Measured: `289` + // Estimated: `1774` + // Minimum execution time: 15_049_000 picoseconds. + Weight::from_parts(15_810_000, 1774) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule FeeAccount (r:0 w:1) - /// Proof Skipped: TFTBridgeModule FeeAccount (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::FeeAccount` (r:0 w:1) + /// Proof: `TFTBridgeModule::FeeAccount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_fee_account() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_548_000 picoseconds. - Weight::from_parts(5_051_000, 0) + // Minimum execution time: 4_939_000 picoseconds. + Weight::from_parts(5_350_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule WithdrawFee (r:0 w:1) - /// Proof Skipped: TFTBridgeModule WithdrawFee (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::WithdrawFee` (r:0 w:1) + /// Proof: `TFTBridgeModule::WithdrawFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_withdraw_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_279_000 picoseconds. - Weight::from_parts(4_493_000, 0) + // Minimum execution time: 4_729_000 picoseconds. + Weight::from_parts(4_939_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule DepositFee (r:0 w:1) - /// Proof Skipped: TFTBridgeModule DepositFee (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::DepositFee` (r:0 w:1) + /// Proof: `TFTBridgeModule::DepositFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_deposit_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_584_000 picoseconds. - Weight::from_parts(4_876_000, 0) + // Minimum execution time: 4_739_000 picoseconds. + Weight::from_parts(4_980_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule WithdrawFee (r:1 w:0) - /// Proof Skipped: TFTBridgeModule WithdrawFee (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule FeeAccount (r:1 w:0) - /// Proof Skipped: TFTBridgeModule FeeAccount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: TFTBridgeModule BurnTransactionID (r:1 w:1) - /// Proof Skipped: TFTBridgeModule BurnTransactionID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule BurnTransactions (r:0 w:1) - /// Proof Skipped: TFTBridgeModule BurnTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::WithdrawFee` (r:1 w:0) + /// Proof: `TFTBridgeModule::WithdrawFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::FeeAccount` (r:1 w:0) + /// Proof: `TFTBridgeModule::FeeAccount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TFTBridgeModule::BurnTransactionID` (r:1 w:1) + /// Proof: `TFTBridgeModule::BurnTransactionID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::BurnTransactions` (r:0 w:1) + /// Proof: `TFTBridgeModule::BurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_to_stellar() -> Weight { // Proof Size summary in bytes: - // Measured: `286` + // Measured: `253` // Estimated: `3593` - // Minimum execution time: 74_554_000 picoseconds. - Weight::from_parts(76_009_000, 3593) + // Minimum execution time: 43_242_000 picoseconds. + Weight::from_parts(43_893_000, 3593) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule ExecutedMintTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule ExecutedMintTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule MintTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule MintTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule DepositFee (r:1 w:0) - /// Proof Skipped: TFTBridgeModule DepositFee (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule FeeAccount (r:1 w:0) - /// Proof Skipped: TFTBridgeModule FeeAccount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::ExecutedMintTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::ExecutedMintTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::MintTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::MintTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::DepositFee` (r:1 w:0) + /// Proof: `TFTBridgeModule::DepositFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::FeeAccount` (r:1 w:0) + /// Proof: `TFTBridgeModule::FeeAccount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn propose_or_vote_mint_transaction() -> Weight { // Proof Size summary in bytes: - // Measured: `532` - // Estimated: `3997` - // Minimum execution time: 102_293_000 picoseconds. - Weight::from_parts(113_671_000, 3997) + // Measured: `499` + // Estimated: `3964` + // Minimum execution time: 60_305_000 picoseconds. + Weight::from_parts(61_196_000, 3964) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule ExecutedBurnTransactions (r:1 w:0) - /// Proof Skipped: TFTBridgeModule ExecutedBurnTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule BurnTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule BurnTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::ExecutedBurnTransactions` (r:1 w:0) + /// Proof: `TFTBridgeModule::ExecutedBurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::BurnTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::BurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_burn_transaction_or_add_sig() -> Weight { // Proof Size summary in bytes: // Measured: `631` // Estimated: `4096` - // Minimum execution time: 41_613_000 picoseconds. - Weight::from_parts(42_948_000, 4096) + // Minimum execution time: 25_719_000 picoseconds. + Weight::from_parts(26_300_000, 4096) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule ExecutedBurnTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule ExecutedBurnTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule BurnTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule BurnTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::ExecutedBurnTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::ExecutedBurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::BurnTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::BurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_burn_transaction_executed() -> Weight { // Proof Size summary in bytes: // Measured: `571` // Estimated: `4036` - // Minimum execution time: 28_712_000 picoseconds. - Weight::from_parts(29_777_000, 4036) + // Minimum execution time: 18_425_000 picoseconds. + Weight::from_parts(18_805_000, 4036) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule RefundTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule RefundTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::RefundTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::RefundTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_refund_transaction_or_add_sig() -> Weight { // Proof Size summary in bytes: - // Measured: `418` - // Estimated: `3883` - // Minimum execution time: 36_551_000 picoseconds. - Weight::from_parts(37_525_000, 3883) + // Measured: `385` + // Estimated: `3850` + // Minimum execution time: 21_671_000 picoseconds. + Weight::from_parts(22_232_000, 3850) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule ExecutedRefundTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule ExecutedRefundTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule RefundTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule RefundTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::ExecutedRefundTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::ExecutedRefundTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::RefundTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::RefundTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_refund_transaction_executed() -> Weight { // Proof Size summary in bytes: - // Measured: `593` - // Estimated: `4058` - // Minimum execution time: 34_047_000 picoseconds. - Weight::from_parts(35_316_000, 4058) + // Measured: `560` + // Estimated: `4025` + // Minimum execution time: 18_926_000 picoseconds. + Weight::from_parts(19_217_000, 4025) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -203,153 +203,153 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: TFTBridgeModule Validators (r:1 w:1) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:1) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_bridge_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `289` - // Estimated: `1774` - // Minimum execution time: 18_778_000 picoseconds. - Weight::from_parts(20_233_000, 1774) + // Measured: `256` + // Estimated: `1741` + // Minimum execution time: 15_099_000 picoseconds. + Weight::from_parts(16_281_000, 1741) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:1) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:1) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_bridge_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `322` - // Estimated: `1807` - // Minimum execution time: 12_346_000 picoseconds. - Weight::from_parts(17_998_000, 1807) + // Measured: `289` + // Estimated: `1774` + // Minimum execution time: 15_049_000 picoseconds. + Weight::from_parts(15_810_000, 1774) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule FeeAccount (r:0 w:1) - /// Proof Skipped: TFTBridgeModule FeeAccount (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::FeeAccount` (r:0 w:1) + /// Proof: `TFTBridgeModule::FeeAccount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_fee_account() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_548_000 picoseconds. - Weight::from_parts(5_051_000, 0) + // Minimum execution time: 4_939_000 picoseconds. + Weight::from_parts(5_350_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule WithdrawFee (r:0 w:1) - /// Proof Skipped: TFTBridgeModule WithdrawFee (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::WithdrawFee` (r:0 w:1) + /// Proof: `TFTBridgeModule::WithdrawFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_withdraw_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_279_000 picoseconds. - Weight::from_parts(4_493_000, 0) + // Minimum execution time: 4_729_000 picoseconds. + Weight::from_parts(4_939_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule DepositFee (r:0 w:1) - /// Proof Skipped: TFTBridgeModule DepositFee (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::DepositFee` (r:0 w:1) + /// Proof: `TFTBridgeModule::DepositFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_deposit_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_584_000 picoseconds. - Weight::from_parts(4_876_000, 0) + // Minimum execution time: 4_739_000 picoseconds. + Weight::from_parts(4_980_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule WithdrawFee (r:1 w:0) - /// Proof Skipped: TFTBridgeModule WithdrawFee (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule FeeAccount (r:1 w:0) - /// Proof Skipped: TFTBridgeModule FeeAccount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: TFTBridgeModule BurnTransactionID (r:1 w:1) - /// Proof Skipped: TFTBridgeModule BurnTransactionID (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule BurnTransactions (r:0 w:1) - /// Proof Skipped: TFTBridgeModule BurnTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::WithdrawFee` (r:1 w:0) + /// Proof: `TFTBridgeModule::WithdrawFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::FeeAccount` (r:1 w:0) + /// Proof: `TFTBridgeModule::FeeAccount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TFTBridgeModule::BurnTransactionID` (r:1 w:1) + /// Proof: `TFTBridgeModule::BurnTransactionID` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::BurnTransactions` (r:0 w:1) + /// Proof: `TFTBridgeModule::BurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_to_stellar() -> Weight { // Proof Size summary in bytes: - // Measured: `286` + // Measured: `253` // Estimated: `3593` - // Minimum execution time: 74_554_000 picoseconds. - Weight::from_parts(76_009_000, 3593) + // Minimum execution time: 43_242_000 picoseconds. + Weight::from_parts(43_893_000, 3593) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule ExecutedMintTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule ExecutedMintTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule MintTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule MintTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule DepositFee (r:1 w:0) - /// Proof Skipped: TFTBridgeModule DepositFee (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule FeeAccount (r:1 w:0) - /// Proof Skipped: TFTBridgeModule FeeAccount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::ExecutedMintTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::ExecutedMintTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::MintTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::MintTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::DepositFee` (r:1 w:0) + /// Proof: `TFTBridgeModule::DepositFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::FeeAccount` (r:1 w:0) + /// Proof: `TFTBridgeModule::FeeAccount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn propose_or_vote_mint_transaction() -> Weight { // Proof Size summary in bytes: - // Measured: `532` - // Estimated: `3997` - // Minimum execution time: 102_293_000 picoseconds. - Weight::from_parts(113_671_000, 3997) + // Measured: `499` + // Estimated: `3964` + // Minimum execution time: 60_305_000 picoseconds. + Weight::from_parts(61_196_000, 3964) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule ExecutedBurnTransactions (r:1 w:0) - /// Proof Skipped: TFTBridgeModule ExecutedBurnTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule BurnTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule BurnTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::ExecutedBurnTransactions` (r:1 w:0) + /// Proof: `TFTBridgeModule::ExecutedBurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::BurnTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::BurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_burn_transaction_or_add_sig() -> Weight { // Proof Size summary in bytes: // Measured: `631` // Estimated: `4096` - // Minimum execution time: 41_613_000 picoseconds. - Weight::from_parts(42_948_000, 4096) + // Minimum execution time: 25_719_000 picoseconds. + Weight::from_parts(26_300_000, 4096) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule ExecutedBurnTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule ExecutedBurnTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule BurnTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule BurnTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::ExecutedBurnTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::ExecutedBurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::BurnTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::BurnTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_burn_transaction_executed() -> Weight { // Proof Size summary in bytes: // Measured: `571` // Estimated: `4036` - // Minimum execution time: 28_712_000 picoseconds. - Weight::from_parts(29_777_000, 4036) + // Minimum execution time: 18_425_000 picoseconds. + Weight::from_parts(18_805_000, 4036) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule RefundTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule RefundTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::RefundTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::RefundTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_refund_transaction_or_add_sig() -> Weight { // Proof Size summary in bytes: - // Measured: `418` - // Estimated: `3883` - // Minimum execution time: 36_551_000 picoseconds. - Weight::from_parts(37_525_000, 3883) + // Measured: `385` + // Estimated: `3850` + // Minimum execution time: 21_671_000 picoseconds. + Weight::from_parts(22_232_000, 3850) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TFTBridgeModule Validators (r:1 w:0) - /// Proof Skipped: TFTBridgeModule Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTBridgeModule ExecutedRefundTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule ExecutedRefundTransactions (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTBridgeModule RefundTransactions (r:1 w:1) - /// Proof Skipped: TFTBridgeModule RefundTransactions (max_values: None, max_size: None, mode: Measured) + /// Storage: `TFTBridgeModule::Validators` (r:1 w:0) + /// Proof: `TFTBridgeModule::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::ExecutedRefundTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::ExecutedRefundTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTBridgeModule::RefundTransactions` (r:1 w:1) + /// Proof: `TFTBridgeModule::RefundTransactions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_refund_transaction_executed() -> Weight { // Proof Size summary in bytes: - // Measured: `593` - // Estimated: `4058` - // Minimum execution time: 34_047_000 picoseconds. - Weight::from_parts(35_316_000, 4058) + // Measured: `560` + // Estimated: `4025` + // Minimum execution time: 18_926_000 picoseconds. + Weight::from_parts(19_217_000, 4025) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } diff --git a/substrate-node/pallets/pallet-tft-price/src/weights.rs b/substrate-node/pallets/pallet-tft-price/src/weights.rs index 60d9de22e..ec8658215 100644 --- a/substrate-node/pallets/pallet-tft-price/src/weights.rs +++ b/substrate-node/pallets/pallet-tft-price/src/weights.rs @@ -2,26 +2,26 @@ //! Autogenerated weights for pallet_tft_price //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ragnar`, CPU: `Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ../target/release/tfchain +// ./target/production/tfchain // benchmark // pallet // --chain=dev -// --pallet=pallet_tft_price +// --wasm-execution=compiled +// --pallet=pallet-tft-price // --extrinsic=* // --steps=50 // --repeat=20 -// --execution=wasm // --heap-pages=409 // --output -// ../pallets/pallet-tft-price/src/weights.rs +// ./pallets/pallet-tft-price/src/weights.rs // --template -// ./frame-weight-template.hbs +// ./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -41,54 +41,54 @@ pub trait WeightInfo { /// Weights for pallet_tft_price using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: Session Validators (r:1 w:0) - /// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule BufferRange (r:1 w:1) - /// Proof Skipped: TFTPriceModule BufferRange (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule TftPriceHistory (r:2 w:1) - /// Proof Skipped: TFTPriceModule TftPriceHistory (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTPriceModule MinTftPrice (r:1 w:0) - /// Proof Skipped: TFTPriceModule MinTftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule MaxTftPrice (r:1 w:0) - /// Proof Skipped: TFTPriceModule MaxTftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule TftPrice (r:0 w:1) - /// Proof Skipped: TFTPriceModule TftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule LastBlockSet (r:0 w:1) - /// Proof Skipped: TFTPriceModule LastBlockSet (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule AverageTftPrice (r:0 w:1) - /// Proof Skipped: TFTPriceModule AverageTftPrice (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Session::Validators` (r:1 w:0) + /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::BufferRange` (r:1 w:1) + /// Proof: `TFTPriceModule::BufferRange` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::TftPriceHistory` (r:2 w:1) + /// Proof: `TFTPriceModule::TftPriceHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MinTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MaxTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::TftPrice` (r:0 w:1) + /// Proof: `TFTPriceModule::TftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::LastBlockSet` (r:0 w:1) + /// Proof: `TFTPriceModule::LastBlockSet` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::AverageTftPrice` (r:0 w:1) + /// Proof: `TFTPriceModule::AverageTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_prices() -> Weight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `6175` - // Minimum execution time: 56_848_000 picoseconds. - Weight::from_parts(57_630_000, 6175) + // Minimum execution time: 47_901_000 picoseconds. + Weight::from_parts(48_943_000, 6175) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } - /// Storage: TFTPriceModule MaxTftPrice (r:1 w:0) - /// Proof Skipped: TFTPriceModule MaxTftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule MinTftPrice (r:0 w:1) - /// Proof Skipped: TFTPriceModule MinTftPrice (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTPriceModule::MaxTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MinTftPrice` (r:0 w:1) + /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_min_tft_price() -> Weight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 8_993_000 picoseconds. - Weight::from_parts(9_197_000, 1578) + // Minimum execution time: 8_166_000 picoseconds. + Weight::from_parts(8_315_000, 1578) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: TFTPriceModule MinTftPrice (r:1 w:0) - /// Proof Skipped: TFTPriceModule MinTftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule MaxTftPrice (r:0 w:1) - /// Proof Skipped: TFTPriceModule MaxTftPrice (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTPriceModule::MinTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MaxTftPrice` (r:0 w:1) + /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_max_tft_price() -> Weight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 8_902_000 picoseconds. - Weight::from_parts(9_147_000, 1578) + // Minimum execution time: 7_975_000 picoseconds. + Weight::from_parts(8_235_000, 1578) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -96,55 +96,55 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: Session Validators (r:1 w:0) - /// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule BufferRange (r:1 w:1) - /// Proof Skipped: TFTPriceModule BufferRange (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule TftPriceHistory (r:2 w:1) - /// Proof Skipped: TFTPriceModule TftPriceHistory (max_values: None, max_size: None, mode: Measured) - /// Storage: TFTPriceModule MinTftPrice (r:1 w:0) - /// Proof Skipped: TFTPriceModule MinTftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule MaxTftPrice (r:1 w:0) - /// Proof Skipped: TFTPriceModule MaxTftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule TftPrice (r:0 w:1) - /// Proof Skipped: TFTPriceModule TftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule LastBlockSet (r:0 w:1) - /// Proof Skipped: TFTPriceModule LastBlockSet (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule AverageTftPrice (r:0 w:1) - /// Proof Skipped: TFTPriceModule AverageTftPrice (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Session::Validators` (r:1 w:0) + /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::BufferRange` (r:1 w:1) + /// Proof: `TFTPriceModule::BufferRange` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::TftPriceHistory` (r:2 w:1) + /// Proof: `TFTPriceModule::TftPriceHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MinTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MaxTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::TftPrice` (r:0 w:1) + /// Proof: `TFTPriceModule::TftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::LastBlockSet` (r:0 w:1) + /// Proof: `TFTPriceModule::LastBlockSet` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::AverageTftPrice` (r:0 w:1) + /// Proof: `TFTPriceModule::AverageTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_prices() -> Weight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `6175` - // Minimum execution time: 56_848_000 picoseconds. - Weight::from_parts(57_630_000, 6175) + // Minimum execution time: 47_901_000 picoseconds. + Weight::from_parts(48_943_000, 6175) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } - /// Storage: TFTPriceModule MaxTftPrice (r:1 w:0) - /// Proof Skipped: TFTPriceModule MaxTftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule MinTftPrice (r:0 w:1) - /// Proof Skipped: TFTPriceModule MinTftPrice (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTPriceModule::MaxTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MinTftPrice` (r:0 w:1) + /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_min_tft_price() -> Weight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 8_993_000 picoseconds. - Weight::from_parts(9_197_000, 1578) + // Minimum execution time: 8_166_000 picoseconds. + Weight::from_parts(8_315_000, 1578) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: TFTPriceModule MinTftPrice (r:1 w:0) - /// Proof Skipped: TFTPriceModule MinTftPrice (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TFTPriceModule MaxTftPrice (r:0 w:1) - /// Proof Skipped: TFTPriceModule MaxTftPrice (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TFTPriceModule::MinTftPrice` (r:1 w:0) + /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TFTPriceModule::MaxTftPrice` (r:0 w:1) + /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_max_tft_price() -> Weight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 8_902_000 picoseconds. - Weight::from_parts(9_147_000, 1578) + // Minimum execution time: 7_975_000 picoseconds. + Weight::from_parts(8_235_000, 1578) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } -} \ No newline at end of file +} diff --git a/substrate-node/pallets/pallet-validator/src/weights.rs b/substrate-node/pallets/pallet-validator/src/weights.rs index b38d6fb12..75627294f 100644 --- a/substrate-node/pallets/pallet-validator/src/weights.rs +++ b/substrate-node/pallets/pallet-validator/src/weights.rs @@ -2,26 +2,26 @@ //! Autogenerated weights for pallet_validator //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ragnar`, CPU: `Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ../target/release/tfchain +// ./target/production/tfchain // benchmark // pallet // --chain=dev -// --pallet=pallet_validator +// --wasm-execution=compiled +// --pallet=pallet-validator // --extrinsic=* // --steps=50 // --repeat=20 -// --execution=wasm // --heap-pages=409 // --output -// ../pallets/pallet-validator/src/weights.rs +// ./pallets/pallet-validator/src/weights.rs // --template -// ./frame-weight-template.hbs +// ./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -44,95 +44,95 @@ pub trait WeightInfo { /// Weights for pallet_validator using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_validator_request() -> Weight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 20_271_000 picoseconds. - Weight::from_parts(20_728_000, 3507) + // Minimum execution time: 19_757_000 picoseconds. + Weight::from_parts(20_619_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet ApprovedValidators (r:1 w:1) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:1) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn activate_validator_node() -> Weight { // Proof Size summary in bytes: // Measured: `365` // Estimated: `3830` - // Minimum execution time: 45_601_000 picoseconds. - Weight::from_parts(46_151_000, 3830) + // Minimum execution time: 51_608_000 picoseconds. + Weight::from_parts(52_960_000, 3830) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet ApprovedValidators (r:1 w:1) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:1) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn change_validator_node_account() -> Weight { // Proof Size summary in bytes: // Measured: `431` // Estimated: `3896` - // Minimum execution time: 61_641_000 picoseconds. - Weight::from_parts(62_171_000, 3896) + // Minimum execution time: 32_050_000 picoseconds. + Weight::from_parts(33_082_000, 3896) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Validator Bonded (r:1 w:1) - /// Proof Skipped: Validator Bonded (max_values: None, max_size: None, mode: Measured) + /// Storage: `Validator::Bonded` (r:1 w:1) + /// Proof: `Validator::Bonded` (`max_values`: None, `max_size`: None, mode: `Measured`) fn bond() -> Weight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 17_991_000 picoseconds. - Weight::from_parts(18_269_000, 3507) + // Minimum execution time: 8_316_000 picoseconds. + Weight::from_parts(8_536_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: CouncilMembership Members (r:1 w:1) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:1) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn approve_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `558` + // Measured: `494` // Estimated: `4687` - // Minimum execution time: 46_008_000 picoseconds. - Weight::from_parts(46_565_000, 4687) + // Minimum execution time: 24_236_000 picoseconds. + Weight::from_parts(24_727_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: CouncilMembership Members (r:1 w:1) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilMembership Prime (r:1 w:0) - /// Proof: CouncilMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:1) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `CouncilMembership::Prime` (r:1 w:0) + /// Proof: `CouncilMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `622` + // Measured: `558` // Estimated: `4687` - // Minimum execution time: 39_718_000 picoseconds. - Weight::from_parts(40_453_000, 4687) + // Minimum execution time: 21_611_000 picoseconds. + Weight::from_parts(22_112_000, 4687) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -140,96 +140,96 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_validator_request() -> Weight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 20_271_000 picoseconds. - Weight::from_parts(20_728_000, 3507) + // Minimum execution time: 19_757_000 picoseconds. + Weight::from_parts(20_619_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet ApprovedValidators (r:1 w:1) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:1) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn activate_validator_node() -> Weight { // Proof Size summary in bytes: // Measured: `365` // Estimated: `3830` - // Minimum execution time: 45_601_000 picoseconds. - Weight::from_parts(46_151_000, 3830) + // Minimum execution time: 51_608_000 picoseconds. + Weight::from_parts(52_960_000, 3830) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet ApprovedValidators (r:1 w:1) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:1) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn change_validator_node_account() -> Weight { // Proof Size summary in bytes: // Measured: `431` // Estimated: `3896` - // Minimum execution time: 61_641_000 picoseconds. - Weight::from_parts(62_171_000, 3896) + // Minimum execution time: 32_050_000 picoseconds. + Weight::from_parts(33_082_000, 3896) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Validator Bonded (r:1 w:1) - /// Proof Skipped: Validator Bonded (max_values: None, max_size: None, mode: Measured) + /// Storage: `Validator::Bonded` (r:1 w:1) + /// Proof: `Validator::Bonded` (`max_values`: None, `max_size`: None, mode: `Measured`) fn bond() -> Weight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 17_991_000 picoseconds. - Weight::from_parts(18_269_000, 3507) + // Minimum execution time: 8_316_000 picoseconds. + Weight::from_parts(8_536_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: CouncilMembership Members (r:1 w:1) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:1) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn approve_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `558` + // Measured: `494` // Estimated: `4687` - // Minimum execution time: 46_008_000 picoseconds. - Weight::from_parts(46_565_000, 4687) + // Minimum execution time: 24_236_000 picoseconds. + Weight::from_parts(24_727_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: CouncilMembership Members (r:1 w:1) - /// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Validator Validator (r:1 w:1) - /// Proof Skipped: Validator Validator (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilMembership Prime (r:1 w:0) - /// Proof: CouncilMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `CouncilMembership::Members` (r:1 w:1) + /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `Validator::Validator` (r:1 w:1) + /// Proof: `Validator::Validator` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `CouncilMembership::Prime` (r:1 w:0) + /// Proof: `CouncilMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `622` + // Measured: `558` // Estimated: `4687` - // Minimum execution time: 39_718_000 picoseconds. - Weight::from_parts(40_453_000, 4687) + // Minimum execution time: 21_611_000 picoseconds. + Weight::from_parts(22_112_000, 4687) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } -} \ No newline at end of file +} diff --git a/substrate-node/pallets/substrate-validator-set/src/weights.rs b/substrate-node/pallets/substrate-validator-set/src/weights.rs index 86375fd8a..3c337f315 100644 --- a/substrate-node/pallets/substrate-validator-set/src/weights.rs +++ b/substrate-node/pallets/substrate-validator-set/src/weights.rs @@ -1,27 +1,27 @@ -//! Autogenerated weights for validatorset +//! Autogenerated weights for substrate_validator_set //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ragnar`, CPU: `Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ../target/release/tfchain +// ./target/production/tfchain // benchmark // pallet // --chain=dev -// --pallet=validatorset +// --wasm-execution=compiled +// --pallet=substrate-validator-set // --extrinsic=* // --steps=50 // --repeat=20 -// --execution=wasm // --heap-pages=409 // --output -// ../pallets/substrate-validator-set/src/weights.rs +// ./pallets/substrate-validator-set/src/weights.rs // --template -// ./frame-weight-template.hbs +// ./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -31,52 +31,52 @@ use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; -/// Weight functions needed for validatorset. +/// Weight functions needed for substrate_validator_set. pub trait WeightInfo { fn add_validator() -> Weight; fn remove_validator() -> Weight; fn add_validator_again() -> Weight; } -/// Weights for validatorset using the Substrate node and recommended hardware. +/// Weights for substrate_validator_set using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet ApprovedValidators (r:1 w:1) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:1) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_validator() -> Weight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `1624` - // Minimum execution time: 24_614_000 picoseconds. - Weight::from_parts(25_225_000, 1624) + // Minimum execution time: 29_295_000 picoseconds. + Weight::from_parts(30_498_000, 1624) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet ApprovedValidators (r:1 w:0) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:0) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_validator() -> Weight { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 20_152_000 picoseconds. - Weight::from_parts(20_484_000, 1690) + // Minimum execution time: 23_144_000 picoseconds. + Weight::from_parts(23_956_000, 1690) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: ValidatorSet ApprovedValidators (r:1 w:0) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:0) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_validator_again() -> Weight { // Proof Size summary in bytes: // Measured: `172` // Estimated: `1657` - // Minimum execution time: 21_948_000 picoseconds. - Weight::from_parts(22_780_000, 1657) + // Minimum execution time: 26_600_000 picoseconds. + Weight::from_parts(27_993_000, 1657) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -84,43 +84,43 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet ApprovedValidators (r:1 w:1) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:1) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_validator() -> Weight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `1624` - // Minimum execution time: 24_614_000 picoseconds. - Weight::from_parts(25_225_000, 1624) + // Minimum execution time: 29_295_000 picoseconds. + Weight::from_parts(30_498_000, 1624) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet ApprovedValidators (r:1 w:0) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:0) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_validator() -> Weight { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 20_152_000 picoseconds. - Weight::from_parts(20_484_000, 1690) + // Minimum execution time: 23_144_000 picoseconds. + Weight::from_parts(23_956_000, 1690) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: ValidatorSet ApprovedValidators (r:1 w:0) - /// Proof Skipped: ValidatorSet ApprovedValidators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ValidatorSet Validators (r:1 w:1) - /// Proof Skipped: ValidatorSet Validators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `ValidatorSet::ApprovedValidators` (r:1 w:0) + /// Proof: `ValidatorSet::ApprovedValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ValidatorSet::Validators` (r:1 w:1) + /// Proof: `ValidatorSet::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_validator_again() -> Weight { // Proof Size summary in bytes: // Measured: `172` // Estimated: `1657` - // Minimum execution time: 21_948_000 picoseconds. - Weight::from_parts(22_780_000, 1657) + // Minimum execution time: 26_600_000 picoseconds. + Weight::from_parts(27_993_000, 1657) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } -} \ No newline at end of file +} From 33046d68072f9972b53e92f616a8852fe107f36e Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:09:48 -0300 Subject: [PATCH 30/44] doc: update unsafe rpc node IPs (#962) --- docs/misc/try_runtime.md | 4 ++-- tools/fork-off-substrate/README.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/misc/try_runtime.md b/docs/misc/try_runtime.md index 5951abd10..aae8f53f3 100644 --- a/docs/misc/try_runtime.md +++ b/docs/misc/try_runtime.md @@ -4,8 +4,8 @@ List of available endpoints for our networks: - Devnet: 10.10.0.40 - QAnet: 10.10.0.42 -- Testnet: 10.10.0.100 -- Mainnet: 10.10.0.154 +- Testnet: 10.10.0.55 +- Mainnet: 10.10.0.56 (If you are not in Lochristi office you probably need VPN to reach to ips) diff --git a/tools/fork-off-substrate/README.md b/tools/fork-off-substrate/README.md index 6c3ebaef3..340a06ee4 100644 --- a/tools/fork-off-substrate/README.md +++ b/tools/fork-off-substrate/README.md @@ -62,10 +62,10 @@ The script can be tweaked and configured using various environment variables - | QUICK_MODE | If set, it parallelizes the data download from the RPC endpoint | `NULL` | ## Network list -- Devnet: 10.10.0.151 -- QAnet: 10.10.0.152 -- Testnet: 10.10.0.22 -- Mainnet: 10.10.0.19 +- Devnet: 10.10.0.40 +- QAnet: 10.10.0.42 +- Testnet: 10.10.0.55 +- Mainnet: 10.10.0.56 ## Read more From eb36aa90df2d60cb1a534997903821fc68a096f1 Mon Sep 17 00:00:00 2001 From: Dylan Verstraete Date: Tue, 16 Apr 2024 15:47:07 +0200 Subject: [PATCH 31/44] chore: add bootnodes to chainspecs and set network to Live (#610) * chore: add bootnodes to chainspecs and set network to Live * chore: add mainnet chainspec urls * chore: update chainspecs * use dns address for bootnodes instead of ip4 --------- Co-authored-by: Sameh Abouel-saad --- substrate-node/chainspecs/dev/chainSpec.json | 8 +++----- substrate-node/chainspecs/dev/chainSpecRaw.json | 8 +++----- substrate-node/chainspecs/main/chainSpec.json | 11 +++++++++-- substrate-node/chainspecs/main/chainSpecRaw.json | 11 +++++++++-- substrate-node/chainspecs/qanet/chainSpec.json | 7 +++---- substrate-node/chainspecs/qanet/chainSpecRaw.json | 7 +++---- substrate-node/chainspecs/test/chainSpec.json | 7 +++++-- substrate-node/chainspecs/test/chainSpecRaw.json | 7 +++++-- 8 files changed, 40 insertions(+), 26 deletions(-) diff --git a/substrate-node/chainspecs/dev/chainSpec.json b/substrate-node/chainspecs/dev/chainSpec.json index c5252758a..ee984e54c 100644 --- a/substrate-node/chainspecs/dev/chainSpec.json +++ b/substrate-node/chainspecs/dev/chainSpec.json @@ -1,12 +1,10 @@ { "name": "TF Chain Devnet", "id": "tfchain_devnet", - "chainType": "Local", + "chainType": "Live", "bootNodes": [ - "/ip4/185.206.122.7/tcp/30333/p2p/12D3KooWLcMLBg9itjQL1EXsAqkJFPhqESHqJKY7CBKmhhhL8fdp", - "/ip4/185.206.122.126/tcp/30333/p2p/12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK", - "/ip4/185.206.122.127/tcp/30333/p2p/12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm", - "/ip4/185.206.122.128/tcp/30333/p2p/12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta" + "/dns/01.bootnode.dev.grid.tf/tcp/30333/ws/p2p/12D3KooWDgsXduuSiPYRo616JwZQjXHmgGjayFxL2e6CXRAKP9K5", + "/dns/02.bootnode.dev.grid.tf/tcp/30333/ws/p2p/12D3KooWJjSHQpzsPDCN83o49q7sNopLviwbMKNijKSeFFnnpsNV" ], "telemetryEndpoints": null, "protocolId": null, diff --git a/substrate-node/chainspecs/dev/chainSpecRaw.json b/substrate-node/chainspecs/dev/chainSpecRaw.json index 78c925968..17778548a 100644 --- a/substrate-node/chainspecs/dev/chainSpecRaw.json +++ b/substrate-node/chainspecs/dev/chainSpecRaw.json @@ -1,12 +1,10 @@ { "name": "TF Chain Devnet", "id": "tfchain_devnet", - "chainType": "Local", + "chainType": "Live", "bootNodes": [ - "/ip4/185.206.122.7/tcp/30333/p2p/12D3KooWLcMLBg9itjQL1EXsAqkJFPhqESHqJKY7CBKmhhhL8fdp", - "/ip4/185.206.122.126/tcp/30333/p2p/12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK", - "/ip4/185.206.122.127/tcp/30333/p2p/12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm", - "/ip4/185.206.122.128/tcp/30333/p2p/12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta" + "/dns/01.bootnode.dev.grid.tf/tcp/30333/ws/p2p/12D3KooWDgsXduuSiPYRo616JwZQjXHmgGjayFxL2e6CXRAKP9K5", + "/dns/02.bootnode.dev.grid.tf/tcp/30333/ws/p2p/12D3KooWJjSHQpzsPDCN83o49q7sNopLviwbMKNijKSeFFnnpsNV" ], "telemetryEndpoints": null, "protocolId": null, diff --git a/substrate-node/chainspecs/main/chainSpec.json b/substrate-node/chainspecs/main/chainSpec.json index 9ae76eadb..282d7f206 100644 --- a/substrate-node/chainspecs/main/chainSpec.json +++ b/substrate-node/chainspecs/main/chainSpec.json @@ -1,8 +1,15 @@ { "name": "Tfchain Mainnet", "id": "tfchain_mainnet", - "chainType": "Local", - "bootNodes": [], + "chainType": "Live", + "bootNodes": [ + "/dns/01.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWPswftbG27wBn9dnz4ccQpdSQ6ynW6wa87BmsHhcsphja", + "/dns/02.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWAfLdFkWsqGzqA51njgm3st7maawbcFwc2ALXsMk8VV1z", + "/dns/03.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWBZqpGHjVbukqctNBmkgwrP4bSHDisojpCxbt71BNQ47y", + "/dns/04.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooW9xtmpd6BWWqbbbG9JMRUwQnfpHiRUteEdkPpc3UsiAw5", + "/dns/05.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWE19pLyW7LHkCDQPttrkDtquNt89LLUZtpXayv2Uc8dd2", + "/dns/06.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWKwZcU3S3Wwu1ppgk5FrFcdUVcT3LUZTMsGdxodMVAtT1" + ], "telemetryEndpoints": null, "protocolId": null, "properties": { diff --git a/substrate-node/chainspecs/main/chainSpecRaw.json b/substrate-node/chainspecs/main/chainSpecRaw.json index f784b2956..91370a628 100644 --- a/substrate-node/chainspecs/main/chainSpecRaw.json +++ b/substrate-node/chainspecs/main/chainSpecRaw.json @@ -1,8 +1,15 @@ { "name": "Tfchain Mainnet", "id": "tfchain_mainnet", - "chainType": "Local", - "bootNodes": [], + "chainType": "Live", + "bootNodes": [ + "/dns/01.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWPswftbG27wBn9dnz4ccQpdSQ6ynW6wa87BmsHhcsphja", + "/dns/02.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWAfLdFkWsqGzqA51njgm3st7maawbcFwc2ALXsMk8VV1z", + "/dns/03.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWBZqpGHjVbukqctNBmkgwrP4bSHDisojpCxbt71BNQ47y", + "/dns/04.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooW9xtmpd6BWWqbbbG9JMRUwQnfpHiRUteEdkPpc3UsiAw5", + "/dns/05.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWE19pLyW7LHkCDQPttrkDtquNt89LLUZtpXayv2Uc8dd2", + "/dns/06.bootnode.main.grid.tf/tcp/30333/ws/p2p/12D3KooWKwZcU3S3Wwu1ppgk5FrFcdUVcT3LUZTMsGdxodMVAtT1" + ], "telemetryEndpoints": null, "protocolId": null, "properties": { diff --git a/substrate-node/chainspecs/qanet/chainSpec.json b/substrate-node/chainspecs/qanet/chainSpec.json index e8358cbf2..e6312477f 100644 --- a/substrate-node/chainspecs/qanet/chainSpec.json +++ b/substrate-node/chainspecs/qanet/chainSpec.json @@ -1,11 +1,10 @@ { "name": "TF Chain QAnet", "id": "tfchain_qa_net", - "chainType": "Local", + "chainType": "Live", "bootNodes": [ - "/ip4/185.206.122.7/tcp/30334/p2p/12D3KooWSCFtAPQRRa5uw2QhwsC77NfCv1mxHJjWQhUrRANkoYyx", - "/ip4/185.206.122.221/tcp/30333/p2p/12D3KooWP77QXcz6DcSn98udtbrirgfefjLRE9w5t5sYUxZTz8WX", - "/ip4/185.206.122.222/tcp/30333/p2p/12D3KooWMq6SvUY8tU26MYjyjLwbJL3p5oSnNCuFV8cDT2C9tr4R" + "/dns/01.bootnode.qa.grid.tf/tcp/30333/ws/p2p/12D3KooWCxk23wdThnKKrr4aDeusSDDh8NCPYM6RkBi1LgkCTVVX", + "/dns/02.bootnode.qa.grid.tf/tcp/30333/ws/p2p/12D3KooWCNQfhDVL13BhDYDuFm1LWXS5SUPzaJ8DkisVaDoSia6H" ], "telemetryEndpoints": null, "protocolId": null, diff --git a/substrate-node/chainspecs/qanet/chainSpecRaw.json b/substrate-node/chainspecs/qanet/chainSpecRaw.json index e8efd73cc..14965056f 100644 --- a/substrate-node/chainspecs/qanet/chainSpecRaw.json +++ b/substrate-node/chainspecs/qanet/chainSpecRaw.json @@ -1,11 +1,10 @@ { "name": "TF Chain QAnet", "id": "tfchain_qa_net", - "chainType": "Local", + "chainType": "Live", "bootNodes": [ - "/ip4/185.206.122.7/tcp/30334/p2p/12D3KooWSCFtAPQRRa5uw2QhwsC77NfCv1mxHJjWQhUrRANkoYyx", - "/ip4/185.206.122.221/tcp/30333/p2p/12D3KooWP77QXcz6DcSn98udtbrirgfefjLRE9w5t5sYUxZTz8WX", - "/ip4/185.206.122.222/tcp/30333/p2p/12D3KooWMq6SvUY8tU26MYjyjLwbJL3p5oSnNCuFV8cDT2C9tr4R" + "/dns/01.bootnode.qa.grid.tf/tcp/30333/ws/p2p/12D3KooWCxk23wdThnKKrr4aDeusSDDh8NCPYM6RkBi1LgkCTVVX", + "/dns/02.bootnode.qa.grid.tf/tcp/30333/ws/p2p/12D3KooWCNQfhDVL13BhDYDuFm1LWXS5SUPzaJ8DkisVaDoSia6H" ], "telemetryEndpoints": null, "protocolId": null, diff --git a/substrate-node/chainspecs/test/chainSpec.json b/substrate-node/chainspecs/test/chainSpec.json index 6b1370503..6c3e06835 100644 --- a/substrate-node/chainspecs/test/chainSpec.json +++ b/substrate-node/chainspecs/test/chainSpec.json @@ -1,8 +1,11 @@ { "name": "Tfchain Testnet", "id": "tfchain_testnet", - "chainType": "Local", - "bootNodes": [], + "chainType": "Live", + "bootNodes": [ + "/dns/01.bootnode.test.grid.tf/tcp/30333/ws/p2p/12D3KooWBPGEVpQcCo7LcYp3PZdTojkub2TQZf4fzisznxtV7XhG", + "/dns/02.bootnode.test.grid.tf/tcp/30333/ws/p2p/12D3KooWLkEMTViyC1fzU8FzT9HGQtroZZVUaeGP4JQo2fVF9B22" + ], "telemetryEndpoints": null, "protocolId": null, "properties": { diff --git a/substrate-node/chainspecs/test/chainSpecRaw.json b/substrate-node/chainspecs/test/chainSpecRaw.json index f5e624708..c6757abdb 100644 --- a/substrate-node/chainspecs/test/chainSpecRaw.json +++ b/substrate-node/chainspecs/test/chainSpecRaw.json @@ -1,8 +1,11 @@ { "name": "Tfchain Testnet", "id": "tfchain_testnet", - "chainType": "Local", - "bootNodes": [], + "chainType": "Live", + "bootNodes": [ + "/dns/01.bootnode.test.grid.tf/tcp/30333/ws/p2p/12D3KooWBPGEVpQcCo7LcYp3PZdTojkub2TQZf4fzisznxtV7XhG", + "/dns/02.bootnode.test.grid.tf/tcp/30333/ws/p2p/12D3KooWLkEMTViyC1fzU8FzT9HGQtroZZVUaeGP4JQo2fVF9B22" + ], "telemetryEndpoints": null, "protocolId": null, "properties": { From 3e7c91200773d796981d3f6472c809e07632de4c Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Tue, 28 May 2024 15:11:00 -0300 Subject: [PATCH 32/44] feat(pallet-tfgrid): allow `hdd only` nodes to register on chain (#971) --- clients/tfchain-client-go/utils.go | 1 + .../pallets/pallet-burning/src/weights.rs | 12 +- .../pallets/pallet-dao/src/weights.rs | 36 +-- .../pallets/pallet-kvstore/src/weights.rs | 20 +- .../pallet-smart-contract/src/weights.rs | 188 ++++++------- .../pallets/pallet-tfgrid/src/lib.rs | 2 + .../pallets/pallet-tfgrid/src/node.rs | 3 +- .../pallets/pallet-tfgrid/src/weights.rs | 260 +++++++++--------- .../pallets/pallet-tft-bridge/src/weights.rs | 92 +++---- .../pallets/pallet-tft-price/src/weights.rs | 28 +- .../pallets/pallet-validator/src/weights.rs | 52 ++-- .../substrate-validator-set/src/weights.rs | 28 +- substrate-node/support/src/resources.rs | 12 +- substrate-node/support/src/tests.rs | 32 ++- 14 files changed, 402 insertions(+), 364 deletions(-) diff --git a/clients/tfchain-client-go/utils.go b/clients/tfchain-client-go/utils.go index 1151a489d..af13735c6 100644 --- a/clients/tfchain-client-go/utils.go +++ b/clients/tfchain-client-go/utils.go @@ -246,6 +246,7 @@ var tfgridModuleErrors = []string{ "NodeHasActiveContracts", "InvalidRelayAddress", "InvalidTimestampHint", + "InvalidStorageInput", } // https://github.com/threefoldtech/tfchain/blob/development/substrate-node/pallets/pallet-tft-bridge/src/lib.rs#L152 diff --git a/substrate-node/pallets/pallet-burning/src/weights.rs b/substrate-node/pallets/pallet-burning/src/weights.rs index d98c3e26b..0a0354124 100644 --- a/substrate-node/pallets/pallet-burning/src/weights.rs +++ b/substrate-node/pallets/pallet-burning/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_burning //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -45,8 +45,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 42_280_000 picoseconds. - Weight::from_parts(42_982_000, 1594) + // Minimum execution time: 27_162_000 picoseconds. + Weight::from_parts(27_532_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -60,8 +60,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 42_280_000 picoseconds. - Weight::from_parts(42_982_000, 1594) + // Minimum execution time: 27_162_000 picoseconds. + Weight::from_parts(27_532_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/pallets/pallet-dao/src/weights.rs b/substrate-node/pallets/pallet-dao/src/weights.rs index 0adb7f7bc..2ebca45d3 100644 --- a/substrate-node/pallets/pallet-dao/src/weights.rs +++ b/substrate-node/pallets/pallet-dao/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_dao //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -58,8 +58,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `208` // Estimated: `4687` - // Minimum execution time: 60_124_000 picoseconds. - Weight::from_parts(61_897_000, 4687) + // Minimum execution time: 19_226_000 picoseconds. + Weight::from_parts(19_677_000, 4687) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -77,8 +77,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `979` // Estimated: `4444` - // Minimum execution time: 35_097_000 picoseconds. - Weight::from_parts(35_647_000, 4444) + // Minimum execution time: 26_420_000 picoseconds. + Weight::from_parts(26_761_000, 4444) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -92,8 +92,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `487` // Estimated: `4687` - // Minimum execution time: 25_068_000 picoseconds. - Weight::from_parts(25_618_000, 4687) + // Minimum execution time: 18_605_000 picoseconds. + Weight::from_parts(18_945_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -111,8 +111,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `469` // Estimated: `4687` - // Minimum execution time: 34_275_000 picoseconds. - Weight::from_parts(34_786_000, 4687) + // Minimum execution time: 23_945_000 picoseconds. + Weight::from_parts(24_396_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -136,8 +136,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `208` // Estimated: `4687` - // Minimum execution time: 60_124_000 picoseconds. - Weight::from_parts(61_897_000, 4687) + // Minimum execution time: 19_226_000 picoseconds. + Weight::from_parts(19_677_000, 4687) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -155,8 +155,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `979` // Estimated: `4444` - // Minimum execution time: 35_097_000 picoseconds. - Weight::from_parts(35_647_000, 4444) + // Minimum execution time: 26_420_000 picoseconds. + Weight::from_parts(26_761_000, 4444) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -170,8 +170,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `487` // Estimated: `4687` - // Minimum execution time: 25_068_000 picoseconds. - Weight::from_parts(25_618_000, 4687) + // Minimum execution time: 18_605_000 picoseconds. + Weight::from_parts(18_945_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -189,8 +189,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `469` // Estimated: `4687` - // Minimum execution time: 34_275_000 picoseconds. - Weight::from_parts(34_786_000, 4687) + // Minimum execution time: 23_945_000 picoseconds. + Weight::from_parts(24_396_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/substrate-node/pallets/pallet-kvstore/src/weights.rs b/substrate-node/pallets/pallet-kvstore/src/weights.rs index 2508659b7..0bc1314a1 100644 --- a/substrate-node/pallets/pallet-kvstore/src/weights.rs +++ b/substrate-node/pallets/pallet-kvstore/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_kvstore //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -46,8 +46,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_647_000 picoseconds. - Weight::from_parts(11_722_000, 0) + // Minimum execution time: 6_763_000 picoseconds. + Weight::from_parts(7_043_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFKVStore::TFKVStore` (r:1 w:1) @@ -56,8 +56,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3611` - // Minimum execution time: 20_228_000 picoseconds. - Weight::from_parts(21_210_000, 3611) + // Minimum execution time: 12_313_000 picoseconds. + Weight::from_parts(12_654_000, 3611) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -71,8 +71,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_647_000 picoseconds. - Weight::from_parts(11_722_000, 0) + // Minimum execution time: 6_763_000 picoseconds. + Weight::from_parts(7_043_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFKVStore::TFKVStore` (r:1 w:1) @@ -81,8 +81,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3611` - // Minimum execution time: 20_228_000 picoseconds. - Weight::from_parts(21_210_000, 3611) + // Minimum execution time: 12_313_000 picoseconds. + Weight::from_parts(12_654_000, 3611) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/pallets/pallet-smart-contract/src/weights.rs b/substrate-node/pallets/pallet-smart-contract/src/weights.rs index efdc05598..79f4310bf 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/weights.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_smart_contract //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -95,8 +95,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `868` // Estimated: `4333` - // Minimum execution time: 102_203_000 picoseconds. - Weight::from_parts(104_197_000, 4333) + // Minimum execution time: 48_782_000 picoseconds. + Weight::from_parts(49_754_000, 4333) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -112,8 +112,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `892` // Estimated: `4357` - // Minimum execution time: 26_891_000 picoseconds. - Weight::from_parts(27_472_000, 4357) + // Minimum execution time: 27_191_000 picoseconds. + Weight::from_parts(27_723_000, 4357) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -145,8 +145,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 60_284_000 picoseconds. - Weight::from_parts(61_346_000, 4668) + // Minimum execution time: 61_075_000 picoseconds. + Weight::from_parts(62_097_000, 4668) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -170,8 +170,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3805` - // Minimum execution time: 24_977_000 picoseconds. - Weight::from_parts(25_658_000, 3805) + // Minimum execution time: 24_636_000 picoseconds. + Weight::from_parts(25_037_000, 3805) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -197,8 +197,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `919` // Estimated: `4384` - // Minimum execution time: 46_538_000 picoseconds. - Weight::from_parts(47_230_000, 4384) + // Minimum execution time: 46_498_000 picoseconds. + Weight::from_parts(47_310_000, 4384) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -220,8 +220,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1292` // Estimated: `4757` - // Minimum execution time: 38_072_000 picoseconds. - Weight::from_parts(38_763_000, 4757) + // Minimum execution time: 38_082_000 picoseconds. + Weight::from_parts(39_114_000, 4757) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -237,8 +237,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `771` // Estimated: `4236` - // Minimum execution time: 23_194_000 picoseconds. - Weight::from_parts(23_485_000, 4236) + // Minimum execution time: 23_054_000 picoseconds. + Weight::from_parts(23_495_000, 4236) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -268,8 +268,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `776` // Estimated: `4241` - // Minimum execution time: 34_876_000 picoseconds. - Weight::from_parts(35_417_000, 4241) + // Minimum execution time: 35_056_000 picoseconds. + Weight::from_parts(35_547_000, 4241) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -303,8 +303,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1284` // Estimated: `4749` - // Minimum execution time: 60_275_000 picoseconds. - Weight::from_parts(60_955_000, 4749) + // Minimum execution time: 60_054_000 picoseconds. + Weight::from_parts(60_945_000, 4749) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -316,8 +316,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 10_290_000 picoseconds. - Weight::from_parts(10_560_000, 1522) + // Minimum execution time: 9_808_000 picoseconds. + Weight::from_parts(10_179_000, 1522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -327,8 +327,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3680` - // Minimum execution time: 13_215_000 picoseconds. - Weight::from_parts(13_535_000, 3680) + // Minimum execution time: 12_614_000 picoseconds. + Weight::from_parts(13_024_000, 3680) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -368,8 +368,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1608` // Estimated: `5073` - // Minimum execution time: 80_642_000 picoseconds. - Weight::from_parts(81_735_000, 5073) + // Minimum execution time: 80_311_000 picoseconds. + Weight::from_parts(81_725_000, 5073) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -383,8 +383,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `395` // Estimated: `6335` - // Minimum execution time: 18_926_000 picoseconds. - Weight::from_parts(19_386_000, 6335) + // Minimum execution time: 18_405_000 picoseconds. + Weight::from_parts(18_976_000, 6335) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -396,8 +396,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_892_000 picoseconds. - Weight::from_parts(17_293_000, 3954) + // Minimum execution time: 16_491_000 picoseconds. + Weight::from_parts(16_752_000, 3954) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -409,8 +409,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_562_000 picoseconds. - Weight::from_parts(16_732_000, 3954) + // Minimum execution time: 16_351_000 picoseconds. + Weight::from_parts(16_602_000, 3954) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -422,8 +422,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_821_000 picoseconds. - Weight::from_parts(17_292_000, 3967) + // Minimum execution time: 16_602_000 picoseconds. + Weight::from_parts(16_782_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -435,8 +435,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 17_693_000 picoseconds. - Weight::from_parts(18_014_000, 3967) + // Minimum execution time: 17_192_000 picoseconds. + Weight::from_parts(17_733_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -448,8 +448,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_401_000 picoseconds. - Weight::from_parts(16_662_000, 3967) + // Minimum execution time: 15_990_000 picoseconds. + Weight::from_parts(16_492_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -467,8 +467,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `841` // Estimated: `6781` - // Minimum execution time: 30_327_000 picoseconds. - Weight::from_parts(31_189_000, 6781) + // Minimum execution time: 30_478_000 picoseconds. + Weight::from_parts(30_958_000, 6781) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -478,8 +478,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 7_855_000 picoseconds. - Weight::from_parts(8_076_000, 1522) + // Minimum execution time: 7_754_000 picoseconds. + Weight::from_parts(7_965_000, 1522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -493,8 +493,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `971` // Estimated: `4436` - // Minimum execution time: 22_222_000 picoseconds. - Weight::from_parts(22_462_000, 4436) + // Minimum execution time: 21_721_000 picoseconds. + Weight::from_parts(22_172_000, 4436) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -514,8 +514,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 23_424_000 picoseconds. - Weight::from_parts(23_775_000, 4198) + // Minimum execution time: 23_384_000 picoseconds. + Weight::from_parts(24_056_000, 4198) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -547,8 +547,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 58_861_000 picoseconds. - Weight::from_parts(59_413_000, 4668) + // Minimum execution time: 59_172_000 picoseconds. + Weight::from_parts(60_705_000, 4668) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -590,8 +590,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `868` // Estimated: `4333` - // Minimum execution time: 102_203_000 picoseconds. - Weight::from_parts(104_197_000, 4333) + // Minimum execution time: 48_782_000 picoseconds. + Weight::from_parts(49_754_000, 4333) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } @@ -607,8 +607,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `892` // Estimated: `4357` - // Minimum execution time: 26_891_000 picoseconds. - Weight::from_parts(27_472_000, 4357) + // Minimum execution time: 27_191_000 picoseconds. + Weight::from_parts(27_723_000, 4357) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -640,8 +640,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 60_284_000 picoseconds. - Weight::from_parts(61_346_000, 4668) + // Minimum execution time: 61_075_000 picoseconds. + Weight::from_parts(62_097_000, 4668) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -665,8 +665,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3805` - // Minimum execution time: 24_977_000 picoseconds. - Weight::from_parts(25_658_000, 3805) + // Minimum execution time: 24_636_000 picoseconds. + Weight::from_parts(25_037_000, 3805) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -692,8 +692,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `919` // Estimated: `4384` - // Minimum execution time: 46_538_000 picoseconds. - Weight::from_parts(47_230_000, 4384) + // Minimum execution time: 46_498_000 picoseconds. + Weight::from_parts(47_310_000, 4384) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -715,8 +715,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1292` // Estimated: `4757` - // Minimum execution time: 38_072_000 picoseconds. - Weight::from_parts(38_763_000, 4757) + // Minimum execution time: 38_082_000 picoseconds. + Weight::from_parts(39_114_000, 4757) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -732,8 +732,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `771` // Estimated: `4236` - // Minimum execution time: 23_194_000 picoseconds. - Weight::from_parts(23_485_000, 4236) + // Minimum execution time: 23_054_000 picoseconds. + Weight::from_parts(23_495_000, 4236) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -763,8 +763,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `776` // Estimated: `4241` - // Minimum execution time: 34_876_000 picoseconds. - Weight::from_parts(35_417_000, 4241) + // Minimum execution time: 35_056_000 picoseconds. + Weight::from_parts(35_547_000, 4241) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -798,8 +798,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1284` // Estimated: `4749` - // Minimum execution time: 60_275_000 picoseconds. - Weight::from_parts(60_955_000, 4749) + // Minimum execution time: 60_054_000 picoseconds. + Weight::from_parts(60_945_000, 4749) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -811,8 +811,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 10_290_000 picoseconds. - Weight::from_parts(10_560_000, 1522) + // Minimum execution time: 9_808_000 picoseconds. + Weight::from_parts(10_179_000, 1522) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -822,8 +822,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3680` - // Minimum execution time: 13_215_000 picoseconds. - Weight::from_parts(13_535_000, 3680) + // Minimum execution time: 12_614_000 picoseconds. + Weight::from_parts(13_024_000, 3680) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -863,8 +863,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1608` // Estimated: `5073` - // Minimum execution time: 80_642_000 picoseconds. - Weight::from_parts(81_735_000, 5073) + // Minimum execution time: 80_311_000 picoseconds. + Weight::from_parts(81_725_000, 5073) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -878,8 +878,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `395` // Estimated: `6335` - // Minimum execution time: 18_926_000 picoseconds. - Weight::from_parts(19_386_000, 6335) + // Minimum execution time: 18_405_000 picoseconds. + Weight::from_parts(18_976_000, 6335) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -891,8 +891,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_892_000 picoseconds. - Weight::from_parts(17_293_000, 3954) + // Minimum execution time: 16_491_000 picoseconds. + Weight::from_parts(16_752_000, 3954) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -904,8 +904,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_562_000 picoseconds. - Weight::from_parts(16_732_000, 3954) + // Minimum execution time: 16_351_000 picoseconds. + Weight::from_parts(16_602_000, 3954) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -917,8 +917,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_821_000 picoseconds. - Weight::from_parts(17_292_000, 3967) + // Minimum execution time: 16_602_000 picoseconds. + Weight::from_parts(16_782_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -930,8 +930,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 17_693_000 picoseconds. - Weight::from_parts(18_014_000, 3967) + // Minimum execution time: 17_192_000 picoseconds. + Weight::from_parts(17_733_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -943,8 +943,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_401_000 picoseconds. - Weight::from_parts(16_662_000, 3967) + // Minimum execution time: 15_990_000 picoseconds. + Weight::from_parts(16_492_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -962,8 +962,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `841` // Estimated: `6781` - // Minimum execution time: 30_327_000 picoseconds. - Weight::from_parts(31_189_000, 6781) + // Minimum execution time: 30_478_000 picoseconds. + Weight::from_parts(30_958_000, 6781) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -973,8 +973,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 7_855_000 picoseconds. - Weight::from_parts(8_076_000, 1522) + // Minimum execution time: 7_754_000 picoseconds. + Weight::from_parts(7_965_000, 1522) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -988,8 +988,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `971` // Estimated: `4436` - // Minimum execution time: 22_222_000 picoseconds. - Weight::from_parts(22_462_000, 4436) + // Minimum execution time: 21_721_000 picoseconds. + Weight::from_parts(22_172_000, 4436) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1009,8 +1009,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 23_424_000 picoseconds. - Weight::from_parts(23_775_000, 4198) + // Minimum execution time: 23_384_000 picoseconds. + Weight::from_parts(24_056_000, 4198) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1042,8 +1042,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 58_861_000 picoseconds. - Weight::from_parts(59_413_000, 4668) + // Minimum execution time: 59_172_000 picoseconds. + Weight::from_parts(60_705_000, 4668) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } diff --git a/substrate-node/pallets/pallet-tfgrid/src/lib.rs b/substrate-node/pallets/pallet-tfgrid/src/lib.rs index 1fea9fcca..55c032ef9 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/lib.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/lib.rs @@ -572,6 +572,8 @@ pub mod pallet { NodeHasActiveContracts, InvalidRelayAddress, InvalidTimestampHint, + + InvalidStorageInput, } #[pallet::genesis_config] diff --git a/substrate-node/pallets/pallet-tfgrid/src/node.rs b/substrate-node/pallets/pallet-tfgrid/src/node.rs index 2a219319b..caf4e369f 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/node.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/node.rs @@ -392,8 +392,7 @@ impl Pallet { fn get_resources( resources: pallet::ResourcesInput, ) -> Result { - ensure!(resources.validate_hru(), Error::::InvalidHRUInput); - ensure!(resources.validate_sru(), Error::::InvalidSRUInput); + ensure!(resources.validate_storage(), Error::::InvalidStorageInput); ensure!(resources.validate_cru(), Error::::InvalidCRUInput); ensure!(resources.validate_mru(), Error::::InvalidMRUInput); diff --git a/substrate-node/pallets/pallet-tfgrid/src/weights.rs b/substrate-node/pallets/pallet-tfgrid/src/weights.rs index 1e883699a..dba3a9033 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/weights.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_tfgrid //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -76,8 +76,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_857_000 picoseconds. - Weight::from_parts(4_047_000, 0) + // Minimum execution time: 2_555_000 picoseconds. + Weight::from_parts(2_625_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) @@ -94,8 +94,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `496` // Estimated: `3961` - // Minimum execution time: 32_251_000 picoseconds. - Weight::from_parts(32_712_000, 3961) + // Minimum execution time: 19_907_000 picoseconds. + Weight::from_parts(20_369_000, 3961) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -109,8 +109,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `507` // Estimated: `3972` - // Minimum execution time: 34_135_000 picoseconds. - Weight::from_parts(35_327_000, 3972) + // Minimum execution time: 21_481_000 picoseconds. + Weight::from_parts(21_921_000, 3972) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -124,8 +124,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `453` // Estimated: `3918` - // Minimum execution time: 18_865_000 picoseconds. - Weight::from_parts(25_378_000, 3918) + // Minimum execution time: 15_690_000 picoseconds. + Weight::from_parts(16_100_000, 3918) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -135,8 +135,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_105_000 picoseconds. - Weight::from_parts(13_406_000, 3877) + // Minimum execution time: 13_024_000 picoseconds. + Weight::from_parts(13_345_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -148,8 +148,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 17_734_000 picoseconds. - Weight::from_parts(18_165_000, 4034) + // Minimum execution time: 17_704_000 picoseconds. + Weight::from_parts(17_894_000, 4034) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -161,8 +161,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 16_922_000 picoseconds. - Weight::from_parts(17_473_000, 4034) + // Minimum execution time: 16_992_000 picoseconds. + Weight::from_parts(17_153_000, 4034) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -190,8 +190,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `905` // Estimated: `11795` - // Minimum execution time: 47_360_000 picoseconds. - Weight::from_parts(48_562_000, 11795) + // Minimum execution time: 47_981_000 picoseconds. + Weight::from_parts(49_514_000, 11795) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -207,8 +207,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `661` // Estimated: `4126` - // Minimum execution time: 27_062_000 picoseconds. - Weight::from_parts(27_723_000, 4126) + // Minimum execution time: 26_710_000 picoseconds. + Weight::from_parts(27_422_000, 4126) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -222,8 +222,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `956` // Estimated: `11846` - // Minimum execution time: 34_295_000 picoseconds. - Weight::from_parts(35_096_000, 11846) + // Minimum execution time: 34_064_000 picoseconds. + Weight::from_parts(34_926_000, 11846) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -239,8 +239,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 18_635_000 picoseconds. - Weight::from_parts(19_006_000, 3919) + // Minimum execution time: 18_475_000 picoseconds. + Weight::from_parts(18_886_000, 3919) .saturating_add(T::DbWeight::get().reads(4_u64)) } /// Storage: `TfgridModule::Farms` (r:1 w:0) @@ -253,8 +253,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779` // Estimated: `4244` - // Minimum execution time: 24_637_000 picoseconds. - Weight::from_parts(25_277_000, 4244) + // Minimum execution time: 24_246_000 picoseconds. + Weight::from_parts(24_957_000, 4244) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -274,8 +274,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `682` // Estimated: `4147` - // Minimum execution time: 27_362_000 picoseconds. - Weight::from_parts(27_943_000, 4147) + // Minimum execution time: 27_592_000 picoseconds. + Weight::from_parts(28_203_000, 4147) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -291,8 +291,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 14_568_000 picoseconds. - Weight::from_parts(14_808_000, 3700) + // Minimum execution time: 14_087_000 picoseconds. + Weight::from_parts(14_357_000, 3700) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -304,8 +304,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3893` - // Minimum execution time: 15_088_000 picoseconds. - Weight::from_parts(15_479_000, 3893) + // Minimum execution time: 14_868_000 picoseconds. + Weight::from_parts(15_249_000, 3893) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -319,8 +319,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `3599` - // Minimum execution time: 12_373_000 picoseconds. - Weight::from_parts(12_624_000, 3599) + // Minimum execution time: 12_093_000 picoseconds. + Weight::from_parts(12_463_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -334,8 +334,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `382` // Estimated: `3847` - // Minimum execution time: 16_632_000 picoseconds. - Weight::from_parts(17_143_000, 3847) + // Minimum execution time: 16_180_000 picoseconds. + Weight::from_parts(16_611_000, 3847) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -347,8 +347,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 10_439_000 picoseconds. - Weight::from_parts(10_610_000, 1619) + // Minimum execution time: 10_150_000 picoseconds. + Weight::from_parts(10_430_000, 1619) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -360,8 +360,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3605` - // Minimum execution time: 7_514_000 picoseconds. - Weight::from_parts(7_644_000, 3605) + // Minimum execution time: 7_364_000 picoseconds. + Weight::from_parts(7_504_000, 3605) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -385,8 +385,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `828` // Estimated: `4293` - // Minimum execution time: 32_582_000 picoseconds. - Weight::from_parts(33_443_000, 4293) + // Minimum execution time: 32_271_000 picoseconds. + Weight::from_parts(32_913_000, 4293) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -396,8 +396,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_716_000 picoseconds. - Weight::from_parts(14_277_000, 3877) + // Minimum execution time: 13_174_000 picoseconds. + Weight::from_parts(13_505_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -407,8 +407,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_846_000 picoseconds. - Weight::from_parts(14_117_000, 3877) + // Minimum execution time: 13_515_000 picoseconds. + Weight::from_parts(13_796_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -418,8 +418,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_721_000 picoseconds. - Weight::from_parts(5_861_000, 0) + // Minimum execution time: 5_551_000 picoseconds. + Weight::from_parts(5_721_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) @@ -428,8 +428,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `355` // Estimated: `1840` - // Minimum execution time: 9_819_000 picoseconds. - Weight::from_parts(10_039_000, 1840) + // Minimum execution time: 9_478_000 picoseconds. + Weight::from_parts(9_668_000, 1840) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -439,8 +439,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `413` // Estimated: `1898` - // Minimum execution time: 11_982_000 picoseconds. - Weight::from_parts(12_323_000, 1898) + // Minimum execution time: 11_772_000 picoseconds. + Weight::from_parts(12_133_000, 1898) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -450,8 +450,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `294` // Estimated: `3759` - // Minimum execution time: 13_335_000 picoseconds. - Weight::from_parts(13_675_000, 3759) + // Minimum execution time: 12_985_000 picoseconds. + Weight::from_parts(13_175_000, 3759) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -465,8 +465,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `572` // Estimated: `4037` - // Minimum execution time: 22_172_000 picoseconds. - Weight::from_parts(22_693_000, 4037) + // Minimum execution time: 21_661_000 picoseconds. + Weight::from_parts(22_332_000, 4037) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -476,8 +476,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 8_055_000 picoseconds. - Weight::from_parts(8_216_000, 1619) + // Minimum execution time: 7_894_000 picoseconds. + Weight::from_parts(8_075_000, 1619) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -493,8 +493,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `621` // Estimated: `4086` - // Minimum execution time: 22_723_000 picoseconds. - Weight::from_parts(23_154_000, 4086) + // Minimum execution time: 22_282_000 picoseconds. + Weight::from_parts(22_843_000, 4086) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -514,8 +514,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792` // Estimated: `4257` - // Minimum execution time: 26_440_000 picoseconds. - Weight::from_parts(27_042_000, 4257) + // Minimum execution time: 25_709_000 picoseconds. + Weight::from_parts(26_310_000, 4257) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -527,8 +527,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `387` // Estimated: `3852` - // Minimum execution time: 11_832_000 picoseconds. - Weight::from_parts(12_083_000, 3852) + // Minimum execution time: 11_652_000 picoseconds. + Weight::from_parts(12_063_000, 3852) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -544,8 +544,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 18_144_000 picoseconds. - Weight::from_parts(18_385_000, 3919) + // Minimum execution time: 17_613_000 picoseconds. + Weight::from_parts(18_114_000, 3919) .saturating_add(T::DbWeight::get().reads(4_u64)) } } @@ -558,8 +558,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_857_000 picoseconds. - Weight::from_parts(4_047_000, 0) + // Minimum execution time: 2_555_000 picoseconds. + Weight::from_parts(2_625_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) @@ -576,8 +576,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `496` // Estimated: `3961` - // Minimum execution time: 32_251_000 picoseconds. - Weight::from_parts(32_712_000, 3961) + // Minimum execution time: 19_907_000 picoseconds. + Weight::from_parts(20_369_000, 3961) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -591,8 +591,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `507` // Estimated: `3972` - // Minimum execution time: 34_135_000 picoseconds. - Weight::from_parts(35_327_000, 3972) + // Minimum execution time: 21_481_000 picoseconds. + Weight::from_parts(21_921_000, 3972) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -606,8 +606,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `453` // Estimated: `3918` - // Minimum execution time: 18_865_000 picoseconds. - Weight::from_parts(25_378_000, 3918) + // Minimum execution time: 15_690_000 picoseconds. + Weight::from_parts(16_100_000, 3918) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -617,8 +617,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_105_000 picoseconds. - Weight::from_parts(13_406_000, 3877) + // Minimum execution time: 13_024_000 picoseconds. + Weight::from_parts(13_345_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -630,8 +630,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 17_734_000 picoseconds. - Weight::from_parts(18_165_000, 4034) + // Minimum execution time: 17_704_000 picoseconds. + Weight::from_parts(17_894_000, 4034) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -643,8 +643,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 16_922_000 picoseconds. - Weight::from_parts(17_473_000, 4034) + // Minimum execution time: 16_992_000 picoseconds. + Weight::from_parts(17_153_000, 4034) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -672,8 +672,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `905` // Estimated: `11795` - // Minimum execution time: 47_360_000 picoseconds. - Weight::from_parts(48_562_000, 11795) + // Minimum execution time: 47_981_000 picoseconds. + Weight::from_parts(49_514_000, 11795) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -689,8 +689,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `661` // Estimated: `4126` - // Minimum execution time: 27_062_000 picoseconds. - Weight::from_parts(27_723_000, 4126) + // Minimum execution time: 26_710_000 picoseconds. + Weight::from_parts(27_422_000, 4126) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -704,8 +704,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `956` // Estimated: `11846` - // Minimum execution time: 34_295_000 picoseconds. - Weight::from_parts(35_096_000, 11846) + // Minimum execution time: 34_064_000 picoseconds. + Weight::from_parts(34_926_000, 11846) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -721,8 +721,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 18_635_000 picoseconds. - Weight::from_parts(19_006_000, 3919) + // Minimum execution time: 18_475_000 picoseconds. + Weight::from_parts(18_886_000, 3919) .saturating_add(RocksDbWeight::get().reads(4_u64)) } /// Storage: `TfgridModule::Farms` (r:1 w:0) @@ -735,8 +735,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779` // Estimated: `4244` - // Minimum execution time: 24_637_000 picoseconds. - Weight::from_parts(25_277_000, 4244) + // Minimum execution time: 24_246_000 picoseconds. + Weight::from_parts(24_957_000, 4244) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -756,8 +756,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `682` // Estimated: `4147` - // Minimum execution time: 27_362_000 picoseconds. - Weight::from_parts(27_943_000, 4147) + // Minimum execution time: 27_592_000 picoseconds. + Weight::from_parts(28_203_000, 4147) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -773,8 +773,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 14_568_000 picoseconds. - Weight::from_parts(14_808_000, 3700) + // Minimum execution time: 14_087_000 picoseconds. + Weight::from_parts(14_357_000, 3700) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -786,8 +786,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3893` - // Minimum execution time: 15_088_000 picoseconds. - Weight::from_parts(15_479_000, 3893) + // Minimum execution time: 14_868_000 picoseconds. + Weight::from_parts(15_249_000, 3893) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -801,8 +801,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `134` // Estimated: `3599` - // Minimum execution time: 12_373_000 picoseconds. - Weight::from_parts(12_624_000, 3599) + // Minimum execution time: 12_093_000 picoseconds. + Weight::from_parts(12_463_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -816,8 +816,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `382` // Estimated: `3847` - // Minimum execution time: 16_632_000 picoseconds. - Weight::from_parts(17_143_000, 3847) + // Minimum execution time: 16_180_000 picoseconds. + Weight::from_parts(16_611_000, 3847) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -829,8 +829,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 10_439_000 picoseconds. - Weight::from_parts(10_610_000, 1619) + // Minimum execution time: 10_150_000 picoseconds. + Weight::from_parts(10_430_000, 1619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -842,8 +842,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3605` - // Minimum execution time: 7_514_000 picoseconds. - Weight::from_parts(7_644_000, 3605) + // Minimum execution time: 7_364_000 picoseconds. + Weight::from_parts(7_504_000, 3605) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -867,8 +867,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `828` // Estimated: `4293` - // Minimum execution time: 32_582_000 picoseconds. - Weight::from_parts(33_443_000, 4293) + // Minimum execution time: 32_271_000 picoseconds. + Weight::from_parts(32_913_000, 4293) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -878,8 +878,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_716_000 picoseconds. - Weight::from_parts(14_277_000, 3877) + // Minimum execution time: 13_174_000 picoseconds. + Weight::from_parts(13_505_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -889,8 +889,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_846_000 picoseconds. - Weight::from_parts(14_117_000, 3877) + // Minimum execution time: 13_515_000 picoseconds. + Weight::from_parts(13_796_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -900,8 +900,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_721_000 picoseconds. - Weight::from_parts(5_861_000, 0) + // Minimum execution time: 5_551_000 picoseconds. + Weight::from_parts(5_721_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) @@ -910,8 +910,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `355` // Estimated: `1840` - // Minimum execution time: 9_819_000 picoseconds. - Weight::from_parts(10_039_000, 1840) + // Minimum execution time: 9_478_000 picoseconds. + Weight::from_parts(9_668_000, 1840) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -921,8 +921,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `413` // Estimated: `1898` - // Minimum execution time: 11_982_000 picoseconds. - Weight::from_parts(12_323_000, 1898) + // Minimum execution time: 11_772_000 picoseconds. + Weight::from_parts(12_133_000, 1898) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -932,8 +932,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `294` // Estimated: `3759` - // Minimum execution time: 13_335_000 picoseconds. - Weight::from_parts(13_675_000, 3759) + // Minimum execution time: 12_985_000 picoseconds. + Weight::from_parts(13_175_000, 3759) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -947,8 +947,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `572` // Estimated: `4037` - // Minimum execution time: 22_172_000 picoseconds. - Weight::from_parts(22_693_000, 4037) + // Minimum execution time: 21_661_000 picoseconds. + Weight::from_parts(22_332_000, 4037) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -958,8 +958,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 8_055_000 picoseconds. - Weight::from_parts(8_216_000, 1619) + // Minimum execution time: 7_894_000 picoseconds. + Weight::from_parts(8_075_000, 1619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -975,8 +975,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `621` // Estimated: `4086` - // Minimum execution time: 22_723_000 picoseconds. - Weight::from_parts(23_154_000, 4086) + // Minimum execution time: 22_282_000 picoseconds. + Weight::from_parts(22_843_000, 4086) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -996,8 +996,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792` // Estimated: `4257` - // Minimum execution time: 26_440_000 picoseconds. - Weight::from_parts(27_042_000, 4257) + // Minimum execution time: 25_709_000 picoseconds. + Weight::from_parts(26_310_000, 4257) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1009,8 +1009,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `387` // Estimated: `3852` - // Minimum execution time: 11_832_000 picoseconds. - Weight::from_parts(12_083_000, 3852) + // Minimum execution time: 11_652_000 picoseconds. + Weight::from_parts(12_063_000, 3852) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1026,8 +1026,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 18_144_000 picoseconds. - Weight::from_parts(18_385_000, 3919) + // Minimum execution time: 17_613_000 picoseconds. + Weight::from_parts(18_114_000, 3919) .saturating_add(RocksDbWeight::get().reads(4_u64)) } } diff --git a/substrate-node/pallets/pallet-tft-bridge/src/weights.rs b/substrate-node/pallets/pallet-tft-bridge/src/weights.rs index a1284a98e..780f318b8 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/weights.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_tft_bridge //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -55,8 +55,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `256` // Estimated: `1741` - // Minimum execution time: 15_099_000 picoseconds. - Weight::from_parts(16_281_000, 1741) + // Minimum execution time: 7_504_000 picoseconds. + Weight::from_parts(7_695_000, 1741) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -66,8 +66,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `289` // Estimated: `1774` - // Minimum execution time: 15_049_000 picoseconds. - Weight::from_parts(15_810_000, 1774) + // Minimum execution time: 7_404_000 picoseconds. + Weight::from_parts(7_655_000, 1774) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -77,8 +77,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_939_000 picoseconds. - Weight::from_parts(5_350_000, 0) + // Minimum execution time: 2_385_000 picoseconds. + Weight::from_parts(2_515_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:0 w:1) @@ -87,8 +87,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_729_000 picoseconds. - Weight::from_parts(4_939_000, 0) + // Minimum execution time: 2_324_000 picoseconds. + Weight::from_parts(2_395_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::DepositFee` (r:0 w:1) @@ -97,8 +97,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_739_000 picoseconds. - Weight::from_parts(4_980_000, 0) + // Minimum execution time: 2_304_000 picoseconds. + Weight::from_parts(2_405_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:1 w:0) @@ -115,8 +115,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3593` - // Minimum execution time: 43_242_000 picoseconds. - Weight::from_parts(43_893_000, 3593) + // Minimum execution time: 44_634_000 picoseconds. + Weight::from_parts(45_366_000, 3593) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -136,8 +136,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `499` // Estimated: `3964` - // Minimum execution time: 60_305_000 picoseconds. - Weight::from_parts(61_196_000, 3964) + // Minimum execution time: 62_268_000 picoseconds. + Weight::from_parts(63_359_000, 3964) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -151,8 +151,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `631` // Estimated: `4096` - // Minimum execution time: 25_719_000 picoseconds. - Weight::from_parts(26_300_000, 4096) + // Minimum execution time: 26_369_000 picoseconds. + Weight::from_parts(26_811_000, 4096) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -166,8 +166,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `571` // Estimated: `4036` - // Minimum execution time: 18_425_000 picoseconds. - Weight::from_parts(18_805_000, 4036) + // Minimum execution time: 18_816_000 picoseconds. + Weight::from_parts(19_237_000, 4036) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -179,8 +179,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `385` // Estimated: `3850` - // Minimum execution time: 21_671_000 picoseconds. - Weight::from_parts(22_232_000, 3850) + // Minimum execution time: 22_011_000 picoseconds. + Weight::from_parts(22_423_000, 3850) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -194,8 +194,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `560` // Estimated: `4025` - // Minimum execution time: 18_926_000 picoseconds. - Weight::from_parts(19_217_000, 4025) + // Minimum execution time: 19_286_000 picoseconds. + Weight::from_parts(19_847_000, 4025) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -209,8 +209,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `256` // Estimated: `1741` - // Minimum execution time: 15_099_000 picoseconds. - Weight::from_parts(16_281_000, 1741) + // Minimum execution time: 7_504_000 picoseconds. + Weight::from_parts(7_695_000, 1741) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -220,8 +220,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `289` // Estimated: `1774` - // Minimum execution time: 15_049_000 picoseconds. - Weight::from_parts(15_810_000, 1774) + // Minimum execution time: 7_404_000 picoseconds. + Weight::from_parts(7_655_000, 1774) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -231,8 +231,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_939_000 picoseconds. - Weight::from_parts(5_350_000, 0) + // Minimum execution time: 2_385_000 picoseconds. + Weight::from_parts(2_515_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:0 w:1) @@ -241,8 +241,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_729_000 picoseconds. - Weight::from_parts(4_939_000, 0) + // Minimum execution time: 2_324_000 picoseconds. + Weight::from_parts(2_395_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::DepositFee` (r:0 w:1) @@ -251,8 +251,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_739_000 picoseconds. - Weight::from_parts(4_980_000, 0) + // Minimum execution time: 2_304_000 picoseconds. + Weight::from_parts(2_405_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:1 w:0) @@ -269,8 +269,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3593` - // Minimum execution time: 43_242_000 picoseconds. - Weight::from_parts(43_893_000, 3593) + // Minimum execution time: 44_634_000 picoseconds. + Weight::from_parts(45_366_000, 3593) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -290,8 +290,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `499` // Estimated: `3964` - // Minimum execution time: 60_305_000 picoseconds. - Weight::from_parts(61_196_000, 3964) + // Minimum execution time: 62_268_000 picoseconds. + Weight::from_parts(63_359_000, 3964) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -305,8 +305,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `631` // Estimated: `4096` - // Minimum execution time: 25_719_000 picoseconds. - Weight::from_parts(26_300_000, 4096) + // Minimum execution time: 26_369_000 picoseconds. + Weight::from_parts(26_811_000, 4096) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -320,8 +320,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `571` // Estimated: `4036` - // Minimum execution time: 18_425_000 picoseconds. - Weight::from_parts(18_805_000, 4036) + // Minimum execution time: 18_816_000 picoseconds. + Weight::from_parts(19_237_000, 4036) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -333,8 +333,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `385` // Estimated: `3850` - // Minimum execution time: 21_671_000 picoseconds. - Weight::from_parts(22_232_000, 3850) + // Minimum execution time: 22_011_000 picoseconds. + Weight::from_parts(22_423_000, 3850) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -348,8 +348,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `560` // Estimated: `4025` - // Minimum execution time: 18_926_000 picoseconds. - Weight::from_parts(19_217_000, 4025) + // Minimum execution time: 19_286_000 picoseconds. + Weight::from_parts(19_847_000, 4025) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } diff --git a/substrate-node/pallets/pallet-tft-price/src/weights.rs b/substrate-node/pallets/pallet-tft-price/src/weights.rs index ec8658215..0422bfe36 100644 --- a/substrate-node/pallets/pallet-tft-price/src/weights.rs +++ b/substrate-node/pallets/pallet-tft-price/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_tft_price //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -61,8 +61,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `6175` - // Minimum execution time: 47_901_000 picoseconds. - Weight::from_parts(48_943_000, 6175) + // Minimum execution time: 30_177_000 picoseconds. + Weight::from_parts(30_969_000, 6175) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -74,8 +74,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 8_166_000 picoseconds. - Weight::from_parts(8_315_000, 1578) + // Minimum execution time: 5_080_000 picoseconds. + Weight::from_parts(5_250_000, 1578) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -87,8 +87,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 7_975_000 picoseconds. - Weight::from_parts(8_235_000, 1578) + // Minimum execution time: 5_150_000 picoseconds. + Weight::from_parts(5_310_000, 1578) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -116,8 +116,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `235` // Estimated: `6175` - // Minimum execution time: 47_901_000 picoseconds. - Weight::from_parts(48_943_000, 6175) + // Minimum execution time: 30_177_000 picoseconds. + Weight::from_parts(30_969_000, 6175) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -129,8 +129,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 8_166_000 picoseconds. - Weight::from_parts(8_315_000, 1578) + // Minimum execution time: 5_080_000 picoseconds. + Weight::from_parts(5_250_000, 1578) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -142,8 +142,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 7_975_000 picoseconds. - Weight::from_parts(8_235_000, 1578) + // Minimum execution time: 5_150_000 picoseconds. + Weight::from_parts(5_310_000, 1578) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/pallets/pallet-validator/src/weights.rs b/substrate-node/pallets/pallet-validator/src/weights.rs index 75627294f..a5d6155b4 100644 --- a/substrate-node/pallets/pallet-validator/src/weights.rs +++ b/substrate-node/pallets/pallet-validator/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_validator //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -50,8 +50,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 19_757_000 picoseconds. - Weight::from_parts(20_619_000, 3507) + // Minimum execution time: 9_348_000 picoseconds. + Weight::from_parts(9_638_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -65,8 +65,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `365` // Estimated: `3830` - // Minimum execution time: 51_608_000 picoseconds. - Weight::from_parts(52_960_000, 3830) + // Minimum execution time: 24_526_000 picoseconds. + Weight::from_parts(25_128_000, 3830) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -80,8 +80,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `431` // Estimated: `3896` - // Minimum execution time: 32_050_000 picoseconds. - Weight::from_parts(33_082_000, 3896) + // Minimum execution time: 34_004_000 picoseconds. + Weight::from_parts(34_556_000, 3896) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -91,8 +91,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 8_316_000 picoseconds. - Weight::from_parts(8_536_000, 3507) + // Minimum execution time: 8_426_000 picoseconds. + Weight::from_parts(8_787_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -110,8 +110,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `494` // Estimated: `4687` - // Minimum execution time: 24_236_000 picoseconds. - Weight::from_parts(24_727_000, 4687) + // Minimum execution time: 24_958_000 picoseconds. + Weight::from_parts(25_338_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -131,8 +131,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `558` // Estimated: `4687` - // Minimum execution time: 21_611_000 picoseconds. - Weight::from_parts(22_112_000, 4687) + // Minimum execution time: 22_091_000 picoseconds. + Weight::from_parts(22_783_000, 4687) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -146,8 +146,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 19_757_000 picoseconds. - Weight::from_parts(20_619_000, 3507) + // Minimum execution time: 9_348_000 picoseconds. + Weight::from_parts(9_638_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -161,8 +161,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `365` // Estimated: `3830` - // Minimum execution time: 51_608_000 picoseconds. - Weight::from_parts(52_960_000, 3830) + // Minimum execution time: 24_526_000 picoseconds. + Weight::from_parts(25_128_000, 3830) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -176,8 +176,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `431` // Estimated: `3896` - // Minimum execution time: 32_050_000 picoseconds. - Weight::from_parts(33_082_000, 3896) + // Minimum execution time: 34_004_000 picoseconds. + Weight::from_parts(34_556_000, 3896) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -187,8 +187,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 8_316_000 picoseconds. - Weight::from_parts(8_536_000, 3507) + // Minimum execution time: 8_426_000 picoseconds. + Weight::from_parts(8_787_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -206,8 +206,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `494` // Estimated: `4687` - // Minimum execution time: 24_236_000 picoseconds. - Weight::from_parts(24_727_000, 4687) + // Minimum execution time: 24_958_000 picoseconds. + Weight::from_parts(25_338_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -227,8 +227,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `558` // Estimated: `4687` - // Minimum execution time: 21_611_000 picoseconds. - Weight::from_parts(22_112_000, 4687) + // Minimum execution time: 22_091_000 picoseconds. + Weight::from_parts(22_783_000, 4687) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/substrate-node/pallets/substrate-validator-set/src/weights.rs b/substrate-node/pallets/substrate-validator-set/src/weights.rs index 3c337f315..d1564eb88 100644 --- a/substrate-node/pallets/substrate-validator-set/src/weights.rs +++ b/substrate-node/pallets/substrate-validator-set/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for substrate_validator_set //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -49,8 +49,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `1624` - // Minimum execution time: 29_295_000 picoseconds. - Weight::from_parts(30_498_000, 1624) + // Minimum execution time: 14_668_000 picoseconds. + Weight::from_parts(14_868_000, 1624) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -62,8 +62,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 23_144_000 picoseconds. - Weight::from_parts(23_956_000, 1690) + // Minimum execution time: 11_642_000 picoseconds. + Weight::from_parts(12_063_000, 1690) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -75,8 +75,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `172` // Estimated: `1657` - // Minimum execution time: 26_600_000 picoseconds. - Weight::from_parts(27_993_000, 1657) + // Minimum execution time: 12_804_000 picoseconds. + Weight::from_parts(13_235_000, 1657) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -92,8 +92,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `139` // Estimated: `1624` - // Minimum execution time: 29_295_000 picoseconds. - Weight::from_parts(30_498_000, 1624) + // Minimum execution time: 14_668_000 picoseconds. + Weight::from_parts(14_868_000, 1624) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -105,8 +105,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 23_144_000 picoseconds. - Weight::from_parts(23_956_000, 1690) + // Minimum execution time: 11_642_000 picoseconds. + Weight::from_parts(12_063_000, 1690) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -118,8 +118,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `172` // Estimated: `1657` - // Minimum execution time: 26_600_000 picoseconds. - Weight::from_parts(27_993_000, 1657) + // Minimum execution time: 12_804_000 picoseconds. + Weight::from_parts(13_235_000, 1657) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/support/src/resources.rs b/substrate-node/support/src/resources.rs index 2dd9d8545..fb4081f2f 100644 --- a/substrate-node/support/src/resources.rs +++ b/substrate-node/support/src/resources.rs @@ -15,6 +15,7 @@ pub struct Resources { pub const ONE_THOUSAND: u128 = 1_000; pub const GIGABYTE: u128 = 1024 * 1024 * 1024; +pub const MINIMUM_STORAGE_CAPACITY: u128 = 100 * GIGABYTE; impl Resources { pub fn empty() -> Resources { @@ -35,13 +36,18 @@ impl Resources { } pub fn validate_hru(&self) -> bool { - // No HRU minimun requirement - true + // HRU minimum of 100 GB + self.hru as u128 >= MINIMUM_STORAGE_CAPACITY } pub fn validate_sru(&self) -> bool { // SRU minimum of 100 GB - self.sru as u128 >= 100 * GIGABYTE + self.sru as u128 >= MINIMUM_STORAGE_CAPACITY + } + + pub fn validate_storage(&self) -> bool { + // At least one type of storage (HDD or SSD) must have minimum capacity size + self.validate_hru() || self.validate_sru() } pub fn validate_cru(&self) -> bool { diff --git a/substrate-node/support/src/tests.rs b/substrate-node/support/src/tests.rs index f62fc71ff..0e213b169 100644 --- a/substrate-node/support/src/tests.rs +++ b/substrate-node/support/src/tests.rs @@ -1,4 +1,4 @@ -use crate::resources::{Resources, GIGABYTE}; +use crate::resources::{Resources, GIGABYTE, MINIMUM_STORAGE_CAPACITY}; use crate::types::{PublicIpError, IP4, IP6}; use frame_support::storage::bounded_vec::BoundedVec; use frame_support::{assert_err, assert_ok}; @@ -94,6 +94,36 @@ fn test_calc_su_4() { assert_eq!(su, 3); } +#[test] +fn test_validate_storage() { + // SSD only node + let resources = Resources { + hru: 0, + cru: 0, + mru: 0, + sru: MINIMUM_STORAGE_CAPACITY as u64, + }; + assert_eq!(resources.validate_storage(), true); + + // HDD only node + let resources = Resources { + hru: MINIMUM_STORAGE_CAPACITY as u64, + cru: 0, + mru: 0, + sru: 0, + }; + assert_eq!(resources.validate_storage(), true); + + // Storage capacities are both under minimum requirement + let resources = Resources { + hru: MINIMUM_STORAGE_CAPACITY as u64 - 1, + cru: 0, + mru: 0, + sru: MINIMUM_STORAGE_CAPACITY as u64 - 1, + }; + assert_eq!(resources.validate_storage(), false); +} + #[test] fn test_resources_diff() { let resources = Resources { From 9f9364661a5ae71d57490e9e524b175922f566b5 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Fri, 31 May 2024 17:59:46 +0300 Subject: [PATCH 33/44] Bump version to 2.8.0 (spec 150) (#972) * "Bump version to 2.8.0 * Update cargo.lock --- .../helm/tfchainactivationservice/Chart.yaml | 4 +-- activation-service/package.json | 4 +-- .../chart/tfchainbridge/Chart.yaml | 4 +-- clients/tfchain-client-js/package.json | 4 +-- scripts/package.json | 4 +-- substrate-node/Cargo.lock | 26 +++++++++---------- substrate-node/Cargo.toml | 2 +- .../charts/substrate-node/Chart.yaml | 4 +-- substrate-node/runtime/src/lib.rs | 2 +- tools/fork-off-substrate/package.json | 4 +-- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/activation-service/helm/tfchainactivationservice/Chart.yaml b/activation-service/helm/tfchainactivationservice/Chart.yaml index b1c8d0e1c..5e84960a8 100644 --- a/activation-service/helm/tfchainactivationservice/Chart.yaml +++ b/activation-service/helm/tfchainactivationservice/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainactivationservice description: TFchain account activation funding service type: application -version: 2.7.0-rc4 -appVersion: '2.7.0-rc4' +version: 2.8.0 +appVersion: '2.8.0' diff --git a/activation-service/package.json b/activation-service/package.json index 687e9b811..267f39df3 100644 --- a/activation-service/package.json +++ b/activation-service/package.json @@ -1,6 +1,6 @@ { "name": "substrate-funding-service", - "version": "2.7.0-rc4", + "version": "2.8.0", "description": "Substrate funding service", "main": "index.js", "scripts": { @@ -36,4 +36,4 @@ "pino-pretty": "^5.0.2", "standard": "^16.0.3" } -} \ No newline at end of file +} diff --git a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml index 4e3e46ed1..89f666cdb 100644 --- a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml +++ b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainbridge description: Bridge for TFT between Tfchain Stellar type: application -version: 2.7.0-rc4 -appVersion: '2.7.0-rc4' +version: 2.8.0 +appVersion: '2.8.0' diff --git a/clients/tfchain-client-js/package.json b/clients/tfchain-client-js/package.json index 53b9f560a..09aaef7ed 100644 --- a/clients/tfchain-client-js/package.json +++ b/clients/tfchain-client-js/package.json @@ -1,6 +1,6 @@ { "name": "tfgrid-api-client", - "version": "2.7.0-rc4", + "version": "2.8.0", "description": "API client for the TF Grid", "main": "index.js", "scripts": { @@ -17,4 +17,4 @@ "devDependencies": { "standard": "^16.0.3" } -} \ No newline at end of file +} diff --git a/scripts/package.json b/scripts/package.json index 90090c230..f816b44bd 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -1,6 +1,6 @@ { "name": "tfchain-js-scripts", - "version": "2.7.0-rc4", + "version": "2.8.0", "description": "scripts to fetch data / write data to tfchain", "main": "index.js", "scripts": { @@ -20,4 +20,4 @@ "devDependencies": { "standard": "^16.0.3" } -} \ No newline at end of file +} diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index 238e2e959..c5bd3ebdc 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -4244,7 +4244,7 @@ dependencies = [ [[package]] name = "pallet-burning" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -4279,7 +4279,7 @@ dependencies = [ [[package]] name = "pallet-dao" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "env_logger", "frame-benchmarking", @@ -4325,7 +4325,7 @@ dependencies = [ [[package]] name = "pallet-kvstore" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -4358,7 +4358,7 @@ dependencies = [ [[package]] name = "pallet-runtime-upgrade" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "frame-support", "frame-system", @@ -4424,7 +4424,7 @@ dependencies = [ [[package]] name = "pallet-smart-contract" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "env_logger", "frame-benchmarking", @@ -4477,7 +4477,7 @@ dependencies = [ [[package]] name = "pallet-tfgrid" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "env_logger", "frame-benchmarking", @@ -4505,7 +4505,7 @@ dependencies = [ [[package]] name = "pallet-tft-bridge" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -4523,7 +4523,7 @@ dependencies = [ [[package]] name = "pallet-tft-price" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -4627,7 +4627,7 @@ dependencies = [ [[package]] name = "pallet-validator" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -7996,7 +7996,7 @@ dependencies = [ [[package]] name = "substrate-validator-set" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8134,7 +8134,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "tfchain" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "clap", "frame-benchmarking", @@ -8180,7 +8180,7 @@ dependencies = [ [[package]] name = "tfchain-runtime" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "frame-benchmarking", "frame-executive", @@ -8234,7 +8234,7 @@ dependencies = [ [[package]] name = "tfchain-support" -version = "2.7.0-rc4" +version = "2.8.0" dependencies = [ "frame-support", "frame-system", diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index cabf4190c..eb184c9e1 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://threefold.io/" license-file = "LICENSE" readme = "README.md" repository = "https://github.com/threefoldtech/tfchain3" -version = "2.7.0-rc4" +version = "2.8.0" [workspace] members = [ diff --git a/substrate-node/charts/substrate-node/Chart.yaml b/substrate-node/charts/substrate-node/Chart.yaml index b7f75976b..58e8d59a1 100644 --- a/substrate-node/charts/substrate-node/Chart.yaml +++ b/substrate-node/charts/substrate-node/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: substrate-node description: Tfchain node type: application -version: 2.7.0-rc4 -appVersion: '2.7.0-rc4' +version: 2.8.0 +appVersion: '2.8.0' diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 8f7f96efa..6aab37147 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -151,7 +151,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("substrate-threefold"), impl_name: create_runtime_str!("substrate-threefold"), authoring_version: 1, - spec_version: 149, + spec_version: 150, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/tools/fork-off-substrate/package.json b/tools/fork-off-substrate/package.json index 935c976f0..0d53411a9 100644 --- a/tools/fork-off-substrate/package.json +++ b/tools/fork-off-substrate/package.json @@ -1,6 +1,6 @@ { "name": "fork-off-substrate", - "version": "2.7.0-rc4", + "version": "2.8.0", "description": "This script allows bootstrapping a new substrate chain with the current state of a live chain", "main": "index.js", "scripts": { @@ -29,4 +29,4 @@ "cli-progress": "^3.9.1", "dotenv": "^10.0.0" } -} \ No newline at end of file +} From 8a36c1d0cf568a56393c38f6836cee583f60bf66 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Wed, 5 Jun 2024 18:55:20 +0300 Subject: [PATCH 34/44] Fix: Adding min threshold and duration for dao motion (#974) * fix:adding min threshold and duration for dao motion * fix: adjusting dao benchmarks for new threshold validation * test: use MinThreshold defined in place of hardcoded value * refactor: tiny refactor * fix: adjust threshold in benchmarking tests * chore: update benchmark `weights.rs` file for all pallets --------- Co-authored-by: github-actions[bot] --- .../pallets/pallet-burning/src/weights.rs | 12 +- .../pallet-dao/creating_proposal_farmers.md | 4 +- .../pallets/pallet-dao/src/benchmarking.rs | 43 ++- substrate-node/pallets/pallet-dao/src/dao.rs | 5 +- substrate-node/pallets/pallet-dao/src/lib.rs | 3 + substrate-node/pallets/pallet-dao/src/mock.rs | 2 + .../pallets/pallet-dao/src/tests.rs | 67 +++-- .../pallets/pallet-dao/src/weights.rs | 40 +-- .../pallets/pallet-kvstore/src/weights.rs | 20 +- .../pallet-smart-contract/src/weights.rs | 188 ++++++------- .../pallets/pallet-tfgrid/src/weights.rs | 260 +++++++++--------- .../pallets/pallet-tft-bridge/src/weights.rs | 92 +++---- .../pallets/pallet-tft-price/src/weights.rs | 28 +- .../pallets/pallet-validator/src/weights.rs | 52 ++-- .../substrate-validator-set/src/weights.rs | 28 +- substrate-node/runtime/src/lib.rs | 2 + 16 files changed, 450 insertions(+), 396 deletions(-) diff --git a/substrate-node/pallets/pallet-burning/src/weights.rs b/substrate-node/pallets/pallet-burning/src/weights.rs index 0a0354124..c840829cf 100644 --- a/substrate-node/pallets/pallet-burning/src/weights.rs +++ b/substrate-node/pallets/pallet-burning/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_burning //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -45,8 +45,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 27_162_000 picoseconds. - Weight::from_parts(27_532_000, 1594) + // Minimum execution time: 26_841_000 picoseconds. + Weight::from_parts(27_372_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -60,8 +60,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 27_162_000 picoseconds. - Weight::from_parts(27_532_000, 1594) + // Minimum execution time: 26_841_000 picoseconds. + Weight::from_parts(27_372_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md b/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md index 2fe9a0c82..3bffd229f 100644 --- a/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md +++ b/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md @@ -21,11 +21,11 @@ Open the Polkadot JS UI in your browser: The proposal must include the following arguments: -* `threshold`: minimal number of farmer votes required to be able to close proposal before its end. +* `threshold`: minimal number of farmer votes required to be able to close proposal before its end. should be at least 5 or more. * `action`: call/extrinsic to execute on chain. If there is no call to be executed (which is usually the case) then `system` -> `remark()` should be set. * `description`: a small description of what the proposal is about. * `link`: a link to a more elaborate explanation of the proposal. -* `duration`: optional duration of the proposal after beeing created (default is 7 days, max value is 30 days), expressed in number of blocks (1 block = 6 sec). +* `duration`: optional duration of the proposal after beeing created (default is 7 days, min value is 1 day, max value is 30 days), expressed in number of blocks (1 block = 6 sec). ![fill](./img/fill_proposal_farmers.png) diff --git a/substrate-node/pallets/pallet-dao/src/benchmarking.rs b/substrate-node/pallets/pallet-dao/src/benchmarking.rs index 88a041394..58e15ad10 100644 --- a/substrate-node/pallets/pallet-dao/src/benchmarking.rs +++ b/substrate-node/pallets/pallet-dao/src/benchmarking.rs @@ -26,7 +26,7 @@ benchmarks! { propose { let caller: T::AccountId = whitelisted_caller(); assert_ok!(_add_council_member::(caller.clone())); - let threshold = 1; + let threshold = 5; let proposal: T::Proposal = SystemCall::::remark { remark: b"remark".to_vec() }.into(); let description = b"some_description".to_vec(); let link = b"some_link".to_vec(); @@ -53,7 +53,7 @@ benchmarks! { // vote() vote { let farmer: T::AccountId = account("Alice", 0, 0); - _prepare_farm_with_node::(farmer.clone()); + _prepare_farm_with_node::(farmer.clone(), b"testfarm", 1); let farm_id = 1; let caller: T::AccountId = whitelisted_caller(); @@ -80,7 +80,7 @@ benchmarks! { // veto() veto { let farmer: T::AccountId = account("Alice", 0, 0); - _prepare_farm_with_node::(farmer.clone()); + _prepare_farm_with_node::(farmer.clone(), b"testfarm", 1); let farm_id = 1; let caller: T::AccountId = whitelisted_caller(); @@ -98,15 +98,30 @@ benchmarks! { // close() close { let farmer: T::AccountId = account("Alice", 0, 0); - _prepare_farm_with_node::(farmer.clone()); - let farm_id = 1; + let farmer2: T::AccountId = account("Bob", 0, 0); + let farmer3: T::AccountId = account("Charlie", 0, 0); + let farmer4: T::AccountId = account("Dave", 0, 0); + let farmer5: T::AccountId = account("Eve", 0, 0); + + + _prepare_farm_with_node::(farmer.clone(), b"testfarm", 1); + _prepare_farm_with_node::(farmer2.clone(), b"testfarm2", 2); + _prepare_farm_with_node::(farmer3.clone(), b"testfarm3", 3); + _prepare_farm_with_node::(farmer4.clone(), b"testfarm4", 4); + _prepare_farm_with_node::(farmer5.clone(), b"testfarm5", 5); + let caller: T::AccountId = whitelisted_caller(); let proposal_hash = _create_proposal::(caller.clone()); let proposal_index = 0; let approve = false; - DaoModule::::vote(RawOrigin::Signed(farmer.clone()).into(), farm_id, proposal_hash, approve).unwrap(); + DaoModule::::vote(RawOrigin::Signed(farmer.clone()).into(), 1, proposal_hash, approve).unwrap(); + DaoModule::::vote(RawOrigin::Signed(farmer2.clone()).into(), 2, proposal_hash, approve).unwrap(); + DaoModule::::vote(RawOrigin::Signed(farmer3.clone()).into(), 3, proposal_hash, approve).unwrap(); + DaoModule::::vote(RawOrigin::Signed(farmer4.clone()).into(), 4, proposal_hash, approve).unwrap(); + DaoModule::::vote(RawOrigin::Signed(farmer5.clone()).into(), 5, proposal_hash, approve).unwrap(); + }: _(RawOrigin::Signed(caller.clone()), proposal_hash, proposal_index) verify { assert!(DaoModule::::proposal_list(proposal_hash).is_none()); @@ -127,10 +142,10 @@ fn assert_last_event(generic_event: ::RuntimeEvent) { assert_eq!(event, &system_event); } -pub fn _prepare_farm_with_node(source: T::AccountId) { +pub fn _prepare_farm_with_node(source: T::AccountId, farm_name: &[u8], farm_id : u32) { _create_twin::(source.clone()); - _create_farm::(source.clone()); - _create_node::(source.clone()); + _create_farm::(source.clone(), farm_name); + _create_node::(source.clone(), farm_id); } fn _create_twin(source: T::AccountId) { @@ -147,7 +162,7 @@ fn _create_twin(source: T::AccountId) { )); } -fn _create_farm(source: T::AccountId) { +fn _create_farm(source: T::AccountId, farm_name: &[u8]) { let mut pub_ips = Vec::new(); pub_ips.push(IP4 { ip: get_public_ip_ip_input(b"185.206.122.33/24"), @@ -160,12 +175,12 @@ fn _create_farm(source: T::AccountId) { assert_ok!(TfgridModule::::create_farm( RawOrigin::Signed(source).into(), - b"testfarm".to_vec().try_into().unwrap(), + farm_name.to_vec().try_into().unwrap(), pub_ips.clone().try_into().unwrap(), )); } -fn _create_node(source: T::AccountId) { +fn _create_node(source: T::AccountId, farm_id: u32) { let resources = ResourcesInput { hru: 1024 * GIGABYTE, sru: 512 * GIGABYTE, @@ -183,7 +198,7 @@ fn _create_node(source: T::AccountId) { assert_ok!(TfgridModule::::create_node( RawOrigin::Signed(source.clone()).into(), - 1, + farm_id, resources, location, Vec::new().try_into().unwrap(), @@ -196,7 +211,7 @@ fn _create_node(source: T::AccountId) { pub fn _create_proposal(source: T::AccountId) -> T::Hash { assert_ok!(_add_council_member::(source.clone())); - let threshold = 1; + let threshold = 5; let proposal: T::Proposal = SystemCall::::remark { remark: b"remark".to_vec(), } diff --git a/substrate-node/pallets/pallet-dao/src/dao.rs b/substrate-node/pallets/pallet-dao/src/dao.rs index b5c04955d..b599c6248 100644 --- a/substrate-node/pallets/pallet-dao/src/dao.rs +++ b/substrate-node/pallets/pallet-dao/src/dao.rs @@ -42,13 +42,16 @@ impl Pallet { let now = frame_system::Pallet::::block_number(); let mut end = now + T::MotionDuration::get(); + // Check if duration is set and is less than 30 days and more than 1 Day if let Some(motion_duration) = duration { ensure!( - motion_duration < BlockNumberFor::::from(constants::time::DAYS * 30), + motion_duration <= BlockNumberFor::::from(constants::time::DAYS * 30) && motion_duration >= BlockNumberFor::::from(constants::time::DAYS * 1), Error::::InvalidProposalDuration ); end = now + motion_duration; } + // threshold should be at least the configured minimum threshold for a motion in runtime + ensure!(threshold >= T::MotionMinThreshold::get(), Error::::ThresholdTooLow); let index = Self::proposal_count(); >::mutate(|i| *i += 1); diff --git a/substrate-node/pallets/pallet-dao/src/lib.rs b/substrate-node/pallets/pallet-dao/src/lib.rs index e11873660..407955f01 100644 --- a/substrate-node/pallets/pallet-dao/src/lib.rs +++ b/substrate-node/pallets/pallet-dao/src/lib.rs @@ -56,6 +56,8 @@ pub mod pallet { /// The time-out for council motions. type MotionDuration: Get>; + type MotionMinThreshold: Get; + /// The minimum amount of vetos to dissaprove a proposal type MinVetos: Get; @@ -173,6 +175,7 @@ pub mod pallet { OngoingVoteAndTresholdStillNotMet, FarmHasNoNodes, InvalidProposalDuration, + ThresholdTooLow, } #[pallet::call] diff --git a/substrate-node/pallets/pallet-dao/src/mock.rs b/substrate-node/pallets/pallet-dao/src/mock.rs index f11eac99a..c59aedd98 100644 --- a/substrate-node/pallets/pallet-dao/src/mock.rs +++ b/substrate-node/pallets/pallet-dao/src/mock.rs @@ -69,6 +69,7 @@ pub type BlockNumber = u32; parameter_types! { pub const DaoMotionDuration: BlockNumber = 4; pub const MinVetos: u32 = 2; + pub const MinThreshold: u32 = 2; } pub(crate) type Serial = pallet_tfgrid::pallet::SerialNumberOf; @@ -107,6 +108,7 @@ impl pallet_dao::pallet::Config for TestRuntime { type CouncilOrigin = EnsureRoot; type Proposal = RuntimeCall; type MotionDuration = DaoMotionDuration; + type MotionMinThreshold = MinThreshold; type MinVetos = MinVetos; type Tfgrid = TfgridModule; type WeightInfo = weights::SubstrateWeight; diff --git a/substrate-node/pallets/pallet-dao/src/tests.rs b/substrate-node/pallets/pallet-dao/src/tests.rs index 7fb41600a..205cff830 100644 --- a/substrate-node/pallets/pallet-dao/src/tests.rs +++ b/substrate-node/pallets/pallet-dao/src/tests.rs @@ -18,7 +18,7 @@ fn farmers_vote_no_farm_fails() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 3, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -44,7 +44,7 @@ fn farmers_vote_proposal_works() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 3, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -81,7 +81,7 @@ fn farmers_vote_proposal_if_no_nodes_fails() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 1, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -140,10 +140,9 @@ fn close_works() { let proposal = make_proposal(b"some_remark".to_vec()); let hash = BlakeTwo256::hash_of(&proposal); - let threshold = 2; assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - threshold, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -250,7 +249,7 @@ fn close_after_proposal_duration_works() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 2, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -269,11 +268,10 @@ fn close_after_proposal_duration_threshold_not_met_works() { let proposal = make_proposal(b"some_remark".to_vec()); let hash = BlakeTwo256::hash_of(&proposal); - let threshold = 2; assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - threshold, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -316,7 +314,7 @@ fn close_if_not_council_member_fails() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 2, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -346,7 +344,7 @@ fn motion_approval_works() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 2, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -461,7 +459,7 @@ fn motion_veto_works() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 2, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -563,7 +561,7 @@ fn motion_veto_duplicate_fails() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 2, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -594,7 +592,7 @@ fn weighted_voting_works() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 2, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -700,7 +698,7 @@ fn voting_tfgridmodule_call_works() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 2, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -817,11 +815,11 @@ fn customize_proposal_duration_works() { assert_ok!(DaoModule::propose( RuntimeOrigin::signed(1), - 2, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), - Some(10) + Some(14400) )); // Farmer 1 votes yes @@ -833,13 +831,13 @@ fn customize_proposal_duration_works() { true )); - System::set_block_number(9); + System::set_block_number(14400); assert_noop!( DaoModule::close(RuntimeOrigin::signed(2), hash.clone(), 0,), Error::::OngoingVoteAndTresholdStillNotMet ); - System::set_block_number(11); + System::set_block_number(14401); assert_ok!(DaoModule::close(RuntimeOrigin::signed(2), hash.clone(), 0,)); }); } @@ -865,7 +863,7 @@ fn customize_proposal_duration_out_of_bounds_fails() { assert_noop!( DaoModule::propose( RuntimeOrigin::signed(1), - 2, + MinThreshold::get(), Box::new(proposal.clone()), b"some_description".to_vec(), b"some_link".to_vec(), @@ -873,6 +871,37 @@ fn customize_proposal_duration_out_of_bounds_fails() { ), Error::::InvalidProposalDuration ); + + assert_noop!( + DaoModule::propose( + RuntimeOrigin::signed(1), + MinThreshold::get(), + Box::new(proposal.clone()), + b"some_description".to_vec(), + b"some_link".to_vec(), + Some(14399) + ), + Error::::InvalidProposalDuration + ); + }); +} + +#[test] +fn motion_proposal_threshold_fails() { + new_test_ext().execute_with(|| { + let proposal = make_proposal(b"some_remark".to_vec()); + + assert_noop!( + DaoModule::propose( + RuntimeOrigin::signed(1), + MinThreshold::get() - 1, + Box::new(proposal.clone()), + b"some_description".to_vec(), + b"some_link".to_vec(), + None + ), + Error::::ThresholdTooLow + ); }); } diff --git a/substrate-node/pallets/pallet-dao/src/weights.rs b/substrate-node/pallets/pallet-dao/src/weights.rs index 2ebca45d3..4301ffe5a 100644 --- a/substrate-node/pallets/pallet-dao/src/weights.rs +++ b/substrate-node/pallets/pallet-dao/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_dao //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -58,8 +58,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `208` // Estimated: `4687` - // Minimum execution time: 19_226_000 picoseconds. - Weight::from_parts(19_677_000, 4687) + // Minimum execution time: 19_196_000 picoseconds. + Weight::from_parts(19_487_000, 4687) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -77,8 +77,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `979` // Estimated: `4444` - // Minimum execution time: 26_420_000 picoseconds. - Weight::from_parts(26_761_000, 4444) + // Minimum execution time: 26_179_000 picoseconds. + Weight::from_parts(26_751_000, 4444) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -92,8 +92,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `487` // Estimated: `4687` - // Minimum execution time: 18_605_000 picoseconds. - Weight::from_parts(18_945_000, 4687) + // Minimum execution time: 18_154_000 picoseconds. + Weight::from_parts(18_755_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -109,10 +109,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close() -> Weight { // Proof Size summary in bytes: - // Measured: `469` + // Measured: `521` // Estimated: `4687` - // Minimum execution time: 23_945_000 picoseconds. - Weight::from_parts(24_396_000, 4687) + // Minimum execution time: 24_757_000 picoseconds. + Weight::from_parts(25_268_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -136,8 +136,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `208` // Estimated: `4687` - // Minimum execution time: 19_226_000 picoseconds. - Weight::from_parts(19_677_000, 4687) + // Minimum execution time: 19_196_000 picoseconds. + Weight::from_parts(19_487_000, 4687) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -155,8 +155,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `979` // Estimated: `4444` - // Minimum execution time: 26_420_000 picoseconds. - Weight::from_parts(26_761_000, 4444) + // Minimum execution time: 26_179_000 picoseconds. + Weight::from_parts(26_751_000, 4444) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -170,8 +170,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `487` // Estimated: `4687` - // Minimum execution time: 18_605_000 picoseconds. - Weight::from_parts(18_945_000, 4687) + // Minimum execution time: 18_154_000 picoseconds. + Weight::from_parts(18_755_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -187,10 +187,10 @@ impl WeightInfo for () { /// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close() -> Weight { // Proof Size summary in bytes: - // Measured: `469` + // Measured: `521` // Estimated: `4687` - // Minimum execution time: 23_945_000 picoseconds. - Weight::from_parts(24_396_000, 4687) + // Minimum execution time: 24_757_000 picoseconds. + Weight::from_parts(25_268_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/substrate-node/pallets/pallet-kvstore/src/weights.rs b/substrate-node/pallets/pallet-kvstore/src/weights.rs index 0bc1314a1..1e49afb32 100644 --- a/substrate-node/pallets/pallet-kvstore/src/weights.rs +++ b/substrate-node/pallets/pallet-kvstore/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_kvstore //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -46,8 +46,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_763_000 picoseconds. - Weight::from_parts(7_043_000, 0) + // Minimum execution time: 7_293_000 picoseconds. + Weight::from_parts(7_574_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFKVStore::TFKVStore` (r:1 w:1) @@ -56,8 +56,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3611` - // Minimum execution time: 12_313_000 picoseconds. - Weight::from_parts(12_654_000, 3611) + // Minimum execution time: 12_784_000 picoseconds. + Weight::from_parts(13_205_000, 3611) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -71,8 +71,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_763_000 picoseconds. - Weight::from_parts(7_043_000, 0) + // Minimum execution time: 7_293_000 picoseconds. + Weight::from_parts(7_574_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFKVStore::TFKVStore` (r:1 w:1) @@ -81,8 +81,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3611` - // Minimum execution time: 12_313_000 picoseconds. - Weight::from_parts(12_654_000, 3611) + // Minimum execution time: 12_784_000 picoseconds. + Weight::from_parts(13_205_000, 3611) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/pallets/pallet-smart-contract/src/weights.rs b/substrate-node/pallets/pallet-smart-contract/src/weights.rs index 79f4310bf..c05881a43 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/weights.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_smart_contract //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -95,8 +95,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `868` // Estimated: `4333` - // Minimum execution time: 48_782_000 picoseconds. - Weight::from_parts(49_754_000, 4333) + // Minimum execution time: 48_412_000 picoseconds. + Weight::from_parts(49_073_000, 4333) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -112,8 +112,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `892` // Estimated: `4357` - // Minimum execution time: 27_191_000 picoseconds. - Weight::from_parts(27_723_000, 4357) + // Minimum execution time: 26_911_000 picoseconds. + Weight::from_parts(27_492_000, 4357) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -145,8 +145,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 61_075_000 picoseconds. - Weight::from_parts(62_097_000, 4668) + // Minimum execution time: 60_164_000 picoseconds. + Weight::from_parts(61_396_000, 4668) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -170,8 +170,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3805` - // Minimum execution time: 24_636_000 picoseconds. - Weight::from_parts(25_037_000, 3805) + // Minimum execution time: 24_697_000 picoseconds. + Weight::from_parts(25_468_000, 3805) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -197,8 +197,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `919` // Estimated: `4384` - // Minimum execution time: 46_498_000 picoseconds. - Weight::from_parts(47_310_000, 4384) + // Minimum execution time: 46_268_000 picoseconds. + Weight::from_parts(47_641_000, 4384) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -220,8 +220,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1292` // Estimated: `4757` - // Minimum execution time: 38_082_000 picoseconds. - Weight::from_parts(39_114_000, 4757) + // Minimum execution time: 38_112_000 picoseconds. + Weight::from_parts(38_763_000, 4757) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -237,8 +237,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `771` // Estimated: `4236` - // Minimum execution time: 23_054_000 picoseconds. - Weight::from_parts(23_495_000, 4236) + // Minimum execution time: 23_053_000 picoseconds. + Weight::from_parts(23_394_000, 4236) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -268,8 +268,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `776` // Estimated: `4241` - // Minimum execution time: 35_056_000 picoseconds. - Weight::from_parts(35_547_000, 4241) + // Minimum execution time: 34_856_000 picoseconds. + Weight::from_parts(35_767_000, 4241) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -303,8 +303,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1284` // Estimated: `4749` - // Minimum execution time: 60_054_000 picoseconds. - Weight::from_parts(60_945_000, 4749) + // Minimum execution time: 59_392_000 picoseconds. + Weight::from_parts(60_414_000, 4749) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -316,8 +316,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 9_808_000 picoseconds. - Weight::from_parts(10_179_000, 1522) + // Minimum execution time: 9_949_000 picoseconds. + Weight::from_parts(10_199_000, 1522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -327,8 +327,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3680` - // Minimum execution time: 12_614_000 picoseconds. - Weight::from_parts(13_024_000, 3680) + // Minimum execution time: 12_814_000 picoseconds. + Weight::from_parts(13_205_000, 3680) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -368,8 +368,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1608` // Estimated: `5073` - // Minimum execution time: 80_311_000 picoseconds. - Weight::from_parts(81_725_000, 5073) + // Minimum execution time: 79_811_000 picoseconds. + Weight::from_parts(81_795_000, 5073) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -383,8 +383,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `395` // Estimated: `6335` - // Minimum execution time: 18_405_000 picoseconds. - Weight::from_parts(18_976_000, 6335) + // Minimum execution time: 18_665_000 picoseconds. + Weight::from_parts(19_127_000, 6335) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -396,8 +396,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_491_000 picoseconds. - Weight::from_parts(16_752_000, 3954) + // Minimum execution time: 16_552_000 picoseconds. + Weight::from_parts(17_192_000, 3954) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -409,8 +409,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_351_000 picoseconds. - Weight::from_parts(16_602_000, 3954) + // Minimum execution time: 16_260_000 picoseconds. + Weight::from_parts(16_801_000, 3954) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -422,8 +422,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_602_000 picoseconds. - Weight::from_parts(16_782_000, 3967) + // Minimum execution time: 16_512_000 picoseconds. + Weight::from_parts(17_032_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -435,8 +435,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 17_192_000 picoseconds. - Weight::from_parts(17_733_000, 3967) + // Minimum execution time: 17_183_000 picoseconds. + Weight::from_parts(17_914_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -448,8 +448,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 15_990_000 picoseconds. - Weight::from_parts(16_492_000, 3967) + // Minimum execution time: 16_181_000 picoseconds. + Weight::from_parts(16_832_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -467,8 +467,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `841` // Estimated: `6781` - // Minimum execution time: 30_478_000 picoseconds. - Weight::from_parts(30_958_000, 6781) + // Minimum execution time: 29_806_000 picoseconds. + Weight::from_parts(30_869_000, 6781) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -478,8 +478,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 7_754_000 picoseconds. - Weight::from_parts(7_965_000, 1522) + // Minimum execution time: 7_434_000 picoseconds. + Weight::from_parts(7_725_000, 1522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -493,8 +493,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `971` // Estimated: `4436` - // Minimum execution time: 21_721_000 picoseconds. - Weight::from_parts(22_172_000, 4436) + // Minimum execution time: 21_731_000 picoseconds. + Weight::from_parts(22_693_000, 4436) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -514,8 +514,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 23_384_000 picoseconds. - Weight::from_parts(24_056_000, 4198) + // Minimum execution time: 23_585_000 picoseconds. + Weight::from_parts(23_975_000, 4198) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -547,8 +547,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 59_172_000 picoseconds. - Weight::from_parts(60_705_000, 4668) + // Minimum execution time: 58_099_000 picoseconds. + Weight::from_parts(59_022_000, 4668) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -590,8 +590,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `868` // Estimated: `4333` - // Minimum execution time: 48_782_000 picoseconds. - Weight::from_parts(49_754_000, 4333) + // Minimum execution time: 48_412_000 picoseconds. + Weight::from_parts(49_073_000, 4333) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } @@ -607,8 +607,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `892` // Estimated: `4357` - // Minimum execution time: 27_191_000 picoseconds. - Weight::from_parts(27_723_000, 4357) + // Minimum execution time: 26_911_000 picoseconds. + Weight::from_parts(27_492_000, 4357) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -640,8 +640,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 61_075_000 picoseconds. - Weight::from_parts(62_097_000, 4668) + // Minimum execution time: 60_164_000 picoseconds. + Weight::from_parts(61_396_000, 4668) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -665,8 +665,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3805` - // Minimum execution time: 24_636_000 picoseconds. - Weight::from_parts(25_037_000, 3805) + // Minimum execution time: 24_697_000 picoseconds. + Weight::from_parts(25_468_000, 3805) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -692,8 +692,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `919` // Estimated: `4384` - // Minimum execution time: 46_498_000 picoseconds. - Weight::from_parts(47_310_000, 4384) + // Minimum execution time: 46_268_000 picoseconds. + Weight::from_parts(47_641_000, 4384) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -715,8 +715,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1292` // Estimated: `4757` - // Minimum execution time: 38_082_000 picoseconds. - Weight::from_parts(39_114_000, 4757) + // Minimum execution time: 38_112_000 picoseconds. + Weight::from_parts(38_763_000, 4757) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -732,8 +732,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `771` // Estimated: `4236` - // Minimum execution time: 23_054_000 picoseconds. - Weight::from_parts(23_495_000, 4236) + // Minimum execution time: 23_053_000 picoseconds. + Weight::from_parts(23_394_000, 4236) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -763,8 +763,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `776` // Estimated: `4241` - // Minimum execution time: 35_056_000 picoseconds. - Weight::from_parts(35_547_000, 4241) + // Minimum execution time: 34_856_000 picoseconds. + Weight::from_parts(35_767_000, 4241) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -798,8 +798,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1284` // Estimated: `4749` - // Minimum execution time: 60_054_000 picoseconds. - Weight::from_parts(60_945_000, 4749) + // Minimum execution time: 59_392_000 picoseconds. + Weight::from_parts(60_414_000, 4749) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -811,8 +811,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 9_808_000 picoseconds. - Weight::from_parts(10_179_000, 1522) + // Minimum execution time: 9_949_000 picoseconds. + Weight::from_parts(10_199_000, 1522) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -822,8 +822,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3680` - // Minimum execution time: 12_614_000 picoseconds. - Weight::from_parts(13_024_000, 3680) + // Minimum execution time: 12_814_000 picoseconds. + Weight::from_parts(13_205_000, 3680) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -863,8 +863,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1608` // Estimated: `5073` - // Minimum execution time: 80_311_000 picoseconds. - Weight::from_parts(81_725_000, 5073) + // Minimum execution time: 79_811_000 picoseconds. + Weight::from_parts(81_795_000, 5073) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -878,8 +878,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `395` // Estimated: `6335` - // Minimum execution time: 18_405_000 picoseconds. - Weight::from_parts(18_976_000, 6335) + // Minimum execution time: 18_665_000 picoseconds. + Weight::from_parts(19_127_000, 6335) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -891,8 +891,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_491_000 picoseconds. - Weight::from_parts(16_752_000, 3954) + // Minimum execution time: 16_552_000 picoseconds. + Weight::from_parts(17_192_000, 3954) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -904,8 +904,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_351_000 picoseconds. - Weight::from_parts(16_602_000, 3954) + // Minimum execution time: 16_260_000 picoseconds. + Weight::from_parts(16_801_000, 3954) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -917,8 +917,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_602_000 picoseconds. - Weight::from_parts(16_782_000, 3967) + // Minimum execution time: 16_512_000 picoseconds. + Weight::from_parts(17_032_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -930,8 +930,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 17_192_000 picoseconds. - Weight::from_parts(17_733_000, 3967) + // Minimum execution time: 17_183_000 picoseconds. + Weight::from_parts(17_914_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -943,8 +943,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 15_990_000 picoseconds. - Weight::from_parts(16_492_000, 3967) + // Minimum execution time: 16_181_000 picoseconds. + Weight::from_parts(16_832_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -962,8 +962,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `841` // Estimated: `6781` - // Minimum execution time: 30_478_000 picoseconds. - Weight::from_parts(30_958_000, 6781) + // Minimum execution time: 29_806_000 picoseconds. + Weight::from_parts(30_869_000, 6781) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -973,8 +973,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 7_754_000 picoseconds. - Weight::from_parts(7_965_000, 1522) + // Minimum execution time: 7_434_000 picoseconds. + Weight::from_parts(7_725_000, 1522) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -988,8 +988,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `971` // Estimated: `4436` - // Minimum execution time: 21_721_000 picoseconds. - Weight::from_parts(22_172_000, 4436) + // Minimum execution time: 21_731_000 picoseconds. + Weight::from_parts(22_693_000, 4436) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1009,8 +1009,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 23_384_000 picoseconds. - Weight::from_parts(24_056_000, 4198) + // Minimum execution time: 23_585_000 picoseconds. + Weight::from_parts(23_975_000, 4198) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1042,8 +1042,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1203` // Estimated: `4668` - // Minimum execution time: 59_172_000 picoseconds. - Weight::from_parts(60_705_000, 4668) + // Minimum execution time: 58_099_000 picoseconds. + Weight::from_parts(59_022_000, 4668) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } diff --git a/substrate-node/pallets/pallet-tfgrid/src/weights.rs b/substrate-node/pallets/pallet-tfgrid/src/weights.rs index dba3a9033..075014e40 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/weights.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_tfgrid //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -76,8 +76,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_555_000 picoseconds. - Weight::from_parts(2_625_000, 0) + // Minimum execution time: 2_485_000 picoseconds. + Weight::from_parts(2_575_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) @@ -94,8 +94,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `496` // Estimated: `3961` - // Minimum execution time: 19_907_000 picoseconds. - Weight::from_parts(20_369_000, 3961) + // Minimum execution time: 20_870_000 picoseconds. + Weight::from_parts(21_480_000, 3961) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -109,8 +109,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `507` // Estimated: `3972` - // Minimum execution time: 21_481_000 picoseconds. - Weight::from_parts(21_921_000, 3972) + // Minimum execution time: 22_793_000 picoseconds. + Weight::from_parts(23_074_000, 3972) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -124,8 +124,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `453` // Estimated: `3918` - // Minimum execution time: 15_690_000 picoseconds. - Weight::from_parts(16_100_000, 3918) + // Minimum execution time: 16_180_000 picoseconds. + Weight::from_parts(16_651_000, 3918) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -135,8 +135,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_024_000 picoseconds. - Weight::from_parts(13_345_000, 3877) + // Minimum execution time: 13_675_000 picoseconds. + Weight::from_parts(14_097_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -148,8 +148,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 17_704_000 picoseconds. - Weight::from_parts(17_894_000, 4034) + // Minimum execution time: 18_404_000 picoseconds. + Weight::from_parts(18_815_000, 4034) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -161,8 +161,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 16_992_000 picoseconds. - Weight::from_parts(17_153_000, 4034) + // Minimum execution time: 17_413_000 picoseconds. + Weight::from_parts(17_874_000, 4034) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -190,8 +190,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `905` // Estimated: `11795` - // Minimum execution time: 47_981_000 picoseconds. - Weight::from_parts(49_514_000, 11795) + // Minimum execution time: 49_384_000 picoseconds. + Weight::from_parts(50_565_000, 11795) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -207,8 +207,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `661` // Estimated: `4126` - // Minimum execution time: 26_710_000 picoseconds. - Weight::from_parts(27_422_000, 4126) + // Minimum execution time: 28_183_000 picoseconds. + Weight::from_parts(28_875_000, 4126) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -222,8 +222,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `956` // Estimated: `11846` - // Minimum execution time: 34_064_000 picoseconds. - Weight::from_parts(34_926_000, 11846) + // Minimum execution time: 35_847_000 picoseconds. + Weight::from_parts(36_519_000, 11846) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -239,8 +239,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 18_475_000 picoseconds. - Weight::from_parts(18_886_000, 3919) + // Minimum execution time: 19_406_000 picoseconds. + Weight::from_parts(19_827_000, 3919) .saturating_add(T::DbWeight::get().reads(4_u64)) } /// Storage: `TfgridModule::Farms` (r:1 w:0) @@ -253,8 +253,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779` // Estimated: `4244` - // Minimum execution time: 24_246_000 picoseconds. - Weight::from_parts(24_957_000, 4244) + // Minimum execution time: 25_348_000 picoseconds. + Weight::from_parts(25_999_000, 4244) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -274,8 +274,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `682` // Estimated: `4147` - // Minimum execution time: 27_592_000 picoseconds. - Weight::from_parts(28_203_000, 4147) + // Minimum execution time: 28_755_000 picoseconds. + Weight::from_parts(29_315_000, 4147) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -291,8 +291,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 14_087_000 picoseconds. - Weight::from_parts(14_357_000, 3700) + // Minimum execution time: 14_818_000 picoseconds. + Weight::from_parts(15_129_000, 3700) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -304,8 +304,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3893` - // Minimum execution time: 14_868_000 picoseconds. - Weight::from_parts(15_249_000, 3893) + // Minimum execution time: 15_419_000 picoseconds. + Weight::from_parts(15_700_000, 3893) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -319,8 +319,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `3599` - // Minimum execution time: 12_093_000 picoseconds. - Weight::from_parts(12_463_000, 3599) + // Minimum execution time: 12_674_000 picoseconds. + Weight::from_parts(12_985_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -334,8 +334,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `382` // Estimated: `3847` - // Minimum execution time: 16_180_000 picoseconds. - Weight::from_parts(16_611_000, 3847) + // Minimum execution time: 17_112_000 picoseconds. + Weight::from_parts(17_523_000, 3847) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -347,8 +347,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 10_150_000 picoseconds. - Weight::from_parts(10_430_000, 1619) + // Minimum execution time: 10_249_000 picoseconds. + Weight::from_parts(10_730_000, 1619) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -360,8 +360,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3605` - // Minimum execution time: 7_364_000 picoseconds. - Weight::from_parts(7_504_000, 3605) + // Minimum execution time: 7_555_000 picoseconds. + Weight::from_parts(7_835_000, 3605) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -385,8 +385,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `828` // Estimated: `4293` - // Minimum execution time: 32_271_000 picoseconds. - Weight::from_parts(32_913_000, 4293) + // Minimum execution time: 33_413_000 picoseconds. + Weight::from_parts(34_295_000, 4293) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -396,8 +396,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_174_000 picoseconds. - Weight::from_parts(13_505_000, 3877) + // Minimum execution time: 13_816_000 picoseconds. + Weight::from_parts(14_097_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -407,8 +407,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_515_000 picoseconds. - Weight::from_parts(13_796_000, 3877) + // Minimum execution time: 13_856_000 picoseconds. + Weight::from_parts(14_497_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -418,8 +418,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_551_000 picoseconds. - Weight::from_parts(5_721_000, 0) + // Minimum execution time: 5_711_000 picoseconds. + Weight::from_parts(5_882_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) @@ -428,8 +428,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `355` // Estimated: `1840` - // Minimum execution time: 9_478_000 picoseconds. - Weight::from_parts(9_668_000, 1840) + // Minimum execution time: 10_059_000 picoseconds. + Weight::from_parts(10_360_000, 1840) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -439,8 +439,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `413` // Estimated: `1898` - // Minimum execution time: 11_772_000 picoseconds. - Weight::from_parts(12_133_000, 1898) + // Minimum execution time: 12_263_000 picoseconds. + Weight::from_parts(12_624_000, 1898) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -450,8 +450,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `294` // Estimated: `3759` - // Minimum execution time: 12_985_000 picoseconds. - Weight::from_parts(13_175_000, 3759) + // Minimum execution time: 13_365_000 picoseconds. + Weight::from_parts(13_646_000, 3759) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -465,8 +465,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `572` // Estimated: `4037` - // Minimum execution time: 21_661_000 picoseconds. - Weight::from_parts(22_332_000, 4037) + // Minimum execution time: 22_322_000 picoseconds. + Weight::from_parts(23_254_000, 4037) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -476,8 +476,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 7_894_000 picoseconds. - Weight::from_parts(8_075_000, 1619) + // Minimum execution time: 8_176_000 picoseconds. + Weight::from_parts(8_366_000, 1619) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -493,8 +493,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `621` // Estimated: `4086` - // Minimum execution time: 22_282_000 picoseconds. - Weight::from_parts(22_843_000, 4086) + // Minimum execution time: 23_354_000 picoseconds. + Weight::from_parts(23_725_000, 4086) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -514,8 +514,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792` // Estimated: `4257` - // Minimum execution time: 25_709_000 picoseconds. - Weight::from_parts(26_310_000, 4257) + // Minimum execution time: 26_710_000 picoseconds. + Weight::from_parts(27_522_000, 4257) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -527,8 +527,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `387` // Estimated: `3852` - // Minimum execution time: 11_652_000 picoseconds. - Weight::from_parts(12_063_000, 3852) + // Minimum execution time: 12_113_000 picoseconds. + Weight::from_parts(12_413_000, 3852) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -544,8 +544,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 17_613_000 picoseconds. - Weight::from_parts(18_114_000, 3919) + // Minimum execution time: 18_565_000 picoseconds. + Weight::from_parts(19_086_000, 3919) .saturating_add(T::DbWeight::get().reads(4_u64)) } } @@ -558,8 +558,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_555_000 picoseconds. - Weight::from_parts(2_625_000, 0) + // Minimum execution time: 2_485_000 picoseconds. + Weight::from_parts(2_575_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) @@ -576,8 +576,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `496` // Estimated: `3961` - // Minimum execution time: 19_907_000 picoseconds. - Weight::from_parts(20_369_000, 3961) + // Minimum execution time: 20_870_000 picoseconds. + Weight::from_parts(21_480_000, 3961) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -591,8 +591,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `507` // Estimated: `3972` - // Minimum execution time: 21_481_000 picoseconds. - Weight::from_parts(21_921_000, 3972) + // Minimum execution time: 22_793_000 picoseconds. + Weight::from_parts(23_074_000, 3972) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -606,8 +606,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `453` // Estimated: `3918` - // Minimum execution time: 15_690_000 picoseconds. - Weight::from_parts(16_100_000, 3918) + // Minimum execution time: 16_180_000 picoseconds. + Weight::from_parts(16_651_000, 3918) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -617,8 +617,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_024_000 picoseconds. - Weight::from_parts(13_345_000, 3877) + // Minimum execution time: 13_675_000 picoseconds. + Weight::from_parts(14_097_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -630,8 +630,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 17_704_000 picoseconds. - Weight::from_parts(17_894_000, 4034) + // Minimum execution time: 18_404_000 picoseconds. + Weight::from_parts(18_815_000, 4034) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -643,8 +643,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 16_992_000 picoseconds. - Weight::from_parts(17_153_000, 4034) + // Minimum execution time: 17_413_000 picoseconds. + Weight::from_parts(17_874_000, 4034) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -672,8 +672,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `905` // Estimated: `11795` - // Minimum execution time: 47_981_000 picoseconds. - Weight::from_parts(49_514_000, 11795) + // Minimum execution time: 49_384_000 picoseconds. + Weight::from_parts(50_565_000, 11795) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -689,8 +689,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `661` // Estimated: `4126` - // Minimum execution time: 26_710_000 picoseconds. - Weight::from_parts(27_422_000, 4126) + // Minimum execution time: 28_183_000 picoseconds. + Weight::from_parts(28_875_000, 4126) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -704,8 +704,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `956` // Estimated: `11846` - // Minimum execution time: 34_064_000 picoseconds. - Weight::from_parts(34_926_000, 11846) + // Minimum execution time: 35_847_000 picoseconds. + Weight::from_parts(36_519_000, 11846) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -721,8 +721,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 18_475_000 picoseconds. - Weight::from_parts(18_886_000, 3919) + // Minimum execution time: 19_406_000 picoseconds. + Weight::from_parts(19_827_000, 3919) .saturating_add(RocksDbWeight::get().reads(4_u64)) } /// Storage: `TfgridModule::Farms` (r:1 w:0) @@ -735,8 +735,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779` // Estimated: `4244` - // Minimum execution time: 24_246_000 picoseconds. - Weight::from_parts(24_957_000, 4244) + // Minimum execution time: 25_348_000 picoseconds. + Weight::from_parts(25_999_000, 4244) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -756,8 +756,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `682` // Estimated: `4147` - // Minimum execution time: 27_592_000 picoseconds. - Weight::from_parts(28_203_000, 4147) + // Minimum execution time: 28_755_000 picoseconds. + Weight::from_parts(29_315_000, 4147) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -773,8 +773,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 14_087_000 picoseconds. - Weight::from_parts(14_357_000, 3700) + // Minimum execution time: 14_818_000 picoseconds. + Weight::from_parts(15_129_000, 3700) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -786,8 +786,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3893` - // Minimum execution time: 14_868_000 picoseconds. - Weight::from_parts(15_249_000, 3893) + // Minimum execution time: 15_419_000 picoseconds. + Weight::from_parts(15_700_000, 3893) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -801,8 +801,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `134` // Estimated: `3599` - // Minimum execution time: 12_093_000 picoseconds. - Weight::from_parts(12_463_000, 3599) + // Minimum execution time: 12_674_000 picoseconds. + Weight::from_parts(12_985_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -816,8 +816,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `382` // Estimated: `3847` - // Minimum execution time: 16_180_000 picoseconds. - Weight::from_parts(16_611_000, 3847) + // Minimum execution time: 17_112_000 picoseconds. + Weight::from_parts(17_523_000, 3847) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -829,8 +829,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 10_150_000 picoseconds. - Weight::from_parts(10_430_000, 1619) + // Minimum execution time: 10_249_000 picoseconds. + Weight::from_parts(10_730_000, 1619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -842,8 +842,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3605` - // Minimum execution time: 7_364_000 picoseconds. - Weight::from_parts(7_504_000, 3605) + // Minimum execution time: 7_555_000 picoseconds. + Weight::from_parts(7_835_000, 3605) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -867,8 +867,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `828` // Estimated: `4293` - // Minimum execution time: 32_271_000 picoseconds. - Weight::from_parts(32_913_000, 4293) + // Minimum execution time: 33_413_000 picoseconds. + Weight::from_parts(34_295_000, 4293) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -878,8 +878,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_174_000 picoseconds. - Weight::from_parts(13_505_000, 3877) + // Minimum execution time: 13_816_000 picoseconds. + Weight::from_parts(14_097_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -889,8 +889,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_515_000 picoseconds. - Weight::from_parts(13_796_000, 3877) + // Minimum execution time: 13_856_000 picoseconds. + Weight::from_parts(14_497_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -900,8 +900,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_551_000 picoseconds. - Weight::from_parts(5_721_000, 0) + // Minimum execution time: 5_711_000 picoseconds. + Weight::from_parts(5_882_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) @@ -910,8 +910,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `355` // Estimated: `1840` - // Minimum execution time: 9_478_000 picoseconds. - Weight::from_parts(9_668_000, 1840) + // Minimum execution time: 10_059_000 picoseconds. + Weight::from_parts(10_360_000, 1840) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -921,8 +921,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `413` // Estimated: `1898` - // Minimum execution time: 11_772_000 picoseconds. - Weight::from_parts(12_133_000, 1898) + // Minimum execution time: 12_263_000 picoseconds. + Weight::from_parts(12_624_000, 1898) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -932,8 +932,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `294` // Estimated: `3759` - // Minimum execution time: 12_985_000 picoseconds. - Weight::from_parts(13_175_000, 3759) + // Minimum execution time: 13_365_000 picoseconds. + Weight::from_parts(13_646_000, 3759) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -947,8 +947,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `572` // Estimated: `4037` - // Minimum execution time: 21_661_000 picoseconds. - Weight::from_parts(22_332_000, 4037) + // Minimum execution time: 22_322_000 picoseconds. + Weight::from_parts(23_254_000, 4037) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -958,8 +958,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 7_894_000 picoseconds. - Weight::from_parts(8_075_000, 1619) + // Minimum execution time: 8_176_000 picoseconds. + Weight::from_parts(8_366_000, 1619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -975,8 +975,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `621` // Estimated: `4086` - // Minimum execution time: 22_282_000 picoseconds. - Weight::from_parts(22_843_000, 4086) + // Minimum execution time: 23_354_000 picoseconds. + Weight::from_parts(23_725_000, 4086) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -996,8 +996,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792` // Estimated: `4257` - // Minimum execution time: 25_709_000 picoseconds. - Weight::from_parts(26_310_000, 4257) + // Minimum execution time: 26_710_000 picoseconds. + Weight::from_parts(27_522_000, 4257) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1009,8 +1009,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `387` // Estimated: `3852` - // Minimum execution time: 11_652_000 picoseconds. - Weight::from_parts(12_063_000, 3852) + // Minimum execution time: 12_113_000 picoseconds. + Weight::from_parts(12_413_000, 3852) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1026,8 +1026,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 17_613_000 picoseconds. - Weight::from_parts(18_114_000, 3919) + // Minimum execution time: 18_565_000 picoseconds. + Weight::from_parts(19_086_000, 3919) .saturating_add(RocksDbWeight::get().reads(4_u64)) } } diff --git a/substrate-node/pallets/pallet-tft-bridge/src/weights.rs b/substrate-node/pallets/pallet-tft-bridge/src/weights.rs index 780f318b8..0c69c8cdd 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/weights.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_tft_bridge //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -55,8 +55,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `256` // Estimated: `1741` - // Minimum execution time: 7_504_000 picoseconds. - Weight::from_parts(7_695_000, 1741) + // Minimum execution time: 7_184_000 picoseconds. + Weight::from_parts(7_525_000, 1741) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -66,8 +66,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `289` // Estimated: `1774` - // Minimum execution time: 7_404_000 picoseconds. - Weight::from_parts(7_655_000, 1774) + // Minimum execution time: 7_153_000 picoseconds. + Weight::from_parts(7_394_000, 1774) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -77,8 +77,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_385_000 picoseconds. - Weight::from_parts(2_515_000, 0) + // Minimum execution time: 2_235_000 picoseconds. + Weight::from_parts(2_385_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:0 w:1) @@ -87,8 +87,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_324_000 picoseconds. - Weight::from_parts(2_395_000, 0) + // Minimum execution time: 2_184_000 picoseconds. + Weight::from_parts(2_295_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::DepositFee` (r:0 w:1) @@ -97,8 +97,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_304_000 picoseconds. - Weight::from_parts(2_405_000, 0) + // Minimum execution time: 2_284_000 picoseconds. + Weight::from_parts(2_344_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:1 w:0) @@ -115,8 +115,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3593` - // Minimum execution time: 44_634_000 picoseconds. - Weight::from_parts(45_366_000, 3593) + // Minimum execution time: 43_822_000 picoseconds. + Weight::from_parts(44_784_000, 3593) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -136,8 +136,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `499` // Estimated: `3964` - // Minimum execution time: 62_268_000 picoseconds. - Weight::from_parts(63_359_000, 3964) + // Minimum execution time: 61_426_000 picoseconds. + Weight::from_parts(62_288_000, 3964) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -151,8 +151,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `631` // Estimated: `4096` - // Minimum execution time: 26_369_000 picoseconds. - Weight::from_parts(26_811_000, 4096) + // Minimum execution time: 26_129_000 picoseconds. + Weight::from_parts(26_690_000, 4096) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -166,8 +166,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `571` // Estimated: `4036` - // Minimum execution time: 18_816_000 picoseconds. - Weight::from_parts(19_237_000, 4036) + // Minimum execution time: 18_625_000 picoseconds. + Weight::from_parts(19_167_000, 4036) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -179,8 +179,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `385` // Estimated: `3850` - // Minimum execution time: 22_011_000 picoseconds. - Weight::from_parts(22_423_000, 3850) + // Minimum execution time: 21_801_000 picoseconds. + Weight::from_parts(22_292_000, 3850) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -194,8 +194,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `560` // Estimated: `4025` - // Minimum execution time: 19_286_000 picoseconds. - Weight::from_parts(19_847_000, 4025) + // Minimum execution time: 18_846_000 picoseconds. + Weight::from_parts(19_317_000, 4025) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -209,8 +209,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `256` // Estimated: `1741` - // Minimum execution time: 7_504_000 picoseconds. - Weight::from_parts(7_695_000, 1741) + // Minimum execution time: 7_184_000 picoseconds. + Weight::from_parts(7_525_000, 1741) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -220,8 +220,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `289` // Estimated: `1774` - // Minimum execution time: 7_404_000 picoseconds. - Weight::from_parts(7_655_000, 1774) + // Minimum execution time: 7_153_000 picoseconds. + Weight::from_parts(7_394_000, 1774) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -231,8 +231,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_385_000 picoseconds. - Weight::from_parts(2_515_000, 0) + // Minimum execution time: 2_235_000 picoseconds. + Weight::from_parts(2_385_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:0 w:1) @@ -241,8 +241,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_324_000 picoseconds. - Weight::from_parts(2_395_000, 0) + // Minimum execution time: 2_184_000 picoseconds. + Weight::from_parts(2_295_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::DepositFee` (r:0 w:1) @@ -251,8 +251,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_304_000 picoseconds. - Weight::from_parts(2_405_000, 0) + // Minimum execution time: 2_284_000 picoseconds. + Weight::from_parts(2_344_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:1 w:0) @@ -269,8 +269,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3593` - // Minimum execution time: 44_634_000 picoseconds. - Weight::from_parts(45_366_000, 3593) + // Minimum execution time: 43_822_000 picoseconds. + Weight::from_parts(44_784_000, 3593) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -290,8 +290,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `499` // Estimated: `3964` - // Minimum execution time: 62_268_000 picoseconds. - Weight::from_parts(63_359_000, 3964) + // Minimum execution time: 61_426_000 picoseconds. + Weight::from_parts(62_288_000, 3964) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -305,8 +305,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `631` // Estimated: `4096` - // Minimum execution time: 26_369_000 picoseconds. - Weight::from_parts(26_811_000, 4096) + // Minimum execution time: 26_129_000 picoseconds. + Weight::from_parts(26_690_000, 4096) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -320,8 +320,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `571` // Estimated: `4036` - // Minimum execution time: 18_816_000 picoseconds. - Weight::from_parts(19_237_000, 4036) + // Minimum execution time: 18_625_000 picoseconds. + Weight::from_parts(19_167_000, 4036) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -333,8 +333,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `385` // Estimated: `3850` - // Minimum execution time: 22_011_000 picoseconds. - Weight::from_parts(22_423_000, 3850) + // Minimum execution time: 21_801_000 picoseconds. + Weight::from_parts(22_292_000, 3850) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -348,8 +348,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `560` // Estimated: `4025` - // Minimum execution time: 19_286_000 picoseconds. - Weight::from_parts(19_847_000, 4025) + // Minimum execution time: 18_846_000 picoseconds. + Weight::from_parts(19_317_000, 4025) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } diff --git a/substrate-node/pallets/pallet-tft-price/src/weights.rs b/substrate-node/pallets/pallet-tft-price/src/weights.rs index 0422bfe36..7aeeb7b44 100644 --- a/substrate-node/pallets/pallet-tft-price/src/weights.rs +++ b/substrate-node/pallets/pallet-tft-price/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_tft_price //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -61,8 +61,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `6175` - // Minimum execution time: 30_177_000 picoseconds. - Weight::from_parts(30_969_000, 6175) + // Minimum execution time: 29_997_000 picoseconds. + Weight::from_parts(30_979_000, 6175) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -74,8 +74,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 5_080_000 picoseconds. - Weight::from_parts(5_250_000, 1578) + // Minimum execution time: 5_109_000 picoseconds. + Weight::from_parts(5_230_000, 1578) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -87,8 +87,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 5_150_000 picoseconds. - Weight::from_parts(5_310_000, 1578) + // Minimum execution time: 5_099_000 picoseconds. + Weight::from_parts(5_230_000, 1578) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -116,8 +116,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `235` // Estimated: `6175` - // Minimum execution time: 30_177_000 picoseconds. - Weight::from_parts(30_969_000, 6175) + // Minimum execution time: 29_997_000 picoseconds. + Weight::from_parts(30_979_000, 6175) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -129,8 +129,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 5_080_000 picoseconds. - Weight::from_parts(5_250_000, 1578) + // Minimum execution time: 5_109_000 picoseconds. + Weight::from_parts(5_230_000, 1578) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -142,8 +142,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 5_150_000 picoseconds. - Weight::from_parts(5_310_000, 1578) + // Minimum execution time: 5_099_000 picoseconds. + Weight::from_parts(5_230_000, 1578) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/pallets/pallet-validator/src/weights.rs b/substrate-node/pallets/pallet-validator/src/weights.rs index a5d6155b4..e59e703ab 100644 --- a/substrate-node/pallets/pallet-validator/src/weights.rs +++ b/substrate-node/pallets/pallet-validator/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_validator //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -50,8 +50,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 9_348_000 picoseconds. - Weight::from_parts(9_638_000, 3507) + // Minimum execution time: 9_628_000 picoseconds. + Weight::from_parts(9_989_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -65,8 +65,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `365` // Estimated: `3830` - // Minimum execution time: 24_526_000 picoseconds. - Weight::from_parts(25_128_000, 3830) + // Minimum execution time: 25_148_000 picoseconds. + Weight::from_parts(25_538_000, 3830) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -80,8 +80,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `431` // Estimated: `3896` - // Minimum execution time: 34_004_000 picoseconds. - Weight::from_parts(34_556_000, 3896) + // Minimum execution time: 33_954_000 picoseconds. + Weight::from_parts(34_856_000, 3896) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -91,8 +91,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 8_426_000 picoseconds. - Weight::from_parts(8_787_000, 3507) + // Minimum execution time: 8_667_000 picoseconds. + Weight::from_parts(9_007_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -110,8 +110,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `494` // Estimated: `4687` - // Minimum execution time: 24_958_000 picoseconds. - Weight::from_parts(25_338_000, 4687) + // Minimum execution time: 25_188_000 picoseconds. + Weight::from_parts(25_729_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -131,8 +131,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `558` // Estimated: `4687` - // Minimum execution time: 22_091_000 picoseconds. - Weight::from_parts(22_783_000, 4687) + // Minimum execution time: 22_542_000 picoseconds. + Weight::from_parts(23_053_000, 4687) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -146,8 +146,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 9_348_000 picoseconds. - Weight::from_parts(9_638_000, 3507) + // Minimum execution time: 9_628_000 picoseconds. + Weight::from_parts(9_989_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -161,8 +161,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `365` // Estimated: `3830` - // Minimum execution time: 24_526_000 picoseconds. - Weight::from_parts(25_128_000, 3830) + // Minimum execution time: 25_148_000 picoseconds. + Weight::from_parts(25_538_000, 3830) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -176,8 +176,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `431` // Estimated: `3896` - // Minimum execution time: 34_004_000 picoseconds. - Weight::from_parts(34_556_000, 3896) + // Minimum execution time: 33_954_000 picoseconds. + Weight::from_parts(34_856_000, 3896) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -187,8 +187,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 8_426_000 picoseconds. - Weight::from_parts(8_787_000, 3507) + // Minimum execution time: 8_667_000 picoseconds. + Weight::from_parts(9_007_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -206,8 +206,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `494` // Estimated: `4687` - // Minimum execution time: 24_958_000 picoseconds. - Weight::from_parts(25_338_000, 4687) + // Minimum execution time: 25_188_000 picoseconds. + Weight::from_parts(25_729_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -227,8 +227,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `558` // Estimated: `4687` - // Minimum execution time: 22_091_000 picoseconds. - Weight::from_parts(22_783_000, 4687) + // Minimum execution time: 22_542_000 picoseconds. + Weight::from_parts(23_053_000, 4687) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/substrate-node/pallets/substrate-validator-set/src/weights.rs b/substrate-node/pallets/substrate-validator-set/src/weights.rs index d1564eb88..5fab1aefe 100644 --- a/substrate-node/pallets/substrate-validator-set/src/weights.rs +++ b/substrate-node/pallets/substrate-validator-set/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for substrate_validator_set //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `7f09c44a8947`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -49,8 +49,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `1624` - // Minimum execution time: 14_668_000 picoseconds. - Weight::from_parts(14_868_000, 1624) + // Minimum execution time: 13_706_000 picoseconds. + Weight::from_parts(13_976_000, 1624) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -62,8 +62,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 11_642_000 picoseconds. - Weight::from_parts(12_063_000, 1690) + // Minimum execution time: 10_960_000 picoseconds. + Weight::from_parts(11_311_000, 1690) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -75,8 +75,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `172` // Estimated: `1657` - // Minimum execution time: 12_804_000 picoseconds. - Weight::from_parts(13_235_000, 1657) + // Minimum execution time: 12_274_000 picoseconds. + Weight::from_parts(12_604_000, 1657) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -92,8 +92,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `139` // Estimated: `1624` - // Minimum execution time: 14_668_000 picoseconds. - Weight::from_parts(14_868_000, 1624) + // Minimum execution time: 13_706_000 picoseconds. + Weight::from_parts(13_976_000, 1624) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -105,8 +105,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 11_642_000 picoseconds. - Weight::from_parts(12_063_000, 1690) + // Minimum execution time: 10_960_000 picoseconds. + Weight::from_parts(11_311_000, 1690) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -118,8 +118,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `172` // Estimated: `1657` - // Minimum execution time: 12_804_000 picoseconds. - Weight::from_parts(13_235_000, 1657) + // Minimum execution time: 12_274_000 picoseconds. + Weight::from_parts(12_604_000, 1657) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 6aab37147..27222d76a 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -470,6 +470,7 @@ impl substrate_validator_set::Config for Runtime { parameter_types! { pub const DaoMotionDuration: BlockNumber = 7 * DAYS; pub const MinVetos: u32 = 3; + pub const DaoMotionMinThreshold: u32 = 5; } impl pallet_dao::Config for Runtime { @@ -477,6 +478,7 @@ impl pallet_dao::Config for Runtime { type CouncilOrigin = EnsureRootOrCouncilApproval; type Proposal = RuntimeCall; type MotionDuration = DaoMotionDuration; + type MotionMinThreshold = DaoMotionMinThreshold; type Tfgrid = TfgridModule; type WeightInfo = pallet_dao::weights::SubstrateWeight; type MinVetos = MinVetos; From 02dff000a32d557e4e9b1be8b01988b95a6b07a0 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Wed, 5 Jun 2024 21:04:48 +0300 Subject: [PATCH 35/44] feat(version): add makefile version-bump (#973) --- Makefile | 36 ++++++++++++++++ docs/production/releases.md | 84 ++++++++++++++++++++++++------------- 2 files changed, 92 insertions(+), 28 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..75518d111 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +.PHONY: version-bump + +# usage: > type=patch make version-bump +# usage: > type=minor make version-bump +# usage: > type=major make version-bump +version-bump: + set -e; \ + if [ "$(type)" = "patch" ] || [ "$(type)" = "minor" ] || [ "$(type)" = "major" ]; then \ + default_branch=$$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'); \ + git checkout $$default_branch; \ + git pull origin $$default_branch; \ + new_version=$$(npx semver -i $(type) $$(jq -r .version clients/tfchain-client-js/package.json)); \ + branch_name="$$default_branch-bump-version-to-$$new_version"; \ + git checkout -b $$branch_name; \ + current_spec_version=$$(sed -n -e 's/^.*spec_version: \([0-9]\+\),$$/\1/p' substrate-node/runtime/src/lib.rs); \ + echo "Current spec_version: $$current_spec_version"; \ + new_spec_version=$$((current_spec_version + 1)); \ + echo "New spec_version: $$new_spec_version"; \ + sed -i "s/spec_version: $$current_spec_version,/spec_version: $$new_spec_version,/" substrate-node/runtime/src/lib.rs; \ + jq ".version = \"$$new_version\"" activation-service/package.json > temp.json && mv temp.json activation-service/package.json; \ + jq ".version = \"$$new_version\"" clients/tfchain-client-js/package.json > temp.json && mv temp.json clients/tfchain-client-js/package.json; \ + jq ".version = \"$$new_version\"" scripts/package.json > temp.json && mv temp.json scripts/package.json; \ + jq ".version = \"$$new_version\"" tools/fork-off-substrate/package.json > temp.json && mv temp.json tools/fork-off-substrate/package.json; \ + sed -i "s/^version = .*/version = \"$$new_version\"/" substrate-node/Cargo.toml; \ + sed -i "s/^version: .*/version: $$new_version/" substrate-node/charts/substrate-node/Chart.yaml; \ + sed -i "s/^appVersion: .*/appVersion: '$$new_version'/" substrate-node/charts/substrate-node/Chart.yaml; \ + sed -i "s/^version: .*/version: $$new_version/" bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml; \ + sed -i "s/^appVersion: .*/appVersion: '$$new_version'/" bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml; \ + sed -i "s/^version: .*/version: $$new_version/" activation-service/helm/tfchainactivationservice/Chart.yaml; \ + sed -i "s/^appVersion: .*/appVersion: '$$new_version'/" activation-service/helm/tfchainactivationservice/Chart.yaml; \ + cd substrate-node && cargo metadata -q 1> /dev/null && cd ..; \ + git add substrate-node/Cargo.toml substrate-node/Cargo.lock substrate-node/charts/substrate-node/Chart.yaml bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml activation-service/helm/tfchainactivationservice/Chart.yaml activation-service/package.json clients/tfchain-client-js/package.json scripts/package.json tools/fork-off-substrate/package.json substrate-node/runtime/src/lib.rs; \ + git commit -m "Bump version to $$new_version (spec v$$new_spec_version)"; \ + else \ + echo "Invalid version type. Please use patch, minor, or major."; \ + fi diff --git a/docs/production/releases.md b/docs/production/releases.md index dabb78e28..061cb891c 100644 --- a/docs/production/releases.md +++ b/docs/production/releases.md @@ -1,46 +1,74 @@ -## Releases +# Releases -Releases are automated by [this workflow](.github/workflows/030_create_release.yaml). When a release should be created following things need to be done: +Releases are automated by [this workflow](.github/workflows/030_create_release.yaml). +When a release should be created following things need to be done: -* substrate-node - * Increment spec version in the runtime [lib.rs](../../substrate-node/runtime/src/lib.rs) - * Increment version in [Cargo.toml](../../substrate-node/Cargo.toml) - * Increment chart `version` filed in [Chart.yaml](../../substrate-node/charts/substrate-node/Chart.yaml) - * Increment chart `appVersion` filed in [Chart.yaml](../../substrate-node/charts/substrate-node/Chart.yaml) +## Version bump -* tfchainbridge - * Increment chart `version` filed in [Chart.yaml](../../bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml) - * Increment chart `appVersion` filed in [Chart.yaml](../../bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml) +This step can be done using Makefile or manually. -* activation-service - * Increment chart `version` filed in [Chart.yaml](../../activation-service/helm/tfchainactivationservice/Chart.yaml) - * Increment chart `appVersion` filed in [Chart.yaml](../../activation-service/helm/tfchainactivationservice/Chart.yaml) - * Increment package `version` in [package.json](../../activation-service/package.json) +### Makefile -* Js TFChain Client - * Increment package `version` in [package.json](../../clients/tfchain-client-js/package.json) +see makefile [here](../../Makefile) -* Scripts - * Increment package `version` in [package.json](../../scripts/package.json) +#### Usage -* Tools/fork-off-substrate - * Increment package `version` in [package.json](../../tools/fork-off-substrate/package.json) +```bash +type=patch make version-bump # incrment the patch version +type=minor make version-bump # incrment the minor version +type=major make version-bump # incrment the major version +``` -* Commit the changes +This function will take care also of branch and commit creation. +Review the changes and push them, then follow the steps 3 and 4 below to finish the release. -* Create a new tag with the version number prefixed with a `v` (e.g. `v1.0.0`, `v1.0.0-rc1` for release candidates) +Important: This function will also incrment the spec version in the runtime. +If you already did this in another commit you need to undo spec_version changes to avoid double incrment. -* Push the tag to the repository +### Manually -* The workflow will create a release draft with the changelog and the binaries attached +1 - Create a new branch for the release, increment the version for all components in the monorepo. +Here is a list of the files that need to be changed to make the release: -A changelog will be generated based on the Pull requests merged, so having PRs with meaningful titles is important. +* substrate-node + * Increment spec version in the runtime [lib.rs](../../substrate-node/runtime/src/lib.rs) + * Increment version in [Cargo.toml](../../substrate-node/Cargo.toml) + * Increment chart `version` filed in [Chart.yaml](../../substrate-node/charts/substrate-node/Chart.yaml) + * Increment chart `appVersion` filed in [Chart.yaml](../../substrate-node/charts/substrate-node/Chart.yaml) + +* tfchainbridge + * Increment chart `version` filed in [Chart.yaml](../../bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml) + * Increment chart `appVersion` filed in [Chart.yaml](../../bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml) + +* activation-service + * Increment chart `version` filed in [Chart.yaml](../../activation-service/helm/tfchainactivationservice/Chart.yaml) + * Increment chart `appVersion` filed in [Chart.yaml](../../activation-service/helm/tfchainactivationservice/Chart.yaml) + * Increment package `version` in [package.json](../../activation-service/package.json) + +* Js TFChain Client + * Increment package `version` in [package.json](../../clients/tfchain-client-js/package.json) + +* Scripts + * Increment package `version` in [package.json](../../scripts/package.json) + +* Tools/fork-off-substrate + * Increment package `version` in [package.json](../../tools/fork-off-substrate/package.json) + +2 - Commit the changes + +3 - Create a new tag with the version number prefixed with a `v` (e.g. `v1.0.0`) + +4 - Push the tag to the repository + +The workflow will create a release draft with the changelog and the binaries attached + +The generated changelog will be based on the merged Pull requests, so having PRs with meaningful titles is important. ## Validate a runtime See [validate](../misc/validating_runtime.md) for instructions on how to validate a runtime. -### Upgrade runtime +## Upgrade runtime -To upgrade the runtime for a network based on a release, download the runtime attached to the release (tfchain\_runtime.compact.compressed.wasm) -and upload it to the network using a council proposal. The proposal should be a `set_code` proposal with the runtime as the code and majority of the council should vote in favor of the proposal. +To upgrade the runtime for a network based on a release, download the runtime attached to the release (tfchain\_runtime.compact.compressed.wasm) and upload it to the network using a council proposal. +The proposal should be a `set_code` proposal with the runtime as the code and majority of the council should vote in favor of the proposal. From 4bb2e529da18cc064a220153dd245c048004b54c Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Wed, 5 Jun 2024 19:00:02 -0300 Subject: [PATCH 36/44] doc: add missing ADR files (#976) --- docs/architecture/0020-rework-dao-voting.md | 20 +++++++++++++++++++ .../architecture/0021-allow-hdd-only-nodes.md | 18 +++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 docs/architecture/0020-rework-dao-voting.md create mode 100644 docs/architecture/0021-allow-hdd-only-nodes.md diff --git a/docs/architecture/0020-rework-dao-voting.md b/docs/architecture/0020-rework-dao-voting.md new file mode 100644 index 000000000..af4b918c8 --- /dev/null +++ b/docs/architecture/0020-rework-dao-voting.md @@ -0,0 +1,20 @@ +# 20. Harden closing of a DAO motion voting + +Date: 2024-05-02 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/889) for more +details. + +## Decision + +In `propose()` extrinsic, set a minimum threshold `MotionMinThreshold` of 5 +votes for a motion to be proposed and if threshold is lower then return error +`TresholdTooLow`. Also in `propose()`extrinsic, add a minimum motion duration of +1 day and return error `InvalidProposalDuration` if optional duration is not set +in the 1 day - 30 days interval. diff --git a/docs/architecture/0021-allow-hdd-only-nodes.md b/docs/architecture/0021-allow-hdd-only-nodes.md new file mode 100644 index 000000000..74d36b2af --- /dev/null +++ b/docs/architecture/0021-allow-hdd-only-nodes.md @@ -0,0 +1,18 @@ +# 21. Allow 'only hdd' nodes to register on chain + +Date: 2024-05-22 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/967) for more +details. + +## Decision + +Similar to what already exists for SSD, add a minimum HDD size requirement (also +100 GB) on `resources.validate_hru()`. Then, on validating, make sure node has +at least 1 minimum storage capacity available. From 077a5234484b18d871103b87285c00ec5d331f36 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Thu, 6 Jun 2024 01:27:28 +0300 Subject: [PATCH 37/44] Allow spec_version increment skipping during version-bump execution (#977) * build: allow spec_version increment skipping during make version-bump execution * docs: update releases doc * build: modifiy commit message if spec_version retained * build: fix typo --- Makefile | 26 ++++++++++++++++++-------- docs/production/releases.md | 6 +++++- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 75518d111..cc94da7cf 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,11 @@ .PHONY: version-bump -# usage: > type=patch make version-bump -# usage: > type=minor make version-bump -# usage: > type=major make version-bump +# * Usage Examples:* +# type=patch make version-bump +# type=minor make version-bump +# type=major make version-bump +# ** skip increment spec_version in substrate-node/runtime/src/lib.rs ** +# type=patch retain_spec_version=1 make version-bump version-bump: set -e; \ if [ "$(type)" = "patch" ] || [ "$(type)" = "minor" ] || [ "$(type)" = "major" ]; then \ @@ -13,10 +16,13 @@ version-bump: branch_name="$$default_branch-bump-version-to-$$new_version"; \ git checkout -b $$branch_name; \ current_spec_version=$$(sed -n -e 's/^.*spec_version: \([0-9]\+\),$$/\1/p' substrate-node/runtime/src/lib.rs); \ - echo "Current spec_version: $$current_spec_version"; \ - new_spec_version=$$((current_spec_version + 1)); \ - echo "New spec_version: $$new_spec_version"; \ - sed -i "s/spec_version: $$current_spec_version,/spec_version: $$new_spec_version,/" substrate-node/runtime/src/lib.rs; \ + if [ -z "$${retain_spec_version}" ]; then \ + current_spec_version=$$(sed -n -e 's/^.*spec_version: \([0-9]\+\),$$/\1/p' substrate-node/runtime/src/lib.rs); \ + echo "Current spec_version: $$current_spec_version"; \ + new_spec_version=$$((current_spec_version + 1)); \ + echo "New spec_version: $$new_spec_version"; \ + sed -i "s/spec_version: $$current_spec_version,/spec_version: $$new_spec_version,/" substrate-node/runtime/src/lib.rs; \ + fi; \ jq ".version = \"$$new_version\"" activation-service/package.json > temp.json && mv temp.json activation-service/package.json; \ jq ".version = \"$$new_version\"" clients/tfchain-client-js/package.json > temp.json && mv temp.json clients/tfchain-client-js/package.json; \ jq ".version = \"$$new_version\"" scripts/package.json > temp.json && mv temp.json scripts/package.json; \ @@ -30,7 +36,11 @@ version-bump: sed -i "s/^appVersion: .*/appVersion: '$$new_version'/" activation-service/helm/tfchainactivationservice/Chart.yaml; \ cd substrate-node && cargo metadata -q 1> /dev/null && cd ..; \ git add substrate-node/Cargo.toml substrate-node/Cargo.lock substrate-node/charts/substrate-node/Chart.yaml bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml activation-service/helm/tfchainactivationservice/Chart.yaml activation-service/package.json clients/tfchain-client-js/package.json scripts/package.json tools/fork-off-substrate/package.json substrate-node/runtime/src/lib.rs; \ - git commit -m "Bump version to $$new_version (spec v$$new_spec_version)"; \ + if [ -z "$${new_spec_version}" ]; then \ + git commit -m "Bump version to $$new_version"; \ + else \ + git commit -m "Bump version to $$new_version (spec v$$new_spec_version)"; \ + fi \ else \ echo "Invalid version type. Please use patch, minor, or major."; \ fi diff --git a/docs/production/releases.md b/docs/production/releases.md index 061cb891c..2b96aed7b 100644 --- a/docs/production/releases.md +++ b/docs/production/releases.md @@ -23,7 +23,11 @@ This function will take care also of branch and commit creation. Review the changes and push them, then follow the steps 3 and 4 below to finish the release. Important: This function will also incrment the spec version in the runtime. -If you already did this in another commit you need to undo spec_version changes to avoid double incrment. +If you already did this in another commit or you don't need to do this, you can instruct the Makefile version-bump function to skip it by setting the `retain_spec_version` variable to 1 or any other value. + +```bash +type=patch retain_spec_version=1 make version-bump +``` ### Manually From 65c2de30240059c8f42a0b951dfd8849868e4457 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Thu, 6 Jun 2024 01:28:40 +0300 Subject: [PATCH 38/44] Bump version to 2.8.1 (spec v151) (#978) --- .../helm/tfchainactivationservice/Chart.yaml | 4 +-- activation-service/package.json | 2 +- .../chart/tfchainbridge/Chart.yaml | 4 +-- clients/tfchain-client-js/package.json | 2 +- scripts/package.json | 2 +- substrate-node/Cargo.lock | 26 +++++++++---------- substrate-node/Cargo.toml | 2 +- .../charts/substrate-node/Chart.yaml | 4 +-- substrate-node/runtime/src/lib.rs | 2 +- tools/fork-off-substrate/package.json | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/activation-service/helm/tfchainactivationservice/Chart.yaml b/activation-service/helm/tfchainactivationservice/Chart.yaml index 5e84960a8..bf706beb8 100644 --- a/activation-service/helm/tfchainactivationservice/Chart.yaml +++ b/activation-service/helm/tfchainactivationservice/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainactivationservice description: TFchain account activation funding service type: application -version: 2.8.0 -appVersion: '2.8.0' +version: 2.8.1 +appVersion: '2.8.1' diff --git a/activation-service/package.json b/activation-service/package.json index 267f39df3..973e9e6b5 100644 --- a/activation-service/package.json +++ b/activation-service/package.json @@ -1,6 +1,6 @@ { "name": "substrate-funding-service", - "version": "2.8.0", + "version": "2.8.1", "description": "Substrate funding service", "main": "index.js", "scripts": { diff --git a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml index 89f666cdb..124d7166a 100644 --- a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml +++ b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainbridge description: Bridge for TFT between Tfchain Stellar type: application -version: 2.8.0 -appVersion: '2.8.0' +version: 2.8.1 +appVersion: '2.8.1' diff --git a/clients/tfchain-client-js/package.json b/clients/tfchain-client-js/package.json index 09aaef7ed..c5c5ef53c 100644 --- a/clients/tfchain-client-js/package.json +++ b/clients/tfchain-client-js/package.json @@ -1,6 +1,6 @@ { "name": "tfgrid-api-client", - "version": "2.8.0", + "version": "2.8.1", "description": "API client for the TF Grid", "main": "index.js", "scripts": { diff --git a/scripts/package.json b/scripts/package.json index f816b44bd..f21895495 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -1,6 +1,6 @@ { "name": "tfchain-js-scripts", - "version": "2.8.0", + "version": "2.8.1", "description": "scripts to fetch data / write data to tfchain", "main": "index.js", "scripts": { diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index c5bd3ebdc..c98257439 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -4244,7 +4244,7 @@ dependencies = [ [[package]] name = "pallet-burning" -version = "2.8.0" +version = "2.8.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -4279,7 +4279,7 @@ dependencies = [ [[package]] name = "pallet-dao" -version = "2.8.0" +version = "2.8.1" dependencies = [ "env_logger", "frame-benchmarking", @@ -4325,7 +4325,7 @@ dependencies = [ [[package]] name = "pallet-kvstore" -version = "2.8.0" +version = "2.8.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -4358,7 +4358,7 @@ dependencies = [ [[package]] name = "pallet-runtime-upgrade" -version = "2.8.0" +version = "2.8.1" dependencies = [ "frame-support", "frame-system", @@ -4424,7 +4424,7 @@ dependencies = [ [[package]] name = "pallet-smart-contract" -version = "2.8.0" +version = "2.8.1" dependencies = [ "env_logger", "frame-benchmarking", @@ -4477,7 +4477,7 @@ dependencies = [ [[package]] name = "pallet-tfgrid" -version = "2.8.0" +version = "2.8.1" dependencies = [ "env_logger", "frame-benchmarking", @@ -4505,7 +4505,7 @@ dependencies = [ [[package]] name = "pallet-tft-bridge" -version = "2.8.0" +version = "2.8.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -4523,7 +4523,7 @@ dependencies = [ [[package]] name = "pallet-tft-price" -version = "2.8.0" +version = "2.8.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -4627,7 +4627,7 @@ dependencies = [ [[package]] name = "pallet-validator" -version = "2.8.0" +version = "2.8.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7996,7 +7996,7 @@ dependencies = [ [[package]] name = "substrate-validator-set" -version = "2.8.0" +version = "2.8.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8134,7 +8134,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "tfchain" -version = "2.8.0" +version = "2.8.1" dependencies = [ "clap", "frame-benchmarking", @@ -8180,7 +8180,7 @@ dependencies = [ [[package]] name = "tfchain-runtime" -version = "2.8.0" +version = "2.8.1" dependencies = [ "frame-benchmarking", "frame-executive", @@ -8234,7 +8234,7 @@ dependencies = [ [[package]] name = "tfchain-support" -version = "2.8.0" +version = "2.8.1" dependencies = [ "frame-support", "frame-system", diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index eb184c9e1..ee9d9df05 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://threefold.io/" license-file = "LICENSE" readme = "README.md" repository = "https://github.com/threefoldtech/tfchain3" -version = "2.8.0" +version = "2.8.1" [workspace] members = [ diff --git a/substrate-node/charts/substrate-node/Chart.yaml b/substrate-node/charts/substrate-node/Chart.yaml index 58e8d59a1..534d57d23 100644 --- a/substrate-node/charts/substrate-node/Chart.yaml +++ b/substrate-node/charts/substrate-node/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: substrate-node description: Tfchain node type: application -version: 2.8.0 -appVersion: '2.8.0' +version: 2.8.1 +appVersion: '2.8.1' diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 27222d76a..3169a9740 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -151,7 +151,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("substrate-threefold"), impl_name: create_runtime_str!("substrate-threefold"), authoring_version: 1, - spec_version: 150, + spec_version: 151, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/tools/fork-off-substrate/package.json b/tools/fork-off-substrate/package.json index 0d53411a9..dd7fe1374 100644 --- a/tools/fork-off-substrate/package.json +++ b/tools/fork-off-substrate/package.json @@ -1,6 +1,6 @@ { "name": "fork-off-substrate", - "version": "2.8.0", + "version": "2.8.1", "description": "This script allows bootstrapping a new substrate chain with the current state of a live chain", "main": "index.js", "scripts": { From 54805ca4f12a48ed6640f2f876278da3156d0220 Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Mon, 8 Jul 2024 08:14:01 -0300 Subject: [PATCH 39/44] doc(pallet-dao): missing documentation (#984) --- docs/architecture/0015-duplicate-veto.md | 9 ++++--- ...nsaction-BurnTransactionExpired-changed.md | 15 ----------- docs/architecture/0016-rework-dao-voting.md | 19 +++++++++++++ ...nsaction-BurnTransactionExpired-changed.md | 18 +++++++++++++ .../0017-rework_cancel_contracts.md | 16 ----------- .../0018-allow-renting-standby-node.md | 21 --------------- .../0018-rework_cancel_contracts.md | 19 +++++++++++++ .../0019-allow-renting-standby-node.md | 27 +++++++++++++++++++ ....md => 0020-rework_change_power_target.md} | 8 +++--- ...ao-voting.md => 0021-rework-dao-voting.md} | 2 +- ...-nodes.md => 0022-allow-hdd-only-nodes.md} | 2 +- .../pallet-dao/creating_proposal_farmers.md | 4 +-- 12 files changed, 98 insertions(+), 62 deletions(-) delete mode 100644 docs/architecture/0016-BurnTransaction-BurnTransactionExpired-changed.md create mode 100644 docs/architecture/0016-rework-dao-voting.md create mode 100644 docs/architecture/0017-BurnTransaction-BurnTransactionExpired-changed.md delete mode 100644 docs/architecture/0017-rework_cancel_contracts.md delete mode 100644 docs/architecture/0018-allow-renting-standby-node.md create mode 100644 docs/architecture/0018-rework_cancel_contracts.md create mode 100644 docs/architecture/0019-allow-renting-standby-node.md rename docs/architecture/{0019-rework_change_power_target.md => 0020-rework_change_power_target.md} (57%) rename docs/architecture/{0020-rework-dao-voting.md => 0021-rework-dao-voting.md} (91%) rename docs/architecture/{0021-allow-hdd-only-nodes.md => 0022-allow-hdd-only-nodes.md} (87%) diff --git a/docs/architecture/0015-duplicate-veto.md b/docs/architecture/0015-duplicate-veto.md index 80e8e28d0..cdd55ab93 100644 --- a/docs/architecture/0015-duplicate-veto.md +++ b/docs/architecture/0015-duplicate-veto.md @@ -8,9 +8,12 @@ Accepted ## Context -See [here](https://github.com/threefoldtech/tfchain/issues/858) for more details. +See [here](https://github.com/threefoldtech/tfchain/issues/858) for more +details. ## Decision -Since we don't want a council member to veto a DAO proposal alone by being able to submit its veto more than once we need to prevent duplicate veto. -In `pallet-dao`, `veto()` extrinsic should return an appropriate error while this situation occures. +Since we don't want a council member to veto a DAO proposal alone by being able +to submit its veto more than once we need to prevent duplicate veto. In +`pallet-dao`, `veto()` extrinsic should return an appropriate error while this +situation occures. diff --git a/docs/architecture/0016-BurnTransaction-BurnTransactionExpired-changed.md b/docs/architecture/0016-BurnTransaction-BurnTransactionExpired-changed.md deleted file mode 100644 index f1a441016..000000000 --- a/docs/architecture/0016-BurnTransaction-BurnTransactionExpired-changed.md +++ /dev/null @@ -1,15 +0,0 @@ -# 16. Add Source account ID to BurnTransaction storage type and BurnTransactionExpired event - -Date: 2023-11-14 - -## Status - -Accepted - -## Context - -See [here](https://github.com/threefoldtech/tfchain/issues/883) for more details. - -## Decision - -Add `Source` account ID to `BurnTransaction` storage type and `BurnTransactionExpired` event and migrate previous `BurnTransactions` and `ExecutedBurnTransactions` storages diff --git a/docs/architecture/0016-rework-dao-voting.md b/docs/architecture/0016-rework-dao-voting.md new file mode 100644 index 000000000..fe62dbe68 --- /dev/null +++ b/docs/architecture/0016-rework-dao-voting.md @@ -0,0 +1,19 @@ +# 16. Add condition to DAO motion approval + +Date: 2023-11-07 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/803) for more +details. + +## Decision + +Stick to specs initial idea by adding new condition +`number of votes >= threshold` for proposal to be approved. If by the end of the +vote the minimal amount of votes is not reached, the proposal fails due to +insufficient interest. diff --git a/docs/architecture/0017-BurnTransaction-BurnTransactionExpired-changed.md b/docs/architecture/0017-BurnTransaction-BurnTransactionExpired-changed.md new file mode 100644 index 000000000..c4c172bf0 --- /dev/null +++ b/docs/architecture/0017-BurnTransaction-BurnTransactionExpired-changed.md @@ -0,0 +1,18 @@ +# 17. Add Source account ID to BurnTransaction and BurnTransactionExpired + +Date: 2023-11-14 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/883) for more +details. + +## Decision + +Add `Source` account ID to `BurnTransaction` storage type and +`BurnTransactionExpired` event and migrate previous `BurnTransactions` and +`ExecutedBurnTransactions` storages diff --git a/docs/architecture/0017-rework_cancel_contracts.md b/docs/architecture/0017-rework_cancel_contracts.md deleted file mode 100644 index 56693ea05..000000000 --- a/docs/architecture/0017-rework_cancel_contracts.md +++ /dev/null @@ -1,16 +0,0 @@ -# 17. Allow collective approval to cancel contracts - -Date: 2023-11-06 - -## Status - -Accepted - -## Context - -See [here](https://github.com/threefoldtech/tfchain/issues/884) for more details. - -## Decision - -In `pallet-smart-contract`, add `cancel_contract_collective()` extrinsic to allow a collective approval (council or farmers) to cancel a contract. -For this purpose we also add a new entry `CanceledByCollective` in `Cause` enum to better qualify the cancelation cause. diff --git a/docs/architecture/0018-allow-renting-standby-node.md b/docs/architecture/0018-allow-renting-standby-node.md deleted file mode 100644 index dd3e18b46..000000000 --- a/docs/architecture/0018-allow-renting-standby-node.md +++ /dev/null @@ -1,21 +0,0 @@ -# 18. Allow renting standby node - -Date: 2024-01-09 - -## Status - -Accepted - -## Context - -See [here](https://github.com/threefoldtech/tfchain/issues/923) for more details. - -## Decision - -We want to be able to create a rent contract on node even if it is in standby phase. -Moreover, user should be billed for this contract only during online periods. - -In `pallet-smart-contract`: - -* Remove the `node_power.is_down()` restriction when trying to create a rent contract in `create_rent_contract()` extrinsic. restriction -* Modify rent contract billing logic by allowing billing only if the node is online (`PowerState` = `Up`). To skip the billing during the standby period we update the contract lock when the node power state is switched to `Up`. diff --git a/docs/architecture/0018-rework_cancel_contracts.md b/docs/architecture/0018-rework_cancel_contracts.md new file mode 100644 index 000000000..bc090d87b --- /dev/null +++ b/docs/architecture/0018-rework_cancel_contracts.md @@ -0,0 +1,19 @@ +# 18. Allow collective approval to cancel contracts + +Date: 2023-11-06 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/884) for more +details. + +## Decision + +In `pallet-smart-contract`, add `cancel_contract_collective()` extrinsic to +allow a collective approval (council or farmers) to cancel a contract. For this +purpose we also add a new entry `CanceledByCollective` in `Cause` enum to better +qualify the cancelation cause. diff --git a/docs/architecture/0019-allow-renting-standby-node.md b/docs/architecture/0019-allow-renting-standby-node.md new file mode 100644 index 000000000..450073be0 --- /dev/null +++ b/docs/architecture/0019-allow-renting-standby-node.md @@ -0,0 +1,27 @@ +# 19. Allow renting standby node + +Date: 2024-01-09 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/923) for more +details. + +## Decision + +We want to be able to create a rent contract on node even if it is in standby +phase. Moreover, user should be billed for this contract only during online +periods. + +In `pallet-smart-contract`: + +- Remove the `node_power.is_down()` restriction when trying to create a rent + contract in `create_rent_contract()` extrinsic. restriction + +- Modify rent contract billing logic by allowing billing only if the node is + online (`PowerState` = `Up`). To skip the billing during the standby period we + update the contract lock when the node power state is switched to `Up`. diff --git a/docs/architecture/0019-rework_change_power_target.md b/docs/architecture/0020-rework_change_power_target.md similarity index 57% rename from docs/architecture/0019-rework_change_power_target.md rename to docs/architecture/0020-rework_change_power_target.md index d30252fe8..4a9390eea 100644 --- a/docs/architecture/0019-rework_change_power_target.md +++ b/docs/architecture/0020-rework_change_power_target.md @@ -1,4 +1,4 @@ -# 19. Rework change power target on node +# 20. Rework change power target on node Date: 2024-01-09 @@ -8,8 +8,10 @@ Accepted ## Context -See [here](https://github.com/threefoldtech/tfchain/issues/924) for more details. +See [here](https://github.com/threefoldtech/tfchain/issues/924) for more +details. ## Decision -Make sure that node has no active contracts on it to be able to change its `PowerTarget` to `Down` when calling `change_power_target()` extrinsic. +Make sure that node has no active contracts on it to be able to change its +`PowerTarget` to `Down` when calling `change_power_target()` extrinsic. diff --git a/docs/architecture/0020-rework-dao-voting.md b/docs/architecture/0021-rework-dao-voting.md similarity index 91% rename from docs/architecture/0020-rework-dao-voting.md rename to docs/architecture/0021-rework-dao-voting.md index af4b918c8..a58c755dc 100644 --- a/docs/architecture/0020-rework-dao-voting.md +++ b/docs/architecture/0021-rework-dao-voting.md @@ -1,4 +1,4 @@ -# 20. Harden closing of a DAO motion voting +# 21. Harden closing of a DAO motion voting Date: 2024-05-02 diff --git a/docs/architecture/0021-allow-hdd-only-nodes.md b/docs/architecture/0022-allow-hdd-only-nodes.md similarity index 87% rename from docs/architecture/0021-allow-hdd-only-nodes.md rename to docs/architecture/0022-allow-hdd-only-nodes.md index 74d36b2af..999c3e494 100644 --- a/docs/architecture/0021-allow-hdd-only-nodes.md +++ b/docs/architecture/0022-allow-hdd-only-nodes.md @@ -1,4 +1,4 @@ -# 21. Allow 'only hdd' nodes to register on chain +# 22. Allow 'only hdd' nodes to register on chain Date: 2024-05-22 diff --git a/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md b/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md index 3bffd229f..303b385e9 100644 --- a/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md +++ b/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md @@ -21,7 +21,7 @@ Open the Polkadot JS UI in your browser: The proposal must include the following arguments: -* `threshold`: minimal number of farmer votes required to be able to close proposal before its end. should be at least 5 or more. +* `threshold`: minimal number of farmer votes required to be able to close proposal before its end and to approve the proposal (should be set to at least 5 votes). * `action`: call/extrinsic to execute on chain. If there is no call to be executed (which is usually the case) then `system` -> `remark()` should be set. * `description`: a small description of what the proposal is about. * `link`: a link to a more elaborate explanation of the proposal. @@ -52,7 +52,7 @@ After the proposal ends or, before it, if number of votes reached `threshold`, i ## Approval Once closed the proposal is removed from list and the action, if any, is executed on chain in case of approval. -Since each farmer vote is weighted by the corresponding farm capacity (`weight = 2 * (sum of CU of all nodes) + (sum of SU of all nodes)`), approval is obtained when `Yes` votes quantity is strictly greater than `No` votes quantity. +Since each farmer vote is weighted by the corresponding farm capacity (`weight = 2 * (sum of CU of all nodes) + (sum of SU of all nodes)`), approval is obtained when `Yes` votes quantity is strictly greater than `No` votes quantity **and** total number of votes reached `threshold` value. ## Check proposal From 5a9ad375cb3cfa637ab51b7494d0680fc78d405c Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Wed, 10 Jul 2024 12:46:08 +0300 Subject: [PATCH 40/44] Define separate error types for activation service errors (#986) * Define separate error types for activation service errors * Add HTTP Status code to ActivationServiceError * Tests: Comply with Pascal case --- clients/tfchain-client-go/account.go | 25 +++++++++++++++++------ clients/tfchain-client-go/account_test.go | 15 ++++++++++++++ 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/clients/tfchain-client-go/account.go b/clients/tfchain-client-go/account.go index 41308ad6b..1f36901e2 100644 --- a/clients/tfchain-client-go/account.go +++ b/clients/tfchain-client-go/account.go @@ -52,6 +52,19 @@ type AccountInfo struct { Data Balance `json:"data"` } +// TODO: Add service response status code if avialble +type ActivationServiceError struct { + StatusCode int // 0 or a valid HTTP status code. 0 indicates that a response was not recived due to an error such host unreachable. + Err error +} + +func (e ActivationServiceError) Error() string { + if e.StatusCode != 0 { + return fmt.Sprintf("Activation service error (status code %d): %s", e.StatusCode, e.Err.Error()) + } + return fmt.Sprintf("Activation service error: %s", e.Err.Error()) +} + // PublicKey gets public key from account id func (a AccountID) PublicKey() []byte { return a[:] @@ -135,7 +148,7 @@ func (s *Substrate) activateAccount(identity Identity, activationURL string) err response, err := http.Post(activationURL, "application/json", &buf) if err != nil { - return errors.Wrap(err, "failed to call activation service") + return ActivationServiceError{Err: errors.Wrap(err, "failed to call activation service")} } defer response.Body.Close() @@ -145,22 +158,22 @@ func (s *Substrate) activateAccount(identity Identity, activationURL string) err return nil } - return fmt.Errorf("failed to activate account: %s", response.Status) + return ActivationServiceError{StatusCode: response.StatusCode, Err: fmt.Errorf("activation service returned status code %d", response.StatusCode)} } // EnsureAccount makes sure account is available on blockchain // if not, it uses activation service to create one. // EnsureAccount is safe to call on already activated accounts and it's mostly // a NO-OP operation unless the account funds are very low, it will then make -// sure to reactivate the account (fund it) if the free tokes are <= ReactivateThreefold uTFT -func (s *Substrate) EnsureAccount(identity Identity, activationURL, termsAndConditionsLink, terminsAndConditionsHash string) (info AccountInfo, err error) { +// sure to reactivate the account (fund it) if the free tokens are <= ReactivateThreefold uTFT +func (s *Substrate) EnsureAccount(identity Identity, activationURL, termsAndConditionsLink, termsAndConditionsHash string) (info AccountInfo, err error) { log.Debug().Str("account", identity.Address()).Msg("ensuring account") cl, meta, err := s.GetClient() if err != nil { return info, err } info, err = s.getAccount(cl, meta, identity) - // if account does not exist OR account has tokes less that reactivateAt + // if account does not exist OR account has tokens less than reactivateAt // then we activate the account. if errors.Is(err, ErrAccountNotFound) || info.Data.Free.Cmp(reactivateAt) <= 0 { // account activation @@ -203,7 +216,7 @@ func (s *Substrate) EnsureAccount(identity Identity, activationURL, termsAndCond return info, nil } - return info, s.AcceptTermsAndConditions(identity, termsAndConditionsLink, terminsAndConditionsHash) + return info, s.AcceptTermsAndConditions(identity, termsAndConditionsLink, termsAndConditionsHash) } // Identity is a user identity diff --git a/clients/tfchain-client-go/account_test.go b/clients/tfchain-client-go/account_test.go index b7938aba5..edafcfdbf 100644 --- a/clients/tfchain-client-go/account_test.go +++ b/clients/tfchain-client-go/account_test.go @@ -40,3 +40,18 @@ func TestGetBalance(t *testing.T) { _, err = cl.GetBalance(account) require.NoError(err) } + +func TestEnsureAccountWithDownActivationService(t *testing.T) { + cl := startLocalConnection(t) + defer cl.Close() + + require := require.New(t) + id, err := NewIdentityFromEd25519Phrase("paper endless radio rude wage hood cabin praise girl income chief craft") + require.NoError(err) + _, err = cl.EnsureAccount(id, "https://test.wrong-activation-service-url.tf", "test", "test") + require.Error(err) + require.IsType(ActivationServiceError{}, err) + _, err = cl.EnsureAccount(id, "https://httpstat.us/503", "test", "test") + require.Error(err) + require.IsType(ActivationServiceError{}, err) +} From 622e7d255b9c76203fba8a316b84b280b59fbba7 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Tue, 13 Aug 2024 16:00:14 +0300 Subject: [PATCH 41/44] Update fork-off-substrate.md (#988) * Update fork-off-substrate.md --- docs/development/fork-off-substrate.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/development/fork-off-substrate.md b/docs/development/fork-off-substrate.md index 3937fbee8..457f3a24d 100644 --- a/docs/development/fork-off-substrate.md +++ b/docs/development/fork-off-substrate.md @@ -33,7 +33,7 @@ Before you start, you need to have the following items: ```bash cp ../../substrate-node/target/debug/wbuild/tfchain-runtime/tfchain_runtime.compact.wasm ./data/runtime.wasm ``` -* Run a full node for your blockchain locally (Recommended but should be fully synced) or have an external endpoint handy (but should be running with `--rpc-methods Unsafe` flag) +* Run a full node for your blockchain locally (Recommended but should be fully synced) or have an external endpoint handy (but should be running with `--rpc-methods Unsafe` flag, and depending on the chain size you may need to increase the node's default `rpc-max-response-size`) ```bash ../../substrate-node/target/debug/tfchain --chain ../../substrate-node/chainspecs/dev/chainSpecRaw.json --rpc-external --rpc-methods Unsafe ``` @@ -41,12 +41,16 @@ Before you start, you need to have the following items: * If using a local node, simply run the script using ```bash - npm start + ALICE="true" npm start ``` * If you are using an external/non-default endpoint, you need to provide it to the script via the HTTP\_RPC\_ENDPOINT environment variable ```bash - HTTP_RPC_ENDPOINT=https:// npm start + HTTP_RPC_ENDPOINT=https:// ALICE="true" npm start + ``` + * If you are getting `HeadersTimeoutError`, likely on the main net, set `FORK_CHUNKS_LEVEL` to 2 + ```bash + FORK_CHUNKS_LEVEL=2 ALICE="true" npm start ``` * You should have the genesis file for the forked chain inside the data folder. It will be called `fork.json`. * You can now run a new chain using this genesis file From 2f06d6f54130f8299c294f330e6b1a7bde45ff6d Mon Sep 17 00:00:00 2001 From: Erwan Renaut <73958772+renauter@users.noreply.github.com> Date: Mon, 26 Aug 2024 09:54:19 -0300 Subject: [PATCH 42/44] chore(polkadot): upgrade to v1.1.0 (#902) --- clients/tfchain-client-go/utils.go | 2 +- substrate-node/Cargo.lock | 738 ++++++++++++++---- substrate-node/Cargo.toml | 136 ++-- substrate-node/node/src/cli.rs | 9 +- substrate-node/node/src/command.rs | 24 +- substrate-node/node/src/service.rs | 9 +- .../pallet-burning/src/benchmarking.rs | 7 +- .../pallets/pallet-dao/src/benchmarking.rs | 9 +- substrate-node/pallets/pallet-dao/src/dao.rs | 7 +- substrate-node/pallets/pallet-dao/src/lib.rs | 9 +- .../pallets/pallet-dao/src/tests.rs | 4 +- .../src/migrations/v10.rs | 4 +- .../src/migrations/v11.rs | 4 +- .../src/migrations/v6.rs | 4 +- .../src/migrations/v8.rs | 4 +- .../src/migrations/v9.rs | 4 +- .../pallet-smart-contract/src/tests.rs | 4 +- .../pallets/pallet-tfgrid/Cargo.toml | 1 + .../pallets/pallet-tfgrid/src/farm.rs | 3 +- .../pallets/pallet-tfgrid/src/interface.rs | 3 +- .../pallet-tfgrid/src/migrations/v10.rs | 7 +- .../pallet-tfgrid/src/migrations/v11.rs | 4 +- .../pallet-tfgrid/src/migrations/v12.rs | 4 +- .../pallet-tfgrid/src/migrations/v13.rs | 4 +- .../pallet-tfgrid/src/migrations/v14.rs | 4 +- .../pallet-tfgrid/src/migrations/v15.rs | 4 +- .../pallet-tfgrid/src/migrations/v17.rs | 4 +- .../pallets/pallet-tfgrid/src/node.rs | 3 +- .../pallets/pallet-tfgrid/src/terms_cond.rs | 3 +- .../pallets/pallet-tfgrid/src/tests.rs | 3 +- .../pallets/pallet-tft-bridge/Cargo.toml | 1 + .../pallet-tft-bridge/src/migrations/v2.rs | 12 +- .../pallet-tft-bridge/src/tft_bridge.rs | 2 +- .../pallets/pallet-validator/src/mock.rs | 4 +- .../substrate-validator-set/Cargo.toml | 2 + .../substrate-validator-set/src/lib.rs | 4 +- .../substrate-validator-set/src/mock.rs | 4 +- substrate-node/runtime/Cargo.toml | 2 +- substrate-node/runtime/src/lib.rs | 19 +- .../tfgrid_v15_smart_contract_v8.rs | 4 +- substrate-node/support/src/tests.rs | 3 +- 41 files changed, 757 insertions(+), 325 deletions(-) diff --git a/clients/tfchain-client-go/utils.go b/clients/tfchain-client-go/utils.go index af13735c6..cd2283d17 100644 --- a/clients/tfchain-client-go/utils.go +++ b/clients/tfchain-client-go/utils.go @@ -536,7 +536,7 @@ func (s *Substrate) checkForError(callResponse *CallResponse) error { if int(errIndex) >= len(moduleErrors[e.DispatchError.ModuleError.Index]) || moduleErrors[e.DispatchError.ModuleError.Index] == nil { return fmt.Errorf("module error (%d) with unknown code %d occured, please update the module error list", e.DispatchError.ModuleError.Index, e.DispatchError.ModuleError.Error) } - return fmt.Errorf(moduleErrors[e.DispatchError.ModuleError.Index][errIndex]) + return errors.New(moduleErrors[e.DispatchError.ModuleError.Index][errIndex]) } else { return fmt.Errorf("unknown module error (%d) with code %d occured, please create the module error list", e.DispatchError.ModuleError.Index, e.DispatchError.ModuleError.Error) } diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index c98257439..490b1145c 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -191,6 +191,205 @@ dependencies = [ "num-traits", ] +[[package]] +name = "aquamarine" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" +dependencies = [ + "include_dir", + "itertools", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste 1.0.14", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-scale" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec 3.6.9", +] + +[[package]] +name = "ark-scale" +version = "0.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec 3.6.9", + "scale-info", +] + +[[package]] +name = "ark-secret-scalar" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "ark-transcript", + "digest 0.10.7", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] + [[package]] name = "array-bytes" version = "6.2.2" @@ -371,6 +570,28 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.1" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-scale 0.0.12", + "ark-serialize", + "ark-std", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "ring 0.1.0", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "base-x" version = "0.2.11" @@ -565,6 +786,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + [[package]] name = "bstr" version = "1.9.0" @@ -843,6 +1073,26 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "merlin 3.0.0", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + [[package]] name = "concurrent-queue" version = "2.4.0" @@ -1287,6 +1537,17 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive-syn-parse" version = "0.1.5" @@ -1397,6 +1658,50 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale 0.0.10", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "docify" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" +dependencies = [ + "common-path", + "derive-syn-parse", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.48", + "termcolor", + "toml 0.8.2", + "walkdir", +] + [[package]] name = "downcast" version = "0.11.0" @@ -1446,19 +1751,10 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature 2.2.0", + "signature", "spki", ] -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.3" @@ -1466,19 +1762,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] @@ -1488,7 +1772,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek 4.1.1", - "ed25519 2.2.3", + "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.8", @@ -1674,6 +1958,19 @@ dependencies = [ "subtle", ] +[[package]] +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", +] + [[package]] name = "fiat-crypto" version = "0.2.5" @@ -1765,7 +2062,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", ] @@ -1788,7 +2085,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-support-procedural", @@ -1813,7 +2110,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "array-bytes", @@ -1861,7 +2158,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -1872,7 +2169,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -1889,11 +2186,12 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", "frame-try-runtime", + "log", "parity-scale-codec 3.6.9", "scale-info", "sp-core", @@ -1918,7 +2216,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-recursion", "futures", @@ -1930,6 +2228,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-state-machine", "spinners", "substrate-rpc-client", "tokio", @@ -1939,9 +2238,11 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "aquamarine", "bitflags 1.3.2", + "docify", "environmental", "frame-metadata", "frame-support-procedural", @@ -1953,27 +2254,31 @@ dependencies = [ "paste 1.0.14", "scale-info", "serde", + "serde_json", "smallvec", "sp-api", "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", "sp-debug-derive", + "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-metadata-ir", "sp-runtime", "sp-staking", "sp-state-machine", "sp-std 8.0.0", "sp-tracing", "sp-weights", + "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "cfg-expr", @@ -1991,7 +2296,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -2003,7 +2308,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro2", "quote", @@ -2013,7 +2318,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cfg-if", "frame-support", @@ -2032,7 +2337,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -2047,7 +2352,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "sp-api", @@ -2056,7 +2361,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "parity-scale-codec 3.6.9", @@ -2430,6 +2735,15 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + [[package]] name = "hmac" version = "0.8.1" @@ -2679,6 +2993,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "index-fixed" version = "0.3.1" @@ -3182,8 +3515,8 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ - "bs58", - "ed25519-dalek 2.1.0", + "bs58 0.4.0", + "ed25519-dalek", "log", "multiaddr", "multihash", @@ -3276,7 +3609,7 @@ dependencies = [ "snow", "static_assertions", "thiserror", - "x25519-dalek", + "x25519-dalek 1.1.1", "zeroize", ] @@ -3798,6 +4131,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -4200,10 +4545,11 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", + "log", "pallet-timestamp", "parity-scale-codec 3.6.9", "scale-info", @@ -4216,7 +4562,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -4230,7 +4576,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4263,7 +4609,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4303,7 +4649,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4342,7 +4688,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4371,8 +4717,9 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -4388,7 +4735,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -4402,6 +4749,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", + "sp-state-machine", "sp-std 8.0.0", "sp-trie", ] @@ -4409,13 +4757,14 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", + "parity-scale-codec 3.6.9", "rand 0.8.5", "sp-runtime", "sp-session", @@ -4456,7 +4805,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4499,6 +4848,7 @@ dependencies = [ "sp-runtime", "sp-std 8.0.0", "sp-storage", + "sp-weights", "tfchain-support", "valip", ] @@ -4510,6 +4860,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-balances", "parity-scale-codec 3.6.9", "scale-info", @@ -4550,7 +4901,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4562,13 +4913,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std 8.0.0", + "sp-storage", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -4584,7 +4936,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -4600,7 +4952,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "pallet-transaction-payment", "parity-scale-codec 3.6.9", @@ -4612,7 +4964,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5570,6 +5922,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "common", + "fflonk", + "merlin 3.0.0", +] + [[package]] name = "ring" version = "0.16.20" @@ -5807,7 +6174,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "sp-core", @@ -5818,7 +6185,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", "futures-timer", @@ -5841,7 +6208,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "sc-client-api", @@ -5856,7 +6223,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -5875,7 +6242,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -5886,7 +6253,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "chrono", @@ -5925,7 +6292,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fnv", "futures", @@ -5951,7 +6318,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "kvdb", @@ -5977,7 +6344,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -6002,7 +6369,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -6031,7 +6398,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ahash 0.8.7", "array-bytes", @@ -6072,7 +6439,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -6095,7 +6462,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "parking_lot 0.12.1", @@ -6117,7 +6484,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -6129,7 +6496,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "anyhow", "cfg-if", @@ -6146,7 +6513,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", "futures", @@ -6162,7 +6529,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "parking_lot 0.12.1", @@ -6176,7 +6543,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "async-channel", @@ -6217,7 +6584,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-channel", "cid", @@ -6237,7 +6604,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -6254,7 +6621,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ahash 0.8.7", "futures", @@ -6272,7 +6639,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "async-channel", @@ -6293,7 +6660,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "async-channel", @@ -6327,7 +6694,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "futures", @@ -6345,7 +6712,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "bytes", @@ -6379,7 +6746,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -6388,7 +6755,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", "jsonrpsee", @@ -6419,7 +6786,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "parity-scale-codec 3.6.9", @@ -6438,7 +6805,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "http", "jsonrpsee", @@ -6453,7 +6820,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "futures", @@ -6466,6 +6833,7 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-transaction-pool-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -6473,13 +6841,14 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror", + "tokio", "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "directories", @@ -6543,7 +6912,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "parity-scale-codec 3.6.9", @@ -6554,7 +6923,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", "libc", @@ -6573,7 +6942,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "chrono", "futures", @@ -6592,7 +6961,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", "atty", @@ -6621,7 +6990,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -6632,7 +7001,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -6658,7 +7027,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -6674,7 +7043,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-channel", "futures", @@ -6742,7 +7111,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -6983,12 +7352,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - [[package]] name = "signature" version = "2.2.0" @@ -7111,7 +7474,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "log", @@ -7132,7 +7495,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "blake2", @@ -7146,7 +7509,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -7159,7 +7522,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "integer-sqrt", "num-traits", @@ -7173,7 +7536,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sp-api", "sp-inherents", @@ -7184,7 +7547,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", "log", @@ -7202,7 +7565,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -7217,7 +7580,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec 3.6.9", @@ -7234,7 +7597,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec 3.6.9", @@ -7253,7 +7616,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "finality-grandpa", "log", @@ -7271,7 +7634,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -7283,13 +7646,15 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", + "arrayvec 0.7.4", + "bandersnatch_vrfs", "bitflags 1.3.2", "blake2", "bounded-collections", - "bs58", + "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", "futures", @@ -7299,7 +7664,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "paste 1.0.14", @@ -7328,7 +7693,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "blake2b_simd", "byteorder", @@ -7341,7 +7706,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "quote", "sp-core-hashing", @@ -7351,7 +7716,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -7360,7 +7725,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro2", "quote", @@ -7370,7 +7735,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "environmental", "parity-scale-codec 3.6.9", @@ -7378,10 +7743,21 @@ dependencies = [ "sp-storage", ] +[[package]] +name = "sp-genesis-builder" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "serde_json", + "sp-api", + "sp-runtime", + "sp-std 8.0.0", +] + [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -7395,11 +7771,10 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bytes", - "ed25519 1.5.3", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "libsecp256k1", "log", "parity-scale-codec 3.6.9", @@ -7420,7 +7795,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "lazy_static", "sp-core", @@ -7431,7 +7806,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "parking_lot 0.12.1", @@ -7443,7 +7818,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "thiserror", "zstd 0.12.4", @@ -7452,7 +7827,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-metadata", "parity-scale-codec 3.6.9", @@ -7463,7 +7838,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -7477,7 +7852,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sp-api", "sp-core", @@ -7487,7 +7862,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "backtrace", "lazy_static", @@ -7497,7 +7872,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "rustc-hash", "serde", @@ -7507,7 +7882,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "either", "hash256-std-hasher", @@ -7529,7 +7904,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -7547,7 +7922,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -7559,7 +7934,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -7574,7 +7949,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec 3.6.9", @@ -7588,7 +7963,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "log", @@ -7609,10 +7984,16 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "aes-gcm", + "curve25519-dalek 4.1.1", + "ed25519-dalek", + "hkdf", "parity-scale-codec 3.6.9", + "rand 0.8.5", "scale-info", + "sha2 0.10.8", "sp-api", "sp-application-crypto", "sp-core", @@ -7621,6 +8002,7 @@ dependencies = [ "sp-runtime-interface", "sp-std 8.0.0", "thiserror", + "x25519-dalek 2.0.1", ] [[package]] @@ -7631,12 +8013,12 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#6f [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "impl-serde", "parity-scale-codec 3.6.9", @@ -7649,7 +8031,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec 3.6.9", @@ -7662,7 +8044,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "sp-std 8.0.0", @@ -7674,7 +8056,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sp-api", "sp-runtime", @@ -7683,7 +8065,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec 3.6.9", @@ -7698,7 +8080,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ahash 0.8.7", "hash-db", @@ -7721,7 +8103,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "impl-serde", "parity-scale-codec 3.6.9", @@ -7738,7 +8120,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "proc-macro2", @@ -7749,7 +8131,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -7762,7 +8144,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -7925,7 +8307,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" [[package]] name = "substrate-fixed" @@ -7939,7 +8321,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -7958,7 +8340,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hyper", "log", @@ -7970,7 +8352,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "jsonrpsee", @@ -8010,13 +8392,15 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", + "sp-state-machine", "sp-std 8.0.0", + "sp-weights", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", "build-helper", @@ -8471,6 +8855,18 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", +] + [[package]] name = "toml_datetime" version = "0.6.3" @@ -8500,6 +8896,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.1.0", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -8709,7 +9107,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "clap", @@ -9006,9 +9404,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" +checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" dependencies = [ "anyhow", "libc", @@ -9022,9 +9420,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" +checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" dependencies = [ "anyhow", "cxx", @@ -9034,9 +9432,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" +checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" dependencies = [ "anyhow", "cc", @@ -9623,6 +10021,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x25519-dalek" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +dependencies = [ + "curve25519-dalek 4.1.1", + "rand_core 0.6.4", + "serde", + "zeroize", +] + [[package]] name = "x509-parser" version = "0.14.0" diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index ee9d9df05..cbd239d08 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -60,77 +60,79 @@ tfchain-support = { path = "support", default-features = false } tfchain-runtime = { path = "runtime", default-features = false } # Benchmarking (with default disabled) -frame-system-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } # Substrate (with default disabled) -frame-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -frame-executive = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -frame-support = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -frame-system = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -frame-system-rpc-runtime-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -frame-try-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-aura = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-authorship = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-balances = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-collective = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-grandpa = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-membership = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-scheduler = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-session = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-session-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-timestamp = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-transaction-payment = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-transaction-payment-rpc-runtime-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -pallet-utility = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-block-builder = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-consensus-aura = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-core = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-inherents = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-io = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-offchain = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-session = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-std = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-transaction-pool = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-version = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-storage = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -try-runtime-cli = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-keystore = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} -sp-staking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0"} +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } +sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.1.0" } # Client-only (with default enabled) -polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0"} -polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0"} -polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0"} -sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-consensus-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-rpc = { git = "https://github.com/paritytech/substrate.git", "branch" = "polkadot-v1.0.0" } -sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-sysinfo = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sc-offchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" } -sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sp-keyring = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -substrate-frame-rpc-system = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} -substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0"} +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } [profile.production] inherits = "release" diff --git a/substrate-node/node/src/cli.rs b/substrate-node/node/src/cli.rs index 965bf3533..dda86d7e1 100644 --- a/substrate-node/node/src/cli.rs +++ b/substrate-node/node/src/cli.rs @@ -41,12 +41,9 @@ pub enum Subcommand { #[clap(subcommand)] Benchmark(frame_benchmarking_cli::BenchmarkCmd), - /// Try some command against runtime state. - #[cfg(feature = "try-runtime")] - TryRuntime(try_runtime_cli::TryRuntimeCmd), - - /// Try some command against runtime state. Note: `try-runtime` feature must be enabled. - #[cfg(not(feature = "try-runtime"))] + /// Try-runtime has migrated to a standalone CLI + /// (). The subcommand exists as a stub and + /// deprecation notice. It will be removed entirely some time after Janurary 2024. TryRuntime, /// Db meta columns information. diff --git a/substrate-node/node/src/command.rs b/substrate-node/node/src/command.rs index fb3bd365b..02407f412 100644 --- a/substrate-node/node/src/command.rs +++ b/substrate-node/node/src/command.rs @@ -193,30 +193,8 @@ pub fn run() -> sc_cli::Result<()> { }) } #[cfg(feature = "try-runtime")] - Some(Subcommand::TryRuntime(cmd)) => { - use crate::service::ExecutorDispatch; - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; - use try_runtime_cli::block_building_info::timestamp_with_aura_info; + Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.into()), - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - // we don't need any of the components of new_partial, just a runtime, or a task - // manager to do `async_run`. - let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); - let task_manager = - sc_service::TaskManager::new(config.tokio_handle.clone(), registry) - .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; - let info_provider = timestamp_with_aura_info(6000); - - Ok(( - cmd.run::::ExtendHostFunctions, - >, _>(Some(info_provider)), - task_manager, - )) - }) - } #[cfg(not(feature = "try-runtime"))] Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ You can enable it with `--features try-runtime`." diff --git a/substrate-node/node/src/service.rs b/substrate-node/node/src/service.rs index 4a93bef6f..4f824f347 100644 --- a/substrate-node/node/src/service.rs +++ b/substrate-node/node/src/service.rs @@ -37,6 +37,10 @@ pub type FullClient = type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; +/// The minimum period of blocks on which justifications will be +/// imported and generated. +const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512; + #[allow(clippy::type_complexity)] pub fn new_partial( config: &Configuration, @@ -45,7 +49,7 @@ pub fn new_partial( FullClient, FullBackend, FullSelectChain, - sc_consensus::DefaultImportQueue, + sc_consensus::DefaultImportQueue, sc_transaction_pool::FullPool, ( sc_consensus_grandpa::GrandpaBlockImport< @@ -99,6 +103,7 @@ pub fn new_partial( let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( client.clone(), + GRANDPA_JUSTIFICATION_PERIOD, &client, select_chain.clone(), telemetry.as_ref().map(|x| x.handle()), @@ -335,7 +340,7 @@ pub fn new_full(config: Configuration) -> Result { let grandpa_config = sc_consensus_grandpa::Config { // FIXME #1578 make this available through chainspec gossip_duration: Duration::from_millis(333), - justification_period: 512, + justification_generation_period: GRANDPA_JUSTIFICATION_PERIOD, name: Some(name), observer_enabled: false, keystore, diff --git a/substrate-node/pallets/pallet-burning/src/benchmarking.rs b/substrate-node/pallets/pallet-burning/src/benchmarking.rs index 591ec0bd3..626f0ac45 100644 --- a/substrate-node/pallets/pallet-burning/src/benchmarking.rs +++ b/substrate-node/pallets/pallet-burning/src/benchmarking.rs @@ -2,10 +2,13 @@ use super::*; use crate::Pallet as BurningModule; -use frame_benchmarking::{benchmarks, whitelisted_caller, Zero}; +use frame_benchmarking::{benchmarks, whitelisted_caller}; use frame_support::traits::Currency; use frame_system::{pallet_prelude::BlockNumberFor, EventRecord, Pallet as System, RawOrigin}; -use sp_runtime::{traits::StaticLookup, SaturatedConversion}; +use sp_runtime::{ + traits::{StaticLookup, Zero}, + SaturatedConversion, +}; use sp_std::vec; benchmarks! { diff --git a/substrate-node/pallets/pallet-dao/src/benchmarking.rs b/substrate-node/pallets/pallet-dao/src/benchmarking.rs index 58e15ad10..d3950d3f6 100644 --- a/substrate-node/pallets/pallet-dao/src/benchmarking.rs +++ b/substrate-node/pallets/pallet-dao/src/benchmarking.rs @@ -3,7 +3,7 @@ use crate::pallet::Pallet as DaoModule; use crate::pallet::Pallet; use crate::pallet::{Call, Config, Event}; -use frame_benchmarking::{account, benchmarks, whitelisted_caller, vec, Vec, Box}; +use frame_benchmarking::{account, benchmarks, whitelisted_caller}; use frame_support::{assert_ok, BoundedVec}; use frame_system::{Call as SystemCall, EventRecord, Pallet as System, RawOrigin}; use pallet_membership::Pallet as CouncilMembership; @@ -16,7 +16,12 @@ use sp_runtime::{ traits::{Hash, StaticLookup}, DispatchError, }; -use sp_std::convert::{TryFrom, TryInto}; +use sp_std::{ + boxed::Box, + convert::{TryFrom, TryInto}, + vec, + vec::Vec, +}; use tfchain_support::types::IP4; const GIGABYTE: u64 = 1024 * 1024 * 1024; diff --git a/substrate-node/pallets/pallet-dao/src/dao.rs b/substrate-node/pallets/pallet-dao/src/dao.rs index b599c6248..802ea739c 100644 --- a/substrate-node/pallets/pallet-dao/src/dao.rs +++ b/substrate-node/pallets/pallet-dao/src/dao.rs @@ -8,7 +8,7 @@ use crate::{ proposal::ProposalIndex, }; use frame_support::{ - dispatch::{DispatchError, DispatchResultWithPostInfo, GetDispatchInfo}, + dispatch::{DispatchResultWithPostInfo, GetDispatchInfo}, ensure, pallet_prelude::Pays, traits::Get, @@ -16,7 +16,10 @@ use frame_support::{ }; use frame_system::pallet_prelude::BlockNumberFor; use pallet_tfgrid::pallet::{InterfaceOf, LocationOf, SerialNumberOf, TfgridNode}; -use sp_runtime::traits::{Dispatchable, Hash}; +use sp_runtime::{ + traits::{Dispatchable, Hash}, + DispatchError, +}; use sp_std::prelude::*; use tfchain_support::{ constants, diff --git a/substrate-node/pallets/pallet-dao/src/lib.rs b/substrate-node/pallets/pallet-dao/src/lib.rs index 407955f01..ca4f2de20 100644 --- a/substrate-node/pallets/pallet-dao/src/lib.rs +++ b/substrate-node/pallets/pallet-dao/src/lib.rs @@ -23,17 +23,14 @@ pub mod pallet { use crate::proposal; use crate::proposal::ProposalIndex; use crate::weights::WeightInfo; - use frame_support::pallet_prelude::*; use frame_support::{ - dispatch::{ - DispatchResult, DispatchResultWithPostInfo, Dispatchable, GetDispatchInfo, - PostDispatchInfo, - }, + dispatch::{DispatchResult, DispatchResultWithPostInfo, GetDispatchInfo, PostDispatchInfo}, + pallet_prelude::*, traits::{EnsureOrigin, Get}, }; use frame_system::pallet_prelude::*; use pallet_tfgrid::farm::FarmName; - use sp_std::convert::TryInto; + use sp_runtime::traits::Dispatchable; use sp_std::prelude::*; use tfchain_support::traits::Tfgrid; diff --git a/substrate-node/pallets/pallet-dao/src/tests.rs b/substrate-node/pallets/pallet-dao/src/tests.rs index 205cff830..7b42c47e5 100644 --- a/substrate-node/pallets/pallet-dao/src/tests.rs +++ b/substrate-node/pallets/pallet-dao/src/tests.rs @@ -1,10 +1,10 @@ use crate::pallet::Event as DaoEvent; use crate::{mock::RuntimeEvent as MockEvent, mock::*, pallet::Error}; -use frame_support::{assert_noop, assert_ok, bounded_vec, dispatch::GetDispatchInfo}; +use frame_support::{assert_noop, assert_ok, dispatch::GetDispatchInfo}; use frame_system::{EventRecord, Phase, RawOrigin}; use log::info; use pallet_tfgrid::{types::LocationInput, PublicIpListInput, ResourcesInput}; -use sp_core::H256; +use sp_core::{bounded_vec, H256}; use sp_runtime::traits::{BlakeTwo256, Hash}; use std::convert::TryInto; use tfchain_support::types::{FarmCertification, NodeCertification, IP4}; diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v10.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v10.rs index fa255505b..36ebd5e0d 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v10.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v10.rs @@ -6,7 +6,9 @@ use sp_runtime::Saturating; use sp_std::{marker::PhantomData, vec}; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; #[cfg(feature = "try-runtime")] use sp_std::vec::Vec; diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v11.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v11.rs index 3346a4e9d..f790b4ab6 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v11.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v11.rs @@ -9,7 +9,9 @@ use sp_runtime::traits::Zero; use sp_std::marker::PhantomData; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; #[cfg(feature = "try-runtime")] use sp_std::{vec, vec::Vec}; diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v6.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v6.rs index 34010b446..e4d5c3764 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v6.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v6.rs @@ -5,9 +5,11 @@ use sp_core::Get; use sp_std::{marker::PhantomData, vec::Vec}; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; pub struct ContractMigrationV5(PhantomData); diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v8.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v8.rs index 4fcb53bf3..945916f10 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v8.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v8.rs @@ -9,7 +9,9 @@ use sp_runtime::traits::{CheckedSub, SaturatedConversion}; use sp_std::{collections::btree_map::BTreeMap, marker::PhantomData}; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; #[cfg(feature = "try-runtime")] use sp_std::{vec, vec::Vec}; diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs index abc3ca0eb..fc4c7661f 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs @@ -7,7 +7,9 @@ use sp_core::Get; use sp_std::{marker::PhantomData, vec, vec::Vec}; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; pub struct CleanStorageState(PhantomData); diff --git a/substrate-node/pallets/pallet-smart-contract/src/tests.rs b/substrate-node/pallets/pallet-smart-contract/src/tests.rs index 82ee73c40..62460ab73 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/tests.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/tests.rs @@ -3,7 +3,7 @@ use crate::{ Event as SmartContractEvent, }; use frame_support::{ - assert_noop, assert_ok, bounded_vec, + assert_noop, assert_ok, dispatch::Pays, traits::{LockableCurrency, WithdrawReasons}, BoundedVec, @@ -14,7 +14,7 @@ use pallet_tfgrid::{ types::{self as pallet_tfgrid_types, LocationInput}, ResourcesInput, }; -use sp_core::H256; +use sp_core::{bounded_vec, H256}; use sp_runtime::{assert_eq_error_rate, traits::SaturatedConversion, Perbill, Percent}; use sp_std::convert::{TryFrom, TryInto}; use substrate_fixed::types::U64F64; diff --git a/substrate-node/pallets/pallet-tfgrid/Cargo.toml b/substrate-node/pallets/pallet-tfgrid/Cargo.toml index aed02a9ac..a4bdcf6ed 100644 --- a/substrate-node/pallets/pallet-tfgrid/Cargo.toml +++ b/substrate-node/pallets/pallet-tfgrid/Cargo.toml @@ -34,6 +34,7 @@ sp-storage.workspace = true pallet-timestamp.workspace = true sp-core.workspace = true sp-io.workspace = true +sp-weights.workspace = true frame-try-runtime.workspace = true # Benchmarking diff --git a/substrate-node/pallets/pallet-tfgrid/src/farm.rs b/substrate-node/pallets/pallet-tfgrid/src/farm.rs index d4f72a9d6..b4875f0d7 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/farm.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/farm.rs @@ -2,9 +2,10 @@ use crate::*; use frame_support::{ dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo}, ensure, + pallet_prelude::RuntimeDebug, sp_runtime::SaturatedConversion, traits::Get, - BoundedVec, RuntimeDebug, + BoundedVec, }; use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; diff --git a/substrate-node/pallets/pallet-tfgrid/src/interface.rs b/substrate-node/pallets/pallet-tfgrid/src/interface.rs index 8f7932c27..e2add26c4 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/interface.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/interface.rs @@ -1,6 +1,7 @@ use crate::{Config, Error, InterfaceIpInput, InterfaceMacInput, InterfaceNameInput}; use frame_support::{ - ensure, sp_runtime::SaturatedConversion, traits::ConstU32, BoundedVec, RuntimeDebug, + ensure, pallet_prelude::RuntimeDebug, sp_runtime::SaturatedConversion, traits::ConstU32, + BoundedVec, }; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v10.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v10.rs index 8e772f748..863fcf837 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v10.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v10.rs @@ -1,13 +1,16 @@ use crate::*; -use frame_support::{dispatch::Weight, traits::Get, traits::OnRuntimeUpgrade}; +use frame_support::{traits::Get, traits::OnRuntimeUpgrade}; use log::{debug, info}; use sp_std::{collections::btree_map::BTreeMap, marker::PhantomData}; use sp_std::{vec, vec::Vec}; +use sp_weights::Weight; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; pub struct FixFarmNodeIndexMap(PhantomData); diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v11.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v11.rs index a6bb51408..d6c7b6656 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v11.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v11.rs @@ -4,10 +4,12 @@ use log::{debug, info}; use sp_std::marker::PhantomData; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; +#[cfg(feature = "try-runtime")] use sp_std::vec::Vec; pub struct FixFarmingPolicy(PhantomData); diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v12.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v12.rs index be66a58ae..373c30378 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v12.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v12.rs @@ -7,10 +7,12 @@ use log::{debug, info}; use sp_std::marker::PhantomData; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; +#[cfg(feature = "try-runtime")] use sp_std::vec::Vec; // Storage alias from Node v12 diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v13.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v13.rs index 8b70e9588..b08eea8be 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v13.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v13.rs @@ -10,10 +10,12 @@ use tfchain_support::{ }; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; +#[cfg(feature = "try-runtime")] use sp_std::vec::Vec; pub struct FixPublicIP(PhantomData); diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v14.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v14.rs index 68dd5c6ba..cd1e7137c 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v14.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v14.rs @@ -5,10 +5,12 @@ use log::{debug, info}; use sp_std::marker::PhantomData; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; +#[cfg(feature = "try-runtime")] use sp_std::vec::Vec; pub struct FixFarmingPoliciesMap(PhantomData); diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v15.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v15.rs index 637160796..b3c611527 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v15.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v15.rs @@ -4,10 +4,12 @@ use log::{debug, info}; use sp_std::marker::PhantomData; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; #[cfg(feature = "try-runtime")] use parity_scale_codec::Decode; #[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; +#[cfg(feature = "try-runtime")] use sp_std::vec::Vec; pub struct MigrateTwinsV15(PhantomData); diff --git a/substrate-node/pallets/pallet-tfgrid/src/migrations/v17.rs b/substrate-node/pallets/pallet-tfgrid/src/migrations/v17.rs index 3e95841c8..1b2bea8f7 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/migrations/v17.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/migrations/v17.rs @@ -8,9 +8,11 @@ use sp_std::{marker::PhantomData, vec::Vec}; use tfchain_support::types::{PublicIP, IP4}; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; #[cfg(feature = "try-runtime")] use parity_scale_codec::{Decode, Encode}; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; pub struct FixFarmPublicIps(PhantomData); diff --git a/substrate-node/pallets/pallet-tfgrid/src/node.rs b/substrate-node/pallets/pallet-tfgrid/src/node.rs index caf4e369f..c440c97fb 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/node.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/node.rs @@ -2,9 +2,10 @@ use crate::*; use frame_support::{ dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, Pays}, ensure, + pallet_prelude::RuntimeDebug, sp_runtime::SaturatedConversion, traits::ConstU32, - BoundedVec, RuntimeDebug, + BoundedVec, }; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; diff --git a/substrate-node/pallets/pallet-tfgrid/src/terms_cond.rs b/substrate-node/pallets/pallet-tfgrid/src/terms_cond.rs index aac56dcf2..b793f00da 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/terms_cond.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/terms_cond.rs @@ -1,6 +1,7 @@ use crate::{Config, Error, TermsAndConditionsInput}; use frame_support::{ - ensure, sp_runtime::SaturatedConversion, traits::ConstU32, BoundedVec, RuntimeDebug, + ensure, pallet_prelude::RuntimeDebug, sp_runtime::SaturatedConversion, traits::ConstU32, + BoundedVec, }; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; diff --git a/substrate-node/pallets/pallet-tfgrid/src/tests.rs b/substrate-node/pallets/pallet-tfgrid/src/tests.rs index 12d52a622..9845d6f16 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/tests.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/tests.rs @@ -5,8 +5,7 @@ use crate::{ }; use frame_support::{assert_noop, assert_ok}; use frame_system::{EventRecord, Phase, RawOrigin}; -use sp_core::bounded_vec; -use sp_core::H256; +use sp_core::{bounded_vec, H256}; use tfchain_support::types::{ FarmCertification, FarmingPolicyLimit, Interface, NodeCertification, Power, PowerState, PublicConfig, PublicIpError, IP4, IP6, diff --git a/substrate-node/pallets/pallet-tft-bridge/Cargo.toml b/substrate-node/pallets/pallet-tft-bridge/Cargo.toml index 5d9be8f45..d453c5246 100644 --- a/substrate-node/pallets/pallet-tft-bridge/Cargo.toml +++ b/substrate-node/pallets/pallet-tft-bridge/Cargo.toml @@ -17,6 +17,7 @@ targets = ['x86_64-unknown-linux-gnu'] # Substrate packages parity-scale-codec = {workspace = true, features = ["derive"]} scale-info = { workspace = true, features = ["derive"] } +log.workspace = true frame-support.workspace = true frame-system.workspace = true diff --git a/substrate-node/pallets/pallet-tft-bridge/src/migrations/v2.rs b/substrate-node/pallets/pallet-tft-bridge/src/migrations/v2.rs index 9518fca70..831c6e4cd 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/migrations/v2.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/migrations/v2.rs @@ -1,15 +1,13 @@ use crate::*; -use frame_support::{ - log::{debug, info}, - traits::Get, - traits::OnRuntimeUpgrade, - weights::Weight, -}; +use frame_support::{traits::Get, traits::OnRuntimeUpgrade, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; +use log::{debug, info}; use sp_std::marker::PhantomData; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; #[cfg(feature = "try-runtime")] use sp_std::vec::Vec; diff --git a/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs b/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs index 4daf76b89..217ef1959 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs @@ -1,7 +1,7 @@ use super::{types::*, *}; use frame_support::{ dispatch::DispatchErrorWithPostInfo, - ensure, log, + ensure, pallet_prelude::DispatchResultWithPostInfo, traits::{Currency, ExistenceRequirement, OnUnbalanced, WithdrawReasons}, }; diff --git a/substrate-node/pallets/pallet-validator/src/mock.rs b/substrate-node/pallets/pallet-validator/src/mock.rs index b89849f8b..656ab72e5 100644 --- a/substrate-node/pallets/pallet-validator/src/mock.rs +++ b/substrate-node/pallets/pallet-validator/src/mock.rs @@ -1,9 +1,9 @@ use crate as pallet_validator; use core::cell::RefCell; -use frame_support::{bounded_vec, construct_runtime, parameter_types, traits::ConstU32}; +use frame_support::{construct_runtime, parameter_types, traits::ConstU32}; use frame_system::EnsureRoot; use pallet_session::{SessionHandler, ShouldEndSession}; -use sp_core::{crypto::key_types::DUMMY, H256}; +use sp_core::{bounded_vec, crypto::key_types::DUMMY, H256}; use sp_runtime::{ impl_opaque_keys, testing::UintAuthorityId, diff --git a/substrate-node/pallets/substrate-validator-set/Cargo.toml b/substrate-node/pallets/substrate-validator-set/Cargo.toml index 306e63a10..4072162ca 100644 --- a/substrate-node/pallets/substrate-validator-set/Cargo.toml +++ b/substrate-node/pallets/substrate-validator-set/Cargo.toml @@ -23,6 +23,8 @@ frame-support.workspace = true frame-system.workspace = true pallet-session.workspace = true sp-io.workspace = true +sp-weights.workspace = true +sp-state-machine.workspace = true frame-benchmarking.workspace = true [dev-dependencies] diff --git a/substrate-node/pallets/substrate-validator-set/src/lib.rs b/substrate-node/pallets/substrate-validator-set/src/lib.rs index 31c94b3e9..9ae92f603 100644 --- a/substrate-node/pallets/substrate-validator-set/src/lib.rs +++ b/substrate-node/pallets/substrate-validator-set/src/lib.rs @@ -205,13 +205,13 @@ pub mod pallet { fn estimate_current_session_progress( _now: BlockNumberFor, - ) -> (Option, frame_support::dispatch::Weight) { + ) -> (Option, sp_weights::Weight) { (None, Zero::zero()) } fn estimate_next_session_rotation( _now: BlockNumberFor, - ) -> (Option>, frame_support::dispatch::Weight) { + ) -> (Option>, sp_weights::Weight) { (None, Zero::zero()) } } diff --git a/substrate-node/pallets/substrate-validator-set/src/mock.rs b/substrate-node/pallets/substrate-validator-set/src/mock.rs index 0b5ecdeec..0d90d7508 100644 --- a/substrate-node/pallets/substrate-validator-set/src/mock.rs +++ b/substrate-node/pallets/substrate-validator-set/src/mock.rs @@ -3,7 +3,7 @@ #![cfg(test)] use crate as validator_set; -use frame_support::{parameter_types, traits::ConstU32, BasicExternalities}; +use frame_support::{parameter_types, traits::ConstU32}; use frame_system::EnsureRoot; use pallet_session::*; use parity_scale_codec::{Decode, Encode}; @@ -130,7 +130,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities { .map(|i| (i, i, UintAuthorityId(i).into())) .collect() }); - BasicExternalities::execute_with_storage(&mut t, || { + sp_state_machine::BasicExternalities::execute_with_storage(&mut t, || { for (ref k, ..) in &keys { frame_system::Pallet::::inc_providers(k); } diff --git a/substrate-node/runtime/Cargo.toml b/substrate-node/runtime/Cargo.toml index 9c2b11fec..b98009d25 100644 --- a/substrate-node/runtime/Cargo.toml +++ b/substrate-node/runtime/Cargo.toml @@ -14,7 +14,7 @@ version.workspace = true targets = ["x86_64-unknown-linux-gnu"] [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0" } [dependencies] smallvec.workspace = true diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 3169a9740..8e2ee7870 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -21,8 +21,11 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, MultiSignature, }; -use sp_std::convert::{TryFrom, TryInto}; -use sp_std::{cmp::Ordering, prelude::*}; +use sp_std::{ + cmp::Ordering, + convert::{TryFrom, TryInto}, + prelude::*, +}; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; @@ -256,6 +259,7 @@ impl pallet_grandpa::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; + type MaxNominators = frame_support::traits::ConstU32<0>; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; type KeyOwnerProof = sp_core::Void; @@ -786,12 +790,7 @@ pub type Executive = frame_executive::Executive< // All migrations executed on runtime upgrade as a nested tuple of types implementing // `OnRuntimeUpgrade`. -type Migrations = ( - pallet_tft_bridge::migrations::v2::MigrateBurnTransactionsV2, - pallet_scheduler::migration::v3::MigrateToV4, - migrations::update_storage_version::PalletBalancesToV1, - migrations::update_storage_version::PalletSessionToV1, -); +type Migrations = (); // follows Substrate's non destructive way of eliminating otherwise required // repetion: https://github.com/paritytech/substrate/pull/10592 @@ -991,7 +990,9 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch}; + use frame_support::traits::TrackedStorageKey; + use frame_system_benchmarking::Pallet as SystemBench; use frame_benchmarking::baseline::Pallet as Baseline; diff --git a/substrate-node/runtime/src/migrations/tfgrid_v15_smart_contract_v8.rs b/substrate-node/runtime/src/migrations/tfgrid_v15_smart_contract_v8.rs index df07f5f5a..26499dd37 100644 --- a/substrate-node/runtime/src/migrations/tfgrid_v15_smart_contract_v8.rs +++ b/substrate-node/runtime/src/migrations/tfgrid_v15_smart_contract_v8.rs @@ -16,10 +16,12 @@ use log::{debug, info}; use sp_std::{collections::btree_map::BTreeMap, marker::PhantomData}; #[cfg(feature = "try-runtime")] -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; #[cfg(feature = "try-runtime")] use parity_scale_codec::Decode; #[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; +#[cfg(feature = "try-runtime")] use sp_std::vec::Vec; // Storage alias from Twin v12 diff --git a/substrate-node/support/src/tests.rs b/substrate-node/support/src/tests.rs index 0e213b169..f7bb08c94 100644 --- a/substrate-node/support/src/tests.rs +++ b/substrate-node/support/src/tests.rs @@ -1,7 +1,6 @@ use crate::resources::{Resources, GIGABYTE, MINIMUM_STORAGE_CAPACITY}; use crate::types::{PublicIpError, IP4, IP6}; -use frame_support::storage::bounded_vec::BoundedVec; -use frame_support::{assert_err, assert_ok}; +use frame_support::{assert_err, assert_ok, storage::bounded_vec::BoundedVec}; #[test] fn test_calc_cu_falsy_values() { From 541e5b6881f9d6dca14ac7ce5fe8b7b23b3f0d09 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Tue, 27 Aug 2024 19:10:31 +0300 Subject: [PATCH 43/44] refactor: Billing refactor (#992) * Refactor billing logic for smart contracts to improve payment tracking, overdraft handling, and fund reservations. * Redesign off-chain worker logic to enhance billing effectiveness and prevent failures. * Improve management of contract payments, focusing on overdue payments and grace periods. *Enhance logging and error management to reduce the risk of unstable contract states. * Introduce new events for better visibility into billing processes. * Adjust utilization revenue distribution. * Address bugs to improve billing reliability. * Update benchmarks and weights for all pallets, and adjust relevant tests. --------- --- clients/tfchain-client-go/contract_events.go | 30 + clients/tfchain-client-go/events.go | 4 + clients/tfchain-client-go/utils.go | 2 + docs/architecture/0023-billing-refactor.md | 48 + substrate-node/node/src/benchmarking.rs | 4 +- .../pallets/pallet-burning/src/weights.rs | 12 +- .../pallets/pallet-dao/src/weights.rs | 36 +- .../pallets/pallet-kvstore/src/weights.rs | 20 +- .../pallet-smart-contract/src/benchmarking.rs | 6 +- .../pallet-smart-contract/src/billing.rs | 1179 +++++++++-------- .../pallets/pallet-smart-contract/src/cost.rs | 36 +- .../src/grid_contract.rs | 50 +- .../pallets/pallet-smart-contract/src/lib.rs | 71 +- .../src/migrations/mod.rs | 1 + .../src/migrations/types.rs | 17 + .../src/migrations/v12.rs | 207 +++ .../src/migrations/v9.rs | 86 +- .../pallet-smart-contract/src/tests.rs | 842 +++++++++--- .../pallet-smart-contract/src/types.rs | 384 +++++- .../pallet-smart-contract/src/weights.rs | 448 ++++--- .../pallets/pallet-tfgrid/src/weights.rs | 252 ++-- .../pallets/pallet-tft-bridge/src/weights.rs | 92 +- .../pallets/pallet-tft-price/src/weights.rs | 24 +- .../pallets/pallet-validator/src/weights.rs | 52 +- .../substrate-validator-set/src/weights.rs | 28 +- substrate-node/runtime/src/lib.rs | 6 +- substrate-node/tests/integration_tests.robot | 19 +- 27 files changed, 2652 insertions(+), 1304 deletions(-) create mode 100644 docs/architecture/0023-billing-refactor.md create mode 100644 substrate-node/pallets/pallet-smart-contract/src/migrations/v12.rs diff --git a/clients/tfchain-client-go/contract_events.go b/clients/tfchain-client-go/contract_events.go index 556f33c9b..47a8c0ceb 100644 --- a/clients/tfchain-client-go/contract_events.go +++ b/clients/tfchain-client-go/contract_events.go @@ -242,3 +242,33 @@ type NodeExtraFeeSet struct { ExtraFee types.U64 `json:"extra_fee"` Topics []types.Hash } + +type RentWaived struct { + Phase types.Phase + ContractID types.U64 `json:"contract_id"` + Topics []types.Hash +} + +type ContractGracePeriodElapsed struct { + Phase types.Phase + ContractID types.U64 `json:"contract_id"` + GracePeriod types.U64 `json:"grace_period"` + Topics []types.Hash +} + +type ContractPaymentOverdrawn struct { + Phase types.Phase + ContractID types.U64 `json:"contract_id"` + Timestamp types.U64 `json:"timestamp"` + PartiallyBilledAmount types.U128 `json:"partially_billed_amount"` + Overdraft types.U128 `json:"overdraft"` + Topics []types.Hash +} + +type RewardDistributed struct { + Phase types.Phase + ContractID types.U64 `json:"contract_id"` + StandardRewards types.U128 `json:"standard_rewards"` + AdditionalRewards types.U128 `json:"additional_rewards"` + Topics []types.Hash +} diff --git a/clients/tfchain-client-go/events.go b/clients/tfchain-client-go/events.go index 0910e780a..2538fa374 100644 --- a/clients/tfchain-client-go/events.go +++ b/clients/tfchain-client-go/events.go @@ -389,6 +389,10 @@ type EventRecords struct { SmartContractModule_ServiceContractBilled []ServiceContractBilled //nolint:stylecheck,golint SmartContractModule_BillingFrequencyChanged []BillingFrequencyChanged //nolint:stylecheck,golint SmartContractModule_NodeExtraFeeSet []NodeExtraFeeSet //nolint:stylecheck,golint + SmartContractModule_RentWaived []RentWaived //nolint:stylecheck,golint + SmartContractModule_ContractGracePeriodElapsed []ContractGracePeriodElapsed //nolint:stylecheck,golint + SmartContractModule_ContractPaymentOverdrawn []ContractPaymentOverdrawn //nolint:stylecheck,golint + SmartContractModule_RewardDistributed []RewardDistributed //nolint:stylecheck,golint // farm events TfgridModule_FarmStored []FarmStored //nolint:stylecheck,golint diff --git a/clients/tfchain-client-go/utils.go b/clients/tfchain-client-go/utils.go index cd2283d17..e1d214240 100644 --- a/clients/tfchain-client-go/utils.go +++ b/clients/tfchain-client-go/utils.go @@ -127,6 +127,8 @@ var smartContractModuleErrors = []string{ "WrongAuthority", "UnauthorizedToChangeSolutionProviderId", "UnauthorizedToSetExtraFee", + "RewardDistributionError", + "ContractPaymentStateNotExists", } // https://github.com/threefoldtech/tfchain/blob/development/substrate-node/pallets/pallet-tfgrid/src/lib.rs#L442 diff --git a/docs/architecture/0023-billing-refactor.md b/docs/architecture/0023-billing-refactor.md new file mode 100644 index 000000000..0ad1d310c --- /dev/null +++ b/docs/architecture/0023-billing-refactor.md @@ -0,0 +1,48 @@ +# 23. Billing Refactor in pallet-smart-contract Module + +Date: 2024-08-18 + +## Status + +Accepted + +## Context + +The billing logic within the pallet-smart-contract module faced several issues, including critical bugs, inefficiencies in handling validators, and inadequate fund reservation mechanisms. +The goal of this refactor was to address these issues while enhancing the overall reliability and robustness of the billing process. + +## Decision + +The following architectural decisions were made to improve the billing logic: + +### Refactoring Billing Logic + +- Enhanced Tracking: +Improved tracking mechanisms were introduced for contract payments, especially during grace periods and when handling overdue payments. +The new ContractPaymentState was introduced to accurately manage contract payment states and resolve liquidity issues. +- Overdraft Handling: +Partial payments are now allowed, where users can cover part of their billing due if they lack sufficient funds for the full amount. Overdraft are tracked separately. +- Fund Reservation: +The use of balance locks/freezes was replaced with a more reliable reservation system, reducing issues related to fund availability for reward distribution. + +### Improved Off-Chain Worker Logic + +- Runtime Verification: +The is_next_block_author function was removed, with verification now occurring at runtime. +This change ensures transaction fees are reliably waived for validators and still prevents duplicate transactions. + +### New Events Introduced + +- ContractGracePeriodElapsed: Indicates that a contract's grace period has elapsed. +- ContractPaymentOverdrawn: Indicates that a contract's payment is overdrawn. +- RewardDistributed: Indicates that rewards have been distributed. + +### Certified vs DIY Capacity + +The system now correctly charges certified capacity at a higher rate (25% more) than DIY capacity. + +## Consequences + +- Increased Robustness: The billing process is now more robust and less prone to errors, particularly in scenarios involving partial payments and fund reservations. +- Better Visibility: The introduction of new events and improved logging provides better visibility into the billing and payment processes, aiding in debugging and monitoring. +- Backward Compatibility: While significant refactoring has been done, efforts were made to ensure backward compatibility where possible, especially concerning contract migration. diff --git a/substrate-node/node/src/benchmarking.rs b/substrate-node/node/src/benchmarking.rs index 06f55b394..24d086117 100644 --- a/substrate-node/node/src/benchmarking.rs +++ b/substrate-node/node/src/benchmarking.rs @@ -11,7 +11,7 @@ use sp_core::{Encode, Pair}; use sp_inherents::{InherentData, InherentDataProvider}; use sp_keyring::Sr25519Keyring; use sp_runtime::{OpaqueExtrinsic, SaturatedConversion}; -use tfchain_runtime as runtime; +use tfchain_runtime::{self as runtime, pallet_smart_contract}; use std::{sync::Arc, time::Duration}; @@ -132,6 +132,7 @@ pub fn create_benchmark_extrinsic( frame_system::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), + pallet_smart_contract::types::ContractIdProvides::::new(), ); let raw_payload = runtime::SignedPayload::from_raw( @@ -146,6 +147,7 @@ pub fn create_benchmark_extrinsic( (), (), (), + (), ), ); let signature = raw_payload.using_encoded(|e| sender.sign(e)); diff --git a/substrate-node/pallets/pallet-burning/src/weights.rs b/substrate-node/pallets/pallet-burning/src/weights.rs index c840829cf..021e73116 100644 --- a/substrate-node/pallets/pallet-burning/src/weights.rs +++ b/substrate-node/pallets/pallet-burning/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_burning //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-08-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `66e77d0da08f`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -45,8 +45,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 26_841_000 picoseconds. - Weight::from_parts(27_372_000, 1594) + // Minimum execution time: 26_780_000 picoseconds. + Weight::from_parts(27_291_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -60,8 +60,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 26_841_000 picoseconds. - Weight::from_parts(27_372_000, 1594) + // Minimum execution time: 26_780_000 picoseconds. + Weight::from_parts(27_291_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/pallets/pallet-dao/src/weights.rs b/substrate-node/pallets/pallet-dao/src/weights.rs index 4301ffe5a..3445de116 100644 --- a/substrate-node/pallets/pallet-dao/src/weights.rs +++ b/substrate-node/pallets/pallet-dao/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_dao //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-08-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `66e77d0da08f`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -58,8 +58,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `208` // Estimated: `4687` - // Minimum execution time: 19_196_000 picoseconds. - Weight::from_parts(19_487_000, 4687) + // Minimum execution time: 19_277_000 picoseconds. + Weight::from_parts(20_188_000, 4687) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -77,8 +77,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `979` // Estimated: `4444` - // Minimum execution time: 26_179_000 picoseconds. - Weight::from_parts(26_751_000, 4444) + // Minimum execution time: 26_390_000 picoseconds. + Weight::from_parts(26_840_000, 4444) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -92,8 +92,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `487` // Estimated: `4687` - // Minimum execution time: 18_154_000 picoseconds. - Weight::from_parts(18_755_000, 4687) + // Minimum execution time: 18_616_000 picoseconds. + Weight::from_parts(18_985_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -111,8 +111,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `521` // Estimated: `4687` - // Minimum execution time: 24_757_000 picoseconds. - Weight::from_parts(25_268_000, 4687) + // Minimum execution time: 25_117_000 picoseconds. + Weight::from_parts(25_498_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -136,8 +136,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `208` // Estimated: `4687` - // Minimum execution time: 19_196_000 picoseconds. - Weight::from_parts(19_487_000, 4687) + // Minimum execution time: 19_277_000 picoseconds. + Weight::from_parts(20_188_000, 4687) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -155,8 +155,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `979` // Estimated: `4444` - // Minimum execution time: 26_179_000 picoseconds. - Weight::from_parts(26_751_000, 4444) + // Minimum execution time: 26_390_000 picoseconds. + Weight::from_parts(26_840_000, 4444) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -170,8 +170,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `487` // Estimated: `4687` - // Minimum execution time: 18_154_000 picoseconds. - Weight::from_parts(18_755_000, 4687) + // Minimum execution time: 18_616_000 picoseconds. + Weight::from_parts(18_985_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -189,8 +189,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `521` // Estimated: `4687` - // Minimum execution time: 24_757_000 picoseconds. - Weight::from_parts(25_268_000, 4687) + // Minimum execution time: 25_117_000 picoseconds. + Weight::from_parts(25_498_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/substrate-node/pallets/pallet-kvstore/src/weights.rs b/substrate-node/pallets/pallet-kvstore/src/weights.rs index 1e49afb32..05947e5e8 100644 --- a/substrate-node/pallets/pallet-kvstore/src/weights.rs +++ b/substrate-node/pallets/pallet-kvstore/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_kvstore //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-08-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `66e77d0da08f`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -46,8 +46,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_293_000 picoseconds. - Weight::from_parts(7_574_000, 0) + // Minimum execution time: 11_372_000 picoseconds. + Weight::from_parts(12_032_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFKVStore::TFKVStore` (r:1 w:1) @@ -56,8 +56,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3611` - // Minimum execution time: 12_784_000 picoseconds. - Weight::from_parts(13_205_000, 3611) + // Minimum execution time: 12_414_000 picoseconds. + Weight::from_parts(12_854_000, 3611) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -71,8 +71,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_293_000 picoseconds. - Weight::from_parts(7_574_000, 0) + // Minimum execution time: 11_372_000 picoseconds. + Weight::from_parts(12_032_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFKVStore::TFKVStore` (r:1 w:1) @@ -81,8 +81,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3611` - // Minimum execution time: 12_784_000 picoseconds. - Weight::from_parts(13_205_000, 3611) + // Minimum execution time: 12_414_000 picoseconds. + Weight::from_parts(12_854_000, 3611) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs b/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs index d19457f4a..60b67866c 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/benchmarking.rs @@ -305,11 +305,11 @@ benchmarks! { let contract = SmartContractModule::::contracts(contract_id).unwrap(); // Get contract cost before billing to take into account nu - let (cost, discount_level) = contract.calculate_contract_cost_tft(balance_init_amount, elapsed_seconds).unwrap(); + let (cost, discount_level) = contract.calculate_contract_cost_tft(balance_init_amount, elapsed_seconds, None).unwrap(); }: _(RawOrigin::Signed(farmer), contract_id) verify { - let lock = SmartContractModule::::contract_number_of_cylces_billed(contract_id); - assert_eq!(lock.amount_locked, cost); + let contract_payment_state = SmartContractModule::::contract_payment_state(contract_id).unwrap(); + assert_eq!(contract_payment_state.standard_reserve, cost); let contract_bill = types::ContractBill { contract_id, timestamp: SmartContractModule::::get_current_timestamp_in_secs(), diff --git a/substrate-node/pallets/pallet-smart-contract/src/billing.rs b/substrate-node/pallets/pallet-smart-contract/src/billing.rs index 9ae4f8721..1ad253516 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/billing.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/billing.rs @@ -1,27 +1,28 @@ use crate::*; use frame_support::{ - dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo}, + dispatch::{DispatchErrorWithPostInfo, DispatchResult, DispatchResultWithPostInfo}, ensure, - traits::{Currency, ExistenceRequirement, LockableCurrency, OnUnbalanced, WithdrawReasons}, + traits::{BalanceStatus, Currency, DefensiveSaturating, ReservableCurrency, StoredMap}, }; + use frame_system::{ - offchain::{SendSignedTransaction, SignMessage, Signer}, + offchain::{SendSignedTransaction, Signer}, pallet_prelude::BlockNumberFor, }; use sp_core::Get; use sp_runtime::{ - traits::{CheckedAdd, CheckedSub, Convert, Zero}, - DispatchResult, Perbill, SaturatedConversion, + traits::{Convert, Saturating, Zero}, + Perbill, SaturatedConversion, }; -use sp_std::vec::Vec; +use sp_std::{cmp::max, vec::Vec}; impl Pallet { + // Let offchain worker check if there are contracts on + // billing loop at current index and try to bill them pub fn bill_contracts_for_block(block_number: BlockNumberFor) { - // Let offchain worker check if there are contracts on - // billing loop at current index and try to bill them let index = Self::get_billing_loop_index_from_block_number(block_number); - let contract_ids = ContractsToBillAt::::get(index); + if contract_ids.is_empty() { log::info!( "No contracts to bill at block {:?}, index: {:?}", @@ -32,173 +33,308 @@ impl Pallet { } log::info!( - "{:?} contracts to bill at block {:?}", + "Contracts to bill at block {:?}: {:?}", + block_number, contract_ids, - block_number ); + let mut succeeded_contracts = Vec::new(); + let mut failed_contracts = Vec::new(); + let mut skipped_contracts = Vec::new(); + let mut missing_contracts = Vec::new(); + let mut already_sent_contracts = Vec::new(); + for contract_id in contract_ids { - if let Some(c) = Contracts::::get(contract_id) { - if let types::ContractData::NodeContract(node_contract) = c.contract_type { - // Is there IP consumption to bill? - let bill_ip = node_contract.public_ips > 0; - - // Is there CU/SU consumption to bill? - // No need for preliminary call to contains_key() because default resource value is empty - let bill_cu_su = !NodeContractResources::::get(contract_id).used.is_empty(); - - // Is there NU consumption to bill? - // No need for preliminary call to contains_key() because default amount_unbilled is 0 - let bill_nu = - ContractBillingInformationByID::::get(contract_id).amount_unbilled > 0; - - // Don't bill if no IP/CU/SU/NU to be billed - if !bill_ip && !bill_cu_su && !bill_nu { - continue; + if let Some(contract) = Contracts::::get(contract_id) { + if Self::should_bill_contract(&contract) { + match Self::submit_signed_transaction_for_contract_billing(contract_id) { + Ok(()) => succeeded_contracts.push(contract_id), + Err(Error::::OffchainSignedTxCannotSign) => { + failed_contracts.push(contract_id); + } + Err(Error::::OffchainSignedTxAlreadySent) => { + already_sent_contracts.push(contract_id); + } + Err(_) => { + failed_contracts.push(contract_id); + } } + } else { + skipped_contracts.push(contract_id); } - let _res = Self::bill_contract_using_signed_transaction(contract_id); + } else { + missing_contracts.push(contract_id); } } - } - pub fn bill_contract_using_signed_transaction(contract_id: u64) -> Result<(), Error> { - let signer = Signer::::AuthorityId>::any_account(); + // Log the results at the end of the function + if !succeeded_contracts.is_empty() { + log::info!( + "Successfully submitted signed transactions for contracts: {:?}", + succeeded_contracts + ); + } - // Only allow the author of the next block to trigger the billing - Self::is_next_block_author(&signer)?; + if !already_sent_contracts.is_empty() { + log::info!( + "Signed transactions for contracts were already sent: {:?}", + already_sent_contracts + ); + } - if !signer.can_sign() { + if !skipped_contracts.is_empty() { + log::info!( + "Skipped billing node contracts (no IP/CU/SU/NU to bill): {:?}", + skipped_contracts + ); + } + + if !failed_contracts.is_empty() { log::error!( - "failed billing contract {:?} account cannot be used to sign transaction", - contract_id, + "Failed to submit signed transactions for contracts: {:?}", + failed_contracts ); + } + + if !missing_contracts.is_empty() { + log::error!("Contracts not found in storage: {:?}", missing_contracts); + } + } + + fn should_bill_contract(contract: &types::Contract) -> bool { + match &contract.contract_type { + types::ContractData::NodeContract(node_contract) => { + let bill_ip = node_contract.public_ips > 0; + let bill_cu_su = !NodeContractResources::::get(contract.contract_id) + .used + .is_empty(); + let bill_nu = ContractBillingInformationByID::::get(contract.contract_id) + .amount_unbilled + > 0; + + return bill_ip || bill_cu_su || bill_nu; + } + _ => true, + } + } + + pub fn submit_signed_transaction_for_contract_billing( + contract_id: u64, + ) -> Result<(), Error> { + let signer = Signer::::AuthorityId>::all_accounts(); + + if !signer.can_sign() { return Err(>::OffchainSignedTxCannotSign); } let result = signer.send_signed_transaction(|_acct| Call::bill_contract_for_block { contract_id }); - if let Some((acc, res)) = result { - // if res is an error this means sending the transaction failed - // this means the transaction was already send before (probably by another node) - // unfortunately the error is always empty (substrate just logs the error and - // returns Err()) - if res.is_err() { - log::error!( - "signed transaction failed for billing contract {:?} using account {:?}", - contract_id, - acc.id - ); - return Err(>::OffchainSignedTxAlreadySent); - } + if result.iter().any(|(_, res)| res.is_ok()) { return Ok(()); } - log::error!("No local account available"); - return Err(>::OffchainSignedTxNoLocalAccountAvailable); + + Err(>::OffchainSignedTxAlreadySent) } // Bills a contract (NodeContract, NameContract or RentContract) // Calculates how much TFT is due by the user and distributes the rewards pub fn bill_contract(contract_id: u64) -> DispatchResultWithPostInfo { - let mut contract = Contracts::::get(contract_id).ok_or(Error::::ContractNotExists)?; - - // Bill rent contract only if node is online - if let types::ContractData::RentContract(rc) = &contract.contract_type { - if let Some(node) = pallet_tfgrid::Nodes::::get(rc.node_id) { - // No need for preliminary call to contains_key() because default node power value is Up - let node_power = pallet_tfgrid::NodePower::::get(node.id); - if node_power.is_standby() { - return Ok(().into()); - } - } - } + let mut contract = Contracts::::get(contract_id).ok_or_else(|| { + log::error!("Contract not exists: {:?}", contract_id); + Error::::ContractNotExists + })?; + let src_twin = pallet_tfgrid::Twins::::get(contract.twin_id).ok_or_else(|| { + log::error!("Twin not exists: {:?}", contract.twin_id); + Error::::TwinNotExists + })?; + let pricing_policy = pallet_tfgrid::PricingPolicies::::get(1).ok_or_else(|| { + log::error!("Pricing policy not exists"); + Error::::PricingPolicyNotExists + })?; + + // In case contract is not a name contract ensure the node, farm and farmer twin exists + let (farmer_twin, node_certification) = + if !matches!(contract.contract_type, types::ContractData::NameContract(_)) { + let node = + pallet_tfgrid::Nodes::::get(contract.get_node_id()).ok_or_else(|| { + log::error!("Node not exists for contract_id: {:?}", contract_id); + Error::::NodeNotExists + })?; + let farm = pallet_tfgrid::Farms::::get(node.farm_id).ok_or_else(|| { + log::error!("Farm not exists for node_id: {:?}", node.farm_id); + Error::::FarmNotExists + })?; + let farmer_twin = + pallet_tfgrid::Twins::::get(farm.twin_id).ok_or_else(|| { + log::error!("Twin not exists for farm_id: {:?}", farm.twin_id); + Error::::TwinNotExists + })?; + (Some(farmer_twin), Some(node.certification)) + } else { + (None, None) + }; + + let mut contract_payment_state = ContractPaymentState::::get(contract.contract_id).ok_or_else(|| { + log::error!("Contract payment state not exists for contract_id {}", contract_id); + Error::::ContractPaymentStateNotExists + })?; - let twin = - pallet_tfgrid::Twins::::get(contract.twin_id).ok_or(Error::::TwinNotExists)?; - let usable_balance = Self::get_usable_balance(&twin.account_id); - let stash_balance = Self::get_stash_balance(twin.id); - let total_balance = usable_balance - .checked_add(&stash_balance) - .unwrap_or(BalanceOf::::zero()); + log::trace!( + "Contract payment state [before billing]: {:?}", + contract_payment_state + ); - let now = Self::get_current_timestamp_in_secs(); + // Calculate user total usable balance + let twin_usable_balance = Self::get_usable_balance(&src_twin.account_id); + let stash_usable_balance = Self::get_stash_balance(src_twin.id); + let total_usable_balance = + twin_usable_balance.defensive_saturating_add(stash_usable_balance); + let now: u64 = Self::get_current_timestamp_in_secs(); - // Calculate amount of seconds elapsed based on the contract lock struct - let mut contract_lock = ContractLock::::get(contract.contract_id); - let seconds_elapsed = now.checked_sub(contract_lock.lock_updated).unwrap_or(0); + // Calculate amount of seconds elapsed based on the contract payment state + let seconds_elapsed = + now.defensive_saturating_sub(contract_payment_state.last_updated_seconds); - // Calculate total amount due - let (regular_amount_due, discount_received) = - contract.calculate_contract_cost_tft(total_balance, seconds_elapsed)?; - let extra_amount_due = match &contract.contract_type { + let should_waive_payment = match &contract.contract_type { types::ContractData::RentContract(rc) => { - contract.calculate_extra_fee_cost_tft(rc.node_id, seconds_elapsed)? + let node_power = pallet_tfgrid::NodePower::::get(rc.node_id); + node_power.is_standby() } - _ => BalanceOf::::zero(), - }; - let amount_due = regular_amount_due - .checked_add(&extra_amount_due) - .unwrap_or(BalanceOf::::zero()); - - // If there is nothing to be paid and the contract is not in state delete, return - // Can be that the users cancels the contract in the same block that it's getting billed - // where elapsed seconds would be 0, but we still have to distribute rewards - if amount_due == BalanceOf::::zero() && !contract.is_state_delete() { - log::debug!("amount to be billed is 0, nothing to do"); - return Ok(().into()); + _ => false, }; - // Calculate total amount locked - let regular_lock_amount = contract_lock - .amount_locked - .checked_add(®ular_amount_due) - .unwrap_or(BalanceOf::::zero()); - let extra_lock_amount = contract_lock - .extra_amount_locked - .checked_add(&extra_amount_due) - .unwrap_or(BalanceOf::::zero()); - let lock_amount = regular_lock_amount - .checked_add(&extra_lock_amount) - .unwrap_or(BalanceOf::::zero()); - - // Handle grace - let contract = Self::handle_grace(&mut contract, usable_balance, lock_amount)?; - - // Only update contract lock in state (Created, GracePeriod) - if !matches!(contract.state, types::ContractState::Deleted(_)) { - // increment cycles billed and update the internal lock struct - contract_lock.lock_updated = now; - contract_lock.cycles += 1; - contract_lock.amount_locked = regular_lock_amount; - contract_lock.extra_amount_locked = extra_lock_amount; + if should_waive_payment { + log::info!("Waiving rent for contract_id: {:?}", contract.contract_id); + Self::deposit_event(Event::RentWaived { + contract_id: contract.contract_id, + }); + // Although no billing required here, in deleted state, we should continue the billing process for contracts to distribute rewards if any and clean up storage + if matches!(contract.state, types::ContractState::Created) { + // So for created rent contracts, if the node is in standby, don't expect the billing cycle to advance + return Ok(().into()); + } } - // If still in grace period, no need to continue doing locking and other stuff - if matches!(contract.state, types::ContractState::GracePeriod(_)) { - log::info!("contract {} is still in grace", contract.contract_id); - ContractLock::::insert(contract.contract_id, &contract_lock); + // Calculate the due amount + let (standard_amount_due, discount_received) = if should_waive_payment { + (BalanceOf::::zero(), types::DiscountLevel::None) + } else { + contract + .calculate_contract_cost_tft( + total_usable_balance, + seconds_elapsed, + node_certification, + ) + .map_err(|e| { + log::error!("Error while calculating contract cost: {:?}", e); + e + })? + }; + + let additional_amount_due = + if let types::ContractData::RentContract(rc) = &contract.contract_type { + if should_waive_payment { + BalanceOf::::zero() + } else { + contract.calculate_extra_fee_cost_tft(rc.node_id, seconds_elapsed) + } + } else { + BalanceOf::::zero() + }; + + let total_amount_due = standard_amount_due.defensive_saturating_add(additional_amount_due); + log::debug!( + "Seconds elapsed since last bill {:?}, standard amount due: {:?}, additional amount due: {:?}, total amount due: {:?}, Discount received: {:?}", + seconds_elapsed, + standard_amount_due, + additional_amount_due, + total_amount_due, + discount_received + ); + + // If the amount due is zero and the contract is not in deleted state, don't bill the contract (mostly node contract on a rented node) + if total_amount_due.is_zero() && !matches!(contract.state, types::ContractState::Deleted(_)) + { + log::info!( + "Amount to be billed is 0 and contract state is {:?}, nothing to do with contract_id: {:?}", + contract.state, + contract.contract_id + ); return Ok(().into()); } - // Handle contract lock operations - Self::handle_lock(contract, &mut contract_lock, amount_due)?; + // Calculate the amount needed to be reserved from the user's balance + // Should be the total amount due for current cycle + any overdraft from previous cycles + let standard_amount_to_reserve = + standard_amount_due.defensive_saturating_add(contract_payment_state.standard_overdraft); + let additional_amount_to_reserve = additional_amount_due + .defensive_saturating_add(contract_payment_state.additional_overdraft); + let total_amount_to_reserve = + standard_amount_to_reserve.defensive_saturating_add(additional_amount_to_reserve); + + let has_sufficient_fund = + ::Currency::can_reserve(&src_twin.account_id, total_amount_to_reserve); + let current_block = >::block_number().saturated_into::(); - // Always emit a contract billed event - let contract_bill = types::ContractBill { - contract_id: contract.contract_id, - timestamp: Self::get_current_timestamp_in_secs(), - discount_level: discount_received.clone(), - amount_billed: amount_due.saturated_into::(), - }; - Self::deposit_event(Event::ContractBilled(contract_bill)); + _ = Self::manage_contract_state(&mut contract, has_sufficient_fund, current_block); + + if has_sufficient_fund { + log::info!("Billing contract_id: {:?}, Contract state: {:?}, This cycle amount due: {:?}, Total (include previous overdraft) {:?}", + contract.contract_id, + contract.state, + total_amount_due, + total_amount_to_reserve + ); + Self::reserve_funds( + &mut contract_payment_state, + standard_amount_due, + additional_amount_due, + &src_twin, + &contract, + now, + total_amount_to_reserve, + discount_received, + )?; + } else { + log::info!( + "Contract payment overdrawn for contract_id: {:?}, Contract state: {:?}, This cycle overdue: {:?}, Twin have: {:?}, Previous overdraft: {:?}", + contract.contract_id, + contract.state, + total_amount_due, + twin_usable_balance, + contract_payment_state.get_overdraft() + ); + Self::overdraft_funds( + &mut contract_payment_state, + standard_amount_due, + additional_amount_due, + &src_twin, + &contract, + now, + twin_usable_balance, + )?; + } - // If the contract is in delete state, remove all associated storage + // Distribute rewards + Self::remit_funds( + &contract, + &mut contract_payment_state, + &src_twin, + &farmer_twin, + &pricing_policy, + )?; + + // Housekeeping for contracts in deleted state if matches!(contract.state, types::ContractState::Deleted(_)) { + log::info!( + "contract id {:?} in deleted state. clean up storage.", + contract.contract_id + ); return Self::remove_contract(contract.contract_id); } - // If contract is node contract, set the amount unbilled back to 0 + // Reset NU amount if the contract is a node contract if matches!(contract.contract_type, types::ContractData::NodeContract(_)) { let mut contract_billing_info = ContractBillingInformationByID::::get(contract.contract_id); @@ -209,418 +345,419 @@ impl Pallet { ); } - // Finally update the lock - ContractLock::::insert(contract.contract_id, &contract_lock); - - log::info!("successfully billed contract with id {:?}", contract_id,); + contract_payment_state.last_updated_seconds = now; + log::trace!( + "Contract payment state [after billing]: {:?}", + contract_payment_state + ); + ContractPaymentState::::insert(contract.contract_id, &contract_payment_state); Ok(().into()) } - fn handle_grace( + // Handles the transition between different contract states based on the fund availability + // May emits one of ContractGracePeriodStarted, ContractGracePeriodEnded, ContractGracePeriodElapsed events + fn manage_contract_state( contract: &mut types::Contract, - usable_balance: BalanceOf, - amount_due: BalanceOf, - ) -> Result<&mut types::Contract, DispatchErrorWithPostInfo> { - let current_block = >::block_number().saturated_into::(); - let node_id = contract.get_node_id(); - + has_sufficient_fund: bool, + current_block: u64, + ) -> DispatchResultWithPostInfo { match contract.state { + types::ContractState::GracePeriod(_) if has_sufficient_fund => { + // Manage transition from GracePeriod to Created + log::info!("Contract {:?} is in grace period, but balance is recharged, moving to created state at block {:?}", contract.contract_id, current_block); + Self::update_contract_state(contract, &types::ContractState::Created)?; + Self::deposit_event(Event::ContractGracePeriodEnded { + contract_id: contract.contract_id, + node_id: contract.get_node_id(), + twin_id: contract.twin_id, + }); + Self::synchronize_associated_node_contract_states( + contract, + types::ContractState::Created, + )?; + } types::ContractState::GracePeriod(grace_start) => { - // if the usable balance is recharged, we can move the contract to created state again - if usable_balance > amount_due { - Self::update_contract_state(contract, &types::ContractState::Created)?; - Self::deposit_event(Event::ContractGracePeriodEnded { + // Manage transition from GracePeriod to Deleted + let diff = current_block.defensive_saturating_sub(grace_start); + log::debug!( + "Contract {:?} in grace period, elapsed blocks: {:?}", + contract.contract_id, + diff + ); + if diff >= T::GracePeriod::get() { + log::info!("Contract {:?} state changed to deleted at block {:?} due to an expired grace period.", contract.contract_id, current_block); + Self::deposit_event(Event::ContractGracePeriodElapsed { contract_id: contract.contract_id, - node_id, - twin_id: contract.twin_id, + grace_period: diff, }); - // If the contract is a rent contract, also move state on associated node contracts - Self::handle_grace_rent_contract(contract, types::ContractState::Created)?; - } else { - let diff = current_block.checked_sub(grace_start).unwrap_or(0); - // If the contract grace period ran out, we can decomission the contract - if diff >= T::GracePeriod::get() { - Self::update_contract_state( - contract, - &types::ContractState::Deleted(types::Cause::OutOfFunds), - )?; - } - } - } - types::ContractState::Created => { - // if the user ran out of funds, move the contract to be in a grace period - // dont lock the tokens because there is nothing to lock - // we can still update the internal contract lock object to figure out later how much was due - // whilst in grace period - if amount_due >= usable_balance { - log::info!( - "Grace period started at block {:?} due to lack of funds", - current_block - ); Self::update_contract_state( contract, - &types::ContractState::GracePeriod(current_block), - )?; - // We can't lock the amount due on the contract's lock because the user ran out of funds - Self::deposit_event(Event::ContractGracePeriodStarted { - contract_id: contract.contract_id, - node_id, - twin_id: contract.twin_id, - block_number: current_block.saturated_into(), - }); - // If the contract is a rent contract, also move associated node contract to grace period - Self::handle_grace_rent_contract( - contract, - types::ContractState::GracePeriod(current_block), + &types::ContractState::Deleted(types::Cause::OutOfFunds), )?; } } + types::ContractState::Created if !has_sufficient_fund => { + // Manage transition from Created to GracePeriod + log::info!( + "Grace period started at block {:?} due to lack of funds", + current_block + ); + Self::update_contract_state( + contract, + &types::ContractState::GracePeriod(current_block.saturated_into()), + )?; + Self::deposit_event(Event::ContractGracePeriodStarted { + contract_id: contract.contract_id, + node_id: contract.get_node_id(), + twin_id: contract.twin_id, + block_number: current_block.saturated_into(), + }); + Self::synchronize_associated_node_contract_states( + contract, + types::ContractState::GracePeriod(current_block), + )?; + } _ => (), } - - Ok(contract) + Ok(().into()) } - fn handle_grace_rent_contract( - contract: &mut types::Contract, - state: types::ContractState, + // Holding funds from a user's account to guarantee that they are available later. + // Emits ContractBilled event + fn reserve_funds( + contract_payment_state: &mut types::ContractPaymentState>, + standard_amount_due: BalanceOf, + additional_amount_due: BalanceOf, + src_twin: &pallet_tfgrid::types::Twin, + contract: &types::Contract, + now: u64, + total_amount_to_reserve: BalanceOf, + discount_received: types::DiscountLevel, ) -> DispatchResultWithPostInfo { - match &contract.contract_type { - types::ContractData::RentContract(rc) => { - let active_node_contracts = ActiveNodeContracts::::get(rc.node_id); - for ctr_id in active_node_contracts { - let mut ctr = - Contracts::::get(ctr_id).ok_or(Error::::ContractNotExists)?; - Self::update_contract_state(&mut ctr, &state)?; - - match state { - types::ContractState::Created => { - Self::deposit_event(Event::ContractGracePeriodEnded { - contract_id: ctr_id, - node_id: rc.node_id, - twin_id: ctr.twin_id, - }); - } - types::ContractState::GracePeriod(block_number) => { - Self::deposit_event(Event::ContractGracePeriodStarted { - contract_id: ctr_id, - node_id: rc.node_id, - twin_id: ctr.twin_id, - block_number, - }); - } - _ => (), - }; - } - } - _ => (), + ::Currency::reserve(&src_twin.account_id, total_amount_to_reserve).map_err( + |e| { + // should never happen as we called can_reserve first to check if the funds are available + log::error!("Error while reserving amount due: {:?}", e); + e + }, + )?; + contract_payment_state.settle_overdraft(); + contract_payment_state.reserve_standard_amount(standard_amount_due); + contract_payment_state.reserve_additional_amount(additional_amount_due); + let contract_bill = types::ContractBill { + contract_id: contract.contract_id, + timestamp: now, + discount_level: discount_received.clone(), + amount_billed: total_amount_to_reserve.saturated_into::(), }; - + log::info!("Contract billed: {:?}", contract_bill); + Self::deposit_event(Event::ContractBilled(contract_bill)); Ok(().into()) } - fn handle_lock( - contract: &mut types::Contract, - contract_lock: &mut types::ContractLock>, - amount_due: BalanceOf, + // Increasing the overdraft in the user's account + // Emits ContractPaymentOverdrawn event + fn overdraft_funds( + contract_payment_state: &mut types::ContractPaymentState>, + standard_amount_due: BalanceOf, + additional_amount_due: BalanceOf, + src_twin: &pallet_tfgrid::types::Twin, + contract: &types::Contract, + now: u64, + reservable: BalanceOf, ) -> DispatchResultWithPostInfo { - let now = Self::get_current_timestamp_in_secs(); - - // Only lock an amount from the user's balance if the contract is in create state - // The lock is specified on the user's account, since a user can have multiple contracts - // Just extend the lock with the amount due for this contract billing period (lock will be created if not exists) - let twin = - pallet_tfgrid::Twins::::get(contract.twin_id).ok_or(Error::::TwinNotExists)?; - if matches!(contract.state, types::ContractState::Created) { - let mut locked_balance = Self::get_locked_balance(&twin.account_id); - locked_balance = locked_balance - .checked_add(&amount_due) - .unwrap_or(BalanceOf::::zero()); - ::Currency::extend_lock( - GRID_LOCK_ID, - &twin.account_id, - locked_balance, - WithdrawReasons::all(), - ); - } - - let canceled_and_not_zero = - contract.is_state_delete() && contract_lock.has_some_amount_locked(); - // When the cultivation rewards are ready to be distributed or it's in delete state - // Unlock all reserved balance and distribute - if contract_lock.cycles >= T::DistributionFrequency::get() || canceled_and_not_zero { - // First remove the lock, calculate how much locked balance needs to be unlocked and re-lock the remaining locked balance - let locked_balance = Self::get_locked_balance(&twin.account_id); - let new_locked_balance = - match locked_balance.checked_sub(&contract_lock.total_amount_locked()) { - Some(b) => b, - None => BalanceOf::::zero(), - }; - ::Currency::remove_lock(GRID_LOCK_ID, &twin.account_id); - - // Fetch twin balance, if the amount locked in the contract lock exceeds the current unlocked - // balance we can only transfer out the remaining balance - // https://github.com/threefoldtech/tfchain/issues/479 - let min_balance = ::Currency::minimum_balance(); - let mut twin_balance = match new_locked_balance { - bal if bal > min_balance => { - ::Currency::set_lock( - GRID_LOCK_ID, - &twin.account_id, - new_locked_balance, - WithdrawReasons::all(), - ); - Self::get_usable_balance(&twin.account_id) - } - _ => Self::get_usable_balance(&twin.account_id) - .checked_sub(&min_balance) - .unwrap_or(BalanceOf::::zero()), - }; + contract_payment_state.overdraft_standard_amount(standard_amount_due); + contract_payment_state.overdraft_additional_amount(additional_amount_due); + // Reserve as much as possible from the user's account to cover part of the amount overdue + let overdue = standard_amount_due.saturating_add(additional_amount_due); + let overdrawn = overdue.saturating_sub(reservable); + ::Currency::reserve(&src_twin.account_id, reservable).map_err(|e| { + log::error!("Error while reserving partial amount due: {:?}", e); + e + })?; + contract_payment_state.settle_partial_overdraft(reservable); + log::info!("Partial amount reserved: {:?}", reservable); + log::info!("Overdrawn: {:?}", overdrawn); + Self::deposit_event(Event::ContractPaymentOverdrawn { + contract_id: contract.contract_id, + timestamp: now, + // This is the partial amount successfully reserved from the user's account in this billing cycle + partially_billed_amount: reservable, + // This is the overdraft caused by insufficient funds for the contract payment in this billing cycle + overdraft: overdrawn, + }); + Ok(().into()) + } - // First, distribute extra cultivation rewards if any - if contract_lock.has_extra_amount_locked() { + // Orchestrate the distribution of rewards + // Emits RewardDistributed event + // No-Op if contract neither in deleted state nor the distribution frequency is reached + fn remit_funds( + contract: &types::Contract, + contract_payment_state: &mut types::ContractPaymentState>, + src_twin: &pallet_tfgrid::types::Twin, + farmer_twin: &Option>, + pricing_policy: &pallet_tfgrid::types::PricingPolicy, + ) -> DispatchResult { + contract_payment_state.cycles.defensive_saturating_inc(); + let is_deleted = matches!(contract.state, types::ContractState::Deleted(_)); + let should_distribute_rewards = + contract_payment_state.cycles >= T::DistributionFrequency::get() || is_deleted; + if should_distribute_rewards && contract_payment_state.has_reserve() { + // At this point we don't expect any distribution failure since every fund to transfer should have been accumulated in account reserve along previous billing cycles + let standard_rewards = contract_payment_state.standard_reserve; + let additional_rewards = contract_payment_state.additional_reserve; + // distribute additional rewards to the farm twin + + if let types::ContractData::RentContract(_) = &contract.contract_type { log::info!( - "twin balance {:?} contract lock extra amount {:?}", - twin_balance, - contract_lock.extra_amount_locked + "Distributing additional rewards from twin {:?} with amount {:?}", + src_twin.id, + additional_rewards, ); - - match Self::distribute_extra_cultivation_rewards( - &contract, - twin_balance.min(contract_lock.extra_amount_locked), - ) { - Ok(_) => {} - Err(err) => { - log::error!( - "error while distributing extra cultivation rewards {:?}", - err - ); - return Err(err); + match Self::distribute_additional_rewards(src_twin, farmer_twin, additional_rewards) + { + Ok(_) => (), + Err(e) => { + log::error!("Error while distributing additional rewards: {:?}", e); + if !is_deleted { + return Err(e); + } } - }; - - // Update twin balance after distribution - twin_balance = Self::get_usable_balance(&twin.account_id); + } + contract_payment_state.reset_additional_reserve(); } log::info!( - "twin balance {:?} contract lock amount {:?}", - twin_balance, - contract_lock.amount_locked + "Distributing standard rewards from twin {:?} with amount {:?}", + src_twin.id, + standard_rewards, ); - - // Fetch the default pricing policy - let pricing_policy = pallet_tfgrid::PricingPolicies::::get(1) - .ok_or(Error::::PricingPolicyNotExists)?; - - // Then, distribute cultivation rewards - match Self::distribute_cultivation_rewards( - &contract, - &pricing_policy, - twin_balance.min(contract_lock.amount_locked), + // Distribute standard rewards + match Self::distribute_standard_rewards( + src_twin, + farmer_twin, + standard_rewards, + pricing_policy, ) { - Ok(_) => {} - Err(err) => { - log::error!("error while distributing cultivation rewards {:?}", err); - return Err(err); + Ok(_) => (), + Err(e) => { + log::error!("Error while distributing standard rewards: {:?}", e); + if !is_deleted { + return Err(e); + } } }; - // Reset contract lock values - contract_lock.lock_updated = now; - contract_lock.amount_locked = BalanceOf::::zero(); - contract_lock.extra_amount_locked = BalanceOf::::zero(); - contract_lock.cycles = 0; - } + contract_payment_state.reset_standard_reserve(); + contract_payment_state.reset_cycles(); + log::info!( + "Rewards distributed for contract_id: {:?}", + contract.contract_id + ); + Self::deposit_event(Event::RewardDistributed { + contract_id: contract.contract_id, + standard_rewards, + additional_rewards, + }); + } else { + log::debug!( + "Not distributing rewards for contract_id: {:?}, cycles: {:?}, reserved amount: {:?}", + contract.contract_id, + contract_payment_state.cycles, + contract_payment_state.get_reserve() + ); + } Ok(().into()) } - fn distribute_extra_cultivation_rewards( - contract: &types::Contract, - amount: BalanceOf, - ) -> DispatchResultWithPostInfo { - log::info!( - "Distributing extra cultivation rewards for contract {:?} with amount {:?}", - contract.contract_id, - amount, - ); - - // If the amount is zero, return - if amount == BalanceOf::::zero() { + fn distribute_additional_rewards( + src_twin: &pallet_tfgrid::types::Twin, + farmer_twin: &Option>, + additional_rewards: BalanceOf, + ) -> DispatchResult { + if additional_rewards.is_zero() { return Ok(().into()); } - // Fetch source twin = dedicated node user - let src_twin = - pallet_tfgrid::Twins::::get(contract.twin_id).ok_or(Error::::TwinNotExists)?; - - // Fetch destination twin = farmer - let dst_twin = match &contract.contract_type { - types::ContractData::RentContract(rc) => { - let node = - pallet_tfgrid::Nodes::::get(rc.node_id).ok_or(Error::::NodeNotExists)?; - let farm = pallet_tfgrid::Farms::::get(node.farm_id) - .ok_or(Error::::FarmNotExists)?; - pallet_tfgrid::Twins::::get(farm.twin_id).ok_or(Error::::TwinNotExists)? - } - _ => { - return Err(DispatchErrorWithPostInfo::from( - Error::::InvalidContractType, - )); - } - }; - - // Send 100% to the node's owner (farmer) - log::debug!( - "Transfering: {:?} from contract twin {:?} to farmer account {:?}", - &amount, - &src_twin.account_id, - &dst_twin.account_id, - ); - ::Currency::transfer( - &src_twin.account_id, - &dst_twin.account_id, - amount, - ExistenceRequirement::KeepAlive, - )?; + if let Some(dst_twin) = farmer_twin { + log::debug!( + "Transferring: {:?} (100%) from twin {:?} to farmer twin {:?}", + additional_rewards, + src_twin.id, + dst_twin.id + ); + Self::transfer_reserved( + &src_twin.account_id, + &dst_twin.account_id, + additional_rewards, + )?; + } Ok(().into()) } - // Following: https://library.threefold.me/info/threefold#/tfgrid/farming/threefold__proof_of_utilization - fn distribute_cultivation_rewards( - contract: &types::Contract, + // Transferring the held or reserved funds from the user's account to the beneficiaries (foundation, staking pool, and farmer) + fn distribute_standard_rewards( + src_twin: &pallet_tfgrid::types::Twin, + farmer_twin: &Option>, + standard_rewards: BalanceOf, pricing_policy: &pallet_tfgrid::types::PricingPolicy, - amount: BalanceOf, - ) -> DispatchResultWithPostInfo { - log::info!( - "Distributing cultivation rewards for contract {:?} with amount {:?}", - contract.contract_id, - amount, - ); - - // If the amount is zero, return - if amount == BalanceOf::::zero() { + ) -> DispatchResult { + if standard_rewards.is_zero() { return Ok(().into()); } - // fetch source twin - let twin = - pallet_tfgrid::Twins::::get(contract.twin_id).ok_or(Error::::TwinNotExists)?; - - // Send 10% to the foundation - let foundation_share = Perbill::from_percent(10) * amount; - log::debug!( - "Transfering: {:?} from contract twin {:?} to foundation account {:?}", - &foundation_share, - &twin.account_id, - &pricing_policy.foundation_account - ); - ::Currency::transfer( - &twin.account_id, - &pricing_policy.foundation_account, - foundation_share, - ExistenceRequirement::KeepAlive, - )?; - - // TODO: send 5% to the staking pool account - let staking_pool_share = Perbill::from_percent(5) * amount; + // Calculate and transfer staking pool share (10%) + let staking_pool_share = Perbill::from_percent(10) * standard_rewards; let staking_pool_account = T::StakingPoolAccount::get(); log::debug!( - "Transfering: {:?} from contract twin {:?} to staking pool account {:?}", - &staking_pool_share, - &twin.account_id, - &staking_pool_account, + "Transferring: {:?} (10%) from twin {:?} to staking pool account {:?}", + staking_pool_share, + src_twin.id, + staking_pool_account, ); - ::Currency::transfer( - &twin.account_id, + Self::transfer_reserved( + &src_twin.account_id, &staking_pool_account, staking_pool_share, - ExistenceRequirement::KeepAlive, )?; - let mut sales_share = 50; - - if let Some(provider_id) = contract.solution_provider_id { - if let Some(solution_provider) = SolutionProviders::::get(provider_id) { - let total_take: u8 = solution_provider - .providers - .iter() - .map(|provider| provider.take) - .sum(); - sales_share -= total_take; - - if !solution_provider - .providers - .iter() - .map(|provider| { - let share = Perbill::from_percent(provider.take as u32) * amount; - log::debug!( - "Transfering: {:?} from contract twin {:?} to provider account {:?}", - &share, - &twin.account_id, - &provider.who - ); - ::Currency::transfer( - &twin.account_id, - &provider.who, - share, - ExistenceRequirement::KeepAlive, - ) - }) - .filter(|result| result.is_err()) - .collect::>() - .is_empty() - { - return Err(DispatchErrorWithPostInfo::from( - Error::::InvalidProviderConfiguration, - )); - } - } - }; - - if sales_share > 0 { - let share = Perbill::from_percent(sales_share.into()) * amount; - // Transfer the remaining share to the sales account - // By default it is 50%, if a contract has solution providers it can be less + let (foundation_percent, foundation_share) = if let Some(dst_twin) = farmer_twin { + // Where 3node utilized (Node and Rent contracts) + // Calculate foundation share (40%) + let foundation_percent = 40; + let foundation_share = Perbill::from_percent(foundation_percent) * standard_rewards; + // Calculate and transfer farmer share (50%) + // We calculate it by subtract all previously send amounts with the initial to avoid accumulating rounding errors. + let total_distributed = foundation_share + staking_pool_share; + let farmer_share = standard_rewards.defensive_saturating_sub(total_distributed); log::debug!( - "Transfering: {:?} from contract twin {:?} to sales account {:?}", - &share, - &twin.account_id, - &pricing_policy.certified_sales_account + "Transferring: {:?} (50%) from twin {:?} to farmer twin {:?}", + farmer_share, + src_twin.id, + dst_twin.id ); - ::Currency::transfer( - &twin.account_id, - &pricing_policy.certified_sales_account, - share, - ExistenceRequirement::KeepAlive, - )?; - } - - // Burn 35%, to not have any imbalance in the system, subtract all previously send amounts with the initial - let amount_to_burn = - (Perbill::from_percent(50) * amount) - foundation_share - staking_pool_share; + Self::transfer_reserved(&src_twin.account_id, &dst_twin.account_id, farmer_share)?; - let to_burn = T::Currency::withdraw( - &twin.account_id, - amount_to_burn, - WithdrawReasons::FEE, - ExistenceRequirement::KeepAlive, - )?; + (foundation_percent, foundation_share) + } else { + // Where no 3node utilized (Name contracts) + // Calculate foundation share (90%) + let foundation_percent = 90; + // We calculate it by subtract all previously send amounts with the initial to avoid accumulating rounding errors. + let foundation_share = standard_rewards.defensive_saturating_sub(staking_pool_share); + (foundation_percent, foundation_share) + }; + // Transfer foundation share log::debug!( - "Burning: {:?} from contract twin {:?}", - amount_to_burn, - &twin.account_id + "Transferring: {:?} ({:}%) from twin {:?} to foundation account {:?}", + foundation_share, + foundation_percent, + src_twin.id, + pricing_policy.foundation_account, ); - T::Burn::on_unbalanced(to_burn); + Self::transfer_reserved( + &src_twin.account_id, + &pricing_policy.foundation_account, + foundation_share, + )?; - Self::deposit_event(Event::TokensBurned { - contract_id: contract.contract_id, - amount: amount_to_burn, - }); + Ok(().into()) + } + + // Transfer reserved funds to a beneficiary + fn transfer_reserved( + src_account: &T::AccountId, + dst_account: &T::AccountId, + amount: BalanceOf, + ) -> DispatchResult { + if amount.is_zero() { + return Ok(().into()); + } + + let result = if Self::account_exists(&dst_account) { + // Default case: repatriate_reserved is efficient but requires the beneficiary account to exist + ::Currency::repatriate_reserved( + &src_account, + &dst_account, + amount, + BalanceStatus::Free, + ) + } else { + // Defensive measure: less efficient than repatriate_reserved, but works for non-existent accounts + log::info!("Beneficiary account does not exist. The account will be created"); + let (slashed, remainder) = + ::Currency::slash_reserved(&src_account, amount); + if remainder.is_zero() { + // This may fail to create the account if the amount is too low (less than EXISTENTIAL_DEPOSIT) but nothing we can do about it + ::Currency::resolve_creating(dst_account, slashed); + } + Ok(remainder) + }; + + match result { + // No remainder: the full amount was successfully deducted from the reserve and transferred to the beneficiary + Ok(remainder) if remainder.is_zero() => Ok(().into()), + // Partial remainder: A portion of the amount wasn't successfully deducted from the reserve. + // This should only occur if on-chain logic has introduced a liquid restriction on the source account, or if there's a bug + Ok(remainder) => { + log::error!( + "Failed to transfer the whole amount: wanted {:?}, remainder {:?}", + amount, + remainder + ); + Err(Error::::RewardDistributionError.into()) + } + // This should only occur if the destination account is unable to receive the funds + Err(e) => { + log::error!( + "Failed to transfer reserved balance: error: {:?}. source: {:?}, destination: {:?}", + e, src_account, dst_account + ); + Err(e) + } + } + } + + // Managing the states of node contracts associated with a rent contract to transition them to the appropriate state (either Created or GracePeriod). + fn synchronize_associated_node_contract_states( + contract: &mut types::Contract, + state: types::ContractState, + ) -> DispatchResultWithPostInfo { + match &contract.contract_type { + types::ContractData::RentContract(rc) => { + let active_node_contracts = ActiveNodeContracts::::get(rc.node_id); + for ctr_id in active_node_contracts { + let mut ctr = + Contracts::::get(ctr_id).ok_or(Error::::ContractNotExists)?; + Self::update_contract_state(&mut ctr, &state)?; + + match state { + types::ContractState::Created => { + Self::deposit_event(Event::ContractGracePeriodEnded { + contract_id: ctr_id, + node_id: rc.node_id, + twin_id: ctr.twin_id, + }); + } + types::ContractState::GracePeriod(block_number) => { + Self::deposit_event(Event::ContractGracePeriodStarted { + contract_id: ctr_id, + node_id: rc.node_id, + twin_id: ctr.twin_id, + block_number, + }); + } + _ => (), + }; + } + } + _ => (), + }; Ok(().into()) } @@ -638,7 +775,7 @@ impl Pallet { } // Inserts a contract in a billing loop where the index is the contract id % billing frequency - // This way, we don't need to reinsert the contract everytime it gets billed + // This way, we don't need to re-insert the contract every time it gets billed pub fn insert_contract_in_billing_loop(contract_id: u64) { let index = Self::get_billing_loop_index_from_contract_id(contract_id); let mut contract_ids = ContractsToBillAt::::get(index); @@ -690,25 +827,6 @@ impl Pallet { Ok(().into()) } - // Get the usable balance of an account - // This is the balance minus the minimum balance - pub fn get_usable_balance(account_id: &T::AccountId) -> BalanceOf { - let balance = pallet_balances::pallet::Pallet::::usable_balance(account_id); - let b = balance.saturated_into::(); - BalanceOf::::saturated_from(b) - } - - fn get_locked_balance(account_id: &T::AccountId) -> BalanceOf { - let usable_balance = Self::get_usable_balance(account_id); - let free_balance = ::Currency::free_balance(account_id); - - let locked_balance = free_balance.checked_sub(&usable_balance); - match locked_balance { - Some(balance) => balance, - None => BalanceOf::::zero(), - } - } - fn get_stash_balance(twin_id: u32) -> BalanceOf { let account_id = pallet_tfgrid::TwinBoundedAccountID::::get(twin_id); match account_id { @@ -717,44 +835,39 @@ impl Pallet { } } - // Validates if the given signer is the next block author based on the validators in session - // This can be used if an extrinsic should be refunded by the author in the same block - // It also requires that the keytype inserted for the offchain workers is the validator key - fn is_next_block_author( - signer: &Signer::AuthorityId>, - ) -> Result<(), Error> { - let author = >::author(); - let validators = >::validators(); - - // Sign some arbitrary data in order to get the AccountId, maybe there is another way to do this? - let signed_message = signer.sign_message(&[0]); - if let Some(signed_message_data) = signed_message { - if let Some(block_author) = author { - let validator = - ::ValidatorIdOf::convert(block_author.clone()) - .ok_or(Error::::IsNotAnAuthority)?; - - let validator_count = validators.len(); - let author_index = (validators.iter().position(|a| a == &validator).unwrap_or(0) - + 1) - % validator_count; - - let signer_validator_account = - ::ValidatorIdOf::convert( - signed_message_data.0.id.clone(), - ) - .ok_or(Error::::IsNotAnAuthority)?; - - if signer_validator_account != validators[author_index] { - return Err(Error::::WrongAuthority); - } - } - } - - Ok(().into()) + // Retrieve the liquid balance (amount that is neither reserved nor frozen). + // The check can_reserve(get_reservable_balance(acc)) should always return true. + // Returns free - max (ED, Frozen) + pub fn get_usable_balance(account_id: &T::AccountId) -> BalanceOf { + let account = T::AccountStore::get(account_id); + let free = account.free; + let frozen = account.frozen; + let reserved = account.reserved; + let minimum_balance = + <::Currency as Currency>::minimum_balance() + .saturated_into::(); + // Get the reservable balance + let reservable = free.saturating_sub(max( + ::Balance::saturated_from(minimum_balance), + frozen, + )); + log::debug!("Free balance: {:?} Reserved balance: {:?} Locked balance: {:?} Reservable balance: {:?}", free, reserved, frozen, reservable); + let b = reservable.saturated_into::(); + BalanceOf::::saturated_from(b) } pub fn get_current_timestamp_in_secs() -> u64 { >::get().saturated_into::() / 1000 } + + pub fn is_validator(account_id: T::AccountId) -> bool { + let validators = pallet_session::Pallet::::validators(); + + ::ValidatorIdOf::convert(account_id.clone()) + .map_or(false, |validator_id| validators.contains(&validator_id)) + } + + fn account_exists(account_id: &T::AccountId) -> bool { + >::account_exists(&account_id.clone().into()) + } } diff --git a/substrate-node/pallets/pallet-smart-contract/src/cost.rs b/substrate-node/pallets/pallet-smart-contract/src/cost.rs index 64686ac60..69a4b7e39 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/cost.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/cost.rs @@ -9,6 +9,8 @@ use tfchain_support::{ types::NodeCertification, }; +pub const CERTIFIED_INCREASE_FACTOR: f64 = 1.25; + impl types::Contract { pub fn get_billing_info(&self) -> types::ContractBillingInformation { pallet::ContractBillingInformationByID::::get(self.contract_id) @@ -18,10 +20,10 @@ impl types::Contract { &self, balance: BalanceOf, seconds_elapsed: u64, + certification_type: Option, ) -> Result<(BalanceOf, types::DiscountLevel), DispatchErrorWithPostInfo> { // Fetch the default pricing policy and certification type let pricing_policy = pallet_tfgrid::PricingPolicies::::get(1).unwrap(); - let certification_type = NodeCertification::Diy; // Calculate the cost for a contract, can be any of: // - NodeContract @@ -30,12 +32,11 @@ impl types::Contract { let total_cost = self.calculate_contract_cost_units_usd(&pricing_policy, seconds_elapsed)?; - // If cost is 0, reinsert to be billed at next interval if total_cost == 0 { return Ok((BalanceOf::::zero(), types::DiscountLevel::None)); } - let total_cost_tft_64 = calculate_cost_in_tft_from_units_usd::(total_cost)?; + let total_cost_tft_64 = calculate_cost_in_tft_from_units_usd::(total_cost); // Calculate the amount due and discount received based on the total_cost amount due let (amount_due, discount_received) = calculate_discount_tft::( @@ -114,18 +115,14 @@ impl types::Contract { } // Calculates the cost of extra fee for a dedicated node in TFT. - pub fn calculate_extra_fee_cost_tft( - &self, - node_id: u32, - seconds_elapsed: u64, - ) -> Result, DispatchErrorWithPostInfo> { + pub fn calculate_extra_fee_cost_tft(&self, node_id: u32, seconds_elapsed: u64) -> BalanceOf { let cost = calculate_extra_fee_cost_units_usd::(node_id, seconds_elapsed); if cost == 0 { - return Ok(BalanceOf::::zero()); + return BalanceOf::::zero(); } - let cost_tft = calculate_cost_in_tft_from_units_usd::(cost)?; + let cost_tft = calculate_cost_in_tft_from_units_usd::(cost); - Ok(BalanceOf::::saturated_from(cost_tft)) + BalanceOf::::saturated_from(cost_tft) } } @@ -178,7 +175,7 @@ impl types::ServiceContract { } // Calculate the cost in TFT for service contract - let total_cost_tft_64 = calculate_cost_in_tft_from_units_usd::(total_cost)?; + let total_cost_tft_64 = calculate_cost_in_tft_from_units_usd::(total_cost); // convert to balance object let amount_due: BalanceOf = BalanceOf::::saturated_from(total_cost_tft_64); @@ -297,7 +294,7 @@ pub fn calculate_discount_tft( amount_due: u64, seconds_elapsed: u64, balance: BalanceOf, - certification_type: NodeCertification, + certification_type: Option, ) -> (BalanceOf, types::DiscountLevel) { if amount_due == 0 { return (BalanceOf::::zero(), types::DiscountLevel::None); @@ -329,8 +326,9 @@ pub fn calculate_discount_tft( let mut amount_due = U64F64::from_num(amount_due) * discount_received.price_multiplier(); // Certified capacity costs 25% more - if certification_type == NodeCertification::Certified { - amount_due = amount_due * U64F64::from_num(1.25); + if let Some(NodeCertification::Certified) = certification_type { + log::debug!("Certified node detected, increasing amount due by 25%"); + amount_due *= U64F64::from_num(CERTIFIED_INCREASE_FACTOR); } // convert to balance object @@ -340,9 +338,7 @@ pub fn calculate_discount_tft( (amount_due, discount_received) } -pub fn calculate_cost_in_tft_from_units_usd( - cost_units_usd: u64, -) -> Result { +pub fn calculate_cost_in_tft_from_units_usd(cost_units_usd: u64) -> u64 { let avg_tft_price = pallet_tft_price::AverageTftPrice::::get(); // Guarantee tft price will never be lower than min tft price @@ -360,7 +356,7 @@ pub fn calculate_cost_in_tft_from_units_usd( let cost_tft = U64F64::from_num(cost_units_usd) / U64F64::from_num(tft_price_units_usd); // Multiply by the chain precision (7 decimals) - Ok((cost_tft * U64F64::from_num(10u64.pow(7))) + (cost_tft * U64F64::from_num(10u64.pow(7))) .round() - .to_num::()) + .to_num::() } diff --git a/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs b/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs index e8bee251e..bada34e30 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/grid_contract.rs @@ -223,9 +223,9 @@ impl Pallet { ContractID::::put(id); let now = Self::get_current_timestamp_in_secs(); - let mut contract_lock = types::ContractLock::default(); - contract_lock.lock_updated = now; - ContractLock::::insert(id, contract_lock); + let mut contract_payment_state = types::ContractPaymentState::default(); + contract_payment_state.last_updated_seconds = now; + ContractPaymentState::::insert(id, contract_payment_state); Ok(contract) } @@ -321,6 +321,10 @@ impl Pallet { } Self::update_contract_state(contract, &types::ContractState::Deleted(cause))?; + log::debug!( + "Billing for contract {} kicked in due to cancel request", + contract.contract_id + ); Self::bill_contract(contract.contract_id)?; Ok(().into()) @@ -329,6 +333,7 @@ impl Pallet { pub fn remove_contract(contract_id: u64) -> DispatchResultWithPostInfo { let contract = Contracts::::get(contract_id).ok_or(Error::::ContractNotExists)?; + log::debug!("removing contract {}", contract_id); match contract.contract_type.clone() { types::ContractData::NodeContract(mut node_contract) => { if node_contract.public_ips > 0 { @@ -370,13 +375,14 @@ impl Pallet { } }; - log::debug!("removing contract"); Contracts::::remove(contract_id); - ContractLock::::remove(contract_id); - + ContractPaymentState::::remove(contract_id); // Clean up contract from billing loop // This is the only place it should be done - log::debug!("cleaning up deleted contract from billing loop"); + log::debug!( + "cleaning up deleted contract {} from billing loop", + contract_id + ); Self::remove_contract_from_billing_loop(contract_id)?; Ok(().into()) @@ -404,7 +410,7 @@ impl Pallet { contract.state = state.clone(); Contracts::::insert(&contract.contract_id, contract.clone()); - // if the contract is a name contract, nothing to do left here + // if the contract is a name or rent contract, nothing to do left here match contract.contract_type { types::ContractData::NameContract(_) => return Ok(().into()), types::ContractData::RentContract(_) => return Ok(().into()), @@ -702,7 +708,14 @@ impl ChangeNode, InterfaceOf, SerialNumberOf> for &mut contract, &types::ContractState::Deleted(types::Cause::CanceledByUser), ); - let _ = Self::bill_contract(node_contract_id); + log::debug!( + "Billing for node contract {} kicked in due to node deletion", + contract.contract_id + ); + let res = Self::bill_contract(node_contract_id); + if let Err(e) = res { + log::error!("error in node_deleted hook while billing contract {:?}: {:?}. Contract could be in dirty state", node_contract_id, e); + } } } @@ -714,7 +727,14 @@ impl ChangeNode, InterfaceOf, SerialNumberOf> for &mut contract, &types::ContractState::Deleted(types::Cause::CanceledByUser), ); - let _ = Self::bill_contract(contract.contract_id); + log::debug!( + "Billing for rent contract {} kicked in due to node deletion", + contract.contract_id + ); + let res = Self::bill_contract(contract.contract_id); + if let Err(e) = res { + log::error!("error in node_deleted hook while billing contract id {:?}: {:?}. Contract could be in dirty state", rc_id, e); + } } } } @@ -725,10 +745,14 @@ impl ChangeNode, InterfaceOf, SerialNumberOf> for let node_power = pallet_tfgrid::NodePower::::get(node.id); if !node_power.is_standby() { if let Some(rc_id) = ActiveRentContractForNode::::get(node.id) { - let mut contract_lock = ContractLock::::get(rc_id); + let Some(mut contract_payment_state) = ContractPaymentState::::get(rc_id) else { + log::warn!("Contract payment state not exists for contract_id {}", rc_id); + return; + }; let now = Self::get_current_timestamp_in_secs(); - contract_lock.lock_updated = now; - ContractLock::::insert(rc_id, &contract_lock); + contract_payment_state.last_updated_seconds = now; + ContractPaymentState::::insert(rc_id, &contract_payment_state); + log::debug!("Rented node {} is back up, updated contract contract_payment_state for contract {}", node.id, rc_id); } } } diff --git a/substrate-node/pallets/pallet-smart-contract/src/lib.rs b/substrate-node/pallets/pallet-smart-contract/src/lib.rs index 8def850e4..e140c900e 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/lib.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/lib.rs @@ -63,7 +63,10 @@ pub mod pallet { use super::*; use frame_support::{ pallet_prelude::*, - traits::{Currency, Get, Hooks, LockIdentifier, LockableCurrency, OnUnbalanced}, + traits::{ + Currency, Get, Hooks, LockIdentifier, LockableCurrency, + OnUnbalanced, ReservableCurrency, + }, }; use frame_system::{ self as system, ensure_signed, @@ -83,8 +86,8 @@ pub mod pallet { <::Currency as Currency<::AccountId>>::Balance; pub type NegativeImbalanceOf = <::Currency as Currency<::AccountId>>::NegativeImbalance; - pub const GRID_LOCK_ID: LockIdentifier = *b"gridlock"; + use tfchain_support::types::PublicIP; #[pallet::pallet] @@ -195,6 +198,11 @@ pub mod pallet { #[pallet::getter(fn dedicated_nodes_extra_fee)] pub type DedicatedNodesExtraFee = StorageMap<_, Blake2_128Concat, u32, u64, ValueQuery>; + #[pallet::storage] + #[pallet::getter(fn contract_payment_state)] + pub type ContractPaymentState = + StorageMap<_, Blake2_128Concat, u64, types::ContractPaymentState>, OptionQuery>; + #[pallet::config] pub trait Config: CreateSignedTransaction> @@ -207,7 +215,9 @@ pub mod pallet { + pallet_session::Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; - type Currency: LockableCurrency; + type Currency: LockableCurrency + + ReservableCurrency + + Currency; /// Handler for the unbalanced decrement when slashing (burning collateral) type Burn: OnUnbalanced>; type StakingPoolAccount: Get; @@ -289,14 +299,14 @@ pub mod pallet { RentContractCanceled { contract_id: u64, }, - /// A Contract grace period is triggered + /// A Contract grace period is triggered due to overdarfted ContractGracePeriodStarted { contract_id: u64, node_id: u32, twin_id: u32, block_number: u64, }, - /// A Contract grace period was ended + /// A Contract grace period was ended due to overdarfted being settled ContractGracePeriodEnded { contract_id: u64, node_id: u32, @@ -328,6 +338,28 @@ pub mod pallet { node_id: u32, extra_fee: u64, }, + // A rent contract is waived due to node being in standby + RentWaived { + contract_id: u64, + }, + // A Contract grace Period is elapsed + ContractGracePeriodElapsed { + contract_id: u64, + grace_period: u64, + }, + // Overdafted incurred + ContractPaymentOverdrawn { + contract_id: u64, + timestamp: u64, + partially_billed_amount: BalanceOf, + overdraft: BalanceOf, + }, + // RewardDistributed + RewardDistributed { + contract_id: u64, + standard_rewards: BalanceOf, + additional_rewards: BalanceOf, + }, } #[pallet::error] @@ -384,6 +416,8 @@ pub mod pallet { WrongAuthority, UnauthorizedToChangeSolutionProviderId, UnauthorizedToSetExtraFee, + RewardDistributionError, + ContractPaymentStateNotExists, } #[pallet::genesis_config] @@ -515,8 +549,31 @@ pub mod pallet { origin: OriginFor, contract_id: u64, ) -> DispatchResultWithPostInfo { - let _account_id = ensure_signed(origin)?; - Self::bill_contract(contract_id) + let account_id = ensure_signed(origin)?; + log::debug!("Starting billing for contract_id: {:?}", contract_id); + + let res = Self::bill_contract(contract_id); + + let pays: Pays = if Self::is_validator(account_id) { + log::debug!("validator is exempt from fees"); + // Exempt fees for validators + Pays::No.into() + } else { + Pays::Yes.into() + }; + + match res { + Ok(mut info) => { + log::info!("successfully billed contract with id {:?}", contract_id,); + info.pays_fee = pays; + Ok(info) + } + Err(mut info) => { + log::warn!("failed to bill contract with id {:?}", contract_id); + info.post_info.pays_fee = pays; + Err(info) + } + } } #[pallet::call_index(11)] diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/mod.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/mod.rs index 0c2c7bfa7..62cb15abc 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/mod.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/mod.rs @@ -5,3 +5,4 @@ pub mod v10; pub mod v11; pub mod v8; pub mod v9; +pub mod v12; diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/types.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/types.rs index 89125d03e..ece8c6689 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/types.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/types.rs @@ -46,3 +46,20 @@ pub mod v11 { pub cycles: u16, } } + +pub mod v12 { + use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; + use scale_info::TypeInfo; + + #[derive( + PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Default, Debug, TypeInfo, MaxEncodedLen, + )] + pub struct ContractPaymentState { + pub standard_reserve: BalanceOf, + pub additional_reserve: BalanceOf, + pub standard_overdraft: BalanceOf, + pub additional_overdraft: BalanceOf, + pub last_updated_seconds: u64, + pub cycles: u16, + } +} diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v12.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v12.rs new file mode 100644 index 000000000..da7e5bf72 --- /dev/null +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v12.rs @@ -0,0 +1,207 @@ +use crate::*; +use frame_support::{ + pallet_prelude::ValueQuery, + storage_alias, + traits::{LockableCurrency, OnRuntimeUpgrade}, + weights::Weight, + Blake2_128Concat, +}; +use log::{debug, info}; +use sp_core::Get; +use sp_runtime::traits::{Saturating, Zero}; +use sp_std::marker::PhantomData; + +#[cfg(feature = "try-runtime")] +use frame_support::ensure; +#[cfg(feature = "try-runtime")] +use sp_std::vec::Vec; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; + +// Storage alias from ContractPaymentState v12 +#[storage_alias] +pub type ContractPaymentState = StorageMap< + Pallet, + Blake2_128Concat, + u64, + super::types::v12::ContractPaymentState>, + ValueQuery, +>; + +pub struct MigrateContractLockToContractPaymentState(pub PhantomData); + +impl OnRuntimeUpgrade for MigrateContractLockToContractPaymentState { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + validate_pallet_version::(types::StorageVersion::V11)?; + + let count = ContractLock::::iter().count(); + debug!( + "🏁 Smart Contract pallet {:?} ContractLock length before migration {:?}", + PalletVersion::::get(), + count + ); + + Ok(count.to_le_bytes().to_vec()) + } + + fn on_runtime_upgrade() -> Weight { + if PalletVersion::::get() == types::StorageVersion::V11 { + migrate_to_version_12::() + } else { + info!(" >>> Unused Smart Contract pallet V12 migration"); + Weight::zero() + } + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(count: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + validate_pallet_version::(types::StorageVersion::V12)?; + + let new_count = ContractPaymentState::::iter().count(); + let old_count = + usize::from_le_bytes(count.try_into().expect("slice with incorrect length")); + + if old_count != 0 { + debug!( + "🏁 Smart Contract pallet {:?} ContractPaymentState length after migration {:?}", + PalletVersion::::get(), + new_count + ); + ensure!( + new_count == old_count, + DispatchError::Other( + "Number of ContractPaymentState migrated does not match: {:?}" + ) + ); + } + + // Ensure that the ContractLock storage map is empty + let count = ContractLock::::iter().count(); + ensure!( + count == 0, + DispatchError::Other("ContractLock not empty after migration") + ); + + // Ensure that the balances Locks storage map is empty + let count = pallet_balances::Locks::::iter().count(); + ensure!( + count == 0, + DispatchError::Other("Locks not empty after migration") + ); + + check_contract_payment_state_v12::() + } +} + +#[cfg(feature = "try-runtime")] +fn validate_pallet_version( + expected_version: types::StorageVersion, +) -> Result<(), sp_runtime::TryRuntimeError> { + let current_version = PalletVersion::::get(); + debug!("current pallet version: {:?}", current_version); + ensure!( + current_version >= expected_version, + DispatchError::Other("Unexpected pallet version") + ); + Ok(()) +} + +pub fn migrate_to_version_12() -> frame_support::weights::Weight { + debug!( + " >>> Starting contract pallet migration, pallet version: {:?}", + PalletVersion::::get() + ); + + let mut total_reads = 0; + let mut total_writes = 0; + + let (r, w) = migrate_contract_lock_to_contract_payment_state::(); + total_reads.saturating_accrue(r); + total_writes.saturating_accrue(w); + + let (r, w) = remove_all_balances_locks::(); + total_reads.saturating_accrue(r); + total_writes.saturating_accrue(w); + + // Set the new storage version + PalletVersion::::put(types::StorageVersion::V12); + total_writes.saturating_inc(); + + T::DbWeight::get().reads_writes(total_reads, total_writes) +} + +fn migrate_contract_lock_to_contract_payment_state() -> (u64, u64) { + let mut reads = 0; + let mut writes = 0; + + for (contract_id, old_contract_lock) in ContractLock::::drain() { + reads.saturating_inc(); + writes.saturating_inc(); + + ContractPaymentState::::insert( + contract_id, + super::types::v12::ContractPaymentState { + standard_reserve: BalanceOf::::zero(), + additional_reserve: BalanceOf::::zero(), + standard_overdraft: old_contract_lock.amount_locked, + additional_overdraft: old_contract_lock.extra_amount_locked, + last_updated_seconds: old_contract_lock.lock_updated, + cycles: old_contract_lock.cycles, + }, + ); + writes.saturating_inc(); + }; + + (reads, writes) +} + +fn remove_all_balances_locks() -> (u64, u64) { + let mut reads = 0; + let mut writes = 0; + // Get only the accounts with locks + for (account_id, _) in pallet_balances::Locks::::iter() { + reads.saturating_inc(); + // Fetch all locks for the account + let locks = pallet_balances::Pallet::::locks(&account_id); + reads.saturating_inc(); + + // Remove each lock + for lock in locks { + pallet_balances::Pallet::::remove_lock(lock.id, &account_id); + reads.saturating_inc(); + writes.saturating_inc(); + } + } + + (reads, writes) +} + +#[cfg(feature = "try-runtime")] +pub fn check_contract_payment_state_v12() -> Result<(), sp_runtime::TryRuntimeError> { + debug!( + "🔎 Smart Contract pallet {:?} checking ContractPaymentState storage map START", + PalletVersion::::get() + ); + + for (contract_id, _) in Contracts::::iter() { + if !ContractPaymentState::::contains_key(contract_id) { + debug!( + " ⚠️ Contract (id: {}): no contract payment state found", + contract_id + ); + } + } + + debug!( + "🏁 Smart Contract pallet {:?} checking ContractPaymentState storage map END", + PalletVersion::::get() + ); + + debug!( + "👥 Smart Contract pallet to {:?} passes POST migrate checks ✅", + PalletVersion::::get() + ); + + Ok(()) +} diff --git a/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs b/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs index fc4c7661f..3a477bd5e 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/migrations/v9.rs @@ -1,9 +1,9 @@ use crate::*; use frame_support::{traits::OnRuntimeUpgrade, weights::Weight}; -use log::{info, debug}; -use sp_runtime::Saturating; +use log::{debug, info}; use scale_info::prelude::string::String; use sp_core::Get; +use sp_runtime::Saturating; use sp_std::{marker::PhantomData, vec, vec::Vec}; #[cfg(feature = "try-runtime")] @@ -15,8 +15,9 @@ pub struct CleanStorageState(PhantomData); impl OnRuntimeUpgrade for CleanStorageState { fn on_runtime_upgrade() -> Weight { - if PalletVersion::::get() == types::StorageVersion::V8 || - PalletVersion::::get() == types::StorageVersion::V9 { + if PalletVersion::::get() == types::StorageVersion::V8 + || PalletVersion::::get() == types::StorageVersion::V9 + { info!("🔔 Starting Smart Contract pallet storage cleaning"); // Start a migration (this happens before on_initialize so it'll happen later in this // block, which should be good enough)... @@ -25,14 +26,15 @@ impl OnRuntimeUpgrade for CleanStorageState { } else { info!("⛔ Unused Smart Contract pallet V9 storage cleaning"); Weight::zero() - } + } } #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { info!("current pallet version: {:?}", PalletVersion::::get()); ensure!( - PalletVersion::::get() == types::StorageVersion::V8 || PalletVersion::::get() == types::StorageVersion::V9, + PalletVersion::::get() == types::StorageVersion::V8 + || PalletVersion::::get() == types::StorageVersion::V9, DispatchError::Other("Unexpected pallet version") ); @@ -56,20 +58,36 @@ pub fn check_pallet_smart_contract() { check_node_contract_resources::(); } -pub fn clean_pallet_smart_contract(current_stage: MigrationStage +pub fn clean_pallet_smart_contract( + current_stage: MigrationStage, ) -> (frame_support::weights::Weight, Option) { - info!("🧼 Cleaning Smart Contract pallet storage [{}/10]", current_stage); + info!( + "🧼 Cleaning Smart Contract pallet storage [{}/10]", + current_stage + ); match current_stage { 0 => (Weight::zero(), Some(current_stage + 1)), 1 => (clean_contracts::(), Some(current_stage + 1)), 2 => (clean_contracts_to_bill_at::(), Some(current_stage + 1)), 3 => (clean_active_node_contracts::(), Some(current_stage + 1)), - 4 => (clean_active_rent_contract_for_node::(), Some(current_stage + 1)), - 5 => (clean_contract_id_by_node_id_and_hash::(), Some(current_stage + 1)), - 6 => (clean_contract_id_by_name_registration::(), Some(current_stage + 1)), + 4 => ( + clean_active_rent_contract_for_node::(), + Some(current_stage + 1), + ), + 5 => ( + clean_contract_id_by_node_id_and_hash::(), + Some(current_stage + 1), + ), + 6 => ( + clean_contract_id_by_name_registration::(), + Some(current_stage + 1), + ), 7 => (clean_contract_lock::(), Some(current_stage + 1)), 8 => (clean_solution_providers::(), Some(current_stage + 1)), - 9 => (clean_contract_billing_information_by_id::(), Some(current_stage + 1)), + 9 => ( + clean_contract_billing_information_by_id::(), + Some(current_stage + 1), + ), // Last cleaning operation, set stage to none to stop migration 10 => { let weight = clean_node_contract_resources::(); @@ -178,7 +196,7 @@ fn check_node_contract(node_id: u32, contract_id: u64, deployment_has } // NodeContractResources - // Nothing to check here + // Nothing to check here // A node contract needs a call to report_contract_resources() to // have associated ressources in NodeContractResources storage map } else { @@ -191,7 +209,9 @@ fn check_node_contract(node_id: u32, contract_id: u64, deployment_has if deployment_hash == types::HexHash::default() { debug!( " ⚠️ Node Contract (id: {}) on node {}: deployment hash is default ({:?})", - contract_id, node_id, String::from_utf8_lossy(&deployment_hash) + contract_id, + node_id, + String::from_utf8_lossy(&deployment_hash) ); } } @@ -204,8 +224,7 @@ fn check_name_contract(contract_id: u64, name: &T::NameContractName) " ⚠️ Name Contract (id: {}): key (name: {:?}) not exists", contract_id, name ); - } - else if ctr_id != contract_id { + } else if ctr_id != contract_id { debug!( " ⚠️ Name Contract (id: {}): wrong contract (id: {}) in name registration map", contract_id, ctr_id @@ -382,7 +401,8 @@ pub fn check_contract_id_by_node_id_and_hash() { if pallet_tfgrid::Nodes::::get(node_id).is_none() { debug!( " ⚠️ ContractIDByNodeIDAndHash[node: {}, hash: {:?}]: node not exists", - node_id, String::from_utf8_lossy(&hash) + node_id, + String::from_utf8_lossy(&hash) ); } @@ -392,7 +412,7 @@ pub fn check_contract_id_by_node_id_and_hash() { if node_contract.deployment_hash != hash { debug!( " ⚠️ ContractIDByNodeIDAndHash[node: {}, hash: {:?}]: deployment hash ({:?}) on contract {} is not matching", - node_id, String::from_utf8_lossy(&hash), String::from_utf8_lossy(&node_contract.deployment_hash), contract_id, + node_id, String::from_utf8_lossy(&hash), String::from_utf8_lossy(&node_contract.deployment_hash), contract_id, ); } } @@ -406,7 +426,9 @@ pub fn check_contract_id_by_node_id_and_hash() { } else { debug!( " ⚠️ ContractIDByNodeIDAndHash[node: {}, hash: {:?}]: contract {} not exists", - node_id, String::from_utf8_lossy(&hash), contract_id + node_id, + String::from_utf8_lossy(&hash), + contract_id ); } } @@ -431,7 +453,7 @@ pub fn check_contract_id_by_name_registration() { if name_contract.name != name { debug!( " ⚠️ ContractIDByNameRegistration[name: {:?}]: name ({:?}) on contract {} is not matching", - String::from_utf8_lossy(&name.into()), String::from_utf8_lossy(&name_contract.name.into()), contract_id, + String::from_utf8_lossy(&name.into()), String::from_utf8_lossy(&name_contract.name.into()), contract_id, ); } } @@ -445,7 +467,8 @@ pub fn check_contract_id_by_name_registration() { } else { debug!( " ⚠️ ContractIDByNameRegistration[name: {:?}]: contract {} not exists", - String::from_utf8_lossy(&name.into()), contract_id + String::from_utf8_lossy(&name.into()), + contract_id ); } } @@ -464,7 +487,7 @@ pub fn check_contract_lock() { ); for (contract_id, _contract_lock) in ContractLock::::iter() { - if Contracts::::get(contract_id).is_none() { + if Contracts::::get(contract_id).is_none() { debug!( " ⚠️ ContractLock[contract: {}]: contract not exists", contract_id @@ -509,7 +532,8 @@ pub fn check_contract_billing_information_by_id() { PalletVersion::::get() ); - for (contract_id, _contract_billing_information) in ContractBillingInformationByID::::iter() { + for (contract_id, _contract_billing_information) in ContractBillingInformationByID::::iter() + { if let Some(c) = Contracts::::get(contract_id) { match c.contract_type { types::ContractData::NodeContract(_) => (), @@ -545,7 +569,7 @@ pub fn check_node_contract_resources() { if contract_resource.contract_id != contract_id { debug!( " ⚠️ NodeContractResources[contract: {}]: wrong contract id on resource ({})", - contract_id, contract_resource.contract_id + contract_id, contract_resource.contract_id ); } @@ -618,7 +642,13 @@ pub fn clean_contracts() -> frame_support::weights::Weight { T::DbWeight::get().reads_writes(r.saturating_add(2), w) } -fn clean_node_contract(node_id: u32, contract_id: u64, deployment_hash: types::HexHash, r: &mut u64, w: &mut u64) { +fn clean_node_contract( + node_id: u32, + contract_id: u64, + deployment_hash: types::HexHash, + r: &mut u64, + w: &mut u64, +) { if deployment_hash == types::HexHash::default() { Contracts::::remove(contract_id); (*w).saturating_inc(); @@ -693,9 +723,9 @@ pub fn clean_active_node_contracts() -> frame_support::weights::Weigh ActiveNodeContracts::::remove(node_id); w.saturating_inc(); } else { - contract_ids.retain(|contract_id| { + contract_ids.retain(|contract_id| { r.saturating_inc(); - Contracts::::get(contract_id).is_some() + Contracts::::get(contract_id).is_some() }); ActiveNodeContracts::::insert(node_id, contract_ids); w.saturating_inc(); @@ -921,4 +951,4 @@ pub fn clean_node_contract_resources() -> frame_support::weights::Wei ); T::DbWeight::get().reads_writes(r.saturating_add(2), w) -} \ No newline at end of file +} diff --git a/substrate-node/pallets/pallet-smart-contract/src/tests.rs b/substrate-node/pallets/pallet-smart-contract/src/tests.rs index 62460ab73..8fe7572e9 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/tests.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/tests.rs @@ -5,7 +5,7 @@ use crate::{ use frame_support::{ assert_noop, assert_ok, dispatch::Pays, - traits::{LockableCurrency, WithdrawReasons}, + traits::{BalanceStatus, Currency, LockableCurrency, ReservableCurrency, WithdrawReasons}, BoundedVec, }; use frame_system::{EventRecord, Phase, RawOrigin}; @@ -16,7 +16,10 @@ use pallet_tfgrid::{ }; use sp_core::{bounded_vec, H256}; use sp_runtime::{assert_eq_error_rate, traits::SaturatedConversion, Perbill, Percent}; -use sp_std::convert::{TryFrom, TryInto}; +use sp_std::{ + cmp::max, + convert::{TryFrom, TryInto}, +}; use substrate_fixed::types::U64F64; use tfchain_support::{ constants::time::{SECS_PER_BLOCK, SECS_PER_HOUR}, @@ -972,12 +975,14 @@ fn test_node_contract_billing_details() { ext.execute_with(|| { run_to_block(1, None); prepare_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); let twin = TfgridModule::twins(2).unwrap(); - let initial_twin_balance = Balances::free_balance(&twin.account_id); + let initial_twin_balance = Balances::total_balance(&twin.account_id); assert_ok!(SmartContractModule::create_node_contract( RuntimeOrigin::signed(bob()), @@ -999,10 +1004,10 @@ fn test_node_contract_billing_details() { vec![contract_id] ); - let initial_total_issuance = Balances::total_issuance(); - // advance 25 cycles - for i in 0..25 { - let block_number = 11 + i * 10; + let initial_farmer_balance = Balances::free_balance(alice()); + // advance 24 cycles to reach reward distribution block + for i in 1..=DistributionFrequency::get() as u64 { + let block_number = 1 + i * BillingFrequency::get(); pool_state.write().should_call_bill_contract( contract_id, Ok(Pays::Yes.into()), @@ -1011,47 +1016,71 @@ fn test_node_contract_billing_details() { run_to_block(block_number, Some(&mut pool_state)); } - let free_balance = Balances::free_balance(&twin.account_id); - let total_amount_billed = initial_twin_balance - free_balance; - info!("locked balance {:?}", total_amount_billed); + let twin_balance = Balances::total_balance(&twin.account_id); + let total_amount_billed = initial_twin_balance - twin_balance; + info!("current balance {:?}", twin_balance); + info!("total amount billed {:?}", total_amount_billed); - info!("total locked balance {:?}", total_amount_billed); + validate_distribution_rewards(initial_farmer_balance, total_amount_billed, 0, true, false); - let staking_pool_account_balance = Balances::free_balance(&get_staking_pool_account()); - info!( - "staking pool account balance, {:?}", - staking_pool_account_balance - ); + // amount unbilled should have been reset after a transfer between contract owner and farmer + let contract_billing_info = + SmartContractModule::contract_billing_information_by_id(contract_id); + assert_eq!(contract_billing_info.amount_unbilled, 0); + }); +} - // 5% is sent to the staking pool account - assert_eq!( - staking_pool_account_balance, - Perbill::from_percent(5) * total_amount_billed - ); +#[test] +fn test_node_contract_billing_works_for_non_existing_accounts() { + let (mut ext, mut pool_state) = new_test_ext_with_pool_state(0); + ext.execute_with(|| { + run_to_block(1, None); + prepare_farm_and_node(); + let node_id = 1; - // 10% is sent to the foundation account - let pricing_policy = TfgridModule::pricing_policies(1).unwrap(); - let foundation_account_balance = Balances::free_balance(&pricing_policy.foundation_account); - assert_eq!( - foundation_account_balance, - Perbill::from_percent(10) * total_amount_billed - ); + TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); + + let twin = TfgridModule::twins(2).unwrap(); + let initial_twin_balance = Balances::total_balance(&twin.account_id); + + assert_ok!(SmartContractModule::create_node_contract( + RuntimeOrigin::signed(bob()), + node_id, + generate_deployment_hash(), + get_deployment_data(), + 1, + None + )); + let contract_id = 1; - // 50% is sent to the sales account - let sales_account_balance = Balances::free_balance(&pricing_policy.certified_sales_account); + push_contract_resources_used(contract_id); + push_nru_report_for_contract(contract_id, 10); + + // Ensure contract_id is stored at right billing loop index + let index = SmartContractModule::get_billing_loop_index_from_contract_id(contract_id); assert_eq!( - sales_account_balance, - Perbill::from_percent(50) * total_amount_billed + SmartContractModule::contract_to_bill_at_block(index), + vec![contract_id] ); - let total_issuance = Balances::total_issuance(); - // total issueance is now previous total - amount burned from contract billed (35%) - let burned_amount = Perbill::from_percent(35) * total_amount_billed; - assert_eq_error_rate!( - total_issuance, - initial_total_issuance - burned_amount as u64, - 1 - ); + let initial_farmer_balance = Balances::free_balance(alice()); + // advance 24 cycles to reach reward distribution block + for i in 1..=DistributionFrequency::get() as u64 { + let block_number = 1 + i * BillingFrequency::get(); + pool_state.write().should_call_bill_contract( + contract_id, + Ok(Pays::Yes.into()), + block_number, + ); + run_to_block(block_number, Some(&mut pool_state)); + } + + let twin_balance = Balances::total_balance(&twin.account_id); + let total_amount_billed = initial_twin_balance - twin_balance; + info!("current balance {:?}", twin_balance); + info!("total amount billed {:?}", total_amount_billed); + + validate_distribution_rewards(initial_farmer_balance, total_amount_billed, 0, false, false); // amount unbilled should have been reset after a transfer between contract owner and farmer let contract_billing_info = @@ -1060,21 +1089,68 @@ fn test_node_contract_billing_details() { }); } +#[test] +fn test_billing_node_contract_in_graceperiod_should_reset_unbilled_network_consumption_after_added_to_overdraft( +) { + let (mut ext, mut pool_state) = new_test_ext_with_pool_state(0); + ext.execute_with(|| { + run_to_block(1, None); + prepare_farm_and_node(); + let node_id = 1; + + TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); + + assert_ok!(SmartContractModule::create_node_contract( + RuntimeOrigin::signed(charlie()), + node_id, + generate_deployment_hash(), + get_deployment_data(), + 0, + None + )); + let contract_id = 1; + + push_contract_resources_used(contract_id); + push_nru_report_for_contract(contract_id, 10); + + // cycle 1 + // user does not have enough funds to pay + pool_state + .write() + .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 11); + run_to_block(11, Some(&mut pool_state)); + + let c1 = SmartContractModule::contracts(1).unwrap(); + assert_eq!(c1.state, types::ContractState::GracePeriod(11)); + + // contract payment should be overdrawn + let contract_payment_state = SmartContractModule::contract_payment_state(contract_id).unwrap(); + assert_ne!(contract_payment_state.get_overdraft(), 0); + + // amount unbilled should have been reset after adding the amount to the contract overdraft + let contract_billing_info = + SmartContractModule::contract_billing_information_by_id(contract_id); + assert_eq!(contract_billing_info.amount_unbilled, 0); + }); +} + #[test] fn test_node_contract_billing_details_with_solution_provider() { let (mut ext, mut pool_state) = new_test_ext_with_pool_state(0); ext.execute_with(|| { run_to_block(1, None); prepare_farm_and_node(); + let node_id = 1; prepare_solution_provider(dave()); + activate_billing_accounts(); TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); let twin = TfgridModule::twins(2).unwrap(); let initial_twin_balance = Balances::free_balance(&twin.account_id); - let initial_total_issuance = Balances::total_issuance(); + let initial_farmer_balance = Balances::free_balance(alice()); assert_ok!(SmartContractModule::create_node_contract( RuntimeOrigin::signed(bob()), @@ -1096,9 +1172,9 @@ fn test_node_contract_billing_details_with_solution_provider() { vec![contract_id] ); - // advance 25 cycles - for i in 0..25 { - let block_number = 11 + i * 10; + // advance 24 cycles to reach reward distribution block + for i in 1..=DistributionFrequency::get() as u64 { + let block_number = 1 + i * BillingFrequency::get(); pool_state.write().should_call_bill_contract( contract_id, Ok(Pays::Yes.into()), @@ -1107,10 +1183,10 @@ fn test_node_contract_billing_details_with_solution_provider() { run_to_block(block_number, Some(&mut pool_state)); } - let free_balance = Balances::free_balance(&twin.account_id); - let total_amount_billed = initial_twin_balance - free_balance; + let total_balance = Balances::total_balance(&twin.account_id); + let total_amount_billed = initial_twin_balance - total_balance; - validate_distribution_rewards(initial_total_issuance, total_amount_billed, true); + validate_distribution_rewards(initial_farmer_balance, total_amount_billed, 0, true, false); // amount unbilled should have been reset after a transfer between contract owner and farmer let contract_billing_info = @@ -1213,12 +1289,10 @@ fn test_node_contract_billing_cycles() { check_report_cost(1, amount_due_1, 11, discount_received); let twin = TfgridModule::twins(twin_id).unwrap(); - let usable_balance = Balances::usable_balance(&twin.account_id); - let free_balance = Balances::free_balance(&twin.account_id); + let reserved_balance = Balances::reserved_balance(&twin.account_id); - let locked_balance = free_balance - usable_balance; assert_eq!( - locked_balance.saturated_into::(), + reserved_balance.saturated_into::(), amount_due_1 as u128 ); @@ -1237,12 +1311,11 @@ fn test_node_contract_billing_cycles() { check_report_cost(1, amount_due_3, 31, discount_received); let twin = TfgridModule::twins(twin_id).unwrap(); - let usable_balance = Balances::usable_balance(&twin.account_id); - let free_balance = Balances::free_balance(&twin.account_id); - let locked_balance = free_balance - usable_balance; + let reserved_balance = Balances::reserved_balance(&twin.account_id); + assert_eq!( - locked_balance.saturated_into::(), + reserved_balance.saturated_into::(), amount_due_1 as u128 + amount_due_2 as u128 + amount_due_3 as u128 ); }); @@ -1316,12 +1389,9 @@ fn test_node_multiple_contract_billing_cycles() { ); let twin = TfgridModule::twins(twin_id).unwrap(); - let usable_balance = Balances::usable_balance(&twin.account_id); - let free_balance = Balances::free_balance(&twin.account_id); - - let locked_balance = free_balance - usable_balance; + let reserved_balance = Balances::reserved_balance(&twin.account_id); assert_eq!( - locked_balance.saturated_into::(), + reserved_balance.saturated_into::(), amount_due_contract_1 as u128 + amount_due_contract_2 as u128 ); }); @@ -1333,6 +1403,8 @@ fn test_node_contract_billing_cycles_delete_node_cancels_contract() { ext.execute_with(|| { run_to_block(1, None); prepare_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); @@ -1348,8 +1420,8 @@ fn test_node_contract_billing_cycles_delete_node_cancels_contract() { let contract_id = 1; let twin_id = 2; - for i in 0..5 { - let block_number = 11 + i * 10; + for i in 1..=5 { + let block_number = 1 + i * BillingFrequency::get(); pool_state.write().should_call_bill_contract( contract_id, Ok(Pays::Yes.into()), @@ -1403,6 +1475,7 @@ fn test_node_contract_billing_cycles_delete_node_cancels_contract() { vec![].try_into().unwrap(); ips.try_push(public_ip).unwrap(); + log::debug!("events : {:?}", our_events); assert_eq!( our_events.contains(&record(MockEvent::SmartContractModule( SmartContractEvent::::IPsFreed { @@ -1446,8 +1519,8 @@ fn test_node_contract_only_public_ip_billing_cycles() { let contract_id = 1; let twin_id = 2; - for i in 0..5 { - let block_number = 11 + i * 10; + for i in 1..=5 { + let block_number = 1 + i * BillingFrequency::get(); pool_state.write().should_call_bill_contract( contract_id, Ok(Pays::Yes.into()), @@ -1484,6 +1557,8 @@ fn test_node_contract_billing_cycles_cancel_contract_during_cycle_works() { ext.execute_with(|| { run_to_block(1, None); prepare_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); @@ -1500,8 +1575,8 @@ fn test_node_contract_billing_cycles_cancel_contract_during_cycle_works() { let twin_id = 2; // 2 cycles for billing - for i in 0..2 { - let block_number = 11 + i * 10; + for i in 1..=2 { + let block_number = 1 + i * BillingFrequency::get(); pool_state.write().should_call_bill_contract( contract_id, Ok(Pays::Yes.into()), @@ -1542,6 +1617,8 @@ fn test_node_contract_billing_cycles_cancel_contract_during_cycle_without_balanc ext.execute_with(|| { run_to_block(1, None); prepare_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); @@ -1549,7 +1626,7 @@ fn test_node_contract_billing_cycles_cancel_contract_during_cycle_without_balanc let twin = TfgridModule::twins(2).unwrap(); let initial_twin_balance = Balances::free_balance(&twin.account_id); info!("initial twin balance: {:?}", initial_twin_balance); - let initial_total_issuance = Balances::total_issuance(); + let initial_farmer_balance = Balances::free_balance(alice()); assert_ok!(SmartContractModule::create_node_contract( RuntimeOrigin::signed(bob()), @@ -1580,18 +1657,24 @@ fn test_node_contract_billing_cycles_cancel_contract_during_cycle_without_balanc // Run halfway ish next cycle and cancel run_to_block(25, Some(&mut pool_state)); - let usable_balance = Balances::usable_balance(&twin.account_id); - let total_amount_billed = initial_twin_balance - usable_balance; + let free_balance = Balances::free_balance(&twin.account_id); + info!("free balance: {:?}", free_balance); + let total_amount_billed = initial_twin_balance - free_balance; + info!("total amount billed: {:?}", total_amount_billed); - let extrinsic_fee = 10000; + let leave = 1000; Balances::transfer( RuntimeOrigin::signed(bob()), - alice(), - initial_twin_balance - total_amount_billed - extrinsic_fee, + charlie(), + initial_twin_balance - total_amount_billed - leave, ) .unwrap(); - let usable_balance_before_canceling = Balances::usable_balance(&twin.account_id); + let usable_balance_before_canceling = Balances::free_balance(&twin.account_id); + info!( + "usable balance before canceling: {:?}", + usable_balance_before_canceling + ); assert_ne!(usable_balance_before_canceling, 0); assert_ok!(SmartContractModule::cancel_contract( @@ -1600,14 +1683,27 @@ fn test_node_contract_billing_cycles_cancel_contract_during_cycle_without_balanc )); // After canceling contract, and not being able to pay for the remainder of the cycle - // where the cancel was excecuted, the remaining balance should still be the same - let usable_balance_after_canceling = Balances::usable_balance(&twin.account_id); - assert_eq!( - usable_balance_after_canceling, - usable_balance_before_canceling + // where the cancel was excecuted, should deduct as much as possible from the user + let usable_balance_after_canceling = Balances::free_balance(&twin.account_id); + info!( + "usable balance after canceling: {:?}", + usable_balance_after_canceling + ); + info!( + "total amount billed: {:?}", + total_amount_billed + + (usable_balance_before_canceling - usable_balance_after_canceling) ); + assert_eq!(usable_balance_after_canceling, EXISTENTIAL_DEPOSIT); - validate_distribution_rewards(initial_total_issuance, total_amount_billed, false); + validate_distribution_rewards( + initial_farmer_balance, + total_amount_billed + + (usable_balance_before_canceling - usable_balance_after_canceling), + 0, + true, + false, + ); }); } @@ -1684,8 +1780,8 @@ fn test_restore_node_contract_in_grace_works() { )); let contract_id = 1; - for i in 0..6 { - let block_number = 11 + i * 10; + for i in 1..=6 { + let block_number = 1 + i * BillingFrequency::get(); pool_state.write().should_call_bill_contract( contract_id, Ok(Pays::Yes.into()), @@ -1735,12 +1831,14 @@ fn test_node_contract_grace_period_cancels_contract_when_grace_period_ends_works ext.execute_with(|| { run_to_block(1, None); prepare_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); let twin = TfgridModule::twins(3).unwrap(); - let initial_total_issuance = Balances::total_issuance(); + let initial_farmer_balance = Balances::free_balance(alice()); let initial_twin_balance = Balances::free_balance(&twin.account_id); assert_ok!(SmartContractModule::create_node_contract( @@ -1785,24 +1883,33 @@ fn test_node_contract_grace_period_cancels_contract_when_grace_period_ends_works ); // grace period stops after 100 blocknumbers, so after 121 - for i in 1..11 { - let block_number = 21 + i * 10; + for i in 1..=10 { + let block_number = 21 + i * BillingFrequency::get(); pool_state.write().should_call_bill_contract( contract_id, Ok(Pays::Yes.into()), block_number, ); + run_to_block(block_number, Some(&mut pool_state)); } - for i in 1..11 { - run_to_block(21 + i * 10, Some(&mut pool_state)); - } + // expect ContractGracePeriodElapsed event + let our_events = System::events(); + assert_eq!( + our_events.contains(&record(MockEvent::SmartContractModule( + SmartContractEvent::::ContractGracePeriodElapsed { + contract_id, + grace_period: GracePeriod::get(), + } + ))), + true + ); // The user's total free balance should be distributed let free_balance = Balances::free_balance(&twin.account_id); let total_amount_billed = initial_twin_balance - free_balance; - validate_distribution_rewards(initial_total_issuance, total_amount_billed, false); + validate_distribution_rewards(initial_farmer_balance, total_amount_billed, 0, true, false); let c1 = SmartContractModule::contracts(contract_id); assert_eq!(c1, None); @@ -1845,7 +1952,7 @@ fn test_name_contract_billing() { let balance = Balances::free_balance(&twin.account_id); let second_elapsed = BillingFrequency::get() * SECS_PER_BLOCK; let (contract_cost, discount_level) = contract - .calculate_contract_cost_tft(balance, second_elapsed) + .calculate_contract_cost_tft(balance, second_elapsed, None) .unwrap(); // the contractbill event should look like: @@ -1866,6 +1973,18 @@ fn test_name_contract_billing() { contract_bill_event ))) ); + // advance 23 more cycles to reach reward distribution block + for i in 1..=23 { + let block_number = 11 + i * BillingFrequency::get(); + pool_state.write().should_call_bill_contract( + contract_id, + Ok(Pays::Yes.into()), + block_number, + ); + run_to_block(block_number, Some(&mut pool_state)); + } + let total_contract_cost = contract_cost * 24; + validate_distribution_rewards(0, total_contract_cost, 0, false, true) }); } @@ -1962,12 +2081,75 @@ fn test_rent_contract_billing() { }); } +#[test] +fn test_rent_contract_on_standby_node_rent_waived_and_cancel_works() { + let (mut ext, mut pool_state) = new_test_ext_with_pool_state(0); + ext.execute_with(|| { + run_to_block(1, None); + prepare_dedicated_farm_and_node(); + let node_id = 1; + + // switch node to standby at block 1 + assert_ok!(TfgridModule::change_power_state( + RuntimeOrigin::signed(alice()), + tfchain_support::types::Power::Down + )); + + TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); + + assert_ok!(SmartContractModule::create_rent_contract( + RuntimeOrigin::signed(bob()), + node_id, + None + )); + let contract_id = 1; + + let contract = SmartContractModule::contracts(contract_id).unwrap(); + let rent_contract = types::RentContract { node_id }; + assert_eq!( + contract.contract_type, + types::ContractData::RentContract(rent_contract) + ); + + // go to end of cycle 1 [1-11] and expect a call to bill_contract() + pool_state + .write() + .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 11); + run_to_block(11, Some(&mut pool_state)); + + // expect RentWaived event + let our_events = System::events(); + assert_eq!( + our_events.contains(&record(MockEvent::SmartContractModule( + SmartContractEvent::::RentWaived { contract_id } + ))), + true + ); + // cancel contract + assert_ok!(SmartContractModule::cancel_contract( + RuntimeOrigin::signed(bob()), + contract_id + )); + let our_events = System::events(); + + // expect ContractCanceled event + assert_eq!( + our_events.contains(&record(MockEvent::SmartContractModule( + SmartContractEvent::::RentContractCanceled { contract_id } + ))), + true + ); + }); +} + #[test] fn test_rent_contract_billing_cancel_should_bill_reserved_balance() { let (mut ext, mut pool_state) = new_test_ext_with_pool_state(0); ext.execute_with(|| { run_to_block(1, None); prepare_dedicated_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); @@ -1991,25 +2173,25 @@ fn test_rent_contract_billing_cancel_should_bill_reserved_balance() { .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 11); run_to_block(11, Some(&mut pool_state)); - let (amount_due_as_u128, discount_received) = calculate_tft_cost(contract_id, 2, 10); - assert_ne!(amount_due_as_u128, 0); + let (amount_due_1_as_u128, discount_received) = calculate_tft_cost(contract_id, 2, 10); + assert_ne!(amount_due_1_as_u128, 0); check_report_cost( contract_id, - amount_due_as_u128, + amount_due_1_as_u128, 11, discount_received.clone(), ); let twin = TfgridModule::twins(2).unwrap(); - let usable_balance = Balances::usable_balance(&twin.account_id); + let total_balance = Balances::total_balance(&twin.account_id); let free_balance = Balances::free_balance(&twin.account_id); - assert_ne!(usable_balance, free_balance); + assert_ne!(total_balance, free_balance); run_to_block(13, Some(&mut pool_state)); // cancel contract // it will bill before removing the contract and it should bill all // reserved balance - let (amount_due_as_u128, discount_received) = calculate_tft_cost(contract_id, 2, 2); + let (amount_due_2_as_u128, discount_received) = calculate_tft_cost(contract_id, 2, 2); assert_ok!(SmartContractModule::cancel_contract( RuntimeOrigin::signed(bob()), contract_id @@ -2020,13 +2202,133 @@ fn test_rent_contract_billing_cancel_should_bill_reserved_balance() { assert_ne!(usable_balance, 0); Balances::transfer(RuntimeOrigin::signed(bob()), alice(), usable_balance).unwrap(); - // Last amount due is the same as the first one - assert_ne!(amount_due_as_u128, 0); - check_report_cost(contract_id, amount_due_as_u128, 13, discount_received); + // Last amount due is not the same as the first one + assert_ne!(amount_due_1_as_u128, amount_due_2_as_u128); + check_report_cost(contract_id, amount_due_2_as_u128, 13, discount_received); - let usable_balance = Balances::usable_balance(&twin.account_id); + let total_balance = Balances::total_balance(&twin.account_id); let free_balance = Balances::free_balance(&twin.account_id); - assert_eq!(usable_balance, free_balance); + assert_eq!(total_balance, free_balance); + }); +} + +#[test] +fn test_rent_contract_overdrawn_and_partial_bill() { + let (mut ext, mut pool_state) = new_test_ext_with_pool_state(0); + ext.execute_with(|| { + run_to_block(1, None); + prepare_dedicated_farm_and_node(); + activate_billing_accounts(); + + let node_id = 1; + + TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); + + assert_ok!(SmartContractModule::create_rent_contract( + RuntimeOrigin::signed(charlie()), + node_id, + None + )); + let contract_id = 1; + + let twin = TfgridModule::twins(3).unwrap(); + let initial_reservable_balance = + Balances::usable_balance(&twin.account_id) - EXISTENTIAL_DEPOSIT; + + let contract = SmartContractModule::contracts(contract_id).unwrap(); + let rent_contract = types::RentContract { node_id }; + assert_eq!( + contract.contract_type, + types::ContractData::RentContract(rent_contract) + ); + + pool_state + .write() + .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 11); + run_to_block(11, Some(&mut pool_state)); + + let (amount_due_per_cycle, _) = calculate_tft_cost(contract_id, 2, 10); + assert_ne!(amount_due_per_cycle, 0); + + // expect contractPaymentOverdarwn event with partially billed amount + let our_events = System::events(); + assert_eq!( + our_events.contains(&record(MockEvent::SmartContractModule( + SmartContractEvent::::ContractPaymentOverdrawn { + contract_id: contract_id, + timestamp: get_timestamp_in_seconds_for_block(11), + partially_billed_amount: initial_reservable_balance, + overdraft: amount_due_per_cycle - initial_reservable_balance + } + ))), + true + ); + + let contract_payment_state = SmartContractModule::contract_payment_state(contract_id).unwrap(); + assert_eq!( + contract_payment_state.get_reserve(), + initial_reservable_balance + ); + assert_eq!( + contract_payment_state.get_overdraft(), + amount_due_per_cycle - initial_reservable_balance + ); + + let free_balance = Balances::free_balance(&twin.account_id); + assert_eq!(free_balance, EXISTENTIAL_DEPOSIT); + + pool_state + .write() + .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 21); + run_to_block(21, Some(&mut pool_state)); + + // expect contractPaymentOverdarwn event with no partially billed amount + let our_events = System::events(); + assert_eq!( + our_events.contains(&record(MockEvent::SmartContractModule( + SmartContractEvent::::ContractPaymentOverdrawn { + contract_id: contract_id, + timestamp: get_timestamp_in_seconds_for_block(21), + partially_billed_amount: 0, + overdraft: amount_due_per_cycle + } + ))), + true + ); + let contract_payment_state = SmartContractModule::contract_payment_state(contract_id).unwrap(); + assert_eq!( + contract_payment_state.get_reserve(), + initial_reservable_balance + ); + assert_eq!( + contract_payment_state.get_overdraft(), + amount_due_per_cycle * 2 - initial_reservable_balance + ); + let should_have_next_cycle = amount_due_per_cycle * 3 - initial_reservable_balance; + + // transfer some balance to the owner of the contract to trigger the grace period to stop + Balances::transfer( + RuntimeOrigin::signed(bob()), + charlie(), + should_have_next_cycle, + ) + .unwrap(); + + pool_state + .write() + .should_call_bill_contract(contract_id, Ok(Pays::Yes.into()), 31); + run_to_block(31, Some(&mut pool_state)); + + let contract_payment_state = SmartContractModule::contract_payment_state(contract_id).unwrap(); + assert_eq!( + contract_payment_state.get_reserve(), + amount_due_per_cycle * 3 + ); + assert_eq!(contract_payment_state.get_overdraft(), 0); + + // contract state should be Created + let c1 = SmartContractModule::contracts(contract_id).unwrap(); + assert_eq!(c1.state, types::ContractState::Created); }); } @@ -2036,6 +2338,8 @@ fn test_rent_contract_canceled_mid_cycle_should_bill_for_remainder() { ext.execute_with(|| { run_to_block(1, None); prepare_dedicated_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); @@ -2055,11 +2359,9 @@ fn test_rent_contract_canceled_mid_cycle_should_bill_for_remainder() { ); let twin = TfgridModule::twins(2).unwrap(); - let usable_balance = Balances::usable_balance(&twin.account_id); - let free_balance = Balances::free_balance(&twin.account_id); - let locked_balance = free_balance - usable_balance; - info!("locked balance: {:?}", locked_balance); + let reserved_balance = Balances::reserved_balance(&twin.account_id); + info!("reserved balance: {:?}", reserved_balance); run_to_block(8, Some(&mut pool_state)); // Calculate the cost for 7 blocks of runtime (created a block 1, canceled at block 8) @@ -2077,11 +2379,10 @@ fn test_rent_contract_canceled_mid_cycle_should_bill_for_remainder() { discount_received.clone(), ); - // Twin should have no more locked balance + // Twin should have no more reserved balance let twin = TfgridModule::twins(2).unwrap(); - let usable_balance = Balances::usable_balance(&twin.account_id); - let free_balance = Balances::free_balance(&twin.account_id); - assert_eq!(usable_balance, free_balance); + let reserved_balance = Balances::reserved_balance(&twin.account_id); + assert_eq!(reserved_balance, 0); }); } @@ -2134,9 +2435,11 @@ fn test_create_rent_contract_and_node_contract_excludes_node_contract_from_billi // Event 3: Rent contract created // Event 4: Node Contract created // Event 5: Updated resources contract - // Event 6: Balances locked + // Event 6: Balances Reserved // Event 7: Contract Billed // => no Node Contract billed event + log::debug!("our_events: {:?}", our_events); + assert_eq!(our_events.len(), 7); }); } @@ -2146,6 +2449,8 @@ fn test_rent_contract_canceled_due_to_out_of_funds_should_cancel_node_contracts_ let (mut ext, mut pool_state) = new_test_ext_with_pool_state(0); ext.execute_with(|| { prepare_dedicated_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; run_to_block(1, None); @@ -2158,7 +2463,7 @@ fn test_rent_contract_canceled_due_to_out_of_funds_should_cancel_node_contracts_ )); let rent_contract_id = 1; - run_to_block(2, None); + run_to_block(2, Some(&mut pool_state)); assert_ok!(SmartContractModule::create_node_contract( RuntimeOrigin::signed(charlie()), @@ -2172,8 +2477,8 @@ fn test_rent_contract_canceled_due_to_out_of_funds_should_cancel_node_contracts_ push_contract_resources_used(node_contract_id); // run 10 cycles - for i in 0..10 { - let block_number = 11 + i * 10; + for i in 1..=10 { + let block_number = 1 + i * BillingFrequency::get(); pool_state.write().should_call_bill_contract( rent_contract_id, Ok(Pays::Yes.into()), @@ -2198,7 +2503,7 @@ fn test_rent_contract_canceled_due_to_out_of_funds_should_cancel_node_contracts_ run_to_block(end_grace_block_number, Some(&mut pool_state)); let our_events = System::events(); - assert_eq!(our_events.len(), 21); + assert_eq!(our_events.len(), 26); for e in our_events.clone() { log::info!("event: {:?}", e); @@ -2228,7 +2533,7 @@ fn test_rent_contract_canceled_due_to_out_of_funds_should_cancel_node_contracts_ ); assert_eq!( - our_events[19], + our_events[24], record(MockEvent::SmartContractModule(SmartContractEvent::< TestRuntime, >::NodeContractCanceled { @@ -2238,7 +2543,7 @@ fn test_rent_contract_canceled_due_to_out_of_funds_should_cancel_node_contracts_ })) ); assert_eq!( - our_events[20], + our_events[25], record(MockEvent::SmartContractModule(SmartContractEvent::< TestRuntime, >::RentContractCanceled { @@ -2264,7 +2569,7 @@ fn test_create_rent_contract_and_node_contract_with_ip_billing_works() { )); let rent_contract_id = 1; - run_to_block(2, None); + run_to_block(2, Some(&mut pool_state)); assert_ok!(SmartContractModule::create_node_contract( RuntimeOrigin::signed(bob()), @@ -2456,6 +2761,8 @@ fn test_restore_rent_contract_and_node_contracts_in_grace_works() { assert_eq!(c1.state, types::ContractState::GracePeriod(11)); let our_events = System::events(); + log::debug!("Events: {:?}", our_events); + assert_eq!( our_events[5], record(MockEvent::SmartContractModule(SmartContractEvent::< @@ -2522,9 +2829,10 @@ fn test_restore_rent_contract_and_node_contracts_in_grace_works() { assert_eq!(c1.state, types::ContractState::Created); let our_events = System::events(); + log::debug!("Events: {:?}", our_events); assert_eq!( - our_events[8], + our_events[12], record(MockEvent::SmartContractModule(SmartContractEvent::< TestRuntime, >::ContractGracePeriodEnded { @@ -2534,7 +2842,7 @@ fn test_restore_rent_contract_and_node_contracts_in_grace_works() { })) ); assert_eq!( - our_events[9], + our_events[13], record(MockEvent::SmartContractModule(SmartContractEvent::< TestRuntime, >::ContractGracePeriodEnded { @@ -2552,6 +2860,8 @@ fn test_rent_contract_grace_period_cancels_contract_when_grace_period_ends_works ext.execute_with(|| { run_to_block(1, None); prepare_dedicated_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); @@ -2585,9 +2895,9 @@ fn test_rent_contract_grace_period_cancels_contract_when_grace_period_ends_works true ); - // run 9 more cycles - for i in 0..10 { - let block_number = 21 + i * 10; + // advance 10 more cycles since the GracePeriod is 100 blocks and the BillingFrequency(cycle) is 10 blocks + for i in 1..=10 { + let block_number = 11 + i * BillingFrequency::get(); pool_state.write().should_call_bill_contract( contract_id, Ok(Pays::Yes.into()), @@ -2616,6 +2926,8 @@ fn test_rent_contract_and_node_contract_canceled_when_node_is_deleted_works() { ext.execute_with(|| { run_to_block(1, None); prepare_dedicated_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); @@ -3508,53 +3820,163 @@ fn test_cu_calculation() { } #[test] -fn test_lock() { +fn test_reserve_and_unreserve() { new_test_ext().execute_with(|| { - let usable_balance = Balances::usable_balance(&bob()); - let free_balance = Balances::free_balance(&bob()); + let total_balance = Balances::total_balance(&bob()); + let initial_free_balance = Balances::free_balance(&bob()); + let initial_reserved_balance = Balances::reserved_balance(&bob()); + log::debug!("Total balance: {}", total_balance); + log::debug!("Initial free balance: {}", initial_free_balance); + log::debug!("Initial reserved balance: {}", initial_reserved_balance); - // should be equal since no activity and no locks - assert_eq!(usable_balance, free_balance); + // should be equal since no activity and no reserves + assert_eq!(initial_reserved_balance, 0); - let id: u64 = 1; - // Try to lock less than EXISTENTIAL_DEPOSIT should fail - Balances::set_lock(id.to_be_bytes(), &bob(), 100, WithdrawReasons::all()); + // Try to reserve some amount should succeed + let res = Balances::reserve(&bob(), 100); - // usable balance should now return free balance - EXISTENTIAL_DEPOSIT cause there was some activity - let usable_balance = Balances::usable_balance(&bob()); + assert_eq!(res.is_ok(), true); + + // free balance should be decreased by 100 let free_balance = Balances::free_balance(&bob()); - assert_eq!(usable_balance, free_balance - EXISTENTIAL_DEPOSIT); + let expected_free_balance = initial_free_balance - 100; + assert_eq!(free_balance, expected_free_balance); + + // reserving all free balance shouldn't succeed + let to_reserve = free_balance; + assert_eq!(Balances::can_reserve(&bob(), to_reserve), false); + // Try to reserve all free balance + let res = Balances::reserve(&bob(), to_reserve); + assert_eq!(res.is_err(), true); + // balance still the same + assert_eq!(free_balance, expected_free_balance); - // ----- INITIAL ------ // - // Try to lock more than EXISTENTIAL_DEPOSIT should succeed - let to_lock = 100 + EXISTENTIAL_DEPOSIT; + // Try to reserve all reservable balance should succeed + let to_reserve = crate::pallet::Pallet::::get_usable_balance(&bob()); - Balances::set_lock(id.to_be_bytes(), &bob(), to_lock, WithdrawReasons::all()); + let res = Balances::reserve(&bob(), to_reserve); + assert_eq!(res.is_ok(), true); - // usable balance should now be free_balance - to_lock cause there was some activity - let usable_balance = Balances::usable_balance(&bob()); let free_balance = Balances::free_balance(&bob()); - assert_eq!(usable_balance, free_balance - to_lock); + let expected_reserved_balance = initial_free_balance - (100 + to_reserve); + assert_eq!(free_balance, expected_reserved_balance); - // ----- UPDATE ------ // - // updating a lock should succeed - let to_lock = 500 + EXISTENTIAL_DEPOSIT; + let reserved_balance = Balances::reserved_balance(&bob()); + assert_eq!(reserved_balance, initial_free_balance - EXISTENTIAL_DEPOSIT); - Balances::set_lock(id.to_be_bytes(), &bob(), to_lock, WithdrawReasons::all()); + // reservable balance should be 0 + assert_eq!( + crate::pallet::Pallet::::get_usable_balance(&bob()), + 0 + ); - // usable balance should now be free_balance - to_lock cause there was some activity - let usable_balance = Balances::usable_balance(&bob()); - let free_balance = Balances::free_balance(&bob()); - assert_eq!(usable_balance, free_balance - to_lock); + // unreserve should succeed without a remainder + let remainder = Balances::unreserve(&bob(), reserved_balance); + assert_eq!(remainder, 0); + // user balance now should be the same as initial + assert_eq!(Balances::free_balance(&bob()), initial_free_balance) + }) +} - // ----- UNLOCK ------ // - // Unlock should work - Balances::remove_lock(id.to_be_bytes(), &bob()); +#[test] +fn test_reserve_while_lock_exists() { + new_test_ext().execute_with(|| { + let total_balance = Balances::total_balance(&bob()); + let initial_free_balance = Balances::free_balance(&bob()); + let initial_reserved_balance = Balances::reserved_balance(&bob()); + log::debug!("Total balance: {}", total_balance); + log::debug!("Initial free balance: {}", initial_free_balance); + log::debug!("Initial reserved balance: {}", initial_reserved_balance); + + // should be equal since no activity and no reserves + assert_eq!(initial_reserved_balance, 0); + // Try to lock and reserve some amount should succeed + let id: [u8; 8] = *b"my_lock1"; + let locked_amount = initial_free_balance - 200100; + let reserved_amount = 200000; + let reservable_before = crate::pallet::Pallet::::get_usable_balance(&bob()); + log::info!("Reservable before: {}", reservable_before); + Balances::set_lock(id, &bob(), locked_amount, WithdrawReasons::all()); + let _ = Balances::reserve(&bob(), reserved_amount); + let reservable_after = crate::pallet::Pallet::::get_usable_balance(&bob()); + log::info!("Reservable after: {}", reservable_after); + + if locked_amount <= EXISTENTIAL_DEPOSIT { + assert_eq!(reservable_after + reserved_amount, reservable_before); + } else { + assert_ne!(reservable_after, reservable_before); + assert_eq!(Balances::can_reserve(&bob(), reservable_before), false); + } - // usable balance should now be free_balance cause there are no locks - let usable_balance = Balances::usable_balance(&bob()); - let free_balance = Balances::free_balance(&bob()); - assert_eq!(usable_balance, free_balance); + assert_eq!(Balances::can_reserve(&bob(), reservable_after), true); + + assert_eq!( + reservable_after, + initial_free_balance + .saturating_sub(max(locked_amount, EXISTENTIAL_DEPOSIT) + reserved_amount) + ); + + // reserve all reservable balance should succeed + let res = Balances::reserve(&bob(), reservable_after); + assert_eq!(res.is_ok(), true); + + // transfer all reserved balance should succeed + let res = Balances::repatriate_reserved( + &bob(), + &alice(), + reservable_after + reserved_amount, + BalanceStatus::Free, + ); + assert_eq!(res.is_ok(), true); + match res { + Ok(remainder) => assert_eq!(remainder, 0), + Err(_) => assert!(false), + } + + // reserved balance should be 0 + assert_eq!(Balances::reserved_balance(&bob()), 0); + + // reservable balance should be 0 + assert_eq!( + crate::pallet::Pallet::::get_usable_balance(&bob()), + 0 + ); + // user balance now should be only the max of locked_amount and EXISTENTIAL_DEPOSIT + assert_eq!( + Balances::free_balance(&bob()), + max(locked_amount, EXISTENTIAL_DEPOSIT) + ); + }) +} + +#[test] +fn test_reserve_and_transfer_reserved() { + new_test_ext().execute_with(|| { + let total_balance = Balances::total_balance(&bob()); + let initial_free_balance = Balances::free_balance(&bob()); + let initial_reserved_balance = Balances::reserved_balance(&bob()); + log::debug!("Total balance: {}", total_balance); + log::debug!("Initial free balance: {}", initial_free_balance); + log::debug!("Initial reserved balance: {}", initial_reserved_balance); + + // Try to reserve all reservable balance should succeed + let to_reserve = crate::pallet::Pallet::::get_usable_balance(&bob()); + + let res = Balances::reserve(&bob(), to_reserve); + assert_eq!(res.is_ok(), true); + + let res = Balances::repatriate_reserved(&bob(), &alice(), to_reserve, BalanceStatus::Free); + assert_eq!(res.is_ok(), true); + match res { + Ok(remainder) => assert_eq!(remainder, 0), + Err(_) => assert!(false), + } + + // reserved balance should be 0 + assert_eq!(Balances::reserved_balance(&bob()), 0); + + // user balance now should be only the existential deposit + assert_eq!(Balances::free_balance(&bob()), EXISTENTIAL_DEPOSIT) }) } @@ -3891,6 +4313,8 @@ fn test_set_dedicated_node_extra_fee_and_create_rent_contract_billing_works() { let (mut ext, mut pool_state) = new_test_ext_with_pool_state(0); ext.execute_with(|| { prepare_farm_and_node(); + activate_billing_accounts(); + let node_id = 1; let start_block = 1; @@ -3898,7 +4322,7 @@ fn test_set_dedicated_node_extra_fee_and_create_rent_contract_billing_works() { TFTPriceModule::set_prices(RuntimeOrigin::signed(alice()), 50, 101).unwrap(); - let initial_total_issuance = Balances::total_issuance(); + let initial_farmer_balance = Balances::free_balance(alice()); // Get daves's twin let twin = TfgridModule::twins(4).unwrap(); let initial_twin_balance = Balances::free_balance(&twin.account_id); @@ -3948,7 +4372,10 @@ fn test_set_dedicated_node_extra_fee_and_create_rent_contract_billing_works() { Ok(Pays::Yes.into()), block_number, ); + log::debug!("i {} after pool block_number: {}", i, block_number); + run_to_block(block_number, Some(&mut pool_state)); + log::debug!("i {} after run block_number: {}", i, block_number); // check why aggregating seconds elapsed is giving different results let elapsed_time_in_secs = BillingFrequency::get() * SECS_PER_BLOCK; @@ -3956,14 +4383,13 @@ fn test_set_dedicated_node_extra_fee_and_create_rent_contract_billing_works() { // aggregate rent contract cost let free_balance = Balances::free_balance(&twin.account_id); let (contract_cost_tft, _) = rent_contract - .calculate_contract_cost_tft(free_balance, elapsed_time_in_secs) + .calculate_contract_cost_tft(free_balance, elapsed_time_in_secs, None) .unwrap(); rent_contract_cost_tft += contract_cost_tft; // aggregate extra fee cost - extra_fee_cost_tft += rent_contract - .calculate_extra_fee_cost_tft(node_id, elapsed_time_in_secs) - .unwrap(); + extra_fee_cost_tft += + rent_contract.calculate_extra_fee_cost_tft(node_id, elapsed_time_in_secs); } let then = SmartContractModule::get_current_timestamp_in_secs(); @@ -3991,7 +4417,13 @@ fn test_set_dedicated_node_extra_fee_and_create_rent_contract_billing_works() { rent_contract_cost_tft + extra_fee_cost_tft ); - validate_distribution_rewards(initial_total_issuance, rent_contract_cost_tft, false); + validate_distribution_rewards( + initial_farmer_balance, + rent_contract_cost_tft, + extra_fee_cost_tft, + true, + false, + ); }) } @@ -4026,7 +4458,7 @@ macro_rules! test_calculate_discount { amount_due, seconds_elapsed, balance.round().to_num::(), - NodeCertification::Diy, + None, ); assert_eq!( @@ -4057,11 +4489,13 @@ test_calculate_discount! { // ---------------------------- // fn validate_distribution_rewards( - initial_total_issuance: u64, - total_amount_billed: u64, - had_solution_provider: bool, + initial_farmer_balance: u64, + standard_fees_billed: u64, + extra_fees_billed: u64, + had_existential_deposit: bool, + is_name_contract: bool, ) { - info!("total amount billed {:?}", total_amount_billed); + info!("total amount billed {:?}", standard_fees_billed); let staking_pool_account_balance = Balances::free_balance(&get_staking_pool_account()); info!( @@ -4069,52 +4503,39 @@ fn validate_distribution_rewards( staking_pool_account_balance ); - // 5% is sent to the staking pool account - assert_eq_error_rate!( + // 10% is sent to the staking pool account + assert_eq!( staking_pool_account_balance, - Perbill::from_percent(5) * total_amount_billed, - 6 + (Perbill::from_percent(10) * standard_fees_billed) + + if had_existential_deposit { + EXISTENTIAL_DEPOSIT + } else { + 0 + } ); - - // 10% is sent to the foundation account + let foundation_percent = if is_name_contract { 90 } else { 40 }; + // 40% is sent to the foundation account let pricing_policy = TfgridModule::pricing_policies(1).unwrap(); let foundation_account_balance = Balances::free_balance(&pricing_policy.foundation_account); assert_eq!( foundation_account_balance, - Perbill::from_percent(10) * total_amount_billed + (Perbill::from_percent(foundation_percent) * standard_fees_billed) + + if had_existential_deposit { + EXISTENTIAL_DEPOSIT + } else { + 0 + } ); - - if had_solution_provider { - // 40% is sent to the sales account - let sales_account_balance = Balances::free_balance(&pricing_policy.certified_sales_account); - assert_eq!( - sales_account_balance, - Perbill::from_percent(40) * total_amount_billed - ); - - // 10% is sent to the solution provider - let solution_provider = SmartContractModule::solution_providers(1).unwrap(); - let solution_provider_1_balance = - Balances::free_balance(solution_provider.providers[0].who.clone()); - info!("solution provider b: {:?}", solution_provider_1_balance); - assert_ne!(solution_provider_1_balance, 0); - } else { - // 50% is sent to the sales account - let sales_account_balance = Balances::free_balance(&pricing_policy.certified_sales_account); - assert_eq!( - sales_account_balance, - Perbill::from_percent(50) * total_amount_billed + if !is_name_contract { + // get alice balance + let farmer_balance = Balances::free_balance(&alice()); + let farmer_amount = Perbill::from_percent(50) * standard_fees_billed; + assert_eq_error_rate!( + farmer_balance, + initial_farmer_balance + farmer_amount + extra_fees_billed, + 5 ); } - - let total_issuance = Balances::total_issuance(); - // total issueance is now previous total - amount burned from contract billed (35%) - let burned_amount = Perbill::from_percent(35) * total_amount_billed; - assert_eq_error_rate!( - total_issuance, - initial_total_issuance - burned_amount as u64, - 1 - ); } fn push_nru_report_for_contract(contract_id: u64, block_number: u64) { @@ -4191,8 +4612,9 @@ fn calculate_tft_cost(contract_id: u64, twin_id: u32, blocks: u64) -> (u64, type let twin = TfgridModule::twins(twin_id).unwrap(); let b = Balances::free_balance(&twin.account_id); let contract = SmartContractModule::contracts(contract_id).unwrap(); - let (amount_due, discount_received) = - contract.calculate_contract_cost_tft(b, blocks * 6).unwrap(); + let (amount_due, discount_received) = contract + .calculate_contract_cost_tft(b, blocks * 6, None) + .unwrap(); (amount_due, discount_received) } @@ -4537,3 +4959,15 @@ fn get_service_contract() -> types::ServiceContract { fn get_timestamp_in_seconds_for_block(block_number: u64) -> u64 { 1628082000 + (6 * block_number) } + +fn activate_billing_accounts() { + let pricing_policy = TfgridModule::pricing_policies(1).unwrap(); + let foundation_account = pricing_policy.foundation_account; + let staking_pool_account = get_staking_pool_account(); + let billing_accounts = vec![foundation_account, staking_pool_account]; + for account in billing_accounts { + if !>::account_exists(&account.clone().into()) { + let _ = Balances::deposit_creating(&account, EXISTENTIAL_DEPOSIT); + } + } +} diff --git a/substrate-node/pallets/pallet-smart-contract/src/types.rs b/substrate-node/pallets/pallet-smart-contract/src/types.rs index 6885292bf..ccd5f070c 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/types.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/types.rs @@ -1,16 +1,23 @@ use crate::{ pallet::{MaxDeploymentDataLength, MaxNodeContractPublicIPs}, - Config, + Call, Config, }; use core::{convert::TryInto, ops::Add}; -use frame_support::{pallet_prelude::ConstU32, BoundedVec, RuntimeDebugNoBound}; +use frame_support::{ + pallet_prelude::ConstU32, + traits::{DefensiveSaturating, IsSubType}, + BoundedVec, RuntimeDebugNoBound, +}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use sp_runtime::SaturatedConversion; -use sp_std::prelude::*; +use sp_runtime::{ + traits::{DispatchInfoOf, SignedExtension, Zero}, + transaction_validity::{TransactionValidity, TransactionValidityError, ValidTransaction}, + SaturatedConversion, +}; +use sp_std::{fmt::Debug, marker::PhantomData, prelude::*}; use substrate_fixed::types::U64F64; use tfchain_support::{resources::Resources, types::PublicIP}; - pub type BlockNumber = u64; /// Utility type for managing upgrades/migrations. @@ -27,6 +34,7 @@ pub enum StorageVersion { V9, V10, V11, + V12, } impl Default for StorageVersion { @@ -222,6 +230,17 @@ pub struct ContractLock { pub lock_updated: u64, pub cycles: u16, } +#[derive( + PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Default, Debug, TypeInfo, MaxEncodedLen, +)] +pub struct ContractPaymentState { + pub standard_reserve: BalanceOf, + pub additional_reserve: BalanceOf, + pub standard_overdraft: BalanceOf, + pub additional_overdraft: BalanceOf, + pub last_updated_seconds: u64, + pub cycles: u16, +} impl + Copy + TryInto> ContractLock { pub fn total_amount_locked(&self) -> BalanceOf { @@ -235,6 +254,123 @@ impl + Copy + TryInto> ContractLock bool { self.extra_amount_locked.saturated_into::() > 0 } + + pub fn is_migrated(&self) -> bool { + self.lock_updated == 0 + } +} + +impl ContractPaymentState +where + BalanceOf: DefensiveSaturating + Copy + Zero + PartialOrd, +{ + // accumulate the standard reserve + pub fn reserve_standard_amount(&mut self, amount: BalanceOf) { + self.standard_reserve.defensive_saturating_accrue(amount); + } + // accumulate the additional reserve + pub fn reserve_additional_amount(&mut self, amount: BalanceOf) { + self.additional_reserve.defensive_saturating_accrue(amount); + } + // accumulate the standard overdraft + pub fn overdraft_standard_amount(&mut self, amount: BalanceOf) { + self.standard_overdraft.defensive_saturating_accrue(amount); + } + // accumulate the additional overdraft + pub fn overdraft_additional_amount(&mut self, amount: BalanceOf) { + self.additional_overdraft + .defensive_saturating_accrue(amount); + } + + // Method to settle the standard overdraft + pub fn settle_overdraft_standard_amount(&mut self) { + self.standard_reserve + .defensive_saturating_accrue(self.standard_overdraft); + self.standard_overdraft = BalanceOf::zero(); + } + + // Method to settle the additional overdraft + pub fn settle_overdraft_additional_amount(&mut self) { + self.additional_reserve + .defensive_saturating_accrue(self.additional_overdraft); + self.additional_overdraft = BalanceOf::zero(); + } + + // Method to settle both standard and additional overdraft + pub fn settle_overdraft(&mut self) { + self.settle_overdraft_standard_amount(); + self.settle_overdraft_additional_amount(); + } + + // Method to return the sum of standard_overdraft and additional_overdraft + pub fn get_overdraft(&self) -> BalanceOf { + self.standard_overdraft + .defensive_saturating_add(self.additional_overdraft) + } + + // Method to return the sum of standard_reserve_amount and additional_reserve_amount + pub fn get_reserve(&self) -> BalanceOf { + self.standard_reserve + .defensive_saturating_add(self.additional_reserve) + } + + // Method to return weather the contract has any reserved balance at all. + pub fn has_reserve(&self) -> bool { + !self.standard_reserve.is_zero() || !self.additional_reserve.is_zero() + } + + // Method to return weather the contract has overdraft or not + pub fn has_overdraft(&self) -> bool { + !self.standard_overdraft.is_zero() || !self.additional_overdraft.is_zero() + } + + // Method to settle partial overdraft + pub fn settle_partial_overdraft(&mut self, amount: BalanceOf) { + let mut remaining_amount = amount; + + // Settle additional overdraft first + if remaining_amount > BalanceOf::zero() { + if remaining_amount >= self.additional_overdraft { + remaining_amount.defensive_saturating_reduce(self.additional_overdraft); + self.additional_reserve + .defensive_saturating_accrue(self.additional_overdraft); + self.additional_overdraft = BalanceOf::zero(); + } else { + self.additional_overdraft + .defensive_saturating_reduce(remaining_amount); + self.additional_reserve + .defensive_saturating_accrue(remaining_amount); + remaining_amount = BalanceOf::zero(); + } + } + + // Settle standard overdraft with any remaining amount + if remaining_amount > BalanceOf::zero() { + if remaining_amount >= self.standard_overdraft { + remaining_amount.defensive_saturating_reduce(self.standard_overdraft); + self.standard_reserve + .defensive_saturating_accrue(self.standard_overdraft); + self.standard_overdraft = BalanceOf::zero(); + } else { + self.standard_overdraft + .defensive_saturating_reduce(remaining_amount); + self.standard_reserve + .defensive_saturating_accrue(remaining_amount); + } + } + } + + pub fn reset_standard_reserve(&mut self) { + self.standard_reserve = BalanceOf::zero(); + } + + pub fn reset_additional_reserve(&mut self) { + self.additional_reserve = BalanceOf::zero(); + } + + pub fn reset_cycles(&mut self) { + self.cycles = 0; + } } #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Default, Debug, TypeInfo)] @@ -286,3 +422,241 @@ pub enum ServiceContractState { AgreementReady, ApprovedByBoth, } + +// This code defines a custom SignedExtension `ContractIdProvides` +// SignedExtension is a trait that allows developers to add custom logic to the transaction validation process. +// It ensures that transactions of type bill_contract_for_block are unique per block based on the provided contract ID. +#[derive(Encode, Decode, Clone, Eq, PartialEq, scale_info::TypeInfo)] +pub struct ContractIdProvides(PhantomData) +where + ::RuntimeCall: IsSubType>; + +impl SignedExtension for ContractIdProvides +where + ::RuntimeCall: IsSubType>, +{ + const IDENTIFIER: &'static str = "ContractIdProvides"; + type AccountId = T::AccountId; + type Call = T::RuntimeCall; + type AdditionalSigned = (); + type Pre = (); + + fn additional_signed(&self) -> Result<(), TransactionValidityError> { + Ok(()) + } + + // Provides the contract ID in a way that prevents duplicate transactions with the same contract ID. + fn validate( + &self, + _who: &Self::AccountId, + call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> TransactionValidity { + if let Some(local_call) = call.is_sub_type() { + if let Call::bill_contract_for_block { contract_id } = local_call { + return ValidTransaction::with_tag_prefix(Self::IDENTIFIER) + .and_provides(contract_id.to_le_bytes().to_vec()) + .build() + .into(); + } + } + Ok(ValidTransaction::default()) + } + + fn pre_dispatch( + self, + who: &Self::AccountId, + call: &Self::Call, + info: &DispatchInfoOf, + len: usize, + ) -> Result { + self.validate(who, call, info, len).map(|_| ()) + } +} + +impl Debug for ContractIdProvides +where + ::RuntimeCall: IsSubType>, +{ + #[cfg(feature = "std")] + fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + write!(f, "ContractIdProvides") + } + + #[cfg(not(feature = "std"))] + fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + Ok(()) + } +} + +impl Default for ContractIdProvides +where + ::RuntimeCall: IsSubType>, +{ + fn default() -> Self { + Self(PhantomData) + } +} + +impl ContractIdProvides +where + ::RuntimeCall: IsSubType>, +{ + pub fn new() -> Self { + Self(PhantomData) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + // Helper function to create a default ContractPaymentState + fn default_contract_payment_state() -> ContractPaymentState { + ContractPaymentState { + last_updated_seconds: 0, + standard_reserve: 0, + additional_reserve: 0, + standard_overdraft: 0, + additional_overdraft: 0, + cycles: 0, + } + } + + #[test] + fn test_settle_overdraft() { + let mut payment_state = default_contract_payment_state(); + payment_state.standard_overdraft = 50; + payment_state.additional_overdraft = 30; + + payment_state.settle_overdraft(); + + assert_eq!(payment_state.standard_overdraft, 0); + assert_eq!(payment_state.additional_overdraft, 0); + } + + #[test] + fn test_reserve_standard_amount() { + let mut payment_state = default_contract_payment_state(); + payment_state.reserve_standard_amount(100); + assert_eq!(payment_state.standard_reserve, 100); + + payment_state.reserve_standard_amount(50); + assert_eq!(payment_state.standard_reserve, 150); + } + + #[test] + fn test_reserve_additional_amount() { + let mut payment_state = default_contract_payment_state(); + payment_state.reserve_additional_amount(200); + assert_eq!(payment_state.additional_reserve, 200); + + payment_state.reserve_additional_amount(100); + assert_eq!(payment_state.additional_reserve, 300); + } + + #[test] + fn test_overdraft_standard_amount() { + let mut payment_state = default_contract_payment_state(); + payment_state.overdraft_standard_amount(150); + assert_eq!(payment_state.standard_overdraft, 150); + + payment_state.overdraft_standard_amount(50); + assert_eq!(payment_state.standard_overdraft, 200); + } + + #[test] + fn test_overdraft_additional_amount() { + let mut payment_state = default_contract_payment_state(); + payment_state.overdraft_additional_amount(75); + assert_eq!(payment_state.additional_overdraft, 75); + + payment_state.overdraft_additional_amount(75); + assert_eq!(payment_state.additional_overdraft, 150); + } + + #[test] + fn test_settle_partial_overdraft() { + let mut payment_state = default_contract_payment_state(); + payment_state.standard_overdraft = 100; + payment_state.additional_overdraft = 50; + + payment_state.settle_partial_overdraft(30); + + // The remaining overdraft should be reduced by 30 + // Assuming 30 is preferably deducted from additional first + assert_eq!(payment_state.standard_overdraft, 100); + assert_eq!(payment_state.additional_overdraft, 20); + + payment_state.settle_partial_overdraft(30); + assert_eq!(payment_state.standard_overdraft, 90); + assert_eq!(payment_state.additional_overdraft, 0); + + payment_state.settle_partial_overdraft(100); + assert_eq!(payment_state.standard_overdraft, 0); + assert_eq!(payment_state.additional_overdraft, 0); + + payment_state.additional_overdraft = 50; + payment_state.settle_partial_overdraft(40); + assert_eq!(payment_state.additional_overdraft, 10); + } + + #[test] + fn test_get_overdraft() { + let mut payment_state = default_contract_payment_state(); + payment_state.standard_overdraft = 200; + payment_state.additional_overdraft = 100; + + let total_overdraft = payment_state.get_overdraft(); + + assert_eq!(total_overdraft, 300); + } + + #[test] + fn test_get_reserve() { + let mut payment_state = default_contract_payment_state(); + payment_state.standard_reserve = 120; + payment_state.additional_reserve = 80; + + let total_reserved = payment_state.get_reserve(); + + assert_eq!(total_reserved, 200); + } + + #[test] + fn test_has_reserve() { + let mut payment_state = default_contract_payment_state(); + assert_eq!(payment_state.has_reserve(), false); + + payment_state.standard_reserve = 120; + payment_state.additional_reserve = 80; + assert_eq!(payment_state.has_reserve(), true); + + let mut payment_state = default_contract_payment_state(); + payment_state.standard_reserve = 120; + assert_eq!(payment_state.has_reserve(), true); + + let mut payment_state = default_contract_payment_state(); + payment_state.additional_reserve = 80; + assert_eq!(payment_state.has_reserve(), true); + } + + #[test] + fn test_has_overdarft() { + let mut payment_state = default_contract_payment_state(); + assert_eq!(payment_state.has_overdraft(), false); + + payment_state.standard_overdraft = 120; + payment_state.additional_overdraft = 80; + assert_eq!(payment_state.has_overdraft(), true); + + let mut payment_state = default_contract_payment_state(); + payment_state.standard_overdraft = 120; + assert_eq!(payment_state.has_overdraft(), true); + + let mut payment_state = default_contract_payment_state(); + payment_state.additional_overdraft = 80; + assert_eq!(payment_state.has_overdraft(), true); + } +} diff --git a/substrate-node/pallets/pallet-smart-contract/src/weights.rs b/substrate-node/pallets/pallet-smart-contract/src/weights.rs index c05881a43..7e44e4f31 100644 --- a/substrate-node/pallets/pallet-smart-contract/src/weights.rs +++ b/substrate-node/pallets/pallet-smart-contract/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_smart_contract //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-08-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `66e77d0da08f`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -89,14 +89,14 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:0 w:1) /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:0 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_node_contract() -> Weight { // Proof Size summary in bytes: // Measured: `868` // Estimated: `4333` - // Minimum execution time: 48_412_000 picoseconds. - Weight::from_parts(49_073_000, 4333) + // Minimum execution time: 48_532_000 picoseconds. + Weight::from_parts(49_293_000, 4333) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -110,27 +110,31 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_node_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `892` - // Estimated: `4357` - // Minimum execution time: 26_911_000 picoseconds. - Weight::from_parts(27_492_000, 4357) + // Measured: `923` + // Estimated: `4388` + // Minimum execution time: 27_632_000 picoseconds. + Weight::from_parts(28_023_000, 4388) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `SmartContractModule::Contracts` (r:1 w:1) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Storage: `TfgridModule::Twins` (r:2 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) @@ -143,11 +147,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `1203` - // Estimated: `4668` - // Minimum execution time: 60_164_000 picoseconds. - Weight::from_parts(61_396_000, 4668) - .saturating_add(T::DbWeight::get().reads(9_u64)) + // Measured: `1650` + // Estimated: `7590` + // Minimum execution time: 75_803_000 picoseconds. + Weight::from_parts(78_449_000, 7590) + .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) @@ -164,14 +168,14 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// Storage: `SmartContractModule::Contracts` (r:0 w:1) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:0 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_name_contract() -> Weight { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3805` - // Minimum execution time: 24_697_000 picoseconds. - Weight::from_parts(25_468_000, 3805) + // Minimum execution time: 24_757_000 picoseconds. + Weight::from_parts(25_237_000, 3805) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -179,14 +183,14 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::Twins` (r:1 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) @@ -195,10 +199,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::ContractIDByNameRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_name_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `919` - // Estimated: `4384` - // Minimum execution time: 46_268_000 picoseconds. - Weight::from_parts(47_641_000, 4384) + // Measured: `949` + // Estimated: `4414` + // Minimum execution time: 51_417_000 picoseconds. + Weight::from_parts(52_810_000, 4414) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -218,10 +222,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_nru_reports() -> Weight { // Proof Size summary in bytes: - // Measured: `1292` - // Estimated: `4757` - // Minimum execution time: 38_112_000 picoseconds. - Weight::from_parts(38_763_000, 4757) + // Measured: `1286` + // Estimated: `4751` + // Minimum execution time: 37_891_000 picoseconds. + Weight::from_parts(38_723_000, 4751) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -235,10 +239,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) fn report_contract_resources() -> Weight { // Proof Size summary in bytes: - // Measured: `771` - // Estimated: `4236` - // Minimum execution time: 23_053_000 picoseconds. - Weight::from_parts(23_394_000, 4236) + // Measured: `765` + // Estimated: `4230` + // Minimum execution time: 22_993_000 picoseconds. + Weight::from_parts(23_644_000, 4230) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -262,35 +266,37 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// Storage: `SmartContractModule::Contracts` (r:0 w:1) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:0 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_rent_contract() -> Weight { // Proof Size summary in bytes: // Measured: `776` // Estimated: `4241` - // Minimum execution time: 34_856_000 picoseconds. - Weight::from_parts(35_767_000, 4241) + // Minimum execution time: 34_595_000 picoseconds. + Weight::from_parts(35_197_000, 4241) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } /// Storage: `SmartContractModule::Contracts` (r:1 w:1) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Storage: `TfgridModule::Twins` (r:2 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::Nodes` (r:1 w:0) /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::NodePower` (r:1 w:0) - /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:0) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::DedicatedNodesExtraFee` (r:1 w:0) /// Proof: `SmartContractModule::DedicatedNodesExtraFee` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) @@ -301,11 +307,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_rent_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `1284` - // Estimated: `4749` - // Minimum execution time: 59_392_000 picoseconds. - Weight::from_parts(60_414_000, 4749) - .saturating_add(T::DbWeight::get().reads(12_u64)) + // Measured: `1607` + // Estimated: `7547` + // Minimum execution time: 72_758_000 picoseconds. + Weight::from_parts(73_970_000, 7547) + .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `SmartContractModule::SolutionProviderID` (r:1 w:1) @@ -316,8 +322,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 9_949_000 picoseconds. - Weight::from_parts(10_199_000, 1522) + // Minimum execution time: 9_668_000 picoseconds. + Weight::from_parts(9_969_000, 1522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -327,29 +333,31 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3680` - // Minimum execution time: 12_814_000 picoseconds. - Weight::from_parts(13_205_000, 3680) + // Minimum execution time: 12_674_000 picoseconds. + Weight::from_parts(12_944_000, 3680) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SmartContractModule::Contracts` (r:1 w:0) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Storage: `TfgridModule::Twins` (r:2 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:1 w:1) /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Nodes` (r:1 w:0) - /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::NodeContractResources` (r:1 w:0) /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) @@ -360,18 +368,16 @@ impl WeightInfo for SubstrateWeight { /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `TFTPriceModule::MaxTftPrice` (r:1 w:0) /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Session::Validators` (r:1 w:0) + /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn bill_contract_for_block() -> Weight { // Proof Size summary in bytes: - // Measured: `1608` - // Estimated: `5073` - // Minimum execution time: 79_811_000 picoseconds. - Weight::from_parts(81_795_000, 5073) - .saturating_add(T::DbWeight::get().reads(16_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `2077` + // Estimated: `8017` + // Minimum execution time: 86_263_000 picoseconds. + Weight::from_parts(87_505_000, 8017) + .saturating_add(T::DbWeight::get().reads(17_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:2 w:0) /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -383,8 +389,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `395` // Estimated: `6335` - // Minimum execution time: 18_665_000 picoseconds. - Weight::from_parts(19_127_000, 6335) + // Minimum execution time: 18_384_000 picoseconds. + Weight::from_parts(18_725_000, 6335) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -396,8 +402,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_552_000 picoseconds. - Weight::from_parts(17_192_000, 3954) + // Minimum execution time: 16_732_000 picoseconds. + Weight::from_parts(17_162_000, 3954) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -409,8 +415,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_260_000 picoseconds. - Weight::from_parts(16_801_000, 3954) + // Minimum execution time: 16_351_000 picoseconds. + Weight::from_parts(16_632_000, 3954) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -422,8 +428,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_512_000 picoseconds. - Weight::from_parts(17_032_000, 3967) + // Minimum execution time: 16_271_000 picoseconds. + Weight::from_parts(16_781_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -435,8 +441,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 17_183_000 picoseconds. - Weight::from_parts(17_914_000, 3967) + // Minimum execution time: 17_022_000 picoseconds. + Weight::from_parts(17_413_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -448,8 +454,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_181_000 picoseconds. - Weight::from_parts(16_832_000, 3967) + // Minimum execution time: 15_990_000 picoseconds. + Weight::from_parts(16_321_000, 3967) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -467,8 +473,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `841` // Estimated: `6781` - // Minimum execution time: 29_806_000 picoseconds. - Weight::from_parts(30_869_000, 6781) + // Minimum execution time: 28_924_000 picoseconds. + Weight::from_parts(29_586_000, 6781) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -478,7 +484,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 7_434_000 picoseconds. + // Minimum execution time: 7_474_000 picoseconds. Weight::from_parts(7_725_000, 1522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -491,10 +497,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn attach_solution_provider_id() -> Weight { // Proof Size summary in bytes: - // Measured: `971` - // Estimated: `4436` - // Minimum execution time: 21_731_000 picoseconds. - Weight::from_parts(22_693_000, 4436) + // Measured: `965` + // Estimated: `4430` + // Minimum execution time: 21_971_000 picoseconds. + Weight::from_parts(22_552_000, 4430) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -514,8 +520,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 23_585_000 picoseconds. - Weight::from_parts(23_975_000, 4198) + // Minimum execution time: 23_114_000 picoseconds. + Weight::from_parts(23_544_000, 4198) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -523,16 +529,20 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Storage: `TfgridModule::Twins` (r:2 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) @@ -545,11 +555,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_contract_collective() -> Weight { // Proof Size summary in bytes: - // Measured: `1203` - // Estimated: `4668` - // Minimum execution time: 58_099_000 picoseconds. - Weight::from_parts(59_022_000, 4668) - .saturating_add(T::DbWeight::get().reads(9_u64)) + // Measured: `1650` + // Estimated: `7590` + // Minimum execution time: 74_791_000 picoseconds. + Weight::from_parts(76_285_000, 7590) + .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } } @@ -584,14 +594,14 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:0 w:1) /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:0 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_node_contract() -> Weight { // Proof Size summary in bytes: // Measured: `868` // Estimated: `4333` - // Minimum execution time: 48_412_000 picoseconds. - Weight::from_parts(49_073_000, 4333) + // Minimum execution time: 48_532_000 picoseconds. + Weight::from_parts(49_293_000, 4333) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } @@ -605,27 +615,31 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_node_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `892` - // Estimated: `4357` - // Minimum execution time: 26_911_000 picoseconds. - Weight::from_parts(27_492_000, 4357) + // Measured: `923` + // Estimated: `4388` + // Minimum execution time: 27_632_000 picoseconds. + Weight::from_parts(28_023_000, 4388) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } /// Storage: `SmartContractModule::Contracts` (r:1 w:1) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Storage: `TfgridModule::Twins` (r:2 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) @@ -638,11 +652,11 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `1203` - // Estimated: `4668` - // Minimum execution time: 60_164_000 picoseconds. - Weight::from_parts(61_396_000, 4668) - .saturating_add(RocksDbWeight::get().reads(9_u64)) + // Measured: `1650` + // Estimated: `7590` + // Minimum execution time: 75_803_000 picoseconds. + Weight::from_parts(78_449_000, 7590) + .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) @@ -659,14 +673,14 @@ impl WeightInfo for () { /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// Storage: `SmartContractModule::Contracts` (r:0 w:1) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:0 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_name_contract() -> Weight { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3805` - // Minimum execution time: 24_697_000 picoseconds. - Weight::from_parts(25_468_000, 3805) + // Minimum execution time: 24_757_000 picoseconds. + Weight::from_parts(25_237_000, 3805) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -674,14 +688,14 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::Twins` (r:1 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) @@ -690,10 +704,10 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::ContractIDByNameRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_name_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `919` - // Estimated: `4384` - // Minimum execution time: 46_268_000 picoseconds. - Weight::from_parts(47_641_000, 4384) + // Measured: `949` + // Estimated: `4414` + // Minimum execution time: 51_417_000 picoseconds. + Weight::from_parts(52_810_000, 4414) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -713,10 +727,10 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_nru_reports() -> Weight { // Proof Size summary in bytes: - // Measured: `1292` - // Estimated: `4757` - // Minimum execution time: 38_112_000 picoseconds. - Weight::from_parts(38_763_000, 4757) + // Measured: `1286` + // Estimated: `4751` + // Minimum execution time: 37_891_000 picoseconds. + Weight::from_parts(38_723_000, 4751) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -730,10 +744,10 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) fn report_contract_resources() -> Weight { // Proof Size summary in bytes: - // Measured: `771` - // Estimated: `4236` - // Minimum execution time: 23_053_000 picoseconds. - Weight::from_parts(23_394_000, 4236) + // Measured: `765` + // Estimated: `4230` + // Minimum execution time: 22_993_000 picoseconds. + Weight::from_parts(23_644_000, 4230) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -757,35 +771,37 @@ impl WeightInfo for () { /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// Storage: `SmartContractModule::Contracts` (r:0 w:1) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SmartContractModule::ContractLock` (r:0 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:0 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_rent_contract() -> Weight { // Proof Size summary in bytes: // Measured: `776` // Estimated: `4241` - // Minimum execution time: 34_856_000 picoseconds. - Weight::from_parts(35_767_000, 4241) + // Minimum execution time: 34_595_000 picoseconds. + Weight::from_parts(35_197_000, 4241) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } /// Storage: `SmartContractModule::Contracts` (r:1 w:1) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Storage: `TfgridModule::Twins` (r:2 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:0) /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::Nodes` (r:1 w:0) /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::NodePower` (r:1 w:0) - /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::NodePower` (r:1 w:0) + /// Proof: `TfgridModule::NodePower` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::DedicatedNodesExtraFee` (r:1 w:0) /// Proof: `SmartContractModule::DedicatedNodesExtraFee` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) @@ -796,11 +812,11 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::ActiveRentContractForNode` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_rent_contract() -> Weight { // Proof Size summary in bytes: - // Measured: `1284` - // Estimated: `4749` - // Minimum execution time: 59_392_000 picoseconds. - Weight::from_parts(60_414_000, 4749) - .saturating_add(RocksDbWeight::get().reads(12_u64)) + // Measured: `1607` + // Estimated: `7547` + // Minimum execution time: 72_758_000 picoseconds. + Weight::from_parts(73_970_000, 7547) + .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } /// Storage: `SmartContractModule::SolutionProviderID` (r:1 w:1) @@ -811,8 +827,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 9_949_000 picoseconds. - Weight::from_parts(10_199_000, 1522) + // Minimum execution time: 9_668_000 picoseconds. + Weight::from_parts(9_969_000, 1522) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -822,29 +838,31 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3680` - // Minimum execution time: 12_814_000 picoseconds. - Weight::from_parts(13_205_000, 3680) + // Minimum execution time: 12_674_000 picoseconds. + Weight::from_parts(12_944_000, 3680) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SmartContractModule::Contracts` (r:1 w:0) /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Storage: `TfgridModule::Twins` (r:2 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractBillingInformationByID` (r:1 w:1) /// Proof: `SmartContractModule::ContractBillingInformationByID` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Nodes` (r:1 w:0) - /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::NodeContractResources` (r:1 w:0) /// Proof: `SmartContractModule::NodeContractResources` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ActiveRentContractForNode` (r:1 w:0) @@ -855,18 +873,16 @@ impl WeightInfo for () { /// Proof: `TFTPriceModule::MinTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `TFTPriceModule::MaxTftPrice` (r:1 w:0) /// Proof: `TFTPriceModule::MaxTftPrice` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Session::Validators` (r:1 w:0) + /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn bill_contract_for_block() -> Weight { // Proof Size summary in bytes: - // Measured: `1608` - // Estimated: `5073` - // Minimum execution time: 79_811_000 picoseconds. - Weight::from_parts(81_795_000, 5073) - .saturating_add(RocksDbWeight::get().reads(16_u64)) - .saturating_add(RocksDbWeight::get().writes(4_u64)) + // Measured: `2077` + // Estimated: `8017` + // Minimum execution time: 86_263_000 picoseconds. + Weight::from_parts(87_505_000, 8017) + .saturating_add(RocksDbWeight::get().reads(17_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:2 w:0) /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -878,8 +894,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `395` // Estimated: `6335` - // Minimum execution time: 18_665_000 picoseconds. - Weight::from_parts(19_127_000, 6335) + // Minimum execution time: 18_384_000 picoseconds. + Weight::from_parts(18_725_000, 6335) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -891,8 +907,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_552_000 picoseconds. - Weight::from_parts(17_192_000, 3954) + // Minimum execution time: 16_732_000 picoseconds. + Weight::from_parts(17_162_000, 3954) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -904,8 +920,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `489` // Estimated: `3954` - // Minimum execution time: 16_260_000 picoseconds. - Weight::from_parts(16_801_000, 3954) + // Minimum execution time: 16_351_000 picoseconds. + Weight::from_parts(16_632_000, 3954) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -917,8 +933,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_512_000 picoseconds. - Weight::from_parts(17_032_000, 3967) + // Minimum execution time: 16_271_000 picoseconds. + Weight::from_parts(16_781_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -930,8 +946,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 17_183_000 picoseconds. - Weight::from_parts(17_914_000, 3967) + // Minimum execution time: 17_022_000 picoseconds. + Weight::from_parts(17_413_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -943,8 +959,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `502` // Estimated: `3967` - // Minimum execution time: 16_181_000 picoseconds. - Weight::from_parts(16_832_000, 3967) + // Minimum execution time: 15_990_000 picoseconds. + Weight::from_parts(16_321_000, 3967) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -962,8 +978,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `841` // Estimated: `6781` - // Minimum execution time: 29_806_000 picoseconds. - Weight::from_parts(30_869_000, 6781) + // Minimum execution time: 28_924_000 picoseconds. + Weight::from_parts(29_586_000, 6781) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -973,7 +989,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `37` // Estimated: `1522` - // Minimum execution time: 7_434_000 picoseconds. + // Minimum execution time: 7_474_000 picoseconds. Weight::from_parts(7_725_000, 1522) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -986,10 +1002,10 @@ impl WeightInfo for () { /// Proof: `TfgridModule::TwinIdByAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) fn attach_solution_provider_id() -> Weight { // Proof Size summary in bytes: - // Measured: `971` - // Estimated: `4436` - // Minimum execution time: 21_731_000 picoseconds. - Weight::from_parts(22_693_000, 4436) + // Measured: `965` + // Estimated: `4430` + // Minimum execution time: 21_971_000 picoseconds. + Weight::from_parts(22_552_000, 4430) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1009,8 +1025,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 23_585_000 picoseconds. - Weight::from_parts(23_975_000, 4198) + // Minimum execution time: 23_114_000 picoseconds. + Weight::from_parts(23_544_000, 4198) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1018,16 +1034,20 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::Contracts` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ActiveNodeContracts` (r:1 w:1) /// Proof: `SmartContractModule::ActiveNodeContracts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::Twins` (r:1 w:0) + /// Storage: `TfgridModule::Twins` (r:2 w:0) /// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) + /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Nodes` (r:1 w:0) + /// Proof: `TfgridModule::Nodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TfgridModule::Farms` (r:1 w:0) + /// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmartContractModule::ContractPaymentState` (r:1 w:1) + /// Proof: `SmartContractModule::ContractPaymentState` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `TfgridModule::TwinBoundedAccountID` (r:1 w:0) /// Proof: `TfgridModule::TwinBoundedAccountID` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `SmartContractModule::ContractLock` (r:1 w:1) - /// Proof: `SmartContractModule::ContractLock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `TfgridModule::PricingPolicies` (r:1 w:0) - /// Proof: `TfgridModule::PricingPolicies` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::BillingFrequency` (r:1 w:0) /// Proof: `SmartContractModule::BillingFrequency` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SmartContractModule::ContractsToBillAt` (r:1 w:1) @@ -1040,11 +1060,11 @@ impl WeightInfo for () { /// Proof: `SmartContractModule::ContractIDByNodeIDAndHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_contract_collective() -> Weight { // Proof Size summary in bytes: - // Measured: `1203` - // Estimated: `4668` - // Minimum execution time: 58_099_000 picoseconds. - Weight::from_parts(59_022_000, 4668) - .saturating_add(RocksDbWeight::get().reads(9_u64)) + // Measured: `1650` + // Estimated: `7590` + // Minimum execution time: 74_791_000 picoseconds. + Weight::from_parts(76_285_000, 7590) + .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } } diff --git a/substrate-node/pallets/pallet-tfgrid/src/weights.rs b/substrate-node/pallets/pallet-tfgrid/src/weights.rs index 075014e40..18ce069d6 100644 --- a/substrate-node/pallets/pallet-tfgrid/src/weights.rs +++ b/substrate-node/pallets/pallet-tfgrid/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_tfgrid //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-08-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `66e77d0da08f`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -76,8 +76,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_485_000 picoseconds. - Weight::from_parts(2_575_000, 0) + // Minimum execution time: 2_515_000 picoseconds. + Weight::from_parts(2_655_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) @@ -94,8 +94,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `496` // Estimated: `3961` - // Minimum execution time: 20_870_000 picoseconds. - Weight::from_parts(21_480_000, 3961) + // Minimum execution time: 20_518_000 picoseconds. + Weight::from_parts(20_980_000, 3961) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -109,8 +109,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `507` // Estimated: `3972` - // Minimum execution time: 22_793_000 picoseconds. - Weight::from_parts(23_074_000, 3972) + // Minimum execution time: 22_262_000 picoseconds. + Weight::from_parts(22_653_000, 3972) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -124,8 +124,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `453` // Estimated: `3918` - // Minimum execution time: 16_180_000 picoseconds. - Weight::from_parts(16_651_000, 3918) + // Minimum execution time: 16_531_000 picoseconds. + Weight::from_parts(17_012_000, 3918) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -135,8 +135,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_675_000 picoseconds. - Weight::from_parts(14_097_000, 3877) + // Minimum execution time: 13_476_000 picoseconds. + Weight::from_parts(13_826_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -148,8 +148,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 18_404_000 picoseconds. - Weight::from_parts(18_815_000, 4034) + // Minimum execution time: 18_355_000 picoseconds. + Weight::from_parts(18_695_000, 4034) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -161,8 +161,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 17_413_000 picoseconds. - Weight::from_parts(17_874_000, 4034) + // Minimum execution time: 17_534_000 picoseconds. + Weight::from_parts(17_904_000, 4034) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -190,8 +190,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `905` // Estimated: `11795` - // Minimum execution time: 49_384_000 picoseconds. - Weight::from_parts(50_565_000, 11795) + // Minimum execution time: 48_913_000 picoseconds. + Weight::from_parts(49_483_000, 11795) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -207,8 +207,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `661` // Estimated: `4126` - // Minimum execution time: 28_183_000 picoseconds. - Weight::from_parts(28_875_000, 4126) + // Minimum execution time: 27_392_000 picoseconds. + Weight::from_parts(28_073_000, 4126) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -222,8 +222,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `956` // Estimated: `11846` - // Minimum execution time: 35_847_000 picoseconds. - Weight::from_parts(36_519_000, 11846) + // Minimum execution time: 35_166_000 picoseconds. + Weight::from_parts(35_728_000, 11846) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -239,8 +239,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 19_406_000 picoseconds. - Weight::from_parts(19_827_000, 3919) + // Minimum execution time: 18_906_000 picoseconds. + Weight::from_parts(19_326_000, 3919) .saturating_add(T::DbWeight::get().reads(4_u64)) } /// Storage: `TfgridModule::Farms` (r:1 w:0) @@ -253,8 +253,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779` // Estimated: `4244` - // Minimum execution time: 25_348_000 picoseconds. - Weight::from_parts(25_999_000, 4244) + // Minimum execution time: 25_027_000 picoseconds. + Weight::from_parts(25_488_000, 4244) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -274,8 +274,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `682` // Estimated: `4147` - // Minimum execution time: 28_755_000 picoseconds. - Weight::from_parts(29_315_000, 4147) + // Minimum execution time: 28_053_000 picoseconds. + Weight::from_parts(28_715_000, 4147) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -291,7 +291,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 14_818_000 picoseconds. + // Minimum execution time: 14_828_000 picoseconds. Weight::from_parts(15_129_000, 3700) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -304,8 +304,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3893` - // Minimum execution time: 15_419_000 picoseconds. - Weight::from_parts(15_700_000, 3893) + // Minimum execution time: 15_199_000 picoseconds. + Weight::from_parts(15_610_000, 3893) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -319,8 +319,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `3599` - // Minimum execution time: 12_674_000 picoseconds. - Weight::from_parts(12_985_000, 3599) + // Minimum execution time: 12_534_000 picoseconds. + Weight::from_parts(12_795_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -334,8 +334,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `382` // Estimated: `3847` - // Minimum execution time: 17_112_000 picoseconds. - Weight::from_parts(17_523_000, 3847) + // Minimum execution time: 16_962_000 picoseconds. + Weight::from_parts(17_433_000, 3847) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -347,7 +347,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 10_249_000 picoseconds. + // Minimum execution time: 10_480_000 picoseconds. Weight::from_parts(10_730_000, 1619) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -360,8 +360,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3605` - // Minimum execution time: 7_555_000 picoseconds. - Weight::from_parts(7_835_000, 3605) + // Minimum execution time: 7_444_000 picoseconds. + Weight::from_parts(7_664_000, 3605) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -385,8 +385,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `828` // Estimated: `4293` - // Minimum execution time: 33_413_000 picoseconds. - Weight::from_parts(34_295_000, 4293) + // Minimum execution time: 33_273_000 picoseconds. + Weight::from_parts(33_854_000, 4293) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -396,8 +396,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_816_000 picoseconds. - Weight::from_parts(14_097_000, 3877) + // Minimum execution time: 13_676_000 picoseconds. + Weight::from_parts(14_137_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -407,8 +407,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_856_000 picoseconds. - Weight::from_parts(14_497_000, 3877) + // Minimum execution time: 14_136_000 picoseconds. + Weight::from_parts(14_387_000, 3877) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -418,8 +418,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_711_000 picoseconds. - Weight::from_parts(5_882_000, 0) + // Minimum execution time: 5_651_000 picoseconds. + Weight::from_parts(5_821_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) @@ -428,8 +428,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `355` // Estimated: `1840` - // Minimum execution time: 10_059_000 picoseconds. - Weight::from_parts(10_360_000, 1840) + // Minimum execution time: 9_799_000 picoseconds. + Weight::from_parts(10_109_000, 1840) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -439,8 +439,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `413` // Estimated: `1898` - // Minimum execution time: 12_263_000 picoseconds. - Weight::from_parts(12_624_000, 1898) + // Minimum execution time: 12_233_000 picoseconds. + Weight::from_parts(12_504_000, 1898) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -450,8 +450,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `294` // Estimated: `3759` - // Minimum execution time: 13_365_000 picoseconds. - Weight::from_parts(13_646_000, 3759) + // Minimum execution time: 13_325_000 picoseconds. + Weight::from_parts(13_706_000, 3759) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -465,8 +465,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `572` // Estimated: `4037` - // Minimum execution time: 22_322_000 picoseconds. - Weight::from_parts(23_254_000, 4037) + // Minimum execution time: 22_302_000 picoseconds. + Weight::from_parts(22_943_000, 4037) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -476,8 +476,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 8_176_000 picoseconds. - Weight::from_parts(8_366_000, 1619) + // Minimum execution time: 8_096_000 picoseconds. + Weight::from_parts(8_275_000, 1619) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -493,8 +493,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `621` // Estimated: `4086` - // Minimum execution time: 23_354_000 picoseconds. - Weight::from_parts(23_725_000, 4086) + // Minimum execution time: 35_657_000 picoseconds. + Weight::from_parts(38_282_000, 4086) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -514,8 +514,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792` // Estimated: `4257` - // Minimum execution time: 26_710_000 picoseconds. - Weight::from_parts(27_522_000, 4257) + // Minimum execution time: 26_661_000 picoseconds. + Weight::from_parts(27_592_000, 4257) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -527,8 +527,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `387` // Estimated: `3852` - // Minimum execution time: 12_113_000 picoseconds. - Weight::from_parts(12_413_000, 3852) + // Minimum execution time: 11_993_000 picoseconds. + Weight::from_parts(12_353_000, 3852) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -544,8 +544,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 18_565_000 picoseconds. - Weight::from_parts(19_086_000, 3919) + // Minimum execution time: 18_374_000 picoseconds. + Weight::from_parts(18_755_000, 3919) .saturating_add(T::DbWeight::get().reads(4_u64)) } } @@ -558,8 +558,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_485_000 picoseconds. - Weight::from_parts(2_575_000, 0) + // Minimum execution time: 2_515_000 picoseconds. + Weight::from_parts(2_655_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::TwinIdByAccountID` (r:1 w:0) @@ -576,8 +576,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `496` // Estimated: `3961` - // Minimum execution time: 20_870_000 picoseconds. - Weight::from_parts(21_480_000, 3961) + // Minimum execution time: 20_518_000 picoseconds. + Weight::from_parts(20_980_000, 3961) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -591,8 +591,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `507` // Estimated: `3972` - // Minimum execution time: 22_793_000 picoseconds. - Weight::from_parts(23_074_000, 3972) + // Minimum execution time: 22_262_000 picoseconds. + Weight::from_parts(22_653_000, 3972) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -606,8 +606,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `453` // Estimated: `3918` - // Minimum execution time: 16_180_000 picoseconds. - Weight::from_parts(16_651_000, 3918) + // Minimum execution time: 16_531_000 picoseconds. + Weight::from_parts(17_012_000, 3918) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -617,8 +617,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_675_000 picoseconds. - Weight::from_parts(14_097_000, 3877) + // Minimum execution time: 13_476_000 picoseconds. + Weight::from_parts(13_826_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -630,8 +630,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 18_404_000 picoseconds. - Weight::from_parts(18_815_000, 4034) + // Minimum execution time: 18_355_000 picoseconds. + Weight::from_parts(18_695_000, 4034) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -643,8 +643,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `569` // Estimated: `4034` - // Minimum execution time: 17_413_000 picoseconds. - Weight::from_parts(17_874_000, 4034) + // Minimum execution time: 17_534_000 picoseconds. + Weight::from_parts(17_904_000, 4034) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -672,8 +672,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `905` // Estimated: `11795` - // Minimum execution time: 49_384_000 picoseconds. - Weight::from_parts(50_565_000, 11795) + // Minimum execution time: 48_913_000 picoseconds. + Weight::from_parts(49_483_000, 11795) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -689,8 +689,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `661` // Estimated: `4126` - // Minimum execution time: 28_183_000 picoseconds. - Weight::from_parts(28_875_000, 4126) + // Minimum execution time: 27_392_000 picoseconds. + Weight::from_parts(28_073_000, 4126) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -704,8 +704,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `956` // Estimated: `11846` - // Minimum execution time: 35_847_000 picoseconds. - Weight::from_parts(36_519_000, 11846) + // Minimum execution time: 35_166_000 picoseconds. + Weight::from_parts(35_728_000, 11846) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -721,8 +721,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 19_406_000 picoseconds. - Weight::from_parts(19_827_000, 3919) + // Minimum execution time: 18_906_000 picoseconds. + Weight::from_parts(19_326_000, 3919) .saturating_add(RocksDbWeight::get().reads(4_u64)) } /// Storage: `TfgridModule::Farms` (r:1 w:0) @@ -735,8 +735,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779` // Estimated: `4244` - // Minimum execution time: 25_348_000 picoseconds. - Weight::from_parts(25_999_000, 4244) + // Minimum execution time: 25_027_000 picoseconds. + Weight::from_parts(25_488_000, 4244) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -756,8 +756,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `682` // Estimated: `4147` - // Minimum execution time: 28_755_000 picoseconds. - Weight::from_parts(29_315_000, 4147) + // Minimum execution time: 28_053_000 picoseconds. + Weight::from_parts(28_715_000, 4147) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -773,7 +773,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 14_818_000 picoseconds. + // Minimum execution time: 14_828_000 picoseconds. Weight::from_parts(15_129_000, 3700) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -786,8 +786,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3893` - // Minimum execution time: 15_419_000 picoseconds. - Weight::from_parts(15_700_000, 3893) + // Minimum execution time: 15_199_000 picoseconds. + Weight::from_parts(15_610_000, 3893) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -801,8 +801,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `134` // Estimated: `3599` - // Minimum execution time: 12_674_000 picoseconds. - Weight::from_parts(12_985_000, 3599) + // Minimum execution time: 12_534_000 picoseconds. + Weight::from_parts(12_795_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -816,8 +816,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `382` // Estimated: `3847` - // Minimum execution time: 17_112_000 picoseconds. - Weight::from_parts(17_523_000, 3847) + // Minimum execution time: 16_962_000 picoseconds. + Weight::from_parts(17_433_000, 3847) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -829,7 +829,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 10_249_000 picoseconds. + // Minimum execution time: 10_480_000 picoseconds. Weight::from_parts(10_730_000, 1619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) @@ -842,8 +842,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3605` - // Minimum execution time: 7_555_000 picoseconds. - Weight::from_parts(7_835_000, 3605) + // Minimum execution time: 7_444_000 picoseconds. + Weight::from_parts(7_664_000, 3605) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -867,8 +867,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `828` // Estimated: `4293` - // Minimum execution time: 33_413_000 picoseconds. - Weight::from_parts(34_295_000, 4293) + // Minimum execution time: 33_273_000 picoseconds. + Weight::from_parts(33_854_000, 4293) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -878,8 +878,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_816_000 picoseconds. - Weight::from_parts(14_097_000, 3877) + // Minimum execution time: 13_676_000 picoseconds. + Weight::from_parts(14_137_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -889,8 +889,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 13_856_000 picoseconds. - Weight::from_parts(14_497_000, 3877) + // Minimum execution time: 14_136_000 picoseconds. + Weight::from_parts(14_387_000, 3877) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -900,8 +900,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_711_000 picoseconds. - Weight::from_parts(5_882_000, 0) + // Minimum execution time: 5_651_000 picoseconds. + Weight::from_parts(5_821_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TfgridModule::AllowedNodeCertifiers` (r:1 w:1) @@ -910,8 +910,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `355` // Estimated: `1840` - // Minimum execution time: 10_059_000 picoseconds. - Weight::from_parts(10_360_000, 1840) + // Minimum execution time: 9_799_000 picoseconds. + Weight::from_parts(10_109_000, 1840) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -921,8 +921,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `413` // Estimated: `1898` - // Minimum execution time: 12_263_000 picoseconds. - Weight::from_parts(12_624_000, 1898) + // Minimum execution time: 12_233_000 picoseconds. + Weight::from_parts(12_504_000, 1898) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -932,8 +932,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `294` // Estimated: `3759` - // Minimum execution time: 13_365_000 picoseconds. - Weight::from_parts(13_646_000, 3759) + // Minimum execution time: 13_325_000 picoseconds. + Weight::from_parts(13_706_000, 3759) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -947,8 +947,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `572` // Estimated: `4037` - // Minimum execution time: 22_322_000 picoseconds. - Weight::from_parts(23_254_000, 4037) + // Minimum execution time: 22_302_000 picoseconds. + Weight::from_parts(22_943_000, 4037) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -958,8 +958,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1619` - // Minimum execution time: 8_176_000 picoseconds. - Weight::from_parts(8_366_000, 1619) + // Minimum execution time: 8_096_000 picoseconds. + Weight::from_parts(8_275_000, 1619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -975,8 +975,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `621` // Estimated: `4086` - // Minimum execution time: 23_354_000 picoseconds. - Weight::from_parts(23_725_000, 4086) + // Minimum execution time: 35_657_000 picoseconds. + Weight::from_parts(38_282_000, 4086) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -996,8 +996,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792` // Estimated: `4257` - // Minimum execution time: 26_710_000 picoseconds. - Weight::from_parts(27_522_000, 4257) + // Minimum execution time: 26_661_000 picoseconds. + Weight::from_parts(27_592_000, 4257) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1009,8 +1009,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `387` // Estimated: `3852` - // Minimum execution time: 12_113_000 picoseconds. - Weight::from_parts(12_413_000, 3852) + // Minimum execution time: 11_993_000 picoseconds. + Weight::from_parts(12_353_000, 3852) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1026,8 +1026,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `454` // Estimated: `3919` - // Minimum execution time: 18_565_000 picoseconds. - Weight::from_parts(19_086_000, 3919) + // Minimum execution time: 18_374_000 picoseconds. + Weight::from_parts(18_755_000, 3919) .saturating_add(RocksDbWeight::get().reads(4_u64)) } } diff --git a/substrate-node/pallets/pallet-tft-bridge/src/weights.rs b/substrate-node/pallets/pallet-tft-bridge/src/weights.rs index 0c69c8cdd..8763e9d61 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/weights.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_tft_bridge //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-08-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `66e77d0da08f`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -55,8 +55,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `256` // Estimated: `1741` - // Minimum execution time: 7_184_000 picoseconds. - Weight::from_parts(7_525_000, 1741) + // Minimum execution time: 7_174_000 picoseconds. + Weight::from_parts(7_444_000, 1741) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -66,8 +66,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `289` // Estimated: `1774` - // Minimum execution time: 7_153_000 picoseconds. - Weight::from_parts(7_394_000, 1774) + // Minimum execution time: 7_053_000 picoseconds. + Weight::from_parts(7_314_000, 1774) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -77,8 +77,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_235_000 picoseconds. - Weight::from_parts(2_385_000, 0) + // Minimum execution time: 2_234_000 picoseconds. + Weight::from_parts(2_374_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:0 w:1) @@ -87,8 +87,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_184_000 picoseconds. - Weight::from_parts(2_295_000, 0) + // Minimum execution time: 2_224_000 picoseconds. + Weight::from_parts(2_335_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::DepositFee` (r:0 w:1) @@ -97,8 +97,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_284_000 picoseconds. - Weight::from_parts(2_344_000, 0) + // Minimum execution time: 2_184_000 picoseconds. + Weight::from_parts(2_305_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:1 w:0) @@ -115,8 +115,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3593` - // Minimum execution time: 43_822_000 picoseconds. - Weight::from_parts(44_784_000, 3593) + // Minimum execution time: 43_151_000 picoseconds. + Weight::from_parts(43_813_000, 3593) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -136,8 +136,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `499` // Estimated: `3964` - // Minimum execution time: 61_426_000 picoseconds. - Weight::from_parts(62_288_000, 3964) + // Minimum execution time: 59_853_000 picoseconds. + Weight::from_parts(60_825_000, 3964) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -151,8 +151,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `631` // Estimated: `4096` - // Minimum execution time: 26_129_000 picoseconds. - Weight::from_parts(26_690_000, 4096) + // Minimum execution time: 25_599_000 picoseconds. + Weight::from_parts(26_581_000, 4096) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -166,8 +166,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `571` // Estimated: `4036` - // Minimum execution time: 18_625_000 picoseconds. - Weight::from_parts(19_167_000, 4036) + // Minimum execution time: 18_165_000 picoseconds. + Weight::from_parts(18_625_000, 4036) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -179,8 +179,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `385` // Estimated: `3850` - // Minimum execution time: 21_801_000 picoseconds. - Weight::from_parts(22_292_000, 3850) + // Minimum execution time: 21_491_000 picoseconds. + Weight::from_parts(22_082_000, 3850) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -194,8 +194,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `560` // Estimated: `4025` - // Minimum execution time: 18_846_000 picoseconds. - Weight::from_parts(19_317_000, 4025) + // Minimum execution time: 18_675_000 picoseconds. + Weight::from_parts(19_096_000, 4025) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -209,8 +209,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `256` // Estimated: `1741` - // Minimum execution time: 7_184_000 picoseconds. - Weight::from_parts(7_525_000, 1741) + // Minimum execution time: 7_174_000 picoseconds. + Weight::from_parts(7_444_000, 1741) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -220,8 +220,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `289` // Estimated: `1774` - // Minimum execution time: 7_153_000 picoseconds. - Weight::from_parts(7_394_000, 1774) + // Minimum execution time: 7_053_000 picoseconds. + Weight::from_parts(7_314_000, 1774) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -231,8 +231,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_235_000 picoseconds. - Weight::from_parts(2_385_000, 0) + // Minimum execution time: 2_234_000 picoseconds. + Weight::from_parts(2_374_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:0 w:1) @@ -241,8 +241,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_184_000 picoseconds. - Weight::from_parts(2_295_000, 0) + // Minimum execution time: 2_224_000 picoseconds. + Weight::from_parts(2_335_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::DepositFee` (r:0 w:1) @@ -251,8 +251,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_284_000 picoseconds. - Weight::from_parts(2_344_000, 0) + // Minimum execution time: 2_184_000 picoseconds. + Weight::from_parts(2_305_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `TFTBridgeModule::WithdrawFee` (r:1 w:0) @@ -269,8 +269,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3593` - // Minimum execution time: 43_822_000 picoseconds. - Weight::from_parts(44_784_000, 3593) + // Minimum execution time: 43_151_000 picoseconds. + Weight::from_parts(43_813_000, 3593) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -290,8 +290,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `499` // Estimated: `3964` - // Minimum execution time: 61_426_000 picoseconds. - Weight::from_parts(62_288_000, 3964) + // Minimum execution time: 59_853_000 picoseconds. + Weight::from_parts(60_825_000, 3964) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -305,8 +305,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `631` // Estimated: `4096` - // Minimum execution time: 26_129_000 picoseconds. - Weight::from_parts(26_690_000, 4096) + // Minimum execution time: 25_599_000 picoseconds. + Weight::from_parts(26_581_000, 4096) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -320,8 +320,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `571` // Estimated: `4036` - // Minimum execution time: 18_625_000 picoseconds. - Weight::from_parts(19_167_000, 4036) + // Minimum execution time: 18_165_000 picoseconds. + Weight::from_parts(18_625_000, 4036) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -333,8 +333,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `385` // Estimated: `3850` - // Minimum execution time: 21_801_000 picoseconds. - Weight::from_parts(22_292_000, 3850) + // Minimum execution time: 21_491_000 picoseconds. + Weight::from_parts(22_082_000, 3850) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -348,8 +348,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `560` // Estimated: `4025` - // Minimum execution time: 18_846_000 picoseconds. - Weight::from_parts(19_317_000, 4025) + // Minimum execution time: 18_675_000 picoseconds. + Weight::from_parts(19_096_000, 4025) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } diff --git a/substrate-node/pallets/pallet-tft-price/src/weights.rs b/substrate-node/pallets/pallet-tft-price/src/weights.rs index 7aeeb7b44..b641c602a 100644 --- a/substrate-node/pallets/pallet-tft-price/src/weights.rs +++ b/substrate-node/pallets/pallet-tft-price/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_tft_price //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-08-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `66e77d0da08f`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -61,8 +61,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `235` // Estimated: `6175` - // Minimum execution time: 29_997_000 picoseconds. - Weight::from_parts(30_979_000, 6175) + // Minimum execution time: 29_145_000 picoseconds. + Weight::from_parts(29_967_000, 6175) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -74,7 +74,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 5_109_000 picoseconds. + // Minimum execution time: 5_059_000 picoseconds. Weight::from_parts(5_230_000, 1578) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -87,8 +87,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 5_099_000 picoseconds. - Weight::from_parts(5_230_000, 1578) + // Minimum execution time: 5_130_000 picoseconds. + Weight::from_parts(5_250_000, 1578) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -116,8 +116,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `235` // Estimated: `6175` - // Minimum execution time: 29_997_000 picoseconds. - Weight::from_parts(30_979_000, 6175) + // Minimum execution time: 29_145_000 picoseconds. + Weight::from_parts(29_967_000, 6175) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -129,7 +129,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 5_109_000 picoseconds. + // Minimum execution time: 5_059_000 picoseconds. Weight::from_parts(5_230_000, 1578) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -142,8 +142,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `93` // Estimated: `1578` - // Minimum execution time: 5_099_000 picoseconds. - Weight::from_parts(5_230_000, 1578) + // Minimum execution time: 5_130_000 picoseconds. + Weight::from_parts(5_250_000, 1578) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/pallets/pallet-validator/src/weights.rs b/substrate-node/pallets/pallet-validator/src/weights.rs index e59e703ab..64a6b5ae5 100644 --- a/substrate-node/pallets/pallet-validator/src/weights.rs +++ b/substrate-node/pallets/pallet-validator/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for pallet_validator //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-08-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `66e77d0da08f`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -50,8 +50,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 9_628_000 picoseconds. - Weight::from_parts(9_989_000, 3507) + // Minimum execution time: 9_799_000 picoseconds. + Weight::from_parts(10_259_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -65,8 +65,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `365` // Estimated: `3830` - // Minimum execution time: 25_148_000 picoseconds. - Weight::from_parts(25_538_000, 3830) + // Minimum execution time: 25_248_000 picoseconds. + Weight::from_parts(25_889_000, 3830) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -80,8 +80,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `431` // Estimated: `3896` - // Minimum execution time: 33_954_000 picoseconds. - Weight::from_parts(34_856_000, 3896) + // Minimum execution time: 34_565_000 picoseconds. + Weight::from_parts(35_016_000, 3896) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -91,8 +91,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 8_667_000 picoseconds. - Weight::from_parts(9_007_000, 3507) + // Minimum execution time: 8_596_000 picoseconds. + Weight::from_parts(9_047_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -110,8 +110,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `494` // Estimated: `4687` - // Minimum execution time: 25_188_000 picoseconds. - Weight::from_parts(25_729_000, 4687) + // Minimum execution time: 25_458_000 picoseconds. + Weight::from_parts(26_180_000, 4687) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -131,8 +131,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `558` // Estimated: `4687` - // Minimum execution time: 22_542_000 picoseconds. - Weight::from_parts(23_053_000, 4687) + // Minimum execution time: 22_794_000 picoseconds. + Weight::from_parts(23_364_000, 4687) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -146,8 +146,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 9_628_000 picoseconds. - Weight::from_parts(9_989_000, 3507) + // Minimum execution time: 9_799_000 picoseconds. + Weight::from_parts(10_259_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -161,8 +161,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `365` // Estimated: `3830` - // Minimum execution time: 25_148_000 picoseconds. - Weight::from_parts(25_538_000, 3830) + // Minimum execution time: 25_248_000 picoseconds. + Weight::from_parts(25_889_000, 3830) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -176,8 +176,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `431` // Estimated: `3896` - // Minimum execution time: 33_954_000 picoseconds. - Weight::from_parts(34_856_000, 3896) + // Minimum execution time: 34_565_000 picoseconds. + Weight::from_parts(35_016_000, 3896) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -187,8 +187,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 8_667_000 picoseconds. - Weight::from_parts(9_007_000, 3507) + // Minimum execution time: 8_596_000 picoseconds. + Weight::from_parts(9_047_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -206,8 +206,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `494` // Estimated: `4687` - // Minimum execution time: 25_188_000 picoseconds. - Weight::from_parts(25_729_000, 4687) + // Minimum execution time: 25_458_000 picoseconds. + Weight::from_parts(26_180_000, 4687) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -227,8 +227,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `558` // Estimated: `4687` - // Minimum execution time: 22_542_000 picoseconds. - Weight::from_parts(23_053_000, 4687) + // Minimum execution time: 22_794_000 picoseconds. + Weight::from_parts(23_364_000, 4687) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/substrate-node/pallets/substrate-validator-set/src/weights.rs b/substrate-node/pallets/substrate-validator-set/src/weights.rs index 5fab1aefe..5a6a896af 100644 --- a/substrate-node/pallets/substrate-validator-set/src/weights.rs +++ b/substrate-node/pallets/substrate-validator-set/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for substrate_validator_set //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-08-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4b80713dc969`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` +//! HOSTNAME: `66e77d0da08f`, CPU: `AMD Ryzen 7 5800X 8-Core Processor` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -49,8 +49,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `1624` - // Minimum execution time: 13_706_000 picoseconds. - Weight::from_parts(13_976_000, 1624) + // Minimum execution time: 14_217_000 picoseconds. + Weight::from_parts(14_588_000, 1624) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -62,8 +62,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 10_960_000 picoseconds. - Weight::from_parts(11_311_000, 1690) + // Minimum execution time: 11_501_000 picoseconds. + Weight::from_parts(11_812_000, 1690) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -75,8 +75,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `172` // Estimated: `1657` - // Minimum execution time: 12_274_000 picoseconds. - Weight::from_parts(12_604_000, 1657) + // Minimum execution time: 12_654_000 picoseconds. + Weight::from_parts(13_095_000, 1657) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -92,8 +92,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `139` // Estimated: `1624` - // Minimum execution time: 13_706_000 picoseconds. - Weight::from_parts(13_976_000, 1624) + // Minimum execution time: 14_217_000 picoseconds. + Weight::from_parts(14_588_000, 1624) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -105,8 +105,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 10_960_000 picoseconds. - Weight::from_parts(11_311_000, 1690) + // Minimum execution time: 11_501_000 picoseconds. + Weight::from_parts(11_812_000, 1690) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -118,8 +118,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `172` // Estimated: `1657` - // Minimum execution time: 12_274_000 picoseconds. - Weight::from_parts(12_604_000, 1657) + // Minimum execution time: 12_654_000 picoseconds. + Weight::from_parts(13_095_000, 1657) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 8e2ee7870..723db62f9 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -555,6 +555,7 @@ where frame_system::CheckNonce::::from(index), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(tip), + pallet_smart_contract::types::ContractIdProvides::::new(), ); #[cfg_attr(not(feature = "std"), allow(unused_variables))] @@ -772,6 +773,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + pallet_smart_contract::types::ContractIdProvides::, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = @@ -790,7 +792,9 @@ pub type Executive = frame_executive::Executive< // All migrations executed on runtime upgrade as a nested tuple of types implementing // `OnRuntimeUpgrade`. -type Migrations = (); +type Migrations = ( + pallet_smart_contract::migrations::v12::MigrateContractLockToContractPaymentState, +); // follows Substrate's non destructive way of eliminating otherwise required // repetion: https://github.com/paritytech/substrate/pull/10592 diff --git a/substrate-node/tests/integration_tests.robot b/substrate-node/tests/integration_tests.robot index d138d64a9..5ceb4c7ca 100644 --- a/substrate-node/tests/integration_tests.robot +++ b/substrate-node/tests/integration_tests.robot @@ -446,6 +446,8 @@ Test Solution Provider # Setup Setup Predefined Account who=Alice Setup Predefined Account who=Bob + Setup Predefined Account who=Charlie + Setup Predefined Account who=Dave Create Farm name=alice_farm Create Node farm_id=${1} hru=${1024} sru=${512} cru=${8} mru=${16} longitude=2.17403 latitude=41.40338 country=Belgium city=Ghent @@ -464,23 +466,6 @@ Test Solution Provider Should Not Be Equal ${solution_provider} ${None} Should Be Equal ${solution_provider}[approved] ${True} - ${balance_charlie_before} = Balance Data who=Charlie - ${balance_dave_before} = Balance Data who=Dave - # Bob will be using the node: let's create a node contract in his name - Create Node Contract node_id=${1} port=${9945} who=Bob solution_provider_id=${1} - Report Contract Resources contract_id=${1} hru=${20} sru=${20} cru=${2} mru=${4} - Add Nru Reports contract_id=${1} nru=${3} - # Wait 6 blocks: after 5 blocks Bob should be billed - Wait X Blocks ${6} - # Cancel the contract so that the bill is distributed and so that the providers get their part - Cancel Node Contract contract_id=${1} who=Bob - - # Verification: both providers should have received their part - ${balance_charlie_after} = Balance Data who=Charlie - ${balance_dave_after} = Balance Data who=Dave - Ensure Account Balance Increased ${balance_charlie_before} ${balance_charlie_after} - Ensure Account Balance Increased ${balance_dave_before} ${balance_dave_after} - Tear Down Multi Node Network Test Client Go integration tests From d4e15e206974dfadc7fd07a1d082fe25205e7cd6 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Tue, 27 Aug 2024 19:32:26 +0300 Subject: [PATCH 44/44] Bump version to 2.9.0 (spec v152) (#998) --- .../helm/tfchainactivationservice/Chart.yaml | 4 +-- activation-service/package.json | 2 +- .../chart/tfchainbridge/Chart.yaml | 4 +-- clients/tfchain-client-js/package.json | 2 +- scripts/package.json | 2 +- substrate-node/Cargo.lock | 26 +++++++++---------- substrate-node/Cargo.toml | 2 +- .../charts/substrate-node/Chart.yaml | 4 +-- substrate-node/runtime/src/lib.rs | 2 +- tools/fork-off-substrate/package.json | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/activation-service/helm/tfchainactivationservice/Chart.yaml b/activation-service/helm/tfchainactivationservice/Chart.yaml index bf706beb8..0a4afa782 100644 --- a/activation-service/helm/tfchainactivationservice/Chart.yaml +++ b/activation-service/helm/tfchainactivationservice/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainactivationservice description: TFchain account activation funding service type: application -version: 2.8.1 -appVersion: '2.8.1' +version: 2.9.0 +appVersion: '2.9.0' diff --git a/activation-service/package.json b/activation-service/package.json index 973e9e6b5..95cd30c93 100644 --- a/activation-service/package.json +++ b/activation-service/package.json @@ -1,6 +1,6 @@ { "name": "substrate-funding-service", - "version": "2.8.1", + "version": "2.9.0", "description": "Substrate funding service", "main": "index.js", "scripts": { diff --git a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml index 124d7166a..59581355e 100644 --- a/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml +++ b/bridge/tfchain_bridge/chart/tfchainbridge/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: tfchainbridge description: Bridge for TFT between Tfchain Stellar type: application -version: 2.8.1 -appVersion: '2.8.1' +version: 2.9.0 +appVersion: '2.9.0' diff --git a/clients/tfchain-client-js/package.json b/clients/tfchain-client-js/package.json index c5c5ef53c..5b4ab23c2 100644 --- a/clients/tfchain-client-js/package.json +++ b/clients/tfchain-client-js/package.json @@ -1,6 +1,6 @@ { "name": "tfgrid-api-client", - "version": "2.8.1", + "version": "2.9.0", "description": "API client for the TF Grid", "main": "index.js", "scripts": { diff --git a/scripts/package.json b/scripts/package.json index f21895495..d7bba576f 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -1,6 +1,6 @@ { "name": "tfchain-js-scripts", - "version": "2.8.1", + "version": "2.9.0", "description": "scripts to fetch data / write data to tfchain", "main": "index.js", "scripts": { diff --git a/substrate-node/Cargo.lock b/substrate-node/Cargo.lock index 490b1145c..a284cc150 100644 --- a/substrate-node/Cargo.lock +++ b/substrate-node/Cargo.lock @@ -4590,7 +4590,7 @@ dependencies = [ [[package]] name = "pallet-burning" -version = "2.8.1" +version = "2.9.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -4625,7 +4625,7 @@ dependencies = [ [[package]] name = "pallet-dao" -version = "2.8.1" +version = "2.9.0" dependencies = [ "env_logger", "frame-benchmarking", @@ -4671,7 +4671,7 @@ dependencies = [ [[package]] name = "pallet-kvstore" -version = "2.8.1" +version = "2.9.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -4704,7 +4704,7 @@ dependencies = [ [[package]] name = "pallet-runtime-upgrade" -version = "2.8.1" +version = "2.9.0" dependencies = [ "frame-support", "frame-system", @@ -4773,7 +4773,7 @@ dependencies = [ [[package]] name = "pallet-smart-contract" -version = "2.8.1" +version = "2.9.0" dependencies = [ "env_logger", "frame-benchmarking", @@ -4826,7 +4826,7 @@ dependencies = [ [[package]] name = "pallet-tfgrid" -version = "2.8.1" +version = "2.9.0" dependencies = [ "env_logger", "frame-benchmarking", @@ -4855,7 +4855,7 @@ dependencies = [ [[package]] name = "pallet-tft-bridge" -version = "2.8.1" +version = "2.9.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -4874,7 +4874,7 @@ dependencies = [ [[package]] name = "pallet-tft-price" -version = "2.8.1" +version = "2.9.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -4979,7 +4979,7 @@ dependencies = [ [[package]] name = "pallet-validator" -version = "2.8.1" +version = "2.9.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8378,7 +8378,7 @@ dependencies = [ [[package]] name = "substrate-validator-set" -version = "2.8.1" +version = "2.9.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8518,7 +8518,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "tfchain" -version = "2.8.1" +version = "2.9.0" dependencies = [ "clap", "frame-benchmarking", @@ -8564,7 +8564,7 @@ dependencies = [ [[package]] name = "tfchain-runtime" -version = "2.8.1" +version = "2.9.0" dependencies = [ "frame-benchmarking", "frame-executive", @@ -8618,7 +8618,7 @@ dependencies = [ [[package]] name = "tfchain-support" -version = "2.8.1" +version = "2.9.0" dependencies = [ "frame-support", "frame-system", diff --git a/substrate-node/Cargo.toml b/substrate-node/Cargo.toml index cbd239d08..fe6414578 100644 --- a/substrate-node/Cargo.toml +++ b/substrate-node/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://threefold.io/" license-file = "LICENSE" readme = "README.md" repository = "https://github.com/threefoldtech/tfchain3" -version = "2.8.1" +version = "2.9.0" [workspace] members = [ diff --git a/substrate-node/charts/substrate-node/Chart.yaml b/substrate-node/charts/substrate-node/Chart.yaml index 534d57d23..7bac135d4 100644 --- a/substrate-node/charts/substrate-node/Chart.yaml +++ b/substrate-node/charts/substrate-node/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: substrate-node description: Tfchain node type: application -version: 2.8.1 -appVersion: '2.8.1' +version: 2.9.0 +appVersion: '2.9.0' diff --git a/substrate-node/runtime/src/lib.rs b/substrate-node/runtime/src/lib.rs index 723db62f9..40d0d261d 100644 --- a/substrate-node/runtime/src/lib.rs +++ b/substrate-node/runtime/src/lib.rs @@ -154,7 +154,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("substrate-threefold"), impl_name: create_runtime_str!("substrate-threefold"), authoring_version: 1, - spec_version: 151, + spec_version: 152, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/tools/fork-off-substrate/package.json b/tools/fork-off-substrate/package.json index dd7fe1374..98a0e7e7d 100644 --- a/tools/fork-off-substrate/package.json +++ b/tools/fork-off-substrate/package.json @@ -1,6 +1,6 @@ { "name": "fork-off-substrate", - "version": "2.8.1", + "version": "2.9.0", "description": "This script allows bootstrapping a new substrate chain with the current state of a live chain", "main": "index.js", "scripts": {