runtimeverification / runtimeverification/kontrol
Pending activities on Kontrol's VM module
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 122
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Pending activities on Kontrol's VM module. Updated on 15/07/2024.
The implementation of Kontrol's JSON RPC server is done mostly in the src/kontrol/rpc.py and src/kontrol/kdist/vm.md modules. Within them, the following should be handled:
- If a transaction fails to be correctly executed in KEVM, we should gracefully handle it and reply with the proper information to the client. Right now, if a rewriting operation fails, the function call crashes, and an empty reply is sent back to the client.
- If a transaction fails to be correctly executed in KEVM, we should clean the K cell and ensure that the model has not been affected by the operations that have been performed by the failed transaction. The following transactions should not be affected.
- Properly extract the values of the
<blockStorage>map. This was being developed in the_get_all_block_storage_dictfunction in therpc.pymodule. This is necessary to achieve the following:- In the
eth_getTransactionReceiptreply, we're only returning the txn status, id, block number, to address, transaction hash, and from address. This is roughly half of what is needed to implement this end point. More information here: https://www.quicknode.com/docs/ethereum/eth_getTransactionReceipt - In the
eth_getTransactionByHashreply, we're missing theblockHashandtransactionIndexfields. - All data in this map cell should be needed to complete the
eth_getBlockByNumberoperation. It's current implementation doesn't work. - When fetching the account balance with
eth_getBalance, we can only fetch the balance of the account in its latest state. The data within theblockStoragecell should provide us with what we need for providing the correct values.
- In the
By completing the above, we should be able to run the sample scenarios for Simbolik.
More information about the requests and parameters handled by an Ethereum JSON RPC node:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/kontrol/rpc.py and src/kontrol/kdist/vm.md, focusing on the JSON RPC failure paths and the _get_all_block_storage_dict function. Review the Ethereum JSON RPC references linked in the issue to understand the missing receipt, transaction, block, and balance data. Done means failed transactions are handled safely, blockStorage values are extracted, the listed endpoints return the required information, and the Simbolik sample scenarios run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100