From 45a5cc4e7455f855b9fec801927ff740b72c99d9 Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Wed, 12 Jul 2023 13:46:58 +0100 Subject: [PATCH] fix(sealevel): getrandom dependency --- rust/Cargo.lock | 1 + rust/Cargo.toml | 4 ++++ rust/hyperlane-core/src/types/serialize.rs | 1 - rust/sealevel/programs/mailbox/Cargo.toml | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 68cfa539d8..eb0e5921ea 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -3810,6 +3810,7 @@ dependencies = [ "base64 0.13.1", "borsh 0.9.3", "bs58", + "getrandom 0.2.10", "hyperlane-core", "hyperlane-sealevel-interchain-security-module-interface", "hyperlane-sealevel-message-recipient-interface", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index fbf91e24c2..c28e5f2e42 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -114,6 +114,10 @@ ureq = "2.4" url = "2.3" which = "4.3" +# Required to allow dependencies `getrandom` but to preserve determinism required by programs, see +# https://github.com/solana-labs/solana/blob/master/docs/src/developing/on-chain-programs/developing-rust.md#depending-on-rand +getrandom = { version = "0.2", features = ["custom"] } + [workspace.dependencies.curve25519-dalek] version = "~3.2" features = ["serde"] diff --git a/rust/hyperlane-core/src/types/serialize.rs b/rust/hyperlane-core/src/types/serialize.rs index 3f6ab8874a..496a0a80a8 100644 --- a/rust/hyperlane-core/src/types/serialize.rs +++ b/rust/hyperlane-core/src/types/serialize.rs @@ -1,7 +1,6 @@ #![allow(unused)] // Based off https://github.com/paritytech/parity-common/blob/7194def73feb7d97644303f1a6ddbab29bbb799f/primitive-types/impls/serde/src/serialize.rs - // Copyright 2020 Parity Technologies // // Licensed under the Apache License, Version 2.0