Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add Transaction Fee RPC to Statemint/Statemine #559

Merged
merged 11 commits into from
Aug 17, 2021
Merged

Conversation

hamidra
Copy link
Contributor

@hamidra hamidra commented Aug 3, 2021

changes to add the support for payment rpc to parachains to address #542

@hamidra hamidra marked this pull request as ready for review August 5, 2021 03:56
polkadot-parachains/Cargo.toml Outdated Show resolved Hide resolved
polkadot-parachains/src/rpc.rs Outdated Show resolved Hide resolved
polkadot-parachains/src/service.rs Show resolved Hide resolved
polkadot-parachains/src/service.rs Outdated Show resolved Hide resolved
polkadot-parachains/src/service.rs Show resolved Hide resolved
@hamidra hamidra requested a review from bkchr August 5, 2021 18:16
Comment on lines 30 to 39
/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
pub type Signature = sp_runtime::MultiSignature;
/// Some way of identifying an account on the chain. We intentionally make it equivalent
/// to the public key of our transaction signing scheme.
pub type AccountId = <<Signature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId;
type BlockNumber = u32;
type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;
pub type Block = sp_runtime::generic::Block<Header, sp_runtime::OpaqueExtrinsic>;
type Balance = u128;
type Nonce = u32;
Copy link
Member

Choose a reason for hiding this comment

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

i dont think this is right either. shouldnt be that we are redefining all these types here.

should make the function generic over these types, or properly import them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved them to primitives module and imported the common primitives in rpc.rs and service.rs.

polkadot-parachains/src/rpc.rs Outdated Show resolved Hide resolved
polkadot-parachains/src/service.rs Outdated Show resolved Hide resolved
@Swader
Copy link
Contributor

Swader commented Aug 17, 2021

Is there any way we can move this along please? What can we do to help? This is a huge blocker for us.

Comment on lines 2 to 11
pub type Signature = sp_runtime::MultiSignature;
/// Some way of identifying an account on the chain. We intentionally make it equivalent
/// to the public key of our transaction signing scheme.
pub type AccountId = <<Signature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId;
pub type BlockNumber = u32;
pub type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;
pub type Block = sp_runtime::generic::Block<Header, sp_runtime::OpaqueExtrinsic>;
pub type Hash = sp_core::H256;
pub type Balance = u128;
pub type Nonce = u32;
Copy link
Member

Choose a reason for hiding this comment

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

I made #577 as an improvement to this file.

Copy link
Member

Choose a reason for hiding this comment

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

Also in the future, need to add the copyright headers when adding new files, fyi

@hamidra
Copy link
Contributor Author

hamidra commented Aug 17, 2021

bot merge

@ghost
Copy link

ghost commented Aug 17, 2021

Error getting Process.json: "Not Found"

@hamidra
Copy link
Contributor Author

hamidra commented Aug 17, 2021

bot merge

@ghost
Copy link

ghost commented Aug 17, 2021

Error getting Process.json: "Not Found"

@hamidra hamidra merged commit 333cfdf into master Aug 17, 2021
@hamidra hamidra deleted the hamidra/payment-info branch August 17, 2021 16:55
@Swader
Copy link
Contributor

Swader commented Aug 19, 2021

Hi, is there a specific reason why this wasn't included in the V3 release?

@shawntabrizi
Copy link
Member

shawntabrizi commented Aug 19, 2021

@Swader it was just merged, and release process was already in the pipeline. It will be included in the next release.

In the meantime, it would be nice to get your confirmation that the RPC and all behaviors are working as expected on a local test net.

@Swader
Copy link
Contributor

Swader commented Aug 19, 2021

Sure, I will test our distribution script locally and report back

slumber pushed a commit that referenced this pull request Sep 1, 2021
* add payment rpc to parachains

* connect payment rpc to parachains clients

* fix the rumtime_api bound/ add separate start node implementation for shell

* use cumulus/parachain specific primitives

* Update polkadot-parachains/src/rpc.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* rename txpool dependency

* fix the package name

* move parachain primitives to separate module

* Refactor Shared Primitves for Payment Info (#577)

* rename to parachains-common

* refactor shared opaque

* remove primitives

* Update service.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
@DikaCream
Copy link

Hi, is there a specific date the next release of statemint including this request ?

@hamidra
Copy link
Contributor Author

hamidra commented Sep 9, 2021

Hi, is there a specific date the next release of statemint including this request ?

This will be in the next Statemine/mint release which will happen after the polkadot release. Next polkadot release is about to start, so hopefully soon after that this should be available on statemint.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants