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(mocknet): use neard fork-network to set up mocknet nodes #11034

Merged
merged 4 commits into from
Apr 12, 2024

Conversation

marcelo-gonzalez
Copy link
Contributor

This adds support in neard_runner.py for nodes whose initial state will be created via neard fork-network instead of by parsing a big records json file. This will result in much faster startup times.

It will be implemented by detecting what files exist in the ~/.near/setup directory. If they contain just genesis.json and records.json, we assume we're running an old version of node setup, and if it looks like it contains a full NEAR home directory, we will assume it's prepared to be used with neard fork-network. The only thing that changes for mirror.py is that a genesis_time argument will be required in this case in order to get a consistent network from neard fork-network set-validators across all the nodes

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.31%. Comparing base (20658bb) to head (b704ffa).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11034      +/-   ##
==========================================
- Coverage   71.33%   71.31%   -0.02%     
==========================================
  Files         760      758       -2     
  Lines      152343   152494     +151     
  Branches   152343   152494     +151     
==========================================
+ Hits       108669   108750      +81     
- Misses      39204    39307     +103     
+ Partials     4470     4437      -33     
Flag Coverage Δ
backward-compatibility 0.24% <ø> (+<0.01%) ⬆️
db-migration 0.24% <ø> (+<0.01%) ⬆️
genesis-check 1.43% <ø> (+<0.01%) ⬆️
integration-tests 36.93% <ø> (-0.06%) ⬇️
linux 69.79% <ø> (-0.01%) ⬇️
linux-nightly 70.79% <ø> (-0.02%) ⬇️
macos 54.44% <ø> (+0.14%) ⬆️
pytests 1.66% <ø> (+<0.01%) ⬆️
sanity-checks 1.45% <ø> (+<0.01%) ⬆️
unittests 66.97% <ø> (+0.01%) ⬆️
upgradability 0.29% <ø> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marcelo-gonzalez marcelo-gonzalez added this pull request to the merge queue Apr 12, 2024
Merged via the queue into near:master with commit 66eeb2b Apr 12, 2024
28 of 29 checks passed
@marcelo-gonzalez marcelo-gonzalez deleted the fork-mocknet branch April 12, 2024 01:03
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

2 participants