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

Update polkadot-v0.9.29 #1053

Merged
merged 13 commits into from
Nov 16, 2022
Merged

Update polkadot-v0.9.29 #1053

merged 13 commits into from
Nov 16, 2022

Conversation

OverOrion
Copy link
Contributor

@OverOrion OverOrion commented Oct 7, 2022

Fixes #1021

@OverOrion OverOrion force-pushed the szp/polkadot-v0.9.29 branch 3 times, most recently from 3841550 to 8782941 Compare October 12, 2022 10:39
@OverOrion
Copy link
Contributor Author

Currently this is blocked, because a toolchain update is needed for the stabilised then_some used in substrate.
However the toolchain can not be updated as mentioned in #1000.


I have checked whether sgx_tstd would have worked with a more recent toolchain version (2022-06-30), but it did not 😞.


error: duplicate diagnostic item found: `CStr`.
   --> incubator-teaclave-sgx-sdk/sgx_trts/src/c_str.rs:206:1
    |
206 | / pub struct CStr {
207 | |     // FIXME: this should not be represented with a DST slice but rather with
208 | |     //        just a raw `c_char` along with some form of marker to make
209 | |     //        this an unsized type. Essentially `sizeof(&CStr)` should be the
210 | |     //        same as `sizeof(&c_char)` but `CStr` should be an unsized type.
211 | |     inner: [c_char],
212 | | }
    | |_^
    |
    = note: the diagnostic item is first defined in crate `core`.

error: duplicate diagnostic item found: `cstring_type`.
   --> incubator-teaclave-sgx-sdk/sgx_trts/src/c_str.rs:124:1
    |
124 | / pub struct CString {
125 | |     // Invariant 1: the slice ends with a zero byte and has a length of at least one.
126 | |     // Invariant 2: the slice contains only one zero byte.
127 | |     // Improper usage of unsafe function can break Invariant 2, but not Invariant 1.
128 | |     inner: Box<[u8]>,
129 | | }
    | |_^
    |
    = note: the diagnostic item is first defined in crate `alloc`.

@OverOrion OverOrion force-pushed the szp/polkadot-v0.9.29 branch 3 times, most recently from efbe9b7 to 1bc262b Compare November 8, 2022 17:17
@OverOrion OverOrion self-assigned this Nov 11, 2022
@OverOrion OverOrion added A0-core Affects a core part B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing labels Nov 11, 2022
@OverOrion OverOrion marked this pull request as ready for review November 11, 2022 06:07
@@ -81,11 +81,10 @@ pub enum StfError {
StorageHashMismatch,
InvalidStorageDiff,
}
#[allow(clippy::large_enum_variant)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the clippy lint large_enum_variant should be suppressed let me know and I will drop the patch for it.

Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

One remark, otherwise it looks good!

cli/Cargo.toml Outdated
Comment on lines 26 to 30
my-node-runtime = { package = "integritee-node-runtime", git = "https://github.com/integritee-network/integritee-node.git", branch = "szp/polkadot-v0.9.29" }
pallet-evm = { optional = true, git = "https://github.com/integritee-network/frontier.git", branch = "polkadot-v0.9.29" }
substrate-api-client = { features = ["ws-client"], git = "https://github.com/scs/substrate-api-client.git", branch = "polkadot-v0.9.29" }
substrate-client-keystore = { git = "https://github.com/scs/substrate-api-client.git", branch = "polkadot-v0.9.29" }
teerex-primitives = { git = "https://github.com/integritee-network/pallets.git", branch = "szp/polkadot-v0.9.29" }
Copy link
Contributor

Choose a reason for hiding this comment

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

here, we still need to update the branch afterwards

Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

Nice, looks good to me. I have only one remark!

@@ -67,7 +67,7 @@ pub fn ed25519_self_signed_certificate(
) -> WebSocketResult<Certificate> {
let mut params = CertificateParams::new(vec![common_name.to_string()]);
let now = SystemTime::now().duration_since(UNIX_EPOCH).expect("Error: UNIX_EPOCH");
let issue_ts = TzUtc.timestamp(now.as_secs() as i64, 0);
let issue_ts = TzUtc.timestamp_opt(now.as_secs() as i64, 0).unwrap();
Copy link
Contributor

@clangenb clangenb Nov 15, 2022

Choose a reason for hiding this comment

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

If you know some context about the None here, I would prefer an expect. If it is something that never fails in our case, it is even better, and you can write like: expect("fails never because of ....; qed).

If it can fail, I would prefer to actually return a result here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should not fail as long as now.as_secs() (aka secs) fit into i64. The as keyword will silently convert it into -1 (e.g. when secs == u64::MAX) and that's when it would fail.

Revised in 89e7ac2.

Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

The great merge has arrived!

@clangenb clangenb merged commit ab83912 into master Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-core Affects a core part B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to polkadot v0.9.29
2 participants