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

Invoke system call RPC #828

Merged
merged 8 commits into from
Oct 24, 2023
Merged

Invoke system call RPC #828

merged 8 commits into from
Oct 24, 2023

Conversation

sgerbino
Copy link
Member

@sgerbino sgerbino commented Oct 17, 2023

Resolves #827.

Brief description

Implements system calls and thunks via RPC.

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

./tests/Debug/koinos_tests -t controller_tests/invoke_system_call_test -l message
Running 1 test case...
[2023-10-17 17:05:59.222814] [0x00007ff857e84700] [info]    Initialized fizzy VM backend
2023-10-17 17:05:59.228655 (koinos_test.PFml8) [controller_test.cpp:103] <info>: Test temp dir: /var/folders/yh/54cdjmy93_15876gm06gsj6m0000gn/T/ae55-c4d6-be5a-756b
2023-10-17 17:05:59.262473 (koinos_test.PFml8) [controller.cpp:172] <info>: Wrote 6 genesis objects into new database
2023-10-17 17:05:59.262652 (koinos_test.PFml8) [controller.cpp:183] <info>: Calculated chain ID: 0x1220e43950c4599015f8d9553a04daa50468de73e2a645082ee6fbfa6a39199491f5
2023-10-17 17:05:59.262774 (koinos_test.PFml8) [controller.cpp:192] <info>: Wrote chain ID into new database
2023-10-17 17:05:59.262883 (koinos_test.PFml8) [controller.cpp:202] <info>: Opened database at block - Height: 0, ID: 0x12200000000000000000000000000000000000000000000000000000000000000000
Read get_object
Write put_object
Setup system call overrides
2023-10-17 17:05:59.275191 (koinos_test.PFml8) [controller.cpp:362] <info>: Block applied - Height: 1, ID: 0x12200890eec91d337abeaf91b99a519cce2448bbc5e419eaf628f4ab3a5f89206b00 (1 transaction)
2023-10-17 17:05:59.280200 (koinos_test.PFml8) [system_calls.cpp:757] <info>: Overriding system call 20001 with contract 1CbQaHVuNieSeZm45EETEM5yLPi9vtNA9X at entry point 0x00000001
2023-10-17 17:05:59.280517 (koinos_test.PFml8) [system_calls.cpp:757] <info>: Overriding system call 20002 with contract 1CbQaHVuNieSeZm45EETEM5yLPi9vtNA9X at entry point 0x00000002
2023-10-17 17:05:59.280848 (koinos_test.PFml8) [system_calls.cpp:757] <info>: Overriding system call 20003 with contract 1CbQaHVuNieSeZm45EETEM5yLPi9vtNA9X at entry point 0x00000003
2023-10-17 17:05:59.281135 (koinos_test.PFml8) [system_calls.cpp:757] <info>: Overriding system call 20004 with contract 1CbQaHVuNieSeZm45EETEM5yLPi9vtNA9X at entry point 0x00000004
2023-10-17 17:05:59.281450 (koinos_test.PFml8) [controller.cpp:362] <info>: Block applied - Height: 2, ID: 0x12203a4dd424cf506343aab73e8939e5c88787a824592b03c9f614cbaa89eb7e8016 (1 transaction)
System call echo
System call failure
System call reversion
System call write

*** No errors detected

@mvandeberg mvandeberg merged commit 2221d2f into master Oct 24, 2023
@mvandeberg mvandeberg deleted the 827-invoke-system-call-thunks branch October 24, 2023 22:57
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.

[BUG]: invoke_system_call rpc does not fallback to thunks
2 participants