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

Update core.StateDiffs.StorageDiffs type #1437

Closed
rianhughes opened this issue Nov 21, 2023 · 1 comment · Fixed by #1466
Closed

Update core.StateDiffs.StorageDiffs type #1437

rianhughes opened this issue Nov 21, 2023 · 1 comment · Fixed by #1466

Comments

@rianhughes
Copy link
Contributor

Update core.StateDiffs.StorageDiffs type to map[felt]map[key]value. This should help with merging stateDiffs

@omerfirmak
Copy link
Contributor

omerfirmak commented Nov 21, 2023

In fact, we can get rid of pretty much all slices in StateDiff

IMO it should look something like;

type StateDiff struct {
	StorageDiffs      map[felt.Felt]map[felt.Felt]*felt.Felt
	Nonces            map[felt.Felt]*felt.Felt
	DeployedContracts map[felt.Felt]*felt.Felt // addr -> class hash
	DeclaredV0Classes map[felt.Felt]bool
	DeclaredV1Classes map[felt.Felt]*felt.Felt // class hash -> compiled class hash
	ReplacedClasses   map[felt.Felt]*felt.Felt  // addr -> class hash
}

@joshklop joshklop linked a pull request Nov 26, 2023 that will close this issue
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 a pull request may close this issue.

2 participants