Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StateTransition JSON/Codec #26

Closed
sourabhniyogi opened this issue Dec 6, 2024 · 0 comments
Closed

StateTransition JSON/Codec #26

sourabhniyogi opened this issue Dec 6, 2024 · 0 comments

Comments

@sourabhniyogi
Copy link

We request a W3F Codec test vector for state transitions, which can be simply a composition of a pre and post state snapshot (as many test vectors contain, but the raw k,v data) and a block (done already):

Our suggestion is this (in Go form)

type StateTransition struct {
	PreState  StateSnapshotRaw `json:"pre_state"`
	Block     Block            `json:"block"`
	PostState StateSnapshotRaw `json:"post_state"`
}

type StateSnapshotRaw struct {
	StateRoot common.Hash `json:"state_root"`
	KeyVals   KeyVals     `json:"keyvals"`
}

type KeyVals []KeyVal
type KeyVal [2][]byte

and included stateroot. But we think it would be useful to improve the service metadata, which was brought in recently.

We have assembled some state_transitions here in a public repo:

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

No branches or pull requests

1 participant