Skip to content

Commit 80d7ac4

Browse files
authored
chore: update protobufs (#2424)
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
1 parent 0ea757f commit 80d7ac4

13 files changed

+153
-25
lines changed

scripts/update_protobufs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def ensure_protobufs():
134134
run_command("git", "clone", PROTO_GIT_REMOTE, PROTO_GIT_PATH)
135135
os.chdir(PROTO_GIT_PATH)
136136
run_command("git", "fetch")
137-
checkout_ref = "v0.62.2"
137+
checkout_ref = "v0.64.0"
138138
print(f">>> Checking out {checkout_ref}")
139139
run_command("git", "checkout", checkout_ref)
140140
if is_branch(checkout_ref):

sdk/src/main/java/com/hedera/hashgraph/sdk/FreezeType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ static FreezeType valueOf(com.hedera.hashgraph.sdk.proto.FreezeType code) {
113113
case FREEZE_ABORT -> FREEZE_ABORT;
114114
case TELEMETRY_UPGRADE -> TELEMETRY_UPGRADE;
115115
case UNRECOGNIZED ->
116-
// NOTE: Protobuf deserialization will not give us the code on the wire
117-
throw new IllegalArgumentException(
118-
"network returned unrecognized response code; your SDK may be out of date");
116+
// NOTE: Protobuf deserialization will not give us the code on the wire
117+
throw new IllegalArgumentException(
118+
"network returned unrecognized response code; your SDK may be out of date");
119119
};
120120
}
121121

