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: Update neard init to specify config file type to download #12072

Merged
merged 6 commits into from
Sep 11, 2024

Conversation

tayfunelmas
Copy link
Contributor

@tayfunelmas tayfunelmas commented Sep 10, 2024

We change the --download-config parameter to take a string.

  • neard init --download-config validator downloads the config.json file for validators (tracking single shard, loading memtries).
  • neard init --download-config rpc downloads the config.json file for non-validator RPC nodes (tracking all shards, NOT loading memtries).
  • neard init --download-config archival downloads the config.json file for non-validator archival nodes (tracking all shards, NOT loading memtries, archive field set to true).
  • neard init --download-config (with no value) defaults to validator config (for backwards compatibility).

We map the flag to a specific URL containing the config type.
The new config files per config type can be found at https://github.com/tayfunelmas/near-configs.
The new config files are already uploaded to AWS S3 with the new URLs.

NOTE: For indexer and chainsync-loadtest params, we use rpc config type.

Next: We will update the Near validator documentation to use the new flag value.

Tracking issue: #12070

@tayfunelmas tayfunelmas changed the title feat: Update neard init to specify config file type feat: Update neard init to specify config file type to download Sep 10, 2024
@tayfunelmas tayfunelmas marked this pull request as ready for review September 10, 2024 16:07
@tayfunelmas tayfunelmas requested a review from a team as a code owner September 10, 2024 16:07
@tayfunelmas
Copy link
Contributor Author

Adding @khorolets as reviewer due to the flag change for Indexers.

@@ -1,5 +1,8 @@
use near_indexer::near_primitives::types::Gas;

/// Indexer uses the RPC configuration type.
const DOWNLOAD_CONFIG_TYPE: &str = "rpc";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@khorolets please check here. simply I do not change --download-config flag, it is still boolean, but I map it to rpc config if it is specified.

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 21.21212% with 26 lines in your changes missing coverage. Please review.

Project coverage is 71.59%. Comparing base (ea8ec28) to head (511de97).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
utils/config/src/lib.rs 0.00% 15 Missing ⚠️
nearcore/src/config.rs 44.44% 4 Missing and 1 partial ⚠️
tools/indexer/example/src/configs.rs 0.00% 3 Missing ⚠️
neard/src/cli.rs 50.00% 1 Missing and 1 partial ⚠️
tools/chainsync-loadtest/src/main.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12072      +/-   ##
==========================================
+ Coverage   71.43%   71.59%   +0.15%     
==========================================
  Files         815      815              
  Lines      164218   164279      +61     
  Branches   164218   164279      +61     
==========================================
+ Hits       117317   117609     +292     
+ Misses      41772    41535     -237     
- Partials     5129     5135       +6     
Flag Coverage Δ
backward-compatibility 0.17% <0.00%> (-0.01%) ⬇️
db-migration 0.17% <0.00%> (-0.01%) ⬇️
genesis-check 1.26% <12.00%> (-0.01%) ⬇️
integration-tests 38.70% <0.00%> (+0.19%) ⬆️
linux 71.22% <21.21%> (+<0.01%) ⬆️
linux-nightly 71.13% <15.15%> (+0.11%) ⬆️
macos 54.07% <12.50%> (+0.06%) ⬆️
pytests 1.53% <12.00%> (-0.01%) ⬇️
sanity-checks 1.33% <0.00%> (-0.01%) ⬇️
unittests 65.36% <15.15%> (+0.13%) ⬆️
upgradability 0.22% <0.00%> (-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.

chain/indexer/src/lib.rs Outdated Show resolved Hide resolved
nearcore/src/config.rs Outdated Show resolved Hide resolved
Copy link
Member

@kobayurii kobayurii left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you!

@tayfunelmas tayfunelmas added this pull request to the merge queue Sep 11, 2024
Merged via the queue into near:master with commit a865808 Sep 11, 2024
26 of 29 checks passed
@tayfunelmas tayfunelmas deleted the download-config branch September 11, 2024 16:47
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.

3 participants