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

Nonce check & error details #832

Merged
merged 7 commits into from
Mar 26, 2024
Merged

Nonce check & error details #832

merged 7 commits into from
Mar 26, 2024

Conversation

sgerbino
Copy link
Member

@sgerbino sgerbino commented Mar 20, 2024

Brief description

Adds a call to check_account_nonce upon submitting a transaction. Implements chain::error_details on RPC calls.

Checklist

  • I have built this pull request locally
  • I have ran the unit tests locally
  • I have manually tested this pull request
  • I have reviewed my pull request
  • I have added any relevant tests

Demonstration

❯ ctest -j
Test project /home/sgerbino/Workspace/koinos-chain/build/tests
      Start  1: chain_tests-controller_tests/submission_tests
 1/44 Test  #1: chain_tests-controller_tests/submission_tests ....................   Passed    0.04 sec
      Start  2: chain_tests-controller_tests/block_irreversibility
 2/44 Test  #2: chain_tests-controller_tests/block_irreversibility ...............   Passed    0.04 sec
      Start  3: chain_tests-controller_tests/fork_heads
 3/44 Test  #3: chain_tests-controller_tests/fork_heads ..........................   Passed    0.05 sec
      Start  4: chain_tests-controller_tests/read_contract_tests
 4/44 Test  #4: chain_tests-controller_tests/read_contract_tests .................   Passed    0.03 sec
      Start  5: chain_tests-controller_tests/transaction_reversion_test
 5/44 Test  #5: chain_tests-controller_tests/transaction_reversion_test ..........   Passed    0.04 sec
      Start  6: chain_tests-controller_tests/receipt_test
 6/44 Test  #6: chain_tests-controller_tests/receipt_test ........................   Passed    0.03 sec
      Start  7: chain_tests-controller_tests/system_call_override_test
 7/44 Test  #7: chain_tests-controller_tests/system_call_override_test ...........   Passed    0.03 sec
      Start  8: chain_tests-controller_tests/invoke_system_call_test
 8/44 Test  #8: chain_tests-controller_tests/invoke_system_call_test .............   Passed    0.03 sec
      Start  9: chain_tests-stack_tests/simple_user_contract
 9/44 Test  #9: chain_tests-stack_tests/simple_user_contract .....................   Passed    0.03 sec
      Start 10: chain_tests-stack_tests/syscall_from_user
10/44 Test #10: chain_tests-stack_tests/syscall_from_user ........................   Passed    0.03 sec
      Start 11: chain_tests-stack_tests/user_from_user
11/44 Test #11: chain_tests-stack_tests/user_from_user ...........................   Passed    0.03 sec
      Start 12: chain_tests-stack_tests/syscall_override_from_thunk
12/44 Test #12: chain_tests-stack_tests/syscall_override_from_thunk ..............   Passed    0.03 sec
      Start 13: chain_tests-stack_tests/syscall_override_from_syscall_override
13/44 Test #13: chain_tests-stack_tests/syscall_override_from_syscall_override ...   Passed    0.03 sec
      Start 14: chain_tests-stack_tests/system_contract_from_syscall_override
14/44 Test #14: chain_tests-stack_tests/system_contract_from_syscall_override ....   Passed    0.03 sec
      Start 15: chain_tests-thunk_tests/get_transaction_field
15/44 Test #15: chain_tests-thunk_tests/get_transaction_field ....................   Passed    0.03 sec
      Start 16: chain_tests-thunk_tests/get_block_field
16/44 Test #16: chain_tests-thunk_tests/get_block_field ..........................   Passed    0.03 sec
      Start 17: chain_tests-thunk_tests/get_operation
17/44 Test #17: chain_tests-thunk_tests/get_operation ............................   Passed    0.03 sec
      Start 18: chain_tests-thunk_tests/db_crud
18/44 Test #18: chain_tests-thunk_tests/db_crud ..................................   Passed    0.03 sec
      Start 19: chain_tests-thunk_tests/db_permissions
19/44 Test #19: chain_tests-thunk_tests/db_permissions ...........................   Passed    0.03 sec
      Start 20: chain_tests-thunk_tests/contract_tests
20/44 Test #20: chain_tests-thunk_tests/contract_tests ...........................   Passed    0.03 sec
      Start 21: chain_tests-thunk_tests/override_tests
