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

fix(memo-timeout-time): use u64 instead of string #4047

Closed
wants to merge 4 commits into from

Conversation

RustNinja
Copy link
Collaborator

@RustNinja RustNinja commented Aug 9, 2023

Required for merge:

  • pr-workflow-check / draft-release-check is ✅ success
  • Other rules GitHub shows you, or can be read in configuration

Makes review faster:

  • PR title is my best effort to provide summary of changes and has clear text to be part of release notes
  • I marked PR by misc label if it should not be in release notes
  • Linked Zenhub/Github/Slack/etc reference if one exists
  • I was clear on what type of deployment required to release my changes (node, runtime, contract, indexer, on chain operation, frontend, infrastructure) if any in PR title or description
  • Added reviewer into Reviewers
  • I tagged(@) or used other form of notification of one person who I think can handle best review of this PR
  • I have proved that PR has no general regressions of relevant features and processes required to release into production
  • Any dependency updates made, was done according guides from relevant dependency
  • Clicking all checkboxes
  • Adding detailed description of changes when it feels appropriate (for example when PR is big)

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

Pull reviewers stats

Stats of the last 30 days for composable:

User Total reviews Time to review Total comments
dzmitry-lahoda 23 8h 22m 23
RustNinja 19 1h 31m 2
blasrodri 17 1h 58m 12
kkast 13 3h 53m 9
mina86 11 1d 34m 73
vmarkushin 2 1h 8m 0
0xBrainjar2 1 3d 17h 35m 6
josietyleung 1 1d 20h 28m 3
JafarAz 1 9h 25m 0

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

# run Composable node
nix run "github:ComposableFi/composable/refs/pull/4047/merge" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed
# run local Picasso DevNet (for CosmWasm development)
nix run "github:ComposableFi/composable/refs/pull/4047/merge#devnet-picasso" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# CosmWasm on Substrate CLI tool
nix run "github:ComposableFi/composable/refs/pull/4047/merge#ccw" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# run cross chain devnet with Dotsama and Cosmos nodes 
nix run "github:ComposableFi/composable/refs/pull/4047/merge#devnet-xc-fresh" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# or same with docker
nix build "github:ComposableFi/composable/refs/pull/4047/merge#devnet-xc-image" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed \
&& docker load --input result && docker run -it --entrypoint bash devnet-xc:latest -c /bin/devnet-xc-fresh 

About nix

