From 623b15d72b491d8f259525aceaad67b4b6edd7e4 Mon Sep 17 00:00:00 2001 From: Nathaniel Caldwell Date: Mon, 13 Sep 2021 17:29:49 -0400 Subject: [PATCH 1/4] remove db_ prefix --- koinos/chain/chain.proto | 16 ++++++++-------- koinos/protocol/system_call_ids.proto | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/koinos/chain/chain.proto b/koinos/chain/chain.proto index 45fd0b6..82978b3 100644 --- a/koinos/chain/chain.proto +++ b/koinos/chain/chain.proto @@ -71,43 +71,43 @@ message apply_set_system_call_operation_args { protocol.set_system_call_operation op = 1; } -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 result = 1; } -message db_get_object_args { +message get_object_args { bytes space = 1; bytes key = 2; optional uint32 object_size_hint = 3; } -message db_get_object_return { +message get_object_return { bytes result = 3; } -message db_get_next_object_args { +message get_next_object_args { bytes space = 1; bytes key = 2; optional uint32 object_size_hint = 3; } -message db_get_next_object_return { +message get_next_object_return { bytes result = 3; } -message db_get_prev_object_args { +message get_prev_object_args { bytes space = 1; bytes key = 2; optional uint32 object_size_hint = 3; } -message db_get_prev_object_return { +message get_prev_object_return { bytes result = 3; } diff --git a/koinos/protocol/system_call_ids.proto b/koinos/protocol/system_call_ids.proto index c04c32a..90d888b 100644 --- a/koinos/protocol/system_call_ids.proto +++ b/koinos/protocol/system_call_ids.proto @@ -12,10 +12,10 @@ enum system_call_id { apply_upload_contract_operation = 5; apply_execute_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; execute_contract = 12; get_entry_point = 13; get_contract_args_size = 14; From 61b125ba706954760dcb91a86ff044463407bfe9 Mon Sep 17 00:00:00 2001 From: Nathaniel Caldwell Date: Tue, 14 Sep 2021 12:08:11 -0400 Subject: [PATCH 2/4] Add string type tags to all uint64 values --- koinos/block_store/block_store.proto | 4 ++-- koinos/broadcast/broadcast.proto | 6 +++--- koinos/chain/chain.proto | 12 ++++++------ koinos/common.proto | 2 +- koinos/contracts/pow/pow.proto | 4 ++-- koinos/protocol/protocol.proto | 8 ++++---- koinos/rpc/block_store/block_store_rpc.proto | 2 +- koinos/rpc/chain/chain_rpc.proto | 4 ++-- koinos/rpc/mempool/mempool_rpc.proto | 6 +++--- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/koinos/block_store/block_store.proto b/koinos/block_store/block_store.proto index 0cf0771..789cc52 100644 --- a/koinos/block_store/block_store.proto +++ b/koinos/block_store/block_store.proto @@ -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] optional protocol.block block = 3; optional protocol.block_receipt receipt = 4; } message block_record { 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; repeated bytes previous_block_ids = 5; diff --git a/koinos/broadcast/broadcast.proto b/koinos/broadcast/broadcast.proto index 7fe19c1..1f60188 100644 --- a/koinos/broadcast/broadcast.proto +++ b/koinos/broadcast/broadcast.proto @@ -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 { diff --git a/koinos/chain/chain.proto b/koinos/chain/chain.proto index 82978b3..68443d0 100644 --- a/koinos/chain/chain.proto +++ b/koinos/chain/chain.proto @@ -13,7 +13,7 @@ enum privilege { message head_info { block_topology head_topology = 1; - uint64 last_irreversible_block = 2; + uint64 last_irreversible_block = 2; [jstype = JS_STRING] } message prints_args { @@ -158,9 +158,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 { @@ -189,7 +189,7 @@ 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 { @@ -197,7 +197,7 @@ message get_transaction_resource_limit_args { } message get_transaction_resource_limit_return { - uint64 value = 1; + uint64 value = 1; [jstype = JS_STRING] } message get_last_irreversible_block_args {} @@ -236,5 +236,5 @@ message get_account_nonce_args { } message get_account_nonce_result { - uint64 nonce = 1; + uint64 nonce = 1; [jstype = JS_STRING] } diff --git a/koinos/common.proto b/koinos/common.proto index 5c12ed3..7174ead 100644 --- a/koinos/common.proto +++ b/koinos/common.proto @@ -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; } diff --git a/koinos/contracts/pow/pow.proto b/koinos/contracts/pow/pow.proto index 99e5a14..a61f13d 100644 --- a/koinos/contracts/pow/pow.proto +++ b/koinos/contracts/pow/pow.proto @@ -7,9 +7,9 @@ import "koinos/common.proto"; 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 { diff --git a/koinos/protocol/protocol.proto b/koinos/protocol/protocol.proto index ed86c7e..f0f0659 100644 --- a/koinos/protocol/protocol.proto +++ b/koinos/protocol/protocol.proto @@ -38,8 +38,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; } @@ -76,8 +76,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] } message block_active_data { diff --git a/koinos/rpc/block_store/block_store_rpc.proto b/koinos/rpc/block_store/block_store_rpc.proto index 8f1787d..aab6446 100644 --- a/koinos/rpc/block_store/block_store_rpc.proto +++ b/koinos/rpc/block_store/block_store_rpc.proto @@ -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; diff --git a/koinos/rpc/chain/chain_rpc.proto b/koinos/rpc/chain/chain_rpc.proto index 7008911..038b962 100644 --- a/koinos/rpc/chain/chain_rpc.proto +++ b/koinos/rpc/chain/chain_rpc.proto @@ -28,7 +28,7 @@ message get_head_info_request {} message get_head_info_response { block_topology head_topology = 1; - uint64 get_last_irreversible_block = 2; + uint64 get_last_irreversible_block = 2; [jstype = JS_STRING] } message get_chain_id_request {} @@ -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_rpc_request { diff --git a/koinos/rpc/mempool/mempool_rpc.proto b/koinos/rpc/mempool/mempool_rpc.proto index bc34fef..8209653 100644 --- a/koinos/rpc/mempool/mempool_rpc.proto +++ b/koinos/rpc/mempool/mempool_rpc.proto @@ -8,8 +8,8 @@ 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 { @@ -17,7 +17,7 @@ message check_pending_account_resources_response { } message get_pending_transactions_request { - uint64 limit = 1; + uint64 limit = 1; [jstype = JS_STRING] } message get_pending_transactions_response { From 917e0562876b37ca6ee97f1843e213897f33351b Mon Sep 17 00:00:00 2001 From: Nathaniel Caldwell Date: Tue, 14 Sep 2021 12:16:00 -0400 Subject: [PATCH 3/4] Semicolon after tag --- koinos/broadcast/broadcast.proto | 6 +++--- koinos/chain/chain.proto | 12 ++++++------ koinos/common.proto | 2 +- koinos/contracts/pow/pow.proto | 4 ++-- koinos/protocol/protocol.proto | 8 ++++---- koinos/rpc/block_store/block_store_rpc.proto | 2 +- koinos/rpc/chain/chain_rpc.proto | 4 ++-- koinos/rpc/mempool/mempool_rpc.proto | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/koinos/broadcast/broadcast.proto b/koinos/broadcast/broadcast.proto index 1f60188..da12e82 100644 --- a/koinos/broadcast/broadcast.proto +++ b/koinos/broadcast/broadcast.proto @@ -9,9 +9,9 @@ import "koinos/protocol/protocol.proto"; message transaction_accepted { protocol.transaction transaction = 1; bytes payer = 2; - uint64 max_payer_resources = 3; [jstype = JS_STRING] - uint64 trx_resource_limit = 4; [jstype = JS_STRING] - uint64 height = 5; [jstype = JS_STRING] + 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 { diff --git a/koinos/chain/chain.proto b/koinos/chain/chain.proto index 68443d0..ecc19e5 100644 --- a/koinos/chain/chain.proto +++ b/koinos/chain/chain.proto @@ -13,7 +13,7 @@ enum privilege { message head_info { block_topology head_topology = 1; - uint64 last_irreversible_block = 2; [jstype = JS_STRING] + uint64 last_irreversible_block = 2 [jstype = JS_STRING]; } message prints_args { @@ -158,9 +158,9 @@ message get_head_info_return { } message hash_args { - uint64 code = 1; [jstype = JS_STRING] + uint64 code = 1 [jstype = JS_STRING]; bytes obj = 2; - uint64 size = 3; [jstype = JS_STRING] + uint64 size = 3 [jstype = JS_STRING]; } message hash_return { @@ -189,7 +189,7 @@ message get_max_account_resources_args { } message get_max_account_resources_return { - uint64 value = 1; [jstype = JS_STRING] + uint64 value = 1 [jstype = JS_STRING]; } message get_transaction_resource_limit_args { @@ -197,7 +197,7 @@ message get_transaction_resource_limit_args { } message get_transaction_resource_limit_return { - uint64 value = 1; [jstype = JS_STRING] + uint64 value = 1 [jstype = JS_STRING]; } message get_last_irreversible_block_args {} @@ -236,5 +236,5 @@ message get_account_nonce_args { } message get_account_nonce_result { - uint64 nonce = 1; [jstype = JS_STRING] + uint64 nonce = 1 [jstype = JS_STRING]; } diff --git a/koinos/common.proto b/koinos/common.proto index 7174ead..2aafddb 100644 --- a/koinos/common.proto +++ b/koinos/common.proto @@ -5,6 +5,6 @@ option go_package = "github.com/koinos/koinos-proto-golang/koinos"; message block_topology { bytes id = 1; - uint64 height = 2; [jstype = JS_STRING] + uint64 height = 2 [jstype = JS_STRING]; bytes previous = 3; } diff --git a/koinos/contracts/pow/pow.proto b/koinos/contracts/pow/pow.proto index a61f13d..50c9c8f 100644 --- a/koinos/contracts/pow/pow.proto +++ b/koinos/contracts/pow/pow.proto @@ -7,9 +7,9 @@ import "koinos/common.proto"; message difficulty_metadata { bytes target = 1; - uint64 last_block_time = 2; [jstype = JS_STRING] + uint64 last_block_time = 2 [jstype = JS_STRING]; bytes difficulty = 3; - uint64 target_block_interval = 4; [jstype = JS_STRING] + uint64 target_block_interval = 4 [jstype = JS_STRING]; } message pow_signature_data { diff --git a/koinos/protocol/protocol.proto b/koinos/protocol/protocol.proto index f0f0659..8836d2d 100644 --- a/koinos/protocol/protocol.proto +++ b/koinos/protocol/protocol.proto @@ -38,8 +38,8 @@ message operation { } message active_transaction_data { - uint64 resource_limit = 1; [jstype = JS_STRING] - uint64 nonce = 2; [jstype = JS_STRING] + uint64 resource_limit = 1 [jstype = JS_STRING]; + uint64 nonce = 2 [jstype = JS_STRING]; repeated operation operations = 3; } @@ -76,8 +76,8 @@ message passive_block_data {} message block_header { bytes previous = 1; - uint64 height = 2; [jstype = JS_STRING] - uint64 timestamp = 3; [jstype = JS_STRING] + uint64 height = 2 [jstype = JS_STRING]; + uint64 timestamp = 3 [jstype = JS_STRING]; } message block_active_data { diff --git a/koinos/rpc/block_store/block_store_rpc.proto b/koinos/rpc/block_store/block_store_rpc.proto index aab6446..62a01c4 100644 --- a/koinos/rpc/block_store/block_store_rpc.proto +++ b/koinos/rpc/block_store/block_store_rpc.proto @@ -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; [jstype = JS_STRING] + uint64 ancestor_start_height = 2 [jstype = JS_STRING]; uint32 num_blocks = 3; bool return_block = 4; bool return_receipt = 5; diff --git a/koinos/rpc/chain/chain_rpc.proto b/koinos/rpc/chain/chain_rpc.proto index 038b962..3aafa32 100644 --- a/koinos/rpc/chain/chain_rpc.proto +++ b/koinos/rpc/chain/chain_rpc.proto @@ -28,7 +28,7 @@ message get_head_info_request {} message get_head_info_response { block_topology head_topology = 1; - uint64 get_last_irreversible_block = 2; [jstype = JS_STRING] + uint64 get_last_irreversible_block = 2 [jstype = JS_STRING]; } message get_chain_id_request {} @@ -60,7 +60,7 @@ message get_account_nonce_request { } message get_account_nonce_response { - uint64 nonce = 1; [jstype = JS_STRING] + uint64 nonce = 1 [jstype = JS_STRING]; } message chain_rpc_request { diff --git a/koinos/rpc/mempool/mempool_rpc.proto b/koinos/rpc/mempool/mempool_rpc.proto index 8209653..79b54d6 100644 --- a/koinos/rpc/mempool/mempool_rpc.proto +++ b/koinos/rpc/mempool/mempool_rpc.proto @@ -8,8 +8,8 @@ import "koinos/rpc/rpc.proto"; message check_pending_account_resources_request { bytes payer = 1; - uint64 max_payer_resources = 2; [jstype = JS_STRING] - uint64 trx_resource_limit = 3; [jstype = JS_STRING] + uint64 max_payer_resources = 2 [jstype = JS_STRING]; + uint64 trx_resource_limit = 3 [jstype = JS_STRING]; } message check_pending_account_resources_response { @@ -17,7 +17,7 @@ message check_pending_account_resources_response { } message get_pending_transactions_request { - uint64 limit = 1; [jstype = JS_STRING] + uint64 limit = 1 [jstype = JS_STRING]; } message get_pending_transactions_response { From 3deed96fd77ff9bbf35bc321efb7fa1cd8e68e90 Mon Sep 17 00:00:00 2001 From: Nathaniel Caldwell Date: Tue, 14 Sep 2021 12:20:17 -0400 Subject: [PATCH 4/4] And 2 more js tag fixes --- koinos/block_store/block_store.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koinos/block_store/block_store.proto b/koinos/block_store/block_store.proto index 789cc52..9540c6c 100644 --- a/koinos/block_store/block_store.proto +++ b/koinos/block_store/block_store.proto @@ -7,14 +7,14 @@ import "koinos/protocol/protocol.proto"; message block_item { bytes block_id = 1; - uint64 block_height = 2; [jstype = JS_STRING] + uint64 block_height = 2 [jstype = JS_STRING]; optional protocol.block block = 3; optional protocol.block_receipt receipt = 4; } message block_record { bytes block_id = 1; - uint64 block_height = 2; [jstype = JS_STRING] + uint64 block_height = 2 [jstype = JS_STRING]; protocol.block block = 3; optional protocol.block_receipt receipt = 4; repeated bytes previous_block_ids = 5;