hashgraph / hedera-services

Crypto, token, consensus, file, and smart contract services for the Hedera public ledger
Apache License 2.0
295 stars 125 forks source link

Design reusable services #13346

Open netopyr opened 4 months ago

netopyr commented 4 months ago

The SmartContractService and the TokenService need to be reused on MirrorNode to simulate the execution of smart contracts. Some functionality must be replaceable by alternative implementations (e.g., accessing state) or by dummy implementations (e.g., record streaming).

In the current design, we send a whole range of data and functionality when calling a service (in HederaContext). Ideally, we find a solution where only the required subset is passed to the services.

netopyr commented 3 months ago

Proposed design for HandleContext:

HandleContext 2.0.pdf