Skip to content

Commit

Permalink
Aligning sidecar to latest changes in casper-node (#367)
Browse files Browse the repository at this point in the history
* Aligning sidecar to latest changes in casper-node

* Fixing schema tests

---------

Co-authored-by: Jakub Zajkowski <[email protected]>
  • Loading branch information
zajko and Jakub Zajkowski authored Nov 26, 2024
1 parent af91bc9 commit 332b2d3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 25 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions resources/test/rpc_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5612,13 +5612,13 @@
"additionalProperties": false
},
{
"description": "A `Package`.",
"description": "A smart contract `Package`.",
"type": "object",
"required": [
"Package"
"SmartContract"
],
"properties": {
"Package": {
"SmartContract": {
"$ref": "#/components/schemas/Package"
}
},
Expand Down
15 changes: 4 additions & 11 deletions resources/test/speculative_rpc_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1652,13 +1652,13 @@
"additionalProperties": false
},
{
"description": "A `Package`.",
"description": "A smart contract `Package`.",
"type": "object",
"required": [
"Package"
"SmartContract"
],
"properties": {
"Package": {
"SmartContract": {
"$ref": "#/components/schemas/Package"
}
},
Expand Down Expand Up @@ -3787,14 +3787,7 @@
"properties": {
"hash_addr": {
"description": "The identity of the entity that produced the message.",
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
"maxItems": 32,
"minItems": 32
"type": "string"
},
"message": {
"description": "The payload of the message.",
Expand Down
2 changes: 1 addition & 1 deletion rpc_sidecar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ mod tests {
// schemars attribute too, indicating it is a hex-encoded string. See for example
// `TransactionInvocationTarget::Package::addr`.
/*
TODO -> reinstantiate this assertion once serialization ofhash_addr in Message structure in casper-types is fixed
TODO -> reinstantiate this assertion once serialization of DelegatorKind::Purse and UnbondKind::DelegatedPurse in casper-types is fixed
let regex = Regex::new(
r#"\s*"type":\s*"array",\s*"items":\s*\{\s*"type":\s*"integer",\s*"format":\s*"uint8",\s*"minimum":\s*0\.0\s*\},"#
).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion types/src/legacy_sse_data/fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ const RAW_DEPLOY_PROCESSED: &str = r#"{
},
"messages": [
{
"hash_addr": [61,209,4,163,12,194,253,136,176,206,91,89,81,218,9,43,171,179,25,128,122,30,243,188,27,102,105,85,12,193,234,193],
"hash_addr": "7da5cc7bb0035d5e2a05014c4ac8e23ec2b198988da9401411040efddb0108ef",
"entity_hash": "entity-system-fbd35eaf71f295b3bf35a295e705f629bbea28cefedfc109eda1205fb3650bad",
"message": {
"String": "cs5rHI2Il75nRJ7GLs7BQM5CilvzMqu0dgFuj57FkqEs3431LJ1qfsZActb05hzR"
Expand Down
2 changes: 1 addition & 1 deletion types/src/legacy_sse_data/translate_execution_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn maybe_tanslate_stored_value(stored_value: &StoredValue) -> Option<TransformKi
// following variants will not be understood by old clients since they were introduced in 2.x
StoredValue::AddressableEntity(_) => None,
StoredValue::BidKind(_) => None,
StoredValue::Package(_) => None,
StoredValue::SmartContract(_) => None,
StoredValue::ByteCode(_) => None,
StoredValue::MessageTopic(_) => None,
StoredValue::Message(_) => None,
Expand Down

0 comments on commit 332b2d3

Please sign in to comment.