21/44 Test #21: chain_tests-thunk_tests/override_tests ...........................   Passed    0.03 sec
      Start 22: chain_tests-thunk_tests/thunk_test
22/44 Test #22: chain_tests-thunk_tests/thunk_test ...............................   Passed    0.03 sec
      Start 23: chain_tests-thunk_tests/system_call_test
23/44 Test #23: chain_tests-thunk_tests/system_call_test .........................   Passed    0.03 sec
      Start 24: chain_tests-thunk_tests/get_head_info_thunk_test
24/44 Test #24: chain_tests-thunk_tests/get_head_info_thunk_test .................   Passed    0.03 sec
      Start 25: chain_tests-thunk_tests/hash_thunk_test
25/44 Test #25: chain_tests-thunk_tests/hash_thunk_test ..........................   Passed    0.03 sec
      Start 26: chain_tests-thunk_tests/privileged_calls
26/44 Test #26: chain_tests-thunk_tests/privileged_calls .........................   Passed    0.03 sec
      Start 27: chain_tests-thunk_tests/last_irreversible_block_test
27/44 Test #27: chain_tests-thunk_tests/last_irreversible_block_test .............   Passed    0.03 sec
      Start 28: chain_tests-thunk_tests/stack_tests
28/44 Test #28: chain_tests-thunk_tests/stack_tests ..............................   Passed    0.03 sec
      Start 29: chain_tests-thunk_tests/check_authority
29/44 Test #29: chain_tests-thunk_tests/check_authority ..........................   Passed    0.03 sec
      Start 30: chain_tests-thunk_tests/transaction_nonce_test
30/44 Test #30: chain_tests-thunk_tests/transaction_nonce_test ...................   Passed    0.03 sec
      Start 31: chain_tests-thunk_tests/get_contract_id_test
31/44 Test #31: chain_tests-thunk_tests/get_contract_id_test .....................   Passed    0.03 sec
      Start 32: chain_tests-thunk_tests/token_tests
32/44 Test #32: chain_tests-thunk_tests/token_tests ..............................   Passed    0.03 sec
      Start 33: chain_tests-thunk_tests/call_contract_operation_failure
33/44 Test #33: chain_tests-thunk_tests/call_contract_operation_failure ..........   Passed    0.03 sec
      Start 34: chain_tests-thunk_tests/tick_limit
34/44 Test #34: chain_tests-thunk_tests/tick_limit ...............................   Passed    0.03 sec
      Start 35: chain_tests-thunk_tests/disk_usage
35/44 Test #35: chain_tests-thunk_tests/disk_usage ...............................   Passed    0.03 sec
      Start 36: chain_tests-thunk_tests/transaction_reversion
36/44 Test #36: chain_tests-thunk_tests/transaction_reversion ....................   Passed    0.03 sec
      Start 37: chain_tests-thunk_tests/authorize_tests
37/44 Test #37: chain_tests-thunk_tests/authorize_tests ..........................   Passed    0.04 sec
      Start 38: chain_tests-thunk_tests/get_chain_id
38/44 Test #38: chain_tests-thunk_tests/get_chain_id .............................   Passed    0.03 sec
      Start 39: chain_tests-thunk_tests/system_resources
39/44 Test #39: chain_tests-thunk_tests/system_resources .........................   Passed    0.03 sec
      Start 40: chain_tests-thunk_tests/system_rc
40/44 Test #40: chain_tests-thunk_tests/system_rc ................................   Passed    0.03 sec
      Start 41: chain_tests-thunk_tests/contract_exit
41/44 Test #41: chain_tests-thunk_tests/contract_exit ............................   Passed    0.03 sec
      Start 42: chain_tests-thunk_tests/syscall_override_return
42/44 Test #42: chain_tests-thunk_tests/syscall_override_return ..................   Passed    0.03 sec
      Start 43: chain_tests-thunk_tests/thunk_time
43/44 Test #43: chain_tests-thunk_tests/thunk_time ...............................   Passed    0.24 sec
      Start 44: chain_tests-thunk_tests/null_bytes_written_test
44/44 Test #44: chain_tests-thunk_tests/null_bytes_written_test ..................   Passed    0.03 sec

100% tests passed, 0 tests failed out of 44

Total Test time (real) =   1.51 sec

@mvandeberg mvandeberg merged commit 89dc672 into master Mar 26, 2024
2 checks passed
@mvandeberg mvandeberg deleted the nonce-check-error-details branch March 26, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants