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

Better genesis import #198

Merged
merged 2 commits into from
Jul 20, 2020
Merged

Better genesis import #198

merged 2 commits into from
Jul 20, 2020

Conversation

alpe
Copy link
Contributor

@alpe alpe commented Jul 17, 2020

🚧 After #195
This started as #144 when I realized that the work was done already.

Some additional improvements:

  • Export CodeInfo via prefix iterator
  • Added IterateCodeInfos to keeper
  • Renamed ListContractInfo to IterateContractInfo

And some additional genesis import assertions.

Reviewer note:
Only the last 2 commits. The others are from #195


For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@alpe alpe requested a review from ethanfrey as a code owner July 17, 2020 09:45
@alpe alpe mentioned this pull request Jul 17, 2020
3 tasks
@alpe alpe changed the base branch from update_history to master July 20, 2020 08:57
@ethanfrey
Copy link
Member

I just merged #195

Can you rebase this and I will gladly review

@alpe
Copy link
Contributor Author

alpe commented Jul 20, 2020

Rebased. Sorry, too many PRs...

@codecov
Copy link

codecov bot commented Jul 20, 2020

Codecov Report

Merging #198 into master will decrease coverage by 0.07%.
The diff coverage is 65.51%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #198      +/-   ##
==========================================
- Coverage   71.96%   71.88%   -0.08%     
==========================================
  Files          27       27              
  Lines        2572     2604      +32     
==========================================
+ Hits         1851     1872      +21     
- Misses        611      622      +11     
  Partials      110      110              
Impacted Files Coverage Δ
x/wasm/internal/types/types.go 22.88% <7.40%> (-9.23%) ⬇️
x/wasm/internal/keeper/keeper.go 91.21% <83.33%> (-2.39%) ⬇️
x/wasm/internal/keeper/test_fuzz.go 95.12% <85.71%> (-4.88%) ⬇️
x/wasm/internal/keeper/querier.go 38.84% <87.50%> (+2.70%) ⬆️
x/wasm/internal/keeper/genesis.go 96.61% <100.00%> (+3.38%) ⬆️
x/wasm/internal/types/genesis.go 95.00% <100.00%> (+0.55%) ⬆️
x/wasm/internal/types/msg.go 50.00% <100.00%> (+7.54%) ⬆️
x/wasm/internal/types/params.go 57.69% <100.00%> (+1.28%) ⬆️
x/wasm/internal/types/test_fixtures.go 93.90% <100.00%> (+2.38%) ⬆️
... and 3 more

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 65e4e3a...882d817. Read the comment docs.

Copy link
Member

@ethanfrey ethanfrey 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. Please merge

continue
}
bytecode, err := keeper.GetByteCode(ctx, i)
keeper.IterateCodeInfos(ctx, func(codeID uint64, info types.CodeInfo) bool {
Copy link
Member

Choose a reason for hiding this comment

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

Callbacks are good. We will need them to scale up

@alpe alpe merged commit e59b38a into master Jul 20, 2020
@alpe alpe deleted the better_genesis_import branch July 20, 2020 14:42
zemyblue pushed a commit to Finschia/wasmd that referenced this pull request Jan 2, 2023
Remove install-debug target from Makefile.
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