Skip to content

Extract BlockDeserializer interface from VM - #512

Open
samliok wants to merge 1 commit into
mainfrom
extract-block-deserializer
Open

Extract BlockDeserializer interface from VM#512
samliok wants to merge 1 commit into
mainfrom
extract-block-deserializer

Conversation

@samliok

@samliok samliok commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Moves ParseBlock out of the VM interface into a standalone BlockDeserializer interface, and replaces the VM ComputeICMEpoch method with a Config.ICMETransition function field.

@samliok
samliok marked this pull request as ready for review August 13, 2026 23:13
Comment thread config.go

type BlockDeserializer interface {
// ParseBlock parses the given block bytes into a VMBlock.
ParseBlock(context.Context, []byte) (avalanchego.VMBlock, error)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

But in practice, deserializing blocks is a function of the VM.

I am fine with extracting out the ComputeICMEpoch, but I think the ParseBlock should stay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants