Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Resolve all inputs in Mempool #254

Merged
merged 22 commits into from
Aug 10, 2023
Merged

Resolve all inputs in Mempool #254

merged 22 commits into from
Aug 10, 2023

Conversation

karimodm
Copy link
Contributor

@karimodm karimodm commented Aug 3, 2023

This PR also offers a refactor of Inputs into an interface container called State. An UTXO or a Context state complies instead with extended interfaces called OutputState and ContextState respectively.
Simarly, when a state managed to get resolved, its metadata state is wrapped in a OutputStateMetadata and ContextStateMetadata interfaces respectively.
The Mempool now is able to "wait" for the resolution of context inputs, wherever they might be according to the above mentioned interfaces, and passes the resolved contexts to the VM for cross-validation and transition execution. Currently, the only context input that can be passed resolved is the CommitmentInput (called timeReference in the VM context); in fact, BIC and Reward inputs rely on other inputs for their resolution and intrinsic validation: input commitment for Accounts, and UTXO input with staking or delegation feature for the Reward inputs.

Depends on iotaledger/iota.go#474

Resolves #159

@karimodm karimodm force-pushed the refactor/mempool-closure branch from c85f2ad to 43a5927 Compare August 3, 2023 12:47
@karimodm karimodm marked this pull request as ready for review August 8, 2023 09:10
@piotrm50 piotrm50 self-requested a review August 10, 2023 09:03
@karimodm karimodm merged commit 87f9da7 into develop Aug 10, 2023
@karimodm karimodm deleted the refactor/mempool-closure branch August 10, 2023 10:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor VM execution closure in Mempool
2 participants