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

Tangle subxt #505

Merged
merged 4 commits into from
Mar 1, 2024
Merged

Tangle subxt #505

merged 4 commits into from
Mar 1, 2024

Conversation

salman01zp
Copy link
Contributor

Summary of changes
Changes introduced in this pull request:

  • generates tangle-runtime interface

Reference issue to close (if applicable)

Closes

@salman01zp salman01zp marked this pull request as ready for review March 1, 2024 10:04
1xstj
1xstj previously requested changes Mar 1, 2024
Copy link
Contributor

@1xstj 1xstj left a comment

Choose a reason for hiding this comment

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

This whole thing can be replaced by

subxt metadata -f bytes --url wss://testnet-rpc.tangle.tools > metadata.scale
subxt codegen --file metadata.scale > ./tangle_runtime.rs

Also should we even store this in the repo? Which version of runtime does this represent? the testnet/mainnet/main-branch? imo any project can run the above two lines and generate the interface, we dont need this at all.

@salman01zp
Copy link
Contributor Author

salman01zp commented Mar 1, 2024

We use tangle runtime-interface for relayer and pallet-eth2-light-client as of now.

  • For each tangle release we will have to update both places.
  • We will also have to update each repo for subxt upgrades.

So the idea was to generate tangle runtime-interface after each tangle release, which can be used by other crates just like what we do with Typescript types. Eventually, use CI to generate this on the new release.

Copy link
Contributor

@shekohex shekohex left a comment

Choose a reason for hiding this comment

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

Looks good, I would say let's go one more step further and add the CI that will compile tangle, and update the metadata+codegen, then push to the repo the updated code as a PR.

@1xstj
Copy link
Contributor

1xstj commented Mar 1, 2024

Still dont understand the value of all this code, if tangle.metadata and tangle_runtime.rs is the files we want, we can get it by running two lines I mentioned above. We can keep those files in the repo, but the build logic looks useless to me

@1xstj 1xstj self-requested a review March 1, 2024 11:27
@1xstj 1xstj dismissed their stale review March 1, 2024 11:28

Unblocking PR

@salman01zp
Copy link
Contributor Author

Ah, I see what you mean. Yes we can get rid of the build.rs, I just moved it from webb-rs.

@salman01zp salman01zp merged commit 8be20aa into main Mar 1, 2024
1 of 3 checks passed
@salman01zp salman01zp deleted the salman/tangle-subxt branch March 1, 2024 12:19
salman01zp added a commit that referenced this pull request Mar 5, 2024
* tangle subxt
drewstone added a commit that referenced this pull request Mar 6, 2024
* Update to 1.7.0

* Bump curve25519-dalek

* frontier update changes

* update local path

* fix issue with evm crates

* compile roles pallet

* update mock configurations

* remove light client from tangle

* update schnorrkel to 0.11.4

* update testnet configuration

* compiles testnet-runtime

* compile mainnet runtime

* compiles and build tangle

* Tangle subxt (#505)
* tangle subxt

* use curve25519-dalek 4.1.1 to match lit-frost requirement

* cargo fmt

* enable stdsimd feature

* enable simd feature

* removd simd feature

* regenerate cargo.lock

* remove cache from CI

* revert rust-toolchain

* cargo update

* cargo fmt

* Update tangle-subxt

* Fmt, update

* Clippy fix

* Fmt

* use stable rust

* cargo fmt

* update CI job

* clippy fix + fix democracy precompile tests

* fix tx-pause tests

* update sha2256sum statement link

* fmt

---------

Co-authored-by: salman01zp <pathansalman555@gmail.com>
Co-authored-by: Shady Khalifa <dev+github@shadykhalifa.me>
@salman01zp salman01zp self-assigned this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed ✅
Development

Successfully merging this pull request may close these issues.

3 participants