diff --git a/.github/workflows/ci-casper-event-sidecar-rs.yml b/.github/workflows/ci-casper-event-sidecar-rs.yml index 7cfdcfee..9b3fc3c8 100644 --- a/.github/workflows/ci-casper-event-sidecar-rs.yml +++ b/.github/workflows/ci-casper-event-sidecar-rs.yml @@ -46,7 +46,8 @@ jobs: # Hope to get to here: # run: cargo audit --deny warnings # RUSTSEC-2023-0071 - there is a transitive audit issue via sqlx. There is no fix for that yet, we should update dependencies once a fix is presented - run: cargo audit --ignore RUSTSEC-2023-0071 + # RUSTSEC-2024-0363 - issue in sqlx 0.8.0, no fix available yet + run: cargo audit --ignore RUSTSEC-2023-0071 --ignore RUSTSEC-2024-0363 - name: test run: cargo test diff --git a/Cargo.lock b/Cargo.lock index 272cade2..6fd7ebc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -471,7 +471,7 @@ dependencies = [ [[package]] name = "casper-binary-port" version = "1.0.0" -source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#c58bccf4411bbaab233f26b3845503429d27f7e1" +source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#b92f881b8351d88082e90a3addebc84ada87bcd8" dependencies = [ "bincode", "bytes", @@ -673,7 +673,7 @@ dependencies = [ [[package]] name = "casper-types" version = "5.0.0" -source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#c58bccf4411bbaab233f26b3845503429d27f7e1" +source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#b92f881b8351d88082e90a3addebc84ada87bcd8" dependencies = [ "base16", "base64 0.13.1", diff --git a/resources/test/rpc_schema.json b/resources/test/rpc_schema.json index fa4702fb..3182679a 100644 --- a/resources/test/rpc_schema.json +++ b/resources/test/rpc_schema.json @@ -3674,6 +3674,20 @@ "enum": [ "ChangeBidPublicKey" ] + }, + { + "description": "The `add_reservations` native entry point, used to add delegator to validator's reserve list", + "type": "string", + "enum": [ + "AddReservations" + ] + }, + { + "description": "The `cancel_reservations` native entry point, used to remove delegator from validator's reserve list", + "type": "string", + "enum": [ + "CancelReservations" + ] } ] }, @@ -4940,6 +4954,19 @@ } }, "additionalProperties": false + }, + { + "description": "Reservation", + "type": "object", + "required": [ + "Reservation" + ], + "properties": { + "Reservation": { + "$ref": "#/components/schemas/Reservation" + } + }, + "additionalProperties": false } ] }, @@ -4952,6 +4979,7 @@ "inactive", "maximum_delegation_amount", "minimum_delegation_amount", + "reserved_slots", "staked_amount", "validator_public_key" ], @@ -5012,6 +5040,12 @@ "type": "integer", "format": "uint64", "minimum": 0.0 + }, + "reserved_slots": { + "description": "Slots reserved for specific delegators", + "type": "integer", + "format": "uint32", + "minimum": 0.0 } }, "additionalProperties": false @@ -5088,6 +5122,40 @@ }, "additionalProperties": false }, + "Reservation": { + "description": "Represents a validator reserving a slot for specific delegator", + "type": "object", + "required": [ + "delegation_rate", + "delegator_public_key", + "validator_public_key" + ], + "properties": { + "delegator_public_key": { + "description": "Delegator public key", + "allOf": [ + { + "$ref": "#/components/schemas/PublicKey" + } + ] + }, + "validator_public_key": { + "description": "Validator public key", + "allOf": [ + { + "$ref": "#/components/schemas/PublicKey" + } + ] + }, + "delegation_rate": { + "description": "Individual delegation rate", + "type": "integer", + "format": "uint8", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, "ExecutionResultV2": { "description": "The result of executing a single transaction.", "type": "object", diff --git a/resources/test/speculative_rpc_schema.json b/resources/test/speculative_rpc_schema.json index 391d0eac..867cd792 100644 --- a/resources/test/speculative_rpc_schema.json +++ b/resources/test/speculative_rpc_schema.json @@ -2937,6 +2937,19 @@ } }, "additionalProperties": false + }, + { + "description": "Reservation", + "type": "object", + "required": [ + "Reservation" + ], + "properties": { + "Reservation": { + "$ref": "#/components/schemas/Reservation" + } + }, + "additionalProperties": false } ] }, @@ -2949,6 +2962,7 @@ "inactive", "maximum_delegation_amount", "minimum_delegation_amount", + "reserved_slots", "staked_amount", "validator_public_key" ], @@ -3009,6 +3023,12 @@ "type": "integer", "format": "uint64", "minimum": 0.0 + }, + "reserved_slots": { + "description": "Slots reserved for specific delegators", + "type": "integer", + "format": "uint32", + "minimum": 0.0 } }, "additionalProperties": false @@ -3085,6 +3105,40 @@ }, "additionalProperties": false }, + "Reservation": { + "description": "Represents a validator reserving a slot for specific delegator", + "type": "object", + "required": [ + "delegation_rate", + "delegator_public_key", + "validator_public_key" + ], + "properties": { + "delegator_public_key": { + "description": "Delegator public key", + "allOf": [ + { + "$ref": "#/components/schemas/PublicKey" + } + ] + }, + "validator_public_key": { + "description": "Validator public key", + "allOf": [ + { + "$ref": "#/components/schemas/PublicKey" + } + ] + }, + "delegation_rate": { + "description": "Individual delegation rate", + "type": "integer", + "format": "uint8", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, "Package": { "description": "Entity definition, metadata, and security container.", "type": "object", @@ -4118,6 +4172,20 @@ "enum": [ "ChangeBidPublicKey" ] + }, + { + "description": "The `add_reservations` native entry point, used to add delegator to validator's reserve list", + "type": "string", + "enum": [ + "AddReservations" + ] + }, + { + "description": "The `cancel_reservations` native entry point, used to remove delegator from validator's reserve list", + "type": "string", + "enum": [ + "CancelReservations" + ] } ] },