diff --git a/p2p/proto/block.proto b/p2p/proto/block.proto index d8e30dd..46c19fb 100644 --- a/p2p/proto/block.proto +++ b/p2p/proto/block.proto @@ -14,7 +14,7 @@ message Signatures { // Note: commitments may change to be for the previous blocks like comet/tendermint // hash of block header sent to L1 message BlockHeader { - Hash parent_header = 1; + Hash parent_hash = 1; uint64 number = 2; google.protobuf.Timestamp time = 3; // TODO: see if this needs to be Felt252 or can be converted Address sequencer_address = 4; @@ -29,6 +29,8 @@ message BlockHeader { Merkle transactions = 8; // By order of execution. TBD: required? the client can execute (powerful machine) and match state diff Merkle events = 9; // By order of issuance. TBD: in receipts? Merkle receipts = 10; // By order of issuance. + string protocol_version = 11; // Starknet version + Felt252 gas_price = 12; } message BlockProof { @@ -45,6 +47,8 @@ message NewBlock { } } +// Requests a peer's CurrentBlockHeader +message CurrentBlockHeaderRequest {} // result is (BlockHeader, Signature?)* in order of creation (incr/dec) message BlockHeadersRequest { diff --git a/p2p/proto/event.proto b/p2p/proto/event.proto index 1528f8d..00cb57d 100644 --- a/p2p/proto/event.proto +++ b/p2p/proto/event.proto @@ -2,9 +2,10 @@ syntax = "proto3"; import "p2p/proto/common.proto"; message Event { - Felt252 from_address = 1; - repeated Felt252 keys = 2; - repeated Felt252 data = 3; + Hash transaction_hash = 1; + Felt252 from_address = 2; + repeated Felt252 keys = 3; + repeated Felt252 data = 4; } message EventsRequest { diff --git a/p2p/proto/receipt.proto b/p2p/proto/receipt.proto index f22ff09..74e36d8 100644 --- a/p2p/proto/receipt.proto +++ b/p2p/proto/receipt.proto @@ -29,6 +29,7 @@ message Receipt { uint32 range_check = 5; uint32 poseidon = 6; uint32 keccak = 7; + uint32 output = 8; } BuiltinCounter builtins = 1; @@ -37,11 +38,12 @@ message Receipt { } message Common { - Hash transaction_hash = 1; - Felt252 actual_fee = 2; - repeated MessageToL1 messages_sent = 3; - ExecutionResources execution_resources = 4; - string revert_reason = 5; + Hash transaction_hash = 1; + Felt252 actual_fee = 2; + repeated MessageToL1 messages_sent = 3; + ExecutionResources execution_resources = 4; + string revert_reason = 5; + optional MessageToL2 consumed_message = 6; } @@ -68,7 +70,7 @@ message Receipt { Felt252 contract_address = 2; } - oneof receipt { + oneof type { Invoke invoke = 1; L1Handler l1_handler = 2; Declare declare = 3; diff --git a/p2p/proto/state.proto b/p2p/proto/state.proto index 4ed9e49..9415db6 100644 --- a/p2p/proto/state.proto +++ b/p2p/proto/state.proto @@ -18,8 +18,15 @@ message StateDiff repeated ContractStoredValue values = 4; } + message ContractAddrToClassHash { + Address contract_addr = 1; + Hash class_hash = 2; + } + uint32 domain = 1; // volition state domain repeated ContractDiff contract_diffs = 2; + repeated ContractAddrToClassHash replaced_classes = 3; + repeated ContractAddrToClassHash deployed_contracts = 4; } message EntryPoint {