Skip to content

feat: create init structure of tree state#8757

Merged
rkrasiuk merged 1 commit intomatt/engine2from
rkrasiuk/tree-state-init
Jun 13, 2024
Merged

feat: create init structure of tree state#8757
rkrasiuk merged 1 commit intomatt/engine2from
rkrasiuk/tree-state-init

Conversation

@rkrasiuk
Copy link
Member

Description

Create initial internal structure of tree state.

@rkrasiuk rkrasiuk added C-enhancement New feature or request A-engine Related to the engine implementation labels Jun 11, 2024
@rkrasiuk rkrasiuk requested a review from gakonst as a code owner June 11, 2024 16:59
Comment on lines +21 to +27
/// Represents an executed block stored in-memory.
#[derive(Clone, Debug)]
struct ExecutedBlock {
block: Arc<SealedBlockWithSenders>,
state: Arc<()>,
trie: Arc<()>,
}
Copy link
Member

@Rjected Rjected Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why the struct is not just Arc'ed in data structures that use it, since all the fields are Arc?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will need to clone different states for different purposes. e.g. sealed block should be returned for block_by_hash request

@rkrasiuk rkrasiuk merged commit 4f15f90 into matt/engine2 Jun 13, 2024
@rkrasiuk rkrasiuk deleted the rkrasiuk/tree-state-init branch June 13, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-engine Related to the engine implementation C-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments