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

Additional RPC-Methods and Runtime-Apis #796

Merged
merged 15 commits into from
Jun 1, 2022
Merged

Conversation

mustermeiszer
Copy link
Collaborator

@mustermeiszer mustermeiszer commented Apr 27, 2022

Implements some needed runtime-apis and corresponding rpc-methods.

Closes #747
Closes #749
Closes #748

@mustermeiszer
Copy link
Collaborator Author

I have not yet tested the rpc endpoints with a local chain. Thought, this would be the easiest I can close and be off help.

Copy link
Contributor

@hieronx hieronx left a comment

Choose a reason for hiding this comment

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

This is really useful @mustermeiszer!

runtime/development/src/lib.rs Outdated Show resolved Hide resolved
@mustermeiszer
Copy link
Collaborator Author

Rpc endpoints seem to work. But apps should dedicatedly test this.

@mustermeiszer
Copy link
Collaborator Author

The node currently panics when calling pool_poolValue. But I am not sure why. It is failing upon serializing a u128. So lets wait to merge this till paritytech/cumulus#1224 is settled.

runtime/common/src/apis/pools.rs Outdated Show resolved Hide resolved
runtime/common/src/apis/pools.rs Outdated Show resolved Hide resolved
runtime/common/src/apis/pools.rs Show resolved Hide resolved
runtime/common/src/apis/pools.rs Show resolved Hide resolved
runtime/development/src/lib.rs Outdated Show resolved Hide resolved
runtime/development/src/lib.rs Show resolved Hide resolved
@branan
Copy link
Contributor

branan commented May 24, 2022

@offerijns addressed your feedback. I left the mapping of TrancheId to TrancheLoc at the RPC layer as we discussed in Slack. The other changes were straightforward enough.

hieronx and others added 5 commits May 31, 2022 17:10
Consumers of the API should always use an Id, never an index. Indexes
may change underneat an API consumer at any block if the tranches
change, while Ids are stable.

This change enforces that correctness, and simplifies client code
which no longer needs to wrap Ids in Locs
This is panicking for unknown reasons and can easily be computed on
the client instead. We're giving up on it for now ¯\_(ツ)_/¯
* Remove unused `pool_value` from Runtime API
* Remove `pool_` prefix, as it is redundant at the RPC level
Branan Riley added 2 commits May 31, 2022 18:05
These aren't totally working and aren't needed for the first release
src/rpc/pools.rs Outdated Show resolved Hide resolved
@hieronx hieronx merged commit 7cb6dba into parachain Jun 1, 2022
@hieronx hieronx deleted the feature/rpc-extensions branch June 1, 2022 07:38
NunoAlexandre added a commit that referenced this pull request Jun 15, 2022
mikiquantum added a commit that referenced this pull request Jun 16, 2022
* Revert "Additional RPC-Methods and Runtime-Apis (#796)"

This reverts commit 7cb6dba.

* wip: Update to v0.9.22

* wip

* make rpc_ext_builder compile with todo

* wip: Migrate api.rs to jsonrpsee

* Migrate api.rs/AnchorApi to jsonrpsee

Some new dark magic.

* docker: bump polkadot images to v0.9.22

* Update to polkadot v0.9.23

* Update to polkadot-v0.9.24

* Bump docker images to 0.9.24

* fmt

* Update rust toolchain to 1.62.0 / nightly-2022-05-09

* various fixes

Co-authored-by: Miguel Hervas <miguel.hervas.lazaro@gmail.com>
@NunoAlexandre NunoAlexandre mentioned this pull request Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants