From 81fb8689f37e1288164a75a783b1ea98ccb46f94 Mon Sep 17 00:00:00 2001 From: Steve Gerbino Date: Fri, 15 Mar 2024 14:05:26 +0100 Subject: [PATCH] #222: Add new request/response to check transaction validity in mempool --- koinos/rpc/mempool/mempool_rpc.proto | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/koinos/rpc/mempool/mempool_rpc.proto b/koinos/rpc/mempool/mempool_rpc.proto index 2a77ce6..6fb5f4d 100644 --- a/koinos/rpc/mempool/mempool_rpc.proto +++ b/koinos/rpc/mempool/mempool_rpc.proto @@ -44,12 +44,27 @@ message check_account_nonce_response { bool success = 1; } +message check_transaction_eligibility_request { + bytes payer = 1 [(btype) = ADDRESS]; + bytes payee = 2 [(btype) = ADDRESS]; + bytes nonce = 3; + uint64 max_payer_rc = 4 [jstype = JS_STRING]; + uint64 rc_limit = 5 [jstype = JS_STRING]; + + optional bytes block_id = 1000 [(btype) = BLOCK_ID]; +} + +message check_transaction_eligibility_response { + bool success = 1; +} + message mempool_request { oneof request { rpc.reserved_rpc reserved = 1; check_pending_account_resources_request check_pending_account_resources = 2; get_pending_transactions_request get_pending_transactions = 3; check_account_nonce_request check_account_nonce = 4; + check_transaction_eligibility_request check_transaction_eligibility = 5; } } @@ -60,5 +75,6 @@ message mempool_response { check_pending_account_resources_response check_pending_account_resources = 3; get_pending_transactions_response get_pending_transactions = 4; check_account_nonce_response check_account_nonce = 5; + check_transaction_eligibility_response check_transaction_eligibility = 6; } }