syntax = "proto3"; package rusk; import "echo.proto"; import "network.proto"; import "prover.proto"; import "provisioner.proto"; import "transaction.proto"; message PreverifyRequest { Transaction tx = 1; } message PreverifyResponse { bytes tx_hash = 1; Fee fee = 2; } message StateTransitionRequest { repeated Transaction txs = 1; fixed64 block_gas_limit = 2; fixed64 block_height = 3; bytes state_root = 4; bytes generator = 5; } message StateTransitionResponse { repeated ExecutedTransaction txs = 1; bytes state_root = 2; // NOTE: this might require a failure mode } message ExecuteStateTransitionRequest { repeated Transaction txs = 1; fixed64 block_gas_limit = 2; fixed64 block_height = 3; bytes generator = 4; } message ExecuteStateTransitionResponse { repeated ExecutedTransaction txs = 1; repeated Transaction discarded_txs = 2; bytes state_root = 3; } message VerifyStateTransitionRequest { repeated Transaction txs = 1; fixed64 block_gas_limit = 2; fixed64 block_height = 3; bytes generator = 4; } message VerifyStateTransitionResponse { bytes state_root = 1; } message GetProvisionersRequest {} message GetProvisionersResponse { repeated Provisioner provisioners = 1; } message GetStateRootRequest {} message GetStateRootResponse { bytes state_root = 1; } message GetNotesOwnedByRequest { uint64 height = 1 [deprecated=true]; bytes vk = 2 [deprecated=true]; } message GetNotesOwnedByResponse { repeated bytes notes = 1; uint64 height = 2; } message GetNotesRequest { uint64 height = 1; bytes vk = 2; } message GetNotesResponse { bytes note = 1; uint64 height = 2; } message GetAnchorRequest {} message GetAnchorResponse { bytes anchor = 1; // BlsScalar } message GetOpeningRequest { bytes note = 1; } message GetOpeningResponse { bytes branch = 1; // PoseidonBranch } message GetStakeRequest { bytes pk = 1; // PublicKey } message GetStakeResponse { message Amount { fixed64 value = 1; fixed64 eligibility = 2; } Amount amount = 1; fixed64 reward = 2; fixed64 counter = 3; } message FindExistingNullifiersRequest { repeated bytes nullifiers = 1; } message FindExistingNullifiersResponse { repeated bytes nullifiers = 1; } message RevertRequest {} message RevertResponse { bytes state_root = 1; } message PersistRequest { bytes state_root = 1; } message PersistResponse {} service State { rpc Echo(EchoRequest) returns (EchoResponse) {} rpc Preverify(PreverifyRequest) returns (PreverifyResponse) {} rpc ExecuteStateTransition(ExecuteStateTransitionRequest) returns (ExecuteStateTransitionResponse) {} rpc VerifyStateTransition(VerifyStateTransitionRequest) returns (VerifyStateTransitionResponse) {} rpc Accept(StateTransitionRequest) returns (StateTransitionResponse) {} rpc Finalize(StateTransitionRequest) returns (StateTransitionResponse) {} rpc Revert(RevertRequest) returns (RevertResponse) {} rpc Persist(PersistRequest) returns (PersistResponse) {} rpc GetProvisioners(GetProvisionersRequest) returns (GetProvisionersResponse) {} rpc GetStateRoot(GetStateRootRequest) returns (GetStateRootResponse) {} rpc GetNotesOwnedBy(GetNotesOwnedByRequest) returns (GetNotesOwnedByResponse) {} // Streams notes from a given block height, optionally filtered by the // given view key. If the view key is not present, *all* notes will be // streamed. rpc GetNotes(GetNotesRequest) returns (stream GetNotesResponse) {} rpc GetAnchor(GetAnchorRequest) returns (GetAnchorResponse) {} rpc GetOpening(GetOpeningRequest) returns (GetOpeningResponse) {} rpc GetStake(GetStakeRequest) returns (GetStakeResponse) {} rpc FindExistingNullifiers(FindExistingNullifiersRequest) returns (FindExistingNullifiersResponse) {} }