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

Upgrade to Polkadot v1.6.0 #569

Merged
merged 36 commits into from
Jan 9, 2025
Merged

Upgrade to Polkadot v1.6.0 #569

merged 36 commits into from
Jan 9, 2025

Conversation

gianfra-t
Copy link
Contributor

@gianfra-t gianfra-t commented Nov 25, 2024

Closes #567.

Main changes

  • Bump all polkadot-sdk dependencies to 1.6.0.
  • Move dependencies to workspace.
  • Update chain_spec due to deprecated ChainSpec::from_genesis(.....) method.
  • Update node.

Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

I think for some dependencies there is now a mismatch of how the default-features were configured.

clients/runner/Cargo.toml Outdated Show resolved Hide resolved
clients/runtime/Cargo.toml Outdated Show resolved Hide resolved
clients/vault/Cargo.toml Outdated Show resolved Hide resolved
pallets/currency/Cargo.toml Outdated Show resolved Hide resolved
pallets/oracle/Cargo.toml Show resolved Hide resolved
@gianfra-t gianfra-t force-pushed the polkadot-v1.6.0 branch 2 times, most recently from b936acb to b6184bf Compare November 29, 2024 15:41
"https://stellar-history-de-fra.satoshipay.io",
"https://stellar-history-sg-sin.satoshipay.io",
"https://stellar-history-us-iowa.satoshipay.io"
"https://hercules-history.publicnode.org"
Copy link
Member

Choose a reason for hiding this comment

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

Did you change this due to the 'overloaded' issue or for a different reason? If so, you'd rather need to change the address field in connection_info to the host you can also find in Stellarbeat. If not, I'll leave this comment as a reminder that we should change it back eventually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, although the only one used to reduce uncertainty is the "other" config. It seems to be okay for our main test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Back to original configs now.

@gianfra-t gianfra-t changed the title WIP. Upgrade to Polkadot v1.6.0 Upgrade to Polkadot v1.6.0 Dec 4, 2024
@@ -202,8 +202,6 @@ pub struct TransactionResponse {
#[serde(deserialize_with = "de_str_to_bytes")]
pub result_xdr: Vec<u8>,
#[serde(deserialize_with = "de_str_to_bytes")]
pub result_meta_xdr: Vec<u8>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deprecated field (see here).

@@ -529,10 +529,15 @@ impl Asset {
#[allow(clippy::unnecessary_cast)]
pub enum CurrencyId {
#[default]
#[serde(rename = "Native")]
Copy link
Contributor Author

@gianfra-t gianfra-t Dec 5, 2024

Choose a reason for hiding this comment

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

This changes may be significant. The particular reason I added these (and removed the camelCase renaming above), is now due to the following panic:

Client(Storage("Invalid JSON blob: unknown variant `xCM`, expected one of `Native`, `XCM`, `Stellar`, `ZenlinkLPToken`, `Token` at line 1 column 2105"))

which appears when running the chain binary.

This comes from the changes in how the chain spec is defined now (first serialized in a json format).
I believe this error was also an issue for some extrinsics. @pendulum-chain/devs do you know if this renaming could impact some downstream services?

Copy link
Member

Choose a reason for hiding this comment

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

I also remember that error you are referring to. I think changing it the way you did makes sense.

This could break some polkadot.js types as at least the XCM type seems to be sometimes referred to as Xcm see here. Elsewhere it's used as XCM though, see here, so maybe it's not a big deal. We'll see but can easily fix the problem by upgrading the types in pendulum.js.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. Why did the pendulum types worked as Xcm and not xCM is a mystery then. But this serialization is only relevant when compiled with std. In any case, let's hope is not a big deal.

serde_json = "1.0.85"
futures = "0.3.15"
tokio = { version = "1.37", features = ["full", "tracing"] }
clap = { version = "4.5.3", features = [ "derive" ] }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Node requires a higher version of clap compared to that used in the workspace.

@gianfra-t gianfra-t marked this pull request as ready for review December 5, 2024 18:23
@gianfra-t gianfra-t requested a review from a team December 5, 2024 18:23
@gianfra-t
Copy link
Contributor Author

gianfra-t commented Dec 5, 2024

@pendulum-chain/devs the CI may get stuck on the integration tests sometimes (with integration tests never ending, unknown reason. Example), yet locally I was able to run successfully all of them.

I believe this does not have to do with the update itself.

Copy link
Member

@ebma ebma 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 to me. I left only very minor comments.

futures = "0.3.15"
tokio = { version = "1.37", features = ["full", "tracing"] }
clap = { version = "4.5.3", features = [ "derive" ] }
codec = { workspace = true, default-features = true, version = "3.0.0" }
Copy link
Member

Choose a reason for hiding this comment

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

How come we define workspace = true but still define a custom version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was not correct. Seems that it was ignored anyway.

zepter.yaml Outdated
# Will be displayed when any workflow fails:
help:
text: |
Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: we could change this message. Doesn't matter much.

@@ -5,9 +5,9 @@ authors = ["Interlay <[email protected]>"]
edition = "2021"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0" }
codec = { workspace = true, default-features = true }
jsonrpsee = { version = "0.16.0", features = ["client", "server", "macros"] }
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this custom version or would it also work with the one in workspace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We probably don't "need" that version, but upgrading it involves making changes to each module's rpc code that we didn't have much time to go through.


substrate-stellar-sdk = { git = "https://github.com/pendulum-chain/substrate-stellar-sdk", branch = "polkadot-v1.1.0" }
substrate-stellar-sdk = { workspace = true, default-features = true }

# RPC dependencies
jsonrpc-core = "18.0.0"
Copy link
Member

Choose a reason for hiding this comment

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

Would the workspace dependencies not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me try. It could be that I or zepter missed them for some reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Similar to this, or in fact the same. It will require more changes to the node.

@gianfra-t gianfra-t merged commit 7626b16 into main Jan 9, 2025
3 of 4 checks passed
@gianfra-t gianfra-t deleted the polkadot-v1.6.0 branch January 9, 2025 12:38
@gianfra-t gianfra-t restored the polkadot-v1.6.0 branch January 9, 2025 12:39
@gianfra-t
Copy link
Contributor Author

Let's keep the branch for now, until we fully change every dependency to point to main.

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.

Update to Polkadot-sdk 1.6.0
2 participants