Skip to content

Update polkadot-v0.9.29#1053

Merged
clangenb merged 13 commits intomasterfrom
szp/polkadot-v0.9.29
Nov 16, 2022
Merged

Update polkadot-v0.9.29#1053
clangenb merged 13 commits intomasterfrom
szp/polkadot-v0.9.29

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 force-pushed the szp/polkadot-v0.9.29 branch from 1bc262b to 00f9b03 Compare November 9, 2022 08:51
@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
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.

@OverOrion OverOrion requested a review from clangenb November 11, 2022 07:17
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

@OverOrion OverOrion force-pushed the szp/polkadot-v0.9.29 branch from 47a270f to d6d6697 Compare November 15, 2022 09:20
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!

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.

@OverOrion OverOrion requested a review from clangenb November 15, 2022 12:07
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