purestake / moonbeam Goto Github PK
View Code? Open in Web Editor NEWAn Ethereum-compatible smart contract parachain on Polkadot
Home Page: https://moonbeam.network
License: GNU General Public License v3.0
An Ethereum-compatible smart contract parachain on Polkadot
Home Page: https://moonbeam.network
License: GNU General Public License v3.0
This issue is to address @4meta5's points originally posted in #204 (comment)
The code he is critiquing is present in our nodes.
standalone: https://github.com/PureStake/moonbeam/blob/f21b0486fce862ed335ea3b22add51c747ed3b29/node/standalone/src/service.rs#L310
parachain: https://github.com/PureStake/moonbeam/blob/f21b0486fce862ed335ea3b22add51c747ed3b29/node/parachain/src/service.rs#L249
cc @tgmichel
The author inherent currently ensures that the author is set in on_finalize by making sure the storage item is updated. This is semantically correct but has the significant performance disadvantage that the block must be executed in its entirety to determine whether the author has been set.
This can be remedied by adding a Verifier that we insert into the block import pipeline (just like the aura block import) that checks for the author set in the header.
This could be further configured to work with eg staking by exposing the set of current validators via a runtime api and having the verifier confirm that the author from the header is one of the staked authors. Thinking more about it, this runtime api coudl just be a wrapper around the existing CanAuthor
implementation.
Version: 0.9.1-78d1dae-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:595:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:497:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:493:5
5: core::panicking::panic_fmt
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/panicking.rs:92:14
6: core::option::expect_failed
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/option.rs:1292:5
7: sc_client_db::Backend::try_commit_operation
8: <sc_client_db::Backend as sc_client_api::backend::Backend>::commit_operation
9: <sc_service::client::client::Client<B,E,Block,RA> as sc_client_api::backend::LockImportRun<Block,B>>::lock_import_and_run::{{closure}}
10: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
11: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
12: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
14: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
15: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
16: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
17: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
18: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll
19: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
20: <tracing_futures::Instrumented as core::future::future::Future>::poll
21: std::thread::local::LocalKey::with
22: futures_executor::local_pool::block_on
23: tokio::runtime::task::core::Core<T,S>::poll
24: tokio::runtime::task::harness::Harness<T,S>::poll::{{closure}}
25: tokio::runtime::task::harness::Harness<T,S>::poll
26: tokio::runtime::blocking::pool::Inner::run
27: tokio::runtime::context::enter
28: std::sys_common::backtrace::__rust_begin_short_backtrace
29: core::ops::function::FnOnce::call_once{{vtable.shim}}
30: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys/unix/thread.rs:71:17
31: start_thread
32: clone
Thread 'tokio-runtime-worker' panicked at 'existence of block with number new_canonical
implies existence of blocks with all numbers before it; qed', /home/gh-actions/.cargo/git/checkouts/substrate-7e08433d4c370a21/9c57262/client/db/src/lib.rs:1218
This ticket is automatically generated using
$ yarn run print-version-bump-info --from v0.9.3 --to v0.9.4
paritytech/substrate@polkadot-v0.9.3...polkadot-v0.9.4
from: c94e0cdfe5556680dca1996004751eeb114755d7
to: 1d04678e20555e623c974ee1127bc8a45abcf3d6
commits: 54
paritytech/polkadot@release-v0.9.3...release-v0.9.4
from: aa386760948574af4078c59decf558d16efe15e2
to: 2f28561a09aab0613b5f8a68fbabf723d5fc197e
commits: 41
paritytech/cumulus@polkadot-v0.9.3...polkadot-v0.9.4
from: 78b31b21122995b49f3c2cfe2791f188e33e5917
to: 08b7bcfe21b2ce2a26dcdaa664bf8c016f7c93ae
commits: 15
(paritytech/substrate#8724) Migrate pallet-grandpa to attribute macros
(paritytech/substrate#8793) Simple MaxBoundedLen
Implementations
(paritytech/substrate#8825) Migrate pallet-scored-pool to pallet attribute macro
(paritytech/substrate#8824) Migrate pallet-democracy to pallet attribute macro
(paritytech/polkadot#2994) Companion for substrate#8724
(paritytech/substrate#8903) add an absolute measure of election score on-chain as a parameter
(paritytech/polkadot#3093) Introduce polkadot code substitute
(paritytech/polkadot#3099) Companion for substrate/pull/8903
(paritytech/polkadot#3167) Fix teleport accounting and add some events
(paritytech/substrate#8793) Simple MaxBoundedLen
Implementations
(paritytech/substrate#8924) Make Schedule
fields public to allow for customization
(paritytech/substrate#8813) Uniques: An economically-secure basic-featured NFT pallet
(paritytech/substrate#8824) Migrate pallet-democracy to pallet attribute macro
(paritytech/substrate#9009) Add Call Filter That Prevents Nested batch_all
(paritytech/polkadot#3099) Companion for substrate/pull/8903
(paritytech/polkadot#2994) Companion for substrate#8724
(paritytech/polkadot#3118) Companion for #8793 (Simple MaxEncodedLen)
(paritytech/polkadot#3167) Fix teleport accounting and add some events
(paritytech/substrate#8913) Update wasmtime to 0.27
(paritytech/substrate#8963) Transaction pool: Ensure that we prune transactions properly
(paritytech/substrate#8724) Migrate pallet-grandpa to attribute macros
(paritytech/substrate#8825) Migrate pallet-scored-pool to pallet attribute macro
(paritytech/substrate#8932) Refactor BlockRequestHandler
(paritytech/substrate#8801) Allow usage of path in construct_runtime!
(paritytech/polkadot#3093) Introduce polkadot code substitute
(paritytech/polkadot#2990) Companion PR for #8748
(paritytech/polkadot#3133) fix approval-checking GRANDPA voting rule
(paritytech/cumulus#451) Check that we have set the validation data inherent
(paritytech/cumulus#454) Update Substrate & Polkadot
(paritytech/cumulus#459) Do not require the collator key to be passed
(paritytech/cumulus#460) Statemine Release Prep
(paritytech/cumulus#464) Decrease log levels
(paritytech/cumulus#462) Add srtool + subwasm workflow
(paritytech/cumulus#469) Update Substrate & Polkadot
(paritytech/cumulus#470) Add raw chainspecs for Westmint and Statemine
This issue was discovered while studying the mechanics of weight in relation to gas.
This issue was reproduced from the master branch, the standalone chain, with commit: 4b6979e
To reproduce this problem, I use the following smart contract:
pragma solidity >=0.4.22;
contract LargeContract {
uint256 number;
constructor() public { number = 4242; }
function store(uint256 num) public { number = num; }
function retrieve() public view returns (uint256) { return number; }
function big_loop(uint256 target) public returns (uint256) {
for (uint i = 0; i < target; i++) {
number += 1;
}
return number;
}
}
(I realize the increment mechanism in that loop is the opposite of smart, but the non-optimized form of this contract was being used to study the effect on gas)
In compiled (non-optimized) form, this smart contract compiles to the following binary (compiled using remix; also the ABI below was derived from remix):
608060405234801561001057600080fd5b50611092600081905550610155806100296000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630f14a406146100465780632e64cec1146100885780636057361d146100a6575b600080fd5b6100726004803603602081101561005c57600080fd5b81019080803590602001909291905050506100d4565b6040518082815260200191505060405180910390f35b61009061010c565b6040518082815260200191505060405180910390f35b6100d2600480360360208110156100bc57600080fd5b8101908080359060200190929190505050610115565b005b600080600090505b82811015610101576001600080828254019250508190555080806001019150506100dc565b506000549050919050565b60008054905090565b806000819055505056fea26469706673582212203e6324d7303f3695b0272acdb1278be310ba634e3df295d22a3f7d2910f91ccd64736f6c63430006060033
This is how to reproduce this issue, from a high-level perspective:
retrieve()
, which will return 4242.big_loop(10)
, and it will return 4252, since we added 10 to number
retrieve()
again, and you'll get the value 4242.The function call big_loop()
should've increased the value of number
. It did that in the big_loop call, and return the correct value 4252. However, the state in the blockchain isn't updated. That's the bug.
You can reproduce the issue while running your own moonbeam node. This is how I did it:
node/standalone
cargo build
curl -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_sendRawTransaction", "params": ["0xf901cc8001831000008080b9017e608060405234801561001057600080fd5b50611092600081905550610155806100296000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630f14a406146100465780632e64cec1146100885780636057361d146100a6575b600080fd5b6100726004803603602081101561005c57600080fd5b81019080803590602001909291905050506100d4565b6040518082815260200191505060405180910390f35b61009061010c565b6040518082815260200191505060405180910390f35b6100d2600480360360208110156100bc57600080fd5b8101908080359060200190929190505050610115565b005b600080600090505b82811015610101576001600080828254019250508190555080806001019150506100dc565b506000549050919050565b60008054905090565b806000819055505056fea26469706673582212203e6324d7303f3695b0272acdb1278be310ba634e3df295d22a3f7d2910f91ccd64736f6c634300060600337aa04b9e6e48161093528b059a4dc91e4aab91347cd7594918aea5bd2ec864d61a0ea01a63382b0bb569ee5cb2e3f8c3bfa4466e36d374568dbdb530257a60acf91c83"]}' http://localhost:9933/
big_loop
with parameter value 10:
curl -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_sendRawTransaction", "params": ["0xf87201018310000080820200a40f14a406000000000000000000000000000000000000000000000000000000000000000a79a02d7c1f3a6b40cd045ed2a12e91d1b0167e3b69f6419851d3789efcb05cac049ba0301094b44d78d9aeafa9801f4c7865e12304fe370f9d6d15d38fcc064c784a36"]}' http://localhost:9933/
eth_call
with the smart contract function retrieve()
to get the value of number
. Remember that you cannot use transactions for view functions. It doesn't make sense or work that way. Calling this curl command will return the value.
curl -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_call", "params": [{"to": "0xc2bf5f29a4384b1ab0c063e1c666f02121b6084a", "data": "0x2e64cec1"}]}' http://localhost:9933/
c
from above, and you'll notice that you'll get an empty response. Good; we still haven't deployed the contract.a
, and you'll get some non-error response.c
again, and you'll get a response with value 0x0000000000000000000000000000000000000000000000000000000000001092
, which translates to 4242 in decimal. Perfect!b
, which is supposed to increment number by 10. You'll get some non-error response.b
again, and you'll find that it won't work (with a stale error) since the nonce is not incremented. So, we know the transaction was accepted.c
again, and you'll notice that the value is still 0x1092
. Meaning: Command b
didn't mutate the number
value on the blockchain.If you're curious how I created these commands, it was basically done using a test that's based on contract-methods test. The following is that test. It demonstrates the same problem.
import { expect } from "chai";
import { createAndFinalizeBlock, customRequest, describeWithMoonbeam } from "./util";
import { AbiItem } from "web3-utils";
describeWithMoonbeam("Moonbeam RPC (Contract gas consumption)", `simple-specs.json`, (context) => {
const GENESIS_ACCOUNT = "0x6be02d1d3665660d22ff9624b7be0551ee1ac91b";
const GENESIS_ACCOUNT_PRIVATE_KEY = "0x99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342";
/*
// Contract used to produce this bytecode:
pragma solidity >=0.4.22;
contract LargeContract {
uint256 number;
constructor() public { number = 4242; }
function store(uint256 num) public { number = num; }
function retrieve() public view returns (uint256) { return number; }
function big_loop(uint256 target) public returns (uint256) {
for (uint i = 0; i < target; i++) {
number += 1;
}
return number;
}
}
*/
const TEST_CONTRACT_BYTECODE =
"608060405234801561001057600080fd5b50611092600081905550610155806100296000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630f14a406146100465780632e64cec1146100885780636057361d146100a6575b600080fd5b6100726004803603602081101561005c57600080fd5b81019080803590602001909291905050506100d4565b6040518082815260200191505060405180910390f35b61009061010c565b6040518082815260200191505060405180910390f35b6100d2600480360360208110156100bc57600080fd5b8101908080359060200190929190505050610115565b005b600080600090505b82811015610101576001600080828254019250508190555080806001019150506100dc565b506000549050919050565b60008054905090565b806000819055505056fea26469706673582212203e6324d7303f3695b0272acdb1278be310ba634e3df295d22a3f7d2910f91ccd64736f6c63430006060033";
const TEST_CONTRACT_ABI = {
constant: false,
inputs: [{ "name": "target", "type": "uint256" }],
name: "big_loop",
outputs: [{ "name": "", "type": "uint256" }],
payable: false,
stateMutability: "nonpayable",
type: "function",
} as AbiItem;
const TEST_CONTRACT_GETTER_ABI = {
inputs: [],
name: "retrieve",
outputs: [{ "name": "", "type": "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
} as AbiItem;
const FIRST_CONTRACT_ADDRESS = "0xc2bf5f29a4384b1ab0c063e1c666f02121b6084a"; // Those test are ordered. In general this should be avoided, but due to the time it takes // to spin up a Moonbeam node, it saves a lot of time.
before("create the contract", async function () {
this.timeout(15000000);
const tx = await context.web3.eth.accounts.signTransaction(
{
from: GENESIS_ACCOUNT,
data: TEST_CONTRACT_BYTECODE,
value: "0x00",
gasPrice: "0x01",
gas: "0x100000",
nonce: 0,
},
GENESIS_ACCOUNT_PRIVATE_KEY
);
console.log("RAW TX1: " + tx.rawTransaction);
await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]);
await createAndFinalizeBlock(context.web3);
});
it("mutate the contract", async function () {
this.timeout(15000000);
const contract = new context.web3.eth.Contract([TEST_CONTRACT_ABI], FIRST_CONTRACT_ADDRESS, {
from: GENESIS_ACCOUNT,
gasPrice: "0x1000",
gas: 100000,
});
let param = 10;
let call_data = contract.methods.big_loop(param).encodeABI();
expect(await contract.methods.big_loop(param).call()).to.equal((param + 4242).toString());
const tx = await context.web3.eth.accounts.signTransaction(
{
from: GENESIS_ACCOUNT,
data: call_data,
value: "0x200",
gasPrice: "0x01",
gas: "0x100000",
nonce: 1,
},
GENESIS_ACCOUNT_PRIVATE_KEY
);
console.log("RAW TX2: " + tx.rawTransaction);
await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]);
await createAndFinalizeBlock(context.web3);
expect(await contract.methods.big_loop(param).call()).to.equal((param + 4242).toString());
});
it("Test the new value of the mutated contract member variable", async function () {
this.timeout(15000000);
const contract = new context.web3.eth.Contract([TEST_CONTRACT_GETTER_ABI], FIRST_CONTRACT_ADDRESS, {
from: GENESIS_ACCOUNT,
gasPrice: "0x1000",
gas: 100000,
});
console.log("heeeeeeeeeeeeeeeeeeeeeeeeeeere");
let call_data = contract.methods.retrieve().encodeABI();
console.log("RAW DATA2: " + call_data);
expect(await contract.methods.retrieve().call()).to.equal("4252");
});
});
To use this test, just put it in the directory tests/tests
in some new file, and call (assuming you did already npm install
):
MOONBEAM_LOG='info,rpc=trace,evm=trace,ethereum=trace' npm test -- -g "Contract gas consumption"
This ticket is automatically generated using
$ yarn run print-version-bump-info --from v0.9.6 --to v0.9.7
paritytech/substrate@polkadot-v0.9.6...polkadot-v0.9.7
from: 9c572625f6557dfdb19f47474369a0327d51dfbc
to: 9c572625f6557dfdb19f47474369a0327d51dfbc
commits: 0
paritytech/polkadot@release-v0.9.6...release-v0.9.7
from: 63667acb674776f18d07a97032e56efe4e72bcd6
to: 5d35bac7408a4cb12a578764217d06f3920b36aa
commits: 2
paritytech/cumulus@polkadot-v0.9.6...polkadot-v0.9.7
from: e11ed73ba342fc1aaafaf86979c987ea8d035544
to: c5c3abf7eb9d4fdfb588d6560efaa8dca66a8dbc
commits: 1
May 16 16:07:34 localhost moonbase[18453]: ====================
May 16 16:07:34 localhost moonbase[18453]: Version: 0.7.0-ab035b2-x86_64-linux-gnu
May 16 16:07:34 localhost moonbase[18453]: 0: sp_panic_handler::set::{{closure}}
May 16 16:07:34 localhost moonbase[18453]: 1: std::panicking::rust_panic_with_hook
May 16 16:07:34 localhost moonbase[18453]: at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/std/src/panicking.rs:595:17
May 16 16:07:34 localhost moonbase[18453]: 2: std::panicking::begin_panic::{{closure}}
May 16 16:07:34 localhost moonbase[18453]: 3: std::sys_common::backtrace::__rust_end_short_backtrace
May 16 16:07:34 localhost moonbase[18453]: 4: std::panicking::begin_panic
May 16 16:07:34 localhost moonbase[18453]: 5: frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPallets,COnRuntimeUpgrade>::final_checks
May 16 16:07:34 localhost moonbase[18453]: 6: tracing::span::Span::in_scope
May 16 16:07:34 localhost moonbase[18453]: 7: frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPallets,COnRuntimeUpgrade>::execute_block
May 16 16:07:34 localhost moonbase[18453]: 8: <moonbeam_runtime::Runtime as sp_api::runtime_decl_for_Core::Core<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic<<<account::EthereumSignature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,moonbeam_runtime::Call,account::EthereumSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion<moonbeam_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<moonbeam_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<moonbeam_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<moonbeam_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<moonbeam_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<moonbeam_runtime::Runtime>,pallet_transaction_payment::ChargeTransactionPayment<moonbeam_runtime::Runtime>)>>>>::execute_block
May 16 16:07:34 localhost moonbase[18453]: 9: sp_api::runtime_decl_for_Core::execute_block_native_call_generator::{{closure}}
May 16 16:07:34 localhost moonbase[18453]: 10: std::thread::local::LocalKey<T>::with
May 16 16:07:34 localhost moonbase[18453]: 11: sc_executor::native_executor::WasmExecutor::with_instance::{{closure}}
May 16 16:07:34 localhost moonbase[18453]: 12: sc_executor::wasm_runtime::RuntimeCache::with_instance
May 16 16:07:34 localhost moonbase[18453]: 13: <sc_executor::native_executor::NativeExecutor<D> as sp_core::traits::CodeExecutor>::call
May 16 16:07:34 localhost moonbase[18453]: 14: sp_state_machine::execution::StateMachine<B,H,N,Exec>::execute_aux
May 16 16:07:34 localhost moonbase[18453]: 15: sp_state_machine::execution::StateMachine<B,H,N,Exec>::execute_using_consensus_failure_handler
May 16 16:07:34 localhost moonbase[18453]: 16: <sc_service::client::call_executor::LocalCallExecutor<B,E> as sc_client_api::call_executor::CallExecutor<Block>>::contextual_call
May 16 16:07:34 localhost moonbase[18453]: 17: <sc_service::client::client::Client<B,E,Block,RA> as sp_api::CallApiAt<Block>>::call_api_at
May 16 16:07:34 localhost moonbase[18453]: 18: sp_api::runtime_decl_for_Core::execute_block_call_api_at
May 16 16:07:34 localhost moonbase[18453]: 19: sp_api::Core::execute_block_with_context
May 16 16:07:34 localhost moonbase[18453]: 20: <&sc_service::client::client::Client<B,E,Block,RA> as sp_consensus::block_import::BlockImport<Block>>::import_block
May 16 16:07:34 localhost moonbase[18453]: 21: <fc_consensus::FrontierBlockImport<B,I,C> as sp_consensus::block_import::BlockImport<B>>::import_block
May 16 16:07:34 localhost moonbase[18453]: 22: <alloc::boxed::Box<dyn sp_consensus::block_import::BlockImport<B>+Error = sp_consensus::error::Error+Transaction = Transaction+core::marker::Send+core::marker::Sync> as sp_consensus::block_import::BlockImport<B>>::import_block
May 16 16:07:34 localhost moonbase[18453]: 23: sp_consensus::import_queue::import_single_block_metered
May 16 16:07:34 localhost moonbase[18453]: 24: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
May 16 16:07:34 localhost moonbase[18453]: 25: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
May 16 16:07:34 localhost moonbase[18453]: 26: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
May 16 16:07:34 localhost moonbase[18453]: 27: <sc_service::task_manager::prometheus_future::PrometheusFuture<T> as core::future::future::Future>::poll
May 16 16:07:34 localhost moonbase[18453]: 28: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
May 16 16:07:34 localhost moonbase[18453]: 29: <tracing_futures::Instrumented<T> as core::future::future::Future>::poll
May 16 16:07:34 localhost moonbase[18453]: 30: std::thread::local::LocalKey<T>::with
May 16 16:07:34 localhost moonbase[18453]: 31: futures_executor::local_pool::block_on
May 16 16:07:34 localhost moonbase[18453]: 32: tokio::runtime::task::core::Core<T,S>::poll
May 16 16:07:34 localhost moonbase[18453]: 33: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
May 16 16:07:34 localhost moonbase[18453]: 34: tokio::runtime::task::harness::Harness<T,S>::poll
May 16 16:07:34 localhost moonbase[18453]: 35: tokio::runtime::blocking::pool::Inner::run
May 16 16:07:34 localhost moonbase[18453]: 36: tokio::runtime::context::enter
May 16 16:07:34 localhost moonbase[18453]: 37: std::sys_common::backtrace::__rust_begin_short_backtrace
May 16 16:07:34 localhost moonbase[18453]: 38: core::ops::function::FnOnce::call_once{{vtable.shim}}
May 16 16:07:34 localhost moonbase[18453]: 39: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
May 16 16:07:34 localhost moonbase[18453]: at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/alloc/src/boxed.rs:1480:9
May 16 16:07:34 localhost moonbase[18453]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
May 16 16:07:34 localhost moonbase[18453]: at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/alloc/src/boxed.rs:1480:9
May 16 16:07:34 localhost moonbase[18453]: std::sys::unix::thread::Thread::new::thread_start
May 16 16:07:34 localhost moonbase[18453]: at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/std/src/sys/unix/thread.rs:71:17
May 16 16:07:34 localhost moonbase[18453]: 40: start_thread
May 16 16:07:34 localhost moonbase[18453]: 41: __clone
May 16 16:07:34 localhost moonbase[18453]: Thread 'tokio-runtime-worker' panicked at 'Digest item must match that calculated.', /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/401c24e/frame/executive/src/lib.rs:449
May 16 16:07:34 localhost moonbase[18453]: This is a bug. Please report it at:
May 16 16:07:34 localhost moonbase[18453]: #011https://github.com/PureStake/moonbeam/issues/new
May 16 16:07:34 localhost moonbase[18453]: 2021-05-16 16:07:34 Block prepare storage changes error:
May 16 16:07:34 localhost moonbase[18453]: RuntimeApiError(Application(Execution(RuntimePanicked("Digest item must match that calculated."))))
May 16 16:07:34 localhost moonbase[18453]: 2021-05-16 16:07:34 💔 Error importing block 0x0dc8986de0a28602fd8956828132894cc17aecb99da6ef3b9dbe96e6764e76e4: Err(Other(ClientImport("Error at calling runtime api: Execution failed: RuntimePanicked(\"Digest item must match that calculated.\")")))
May 16 16:07:34 localhost moonbase[18453]: 2021-05-16 16:07:34 💔 Error importing block 0x7376d96833d3461dd81ed0e84523db674b4bef4dd5060dc9db63a6999dd7d89a: Err(UnknownParent)
May 16 16:07:34 localhost moonbase[18453]: 2021-05-16 16:07:34 ⚙️ Syncing 0.0 bps, target=#313091 (133 peers), best: #284999 (0x7ea2…4e85), finalized #284999 (0x7ea2…4e85), ⬇ 1.7MiB/s ⬆ 28.3kiB/s
May 16 16:07:36 localhost moonbase[18453]: 2021-05-16 16:07:36 [Relaychain] ✨ Imported #631859 (0x9dc5…4b54)
May 16 16:07:36 localhost moonbase[18453]: 2021-05-16 16:07:36 [Relaychain] 💤 Idle (44 peers), best: #631859 (0x9dc5…4b54), finalized #631856 (0x45f0…2aef), ⬇ 10.1kiB/s ⬆ 10.6kiB/s
from: 1d04678e20555e623c974ee1127bc8a45abcf3d6
to: 9c572625f6557dfdb19f47474369a0327d51dfbc
found 55 total commits in https://github.com/substrate/compare/polkadot-v0.9.4...polkadot-v0.9.6
from: 2f28561a09aab0613b5f8a68fbabf723d5fc197e
to: 63667acb674776f18d07a97032e56efe4e72bcd6
found 63 total commits in https://github.com/polkadot/compare/release-v0.9.4...release-v0.9.6
from: 08b7bcfe21b2ce2a26dcdaa664bf8c016f7c93ae
to: e11ed73ba342fc1aaafaf86979c987ea8d035544
found 14 total commits in https://github.com/cumulus/compare/polkadot-v0.9.4...polkadot-v0.9.6
(paritytech/substrate#7778) Named reserve
(paritytech/substrate#8624) Storage chain: Runtime module
(paritytech/substrate#9061) Migrate pallet-randomness-collective-flip to pallet attribute macro
(paritytech/substrate#8912) staking/election: prolonged era and emergency mode for governance submission.
(paritytech/polkadot#3198) update pvf heap page limit
(paritytech/polkadot#3201) companion for staking/election: prolonged era and emergency mode for governance submission.
(paritytech/polkadot#3088) Update FallbackStrategy
to Nothing
(paritytech/substrate#7778) Named reserve
(paritytech/substrate#8955) update ss58 type to u16
(paritytech/substrate#8909) contracts: Add new seal_call
that offers new features
(paritytech/substrate#9083) Migrate pallet-staking to pallet attribute macro
(paritytech/substrate#9085) Enforce pub calls in pallets
(paritytech/substrate#8912) staking/election: prolonged era and emergency mode for governance submission.
(paritytech/polkadot#3201) companion for staking/election: prolonged era and emergency mode for governance submission.
(paritytech/polkadot#3088) Update FallbackStrategy
to Nothing
(paritytech/substrate#8890) rpc-http-threads
cli arg
(paritytech/substrate#8624) Storage chain: Runtime module
(paritytech/substrate#9043) Delete legacy runtime metadata macros
(paritytech/substrate#8990) Use pallet names to name enum variants
(paritytech/substrate#9026) Stop sending network_state to telemetry
(paritytech/substrate#9085) Enforce pub calls in pallets
(paritytech/substrate#9016) Allow renaming storage item prefixes
(paritytech/polkadot#3198) update pvf heap page limit
(paritytech/cumulus#472) update substrate & polkadot
(paritytech/cumulus#480) Do not include :code
in the storage proof if not required
(paritytech/cumulus#477) Add session weight
(paritytech/cumulus#471) feat(ci): update runtime build workflow
(paritytech/cumulus#485) update substrate/polkadot with construct_runtime changes
(paritytech/cumulus#489) Use polkadot-client instead of polkadot service where possible
(paritytech/cumulus#490) Bring support for calling check_inherents
(paritytech/cumulus#491) Make sure system tests are checking for the correct result
(paritytech/cumulus#494) Adds support for checking the timestamp inherent while validating a block
(paritytech/cumulus#495) Rename pallet-session-benchmarking
crate
(paritytech/cumulus#486) Remove All Assets and Uniques from NonTransfer
Proxy
May 10 18:06:35 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:35.764 INFO tokio-runtime-worker substrate: ⚙️ Syncing 0.0 bps, target=#268513 (37 peers), best: #268334 (0x7da7…2b1d), finalized #268334 (0x7da7…2b1d), ⬇ 1.9kiB/s ⬆ 170.5kiB/s
May 10 18:06:36 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:36.009 INFO tokio-runtime-worker substrate: [Relaychain] 💤 Idle (41 peers), best: #541872 (0x1296…b149), finalized #541869 (0x5505…ef5e), ⬇ 0.4kiB/s ⬆ 0.3kiB/s
May 10 18:06:36 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:36.285 INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #541873 (0x6d0a…32e9)
May 10 18:06:36 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:36.363 INFO tokio-runtime-worker sc_informant: [Relaychain] ♻️ Reorg on #541873,0x6d0a…32e9 to #541873,0x4b8e…d158, common ancestor #541872,0x1296…b149
May 10 18:06:36 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:36.363 INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #541873 (0x4b8e…d158)
May 10 18:06:40 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:40.766 INFO tokio-runtime-worker substrate: 💤 Idle (36 peers), best: #268334 (0x7da7…2b1d), finalized #268334 (0x7da7…2b1d), ⬇ 1.9kiB/s ⬆ 2.1kiB/s
May 10 18:06:41 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:41.012 INFO tokio-runtime-worker substrate: [Relaychain] 💤 Idle (41 peers), best: #541873 (0x4b8e…d158), finalized #541871 (0x4aeb…260c), ⬇ 15.1kiB/s ⬆ 6.1kiB/s
May 10 18:06:42 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:42.382 INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #541874 (0x76b4…83f5)
May 10 18:06:45 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:45.766 INFO tokio-runtime-worker substrate: 💤 Idle (36 peers), best: #268334 (0x7da7…2b1d), finalized #268334 (0x7da7…2b1d), ⬇ 1.7kiB/s ⬆ 2.0kiB/s
May 10 18:06:46 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:46.012 INFO tokio-runtime-worker substrate: [Relaychain] 💤 Idle (41 peers), best: #541874 (0x76b4…83f5), finalized #541872 (0x1296…b149), ⬇ 10.7kiB/s ⬆ 6.8kiB/s
May 10 18:06:48 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:48.276 INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #541875 (0x21c7…6a0a)
May 10 18:06:50 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:50.766 INFO tokio-runtime-worker substrate: ⚙️ Syncing 0.0 bps, target=#268515 (37 peers), best: #268334 (0x7da7…2b1d), finalized #268334 (0x7da7…2b1d), ⬇ 1.6kiB/s ⬆ 1.5kiB/s
May 10 18:06:51 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:51.013 INFO tokio-runtime-worker substrate: [Relaychain] 💤 Idle (41 peers), best: #541875 (0x21c7…6a0a), finalized #541872 (0x1296…b149), ⬇ 5.2kiB/s ⬆ 2.0kiB/s
May 10 18:06:54 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:54.283 INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #541876 (0xc328…79ee)
May 10 18:06:55 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:55.766 INFO tokio-runtime-worker substrate: 💤 Idle (36 peers), best: #268334 (0x7da7…2b1d), finalized #268334 (0x7da7…2b1d), ⬇ 1.7kiB/s ⬆ 1.7kiB/s
May 10 18:06:56 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:06:56.013 INFO tokio-runtime-worker substrate: [Relaychain] 💤 Idle (41 peers), best: #541876 (0xc328…79ee), finalized #541873 (0x4b8e…d158), ⬇ 6.2kiB/s ⬆ 2.5kiB/s
May 10 18:07:00 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:07:00.278 INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #541877 (0x2f0d…f100)
May 10 18:07:00 iZt4n2abc7uh1mrayjco8hZ moonbeam[222868]: 2021-05-10 18:07:00.767 INFO tokio-runtime-worker substrate: 💤 Idle (36 peers), best: #268334 (0x7da7…2b1d), finalized #268334 (0x7da7…2b1d), ⬇ 1.6kiB/s ⬆ 1.6kiB/s
The log is above, there is no special information, you can only see that the best block cannot catch up with the target block. The number of peers shows that the p2p connection is normal. After restarting, the synchronization process can be resumed normally, and after about 4 to 5 hours, the block cannot be synchronized again.
the start commands is:
ExecStart=.../moonbeam \
--name=patract-elara-node1 \
--prometheus-external \
--chain=alphanet \
--pruning=archive \
--execution=NativeElseWasm \
--wasm-execution=Compiled \
-linfo,runtime=debug \
--base-path <somthing> \
--ws-external \
--rpc-external \
--rpc-cors=all \
--ws-max-connections=40000 \
This issue relates to Frontier and Cumulus integration.
In a parachain, the runtime is embedded in a "Cumulus" runtime. What happens is the Block
in the embedded runtime is yet to be aware of the best_chain's BlockId
passed from the frontier::rpc
. Used this way throws arbitrary errors when calling client.runtime_api()
:
let header = self.select_chain.best_chain();
client.runtime_api().account_basic(&BlockId::Number(header.number()), address);
Results in:
UnknownBlock(
"Require header: BlockId::Number(XX)",
)
If I artificially add a sleep delay (i.e. 2 seconds) after the best_chain
call in frontier::rpc
and before the actual client.runtime_api
call, then it works fine:
let header = self.select_chain.best_chain();
thread::sleep(X);
client.runtime_api().account_basic(&BlockId::Number(header.number()), address);
I'm getting this error for both 0.9.4 and 0.9.2:
-----v0.9.2----------------
2021-07-19 13:45:50 Moonbeam Parachain Collator
2021-07-19 13:45:50 ✌️ version 0.9.2-c25242f-x86_64-linux-gnu
2021-07-19 13:45:50 ❤️ by PureStake, 2019-2021
2021-07-19 13:45:50 📋 Chain specification: Moonbase Alpha
2021-07-19 13:45:50 🏷 Node name: protektwarMoonBaseValidator
2021-07-19 13:45:50 👤 Role: AUTHORITY
2021-07-19 13:45:50 💾 Database: RocksDb at /data/chains/moonbase_alpha/db
2021-07-19 13:45:50 ⛓ Native runtime: moonbase-155 (moonbase-0.tx2.au3)
2021-07-19 13:45:50 Parachain id: Id(1000)
2021-07-19 13:45:50 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ
2021-07-19 13:45:50 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000b505bc9a20d69f14620b2417b6d777c398ceb3e32119b9a53507111d1880927c03170a2e7597b7b7e3d84c0 5391d139a62b157e78786d8c082f29dcf4c11131400
2021-07-19 13:45:50 [Relaychain] 🏷 Local node identity is: 12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:45:50 [Relaychain] 📦 Highest known block at #771719
2021-07-19 13:45:50 [Relaychain] 〽️ Prometheus server started at 127.0.0.1:9616
2021-07-19 13:45:50 [Relaychain] Listening for new connections on 127.0.0.1:9945.
2021-07-19 13:45:50 [🌗] Using default protocol ID "sup" because none is configured in the chain specs
2021-07-19 13:45:50 [🌗] 🏷 Local node identity is: 12D3KooWPVuqpwB59FWNnnSLiGRc8oZduS8b2rspxnqH7yE3czB6
2021-07-19 13:45:50 [🌗] 📦 Highest known block at #350842
2021-07-19 13:45:50 [🌗] Listening for new connections on 127.0.0.1:9944.
2021-07-19 13:45:50 [🌗] 〽️ Prometheus server started at 127.0.0.1:9615
2021-07-19 13:45:51 [Relaychain] 🔍 Discovered new external address for our node: /ip4/10.2.112.229/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:45:51 [🌗] 🔍 Discovered new external address for our node: /ip4/10.2.112.226/tcp/30333/p2p/12D3KooWPVuqpwB59FWNnnSLiGRc8oZduS8b2rspxnqH7yE3czB6
2021-07-19 13:45:51 [🌗] 🔍 Discovered new external address for our node: /ip4/161.97.153.13/tcp/30333/p2p/12D3KooWPVuqpwB59FWNnnSLiGRc8oZduS8b2rspxnqH7yE3czB6
2021-07-19 13:45:51 [Relaychain] 🔍 Discovered new external address for our node: /ip4/161.97.153.13/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:45:51 [🌗] 🔍 Discovered new external address for our node: /ip4/10.2.96.226/tcp/30333/p2p/12D3KooWPVuqpwB59FWNnnSLiGRc8oZduS8b2rspxnqH7yE3czB6
2021-07-19 13:45:51 [🌗] 🔍 Discovered new external address for our node: /ip6/2a02:c206:3007:3035::1/tcp/30333/p2p/12D3KooWPVuqpwB59FWNnnSLiGRc8oZduS8b2rspxnqH7yE3czB6
2021-07-19 13:45:52 [Relaychain] 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:45:52 [Relaychain] 🔍 Discovered new external address for our node: /ip4/10.50.161.182/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:45:53 [Relaychain] 🔍 Discovered new external address for our node: /ip6/2a02:c206:3007:3035::1/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
====================
Version: 0.9.2-c25242f-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:595:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:497:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:493:5
5: core::panicking::panic_fmt
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/panicking.rs:92:14
6: core::option::expect_failed
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/option.rs:1292:5
7: sc_client_db::Backend::try_commit_operation
8: <sc_client_db::Backend as sc_client_api::backend::Backend>::commit_operation
9: <sc_service::client::client::Client<B,E,Block,RA> as sc_client_api::backend::LockImportRun<Block,B>>::lock_import_and_run::{{closure}}
10: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
11: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
12: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
14: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
15: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
16: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
17: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
18: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll
19: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
20: <tracing_futures::Instrumented as core::future::future::Future>::poll
21: std::thread::local::LocalKey::with
22: futures_executor::local_pool::block_on
23: tokio::runtime::task::core::Core<T,S>::poll
24: tokio::runtime::task::harness::Harness<T,S>::poll::{{closure}}
25: tokio::runtime::task::harness::Harness<T,S>::poll
26: tokio::runtime::blocking::pool::Inner::run
27: tokio::runtime::context::enter
28: std::sys_common::backtrace::__rust_begin_short_backtrace
29: core::ops::function::FnOnce::call_once{{vtable.shim}}
30: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys/unix/thread.rs:71:17
31: start_thread
32: clone
Thread 'tokio-runtime-worker' panicked at 'existence of block with number new_canonical
implies existence of blocks with all numbers before it; qed', /home/gh-actions/.cargo/git/checkouts/substrate- 7e08433d4c370a21/9c57262/client/db/src/lib.rs:1218
---v0.9.4----
2021-07-19 13:49:03 Moonbeam Parachain Collator
2021-07-19 13:49:03 ✌️ version 0.9.4-bdee724-x86_64-linux-gnu
2021-07-19 13:49:03 ❤️ by PureStake, 2019-2021
2021-07-19 13:49:03 📋 Chain specification: Moonbase Alpha
2021-07-19 13:49:03 🏷 Node name: protektwarMoonBaseValidator
2021-07-19 13:49:03 👤 Role: AUTHORITY
2021-07-19 13:49:03 💾 Database: RocksDb at /data/chains/moonbase_alpha/db
2021-07-19 13:49:03 ⛓ Native runtime: moonbase-156 (moonbase-0.tx2.au3)
2021-07-19 13:49:03 Parachain id: Id(1000)
2021-07-19 13:49:03 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ
2021-07-19 13:49:03 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000b505bc9a20d69f14620b2417b6d777c398ceb3e32119b9a53507111d1880927c03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400
2021-07-19 13:49:04 [Relaychain] 🏷 Local node identity is: 12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:49:04 [Relaychain] 📦 Highest known block at #771719
2021-07-19 13:49:04 [Relaychain] 〽️ Prometheus server started at 127.0.0.1:9616
2021-07-19 13:49:04 [Relaychain] Listening for new connections on 127.0.0.1:9945.
2021-07-19 13:49:04 [🌗] Using default protocol ID "sup" because none is configured in the chain specs
2021-07-19 13:49:04 [🌗] 🏷 Local node identity is: 12D3KooWPVuqpwB59FWNnnSLiGRc8oZduS8b2rspxnqH7yE3czB6
2021-07-19 13:49:04 [🌗] 📦 Highest known block at #350842
2021-07-19 13:49:04 [🌗] 〽️ Prometheus server started at 127.0.0.1:9615
2021-07-19 13:49:04 [🌗] Listening for new connections on 127.0.0.1:9944.
2021-07-19 13:49:04 [Relaychain] 🔍 Discovered new external address for our node: /ip4/10.2.112.226/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:49:04 [🌗] 🔍 Discovered new external address for our node: /ip4/161.97.153.13/tcp/30333/p2p/12D3KooWPVuqpwB59FWNnnSLiGRc8oZduS8b2rspxnqH7yE3czB6
2021-07-19 13:49:04 [Relaychain] 🔍 Discovered new external address for our node: /ip4/161.97.153.13/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:49:04 [🌗] 🔍 Discovered new external address for our node: /ip4/10.2.112.227/tcp/30333/p2p/12D3KooWPVuqpwB59FWNnnSLiGRc8oZduS8b2rspxnqH7yE3czB6
2021-07-19 13:49:04 [🌗] 🔍 Discovered new external address for our node: /ip4/10.2.96.224/tcp/30333/p2p/12D3KooWPVuqpwB59FWNnnSLiGRc8oZduS8b2rspxnqH7yE3czB6
2021-07-19 13:49:05 [Relaychain] 🔍 Discovered new external address for our node: /ip4/192.168.26.64/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:49:06 [Relaychain] 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:49:06 [Relaychain] 🔍 Discovered new external address for our node: /ip6/2a02:c206:3007:3035::1/tcp/30334/ws/p2p/12D3KooWSxD1cW5VAte5S5rUuSCsWZ2DPRLSSa4midRpxRY5xWcm
2021-07-19 13:49:07 [Relaychain] Candidate included without being backed? candidate_hash=0x5c7edb6f6b06aa5e16067f7516db680a34ae32c0fd847fad42437c0874901996
====================
Version: 0.9.4-bdee724-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:595:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:497:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:493:5
5: core::panicking::panic_fmt
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/panicking.rs:92:14
6: core::option::expect_failed
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/option.rs:1292:5
7: sc_client_db::Backend::try_commit_operation
8: <sc_client_db::Backend as sc_client_api::backend::Backend>::commit_operation
9: <sc_service::client::client::Client<B,E,Block,RA> as sc_client_api::backend::LockImportRun<Block,B>>::lock_import_and_run::{{closure}}
10: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
11: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
12: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
14: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
15: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
16: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
17: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
18: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll
19: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
20: <tracing_futures::Instrumented as core::future::future::Future>::poll
21: std::thread::local::LocalKey::with
22: futures_executor::local_pool::block_on
23: tokio::runtime::task::core::Core<T,S>::poll
24: tokio::runtime::task::harness::Harness<T,S>::poll::{{closure}}
25: tokio::runtime::task::harness::Harness<T,S>::poll
26: tokio::runtime::blocking::pool::Inner::run
27: tokio::runtime::context::enter
28: std::sys_common::backtrace::__rust_begin_short_backtrace
29: core::ops::function::FnOnce::call_once{{vtable.shim}}
30: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys/unix/thread.rs:71:17
31: start_thread
32: clone
Thread 'tokio-runtime-worker' panicked at 'existence of block with number new_canonical
implies existence of blocks with all numbers before it; qed', /home/gh-actions/.cargo/git/checkouts/substrate-7e08433d4c370a21/1b758b2/client/db/src/lib.rs:1309
====================
Version: 0.8.2-a7783b3-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:595:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:497:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:493:5
5: core::panicking::panic_fmt
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/panicking.rs:92:14
6: core::option::expect_failed
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/option.rs:1292:5
7: sc_client_db::Backend::try_commit_operation
8: <sc_client_db::Backend as sc_client_api::backend::Backend>::commit_operation
9: <sc_service::client::client::Client<B,E,Block,RA> as sc_client_api::backend::LockImportRun<Block,B>>::lock_import_and_run::{{closure}}
10: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
11: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
12: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
14: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
15: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
16: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
17: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
18: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll
19: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
20: <tracing_futures::Instrumented as core::future::future::Future>::poll
21: futures_executor::local_pool::block_on
22: tokio::runtime::task::core::Core<T,S>::poll
23: <std::panic::AssertUnwindSafe as core::ops::function::FnOnce<()>>::call_once
24: tokio::runtime::task::harness::Harness<T,S>::poll
25: tokio::runtime::blocking::pool::Inner::run
26: tokio::runtime::context::enter
27: std::sys_common::backtrace::__rust_begin_short_backtrace
28: core::ops::function::FnOnce::call_once{{vtable.shim}}
29: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys/unix/thread.rs:71:17
30: start_thread
31: clone
Thread 'tokio-runtime-worker' panicked at 'existence of block with number new_canonical
implies existence of blocks with all numbers before it; qed', /home/gh-actions/.cargo/git/checkouts/substrate-7e08433d4c370a21/1d04678/client/db/src/lib.rs:1187
This is a bug. Please report it at:
https://github.com/PureStake/moonbeam/issues/new
Out of curiosity, I'm looking for an auxiliary staking pallet as well for a new project and curious how its being used here.
Right now the compiler is stuck on 0.5 in the tutorial. To get it up to speed:
@openzeppelin/[email protected]
pragma solidity ^0.7.3;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
// This ERC-20 contract mints the specified amount of tokens to the contract creator.
contract MyToken is ERC20 {
constructor(uint256 initialSupply)
public
ERC20("MyToken", "MYTOK")
{
_mint(msg.sender, initialSupply);
}
}
compilers: {
solc: {
version: "^0.7.3"
}
},
Hi, blocks stopped growing at a height of 168242, on two different nodes at the same time
Apr 26 13:11:30 moonbeam moonbase[1012178]: ====================
Apr 26 13:11:30 moonbeam moonbase[1012178]: Version: 0.7.0-ab035b2-x86_64-linux-gnu
Apr 26 13:11:30 moonbeam moonbase[1012178]: 0: sp_panic_handler::set::{{closure}}
Apr 26 13:11:30 moonbeam moonbase[1012178]: 1: std::panicking::rust_panic_with_hook
Apr 26 13:11:30 moonbeam moonbase[1012178]: at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/std/src/panicking.rs:595:17
Apr 26 13:11:30 moonbeam moonbase[1012178]: 2: std::panicking::begin_panic::{{closure}}
Apr 26 13:11:30 moonbeam moonbase[1012178]: 3: std::sys_common::backtrace::__rust_end_short_backtrace
Apr 26 13:11:30 moonbeam moonbase[1012178]: 4: std::panicking::begin_panic
Apr 26 13:11:30 moonbeam moonbase[1012178]: 5: frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPallets,COnRuntimeUpgrade>::final_checks
Apr 26 13:11:30 moonbeam moonbase[1012178]: 6: tracing::span::Span::in_scope
Apr 26 13:11:30 moonbeam moonbase[1012178]: 7: frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPallets,COnRuntimeUpgrade>::execute_block
Apr 26 13:11:30 moonbeam moonbase[1012178]: 8: <moonbeam_runtime::Runtime as sp_api::runtime_decl_for_Core::Core<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic<<<account::EthereumSignature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,moonbeam_runtime::Call,account::EthereumSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion<moonbeam_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<moonbeam_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<moonbeam_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<moonbeam_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<moonbeam_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<moonbeam_runtime::Runtime>,pallet_transaction_payment::ChargeTransactionPayment<moonbeam_runtime::Runtime>)>>>>::execute_block
Apr 26 13:11:30 moonbeam moonbase[1012178]: 9: sp_api::runtime_decl_for_Core::execute_block_native_call_generator::{{closure}}
Apr 26 13:11:30 moonbeam moonbase[1012178]: 10: std::thread::local::LocalKey<T>::with
Apr 26 13:11:30 moonbeam moonbase[1012178]: 11: sc_executor::native_executor::WasmExecutor::with_instance::{{closure}}
Apr 26 13:11:30 moonbeam moonbase[1012178]: 12: sc_executor::wasm_runtime::RuntimeCache::with_instance
Apr 26 13:11:30 moonbeam moonbase[1012178]: 13: <sc_executor::native_executor::NativeExecutor<D> as sp_core::traits::CodeExecutor>::call
Apr 26 13:11:30 moonbeam moonbase[1012178]: 14: sp_state_machine::execution::StateMachine<B,H,N,Exec>::execute_aux
Apr 26 13:11:30 moonbeam moonbase[1012178]: 15: sp_state_machine::execution::StateMachine<B,H,N,Exec>::execute_using_consensus_failure_handler
Apr 26 13:11:30 moonbeam moonbase[1012178]: 16: <sc_service::client::call_executor::LocalCallExecutor<B,E> as sc_client_api::call_executor::CallExecutor<Block>>::contextual_call
Apr 26 13:11:30 moonbeam moonbase[1012178]: 17: <sc_service::client::client::Client<B,E,Block,RA> as sp_api::CallApiAt<Block>>::call_api_at
Apr 26 13:11:30 moonbeam moonbase[1012178]: 18: sp_api::runtime_decl_for_Core::execute_block_call_api_at
Apr 26 13:11:30 moonbeam moonbase[1012178]: 19: sp_api::Core::execute_block_with_context
Apr 26 13:11:30 moonbeam moonbase[1012178]: 20: <&sc_service::client::client::Client<B,E,Block,RA> as sp_consensus::block_import::BlockImport<Block>>::import_block
Apr 26 13:11:30 moonbeam moonbase[1012178]: 21: <fc_consensus::FrontierBlockImport<B,I,C> as sp_consensus::block_import::BlockImport<B>>::import_block
Apr 26 13:11:30 moonbeam moonbase[1012178]: 22: <alloc::boxed::Box<dyn sp_consensus::block_import::BlockImport<B>+Error = sp_consensus::error::Error+Transaction = Transaction+core::marker::Send+core::marker::Sync> as sp_consensus::block_import::BlockImport<B>>::import_block
Apr 26 13:11:30 moonbeam moonbase[1012178]: 23: sp_consensus::import_queue::import_single_block_metered
Apr 26 13:11:30 moonbeam moonbase[1012178]: 24: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
Apr 26 13:11:30 moonbeam moonbase[1012178]: 25: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
Apr 26 13:11:30 moonbeam moonbase[1012178]: 26: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
Apr 26 13:11:30 moonbeam moonbase[1012178]: 27: <sc_service::task_manager::prometheus_future::PrometheusFuture<T> as core::future::future::Future>::poll
Apr 26 13:11:30 moonbeam moonbase[1012178]: 28: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
Apr 26 13:11:30 moonbeam moonbase[1012178]: 29: <tracing_futures::Instrumented<T> as core::future::future::Future>::poll
Apr 26 13:11:30 moonbeam moonbase[1012178]: 30: std::thread::local::LocalKey<T>::with
Apr 26 13:11:30 moonbeam moonbase[1012178]: 31: futures_executor::local_pool::block_on
Apr 26 13:11:30 moonbeam moonbase[1012178]: 32: tokio::runtime::task::core::Core<T,S>::poll
Apr 26 13:11:30 moonbeam moonbase[1012178]: 33: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
Apr 26 13:11:30 moonbeam moonbase[1012178]: 34: tokio::runtime::task::harness::Harness<T,S>::poll
Apr 26 13:11:30 moonbeam moonbase[1012178]: 35: tokio::runtime::blocking::pool::Inner::run
Apr 26 13:11:30 moonbeam moonbase[1012178]: 36: tokio::runtime::context::enter
Apr 26 13:11:30 moonbeam moonbase[1012178]: 37: std::sys_common::backtrace::__rust_begin_short_backtrace
Apr 26 13:11:30 moonbeam moonbase[1012178]: 38: core::ops::function::FnOnce::call_once{{vtable.shim}}
Apr 26 13:11:30 moonbeam moonbase[1012178]: 39: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
Apr 26 13:11:30 moonbeam moonbase[1012178]: at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/alloc/src/boxed.rs:1480:9
Apr 26 13:11:30 moonbeam moonbase[1012178]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
Apr 26 13:11:30 moonbeam moonbase[1012178]: at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/alloc/src/boxed.rs:1480:9
Apr 26 13:11:30 moonbeam moonbase[1012178]: std::sys::unix::thread::Thread::new::thread_start
Apr 26 13:11:30 moonbeam moonbase[1012178]: at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/std/src/sys/unix/thread.rs:71:17
Apr 26 13:11:30 moonbeam moonbase[1012178]: 40: start_thread
Apr 26 13:11:30 moonbeam moonbase[1012178]: 41: clone
Apr 26 13:11:30 moonbeam moonbase[1012178]: Thread 'tokio-runtime-worker' panicked at 'Digest item must match that calculated.', /home/moonbeam/.cargo/git/checkouts/substrate-7e08433d4c370a21/401c24e/frame/executive/src/lib.rs:449
Apr 26 13:11:30 moonbeam moonbase[1012178]: This is a bug. Please report it at:
Apr 26 13:11:30 moonbeam moonbase[1012178]: https://github.com/PureStake/moonbeam/issues/new
Apr 26 13:11:30 moonbeam moonbase[1012178]: 2021-04-26 13:11:30 panicked at 'Digest item must match that calculated.', /home/actions/.cargo/git/checkouts/substrate-7e08433d4c370a21/401c24e/frame/executive/src/lib.rs:449:13
Apr 26 13:11:30 moonbeam moonbase[1012178]: 2021-04-26 13:11:30 Block prepare storage changes error:
Apr 26 13:11:30 moonbeam moonbase[1012178]: RuntimeApiError(Application(Execution(Wasmi(Trap(Trap { kind: Unreachable })))))
Apr 26 13:11:30 moonbeam moonbase[1012178]: 2021-04-26 13:11:30 💔 Error importing block 0x9ed77cacee00b56b1de611eeaf1e2723d3aa5a2ff68b682cf0042406d5b5c2f9: Err(Other(ClientImport("Error at calling runtime api: Execution failed: Wasmi(Trap(Trap { kind: Unreachable }))")))
Apr 26 13:11:30 moonbeam moonbase[1012178]: DigestItem: given=DigestItem::Consensus([102, 114, 111, 110], [1, 72, 63, 8, 33, 161, 222, 86, 82, 61, 23, 145, 80, 218, 0, 118, 110, 193, 126, 208, 174, 103, 219, 213, 99, 6, 30, 57, 12, 184, 218, 4, 96, 12, 179, 151, 135, 236, 206, 35, 185, 56, 164, 223, 188, 143, 157, 49, 23, 101, 7, 199, 183, 171, 205, 111, 232, 157, 54, 203, 206, 212, 65, 102, 77, 30, 159, 249, 229, 38, 121, 233, 18, 6, 13, 123, 100, 129, 189, 80, 109, 116, 29, 165, 221, 116, 142, 102, 214, 132, 113, 115, 221, 15, 70, 122, 168, 3, 79, 126, 222, 121, 188, 48, 186, 4, 70, 207, 253, 158, 177, 171, 11, 93, 233, 110, 84, 159, 44, 201, 241, 155, 25, 215, 189, 120, 204, 137, 121, 6]), expected=DigestItem::Consensus([102, 114, 111, 110], [1, 36, 154, 1, 11, 26, 110, 50, 185, 194, 1, 134, 206, 52, 182, 48, 10, 151, 171, 166, 64, 129, 62, 161, 66, 72, 147, 130, 49, 189, 29, 14, 244, 12, 179, 151, 135, 236, 206, 35, 185, 56, 164, 223, 188, 143, 157, 49, 23, 101, 7, 199, 183, 171, 205, 111, 232, 157, 54, 203, 206, 212, 65, 102, 77, 30, 159, 249, 229, 38, 121, 233, 18, 6, 13, 123, 100, 129, 189, 80, 109, 116, 29, 165, 221, 116, 142, 102, 214, 132, 113, 115, 221, 15, 70, 122, 168, 3, 79, 126, 222, 121, 188, 48, 186, 4, 70, 207, 253, 158, 177, 171, 11, 93, 233, 110, 84, 159, 44, 201, 241, 155, 25, 215, 189, 120, 204, 137, 121, 6])
Hello,
Could you guys answer a question about setting up an initial collator? Let me introduce some context first.
To attach a regular validator session key to an account, it is usually a matter of calling the insertKey
RPC endpoint but similar thing doesn't exist for the pallet-author-mapping
pallet and the add_association
method is an extrinsic that needs a collator in the first place. So it is like trying to register the first collator without a collator to produce the first block.
AuthorMappingConfig 's genesis mapping is useful for development networks and local test-nets because --alice
(or --bob
, or --fred
, etc) are fixed known keys with a gentle Substrate CLI application that automatically inserts these pre-fixed keys (https://github.com/paritytech/substrate/blob/7f09a7619c863c964a93ceb915d6e0b9ddc39e2e/primitives/session/src/lib.rs#L109-L112). Unfortunately, the same can not be said to live networks as, for example, an initial genesis mapping to Alice could be easily exploited by third-parties.
With all that said, how to set-up an initial collator to start producing blocks or how did you guys end up doing to successfully achieve this situation? Any tip would be very helpful.
Cheers
Version: 0.9.1-78d1dae-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:595:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:497:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:493:5
5: core::panicking::panic_fmt
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/panicking.rs:92:14
6: core::option::expect_failed
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/option.rs:1292:5
7: sc_client_db::Backend::try_commit_operation
8: <sc_client_db::Backend as sc_client_api::backend::Backend>::commit_operation
9: <sc_service::client::client::Client<B,E,Block,RA> as sc_client_api::backend::LockImportRun<Block,B>>::lock_import_and_run::{{closure}}
10: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
11: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
12: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
14: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
15: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
16: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
17: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
18: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll
19: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
20: <tracing_futures::Instrumented as core::future::future::Future>::poll
21: std::thread::local::LocalKey::with
22: futures_executor::local_pool::block_on
23: tokio::runtime::task::core::Core<T,S>::poll
24: tokio::runtime::task::harness::Harness<T,S>::poll::{{closure}}
25: tokio::runtime::task::harness::Harness<T,S>::poll
26: tokio::runtime::blocking::pool::Inner::run
27: tokio::runtime::context::enter
28: std::sys_common::backtrace::__rust_begin_short_backtrace
29: core::ops::function::FnOnce::call_once{{vtable.shim}}
30: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys/unix/thread.rs:71:17
31: start_thread
32: clone
Thread 'tokio-runtime-worker' panicked at 'existence of block with number new_canonical
implies existence of blocks with all numbers before it; qed', /home/gh-actions/.cargo/git/checkouts/substrate-7e08433d4c370a21/9c57262/client/db/src/lib.rs:1218
Using docker on Ubuntu 20.04
start with:
docker run --network="host" -v "/var/lib/alphanet-data:/data"
-u
--name moonbeam -it -d
purestake/moonbeam:v0.9.1
--base-path=/data
--chain alphanet
--name="razumv"
--validator
--execution wasm
--wasm-execution compiled
--pruning archive
--state-cache-size 1
--
--pruning archive
--name="razumv (Embedded Relay)"
This ticket is automatically generated using
$ yarn run print-version-bump-info --from v0.9.7 --to v0.9.8
paritytech/substrate@polkadot-v0.9.7...polkadot-v0.9.8
from: 9c572625f6557dfdb19f47474369a0327d51dfbc
to: 1b758b2a8d151d97d2242260c465b6df9cb8a7a4
commits: 59
paritytech/polkadot@release-v0.9.7...release-v0.9.8
from: 5d35bac7408a4cb12a578764217d06f3920b36aa
to: 3a10ee63c0b5703a1c802db3438ab7e01344a8ce
commits: 72
paritytech/cumulus@polkadot-v0.9.7...polkadot-v0.9.8
from: c5c3abf7eb9d4fdfb588d6560efaa8dca66a8dbc
to: 4e51d32fdc4636f2d207204a25534e01d5fddf75
commits: 19
(paritytech/cumulus#516) Propose bumping StringLimit to 128 bytes
(paritytech/cumulus#526) upgrade srtool-actions and subwasm
(paritytech/substrate#9106) Frame remove_all
with size limit.
(paritytech/substrate#9220) Move client only primitives to another dir
(paritytech/substrate#9106) Frame remove_all
with size limit.
(paritytech/substrate#8920) Add Control to Growth of the Staking Pallet
(paritytech/substrate#9088) Migrate pallet-elections to pallet attribute macro
(paritytech/substrate#9087) Migrate pallet-transaction-payment
to new pallet attribute macro
(paritytech/polkadot#3299) Set new staking limits
(paritytech/substrate#9193) Improve Staking Limits
(paritytech/polkadot#2793) Companion for Decouple Staking and Election - Part 3: Signed Phase
(paritytech/substrate#9106) Frame remove_all
with size limit.
(paritytech/substrate#9119) Result<Option<>> rather than Option<Option<>>
(paritytech/substrate#8920) Add Control to Growth of the Staking Pallet
(paritytech/substrate#9102) double the allocator limit
(paritytech/substrate#7910) Decouple Staking and Election - Part 3: Signed Phase
(paritytech/polkadot#3299) Set new staking limits
(paritytech/substrate#8623) Add PolkaFoundry, PolkaSmith SS58 address
(paritytech/substrate#9123) Prep for Altair - Add ss58 prefix
(paritytech/substrate#9106) Frame remove_all
with size limit.
(paritytech/substrate#8920) Add Control to Growth of the Staking Pallet
(paritytech/substrate#9119) Result<Option<>> rather than Option<Option<>>
(paritytech/substrate#8976) contracts: Remove weight pre charging
(paritytech/substrate#7910) Decouple Staking and Election - Part 3: Signed Phase
(paritytech/substrate#9193) Improve Staking Limits
(paritytech/polkadot#3249) Use Safe Math in XCM Builder
(paritytech/polkadot#3237) Allow Council to Use Scheduler
(paritytech/polkadot#3299) Set new staking limits
(paritytech/polkadot#3329) Use max_code_size
and max_wasm_data_size
from Parachains Configuration
(paritytech/polkadot#3346) Do not allow any crowdloan contributions during the VRF period
(paritytech/polkadot#3361) Don't allow bids for a ParaId where there is an overlapping lease period
(paritytech/substrate#8998) Decommit instance memory after a runtime call on Linux
(paritytech/substrate#9019) Make it possible to override maximum payload of RPC
(paritytech/substrate#9102) double the allocator limit
(paritytech/substrate#8884) Fast sync
(paritytech/substrate#9217) Remove txpool
as an export of sc_transaction_pool
, exporting the used components instead.
(paritytech/substrate#9220) Move client only primitives to another dir
(paritytech/substrate#8949) Emit error when construct_runtime imports a non-existent pallet part
(paritytech/polkadot#3270) improved gossip topology
(paritytech/polkadot#3333) Only fetch one collation at a time per relay parent
(paritytech/cumulus#496) WIP: Update Substrate & Polkadot
(paritytech/cumulus#497) Update Polkadot & Substrate
(paritytech/cumulus#501) Fix Max Block Weight
(paritytech/cumulus#502) Fix Benchmark Rename
(paritytech/cumulus#498) min collator check
(paritytech/cumulus#503) Fix CandidateRemoved event
(paritytech/cumulus#484) Adds a mock provider for the parachain inherent
(paritytech/cumulus#507) Refactor paths and runtime names
(paritytech/cumulus#515) add RelaychainBlockNumberProvider
(paritytech/cumulus#519) Update Substrate & Polkadot
(paritytech/cumulus#523) Update Substrate & Polkadot
(paritytech/cumulus#525) Bring back runtime upgrade test
(paritytech/cumulus#510) Fix xcmp message processing condition.
Should cover polkadot-evm/frontier#78
"Using Moonbeam Alphanet, which is using frontier, I discovered this same issue. I'm able to get the block 0 using the eth_getBlockByNumber RPC call, but using then the hash that appears there to get the block again with eth_getBlockByHash, it results in null."
And also add those to frontier
Maybe an issue on their end or maybe the instructions in the monbeam docker setup does not map ports in the instructed commands...not sure so I'm posting here.
If I try to bond with a fee of 0, which means the collator won't skim any profits off the top before dividing among all stakers, the extrinsic fails.
And it fails with the confusing error ValBondBelowMin
which made me think I wasn't bonding enough funds.
And finally, this only happens when the very first validator is bonding. After one validator has bonded, subsequent validators can bond with a fee of 0.
This ticket is automatically generated using
$ yarn run print-version-bump-info --from v0.9.6 --to v0.9.7
paritytech/substrate@polkadot-v0.9.6...polkadot-v0.9.7
from: 9c572625f6557dfdb19f47474369a0327d51dfbc
to: 9c572625f6557dfdb19f47474369a0327d51dfbc
commits: 0
paritytech/polkadot@release-v0.9.6...release-v0.9.7
from: 63667acb674776f18d07a97032e56efe4e72bcd6
to: 5d35bac7408a4cb12a578764217d06f3920b36aa
commits: 2
hello. i've founded that my node stopped. i have tried to restart it and saw this issue. after this i rebooted server, cleaned folder /var/lib/alphanet-data/* and restarted docker container, and got the same issue. logs attached
If not specified in chain specs, decimals will default to 15.
We should set it to 18, the standard decimal number for ethereum.
For some of the tests, this warning is getting triggered:
An example is:
2020-09-21 15:50:27.445 http.worker20 WARN moonbeam_runtime WARNING: An invalid gas_limit amount was submitted. Make sure your gas_limit fits within a 32-bit integer (gas_limit: 115792089237316195423570985008687907853269984665640564039457584007913129639935)
The value of gas_limit given doesn't seem to come from anywhere in the test. Is it a garbage value? This is has to be investigated and we have to understand where this number is coming from.
To reproduce: Simply run the tests with:
RUST_LOG=runtime=debug MOONBEAM_LOG='info,rpc=trace,evm=trace,ethereum=trace' npm test -- -g "should return contract method result"
And you'll see the error message printed.
2021-06-26 11:50:02 Moonbeam Parachain Collator
2021-06-26 11:50:02 ✌️ version 0.8.0-unknown-x86_64-linux-gnu
2021-06-26 11:50:02 ❤️ by PureStake, 2019-2021
2021-06-26 11:50:02 📋 Chain specification: Moonbase Alpha
2021-06-26 11:50:02 🏷 Node name: Comr8_Nga
2021-06-26 11:50:02 👤 Role: AUTHORITY
2021-06-26 11:50:02 💾 Database: RocksDb at /data/chains/moonbase_alpha/db
2021-06-26 11:50:02 ⛓ Native runtime: moonbase-40 (moonbase-1.tx2.au3)
2021-06-26 11:50:02 Parachain id: Id(1000)
2021-06-26 11:50:02 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ
2021-06-26 11:50:02 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000b505bc9a20d69f14620b2417b6d777c398ceb3e32119b9a53507111d1880927c03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400
2021-06-26 11:50:02 [Relaychain] 🏷 Local node identity is: 12D3KooWLkVaWfT5BxW1LnxYeEy78Rb9LKXCuoEX4iDYsYownQjv
2021-06-26 11:50:02 [Relaychain] 📦 Highest known block at #436285
2021-06-26 11:50:02 [Relaychain] 〽️ Prometheus server started at 127.0.0.1:9616
2021-06-26 11:50:02 [Relaychain] Listening for new connections on 127.0.0.1:9945.
2021-06-26 11:50:02 Using default protocol ID "sup" because none is configured in the chain specs
2021-06-26 11:50:02 🏷 Local node identity is: 12D3KooWEKi2pXZ4TH34C8YUQ9iravpSdBAxptSZDHKcUJkrgtST
2021-06-26 11:50:02 📦 Highest known block at #74522
2021-06-26 11:50:02 〽️ Prometheus server started at 127.0.0.1:9615
2021-06-26 11:50:02 Listening for new connections on 127.0.0.1:9944.
2021-06-26 11:50:03 🔍 Discovered new external address for our node: /ip4/65.21.185.66/tcp/30333/p2p/12D3KooWEKi2pXZ4TH34C8YUQ9iravpSdBAxptSZDHKcUJkrgtST
2021-06-26 11:50:03 [Relaychain] 🔍 Discovered new external address for our node: /ip4/65.21.185.66/tcp/30334/ws/p2p/12D3KooWLkVaWfT5BxW1LnxYeEy78Rb9LKXCuoEX4iDYsYownQjv
2021-06-26 11:50:03 [Relaychain] 🔍 Discovered new external address for our node: /ip4/10.2.112.215/tcp/30334/ws/p2p/12D3KooWLkVaWfT5BxW1LnxYeEy78Rb9LKXCuoEX4iDYsYownQjv
2021-06-26 11:50:03 🔍 Discovered new external address for our node: /ip4/10.2.112.215/tcp/30333/p2p/12D3KooWEKi2pXZ4TH34C8YUQ9iravpSdBAxptSZDHKcUJkrgtST
2021-06-26 11:50:03 🔍 Discovered new external address for our node: /ip4/10.2.96.244/tcp/30333/p2p/12D3KooWEKi2pXZ4TH34C8YUQ9iravpSdBAxptSZDHKcUJkrgtST
2021-06-26 11:50:03 [Relaychain] 🔍 Discovered new external address for our node: /ip4/172.18.0.3/tcp/30334/ws/p2p/12D3KooWLkVaWfT5BxW1LnxYeEy78Rb9LKXCuoEX4iDYsYownQjv
2021-06-26 11:50:04 🔍 Discovered new external address for our node: /ip6/2a01:4f9:c010:9e1f::1/tcp/30333/p2p/12D3KooWEKi2pXZ4TH34C8YUQ9iravpSdBAxptSZDHKcUJkrgtST
2021-06-26 11:50:04 🔍 Discovered new external address for our node: /ip4/10.2.96.243/tcp/30333/p2p/12D3KooWEKi2pXZ4TH34C8YUQ9iravpSdBAxptSZDHKcUJkrgtST
2021-06-26 11:50:04 [Relaychain] 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30334/ws/p2p/12D3KooWLkVaWfT5BxW1LnxYeEy78Rb9LKXCuoEX4iDYsYownQjv
2021-06-26 11:50:04 [Relaychain] 🔍 Discovered new external address for our node: /ip4/192.168.170.128/tcp/30334/ws/p2p/12D3KooWLkVaWfT5BxW1LnxYeEy78Rb9LKXCuoEX4iDYsYownQjv
2021-06-26 11:50:04 [Relaychain] 🔍 Discovered new external address for our node: /ip4/192.168.211.64/tcp/30334/ws/p2p/12D3KooWLkVaWfT5BxW1LnxYeEy78Rb9LKXCuoEX4iDYsYownQjv
2021-06-26 11:50:04 [Relaychain] Candidate included without being backed? candidate_hash=0x8c80d74867da6e3fb6af49a785ec1db2d6ea02dc64289644de37f907a8923141
2021-06-26 11:50:05 🔍 Discovered new external address for our node: /ip4/10.2.112.239/tcp/30333/p2p/12D3KooWEKi2pXZ4TH34C8YUQ9iravpSdBAxptSZDHKcUJkrgtST
2021-06-26 11:50:05 [Relaychain] 🔍 Discovered new external address for our node: /ip6/2a01:4f9:c010:9e1f::1/tcp/30334/ws/p2p/12D3KooWLkVaWfT5BxW1LnxYeEy78Rb9LKXCuoEX4iDYsYownQjv
2021-06-26 11:50:05 [Relaychain] 🔍 Discovered new external address for our node: /ip4/10.132.0.60/tcp/30334/ws/p2p/12D3KooWLkVaWfT5BxW1LnxYeEy78Rb9LKXCuoEX4iDYsYownQjv
Version: 0.8.0-unknown-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/std/src/panicking.rs:595:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/std/src/panicking.rs:497:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/std/src/panicking.rs:493:5
5: core::panicking::panic_fmt
at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/core/src/panicking.rs:92:14
6: core::option::expect_failed
at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/core/src/option.rs:1258:5
7: sc_client_db::Backend::try_commit_operation
8: <sc_client_db::Backend as sc_client_api::backend::Backend>::commit_operation
9: <sc_service::client::client::Client<B,E,Block,RA> as sc_client_api::backend::LockImportRun<Block,B>>::lock_import_and_run::{{closure}}
10: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
11: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
12: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
14: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
15: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
16: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
17: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll
18: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
19: <tracing_futures::Instrumented as core::future::future::Future>::poll
20: futures_executor::local_pool::block_on
21: <std::panic::AssertUnwindSafe as core::ops::function::FnOnce<()>>::call_once
22: tokio::runtime::task::harness::Harness<T,S>::poll
23: tokio::runtime::blocking::pool::Inner::run
24: tokio::runtime::context::enter
25: std::sys_common::backtrace::__rust_begin_short_backtrace
26: core::ops::function::FnOnce::call_once{{vtable.shim}}
27: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/alloc/src/boxed.rs:1480:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/alloc/src/boxed.rs:1480:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/7a9b552cb1621c9c57898d147228aab32b65a7c3/library/std/src/sys/unix/thread.rs:71:17
28: start_thread
29: clone
Thread 'tokio-runtime-worker' panicked at 'existence of block with number new_canonical
implies existence of blocks with all numbers before it; qed', /home/actions/.cargo/git/checkouts/substrate-7e08433d4c370a21/1d7f6e1/client/db/src/lib.rs:1187
This is a bug. Please report it at:
https://github.com/PureStake/moonbeam/issues/new
Hello, I am trying to call method eth_getProof using Moonbeam alpha, I get the following response:
(node:9510) UnhandledPromiseRejectionWarning: TypeError: web3.eth.eth_getProof is not a function
Are there any plans to add that method to the RPC API?
wanna consulting u for some tech problems, leave a email ?
When using the Moonbeam Docker container with a relay and parachain node, the Gantree container is unable to connect to the metrics service running on the Moonbeam container. For example, executing curl http://<moonbeam-container-ip>/metrics
from terminal presents an error. Using the --network="host"
option allows the containers to communicate, but the host is unable to communicate with the moonbeam container's ports, which is stated in the moonbeam docs.
Creating a bridge network using docker network create --driver=bridge --attachable neutrinonet
, and subsequently running the docker nodes with the network name, and host name specified docker run -it --network moonbeamnet --name moonbeamgantree -h moonbeamgantree ...
, docker run -it --network moonbeamnet --name moonbeamnode -h moonbeamnode ...
makes it possible for the two containers to communicate with each other, as well as the host to communicate with the containers. However, there is still an issue, as the services for the parachain and the relay service are bound to 127.0.0.1
, but should be bound to 0.0.0.0
so that the services are available on all interfaces.
Hi folks! After updating my node to 0.10.0 version experienced that kind of a bug. I've tried to restart it multiple times, however nothing changed.
Version: 0.10.0-6fab892-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/4e282795d7d1d28a4c6c1c6521045ae2b59f3519/library/std/src/panicking.rs:627:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/4e282795d7d1d28a4c6c1c6521045ae2b59f3519/library/std/src/panicking.rs:520:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/4e282795d7d1d28a4c6c1c6521045ae2b59f3519/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/4e282795d7d1d28a4c6c1c6521045ae2b59f3519/library/std/src/panicking.rs:516:5
5: core::panicking::panic_fmt
at rustc/4e282795d7d1d28a4c6c1c6521045ae2b59f3519/library/core/src/panicking.rs:93:14
6: core::option::expect_failed
at rustc/4e282795d7d1d28a4c6c1c6521045ae2b59f3519/library/core/src/option.rs:1578:5
7: sc_client_db::Backend::try_commit_operation
8: <sc_client_db::Backend as sc_client_api::backend::Backend>::commit_operation
9: <sc_service::client::client::Client<B,E,Block,RA> as sc_client_api::backend::LockImportRun<Block,B>>::lock_import_and_run::{{closure}}
10: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
11: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
12: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
14: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
15: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
16: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
17: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
18: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll
19: <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll
20: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
21: <tracing_futures::Instrumented as core::future::future::Future>::poll
22: std::thread::local::LocalKey::with
23: futures_executor::local_pool::block_on
24: tokio::runtime::task::core::Core<T,S>::poll
25: <std::panic::AssertUnwindSafe as core::ops::function::FnOnce<()>>::call_once
26: tokio::runtime::task::harness::Harness<T,S>::poll
27: tokio::runtime::blocking::pool::Inner::run
28: tokio::runtime::context::enter
29: std::sys_common::backtrace::__rust_begin_short_backtrace
30: core::ops::function::FnOnce::call_once{{vtable.shim}}
31: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/4e282795d7d1d28a4c6c1c6521045ae2b59f3519/library/alloc/src/boxed.rs:1572:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/4e282795d7d1d28a4c6c1c6521045ae2b59f3519/library/alloc/src/boxed.rs:1572:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/4e282795d7d1d28a4c6c1c6521045ae2b59f3519/library/std/src/sys/unix/thread.rs:91:17
32: start_thread
33: clone
Thread 'tokio-runtime-worker' panicked at 'existence of block with number new_canonical
implies existence of blocks with all numbers before it; qed', /home/gh-actions/.cargo/git/checkouts/substrate-7e08433d4c370a21/74101dc/client/db/src/lib.rs:1309
This is a bug. Please report it at:
Hi guys, I want to add your pallet-evm to my node-template runtime, but
,and there are another 100 errors 😢 😱
this is my cargo.toml
pallet-evm = { git = "https://github.com/purestake/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.6" }
pallet-evm-precompile-simple={default-features = false, version='1.0.0'}
pallet-evm-precompile-modexp={default-features = false, version='1.0.0'}
pallet-evm-precompile-sha3fips={default-features = false, version='1.0.0'}
this is my runtime/lib.rs
pub const GAS_PER_SECOND: u64 = 40_000_000;
pub const WEIGHT_PER_GAS: u64 = WEIGHT_PER_SECOND / GAS_PER_SECOND;
pub struct MoonbeamGasWeightMapping;
impl pallet_evm::GasWeightMapping for MoonbeamGasWeightMapping {
fn gas_to_weight(gas: u64) -> Weight {
gas.saturating_mul(WEIGHT_PER_GAS)
}
fn weight_to_gas(weight: Weight) -> u64 {
u64::try_from(weight.wrapping_div(WEIGHT_PER_GAS)).unwrap_or(u32::MAX as u64)
}
}
parameter_types! {
pub BlockGasLimit: U256
= U256::from(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WEIGHT_PER_GAS);
}
pub struct FixedGasPrice;
impl FeeCalculator for FixedGasPrice {
fn min_gas_price() -> U256 {
1_000_000_000.into()
}
}
impl pallet_evm::Config for Runtime {
type FeeCalculator = FixedGasPrice;
type GasWeightMapping = MoonbeamGasWeightMapping;
type CallOrigin = EnsureAddressRoot<AccountId>;
type WithdrawOrigin = EnsureAddressNever<AccountId>;
type AddressMapping = IdentityAddressMapping;
type Currency = Balances;
type Event = Event;
type Runner = pallet_evm::runner::stack::Runner<Self>;
type Precompiles = (
pallet_evm_precompile_simple::ECRecover,
pallet_evm_precompile_simple::Sha256,
pallet_evm_precompile_simple::Ripemd160,
pallet_evm_precompile_simple::Identity,
pallet_evm_precompile_modexp::Modexp,
pallet_evm_precompile_simple::ECRecoverPublicKey,
pallet_evm_precompile_sha3fips::Sha3FIPS256,
pallet_evm_precompile_sha3fips::Sha3FIPS512,
);
type ChainId = EthereumChainId;
type OnChargeTransaction = ();
type BlockGasLimit = BlockGasLimit;
}
So at some point we didn't have ExitReason typed and this meant that loading https://polkadot.js.org/apps/#/explorer would break the app.
Trying to cover this case with a test made me realize we don't test events.
More specifically I mean we don't test substrate-related events (because we do use some web3 related events in the polkadot-launch tests).
Executed
is one of those events that has an ExitReason typed field.
I am not sure wether this is possible with manual seal, but we definitely can do it for the 'live' testing that is WIP in the moonbeam-launch branch of polkadot-launch.
What do you think @crystalin ?
Try to compile the "tutorial-v7" tag and see this:
error: failed to add native library /home/ubuntu/moonbeam/target/release/build/ring-ba52cd24fcf83fc5/out/libring-core.a: file too small to be an archive
error: aborting due to previous error
error: could not compilering
Compile on Ubuntu 18.04 AWS EC2.
I guess this is not a problem with moonbeam but has anyone seen this before?
This error does not occur on master branch.
The types pushed in #96 were not complete and need an update after Im finished working on the polkadot-js PR
REGISTRY: Error: Cannot construct unknown type Vec
Chain State/ storage / stake / candidates (remove option) and click (+)
Open Runtime Module Library
Because moonbeam types declare OrderedSet: "Vec",
2021-07-12 17:23:30 [Relaychain] ✨ Imported #676997 (0xe8a9…f680)
====================
Version: 0.9.1-78d1dae-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:595:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:497:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:493:5
5: core::panicking::panic_fmt
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/panicking.rs:92:14
6: core::option::expect_failed
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/option.rs:1292:5
7: sc_client_db::Backend::try_commit_operation
8: <sc_client_db::Backend as sc_client_api::backend::Backend>::commit_operation
9: <sc_service::client::client::Client<B,E,Block,RA> as sc_client_api::backend::LockImportRun<Block,B>>::lock_import_and_run::{{closure}}
10: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
11: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
12: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
14: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
15: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
16: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
17: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
18: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll
19: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
20: <tracing_futures::Instrumented as core::future::future::Future>::poll
21: std::thread::local::LocalKey::with
22: futures_executor::local_pool::block_on
23: tokio::runtime::task::core::Core<T,S>::poll
24: tokio::runtime::task::harness::Harness<T,S>::poll::{{closure}}
25: tokio::runtime::task::harness::Harness<T,S>::poll
26: tokio::runtime::blocking::pool::Inner::run
27: tokio::runtime::context::enter
28: std::sys_common::backtrace::__rust_begin_short_backtrace
29: core::ops::function::FnOnce::call_once{{vtable.shim}}
30: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys/unix/thread.rs:71:17
31: start_thread
32: clone
Thread 'tokio-runtime-worker' panicked at 'existence of block with number new_canonical
implies existence of blocks with all numbers before it; qed', /home/gh-actions/.cargo/git/checkouts/
substrate-7e08433d4c370a21/9c57262/client/db/src/lib.rs:1218
This is a bug. Please report it at:
https://github.com/PureStake/moonbeam/issues/new
I can't deploy a EVM contract:
https://github.com/vporton/moonbeam-deploy-bug
$ npx hardhat run deploy/sample.js --network moonbasealpha
ProviderError: Method not found
at HttpProvider.request (/home/porton/t/moonbeam-deploy-bug/node_modules/hardhat/src/internal/core/providers/http.ts:46:19)
at LocalAccountsProvider.request (/home/porton/t/moonbeam-deploy-bug/node_modules/hardhat/src/internal/core/providers/accounts.ts:131:34)
at GanacheGasMultiplierProvider._isGanache (/home/porton/t/moonbeam-deploy-bug/node_modules/hardhat/src/internal/core/providers/gas-providers.ts:175:30)
at GanacheGasMultiplierProvider.request (/home/porton/t/moonbeam-deploy-bug/node_modules/hardhat/src/internal/core/providers/gas-providers.ts:164:23)
at EthersProviderWrapper.send (/home/porton/t/moonbeam-deploy-bug/node_modules/@nomiclabs/hardhat-ethers/src/ethers-provider-wrapper.ts:13:20)
at Object.getSigners (/home/porton/t/moonbeam-deploy-bug/node_modules/@nomiclabs/hardhat-ethers/src/helpers.ts:35:20)
at getContractFactoryByAbiAndBytecode (/home/porton/t/moonbeam-deploy-bug/node_modules/@nomiclabs/hardhat-ethers/src/helpers.ts:250:21)
at main (/home/porton/t/moonbeam-deploy-bug/deploy/sample.js:3:21)
The project readme gives a brief overview of the pallets we have included https://github.com/purestake/moonbeam/#runtime-architecture
This overview was not updated with the recent additions of the stake a author inherent pallets.
Mind taking this on @4meta5 ?
This ticket is automatically generated using
$ yarn run print-version-bump-info --from v0.9.3 --to v0.9.4
paritytech/substrate@polkadot-v0.9.3...polkadot-v0.9.4
from: c94e0cdfe5556680dca1996004751eeb114755d7
to: 1d04678e20555e623c974ee1127bc8a45abcf3d6
commits: 54
paritytech/polkadot@release-v0.9.3...release-v0.9.4
from: aa386760948574af4078c59decf558d16efe15e2
to: 2f28561a09aab0613b5f8a68fbabf723d5fc197e
commits: 41
paritytech/cumulus@polkadot-v0.9.3...polkadot-v0.9.4
from: 78b31b21122995b49f3c2cfe2791f188e33e5917
to: 08b7bcfe21b2ce2a26dcdaa664bf8c016f7c93ae
commits: 15
(paritytech/substrate#8724) Migrate pallet-grandpa to attribute macros
(paritytech/substrate#8793) Simple MaxBoundedLen
Implementations
(paritytech/substrate#8825) Migrate pallet-scored-pool to pallet attribute macro
(paritytech/substrate#8824) Migrate pallet-democracy to pallet attribute macro
(paritytech/polkadot#2994) Companion for substrate#8724
(paritytech/substrate#8903) add an absolute measure of election score on-chain as a parameter
(paritytech/polkadot#3093) Introduce polkadot code substitute
(paritytech/polkadot#3099) Companion for substrate/pull/8903
(paritytech/polkadot#3167) Fix teleport accounting and add some events
(paritytech/substrate#8793) Simple MaxBoundedLen
Implementations
(paritytech/substrate#8924) Make Schedule
fields public to allow for customization
(paritytech/substrate#8813) Uniques: An economically-secure basic-featured NFT pallet
(paritytech/substrate#8824) Migrate pallet-democracy to pallet attribute macro
(paritytech/substrate#9009) Add Call Filter That Prevents Nested batch_all
(paritytech/polkadot#3099) Companion for substrate/pull/8903
(paritytech/polkadot#2994) Companion for substrate#8724
(paritytech/polkadot#3118) Companion for #8793 (Simple MaxEncodedLen)
(paritytech/polkadot#3167) Fix teleport accounting and add some events
(paritytech/substrate#8913) Update wasmtime to 0.27
(paritytech/substrate#8963) Transaction pool: Ensure that we prune transactions properly
(paritytech/substrate#8724) Migrate pallet-grandpa to attribute macros
(paritytech/substrate#8825) Migrate pallet-scored-pool to pallet attribute macro
(paritytech/substrate#8932) Refactor BlockRequestHandler
(paritytech/substrate#8801) Allow usage of path in construct_runtime!
(paritytech/polkadot#3093) Introduce polkadot code substitute
(paritytech/polkadot#2990) Companion PR for #8748
(paritytech/polkadot#3133) fix approval-checking GRANDPA voting rule
(paritytech/cumulus#451) Check that we have set the validation data inherent
(paritytech/cumulus#454) Update Substrate & Polkadot
(paritytech/cumulus#459) Do not require the collator key to be passed
(paritytech/cumulus#460) Statemine Release Prep
(paritytech/cumulus#464) Decrease log levels
(paritytech/cumulus#462) Add srtool + subwasm workflow
(paritytech/cumulus#469) Update Substrate & Polkadot
(paritytech/cumulus#470) Add raw chainspecs for Westmint and Statemine
Compiling sp-finality-grandpa v2.0.0-rc3 (/root/moonbeam/vendor/frontier/vendor/substrate/primitives/finality-grandpa)
error[E0424]: expected value, found module `self`
--> /root/moonbeam/vendor/frontier/vendor/substrate/frame/support/src/traits.rs:1171:11
|
1169 | / bitmask! {
1170 | | /// Reasons for moving funds out of an account.
1171 | | #[derive(Encode, Decode)]
| | ^^^^^^ `self` value is a keyword only available in methods with a `self` parameter
1172 | | pub mask WithdrawReasons: i8 where
... |
1187 | | }
1188 | | }
| |_- this function has a `self` parameter, but a macro invocation can only access identifiers it receives from parameters
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
warning: unused import: `sp_std::convert::TryInto`
--> /root/moonbeam/vendor/frontier/vendor/substrate/primitives/finality-grandpa/src/lib.rs:34:5
|
34 | use sp_std::convert::TryInto;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: 1 warning emitted
Compiling frame-system-rpc-runtime-api v2.0.0-rc3 (/root/moonbeam/vendor/frontier/vendor/substrate/frame/system/rpc/runtime-api)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0424`.
error: could not compile `frame-support`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
I was trying to stake an account on stagenet. I was curious what the minimum stake was, so I navigated to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.stagenet.moonbeam.gcp.purestake.run#/chainstate/constants The constants for some pallets show up but not the stake pallet. I believe this is done in the decl_module!
macro?
Or maybe it is even more natural in FRAME V2.
I'm running the tests in the tests/
directory, and they seem to be mostly working, but I always get this warning
Multiple instances of @polkadot/types detected, ensure that there is only one package in your dependency tree.
3.2.4-5 /home/joshy/ProgrammingProjects/moonbeam/tests/node_modules/@polkadot/api-derive/node_modules/@polkadot/types
3.2.4-5 /home/joshy/ProgrammingProjects/moonbeam/tests/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types
It happens when I run the whole test suite or individual tests
# Run the whole test suite
npm test
# Run individual tests
mocha -r ts-node/register 'tests/test-balance.ts'
Currently you enable the dev service by providing --dev
. This also automatically selects the "development" spec which is good default behaviour.
However, in some cases I want to use a different spec but still use the dev service (concrete use case, I want to stake several authors at genesis). So I create a custom spec. But then I get:
error: The argument '--chain <CHAIN_SPEC>' cannot be used with '--dev'
I setup the moonbeam node on a VM, but can't connect with Metamask or Polkadot.js
What do I have to change ?
Here is a list of features I want for stakev1
:
parachain-staking
, change all instances of Validator
to Collator
. The Validators
storage item should be renamed SelectedCandidates
MinCollatorCandidateStk
bond, as an associated type for Config trait and only use MinCollatorStk
constant when selecting the SelectedCandidates
BlocksPerRound
a storage item and add runtime method for root to update it (using > instead of % for determining round transitions)nominate_new
and join_nominators
into single nominate
runtime method (see comment further above)Get<Perbill>
for Config
), instead of configurable per collator (as per our preferred design constraints)swap_nominations
logic, tis quadratic and can easily write code that calls successive runtime methods to achieve same functionality (also removes ~200 loc and puts the lib.rs
under 1k loc again)Prioritized features for future releases:
MaxNominationsPerCollator
nominations instead of the first MaxNominationsPerCollator
nominationsExitQueue
with usage of pallet_scheduler
Other stuff to do:
Hi I encountered an error and was advised to inform you about it.
`
Version: 0.9.4-bdee724-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:595:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:497:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/panicking.rs:493:5
5: core::panicking::panic_fmt
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/panicking.rs:92:14
6: core::option::expect_failed
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/core/src/option.rs:1292:5
7: sc_client_db::Backend::try_commit_operation
8: <sc_client_db::Backend as sc_client_api::backend::Backend>::commit_operation
9: <sc_service::client::client::Client<B,E,Block,RA> as sc_client_api::backend::LockImportRun<Block,B>>::lock_import_and_run::{{closure}}
10: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
11: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
12: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
14: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
15: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
16: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
17: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
18: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll
19: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
20: <tracing_futures::Instrumented as core::future::future::Future>::poll
21: std::thread::local::LocalKey::with
22: futures_executor::local_pool::block_on
23: tokio::runtime::task::core::Core<T,S>::poll
24: tokio::runtime::task::harness::Harness<T,S>::poll::{{closure}}
25: tokio::runtime::task::harness::Harness<T,S>::poll
26: tokio::runtime::blocking::pool::Inner::run
27: tokio::runtime::context::enter
28: std::sys_common::backtrace::__rust_begin_short_backtrace
29: core::ops::function::FnOnce::call_once{{vtable.shim}}
30: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/alloc/src/boxed.rs:1546:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/fe1bf8e05c39bdcc73fc09e246b7209444e389bc/library/std/src/sys/unix/thread.rs:71:17
31: start_thread
32: clone
Thread 'tokio-runtime-worker' panicked at 'existence of block with number new_canonical
implies existence of blocks with all numbers before it; qed', /home/gh-actions/.cargo/git/checkouts/substrate-7e08433d4c370a21/1b758b2/client/db/src/lib.rs:1309
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.