Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

membership: Fix NotMember error #455

Closed
wants to merge 1 commit into from
Closed

Conversation

vatsa287
Copy link
Member

@vatsa287 vatsa287 commented May 27, 2024

Fixes: #454 (temporarily)

The current implementation of IsMember throws below error, for all extrinsics where is_member check would be required.

vatsa@Shreevatsas-MacBook-Pro cord % cargo build --release --features=runtime-benchmarks
    Finished release [optimized] target(s) in 2.27s
vatsa@Shreevatsas-MacBook-Pro cord % ./target/release/cord benchmark pallet --chain=dev --pallet=pallet_membership --extrinsic="*"
2024-05-27 14:59:41 Starting benchmark: pallet_membership::add_member    
2024-05-27 14:59:41 panicked at /Users/vatsa/cord/pallets/membership/src/benchmarking.rs:51:9:
Expected Ok(_). Got Err(
    DispatchErrorWithPostInfo {
        post_info: PostDispatchInfo {
            actual_weight: None,
            pays_fee: Pays::Yes,
        },
        error: Module(
            ModuleError {
                index: 23,
                error: [
                    1,
                    0,
                    0,
                    0,
                ],
                message: Some(
                    "NotMember",
                ),
            },
        ),
    },
)    
Error: Input("Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x3e544f - <unknown>!rust_begin_unwind\n    1: 0x3a5209 - <unknown>!core::panicking::panic_fmt::he98e37cb800cf5e7\n    2: 0x2a9803 - <unknown>!core::ops::function::FnOnce::call_once{{vtable.shim}}::h885e1a40413f689e\n    3: 0x196e01 - <unknown>!pallet_membership::benchmarking::<impl frame_benchmarking::utils::Benchmarking for pallet_membership::pallet::Pallet<T,I>>::run_benchmark::h7144304981d536cc\n    4: 0x2d654 - <unknown>!<cord_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_benchmark::BenchmarkV1<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic<sp_runtime::multiaddress::MultiAddress<<<sp_runtime::MultiSignature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,()>,cord_runtime::RuntimeCall,sp_runtime::MultiSignature,(pallet_network_membership::CheckNetworkMembership<cord_runtime::Runtime>,frame_system::extensions::check_non_zero_sender::CheckNonZeroSender<cord_runtime::Runtime>,frame_system::extensions::check_spec_version::CheckSpecVersion<cord_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<cord_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<cord_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<cord_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<cord_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<cord_runtime::Runtime>)>>>>::dispatch_benchmark::hc771e433e1131f7a\n    5: 0x26d6f6 - <unknown>!Benchmark_dispatch_benchmark")

Should this check be entirely removed since the check is based Members list present in NetworkMembership pallet.
Or, change the error code.
A) Question is Members lists of both Membership & NetworkMembership is same?
B) When is Membership used, as it is not part of initial_config file?
@amarts @smohan-dw

Signed-off-by: Shreevatsa N <vatsa@dhiway.com>
@smohan-dw
Copy link
Member

#456 should fix this, as I have removed the extra session key check to nominate a new member. The membership pallet governs the council (governance) members, while network membership deals with members' transaction authorizations. We can close this.

@vatsa287
Copy link
Member Author

vatsa287 commented May 30, 2024

Thanks. Will close as completed.

@vatsa287 vatsa287 closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

membership: Membership fails to run while running on Runtime Config
2 participants