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

fix: lib/runtime: fix nested storage transactions, fixes kusama block 4939774 #1457

Merged
merged 19 commits into from
Mar 16, 2021

Conversation

noot
Copy link
Contributor

@noot noot commented Mar 12, 2021

Changes

  • fix nested storage transactions, fixes kusama block 4939774
  • update TrieState API to have BeginStorageTransaction, CommitStorageTransaction, RollbackStorageTransaction

Tests

you may need to install git-lfs for this to work https://git-lfs.github.com/

go test ./lib/runtime/storage
go test ./lib/runtime/wasmer -run TestInstance_ExecuteBlock_KusamaRuntime_KusamaBlock4939774

Checklist

  • I have read CODE_OF_CONDUCT and CONTRIBUTING
  • I have provided as much information as possible and necessary
  • I have reviewed my own pull request before requesting a review
  • All integration tests and required coverage checks are passing

Issues

Copy link
Contributor

@RyRy79261 RyRy79261 left a comment

Choose a reason for hiding this comment

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

Looks good, though received a pathing issue when running the block test:
image

Copy link
Contributor

@arijitAD arijitAD left a comment

Choose a reason for hiding this comment

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

@noot Is it guaranteed that there will be only one ongoing transaction at any point?

lib/runtime/storage/trie.go Show resolved Hide resolved
@noot
Copy link
Contributor Author

noot commented Mar 15, 2021

@RyRy79261 yeah I was trying to use git lfs for that file since it's quite large but doesn't look like it worked, I'll try to upload it somewhere else

@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #1457 (e829c5f) into development (d8aa6ab) will increase coverage by 0.09%.
The diff coverage is 80.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #1457      +/-   ##
===============================================
+ Coverage        57.70%   57.80%   +0.09%     
===============================================
  Files              152      152              
  Lines            15315    15223      -92     
===============================================
- Hits              8838     8800      -38     
+ Misses            4931     4882      -49     
+ Partials          1546     1541       -5     
Flag Coverage Δ
unit-tests 57.80% <80.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
dot/sync/syncer.go 44.86% <ø> (ø)
lib/runtime/life/resolver.go 70.33% <ø> (+4.43%) ⬆️
lib/runtime/types.go 0.00% <ø> (ø)
lib/runtime/wasmer/imports.go 43.87% <25.00%> (-0.48%) ⬇️
dot/state/service.go 46.18% <100.00%> (ø)
lib/runtime/storage/trie.go 45.00% <100.00%> (+6.11%) ⬆️
lib/blocktree/leaves.go 90.24% <0.00%> (-4.88%) ⬇️
dot/network/sync.go 55.42% <0.00%> (-2.06%) ⬇️
lib/blocktree/blocktree.go 56.12% <0.00%> (+1.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8aa6ab...e829c5f. Read the comment docs.

@noot noot requested a review from RyRy79261 March 15, 2021 18:46
@noot noot merged commit b384038 into development Mar 16, 2021
@noot noot deleted the noot/kusama-block-4939774 branch March 16, 2021 17:33
github-actions bot pushed a commit that referenced this pull request Mar 16, 2021
noot: fix: lib/runtime: fix nested storage transactions, fixes kusama block 4939774 (#1457)
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.

None yet

4 participants