Skip to content

Commit

Permalink
runtime: Upgrade cbor to 0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
peternose committed Oct 9, 2023
1 parent 6bbae8f commit 80b9521
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 16 deletions.
Empty file added .changelog/5391.trivial.md
Empty file.
41 changes: 35 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions keymanager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ edition = "2018"

[dependencies]
oasis-core-runtime = { path = "../runtime" }
# TODO: Upgrade.
cbor = { version = "0.5.1", package = "oasis-cbor" }

# Third party.
Expand Down
9 changes: 7 additions & 2 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ authors = ["Oasis Protocol Foundation <[email protected]>"]
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"
Expand Down Expand Up @@ -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"] }
Expand Down
9 changes: 3 additions & 6 deletions runtime/src/consensus/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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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Runtime {
staking: RuntimeStakingParameters {
thresholds: BTreeMap::new(),
Expand All @@ -768,9 +766,8 @@ mod tests {
..Default::default()
},
),
// FIXME: Change to "q2F2AGJpZFggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABka2luZABnZ2VuZXNpc6Jlcm91bmQAanN0YXRlX3Jvb3RYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ3N0YWtpbmehcnJld2FyZF9iYWRfcmVzdWx0cwpnc3RvcmFnZaNzY2hlY2twb2ludF9pbnRlcnZhbABzY2hlY2twb2ludF9udW1fa2VwdAB1Y2hlY2twb2ludF9jaHVua19zaXplAGhleGVjdXRvcqVqZ3JvdXBfc2l6ZQBsbWF4X21lc3NhZ2VzAG1yb3VuZF90aW1lb3V0AHFncm91cF9iYWNrdXBfc2l6ZQByYWxsb3dlZF9zdHJhZ2dsZXJzAGllbnRpdHlfaWRYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbHRlZV9oYXJkd2FyZQBwYWRtaXNzaW9uX3BvbGljeaFoYW55X25vZGWgcGdvdmVybmFuY2VfbW9kZWwA" once cbor is fixed.
(
"rGF2AGJpZFggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABka2luZABnZ2VuZXNpc6Jlcm91bmQAanN0YXRlX3Jvb3RYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ3N0YWtpbmehcnJld2FyZF9iYWRfcmVzdWx0cwpnc3RvcmFnZaNzY2hlY2twb2ludF9pbnRlcnZhbABzY2hlY2twb2ludF9udW1fa2VwdAB1Y2hlY2twb2ludF9jaHVua19zaXplAGhleGVjdXRvcqVqZ3JvdXBfc2l6ZQBsbWF4X21lc3NhZ2VzAG1yb3VuZF90aW1lb3V0AHFncm91cF9iYWNrdXBfc2l6ZQByYWxsb3dlZF9zdHJhZ2dsZXJzAGllbnRpdHlfaWRYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbHRlZV9oYXJkd2FyZQBtdHhuX3NjaGVkdWxlcqBwYWRtaXNzaW9uX3BvbGljeaFoYW55X25vZGWgcGdvdmVybmFuY2VfbW9kZWwA",
"q2F2AGJpZFggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABka2luZABnZ2VuZXNpc6Jlcm91bmQAanN0YXRlX3Jvb3RYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ3N0YWtpbmehcnJld2FyZF9iYWRfcmVzdWx0cwpnc3RvcmFnZaNzY2hlY2twb2ludF9pbnRlcnZhbABzY2hlY2twb2ludF9udW1fa2VwdAB1Y2hlY2twb2ludF9jaHVua19zaXplAGhleGVjdXRvcqVqZ3JvdXBfc2l6ZQBsbWF4X21lc3NhZ2VzAG1yb3VuZF90aW1lb3V0AHFncm91cF9iYWNrdXBfc2l6ZQByYWxsb3dlZF9zdHJhZ2dsZXJzAGllbnRpdHlfaWRYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbHRlZV9oYXJkd2FyZQBwYWRtaXNzaW9uX3BvbGljeaFoYW55X25vZGWgcGdvdmVybmFuY2VfbW9kZWwA",
Runtime {
staking: RuntimeStakingParameters {
thresholds: BTreeMap::new(),
Expand Down
3 changes: 1 addition & 2 deletions runtime/src/consensus/roothash/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions tests/runtimes/simple-keyvalue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down

0 comments on commit 80b9521

Please sign in to comment.