diff --git a/.changelog/5391.trivial.md b/.changelog/5391.trivial.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Cargo.lock b/Cargo.lock index 36970779d7f..5b66975a9b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1988,8 +1988,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "937dd928dca340f29f67f096760ccec7853e60ebc156175aadfc8eb203eed37d" dependencies = [ "impl-trait-for-tuples", - "oasis-cbor-derive", - "oasis-cbor-value", + "oasis-cbor-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "oasis-cbor-value 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror", +] + +[[package]] +name = "oasis-cbor" +version = "0.5.1" +source = "git+https://github.com/oasisprotocol/oasis-cbor.git?branch=peternose/bugfix/skip-empty-optional-structs#95ad2e8f8c8bbd422fa958870a2d920a08ca33b9" +dependencies = [ + "impl-trait-for-tuples", + "oasis-cbor-derive 0.5.1 (git+https://github.com/oasisprotocol/oasis-cbor.git?branch=peternose/bugfix/skip-empty-optional-structs)", + "oasis-cbor-value 0.5.1 (git+https://github.com/oasisprotocol/oasis-cbor.git?branch=peternose/bugfix/skip-empty-optional-structs)", "serde", "thiserror", ] @@ -2001,7 +2012,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b593c6ebad6e6429a8d1dac3509555da30311f0e6fdf93b96475bce895abef6d" dependencies = [ "darling", - "oasis-cbor-value", + "oasis-cbor-value 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "oasis-cbor-derive" +version = "0.5.1" +source = "git+https://github.com/oasisprotocol/oasis-cbor.git?branch=peternose/bugfix/skip-empty-optional-structs#95ad2e8f8c8bbd422fa958870a2d920a08ca33b9" +dependencies = [ + "darling", + "oasis-cbor-value 0.5.1 (git+https://github.com/oasisprotocol/oasis-cbor.git?branch=peternose/bugfix/skip-empty-optional-structs)", "proc-macro-crate", "proc-macro2 1.0.66", "quote 1.0.33", @@ -2014,6 +2038,11 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fe0d7f5a7c55eba7e8e845046c6c81332f4fa4997f0ed497b9f44db1d7f2050" +[[package]] +name = "oasis-cbor-value" +version = "0.5.1" +source = "git+https://github.com/oasisprotocol/oasis-cbor.git?branch=peternose/bugfix/skip-empty-optional-structs#95ad2e8f8c8bbd422fa958870a2d920a08ca33b9" + [[package]] name = "oasis-core-keymanager" version = "0.0.0" @@ -2024,7 +2053,7 @@ dependencies = [ "futures 0.3.28", "lazy_static", "lru", - "oasis-cbor", + "oasis-cbor 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "oasis-core-runtime", "rand", "rustc-hex", @@ -2067,7 +2096,7 @@ dependencies = [ "mbedtls 0.8.3", "num-bigint 0.4.3", "num-traits", - "oasis-cbor", + "oasis-cbor 0.5.1 (git+https://github.com/oasisprotocol/oasis-cbor.git?branch=peternose/bugfix/skip-empty-optional-structs)", "oid-registry", "percent-encoding", "rand", @@ -2880,7 +2909,7 @@ version = "0.0.0" dependencies = [ "anyhow", "byteorder", - "oasis-cbor", + "oasis-cbor 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "oasis-core-keymanager", "oasis-core-runtime", "oasis-core-tools", diff --git a/keymanager/Cargo.toml b/keymanager/Cargo.toml index 245e2eb5811..5574f1b4deb 100644 --- a/keymanager/Cargo.toml +++ b/keymanager/Cargo.toml @@ -6,6 +6,7 @@ edition = "2018" [dependencies] oasis-core-runtime = { path = "../runtime" } +# TODO: Upgrade. cbor = { version = "0.5.1", package = "oasis-cbor" } # Third party. diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index e154b7652b3..8d31292e874 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -5,7 +5,10 @@ authors = ["Oasis Protocol Foundation "] edition = "2018" [dependencies] -cbor = { version = "0.5.1", package = "oasis-cbor", features = ["serde"] } +# TODO: Upgrade. +cbor = { package = "oasis-cbor", features = [ + "serde", +], git = 'https://github.com/oasisprotocol/oasis-cbor.git', branch = 'peternose/bugfix/skip-empty-optional-structs' } # Third party. log = "0.4" @@ -35,7 +38,9 @@ futures = "0.3.25" tokio = { version = "1.29.1", features = ["rt", "rt-multi-thread", "sync"] } tendermint = "0.30.0" tendermint-proto = "0.30.0" -tendermint-light-client = { version = "0.30.0", features = ["rust-crypto"], default-features = false } +tendermint-light-client = { version = "0.30.0", features = [ + "rust-crypto", +], default-features = false } tendermint-rpc = { version = "0.30.0", default-features = false } curve25519-dalek = { version = "4.0.0", features = ["legacy_compatibility"] } x25519-dalek = { version = "2.0.0", features = ["static_secrets"] } diff --git a/runtime/src/consensus/registry.rs b/runtime/src/consensus/registry.rs index 301127a54d7..cbe57c96d79 100644 --- a/runtime/src/consensus/registry.rs +++ b/runtime/src/consensus/registry.rs @@ -752,11 +752,9 @@ mod tests { fn test_consistent_runtime() { // NOTE: These tests MUST be synced with go/registry/api/runtime.go. let tcs = vec![ - // FIXME: Change to "qmF2AGJpZFggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABka2luZABnZ2VuZXNpc6Jlcm91bmQAanN0YXRlX3Jvb3RYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ3N0b3JhZ2Wjc2NoZWNrcG9pbnRfaW50ZXJ2YWwAc2NoZWNrcG9pbnRfbnVtX2tlcHQAdWNoZWNrcG9pbnRfY2h1bmtfc2l6ZQBoZXhlY3V0b3Klamdyb3VwX3NpemUAbG1heF9tZXNzYWdlcwBtcm91bmRfdGltZW91dABxZ3JvdXBfYmFja3VwX3NpemUAcmFsbG93ZWRfc3RyYWdnbGVycwBpZW50aXR5X2lkWCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGx0ZWVfaGFyZHdhcmUAcGFkbWlzc2lvbl9wb2xpY3mhaGF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bWlzc2lvbl9wb2xpY3mhaGFueV9ub2RloHBnb3Zlcm5hbmNlX21vZGVsAA==", + "qmF2AGJpZFggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABka2luZABnZ2VuZXNpc6Jlcm91bmQAanN0YXRlX3Jvb3RYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ3N0b3JhZ2Wjc2NoZWNrcG9pbnRfaW50ZXJ2YWwAc2NoZWNrcG9pbnRfbnVtX2tlcHQAdWNoZWNrcG9pbnRfY2h1bmtfc2l6ZQBoZXhlY3V0b3Klamdyb3VwX3NpemUAbG1heF9tZXNzYWdlcwBtcm91bmRfdGltZW91dABxZ3JvdXBfYmFja3VwX3NpemUAcmFsbG93ZWRfc3RyYWdnbGVycwBpZW50aXR5X2lkWCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGx0ZWVfaGFyZHdhcmUAcGFkbWlzc2lvbl9wb2xpY3mhaGFueV9ub2RloHBnb3Zlcm5hbmNlX21vZGVsAA==", Runtime { staking: RuntimeStakingParameters { thresholds: BTreeMap::new(), @@ -768,9 +766,8 @@ mod tests { ..Default::default() }, ), - // FIXME: Change to "q2F2AGJpZFggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABka2luZABnZ2VuZXNpc6Jlcm91bmQAanN0YXRlX3Jvb3RYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ3N0YWtpbmehcnJld2FyZF9iYWRfcmVzdWx0cwpnc3RvcmFnZaNzY2hlY2twb2ludF9pbnRlcnZhbABzY2hlY2twb2ludF9udW1fa2VwdAB1Y2hlY2twb2ludF9jaHVua19zaXplAGhleGVjdXRvcqVqZ3JvdXBfc2l6ZQBsbWF4X21lc3NhZ2VzAG1yb3VuZF90aW1lb3V0AHFncm91cF9iYWNrdXBfc2l6ZQByYWxsb3dlZF9zdHJhZ2dsZXJzAGllbnRpd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9iYWNrdXBfc2l6ZQByYWxsb3dlZF9zdHJhZ2dsZXJzAGllbnRpdHlfaWRYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbHRlZV9oYXJkd2FyZQBwYWRtaXNzaW9uX3BvbGljeaFoYW55X25vZGWgcGdvdmVybmFuY2VfbW9kZWwA", Runtime { staking: RuntimeStakingParameters { thresholds: BTreeMap::new(), diff --git a/runtime/src/consensus/roothash/message.rs b/runtime/src/consensus/roothash/message.rs index 82fbe3f367f..d4e377a24d3 100644 --- a/runtime/src/consensus/roothash/message.rs +++ b/runtime/src/consensus/roothash/message.rs @@ -306,8 +306,7 @@ mod tests { 0, RegistryMessage::UpdateRuntime(registry::Runtime::default()), ))], - // FIXME: Change to e6e170fb771583147255e0c96dc88615d4fd2fd28488ae489df01da201affe72 once cbor is fixed. - "baf9eeaa4860e363a9c27d99555839afc535f0cd32d23dc640f0f020677460e0", + "e6e170fb771583147255e0c96dc88615d4fd2fd28488ae489df01da201affe72", ), ( vec![Message::Registry(Versioned::new( diff --git a/tests/runtimes/simple-keyvalue/Cargo.toml b/tests/runtimes/simple-keyvalue/Cargo.toml index 0a97279d9db..70f1e2d788a 100644 --- a/tests/runtimes/simple-keyvalue/Cargo.toml +++ b/tests/runtimes/simple-keyvalue/Cargo.toml @@ -20,6 +20,7 @@ stack-size = 2097152 threads = 8 [dependencies] +# TODO: Upgrade. cbor = { version = "0.5.1", package = "oasis-cbor" } oasis-core-runtime = { path = "../../../runtime" } oasis-core-keymanager = { path = "../../../keymanager" }