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

feat: big genesis file #576

Merged
merged 13 commits into from
Mar 14, 2023
Merged

feat: big genesis file #576

merged 13 commits into from
Mar 14, 2023

Conversation

dudong2
Copy link
Contributor

@dudong2 dudong2 commented Mar 6, 2023

Description

As the genesis.json file based migration progressed, the function to write and load large files to the db was required. The block size of leveldb is limited to 4gb. Therefore, if the genesis.json file exceeds 4gb, a way to divide and save it is needed.

  • It divide the genesis data into 100MB units and save them in the db as keys genesisDoc0, genesisDoc1, ... genesisDoc255 (here int means byte). When divided into larger units (1GB, ...), the test could not be successed due to ci error, so the size was set at 100MB. Also, since 100MB * 255 = 25.5GB in this case, I figured it would be fine in most cases.

Closes: #577

@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #576 (5af9711) into main (7fcbb0f) will increase coverage by 0.19%.
The diff coverage is 68.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #576      +/-   ##
==========================================
+ Coverage   66.19%   66.39%   +0.19%     
==========================================
  Files         277      278       +1     
  Lines       36946    37052     +106     
==========================================
+ Hits        24456    24599     +143     
+ Misses      10733    10682      -51     
- Partials     1757     1771      +14     
Impacted Files Coverage Δ
node/node.go 61.10% <68.00%> (+0.50%) ⬆️

... and 17 files with indirect coverage changes

@dudong2 dudong2 self-assigned this Mar 6, 2023
@dudong2 dudong2 added the C: enhancement Classification: New feature or its request, or improvement in maintainability of code label Mar 6, 2023
@dudong2 dudong2 marked this pull request as ready for review March 8, 2023 09:46
@torao
Copy link
Contributor

torao commented Mar 10, 2023

The e2e tests seem to fail all the time. E2e tests often have non-reproducible errors related to asynchronous processing, but this happens a lot, maybe there is still some code that has not been fixed enough.

Looking at the error log, it seems that SIGSEGV is happening on validator04 out of the four validators.
https://github.com/line/ostracon/actions/runs/4363272772/jobs/7670216595#step:10:360

Is there anything we can do to help?

Copy link
Member

@tnasu tnasu left a comment

Choose a reason for hiding this comment

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

I left some comments. Could you explain it in the PR description? Thanks

node/node_test.go Outdated Show resolved Hide resolved
node/node.go Show resolved Hide resolved
node/node.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: enhancement Classification: New feature or its request, or improvement in maintainability of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

write and load big genesis file
4 participants