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

Embed snapshot TOML files as binary #849

Merged
merged 8 commits into from
Jan 30, 2023
Merged

Embed snapshot TOML files as binary #849

merged 8 commits into from
Jan 30, 2023

Conversation

canepat
Copy link
Member

@canepat canepat commented Jan 30, 2023

This PR introduces two changes:

  • a new tool called embed in the cmd folder that can be used to embed any file as binary data into some executable image
  • the usage of such tool for embedding the list of Erigon snapshot references (i.e. {name, hash}) for each network, which are available as TOML files in the erigon-snapshot repository

@canepat canepat requested a review from mriccobene January 30, 2023 12:45
@codecov
Copy link

codecov bot commented Jan 30, 2023

Codecov Report

Merging #849 (7152c30) into master (03f1fe6) will increase coverage by 0.01%.
The diff coverage is 96.87%.

@@            Coverage Diff             @@
##           master     #849      +/-   ##
==========================================
+ Coverage   74.83%   74.84%   +0.01%     
==========================================
  Files         214      223       +9     
  Lines       16174    16206      +32     
  Branches     2548     2551       +3     
==========================================
+ Hits        12104    12130      +26     
  Misses       3007     3007              
- Partials     1063     1069       +6     
Impacted Files Coverage Δ
node/silkworm/snapshot/config.cpp 93.75% <93.75%> (ø)
node/silkworm/snapshot/config/bor_mainnet.cpp 100.00% <100.00%> (ø)
node/silkworm/snapshot/config/bsc.cpp 100.00% <100.00%> (ø)
node/silkworm/snapshot/config/gnosis.cpp 100.00% <100.00%> (ø)
node/silkworm/snapshot/config/goerli.cpp 100.00% <100.00%> (ø)
node/silkworm/snapshot/config/mainnet.cpp 100.00% <100.00%> (ø)
node/silkworm/snapshot/config/mumbai.cpp 100.00% <100.00%> (ø)
node/silkworm/snapshot/config/ropsten.cpp 100.00% <100.00%> (ø)
node/silkworm/snapshot/config/sepolia.cpp 100.00% <100.00%> (ø)
core/silkworm/consensus/pos/engine.cpp 83.33% <0.00%> (-16.67%) ⬇️
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Demote log level
Improve format of generated files
@canepat canepat marked this pull request as ready for review January 30, 2023 15:50
@canepat canepat merged commit 9bde589 into master Jan 30, 2023
@canepat canepat deleted the embed_toml_as_binary branch January 30, 2023 15:51
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