paritytech / substrate-contracts-node

Minimal Substrate node configured for smart contracts via pallet-contracts.
The Unlicense
124 stars 145 forks source link

substrate-contracts-node update to polkadot-v0.9.31 #157

Closed gcp-development closed 1 year ago

gcp-development commented 1 year ago

I have test this with the https://github.com/paritytech/substrate-contracts-node/pull/156 (@athei ) and the flipper example https://github.com/paritytech/ink/tree/master/examples/flipper (version = "4.0.0-alpha.3").

Steps:

1)I open the https://contracts-ui.substrate.io/ and just upload the flipper.contract. 2) Try to instantiate the flipper.contract

image

Error.

Version: 0.21.0-539cf027109

0: sp_panic_handler::set::{{closure}} 1: <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call at /rustc/7eef946fc0e0eff40e588eab77b09b287accbec3/library/alloc/src/boxed.rs:2032:9 std::panicking::rust_panic_with_hook at /rustc/7eef946fc0e0eff40e588eab77b09b287accbec3/library/std/src/panicking.rs:692:13 2: std::panicking::begin_panic_handler::{{closure}} at /rustc/7eef946fc0e0eff40e588eab77b09b287accbec3/library/std/src/panicking.rs:579:13 3: std::sys_common::backtrace::rust_end_short_backtrace at /rustc/7eef946fc0e0eff40e588eab77b09b287accbec3/library/std/src/sys_common/backtrace.rs:137:18 4: rust_begin_unwind at /rustc/7eef946fc0e0eff40e588eab77b09b287accbec3/library/std/src/panicking.rs:575:5 5: core::panicking::panic_fmt at /rustc/7eef946fc0e0eff40e588eab77b09b287accbec3/library/core/src/panicking.rs:65:14 6: contracts_node_runtime::api::dispatch 7: environmental::using 8: sc_executor::native_executor::WasmExecutor::with_instance::{{closure}} 9: sc_executor::wasm_runtime::RuntimeCache::with_instance 10: <sc_executor::native_executor::NativeElseWasmExecutor as sp_core::traits::CodeExecutor>::call 11: sp_state_machine::execution::StateMachine<B,H,Exec>::execute_aux 12: sp_state_machine::execution::StateMachine<B,H,Exec>::execute_using_consensus_failure_handler 13: <sc_service::client::call_executor::LocalCallExecutor<Block,B,E> as sc_client_api::call_executor::CallExecutor>::contextual_call 14: <sc_service::client::client::Client<B,E,Block,RA> as sp_api::CallApiAt>::call_api_at 15: <contracts_node_runtime::RuntimeApiImpl<SR_API_BLOCK,RuntimeApiImplCall> as sp_api::Core<SR_API_BLOCK>>::runtime_api_internal_call_api_at 16: sp_transaction_pool::runtime_api::TaggedTransactionQueue::validate_transaction 17: tracing::span::Span::in_scope 18: sc_transaction_pool::api::validate_transaction_blocking 19: <core::future::from_generator::GenFuture as core::future::future::Future>::poll 20: <core::future::from_generator::GenFuture as core::future::future::Future>::poll 21: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll 22: <sc_service::task_manager::prometheus_future::PrometheusFuture as core::future::future::Future>::poll 23: <core::future::from_generator::GenFuture as core::future::future::Future>::poll 24: std::thread::local::LocalKey::with 25: tokio::park::thread::CachedParkThread::block_on 26: tokio::runtime::handle::Handle::block_on 27: <tokio::runtime::blocking::task::BlockingTask as core::future::future::Future>::poll 28: tokio::runtime::task::harness::Harness<T,S>::poll 29: tokio::runtime::blocking::pool::Inner::run 30: std::sys_common::backtrace::__rust_begin_short_backtrace 31: core::ops::function::FnOnce::call_once{{vtable.shim}} 32: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once at /rustc/7eef946fc0e0eff40e588eab77b09b287accbec3/library/alloc/src/boxed.rs:2000:9 <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once at /rustc/7eef946fc0e0eff40e588eab77b09b287accbec3/library/alloc/src/boxed.rs:2000:9 std::sys::unix::thread::Thread::new::thread_start at /rustc/7eef946fc0e0eff40e588eab77b09b287accbec3/library/std/src/sys/unix/thread.rs:108:17 33: start_thread at ./nptl/./nptl/pthread_create.c:442:8 34: clone3 at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 'tokio-runtime-worker' panicked at 'Bad input data provided to validate_transaction: Could not decode RuntimeCall::Contracts.0: Could not decode Call::instantiate_with_code::gas_limit: Could not decode Weight::ref_time: out of range decoding Compact ', runtime/src/lib.rs:400

This is a bug. Please report it at:

https://github.com/paritytech/substrate-contracts-node/issues/new

2022-11-09 08:31:53.911 WARN tokio-runtime-worker wasm-runtime: Evicting failed runtime instance error=Runtime panicked: Bad input data provided to validate_transaction: Could not decode RuntimeCall::Contracts.0: Could not decode Call::instantiate_with_code::gas_limit: Could not decode Weight::ref_time: out of range decoding Compact

statictype commented 1 year ago

As mentioned in the description of https://github.com/paritytech/substrate-contracts-node/pull/156 this change breaks all tooling. Please use a released version or an older commit with Contracts UI. Support for Weight v2 coming soon

gcp-development commented 1 year ago

@statictype Thanks, just checking. Meanwhile I will continue to work with ink!4. :)