Skip to content

Commit

Permalink
migrate pallet-statement to use umbrella crate
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathy-bajo committed Jan 9, 2025
1 parent 90c0c6f commit 0122761
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions rustc-ice-2025-01-09T17_30_17-94004.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
thread 'coordinator' panicked at /rustc/f7273e0044ad8f35ad27282e4ab776af50b61a54/compiler/rustc_codegen_ssa/src/back/write.rs:1662:29:
/rustc/f7273e0044ad8f35ad27282e4ab776af50b61a54/compiler/rustc_codegen_ssa/src/back/write.rs:1662:29: worker thread panicked
stack backtrace:
0: 0x10e6d5174 - std::backtrace::Backtrace::create::hf4c6e0fc434c5eff
1: 0x10c572da8 - <alloc[8fbefe78ae127760]::boxed::Box<rustc_driver_impl[33c3c8f32b23385a]::install_ice_hook::{closure#0}> as core[cec2e0b2f6f1b021]::ops::function::Fn<(&dyn for<'a, 'b> core[cec2e0b2f6f1b021]::ops::function::Fn<(&'a std[de0be7fd51e0120c]::panic::PanicHookInfo<'b>,), Output = ()> + core[cec2e0b2f6f1b021]::marker::Sync + core[cec2e0b2f6f1b021]::marker::Send, &std[de0be7fd51e0120c]::panic::PanicHookInfo)>>::call
2: 0x10e6efd84 - std::panicking::rust_panic_with_hook::hdbb67fdc3f18bef3
3: 0x10d3d9c08 - std[de0be7fd51e0120c]::panicking::begin_panic::<alloc[8fbefe78ae127760]::string::String>::{closure#0}
4: 0x10d3d991c - std[de0be7fd51e0120c]::sys::backtrace::__rust_end_short_backtrace::<std[de0be7fd51e0120c]::panicking::begin_panic<alloc[8fbefe78ae127760]::string::String>::{closure#0}, !>
5: 0x110f01920 - std[de0be7fd51e0120c]::panicking::begin_panic::<alloc[8fbefe78ae127760]::string::String>
6: 0x10d3eb0e8 - rustc_middle[2f79ef14ce642cb0]::util::bug::opt_span_bug_fmt::<rustc_span[ad3f1d035e0e7ee5]::span_encoding::Span>::{closure#0}
7: 0x10d3e8e50 - rustc_middle[2f79ef14ce642cb0]::ty::context::tls::with_opt::<rustc_middle[2f79ef14ce642cb0]::util::bug::opt_span_bug_fmt<rustc_span[ad3f1d035e0e7ee5]::span_encoding::Span>::{closure#0}, !>::{closure#0}
8: 0x10d3e8e1c - rustc_middle[2f79ef14ce642cb0]::ty::context::tls::with_context_opt::<rustc_middle[2f79ef14ce642cb0]::ty::context::tls::with_opt<rustc_middle[2f79ef14ce642cb0]::util::bug::opt_span_bug_fmt<rustc_span[ad3f1d035e0e7ee5]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
9: 0x110f08ef4 - rustc_middle[2f79ef14ce642cb0]::util::bug::bug_fmt
10: 0x10c187040 - std[de0be7fd51e0120c]::sys::backtrace::__rust_begin_short_backtrace::<<rustc_codegen_llvm[9df048a6db3ec74f]::LlvmCodegenBackend as rustc_codegen_ssa[cc2b0ab22c2f0d19]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[cc2b0ab22c2f0d19]::back::write::start_executing_work<rustc_codegen_llvm[9df048a6db3ec74f]::LlvmCodegenBackend>::{closure#5}, core[cec2e0b2f6f1b021]::result::Result<rustc_codegen_ssa[cc2b0ab22c2f0d19]::back::write::CompiledModules, ()>>::{closure#0}, core[cec2e0b2f6f1b021]::result::Result<rustc_codegen_ssa[cc2b0ab22c2f0d19]::back::write::CompiledModules, ()>>
11: 0x10c188c00 - <<std[de0be7fd51e0120c]::thread::Builder>::spawn_unchecked_<<rustc_codegen_llvm[9df048a6db3ec74f]::LlvmCodegenBackend as rustc_codegen_ssa[cc2b0ab22c2f0d19]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[cc2b0ab22c2f0d19]::back::write::start_executing_work<rustc_codegen_llvm[9df048a6db3ec74f]::LlvmCodegenBackend>::{closure#5}, core[cec2e0b2f6f1b021]::result::Result<rustc_codegen_ssa[cc2b0ab22c2f0d19]::back::write::CompiledModules, ()>>::{closure#0}, core[cec2e0b2f6f1b021]::result::Result<rustc_codegen_ssa[cc2b0ab22c2f0d19]::back::write::CompiledModules, ()>>::{closure#1} as core[cec2e0b2f6f1b021]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
12: 0x10e6fa1f4 - std::sys::pal::unix::thread::Thread::new::thread_start::h0b959c249e9a550a
13: 0x184499f94 - __pthread_joiner_wake


rustc version: 1.84.0-nightly (f7273e004 2024-11-12)
platform: aarch64-apple-darwin
11 changes: 1 addition & 10 deletions substrate/frame/statement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ codec = { features = ["derive"], workspace = true }
frame = { workspace = true, features = ["experimental", "runtime"]}
log = { workspace = true }
scale-info = { features = ["derive"], workspace = true }
sp-api = { workspace = true }
# sp-core = { workspace = true }
# sp-io = { workspace = true }
# sp-runtime = { workspace = true }
sp-statement-store = { workspace = true }

[dev-dependencies]
Expand All @@ -35,15 +31,10 @@ std = [
"frame/std",
"log/std",
"pallet-balances/std",
# "scale-info/std",
# "sp-api/std",
# "sp-core/std",
# "sp-io/std",
# "sp-runtime/std",
"scale-info/std",
"sp-statement-store/std",
]
try-runtime = [
"pallet-balances/try-runtime",
"frame/try-runtime",
# "sp-runtime/try-runtime",
]
12 changes: 3 additions & 9 deletions substrate/frame/statement/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@
use super::*;

use crate as pallet_statement;
// use frame_support::{
// derive_impl, ord_parameter_types,
// traits::{ConstU32, ConstU64},
// };
use frame::prelude::*;
use sp_core::Pair;
// use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage};
use frame::deps::sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage};
use frame::testing_prelude::*;
use frame::deps::{sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}, sp_core::Pair};

type Block = frame_system::mocking::MockBlock<Test>;

Expand Down Expand Up @@ -74,7 +68,7 @@ impl Config for Test {
type MaxAllowedBytes = ConstU32<MAX_ALLOWED_BYTES>;
}

pub fn new_test_ext() -> TestExternalities {
pub fn new_test_ext() -> TestState {
let mut t = frame_system::GenesisConfig::<Test>::default().build_storage().unwrap();
let balances = pallet_balances::GenesisConfig::<Test> {
balances: vec![
Expand Down
6 changes: 2 additions & 4 deletions substrate/frame/statement/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@

use super::*;
use crate::mock::*;
use sp_core::Pair;
// use sp_runtime::AccountId32;
use sp_statement_store::{
runtime_api::{InvalidStatement, StatementSource, ValidStatement},
Proof, Statement,
};
use frame::{deps::sp_runtime::AccountId32};

use frame::{deps::{sp_runtime::AccountId32}, sp_core::Pair};
use frame::testing_prelude::*;
#[test]
fn sign_and_validate_no_balance() {
new_test_ext().execute_with(|| {
Expand Down

0 comments on commit 0122761

Please sign in to comment.