From 4e0cb38d2baa8d4043a46639b05825c911ff47d8 Mon Sep 17 00:00:00 2001 From: liuxincheng Date: Fri, 15 Sep 2023 11:16:00 +0800 Subject: [PATCH] feat(protocol): upgrade protocol --- api/api.proto | 18 ++++++++++++++++++ core/Tron.proto | 2 ++ 2 files changed, 20 insertions(+) diff --git a/api/api.proto b/api/api.proto index d23d6e017..9a7534cf6 100644 --- a/api/api.proto +++ b/api/api.proto @@ -767,6 +767,15 @@ service Wallet { rpc GetBlock (BlockReq) returns (BlockExtention) { } + + rpc GetBandwidthPrices (EmptyMessage) returns (PricesResponseMessage) { + } + + rpc GetEnergyPrices (EmptyMessage) returns (PricesResponseMessage) { + } + + rpc GetMemoFee (EmptyMessage) returns (PricesResponseMessage) { + } }; service WalletSolidity { @@ -963,6 +972,11 @@ service WalletSolidity { } rpc GetBlock (BlockReq) returns (BlockExtention) { } + rpc GetBandwidthPrices (EmptyMessage) returns (PricesResponseMessage) { + } + + rpc GetEnergyPrices (EmptyMessage) returns (PricesResponseMessage) { + } }; service WalletExtension { @@ -1107,6 +1121,10 @@ message CanWithdrawUnfreezeAmountResponseMessage { int64 amount = 1; } +message PricesResponseMessage { + string prices = 1; +} + // Gossip node list message NodeList { repeated Node nodes = 1; diff --git a/core/Tron.proto b/core/Tron.proto index aa6a96ba1..2fc08901e 100644 --- a/core/Tron.proto +++ b/core/Tron.proto @@ -601,6 +601,8 @@ enum ReasonCode { TOO_MANY_PEERS_WITH_SAME_IP = 0x22; LIGHT_NODE_SYNC_FAIL = 0x23; BELOW_THAN_ME = 0X24; + NOT_WITNESS = 0x25; + NO_SUCH_MESSAGE = 0x26; UNKNOWN = 0xFF; }