Compare commits

...

7 Commits

Author SHA1 Message Date
tommy a6ac1cf5e7 one more removal 2022-08-08 15:20:14 +02:00
tommy 0ba2a3b724 update text to reflect the correct opts args 2022-08-08 15:18:54 +02:00
tommy 96d5fd7612 update the version 2022-08-08 15:15:52 +02:00
tommy a1b7b43da2 Resolve PR comments 2022-08-08 15:11:24 +02:00
tommy 123cbf7aff add change log entry 2022-08-05 15:42:40 +02:00
tommy c4d12e7a8e cargo fmt - and the project to cargo.toml 2022-08-05 15:34:24 +02:00
tommy bf22a13b8f Revert "Validator Command Binary - Draft"
This reverts commit 3429e0a8e9.
2022-08-05 12:19:12 +02:00
8 changed files with 13 additions and 43 deletions
+1
View File
@@ -25,6 +25,7 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https://
- validator-client: add `denom` argument and add simple test for querying an account balance
- gateway, validator-api: Checks for coconut credential double spending attempts, taking the coconut bandwidth contract as source of truth ([#1457])
- coconut-bandwidth-contract: Record the state of a coconut credential; create specific proposal for releasing funds ([#1457])
- add validator-client script rust binary /tools/validator-client-scripts
### Fixed
+3
View File
@@ -69,6 +69,9 @@ build-wallet:
build-connect:
cargo build --manifest-path nym-connect/Cargo.toml --workspace
build-validator-scripts:
cargo build --release --manifest-path tools/validator-client-scripts/Cargo.toml
fmt-main:
cargo fmt --all
+2 -8
View File
@@ -1,7 +1,7 @@
[package]
name = "validator-client-scripts"
version = "0.1.0"
edition = "2018"
version = "1.0.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -9,18 +9,12 @@ edition = "2018"
base64 = "0.13.0"
bs58 = "0.4"
clap = { version = "3.2.8", features = ["derive"] }
csv = "1.1"
dotenv = "0.15.0"
log = "0.4"
pretty_env_logger = "0.4"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1.11", features = [ "net", "rt-multi-thread", "macros", "signal"] }
streaming-stats = "0.2.3"
# we don't really need those directly, but including them somehow solves dependency issue
url = "2.2"
bip39 = "1.0.1"
validator-client = { path = "../../common/client-libs/validator-client", features = ["nymd-client"] }
-8
View File
@@ -1,8 +0,0 @@
install:
cargo install --path .
clean:
cargo clean
fmt:
cargo fmt --all
+5 -5
View File
@@ -5,15 +5,15 @@ Note: to work it requires rust 1.60+
## The binary
- Build the binary
- cargo build --release
- cargo build --release --bin validator-client-scripts
- this will compile the binary to "your/main/nym/path/target/release"
- the binary is named ./validator-client-scripts-rs
- the binary is named ./validator-client-scripts
## Executing commands
-./validator-scripts-rs --help
-./validator-client-scripts --help
- will produce a list of it's capabilites
The binary requires mandatory OPTIONS:
The binary takes optional args which are as follows -> OPTIONS:
```
--config-env-file <CONFIG_ENV_FILE>
--mixnet-contract <MIXNET_CONTRACT>
@@ -22,7 +22,7 @@ The binary requires mandatory OPTIONS:
--vesting-contract <VESTING_CONTRACT>
```
If you specify --config-env-file it will read the values from the envs/directory:
`./validator-client-scripts-rs --config-env-file env/qa.env .....` and you don't need to supply the
`./validator-client-scripts --config-env-file env/qa.env .....` and you don't need to supply the
mixnet-contract nor the vesting-contract argument
An example of a command is as follows:
@@ -1,20 +0,0 @@
CONFIGURED=true
RUST_LOG=info
RUST_BACKTRACE=1
BECH32_PREFIX=n
MIX_DENOM=unym
MIX_DENOM_DISPLAY=nym
STAKE_DENOM=unyx
STAKE_DENOM_DISPLAY=nyx
DENOMS_EXPONENT=6
MIXNET_CONTRACT_ADDRESS=n14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sjyvg3g
VESTING_CONTRACT_ADDRESS=n1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrq73f2nw
BANDWIDTH_CLAIM_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0
COCONUT_BANDWIDTH_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0
MULTISIG_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0
REWARDING_VALIDATOR_ADDRESS=n1ms55meaqd3ztytstwn0v0pl7kjrgmnq6d0674t
STATISTICS_SERVICE_DOMAIN_ADDRESS="http://127.0.0.1:8090"
NYMD_VALIDATOR="http://validator-service:26657"
API_VALIDATOR="http://validator-api-service:8080"
@@ -26,7 +26,7 @@ pub(crate) async fn migrate(client: Client, args: Args) {
let memo = args.memo.unwrap_or_else(|| "contract migration".to_owned());
let contract_address = client.mixnet_contract_address();
// the EmptyMsg{} argument is equivalent to `--init-message='{}'`
let res = if let Some(raw_msg) = args.init_message {
let msg: serde_json::Value =
+1 -1
View File
@@ -208,7 +208,7 @@ async fn wait_for_interrupt() {
);
}
println!(
"Received SIGINT - the gateway will terminate now (threads are not yet nicely stopped, if you see stack traces that's alright)."
"Received SIGINT - the process will terminate now (threads are not yet nicely stopped, if you see stack traces that's alright)."
);
}