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

Feature/transaction extensions #101

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

valentunn
Copy link
Member

@valentunn valentunn commented Dec 9, 2024

Implements paritytech/polkadot-sdk#3685 in backward compatible manner.

Changes summary of v5 format:

  • Two bits are allocated for extrinsic type, compared to only 1 bit in previously
  • Support for the new type of extrinsic, GeneralTransaction. It does not have a hardcoded signature but only has transaction extensions and the call. Signed can be performed using new VerifyMultiSignature transaction extension
  • Transaction signing pipeline changed from sign call + extensions to sign current available InheritedImplication, which is a generalized approach introduced in general transactions. You can find more info in the correponding classes' documentation

@@ -48,88 +81,134 @@ object Extrinsic : Type<Extrinsic.Instance>("ExtrinsicsDecoder") {
): Instance {
val length = compactInt.read(scaleCodecReader)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it's not being used anywhere. Is this needed just to be able to read the following values from the reader? What do you think about some kind of cosmetic extension, like skip() to skip unnecessary values?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think we can create something like ScaleCodecReader.skip(dataType) to skip complex things, like compact in this example


val batchModule = runtime.metadata.module("Utility")

val batchFunctionName = when (batchMode) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe extract it as enum extension?

@valentunn valentunn marked this pull request as ready for review January 10, 2025 10:55
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.

2 participants