Giter Site home page Giter Site logo

Comments (9)

Xib1uvXi avatar Xib1uvXi commented on May 20, 2024 2

only performing setKeys will report the error, others is normal

Aha, That' was the tidbit I needed. You will need to add this custom type on the Settings -> Development tab of the Apps UI.

{
  "Keys": "SessionKeys2"
}

This assumes that you do indeed have two session keys (one for Aura and one for Grandpa).

The Apps UI assumes that there are 5 session keys by default because this is what the full Substrate node and Polkadot use. When you add the session pallet to your node that has only two session keys, you need to tell the UI about it so it can encode the transaction properly.

thx!!!!

from subport.

Xib1uvXi avatar Xib1uvXi commented on May 20, 2024

When i send session setKeys extrinsics, get error(session.setKeys 1010: Invalid Transaction: BadProof)

  1. call RPC: author.insertKey(aura & account & granpa )
  2. call RPC: author.rotateKeys, get session public key
  3. send extrinsics: session.setKeys(session public key, 0x00 )

get error: session.setKeys 1010: Invalid Transaction: BadProof)

from subport.

JoshOrndorff avatar JoshOrndorff commented on May 20, 2024

Can you tell us a little more information about your configuration?

What node did you build? Maybe it was the node template? Or the default Substrate node?

How are you submitting the extrinsic? Maybe using https://polkadot.js.org/apps/ ?

from subport.

Xib1uvXi avatar Xib1uvXi commented on May 20, 2024

Can you tell us a little more information about your configuration?

What node did you build? Maybe it was the node template? Or the default Substrate node?

How are you submitting the extrinsic? Maybe using https://polkadot.js.org/apps/ ?

hello, it was the node template, i implemented a POA Validator Set:

my runtime lib.rs:

// session key
pub mod opaque {
    // -------------------------------snip
    impl_opaque_keys! {
		pub struct SessionKeys {
			pub aura: Aura,
			pub grandpa: Grandpa,
		}
	}
}

// -------------------------------snip
// my poa pallet
impl xmc_poa::Trait for Runtime {
    type VsChecker = xmc_poa::DefaultValidatorSetSizeChecker;
    type Event = Event;
}

// -------------------------------snip
// session pallet
impl session::Trait for Runtime {
    type Event = Event;
    type ValidatorId = <Self as system::Trait>::AccountId;

    type ValidatorIdOf = xmc_poa::ValidatorOf<Self>;

    type ShouldEndSession = Poa;

    type NextSessionRotation = Poa;

    type SessionManager = Poa;

    type SessionHandler = <opaque::SessionKeys as OpaqueKeys>::KeyTypeIdProviders;

    type Keys = opaque::SessionKeys;
    type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
}

i used https://polkadot.js.org/apps/ submitting the extrinsic ------> session.setKeys()

i found the error which is tx pool error: 1010: Invalid Transaction: BadProof

from subport.

Xib1uvXi avatar Xib1uvXi commented on May 20, 2024

node log about error: Failed to submit extrinsic: Transaction pool error: Invalid transaction validity: InvalidTransaction::BadProof

from subport.

JoshOrndorff avatar JoshOrndorff commented on May 20, 2024

Did you get this error with the same version of the node template before you made your modifications?

from subport.

Xib1uvXi avatar Xib1uvXi commented on May 20, 2024

The v2.0.0-alpha.6 node template default is to not use the session at runtime, i'm no get this error.
I feel strange that only performing setKeys will report the error, others is normal

from subport.

JoshOrndorff avatar JoshOrndorff commented on May 20, 2024

only performing setKeys will report the error, others is normal

Aha, That' was the tidbit I needed. You will need to add this custom type on the Settings -> Development tab of the Apps UI.

{
  "Keys": "SessionKeys2"
}

This assumes that you do indeed have two session keys (one for Aura and one for Grandpa).

The Apps UI assumes that there are 5 session keys by default because this is what the full Substrate node and Polkadot use. When you add the session pallet to your node that has only two session keys, you need to tell the UI about it so it can encode the transaction properly.

from subport.

JoshOrndorff avatar JoshOrndorff commented on May 20, 2024

There's a video recording of us experiencing this same issue and solving it at Substrate seminar here (link starts at the right time) https://www.youtube.com/watch?v=89qLUZeB4WU&list=PLp0_ueXY_enXRfoaW7sTudeQH10yDvFOS%3Ft%3D4250

from subport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.