sdk/src/main/java/com/hedera/hashgraph/sdk/Status.java

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,13 @@ public enum Status {
19081908
* The GRPC proxy endpoint is set in the NodeCreate or NodeUpdate transaction,
19091909
* which the network does not support.
19101910
*/
1911-
GRPC_WEB_PROXY_NOT_SUPPORTED(ResponseCodeEnum.GRPC_WEB_PROXY_NOT_SUPPORTED);
1911+
GRPC_WEB_PROXY_NOT_SUPPORTED(ResponseCodeEnum.GRPC_WEB_PROXY_NOT_SUPPORTED),
1912+
1913+
/**
1914+
* An NFT transfers list referenced a token type other than NON_FUNGIBLE_UNIQUE.
1915+
*/
1916+
NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE(
1917+
ResponseCodeEnum.NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE);
19121918

19131919
final ResponseCodeEnum code;
19141920

@@ -2122,25 +2128,31 @@ static Status valueOf(ResponseCodeEnum code) {
21222128
case FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT -> FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT;
21232129
case CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES -> CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES;
21242130
case CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON -> CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON;
2125-
case CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON -> CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON;
2131+
case CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON ->
2132+
CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON;
21262133
case INVALID_CUSTOM_FEE_SCHEDULE_KEY -> INVALID_CUSTOM_FEE_SCHEDULE_KEY;
21272134
case INVALID_TOKEN_MINT_METADATA -> INVALID_TOKEN_MINT_METADATA;
21282135
case INVALID_TOKEN_BURN_METADATA -> INVALID_TOKEN_BURN_METADATA;
21292136
case CURRENT_TREASURY_STILL_OWNS_NFTS -> CURRENT_TREASURY_STILL_OWNS_NFTS;
21302137
case ACCOUNT_STILL_OWNS_NFTS -> ACCOUNT_STILL_OWNS_NFTS;
21312138
case TREASURY_MUST_OWN_BURNED_NFT -> TREASURY_MUST_OWN_BURNED_NFT;
21322139
case ACCOUNT_DOES_NOT_OWN_WIPED_NFT -> ACCOUNT_DOES_NOT_OWN_WIPED_NFT;
2133-
case ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON -> ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON;
2140+
case ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON ->
2141+
ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON;
21342142
case MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED -> MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED;
21352143
case PAYER_ACCOUNT_DELETED -> PAYER_ACCOUNT_DELETED;
21362144
case CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH -> CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH;
21372145
case CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS -> CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS;
2138-
case INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE -> INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE;
2146+
case INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE ->
2147+
INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE;
21392148
case SERIAL_NUMBER_LIMIT_REACHED -> SERIAL_NUMBER_LIMIT_REACHED;
2140-
case CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE -> CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE;
2149+
case CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE ->
2150+
CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE;
21412151
case NO_REMAINING_AUTOMATIC_ASSOCIATIONS -> NO_REMAINING_AUTOMATIC_ASSOCIATIONS;
2142-
case EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT -> EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT;
2143-
case REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT -> REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT;
2152+
case EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT ->
2153+
EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT;
2154+
case REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT ->
2155+
REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT;
21442156
case TOKEN_IS_PAUSED -> TOKEN_IS_PAUSED;
21452157
case TOKEN_HAS_NO_PAUSE_KEY -> TOKEN_HAS_NO_PAUSE_KEY;
21462158
case INVALID_PAUSE_KEY -> INVALID_PAUSE_KEY;
@@ -2183,7 +2195,8 @@ static Status valueOf(ResponseCodeEnum code) {
21832195
case DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL -> DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL;
21842196
case DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL -> DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL;
21852197
case SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE -> SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE;
2186-
case SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME -> SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME;
2198+
case SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME ->
2199+
SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME;
21872200
case SCHEDULE_FUTURE_THROTTLE_EXCEEDED -> SCHEDULE_FUTURE_THROTTLE_EXCEEDED;
21882201
case SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED -> SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED;
21892202
case INVALID_ETHEREUM_TRANSACTION -> INVALID_ETHEREUM_TRANSACTION;
@@ -2276,10 +2289,12 @@ static Status valueOf(ResponseCodeEnum code) {
22762289
case THROTTLE_GROUP_LCM_OVERFLOW -> THROTTLE_GROUP_LCM_OVERFLOW;
22772290
case AIRDROP_CONTAINS_MULTIPLE_SENDERS_FOR_A_TOKEN -> AIRDROP_CONTAINS_MULTIPLE_SENDERS_FOR_A_TOKEN;
22782291
case GRPC_WEB_PROXY_NOT_SUPPORTED -> GRPC_WEB_PROXY_NOT_SUPPORTED;
2292+
case NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE ->
2293+
NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE;
22792294
case UNRECOGNIZED ->
2280-
// NOTE: Protobuf deserialization will not give us the code on the wire
2281-
throw new IllegalArgumentException(
2282-
"network returned unrecognized response code; your SDK may be out of date");
2295+
// NOTE: Protobuf deserialization will not give us the code on the wire
2296+
throw new IllegalArgumentException(
2297+
"network returned unrecognized response code; your SDK may be out of date");
22832298
};
22842299
}
22852300

sdk/src/main/proto/block_stream_info.proto

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ message BlockStreamInfo {
9999
* This SHALL count the number of output block items that _precede_
100100
* the state change that updates this singleton.
101101
*/
102-
uint32 num_preceding_output_items = 7;
102+
uint32 num_preceding_state_changes_items = 7;
103103

104104
/**
105105
* A concatenation of SHA2-384 hash values.<br/>
@@ -108,7 +108,7 @@ message BlockStreamInfo {
108108
* The subtree containing these hashes SHALL be constructed from all "output"
109109
* `BlockItem`s in this block that _precede_ the update to this singleton.
110110
*/
111-
repeated bytes rightmost_preceding_output_tree_hashes = 8;
111+
repeated bytes rightmost_preceding_state_changes_tree_hashes = 8;
112112

113113
/**
114114
* A block-end consensus time stamp.
@@ -148,4 +148,22 @@ message BlockStreamInfo {
148148
* at which a user transaction was handled.
149149
*/
150150
proto.Timestamp last_handle_time = 13;
151+
152+
/**
153+
* A SHA2-384 hash value.<br/>
154+
* This is the hash of the "consensus headers" subtree for this block.
155+
*/
156+
bytes consensus_header_tree_root_hash = 14;
157+
158+
/**
159+
* A SHA2-384 hash value.<br/>
160+
* This is the hash of the "trace data" subtree for this block.
161+
*/
162+
bytes trace_data_tree_root_hash = 15;
163+
164+
/**
165+
* A SHA2-384 hash value.<br/>
166+
* This is the hash of the "output" subtree for this block.
167+
*/
168+
bytes output_tree_root_hash = 16;
151169
}

sdk/src/main/proto/contract_types.proto

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,64 @@ option java_multiple_files = true;
2121
import "basic_types.proto";
2222
import "google/protobuf/wrappers.proto";
2323

24+
/**
25+
* Context of an internal call in an EVM transaction that is not otherwise externalized.<br/>
26+
*/
27+
message InternalCallContext {
28+
/**
29+
* The gas available for the call.<br/>
30+
*/
31+
uint64 gas = 1;
32+
33+
/**
34+
* The value sent with the call.<br/>
35+
*/
36+
uint64 value = 2;
37+
38+
/**
39+
* The call data for the call.<br/>
40+
*/
41+
bytes call_data = 3;
42+
}
43+
44+
/**
45+
* Results of executing a EVM transaction.<br/>
46+
*/
47+
message EvmTransactionResult {
48+
/**
49+
* The Hedera id of the caller.<br/>
50+
*/
51+
AccountID sender_id = 1;
52+
53+
/**
54+
* The Hedera id of the contract receiving the call.<br/>
55+
*/
56+
ContractID contract_id = 2;
57+
58+
/**
59+
* Result data from the function call.
60+
*/
61+
bytes result_data = 3;
62+
63+
/**
64+
* Any error message produced by the contract call. Max size of 100 bytes.
65+
* <p>
66+
* This SHALL be unset if the contract call succeeded.
67+
*/
68+
string error_message = 4;
69+
70+
/**
71+
* EVM gas used.
72+
*/
73+
uint64 gas_used = 5;
74+
75+
/**
76+
* If not already externalized in a transaction body, the context of the
77+
* internal call producing this result.
78+
*/
79+
InternalCallContext internal_call_context = 6;
80+
}
81+
2482
/**
2583
* A contract "nonce" reference.<br/>
2684
* This connects a contract and its "nonce" value, and is primarily for use in

sdk/src/main/proto/hints_types.proto

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ message PreprocessingVote {
9898
}
9999

100100
/**
101-
* A node's hinTS party id.
101+
* A node's weighted hinTS party id.
102102
*/
103103
message NodePartyId {
104104
/**
@@ -109,6 +109,10 @@ message NodePartyId {
109109
* The party id.
110110
*/
111111
uint32 party_id = 2;
112+
/**
113+
* The party's weight in the construction.
114+
*/
115+
uint64 party_weight = 3;
112116
}
113117

114118
/**
@@ -209,7 +213,7 @@ message CRSState {
209213
* to ensure that all nodes contribute to the CRS in a round-robin fashion.
210214
* If this is null, then all nodes in the network have contributed to the CRS.
211215
*/
212-
google.protobuf.UInt64Value next_contributing_node_id = 3;
216+
google.protobuf.UInt64Value next_contributing_node_id = 3;
213217

214218
/**
215219
* The time at which the network should stop waiting for the node's contributions

sdk/src/main/proto/node_update.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ message NodeUpdateTransactionBody {
162162
* This endpoint MUST use a valid port and SHALL be reachable over TLS.<br/>
163163
* This field MAY be omitted if the node does not support gRPC-Web access.<br/>
164164
* This field MUST be updated if the gRPC-Web endpoint changes.<br/>
165-
* This field SHALL enable frontend clients to avoid hard-coded proxy endpoints.
165+
* This field SHALL enable frontend clients to avoid hard-coded proxy endpoints.<br/>
166+
* This field MAY be set to `ServiceEndpoint.DEFAULT` to remove a previously-valid
167+
* web proxy.
166168
*/
167169
proto.ServiceEndpoint grpc_proxy_endpoint = 10;
168170
}

sdk/src/main/proto/response_code.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,4 +1760,9 @@ enum ResponseCodeEnum {
17601760
* which the network does not support.
17611761
*/
17621762
GRPC_WEB_PROXY_NOT_SUPPORTED = 399;
1763+
1764+
/**
1765+
* An NFT transfers list referenced a token type other than NON_FUNGIBLE_UNIQUE.
1766+
*/
1767+
NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE = 400;
17631768
}

sdk/src/main/proto/roster_state.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ message RosterState {
3333
* This list SHALL be ordered by round numbers in descending order.
3434
*/
3535
repeated RoundRosterPair round_roster_pairs = 2;
36+
37+
/**
38+
* Indicates whether the roster transplant is in progress.<br/>
39+
* This is needed to determine if all the node creations and deletions are complete.
40+
* True while a transplant roster is still being processed (nodes are
41+
* being created/updated/deleted). Reset to false once dispatch is finished.
42+
*
43+
* <p>
44+
* A transplant roster is one that has been adopted from another network
45+
* using an override startup asset, rather than being generated by the current network's consensus.
46+
*/
47+
bool transplant_in_progress = 3;
3648
}
3749

3850
/**

sdk/src/main/proto/schedulable_transaction_body.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import "token_airdrop.proto";
7070

7171
import "schedule_delete.proto";
7272
import "util_prng.proto";
73+
import "custom_fees.proto";
7374

7475
import "node_create.proto";
7576
import "node_update.proto";
@@ -403,4 +404,13 @@ message SchedulableTransactionBody {
403404
*/
404405
TokenAirdropTransactionBody tokenAirdrop = 48;
405406
}
407+
408+
/**
409+
* A list of maximum custom fees that the users are willing to pay.
410+
* <p>
411+
* This field is OPTIONAL.<br/>
412+
* If left empty, the users are accepting to pay any custom fee.<br/>
413+
* If used with a transaction type that does not support custom fee limits, the transaction will fail.
414+
*/
415+
repeated CustomFeeLimit max_custom_fees = 1001;
406416
}

0 commit comments

Comments
 (0)