Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JS_STRING tag #23

Merged
merged 5 commits into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions koinos/block_store/block_store.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import "koinos/protocol/protocol.proto";

message block_item {
bytes block_id = 1;
uint64 block_height = 2;
uint64 block_height = 2 [jstype = JS_STRING];
protocol.block block = 3; //optional
protocol.block_receipt receipt = 4; //optional
}

message block_record {
bytes block_id = 1;
uint64 block_height = 2;
uint64 block_height = 2 [jstype = JS_STRING];
protocol.block block = 3;
protocol.block_receipt receipt = 4; //optional
repeated bytes previous_block_ids = 5;
Expand Down
6 changes: 3 additions & 3 deletions koinos/broadcast/broadcast.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import "koinos/protocol/protocol.proto";
message transaction_accepted {
protocol.transaction transaction = 1;
bytes payer = 2;
uint64 max_payer_resources = 3;
uint64 trx_resource_limit = 4;
uint64 height = 5;
uint64 max_payer_resources = 3 [jstype = JS_STRING];
uint64 trx_resource_limit = 4 [jstype = JS_STRING];
uint64 height = 5 [jstype = JS_STRING];
}

message block_accepted {
Expand Down
32 changes: 16 additions & 16 deletions koinos/chain/chain.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ enum privilege {

message head_info {
block_topology head_topology = 1;
uint64 head_block_time = 2;
uint64 last_irreversible_block = 3;
uint64 head_block_time = 2 [jstype = JS_STRING];
uint64 last_irreversible_block = 3 [jstype = JS_STRING];
}

message prints_args {
Expand Down Expand Up @@ -78,43 +78,43 @@ message apply_set_system_call_operation_args {

message apply_set_system_call_operation_return {}

message db_put_object_args {
message put_object_args {
bytes space = 1;
bytes key = 2;
bytes obj = 3;
}

message db_put_object_return {
message put_object_return {
bool value = 1;
}

message db_get_object_args {
message get_object_args {
bytes space = 1;
bytes key = 2;
uint32 object_size_hint = 3; // optional
}

message db_get_object_return {
message get_object_return {
bytes value = 3;
}

message db_get_next_object_args {
message get_next_object_args {
bytes space = 1;
bytes key = 2;
uint32 object_size_hint = 3; // optional
}

message db_get_next_object_return {
message get_next_object_return {
bytes value = 3;
}

message db_get_prev_object_args {
message get_prev_object_args {
bytes space = 1;
bytes key = 2;
uint32 object_size_hint = 3; // optional
}

message db_get_prev_object_return {
message get_prev_object_return {
bytes value = 3;
}

Expand Down Expand Up @@ -165,9 +165,9 @@ message get_head_info_return {
}

message hash_args {
uint64 code = 1;
uint64 code = 1 [jstype = JS_STRING];
bytes obj = 2;
uint64 size = 3;
uint64 size = 3 [jstype = JS_STRING];
}

message hash_return {
Expand Down Expand Up @@ -196,21 +196,21 @@ message get_max_account_resources_args {
}

message get_max_account_resources_return {
uint64 value = 1;
uint64 value = 1 [jstype = JS_STRING];
}

message get_transaction_resource_limit_args {
protocol.transaction transction = 1;
}

message get_transaction_resource_limit_return {
uint64 value = 1;
uint64 value = 1 [jstype = JS_STRING];
}

message get_last_irreversible_block_args {}

message get_last_irreversible_block_return {
uint64 value = 1;
uint64 value = 1 [jstype = JS_STRING];
}

message get_caller_args {}
Expand Down Expand Up @@ -243,5 +243,5 @@ message get_account_nonce_args {
}

message get_account_nonce_return {
uint64 value = 1;
uint64 value = 1 [jstype = JS_STRING];
}
2 changes: 1 addition & 1 deletion koinos/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ option go_package = "github.com/koinos/koinos-proto-golang/koinos";

message block_topology {
bytes id = 1;
uint64 height = 2;
uint64 height = 2 [jstype = JS_STRING];
bytes previous = 3;
}
4 changes: 2 additions & 2 deletions koinos/contracts/pow/pow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ option go_package = "github.com/koinos/koinos-proto-golang/koinos/contracts/pow"

message difficulty_metadata {
bytes target = 1;
uint64 last_block_time = 2;
uint64 last_block_time = 2 [jstype = JS_STRING];
bytes difficulty = 3;
uint64 target_block_interval = 4;
uint64 target_block_interval = 4 [jstype = JS_STRING];
}

message pow_signature_data {
Expand Down
8 changes: 4 additions & 4 deletions koinos/protocol/protocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ message operation {
}

message active_transaction_data {
uint64 resource_limit = 1;
uint64 nonce = 2;
uint64 resource_limit = 1 [jstype = JS_STRING];
uint64 nonce = 2 [jstype = JS_STRING];
repeated operation operations = 3;
}

Expand All @@ -64,8 +64,8 @@ message passive_block_data {}

message block_header {
bytes previous = 1;
uint64 height = 2;
uint64 timestamp = 3;
uint64 height = 2 [jstype = JS_STRING];
uint64 timestamp = 3 [jstype = JS_STRING];
}

// Topological constraints: Constraints for a new block b that builds on a given block a
Expand Down
8 changes: 4 additions & 4 deletions koinos/protocol/system_call_ids.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ enum system_call_id {
apply_upload_contract_operation = 5;
apply_call_contract_operation = 6;
apply_set_system_call_operation = 7;
db_put_object = 8;
db_get_object = 9;
db_get_next_object = 10;
db_get_prev_object = 11;
put_object = 8;
get_object = 9;
get_next_object = 10;
get_prev_object = 11;
call_contract = 12;
get_entry_point = 13;
get_contract_args_size = 14;
Expand Down
2 changes: 1 addition & 1 deletion koinos/rpc/block_store/block_store_rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ message get_blocks_by_id_response {

message get_blocks_by_height_request {
bytes head_block_id = 1;
uint64 ancestor_start_height = 2;
uint64 ancestor_start_height = 2 [jstype = JS_STRING];
uint32 num_blocks = 3;
bool return_block = 4;
bool return_receipt = 5;
Expand Down
4 changes: 2 additions & 2 deletions koinos/rpc/chain/chain_rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ message get_head_info_request {}

message get_head_info_response {
block_topology head_topology = 1;
uint64 last_irreversible_block = 2;
uint64 last_irreversible_block = 2 [jstype = JS_STRING];
}

message get_chain_id_request {}
Expand Down Expand Up @@ -60,7 +60,7 @@ message get_account_nonce_request {
}

message get_account_nonce_response {
uint64 nonce = 1;
uint64 nonce = 1 [jstype = JS_STRING];
}

message chain_request {
Expand Down
6 changes: 3 additions & 3 deletions koinos/rpc/mempool/mempool_rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import "koinos/rpc/rpc.proto";

message check_pending_account_resources_request {
bytes payer = 1;
uint64 max_payer_resources = 2;
uint64 trx_resource_limit = 3;
uint64 max_payer_resources = 2 [jstype = JS_STRING];
uint64 trx_resource_limit = 3 [jstype = JS_STRING];
}

message check_pending_account_resources_response {
bool success = 1;
}

message get_pending_transactions_request {
uint64 limit = 1;
uint64 limit = 1 [jstype = JS_STRING];
}

message get_pending_transactions_response {
Expand Down