@@ -15,7 +15,7 @@ pub struct ForwardingMemo {
#[serde(skip_serializing_if = "Option::is_none")]
pub channel: Option<ChannelId>,
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<String>,
pub timeout: Option<u64>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that serde uses integer representation for u64. Serde talking to serde will work fine but we may run into problems if this memo would be ever read by JavaScript for example. Perhaps better use Displayed<u64>.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pub height: Option,
works fine so i just replaced String with u64 for other field.

@dzmitry-lahoda
Copy link
Contributor

composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:10:30
composable-deps> |
composable-deps> 10 | m128, m128i, m256, _mm256_cvtph_ps, _mm256_cvtps_ph, _mm_cvtph_ps, _mm_cvtps_ph,
composable-deps> | ^^^^^^^^^^^^^^^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:10:47
composable-deps> |
composable-deps> 10 | m128, m128i, m256, _mm256_cvtph_ps, _mm256_cvtps_ph, _mm_cvtph_ps, _mm_cvtps_ph,
composable-deps> | ^^^^^^^^^^^^^^^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:10:64
composable-deps> |
composable-deps> 10 | m128, m128i, m256, _mm256_cvtph_ps, _mm256_cvtps_ph, _mm_cvtph_ps, _mm_cvtps_ph,
composable-deps> | ^^^^^^^^^^^^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:10:78
composable-deps> |
composable-deps> 10 | m128, m128i, m256, _mm256_cvtph_ps, _mm256_cvtps_ph, _mm_cvtph_ps, _mm_cvtps_ph,
composable-deps> | ^^^^^^^^^^^^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:26:18
composable-deps> |
composable-deps> 26 | let retval = _mm_cvtph_ps(vec.assume_init());
composable-deps> | ^^^^^^^^^^^^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/lib.rs:1:1
composable-deps> |
composable-deps> 1 | / //! A crate that provides support for half-precision 16-bit floating point types.
composable-deps> 2 | | //!
composable-deps> 3 | | //! This crate provides the [f16] type, which is an implementation of the IEEE 754-2008 standard
composable-deps> 4 | | //! [binary16] a.k.a "half" floating point type. This 16-bit floating point type is intended for
composable-deps> ... |
composable-deps> 34 | | //! A [prelude] module is provided for easy importing of available utility traits.
composable-deps> 35 | | //!
composable-deps> | |
^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:44:18
composable-deps> |
composable-deps> 44 | let retval = _mm_cvtph_ps(vec.assume_init());
composable-deps> | ^^^^^^^^^^^^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/lib.rs:1:1
composable-deps> |
composable-deps> 1 | / //! A crate that provides support for half-precision 16-bit floating point types.
composable-deps> 2 | | //!
composable-deps> 3 | | //! This crate provides the [f16] type, which is an implementation of the IEEE 754-2008 standard
composable-deps> 4 | | //! [binary16] a.k.a "half" floating point type. This 16-bit floating point type is intended for
composable-deps> ... |
composable-deps> 52 | | //! # Hardware support
composable-deps> 53 | | //!
composable-deps> | |
^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:85:18
composable-deps> |
composable-deps> 85 | let retval = _mm256_cvtph_ps(vec.assume_init());
composable-deps> | ^^^^^^^^^^^^^^^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> error[E0658]: use of unstable library feature 'stdsimd'
composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/lib.rs:1:1
composable-deps> |
composable-deps> 1 | / //! A crate that provides support for half-precision 16-bit floating point types.
composable-deps> 2 | | //!
composable-deps> 3 | | //! This crate provides the [f16] type, which is an implementation of the IEEE 754-2008 standard
composable-deps> 4 | | //! [binary16] a.k.a "half" floating point type. This 16-bit floating point type is intended for
composable-deps> ... |
composable-deps> 93 | | //!
composable-deps> 94 | | //! - bytemuck — Adds support for the [bytemuck] crate by implementing [Zeroable] and
composable-deps> | |
________^
composable-deps> |
composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information
composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable
composable-deps> Compiling cxx-build v1.0.104
composable-deps> Compiling bech32 v0.9.1
composable-deps> Compiling safe-quote v1.0.15
composable-deps> For more information about this error, try rustc --explain E0658.
composable-deps> error: could not compile half (lib) due to 10 previous errors
composable-deps> warning: build failed, waiting for other jobs to finish...
error: builder for '/nix/store/qprfsckl8fjbkwkdahq23s8c8gq2gbay-composable-deps-8.10035.2.drv' failed with exit code 101;
last 10 log lines:
> |
> = note: see issue #48556 rust-lang/rust#48556 for more information
> = help: add #![feature(stdsimd)] to the crate attributes to enable
>
> Compiling cxx-build v1.0.104
> Compiling bech32 v0.9.1
> Compiling safe-quote v1.0.15
> For more information about this error, try rustc --explain E0658.

@dzmitry-lahoda
Copy link
Contributor

typicall error when std dep was added to no std build and cannot compile runtime

@RustNinja
Copy link
Collaborator Author

it is very strange:
cargo build -p picasso-runtime-wasm --target wasm32-unknown-unknown
cargo build -p composable-runtime-wasm --target wasm32-unknown-unknown

compiles runtime into wasm successfully

@RustNinja
Copy link
Collaborator Author

composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:10:30 composable-deps> | composable-deps> 10 | m128, m128i, m256, _mm256_cvtph_ps, _mm256_cvtps_ph, _mm_cvtph_ps, _mm_cvtps_ph, composable-deps> | ^^^^^^^^^^^^^^^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:10:47 composable-deps> | composable-deps> 10 | m128, m128i, m256, _mm256_cvtph_ps, _mm256_cvtps_ph, _mm_cvtph_ps, _mm_cvtps_ph, composable-deps> | ^^^^^^^^^^^^^^^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:10:64 composable-deps> | composable-deps> 10 | m128, m128i, m256, _mm256_cvtph_ps, _mm256_cvtps_ph, _mm_cvtph_ps, _mm_cvtps_ph, composable-deps> | ^^^^^^^^^^^^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:10:78 composable-deps> | composable-deps> 10 | m128, m128i, m256, _mm256_cvtph_ps, _mm256_cvtps_ph, _mm_cvtph_ps, _mm_cvtps_ph, composable-deps> | ^^^^^^^^^^^^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:26:18 composable-deps> | composable-deps> 26 | let retval = _mm_cvtph_ps(vec.assume_init()); composable-deps> | ^^^^^^^^^^^^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/lib.rs:1:1 composable-deps> | composable-deps> 1 | / //! A crate that provides support for half-precision 16-bit floating point types. composable-deps> 2 | | //! composable-deps> 3 | | //! This crate provides the [f16] type, which is an implementation of the IEEE 754-2008 standard composable-deps> 4 | | //! [binary16] a.k.a "half" floating point type. This 16-bit floating point type is intended for composable-deps> ... | composable-deps> 34 | | //! A [prelude] module is provided for easy importing of available utility traits. composable-deps> 35 | | //! composable-deps> | |^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:44:18 composable-deps> | composable-deps> 44 | let retval = _mm_cvtph_ps(vec.assume_init()); composable-deps> | ^^^^^^^^^^^^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/lib.rs:1:1 composable-deps> | composable-deps> 1 | / //! A crate that provides support for half-precision 16-bit floating point types. composable-deps> 2 | | //! composable-deps> 3 | | //! This crate provides the [f16] type, which is an implementation of the IEEE 754-2008 standard composable-deps> 4 | | //! [binary16] a.k.a "half" floating point type. This 16-bit floating point type is intended for composable-deps> ... | composable-deps> 52 | | //! # Hardware support composable-deps> 53 | | //! composable-deps> | |^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/binary16/arch/x86.rs:85:18 composable-deps> | composable-deps> 85 | let retval = _mm256_cvtph_ps(vec.assume_init()); composable-deps> | ^^^^^^^^^^^^^^^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> error[E0658]: use of unstable library feature 'stdsimd' composable-deps> --> /nix/store/zcd5ww170nk1hg3ibmadpbf9a54jv31f-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/half-2.3.1/src/lib.rs:1:1 composable-deps> | composable-deps> 1 | / //! A crate that provides support for half-precision 16-bit floating point types. composable-deps> 2 | | //! composable-deps> 3 | | //! This crate provides the [f16] type, which is an implementation of the IEEE 754-2008 standard composable-deps> 4 | | //! [binary16] a.k.a "half" floating point type. This 16-bit floating point type is intended for composable-deps> ... | composable-deps> 93 | | //! composable-deps> 94 | | //! - bytemuck — Adds support for the [bytemuck] crate by implementing [Zeroable] and composable-deps> | |________^ composable-deps> | composable-deps> = note: see issue #48556 rust-lang/rust#48556 for more information composable-deps> = help: add #![feature(stdsimd)] to the crate attributes to enable composable-deps> Compiling cxx-build v1.0.104 composable-deps> Compiling bech32 v0.9.1 composable-deps> Compiling safe-quote v1.0.15 composable-deps> For more information about this error, try rustc --explain E0658. composable-deps> error: could not compile half (lib) due to 10 previous errors composable-deps> warning: build failed, waiting for other jobs to finish... error: builder for '/nix/store/qprfsckl8fjbkwkdahq23s8c8gq2gbay-composable-deps-8.10035.2.drv' failed with exit code 101; last 10 log lines: > | > = note: see issue #48556 rust-lang/rust#48556 for more information > = help: add #![feature(stdsimd)] to the crate attributes to enable > > Compiling cxx-build v1.0.104 > Compiling bech32 v0.9.1 > Compiling safe-quote v1.0.15 > For more information about this error, try rustc --explain E0658.

does it mean that i am not able to use u64 in serde???

@mina86
Copy link
Contributor

mina86 commented Aug 10, 2023

You should be able to use it. It’s more likely that the Cargo.toml updates you’ve made broke the build. Split this PR into two — one updating the dependencies and the other changing type of timeout — to check.

@@ -13,7 +13,7 @@ impl Map {
receiver: value.receiver,
port: value.port.map(|x| x.to_string()),
channel: value.channel.map(|x| x.to_string()),
timeout: value.timeout,
timeout: value.timeout.and_then(|x| x.parse().ok()),
Copy link
Contributor

Choose a reason for hiding this comment

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

This error should propagate up.

@RustNinja
Copy link
Collaborator Author

closed because created other pr
#4049 (comment)

@RustNinja RustNinja closed this Aug 10, 2023
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.

3 participants