Create EVM Process for Trinity
See original GitHub issueWhat is wrong?
When Trinity is running a chain it will likely have the following processes.
- DevP2P
- Handles networking
- Makes requests to the EVM process to read existing chain state.
- Submits new data for import to the EVM process.
- JSON-RPC
- Serves requests to the JSON-RPC server over the IPC pipe
- Makes requests to the EVM process to read existing chain state.
- Submits new transactions to the DevP2P process for broadcast to the network.
- Submits requests for EVM execution for things like
eth_call
andeth_estimateGas
.
- EVM
- Serves requests from the JSON-RPC process for thing like
eth_call
andeth_estimateGas
. - Serves requests from the DevP2P process for reading chain data.
- Handle new chain data submitted by the DevP2P process.
- Serves requests from the JSON-RPC process for thing like
There may be a fourth process for the transaction pool as well as others we haven’t thought of yet.
How can it be fixed
Each of these process will be it’s own multiprocessing.Process
instance. We have limited communication options between these processes using the primatives from the multiprocessing
module (Pipe/Queue/..?..
).
Exactly how this all looks still needs to be hashed out, after which we can fill this section in further.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Architecture — trinity 0.1.0-alpha.37 documentation
EVM stands for Ethereum Virtual Machine and is the lowest level layer that Trinity utilizes to build and validate blocks, run transactions and...
Read more >ethereum/py-evm - Gitter
I'm trying to get trinity to run in Pycharm (WSL), however I'm running into trouble when running trinity.main() It seems as if it's...
Read more >Everything you need to know about the Trinity Ethereum client
Many of the core protocol development teams use Python and much of what is being built is done using Py-EVM and Trinity.
Read more >Making the EVM Scream - Devcon Archive
How I got the EVM interpreter from where it was to where it will be in the future.
Read more >Aurora-Trinity: A Super-Light Client for Distributed Ledger ...
Thus, it will waste its network bandwidth, time, and processing power ... Thus, the client can make an informed decision whether to halt...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I draw a brief diagram: the three main processes are illustrated at the top of the diagram and some possible sharding components/modules I suppose we need are at the bottom.
local-mode
orremote-mode
local-mode
: connects directly toChain
of its local main chain dataremote-mode
: connects to other main chain node (geth, parity, etc.)CollationAdded
logsCREATE_COLLATION
algorithm.add_header
tx to VMC via web3.py.srd
is just a possible ID for Sharding Wire Protocol. (It can’t be too similar toshh
.)Please don’t hesitate to point out any mistake.
@gsalgado it’s probably worth looking into this as a minimal initial solution as well as a baseline for benchmarking whatever we think a better solution may be.
I do know that spinning up
multiprocess.Process
instances has a high-ish overhead which is one reason to prefer a long running process, however it doesn’t mean a short lived process is not a viable initial step.