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

Switch to System.CommandLine #7653

Merged
merged 43 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
066bc8e
Replace `McMaster.Extensions.CommandLineUtils` with `System.CommandLine`
rubo Oct 23, 2024
4cdd44c
Refactor startup and clean up
rubo Oct 24, 2024
0449603
Remove unused parameter
rubo Oct 24, 2024
8e098e1
Switch to top-level file
rubo Oct 24, 2024
7660ed2
Revise and add more conventional CLI options
rubo Oct 24, 2024
9c98998
Change config file extensions to `.json`
rubo Oct 24, 2024
572e7f7
Merge branch 'master' into feature/system-commandline-2
rubo Oct 24, 2024
63e068d
Rename Taiko configs
rubo Oct 24, 2024
a328140
Revise `nuget.config` files
rubo Oct 24, 2024
91fd242
Fix tests
rubo Oct 24, 2024
08e00e9
Remove `kovan.json`
rubo Oct 24, 2024
c1b28a5
Revise log config
rubo Oct 25, 2024
0fb3ddb
Refactor and optimize parse result handling
rubo Oct 25, 2024
40ec8f6
Refactor and unify logging on startup
rubo Oct 25, 2024
6ddb2d5
Revise CLI option handling
rubo Oct 25, 2024
4067141
Revise logs
rubo Oct 25, 2024
90ece4c
Fix formatting
rubo Oct 25, 2024
3976ab0
Disable redundant CLI options validation
rubo Oct 25, 2024
6f1c095
Merge branch 'master' into feature/system-commandline-2
rubo Oct 25, 2024
98889a3
Drop `System.CommandLine.NamingConventionBinder` package
rubo Oct 25, 2024
10a3c14
Replace `CommandLineParser` with `System.CommandLine`
rubo Oct 26, 2024
3f9e40c
Improve async and error handlings
rubo Oct 26, 2024
86a5f77
Merge branch 'master' into feature/system-commandline-2
rubo Oct 27, 2024
806945b
Replace `McMaster.Extensions.CommandLineUtils` with `System.CommandLi…
rubo Oct 27, 2024
f1b5c6a
Merge branch 'master' into feature/system-commandline-2
rubo Oct 28, 2024
ddf81bb
Fix formatting
rubo Oct 28, 2024
938e9c7
Apply pattern matching
rubo Oct 28, 2024
975da1c
Discard event handler parameters
rubo Oct 28, 2024
cafd42b
Remove the duplicated `NETHERMIND_HIVE_ENABLED` and other obsolete en…
rubo Oct 28, 2024
32e9120
Fix `EthereumRunner` tests
rubo Oct 28, 2024
8277892
Switch to `System.CommandLine` for tools (#7672)
rubo Oct 29, 2024
5a56cb0
Restore `NETHERMIND_MONITORING_GROUP`
rubo Oct 29, 2024
ab65b0b
Add new-style CLI options to docs
rubo Oct 29, 2024
d533291
Revise configuration loading
rubo Oct 30, 2024
6e4527b
Optimize configuration loading and logging
rubo Oct 30, 2024
5a9f851
Merge branch 'master' into feature/system-commandline-2
rubo Oct 30, 2024
da6ca41
Fix formatting
rubo Oct 30, 2024
cd68da9
Fix configuration path handling
rubo Oct 30, 2024
a8e142d
Revise logging
rubo Oct 31, 2024
8a3e895
Clean up `launchSettings.json`
rubo Oct 31, 2024
7d0e564
Move to file scope namespaces
rubo Oct 31, 2024
b8b9e9b
Revise option docs
rubo Oct 31, 2024
f8e84fd
Merge branch 'master' into feature/system-commandline-2
rubo Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/dev-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ echo =======================================================

echo -e "\033[32m";
read -e -p "Which configuration/s (space separated) you wish to run? " -i "mainnet" config
for cfg in $config; do cp nethermind/configs/$cfg.cfg ~; done
for cfg in $config; do cp nethermind/configs/$cfg.json ~; done
echo -e "\033[00m";

echo =======================================================
echo To run the node type:
echo 1. screen -S node
echo 2. ./infra.sh config-name.cfg
echo 2. ./infra.sh config-name.json
echo =======================================================
4 changes: 2 additions & 2 deletions scripts/infra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ mkdir ~/nethermind_$CONFIG/keystore
cp ~/$CONFIG.key ~/nethermind_$CONFIG/keystore/node.key.plain
DB_PATH="/root/db/$CONFIG"
echo "DB PATH: " $DB_PATH
cat ~/$CONFIG.cfg | jq '.Init.BaseDbPath = "'$DB_PATH'"' | sponge ~/$CONFIG.cfg
dotnet nethermind.dll -c ../$CONFIG.cfg
cat ~/$CONFIG.json | jq '.Init.BaseDbPath = "'$DB_PATH'"' | sponge ~/$CONFIG.json
dotnet nethermind.dll -c ../$CONFIG.json
6 changes: 3 additions & 3 deletions scripts/private-networking/clique-validators.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ docker-compose up
#END of main

function writeNethermindConfig() {
cat <<EOF > node_$1/configs/config.cfg
cat <<EOF > node_$1/configs/config.json
{
"Init": {
"WebSocketsEnabled": false,
Expand Down Expand Up @@ -196,7 +196,7 @@ cat <<EOF >> docker-compose.yml
command: --config config
volumes:
- ./genesis:/config/genesis
- ./node_$1/configs/config.cfg:/nethermind/configs/config.cfg
- ./node_$1/configs/config.json:/nethermind/configs/config.json
- ./static-nodes.json:/nethermind/Data/static-nodes.json
- ./node_$1/db/clique:/nethermind/nethermind_db/clique
- ./node_$1/keystore:/nethermind/keystore
Expand Down Expand Up @@ -233,4 +233,4 @@ function clearDbs() {
done
}

main
main
4 changes: 2 additions & 2 deletions scripts/syncSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ def fastBlocksSettings(configuration, apiUrl, blockReduced, multiplierRequiremen
print(configuration + 'PivotHash: ' + str(pivotHash))
print(configuration + 'PivotTotalDifficulty: ' + str(pivotTotalDifficulty))
data = {}
with open(f'{configsPath}/{configuration}.cfg', 'r') as mainnetCfg:
with open(f'{configsPath}/{configuration}.json', 'r') as mainnetCfg:
data = json.load(mainnetCfg)
data['Sync']['PivotNumber'] = baseBlock
data['Sync']['PivotHash'] = pivotHash
data['Sync']['PivotTotalDifficulty'] = str(pivotTotalDifficulty)
with open(f'{configsPath}/{configuration}.cfg', 'w') as mainnetCfgChanged:
with open(f'{configsPath}/{configuration}.json', 'w') as mainnetCfgChanged:
json.dump(data, mainnetCfgChanged, indent=2)

for config, value in configs.items():
Expand Down
268 changes: 0 additions & 268 deletions src/Nethermind/Chains/kovan.json

This file was deleted.

5 changes: 2 additions & 3 deletions src/Nethermind/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.4.0" />
<PackageVersion Include="Ckzg.Bindings" Version="1.0.2.855" />
<PackageVersion Include="Colorful.Console" Version="1.2.15" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="ConcurrentHashSet" Version="1.3.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="Crc32.NET" Version="1.2.0" />
Expand All @@ -37,7 +36,6 @@
<PackageVersion Include="Microsoft.ClearScript.V8.Native.osx-arm64" Version="7.4.5" />
<PackageVersion Include="Microsoft.ClearScript.V8.Native.osx-x64" Version="7.4.5" />
<PackageVersion Include="Microsoft.ClearScript.V8.Native.win-x64" Version="7.4.5" />
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
Expand Down Expand Up @@ -76,6 +74,7 @@
<PackageVersion Include="SCrypt" Version="2.0.0.2" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="Snappier" Version="1.1.6" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.24517.1" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageVersion Include="System.IO.Pipelines" Version="8.0.0" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
Expand All @@ -84,4 +83,4 @@
<PackageVersion Include="TestableIO.System.IO.Abstractions.Wrappers" Version="21.0.29" />
<PackageVersion Include="Websocket.Client" Version="5.1.2" />
</ItemGroup>
</Project>
</Project>
Loading