archethic-foundation / archethic-foundation/archethic-node
Validation nodes should ensure utxo in ContractContext
- Dominant language
- Elixir
- Stars
- 82
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
### Is your feature request related to a problem?
Currently when a contract is executed, the Worker fetch the contract UTXOs, filter them and uses them in contract execution. Then it send the used UTXOs in the Contract Context to the validation nodes.
The validation the ensure the UTXOs really exists and are well filtered. But the Worker could have send / uses not all the UTXOs availables and the contract execution result could not be valid
### Describe the solution you'd like
The validation nodes should also ensure that the Contract Context contains all the inputs it should. Validation nodes could filter the UTXOs they fetched, and if there is more UTXOs in their list than in the Contract Context, they could determine if the additional UTXOs should have been also retrieved by the Worker based on the timestamp of those UTXOs.
For instance if the additional UTXOs has a timestamp after the Worker execution, it is normal and the Worker could not have retrieved it. But if the additional UTXO timestamp is from 1 days ago, the Worker should have retrieved it so the Contract Context inputs are invalid
### Additional context
_No response_
### Epic
_No response_
Contributor guide
Research direction
Start by tracing contract execution in the Worker and the validation nodes' handling of ContractContext UTXOs; the issue names no files or tests. Done means validators can identify missing eligible UTXOs using their timestamps, while accepting UTXOs created after the Worker's execution time.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100