Skip to content
New issue

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

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

Already on GitHub? # to your account

trie: Add support for nested storage transactions #3508

Closed
Tracked by #3639
dimartiro opened this issue Oct 2, 2023 · 0 comments · Fixed by #3670
Closed
Tracked by #3639

trie: Add support for nested storage transactions #3508

dimartiro opened this issue Oct 2, 2023 · 0 comments · Fixed by #3670

Comments

@dimartiro
Copy link
Contributor

dimartiro commented Oct 2, 2023

Task summary

With our current implementation we are not supporting nested transactions, we are only supporting 1 level.

Our implementation keeps track of one oldTrie to rollback the current transaction but that does not allow us to use nested transactions

func (s *TrieState) BeginStorageTransaction() {
s.lock.Lock()
defer s.lock.Unlock()
s.oldTrie = s.t
s.t = s.t.Snapshot()
}

Specification reference

The spec says that the function ext_storage_start_transaction should create a new nested transaction

Other information and links

@timwu20 timwu20 changed the title Add support for nested storage transactions trie: Add support for nested storage transactions Nov 22, 2023
@dimartiro dimartiro mentioned this issue Dec 12, 2023
4 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant