Compare commits

...

1128 Commits

Author SHA1 Message Date
durch 6dbb3fbd3f Trigger rewarded_set update on bootstrap error 2022-03-30 14:35:03 +02:00
Drazen Urch 95b6ac50be Type safe bounds (#1179)
* Type safe bounds

* Debug get_all_delegations

* List raw delegations

* query all delegation values

* Get all keys and values

* Differentiate on len

* Clean up duplicates

* Remove stop gap

* Cleanup, fix paged query key

* Reduce queries required to get all delegations

* Sandbox migration

* Delete migration
2022-03-30 12:20:03 +02:00
Tommy Verrall 5f2247ab83 Merge pull request #1180 from nymtech/update-wallet-unbond
fix unbond page
2022-03-30 09:35:22 +01:00
Tommy Verrall 842bcfa782 fix unbond page 2022-03-30 09:34:17 +01:00
Drazen Urch c2938e0672 Fix delegation paging (#1174)
* Fix delegation paging and tests

* Circuit breaker, upgrade storage and cosmwasm

* beta6

* Cleanup delegation events
2022-03-29 17:02:56 +02:00
Tommy Verrall 278516ad11 Merge pull request #1172 from nymtech/feature/update-binary-version
Update binaries to rc version
2022-03-29 10:02:48 +01:00
Mark Sinclair ce241339bf Create nym-release-publish.yml 2022-03-28 18:16:08 +01:00
Tommy Verrall 8d7428923a Update binaries to rc version 2022-03-28 15:32:31 +01:00
Drazen Urch 4a1a4b6415 Different values for mixes and gateways (#1169) 2022-03-28 13:33:55 +02:00
Drazen Urch 65a45bc0a8 Add global blacklist to validator-cache (#1168) 2022-03-25 17:02:01 +01:00
Jędrzej Stuczyński 5932974108 Removed unused tauri client 2022-03-25 14:33:13 +00:00
Jędrzej Stuczyński ce34e45afc Merge branch 'develop' of github.com:nymtech/nym into develop 2022-03-25 14:20:15 +00:00
Jędrzej Stuczyński afcefa9432 Dealt with typescript validator client 2022-03-25 14:20:09 +00:00
Mark Sinclair d346fdcff9 Merge pull request #1165 from nymtech/dependabot/npm_and_yarn/node-forge-1.3.0
Bump node-forge from 1.2.1 to 1.3.0
2022-03-25 14:04:41 +00:00
Jędrzej Stuczyński a05a7e261a Merge branch 'develop' of github.com:nymtech/nym into develop 2022-03-25 14:03:59 +00:00
Jędrzej Stuczyński ab9c892f8a Updated BBBC contract tests dependencies 2022-03-25 14:03:51 +00:00
Mark Sinclair ca7bfef865 Merge pull request #1163 from nymtech/dependabot/npm_and_yarn/clients/tauri-client/minimist-1.2.6
Bump minimist from 1.2.5 to 1.2.6 in /clients/tauri-client
2022-03-25 14:03:38 +00:00
dependabot[bot] f8c9397afd Bump minimist from 1.2.5 to 1.2.6 in /clients/tauri-client
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 13:58:16 +00:00
Mark Sinclair 0c215efdb2 Merge pull request #1164 from nymtech/dependabot/npm_and_yarn/nym-wallet/webdriver/minimist-1.2.6
Bump minimist from 1.2.5 to 1.2.6 in /nym-wallet/webdriver
2022-03-25 13:57:30 +00:00
durch e1efcda3dd Test last paged page 2022-03-25 11:09:46 +01:00
Drazen Urch 59056a22c5 Feature/upgrade rewarding sandbox (#1167)
* Add init_epoch msg

* Use 64BE ctr variant

* Remove query_all_delegations

* Comment migration
2022-03-25 10:57:49 +01:00
Mark Sinclair 13841e813b Update nym-wallet version metadata 2022-03-25 08:48:51 +00:00
dependabot[bot] da775af00a Bump minimist from 1.2.5 to 1.2.6 in /nym-wallet/webdriver
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 18:04:30 +00:00
Mark Sinclair bd99474f26 Update minimist version in workspace lock file 2022-03-24 18:03:28 +00:00
Mark Sinclair 9c70244157 Add ts-packages target to fix security warnings in workspaces lock file resulting from yarn audit.
Run with `yarn audit:fix`. Check the lock file before committing!
2022-03-24 18:03:09 +00:00
dependabot[bot] 736edcbe00 Bump node-forge from 1.2.1 to 1.3.0
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 18:02:42 +00:00
Jędrzej Stuczyński 40e215473e Merge branch 'develop' of github.com:nymtech/nym into develop 2022-03-24 17:41:27 +00:00
Jędrzej Stuczyński 6746514317 Fixed up most JS dependency warnings
Resolved dependency issues in testnet-faucet

Removed the outdated react example

Updated js example dependencies

Using sandbox in js example

Feature locking imports

Running wasm client in testnet mode by default

Allow using `None` BandwidthController in testnet mode

Reverted endianness change and left it for others to deal with

Fixed up websocket js-example

Changed endianness of aes counter
2022-03-24 17:40:20 +00:00
dependabot[bot] 50a332eb2b Bump minimist from 1.2.5 to 1.2.6 in /clients/webassembly/js-example (#1162)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 15:51:43 +00:00
dependabot[bot] 08f1b176db Bump minimist in /docker/typescript_client/upload_contract (#1159)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 15:22:53 +00:00
dependabot[bot] 00e2319be3 Bump minimist in /clients/native/examples/js-examples/websocket (#1160)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 15:22:45 +00:00
durch ecd566432b Improve pagination test 2022-03-24 10:50:23 +01:00
durch b6dc81304c Fix get reward pool 2022-03-23 22:46:30 +01:00
durch 6337cd9966 Merge branch 'develop' of https://github.com/nymtech/nym into develop 2022-03-23 21:13:16 +01:00
durch b41b8f94a4 Fix sqlx types 2022-03-23 21:11:01 +01:00
Mark Sinclair 52ced9d3ad Generate webpack favicons from PNG
https://github.com/jantimon/favicons-webpack-plugin/issues/288 indicates that generating from an SVG sometimes freezes at 92%. This behaviour is seen on Windows wallet builds in CI.
2022-03-23 19:46:50 +00:00
durch 5eb2249ad5 Regenerate mixnet json schema 2022-03-23 20:40:24 +01:00
durch 008fc045b7 drop foreign key constraints 2022-03-23 20:35:09 +01:00
Mark Sinclair 38cc3b9e38 Add webpack thread loader to speed up wallet build time 2022-03-23 19:24:55 +00:00
Mark Sinclair 989285e009 Update nym-wallet-publish-windows10.yml 2022-03-23 18:29:24 +00:00
Mark Sinclair c6e438600f Update nym-wallet-publish-windows10.yml 2022-03-23 18:24:38 +00:00
Mark Sinclair 1dab01ca33 Upgrade GitHub Actions checkout 2022-03-23 18:10:14 +00:00
Mark Sinclair 53e0432934 Build dependencies before building nym-wallet 2022-03-23 17:27:06 +00:00
Mark Sinclair a1f2d33397 Enabled GitHub Action to build Windows release for nym wallet 2022-03-23 16:42:49 +00:00
Mark Sinclair 49aa79b5df Update nym-wallet-publish-windows10.yml 2022-03-23 16:40:04 +00:00
Mark Sinclair 6f3b5fad15 Update nym-wallet-publish-windows10.yml 2022-03-23 16:37:38 +00:00
Mark Sinclair 0efa909374 Configure nym-wallet Windows signing 2022-03-23 15:51:36 +00:00
Fouad 43b102782e Merge pull request #1158 from nymtech/feature/vesting-full
Feature/vesting full
2022-03-23 15:45:11 +00:00
Mark Sinclair d6e6bab6a6 Update nym-wallet-publish-windows10.yml 2022-03-23 15:43:13 +00:00
Mark Sinclair 1a3cdc3128 Update nym-wallet-publish-windows10.yml 2022-03-23 15:36:55 +00:00
Mark Sinclair 39f75907e5 Update nym-wallet-publish-windows10.yml 2022-03-23 15:35:41 +00:00
Mark Sinclair 029c2698d7 Update nym-wallet-publish-windows10.yml 2022-03-23 15:34:12 +00:00
Mark Sinclair 60548770ba Update nym-wallet-publish-windows10.yml 2022-03-23 15:19:14 +00:00
Mark Sinclair 39cfc2057b Update nym-wallet-publish-windows10.yml 2022-03-23 15:14:58 +00:00
Mark Sinclair 4fbae2d5bd Create GitHub Action to publish and sign Windows wallet 2022-03-23 15:12:07 +00:00
Jon Häggblad 9feee4c174 Fix some minor compiler and clippy warnings 2022-03-23 15:19:00 +01:00
fmtabbara bca6b45273 Merge branch 'develop' into feature/vesting-full 2022-03-23 12:43:31 +00:00
fmtabbara d9733a97ae use 'estimated' fee 2022-03-23 12:42:56 +00:00
fmtabbara e66dc01966 highlight pending delegation time 2022-03-23 12:00:13 +00:00
fmtabbara 2b4aca0194 prevent duplicates 2022-03-23 09:44:17 +00:00
fmtabbara 06aa09afcd UI bug fix 2022-03-22 15:44:39 +00:00
durch ddc09bbb2e Additive rewarding test stub 2022-03-22 12:09:41 +01:00
fmtabbara 3003be5e68 use end epoch for undelegation completion time 2022-03-22 10:54:31 +00:00
fmtabbara cb2ce87ab7 Merge branch 'develop' into feature/vesting-full 2022-03-22 10:24:50 +00:00
fmtabbara 2ad65fc455 display pending undelegations 2022-03-22 10:24:14 +00:00
Tommy Verrall cb292b38c0 Merge pull request #1156 from nymtech/wallet_get_current_epoch
get_current_epoch tauri
2022-03-22 10:17:26 +00:00
durch b710f796f9 get_current_epoch tauri 2022-03-22 11:10:41 +01:00
durch fb5a9a7a3e Fix opeartion order 2022-03-21 20:08:57 +01:00
Drazen Urch 071720c1cc Cleanup (#1155) 2022-03-21 18:24:40 +01:00
Drazen Urch 6679944689 Feature flag reward payments (#1154) 2022-03-21 17:30:08 +01:00
fmtabbara bec7814756 Merge branch 'develop' into feature/vesting-full 2022-03-21 11:24:07 +00:00
Drazen Urch 592b3b3bb1 Pending endpoints (#1150)
* Add QueryPendingDelegationEvents QueryMsg

* Add pending_delegation_events to nymd client

* Add pending delegation events to wallet

* Get rid of double epoch accounting

* Fix reward saving

* Try batching operations to reduce fees

* Bundle all transactions into one

* make nice
2022-03-21 10:07:51 +01:00
Jon Häggblad c2ff786f41 validator-api: fix clippy::needless-question-mark 2022-03-21 09:14:41 +01:00
Drazen Urch 63dd26ca1b Add Query endpoints for calculating rewards (#1152) 2022-03-18 15:44:26 +01:00
fmtabbara 07b6114adf only create mnemonic on account creation 2022-03-17 18:00:58 +00:00
fmtabbara 07155b4fe5 dont disable token pool selector for delegations 2022-03-17 17:14:41 +00:00
fmtabbara 8b635a44b8 fix conflicts 2022-03-17 16:53:29 +00:00
fmtabbara 568862a571 fix conflicts + errors 2022-03-17 16:40:49 +00:00
Drazen Urch f24d6e224d Change accumulated reward to Option, migrate delegations (#1147)
* Change accumulated reward to Option, migrate delegations

* Remove interval from the validator cache

* Add info to db errors

* Remove interval fetch from the contract

* Rework epochs

* Fix undelegation errors

* Emit error event instead of error

* make no-clippy

* Fix clippy lints
2022-03-17 12:03:05 +01:00
Tommy Verrall f9a154b36c Merge pull request #1148 from nymtech/chore/use-urls-types-in-wallet
wallet: use Urls rather than Strings for validator urls
2022-03-16 09:17:04 +00:00
Tommy Verrall 72d994880b Merge pull request #1149 from nymtech/feature/wallet-logging
wallet: add logging
2022-03-16 09:14:45 +00:00
Jon Häggblad fe02bc4631 wallet: add logging 2022-03-15 16:03:39 +01:00
Mark Sinclair 1fb8e1bbaf Add wellknown validators json file 2022-03-15 13:38:27 +00:00
Jon Häggblad 96aa355db3 wallet: use Urls rather than Strings for validator urls 2022-03-15 14:25:22 +01:00
Tommy Verrall 8dfb9c8173 Merge pull request #1134 from nymtech/dependabot/npm_and_yarn/clients/native/examples/js-examples/websocket/url-parse-1.5.10
Bump url-parse from 1.5.7 to 1.5.10 in /clients/native/examples/js-examples/websocket
2022-03-15 11:06:15 +00:00
Jon Häggblad 382d3e130e wallet: remove unused use 2022-03-14 22:18:28 +01:00
Jon Häggblad a8246621e1 wallet: add health query based on plain http 2022-03-14 22:12:34 +01:00
fmtabbara 7868725fed revert console output 2022-03-14 14:18:02 +00:00
fmtabbara d30667d8e4 add error log 2022-03-14 13:04:57 +00:00
Jon Häggblad 66b6a8aeef wallet: fetch validators url remotely if available (#1146) 2022-03-14 12:19:11 +01:00
fmtabbara 3483a9e7f9 fix lint warnings 2022-03-14 11:00:47 +00:00
fmtabbara 893b28c51c fix eslint warning - func-names 2022-03-14 09:49:17 +00:00
Jon Häggblad 93165ad699 nymcoconut: fix clippy 2022-03-14 09:34:32 +01:00
Jon Häggblad 2ebb498589 ci: run clippy with --workspace in build.yml 2022-03-14 09:19:09 +01:00
fmtabbara 47ffdfe496 linting, conflict fixes, and general tidy 2022-03-13 01:20:46 +00:00
fmtabbara 51bced8766 merge develop 2022-03-12 22:17:33 +00:00
fmtabbara d4286aeb76 fix validation 2022-03-12 21:12:51 +00:00
Drazen Urch 929a780315 Fix delegated free calculation (#1145) 2022-03-11 21:44:28 +01:00
Daniel Filipe Nunes Silva c7cdd1e1b4 feature/pedersen-commitments (#1048)
* add pedersen.rs and first alias type

* replace ciphertexts in BlindSignRequest by commitments and adapt try_from

* update BlindSignRequest.to_byte_vec

* add TODO to issuance.rs

* [WIP] update CmCs proof to use commitments

* complete ProofCmCs construct implementation

* [WIP] ProofCmCs verify

* complete ProofCmCs verify implementation

* complete ProofCmCs to_bytes implementation

* complete ProofCmCs from_bytes implementation

* WIP update ProofCmCs roundtrip tests

* WIP update prepare_blind_sign

* update prepare_blind_sign

* WIP update blind_sign

* update blind_sign

* update BlindedSignature and try_from

* update BlindedSignature unblind

* update BlindedSignature to_bytes

* move elgamal encrypto to elgamal and manage imports

* add verification keys for g1 method

* upadate tests to work with Pedersen commitments

* unused remove pedersen.rs

* update error message

* fix proof_cm_cs_bytes_roundtrip test

* Move generation of commitment openings into prepare blind signature function

* Edits

* Extende the verification key; remove validator's secret key from the unblind function

* Update the unblind function throughout the whole nymcoconut repo

* Fix broken tests

* Run cargo clippy and fmt

* Add benchmark measurements

* Add more detailed printouts

* Change byte printout

* Update benchmarks

* add public attributes as part of the commitment

* update bytes order comment for ProofCmCs

* check proof_cm_cs_bytes_roundtrip test and remove TODO

* remove irrelevant prints in blind signature tests

* remove inappropriate function to get betas_g1

* remove irrelevant prints in verification

* Remove print statement and add additional checks on the verification key

* Run clippy

* Fix coconut call in validator-api

* Update dependend packages

* Update the input to the obtain partial credential function

* Fix the verification key bytes calculation

* Run cargo fmt on keygen.rs

* Run cargo fmt for validator-api

* Run cargo fmt for credentials

* Replace concat with chain

* Remove unneccessary mut

* Run cargo fmt

* fix type conversion

Co-authored-by: aniampio <anna.piotrowska.15@ucl.ac.uk>
2022-03-11 11:44:25 +00:00
Mark Sinclair 8575a72a22 Update Nym wallet dependencies to use ts-packages (#1144)
* Use shared ts-packages in wallet

* Add eslint rules

* Formatting: run eslint --fix on all files

* Formatting: fix linting errors for dependencies

* linting fixes

* fix sign in pages

* fix breaking change

* fix ts errors

fix ts and es errors

* Fix up typings for image and json modules
Add tsconfig for eslint to process webpack config

* Use shared webpack config

* Use shared logo component

* Remove unused images

* Allow html path to be passed as an argument in shared webpack config

* Fix up webpack config for html template

* Build shared ts-packages before starting dev mode

* Fix webpack config

* use shared logo component

Co-authored-by: fmtabbara <fmtabbara@hotmail.co.uk>
Co-authored-by: mmsinclair <mmsinclair@users.noreply.github.com>
2022-03-11 11:41:17 +00:00
Jon Häggblad 9d03bec14b clippy: fix lints from beta toolchain 2022-03-11 10:17:39 +01:00
fmtabbara ce93e5f677 bug fixes and minor ui updates 2022-03-10 18:59:45 +00:00
Mark Sinclair 7c826ef881 Remove GitHub Action for TS type generation
Please generate type manually before committing.
2022-03-10 18:07:08 +00:00
Jon Häggblad ac666b7a1d wallet: fix unused use 2022-03-10 17:18:08 +01:00
Jon Häggblad 83a9b993a1 wallet: add a 3 sec timeout for detecting validator 2022-03-10 17:16:03 +01:00
fmtabbara 4b691d19a0 Merge branch 'feature/vesting-delegations' into feature/vesting-token-pool-selector 2022-03-10 15:37:36 +00:00
Jon Häggblad fe4fcc7fdf rustfmt 2022-03-10 11:28:32 +01:00
Jon Häggblad a6e40443a4 ci: add --all-targets to nightly clippy 2022-03-10 11:24:01 +01:00
Jon Häggblad 0a583bd48a clippy: remove unnecessary mut 2022-03-10 11:17:43 +01:00
Jon Häggblad 96ccce1049 clippy: run clippy fix on coconut tests 2022-03-10 11:03:23 +01:00
Jon Häggblad 89d0ff5624 ci: run nightly clippy with --workspace 2022-03-10 10:53:49 +01:00
Jon Häggblad 2391d11758 ci: replace deprecated --all with --workspace
According to the docs `--all` is a deprecated alias for `--workspace`
2022-03-10 10:19:43 +01:00
Jon Häggblad 902c674ff1 makefile: replace deprecated flag 2022-03-10 09:13:34 +01:00
Jon Häggblad 160328a08e wallet: try validators one by one if available (#1143) 2022-03-10 07:38:39 +01:00
Mark Sinclair 9fea869bbc Regenerate icon for nym-wallet 2022-03-10 00:04:05 +00:00
Mark Sinclair c66d7ed489 Update Network Explorer Packages and add mix node identity key copy (#1142)
* Use new eslint rules and apply fixes. Use new logo component and shared theme + webpack config.

* Add shared component to display a copy icon and copy to clipboard with confirmation state

* Organise imports

* Add copy mixnode identity key to list of mixnodes and detail view

* Update nvm node version to 16

* Update GitHub Actions for Network Explorer to use yarn and yarn workspaces

* Switch favicon for smaller N icon

* Update README

* Add error boundary
2022-03-09 19:08:21 +00:00
fmtabbara 0e86761a13 Merge branch 'develop' into feature/vesting-delegations 2022-03-09 15:01:54 +00:00
Mark Sinclair 19d603ba1a Fix package.json 2022-03-09 14:29:45 +00:00
Drazen Urch b30f680549 Refactor to a lazy rewarding system (#1127)
* Remove eager operator and delegator rewarding

* Add mixnodes snapshoting

* Add Intervals map, getter and setter

* Refactor reward params

* Refactor MixnodeToReward

* Persist node reward params and results on chain

* Update cw-storage-plus to 0.12.1

* Refactor delegation storage

* Compound delegator reward command

* Compound delegator reward command

* Add defered delegate and undelegate

* Compound on behalf command

* Scale calculations to epoch

* Rename interval -> epoch where practical

* Store epochs on chain

* Cleanup first pass

* Adapt reporting to lazy rewarding

* make clippy --all
2022-03-09 14:28:16 +01:00
fmtabbara 55463da0da merge develop 2022-03-09 12:23:26 +00:00
fmtabbara 518daeaf20 allow undelegation of unvested tokens 2022-03-09 12:16:20 +00:00
fmtabbara f6ec12db94 allow delegation of vested tokens 2022-03-09 12:15:29 +00:00
Mark Sinclair 379dd1f02b Merge pull request #1139 from nymtech/feature/ts-packages
Add `ts-packages` for shared Typescript packages
2022-03-09 12:09:40 +00:00
Mark Sinclair 38804279e8 Fix up dependency 2022-03-09 11:52:52 +00:00
Mark Sinclair 3907cd17fe Improve eslint rules and fix up issues 2022-03-09 11:41:04 +00:00
fmtabbara 1e921186ad merge develop 2022-03-09 10:06:01 +00:00
Mark Sinclair 67c69cbec9 Add Network Explorer to yarn workspaces 2022-03-08 18:29:25 +00:00
Mark Sinclair abc5dd8b92 Add theme and palette explorer 2022-03-08 18:29:20 +00:00
Mark Sinclair c791de426a Add GitHub Action to build @nymproject/react storybook and example 2022-03-08 13:09:52 +00:00
Mark Sinclair 4c5d4ac4a4 Add docs 2022-03-08 10:50:41 +00:00
Mark Sinclair 48c1fcaf93 Add network selector component and storybook support for Nym themes 2022-03-08 10:50:41 +00:00
Mark Sinclair 31594c7a79 Add ts-packages for shared Typescript packages using yarn workspaces 2022-03-08 10:50:36 +00:00
Bogdan-Ștefan Neacșu 8ec3c04a39 Use 1.. indices and fix the blind sign request multiple generation 2022-03-08 10:59:57 +02:00
fmtabbara d653ecde1e remove unused import 2022-03-07 15:35:40 +00:00
Jon Häggblad ba7fecde6f wallet: use custom validator urls if configured 2022-03-07 13:24:37 +01:00
fmtabbara 5b9b4743dc check locked funds when bonding 2022-03-07 12:20:54 +00:00
fmtabbara 5f9b384efa remove client address from send form 2022-03-07 10:38:57 +00:00
fmtabbara d69526fad9 Merge branch 'feature/vesting-token-pool-selector' of https://github.com/nymtech/nym into feature/vesting-token-pool-selector 2022-03-07 10:24:24 +00:00
fmtabbara e10a4e8fca fix fee position on the bond form 2022-03-07 10:24:08 +00:00
fmtabbara 9016878868 remove sig 2022-03-07 10:20:13 +00:00
Jon Häggblad 835a915f25 wallet: initial backend support for config file with validator urls 2022-03-07 10:53:31 +01:00
fmtabbara 1ca6e4a002 [ci skip] Generate TS types 2022-03-04 13:36:49 +00:00
fmtabbara f9c73183db use new vesting requests and types 2022-03-04 13:35:01 +00:00
fmtabbara d296100ffa allow percent profit update on locked tokens mixnode 2022-03-04 13:34:15 +00:00
fmtabbara 06669fe114 don't show profile if in settings if no mixnode details 2022-03-04 13:33:00 +00:00
fmtabbara 8022fc7e31 get bond details when settings is opened or settings tab changes 2022-03-04 13:32:25 +00:00
fmtabbara 2b915fd0aa show locked balance if using locked pool 2022-03-04 13:31:40 +00:00
fmtabbara 4e45c54d17 allow unbonding for locked and balance tokens from bond screen 2022-03-04 13:31:17 +00:00
durch 9c16e5ebfa Remove core-graphics pin 2022-03-04 14:21:32 +01:00
fmtabbara 0113141efd use token pool selector in bond form 2022-03-04 13:06:09 +00:00
fmtabbara 614d096929 handle clear vesting account info 2022-03-04 13:01:42 +00:00
fmtabbara fe7df3a909 get vesting pledge info for mixnode 2022-03-04 13:01:05 +00:00
fmtabbara b14f6ab159 get vesting pledge info for mixnode 2022-03-04 13:00:50 +00:00
fmtabbara e6040b0ecc refacor log in flow and add notifications 2022-03-04 12:59:30 +00:00
fmtabbara 60e6d23fd8 create token pool selector 2022-03-04 12:59:01 +00:00
durch 5dc57d2a3e Fix type generation, upgrade ts-rs 2022-03-03 22:17:35 +01:00
Raphaël Walther fd619cad51 Moved clean task at an earlier stage 2022-03-03 18:47:28 +01:00
durch 953c0915d1 Lock tauri-versions, break type generation 2022-03-03 18:10:58 +01:00
Jon Häggblad acb1aa8df0 network-defaults: make defaults a bit more dynamic
By attaching network defaults to the selector enum, we can get them
either from DEFAULT_NETWORK or a selector passed as a dependency.
Hopefully this opens up some venues for being able to toggle between
networks at runtime.
2022-03-03 13:26:53 +01:00
fmtabbara d30038c570 Merge branch 'develop' into feature/vesting-token-pool-selector 2022-03-03 12:19:04 +00:00
fmtabbara b9ef848523 fix clipboard and screen maximize 2022-03-03 12:18:08 +00:00
fmtabbara e3813b4868 Merge branch 'develop' into feature/vesting-token-pool-selector 2022-03-03 12:06:56 +00:00
Tommy Verrall b7bc713cd4 Merge pull request #1137 from nymtech/feature/allow-mainnet
allow main-net prefix and denom to work
2022-03-02 17:08:28 +00:00
Tommy Verrall b966f962c8 allow main-net prefix and denom to work 2022-03-02 17:07:15 +00:00
fmtabbara 61a0e5bbfb add token pool selector 2022-03-02 16:34:03 +00:00
Mark Sinclair 698cdc524d Merge pull request #1136 from nymtech/feature/upgrade-blake3
Upgrade blake3 to v1.3.1 and tauri to 1.0.0-rc.3
2022-03-02 15:25:20 +00:00
Jędrzej Stuczyński 448aba0917 Fixed dependencies in mixnet contract tests 2022-03-02 12:51:58 +00:00
fmtabbara b813e1fee0 refactor and bug fix 2022-03-02 11:08:19 +00:00
Jędrzej Stuczyński 23de430f93 Running tests with all features in CI 2022-03-02 10:34:45 +00:00
Jędrzej Stuczyński 9462bc726d Feature-locking parts of common/crypto 2022-03-02 10:34:27 +00:00
fmtabbara 3d2eaeeabb rebuild vesting timeline 2022-03-02 00:21:52 +00:00
fmtabbara a732a676e0 Merge branch 'develop' into feature/vesting-actions 2022-03-01 20:52:09 +00:00
fmtabbara d6a8fcda9c start svg based vesting timeline 2022-03-01 20:51:42 +00:00
fmtabbara 3628cd92c9 start token pool selector 2022-03-01 20:51:25 +00:00
Mark Sinclair 8d26acbc7e Upgrade tauri packages in nym-wallet 2022-03-01 18:50:05 +00:00
Mark Sinclair 07b971fe92 Upgrade tauri version on tauri-client 2022-03-01 18:50:05 +00:00
Jędrzej Stuczyński 2a539dc3cc Upgrade blake3 to v1.3.1 2022-03-01 18:50:05 +00:00
Mark Sinclair 562eb639a2 Merge pull request #1133 from nymtech/bugfix/explorer-map-data
Use network explorer map data with disputed areas
2022-03-01 14:08:56 +00:00
Mark Sinclair 91dd830a5e Network Explorer: move Crimea arcs from Russia to Ukraine according to https://github.com/nvkelso/natural-earth-vector/issues/489#issuecomment-903066759 2022-03-01 13:59:41 +00:00
Jon Häggblad 18837220f4 Make wallet denom dynamic
Making denom dynamic enables coin transfers on other nets than the
default sandbox net, such as mainnet.
2022-03-01 12:20:27 +01:00
fmtabbara 3fb9737db4 capitalise balance 2022-02-28 19:28:17 +00:00
durch 4d0b5b34ec Export additional wallet types 2022-02-28 18:28:53 +01:00
durch 6af0dbd1da Add AccountInfo to wallet 2022-02-28 18:24:40 +01:00
Mark Sinclair 2004148710 Network Explorer world map shows muted fill for countries with zero mixnodes 2022-02-28 12:58:18 +00:00
Bogdan-Ștefan Neacșu 1e805be5ad Start from 0 instead of 1, to have the correct length 2022-02-28 12:56:32 +02:00
fmtabbara 7a25e600b3 merge auto-screen size for the wallet 2022-02-28 10:34:09 +00:00
Raphaël Walther 1fd7d54715 Set nightly builds notification only on failure 2022-02-28 10:10:25 +01:00
dependabot[bot] 0575f01f9b Bump url-parse in /clients/native/examples/js-examples/websocket
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 04:45:35 +00:00
Fouad 43a6e62050 Merge pull request #1132 from nymtech/feature/vesting-ui
Feature/vesting UI
2022-02-25 15:23:27 +00:00
fmtabbara 39fb131d95 minor updates 2022-02-25 13:06:11 +00:00
fmtabbara 9533c2440a clear all balanced on logout 2022-02-25 11:54:23 +00:00
fmtabbara aab2be1fbd only allow QA network selection in development mode 2022-02-25 10:56:28 +00:00
Raphaël Walther 448dcbeaa8 Added missing token for notification 2022-02-25 10:55:28 +01:00
fmtabbara 29b07b4904 sort out car alignment! 2022-02-24 17:55:18 +00:00
fmtabbara cceb7a40bd update contract addressess 2022-02-24 16:50:58 +00:00
fmtabbara fb4b32359d log error 2022-02-24 16:41:49 +00:00
fmtabbara 7ca92cc487 hide vesting card if no vesting period created 2022-02-24 15:59:34 +00:00
fmtabbara 15d612eff6 add fee 2022-02-24 15:00:13 +00:00
Jon Häggblad 021c2d14f2 gateway: extract out PersistantStorage 2022-02-24 15:37:34 +01:00
fmtabbara 3b85927a90 merge develop 2022-02-24 12:17:00 +00:00
fmtabbara b386388b82 reorganise vesting ui 2022-02-24 12:15:40 +00:00
fmtabbara 7941b7099f use window maximize 2022-02-24 09:51:38 +00:00
dependabot[bot] 6604d927c5 Bump ws from 6.2.1 to 6.2.2 in /clients/webassembly/js-example (#1126)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/6.2.1...6.2.2)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-23 13:56:04 +00:00
Jon Häggblad 4fedf05b64 Fix clippy warnings on beta channel 2022-02-23 14:45:41 +01:00
Raphaël Walther fa00f85a31 Removed condition in notification 2022-02-23 14:05:55 +01:00
Raphaël Walther abf5a2d307 Triggerd workflow 2022-02-23 12:30:26 +01:00
Raphaël Walther 8e0000cb0b Removed test workflow 2022-02-23 12:02:30 +01:00
Raphaël Walther cc27911671 Moved workflow to different runners 2022-02-23 11:29:53 +01:00
Bogdan-Ștefan Neacșu b598f1d1db Make sure run uses the args passed at init, in eth mode 2022-02-23 12:45:31 +03:00
Raphaël Walther d4f10c1d68 Triggered workflow 2022-02-23 09:24:22 +01:00
Raphaël Walther 1d7ff40d02 Added test workflow 2022-02-23 09:14:21 +01:00
Raphaël Walther 72703b36e1 Tested build workflow 2022-02-22 17:35:50 +01:00
Raphaël Walther ecf7a40010 Enabled sccache 2022-02-22 17:23:47 +01:00
Raphaël Walther 272e9187d2 Removed test workflow 2022-02-22 16:18:28 +01:00
Raphaël Walther 69a1f3773c Amended test workflow 2022-02-22 15:41:20 +01:00
Raphaël Walther 15c97b1cae Amended test workflow 2022-02-22 15:31:02 +01:00
Raphaël Walther 2660ef59f7 Amended test workflow 2022-02-22 13:29:21 +01:00
dependabot[bot] 12a06d9dfe Bump url-parse from 1.4.7 to 1.5.7 in /clients/webassembly/react-example (#1125)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:56:29 +00:00
dependabot[bot] 6399cd24c8 Bump url-parse in /clients/native/examples/js-examples/websocket (#1124)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.4 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.4...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:56:20 +00:00
dependabot[bot] f30b5162e8 Bump url-parse from 1.5.1 to 1.5.7 in /clients/webassembly/js-example (#1122)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:56:15 +00:00
dependabot[bot] 229329ae4c Bump follow-redirects in /contracts/basic-bandwidth-generation (#1117)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:56:10 +00:00
dependabot[bot] a3bb5e466d Bump follow-redirects from 1.14.3 to 1.14.8 in /explorer (#1116)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.3 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.3...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:56:03 +00:00
dependabot[bot] 65d893a70b Bump follow-redirects from 1.14.5 to 1.14.8 in /nym-wallet (#1115)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:55:55 +00:00
dependabot[bot] e0944e5238 Bump follow-redirects in /clients/native/examples/js-examples/websocket (#1114)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:55:49 +00:00
dependabot[bot] b451d4b709 Bump follow-redirects from 1.14.7 to 1.14.8 in /testnet-faucet (#1113)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:55:42 +00:00
dependabot[bot] 1507e48158 Bump follow-redirects in /clients/webassembly/js-example (#1112)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.1 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.1...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:55:36 +00:00
dependabot[bot] 6e7a7ed4a6 Bump simple-get from 3.1.0 to 3.1.1 in /explorer (#1109)
Bumps [simple-get](https://github.com/feross/simple-get) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/feross/simple-get/releases)
- [Commits](https://github.com/feross/simple-get/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: simple-get
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 09:55:29 +00:00
Jędrzej Stuczyński af4801ac47 Removes migration code (#1071) 2022-02-22 09:54:57 +00:00
Raphaël Walther b748c55d4e Amended test workflow 2022-02-22 09:37:31 +01:00
Raphaël Walther 84e5bfc286 Amended test workflow 2022-02-21 17:37:12 +01:00
Raphaël Walther 96bd9ecf49 Amended test workflow 2022-02-21 15:48:10 +01:00
Raphaël Walther 092851976f Added test workflow 2022-02-21 13:23:04 +01:00
durch 9da1f82cca Restore cargo.lock 2022-02-20 21:58:01 +01:00
durch 8c60927fe2 Update tauri 2022-02-18 18:20:18 +01:00
fmtabbara ec5ef1db56 dynamic window sizing 2022-02-18 16:22:24 +00:00
fmtabbara 5dee6dd44f layout updates 2022-02-18 15:54:32 +00:00
durch aa6f5ad664 Update minor/patch versions 2022-02-18 12:18:28 +01:00
fmtabbara 201b5cc56f ui updates 2022-02-17 17:09:02 +00:00
fmtabbara 510553a697 update content 2022-02-17 14:56:38 +00:00
Raphaël Walther b81967c9f5 Set nightly notification on failure 2022-02-17 14:19:28 +01:00
Bogdan-Ștefan Neacşu fadff7888b Feature/reuse init owner (#970)
* Save gateway owner for later use in erc20 bandwidth request

* Pass owner in network monitor

* Switch to variable length owner address

* Add erc20 bridge contract in validator client

* Check bandwidth credential refers to gateway

* Check the owner of the gateway from the eth event

* Fix wasm client

* Hack to avoid unused warning on coconut path

* Hacked, one-time payment

* Remove print

* Update arg format

* Fix token check

* Fix native template

* Use utokens instead of full token

... when talking to eth

* Fix parse event for new field

* Fix socks5 template

* Add estimation of gas call

* Make fs backup more reliable

* Fix clippy

* Fix unused import

* Update waiting time

* Remove defaults from run, as it they should be set on init

* Remove debugging prints

* Replaced unwrap with error

* Fix build

* Make eth contract address dependent of network

* Use tokio for sleep

* Add approve before spending token on bandwidth

* Put bandwidth claim only at the beginning of the process
2022-02-17 11:56:11 +01:00
fmtabbara 24854f9254 Merge branch 'feature/faucet-release' into develop 2022-02-17 10:49:02 +00:00
Tommy Verrall 8ea7726e81 Merge pull request #1121 from nymtech/feature/update-sandbox
update contract address
2022-02-16 18:26:07 +00:00
Tommy Verrall ea32a897b2 update contract address 2022-02-16 17:38:27 +00:00
Raphaël Walther 5d7a14c5ab Added a custom runner for ubuntu only builds 2022-02-16 17:14:19 +01:00
Raphaël Walther cad68b8d6c Set test schedule 2022-02-16 16:42:09 +01:00
Raphaël Walther 1d125ed97f Set test schedule 2022-02-16 14:36:36 +01:00
Raphaël Walther 36d4ec5a72 Set test schedule 2022-02-16 13:49:38 +01:00
Raphaël Walther 44981b8621 Set test schedule 2022-02-16 13:27:40 +01:00
fmtabbara bd68797432 replace local storage with cookie 2022-02-16 12:23:44 +00:00
Mark Sinclair 636759789c Merge pull request #1119 from nymtech/feature/gh-actions-notifications
Refactor GitHub Actions notifications
2022-02-16 14:21:16 +02:00
Mark Sinclair c03a859223 Refactor GitHub Actions notifications 2022-02-16 14:09:12 +02:00
fmtabbara b269cdae31 refactor 2022-02-16 11:10:15 +00:00
Raphaël Walther 2177a396b9 Added assume yes option on apt-get install 2022-02-16 11:48:11 +01:00
Raphaël Walther 4c50dd64f4 Added test build 2022-02-16 11:19:41 +01:00
fmtabbara be9d3a48bb update error message 2022-02-16 10:19:09 +00:00
fmtabbara 37d890c634 refactor 💪 2022-02-15 22:15:10 +00:00
fmtabbara 6287583f4b component refactor 2022-02-15 21:35:34 +00:00
fmtabbara c7760c6c10 eslint check + additional validation 2022-02-15 18:46:03 +00:00
fmtabbara 2c0058c477 update env sample£ 2022-02-15 16:38:07 +00:00
fmtabbara 02fb2e56ca add validation 2022-02-15 16:34:41 +00:00
Jon Häggblad 8b2c72eb91 gateway: upgrade clap and use declarative cli argument parsing 2022-02-15 17:11:51 +01:00
durch 805eb31728 Fix typo 2022-02-15 16:21:13 +01:00
fmtabbara 22d4c89e48 display total vesting 2022-02-15 15:04:14 +00:00
fmtabbara 28d5ac92b3 fix alignment 2022-02-15 14:19:37 +00:00
fmtabbara a2e678587c Merge branch 'feature/vesting-ui' of https://github.com/nymtech/nym into feature/vesting-ui 2022-02-15 13:59:46 +00:00
fmtabbara 0ac7bb5f03 terminology updates 2022-02-15 13:59:35 +00:00
durch 7f45cbd5df Rename all -> test 2022-02-15 14:41:00 +01:00
fmtabbara 8ce709bbb4 update currency 2022-02-15 10:20:07 +00:00
Raphaël Walther 46db139f79 Set cron schedule 2022-02-14 18:09:31 +01:00
Raphaël Walther 069c5bf332 Added repo checkout on new job 2022-02-14 18:08:06 +01:00
Jess 54a4653e7d Merge pull request #1118 from nymtech/bugfix/gateway-bond
Change `pledge` to `bond` in gateway list
2022-02-14 15:07:49 +00:00
Raphaël Walther ea1f689c71 Added a job for notification 2022-02-14 15:59:35 +01:00
Mark Sinclair 3d60299b22 Change pledge to bond in gateway list 2022-02-14 16:42:04 +02:00
fmtabbara 4d9dfac812 [ci skip] Generate TS types 2022-02-14 14:07:39 +00:00
fmtabbara 0012294dc0 add current vesting period 2022-02-14 13:58:45 +00:00
Raphaël Walther 5b5063676f Corrected wrong indentation 2022-02-14 14:20:54 +01:00
Raphaël Walther 833556020d Set runner OS to ubuntu-latest for notification 2022-02-14 14:16:27 +01:00
Fouad Tabbara 0cdb68bcf3 fix breaking changes + add vesting total period 2022-02-14 11:47:42 +00:00
Raphaël Walther aa00eb70d5 Adedd env variables for notification 2022-02-14 12:19:13 +01:00
Fouad Tabbara a882d10848 Merge branch 'develop' into feature/vesting-ui 2022-02-14 11:18:07 +00:00
Fouad Tabbara c03a58ae9a change file ext 2022-02-14 11:15:31 +00:00
Drazen Urch 2caf79fba0 Feature/vesting get current period (#1111)
* Add GetCurrentPeriod Msg

* Add a few more query endpoints

* Enrich original vesting response
2022-02-14 12:13:55 +01:00
Raphaël Walther eda1822653 Removed beta and nightly rust builds 2022-02-14 10:28:12 +01:00
Raphaël Walther 0f1ff5ffd2 Added notifications to nightly builds 2022-02-14 09:04:02 +01:00
Raphaël Walther 9512fc34f0 Added workflow for daily builds 2022-02-11 14:21:06 +01:00
fmtabbara 75348922fc close snackbars on component unmount 2022-02-11 13:13:45 +00:00
Drazen Urch 938eb2d0f0 Add UpdateMixnodeConfigOnBehalf to vestng contract (#1091)
* Add UpdateMixnodeConfigOnBehalf

* Rename one_u* function
2022-02-11 12:15:00 +01:00
dependabot[bot] ede51fa589 Bump simple-get in /contracts/basic-bandwidth-generation (#1110)
Bumps [simple-get](https://github.com/feross/simple-get) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/feross/simple-get/releases)
- [Commits](https://github.com/feross/simple-get/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: simple-get
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-11 11:03:26 +00:00
dependabot[bot] 7e0711ce12 Bump simple-get from 3.1.0 to 3.1.1 in /clients/tauri-client (#1108)
Bumps [simple-get](https://github.com/feross/simple-get) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/feross/simple-get/releases)
- [Commits](https://github.com/feross/simple-get/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: simple-get
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-11 11:02:32 +00:00
dependabot[bot] 822f40239f Bump simple-get from 3.1.0 to 3.1.1 in /nym-wallet (#1107)
Bumps [simple-get](https://github.com/feross/simple-get) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/feross/simple-get/releases)
- [Commits](https://github.com/feross/simple-get/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: simple-get
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-11 11:02:27 +00:00
Tommy Verrall 31149e6ba1 Merge pull request #1105 from nymtech/dependabot/npm_and_yarn/clients/webassembly/react-example/node-sass-7.0.0
Bump node-sass from 4.14.1 to 7.0.0 in /clients/webassembly/react-example
2022-02-11 10:36:16 +00:00
Drazen Urch ba233b6016 Fix hardcoded period logic (#1104) 2022-02-11 09:44:15 +01:00
dependabot[bot] 3d17ab6a4b Bump node-sass in /clients/webassembly/react-example
Bumps [node-sass](https://github.com/sass/node-sass) from 4.14.1 to 7.0.0.
- [Release notes](https://github.com/sass/node-sass/releases)
- [Changelog](https://github.com/sass/node-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/node-sass/compare/v4.14.1...v7.0.0)

---
updated-dependencies:
- dependency-name: node-sass
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-10 23:34:48 +00:00
fmtabbara 492f1dd199 add notifications 2022-02-10 10:16:23 +00:00
fmtabbara 172399f792 unlock spendable tokens 2022-02-09 17:06:31 +00:00
fmtabbara 22407c2911 create address component 2022-02-09 13:49:56 +00:00
fmtabbara bdace0f9cb truncate address 2022-02-09 12:31:30 +00:00
fmtabbara 15bbba590b minor refactors 2022-02-09 11:27:26 +00:00
fmtabbara a72264c685 get and display token allocation values 2022-02-09 11:27:09 +00:00
fmtabbara 2612cca708 refactoring 2022-02-09 11:25:26 +00:00
fmtabbara fc16d1c839 add QA to network selector (temporary) 2022-02-09 10:36:29 +00:00
Jędrzej Stuczyński f22bb282ab Fixed underflow in rewarding all delegators (#1099)
* Fixed underflow in rewarding all delegators

* Slightly simplifying the loop
2022-02-07 11:30:17 +00:00
Jędrzej Stuczyński d907b6b81a Fixes infinite loops in requests involving pagination (#1085)
* Fixes infinite loops in requests involving pagination

* Removed duplicate code and added extra explanation for the decision
2022-02-07 11:29:00 +00:00
Tommy Verrall 1903938035 Merge pull request #1094 from nymtech/feature/minor-rewarding-adjustments
Emit original bond as part of rewarding event
2022-02-03 14:58:13 +00:00
mfahampshire bb646c4f6a updated token contract address 2022-02-03 14:43:37 +01:00
Mark Sinclair 99e64a7bc1 Merge pull request #1095 from nymtech/bug-fix/mainnet-blocks-url
create custom urls for mainnet
2022-02-03 12:30:40 +00:00
fmtabbara 7b960fa8a4 create custom urls for mainnet 2022-02-03 12:00:43 +00:00
Jędrzej Stuczyński 4c65ef3a2f Emit original bond as part of rewarding event 2022-02-03 09:52:44 +00:00
Mark Sinclair a4d84ffb1b GitHub Action for Ubuntu wallet build needs new dependencies 2022-02-03 09:30:08 +00:00
Mark Sinclair c495762a42 GitHub Actions add Ubuntu dependencies for tauri 2022-02-03 09:25:29 +00:00
Mark Sinclair 8d60a3ef6e GitHub Action to publish Ubuntu wallet 2022-02-03 09:20:03 +00:00
Jon Häggblad e24f8aa219 Fix rust 2018 idioms warnings (#1092)
* Fix elided-lifetimes-in-paths warnings

Enabling `-Wrust-2018-idioms` generates `-Welided-lifetimes-in-paths`
warnings about hidden lifetime parameters in types being deprecated

* Unused extern crate
2022-02-02 20:47:28 +01:00
Fouad de864fe828 Feature/wallet login with password (#1074)
* create nymlogo component

* start scaffolding

* set up mnemonic check pages

* start on guess words components

* mnemonic verification work

* more mnemonic verification

* hard code number of words to generate

* mnemonic verification section 2

* add password strength indicator

* add password confirmation

* update text

* disable word tiles on selection

* add exisiting account page

* finish exisiting account login

* add back buttons to return to the initial screen

* update button size

* create network selection component

* implement network selector component

* update page types

* make currency and network dynamic variables

* remove unused env  values

* [ci skip] Generate TS types

* lighten subtext

* display network name in app

* create network selector component

* remove old network display component

* update state in response to network selection

* state updates

* implement logout

* refresh delegations on network change

* Initial implementation of data encryption/decryption with provided password

* Removing milhon network.

* Removing more milhon references.

* Adding in mainnet constants for network defaults. Contracts are not yet defined.

* Allow encryption of EncryptedData<T>, where T: Serialize + Deserialize

It uses serde_json for representation of T

* Making contract addresses optional

* [ci skip] Generate TS types

* Add mainnet as implicit network

* Fix unreachable code warning

* Using zeroize for encrypted data + password

* Get denom dynamically

* initialize network to undefined before login

* Fix str parse to dynamic denom

* Pass network in config all the way to hd wallet generation

* Fixed encrypted data deserialization

* Storing and loading accounts from the disk

* Additional error variants

* Fix clippy in wallet

* Simplified contract address parsing

* display error

* fix typo

* uncomment code

* Use sandbox as backend default again

* Reorganised wallet storage for easier testing + unit test

* Fix denom showing

* to_major call only on printable balance

* fix up state changes

Co-authored-by: Dave Hrycyszyn <futurechimp@users.noreply.github.com>
Co-authored-by: fmtabbara <fmtabbara@users.noreply.github.com>
Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
Co-authored-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2022-02-02 18:25:02 +00:00
Mark Sinclair 8bc8671678 Fix up readme 2022-02-02 17:39:50 +00:00
Mark Sinclair c37d6b9296 Add release documentation for the Nym wallet 2022-02-02 17:36:29 +00:00
Mark Sinclair a4d1d2c354 Change GitHub Actions if syntax 2022-02-02 16:44:43 +00:00
Mark Sinclair 0a59e21d97 Fix condition of GitHub Action for building the wallet 2022-02-02 16:39:14 +00:00
Mark Sinclair 911a3d0c04 Change trigger for GitHub Action to build and sign the wallet 2022-02-02 16:28:47 +00:00
Mark Sinclair 163d4ff5fb Wallet signing on MacOS (#1093)
* Fix up tauri config to have correct Apple signing metadata

* Add GitHub Actions to create a release, build and sign the wallet (on MacOS) when pushing to a `nym-wallet-*` tag

* Review feedback

* [ci skip] Generate TS types

Co-authored-by: mmsinclair <mmsinclair@users.noreply.github.com>
2022-02-02 16:01:20 +00:00
Drazen Urch 2b84b5472b Prevent contract overwriting (#1090) 2022-02-02 13:34:41 +01:00
Jon Häggblad c4ad3b8f05 Setup basic test for mixnode stats reporting (#1077)
* mixnode: add basic test for node_statistics

* mixnode: rename to SharedNodeStats

* mixnode: add some comments

* mixnode: formatting

* mixnode: fix test

* mixnode: fix test

* mixnode: remove unreliable assert

* mixnode: switch from sleep to advance in test

* workspace: use resolver 2

* mixnode: formatting
2022-02-02 07:49:33 +01:00
Drazen Urch fe33df723b Tag contract errors, and print out lines for easier QA (#1084)
* Tag contract errors, and print out lines for easier QA

* Allow updating mixnet address by admin

* Add reply endpoint, and unbond callback

* Extract vesting messages

* Wrap up
2022-02-01 18:10:33 +01:00
mfahampshire 3a0e499199 added verification args for bandwidth generator with nymt 2022-02-01 17:39:05 +01:00
mfahampshire ce23662270 added NYMT contract address kv pairs 2022-02-01 17:38:44 +01:00
Jon Häggblad c6e41ca3f3 Update to rust edition 2021 everywhere (#1086)
* chore: update to rust edition 2021 everywhere

* validator-api: simplify into_iter call in rust 2021
2022-02-01 13:28:02 +01:00
Jędrzej Stuczyński 9f0971f8a9 Logout operation (#1087) 2022-01-31 13:05:48 +00:00
Drazen Urch 538616af54 Feature/flexible vesting + utility queries (#1083)
* Flexible vesting schedules

* Utility queries

* make vesting specification fields public

* Address review comments

Co-authored-by: Tommy Verrall <tommyvez@protonmail.com>
2022-01-28 14:07:07 +01:00
dependabot[bot] 6333042826 Bump @openzeppelin/contracts in /contracts/basic-bandwidth-generation (#1082)
Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.3.1 to 4.4.2.
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/OpenZeppelin/openzeppelin-contracts/compare/v4.3.1...v4.4.2)

---
updated-dependencies:
- dependency-name: "@openzeppelin/contracts"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 10:31:26 +00:00
dependabot[bot] b6d9ca2056 Bump nth-check in /clients/native/examples/js-examples/websocket (#1081)
Bumps [nth-check](https://github.com/fb55/nth-check) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/fb55/nth-check/releases)
- [Commits](https://github.com/fb55/nth-check/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: nth-check
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 10:31:10 +00:00
dependabot[bot] 844d612808 Bump url-parse in /clients/native/examples/js-examples/websocket (#1080)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.4.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.4)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 10:31:02 +00:00
dependabot[bot] 9becf5457f Bump follow-redirects in /clients/native/examples/js-examples/websocket (#1079)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.1 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.1...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 10:30:55 +00:00
dependabot[bot] 3d07f1eeb9 Bump nanoid in /clients/native/examples/js-examples/websocket (#1078)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.23 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.23...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 10:30:48 +00:00
Jon Häggblad 0747e12273 mixnode: make wallet_address mandatory for init (#1076) 2022-01-28 09:39:12 +01:00
Drazen Urch 5f4d56c1d8 Rework vesting contract storage (#1061)
* Rework storage

* Handle may_load failures

* Set ADMIN on init

* Use strings for storage keys

* Add GetAccount

* Move amount to msg

* Use iterators everywhere

* mock test properly

* Configure mixnet contract on init

* Updated Cargo.lock
2022-01-27 21:47:28 +01:00
Mx 390e58f603 Merge pull request #1022 from nymtech/feature/testnet-deploy-scripts
Feature/testnet deploy scripts
2022-01-27 16:42:04 +01:00
mfahampshire 6cf16d9c8f fixed merge clash 2022-01-27 16:36:20 +01:00
Jon Häggblad 1368ab133e Add trait to mock client dependency in DelayForwarder (#1073)
* client-libs/mixnode: add trait for client sending

* mixnode: instantiate and test DelayForwarder

* mixnode: remove commented out line
2022-01-27 15:34:32 +01:00
Jon Häggblad ff1d92b576 Tidy nym-mixnode module visibility (#1075)
* mixnode: make command modules private

* mixnode: make some node modules private

* mixnode: make config structs private

* mixnode: restore accidentally moved function
2022-01-27 15:03:58 +01:00
Jon Häggblad 1703a0a6f5 mixnode: bump rust-version to latest stable (#1072) 2022-01-27 12:39:40 +01:00
Jon Häggblad 344eb92396 Add @octol as codeowner (#1068) 2022-01-26 11:40:04 +01:00
Jędrzej Stuczyński 8a77287eaa Fixes CI for our wasm build (#1069)
* Feature-locked unused imports

* Reverted wasam-bindgen to 0.2.78 to temporarily bypass https://github.com/rustwasm/wasm-bindgen/issues/2774

* Reorganised imports
2022-01-26 09:11:35 +00:00
mfahampshire 9bfda6a254 prettified contract addresses json 2022-01-25 19:11:50 +01:00
mfahampshire 147be7afd9 increased logging, added localhost config to hardhat for gas approximation 2022-01-25 19:10:17 +01:00
mfahampshire 0a2ce7fa6d added new builds 2022-01-25 18:22:44 +01:00
mfahampshire 72f24c2c9d added new tests for killswitch 2022-01-25 18:22:36 +01:00
mfahampshire f5b5d139ac added killswitch for credential generation 2022-01-25 18:22:25 +01:00
Tommy Verrall 2da6fdc2e8 Merge pull request #1067 from nymtech/feature/wallet-inclusion-probability
set-up inclusion probability
2022-01-25 17:05:01 +00:00
Jędrzej Stuczyński f7574924a8 Mixnet Contract constants extraction (#1060)
* Extracted constants that could realistically be controlled by governance to constants.rs

Also made interval control be more explicit in the contract

* Extracted active set work factor to a constant

* Required type changes in wallet code

* [ci skip] Generate TS types

* Missing change in test code

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2022-01-25 16:46:46 +00:00
fmtabbara 5d07115706 refinements and small bug fix 2022-01-25 13:58:15 +00:00
fmtabbara 9e994dfd55 set-up inclusion probability 2022-01-25 11:51:36 +00:00
Jon Häggblad 59bc7cb53d Upgrade Clap and use declarative argument parsing for nym-mixnode (#1047)
* mixnode: upgrade clap and use declarative cli parsing

* mixnode: map argument to enum for sign

* mixnode: address review comments
2022-01-25 12:51:26 +01:00
Jędrzej Stuczyński 655ff9bffb De-'float'-ing Interval (Display impl + serde) (#1065)
* Updated time to 0.3.6

* Changed Display impl for Interval so it doesnt use floats

* Explicit rfc3339 datetime serialization

* Typo

* Changed 'visit_borrwed_str' to 'visit_str'
2022-01-25 11:17:44 +00:00
Bogdan-Ștefan Neacşu a03cb1ef9f Feature/wasm client (#1066)
* Fix wasm client

* Re-enable CI on wasm client

There is an `unused-unit` lint that will fail for now, but this is
regarded as a false positive and should eventualy get fixed:

https://github.com/rustwasm/wasm-bindgen/issues/2774

* The wasm tests would be run under native arch
2022-01-24 18:48:44 +02:00
Jędrzej Stuczyński 60f965ec52 Made contract addresses for query NymdClient construction optional (#1055)
Similarly as it is the case when creating SigningNymdClient
2022-01-24 15:43:20 +00:00
Jędrzej Stuczyński 8d26e48a5b Introduced RPC query for total token supply (#1053)
* Introduced RPC query for total token supply

* Cargo fmt
2022-01-24 15:43:10 +00:00
Jędrzej Stuczyński 94527ab594 Changed bech32_prefix from punk to nymt (#1064) 2022-01-24 12:40:36 +00:00
Tommy Verrall e312a28aad Merge pull request #1059 from martinyung/develop
fix: make explorer footer year dynamic
2022-01-24 11:39:42 +00:00
dependabot[bot] e84a0c4438 Bump nanoid from 3.1.30 to 3.2.0 in /nym-wallet (#1062)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.30 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.30...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-24 10:18:11 +00:00
dependabot[bot] 6f1a0d987d Bump nanoid from 3.1.30 to 3.2.0 in /testnet-faucet (#1063)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.30 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.30...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-24 10:18:02 +00:00
mfahampshire 48ceb9d1ce mainnet token args for contract verification 2022-01-21 23:43:51 +01:00
mfahampshire e82e8b8bc3 added mainnet config 2022-01-21 23:43:32 +01:00
Yung Chun Ern Martin 3caa4c15ca fix: make explorer footer year dynamic 2022-01-22 00:11:13 +08:00
Tommy Verrall 741131f376 Merge pull request #1058 from nymtech/bug-fix/display-client-address
display client address on wallet creation
2022-01-21 15:54:59 +00:00
fmtabbara ae6f161cd6 display client address on wallet creation 2022-01-21 15:49:01 +00:00
Tommy Verrall b940c87d64 Merge pull request #1057 from nymtech/feature/fix_wallet_mnemonic
Add mnemonic just on creation, to display it
2022-01-21 15:41:28 +00:00
Drazen Urch fe6c685ab1 Feature/hourly set updates (#1012)
* Rename function/variables mixnodes->set

* Stub utility interface

* Rewarded set contract interface

* Move epoch to common, epoch to contract

* Move epoch to the chain

* Rewarded set validator-api

* [ci skip] Generate TS types

* Epoch queries

* Moved new code to a new module

* Restored cosmwasm dependencies to their beta.3 versions for better compatibility with the rest of the codebase

* Rewarded set write reorganisation

* Stub for validator api module  responsible for rewarded set updates

* Reorganised validator api cache

* Pending contract changes

* Relevant updates to the validator client

* Updating rewarded set based on contract state

* Advancing/Setting current epoch in the contract

* Using blocktime as 'now' at startup

* Adjusted validator-api side rewarding code

* Contract cleanup + query for epoch rewarded set heights

* [ci skip] Generate TS types

* Simplified rewarder processing loop and initial sync

* [ci skip] Generate TS types

* Fixed EXISTING query-related unit tests

* Fixed existing unit tests for rewarding-related transactions

* Cargo fmt

* Removed some dead code

* Using cosmwasm 1.0.0-beta3 for compatibility [with cw-storage-plus and rest of codebase]

* Missing TryInto import

* Additional storage and query related unit tests + a bug fix

* Transaction-related unit tests + bug fixes

* Required migration code

* Update common/cosmwasm-smart-contracts/mixnet-contract/src/msg.rs

Co-authored-by: Drazen Urch <drazen@urch.eu>

* Update common/cosmwasm-smart-contracts/mixnet-contract/src/msg.rs

Co-authored-by: Drazen Urch <drazen@urch.eu>

* Constant renaming

* Changed determining previous epoch return type to Option<Epoch> if they would precede the genesis

* Exposed the new endpoint to the wallet

* Epoch-related unit tests fixes

* Recommended #[must_use] on next_epoch method

* Renamed all epoch occurences to interval

As they refer to the 'rewarding interval'

Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2022-01-21 14:04:23 +00:00
Bogdan-Ștefan Neacșu c64c36022f Add mnemonic just on creation, to display it 2022-01-21 14:57:42 +02:00
Mark Sinclair e52fe65985 Network Explorer: updates to API and UI to show the active set (#1056)
* Add identicons package

* Tidy up styling and move methods into component directories with better naming

* Add mixnode status colours to theme

* Mixnode status and icon components

* Add status to mixnode types

* Add API method to get mixnode details

* Add mixnode details to state

* Add status and name+description section to mixnode detail page

* Wrap with div instead of p

* Limit width of description and link to new tab

* Limit length of link button and truncate with elipsis

* Replace `filter` with `find`

* Move mix node detail components to a location that is better named

* Refactor mixnode detail state and separate into an independent context from main state.

This prevents the mixnode detail page from showing stale data when switching between mix nodes.

* Tidy up mixnode detail page adding new state provider and a guard component to handle loading, error and not found states

* Layout changes to mixnode description header section

* Add methods to Explorer API client to get a mixnode by id, active set by status and overview summary

* Add color prop to StatsCard and make count optional

* Add optional start and end children to TableToolbar

* Tidy up naming

* Add summary overview and getting mixnodes by active set status to main state

* Add mix node status overview cards

* Add mix node status to routes

* Mixnode list has a dropdown component to select the active set status

* Clean up caching code

* Add resource to get a single mixnode by id

* Add API resources to get `active`, `inactive` and `standby` mixnodes

* Add mixnode summary to API

* Add overview summary endpoint to API

* Fix OpenAPI/swagger base url

* Make clippy happy

* Add method to get validators

* Add methods to get active and rewarded mixnodes

* Fix naming

* Move client creation to crate root

* Move cache to module

* Delete unused files

* Add validators API resource

* Add gateways API resource

* Move tasks to crate root

* Add new HTTP resources for validators and gateways to routes

* Tidy up naming and locations for mixnodes

* Add validator and gateways to state, and tidy up naming

* Add gateways and validator modules to main

* Overview shows validator and gateway summaries from state

* Bundle variable weight Open Sans fonts

* Fix up font weights and sizes

* Fix up typing

* Fix up social icons

* Fix navbar colour

* Fix paper colour in dark mode and border radius

* Fix up stats card

* Tidy up Nym icons

* Fix up overview

* Fix up spacing and padding for overview

* Add light mode shades that are darker for mixnode status values

* Review feedback
2022-01-21 11:28:59 +00:00
Tommy Verrall fea64d4d4f Merge pull request #1052 from nymtech/feature/tokio-console
Feature/tokio console
2022-01-20 12:23:29 +00:00
durch 6ff02bc2a1 Fix wallet clippy lints 2022-01-20 11:31:35 +01:00
durch 8b166f12f8 Instrument tokio console 2022-01-20 11:17:33 +01:00
Jędrzej Stuczyński ecdbe034fa Implemented beta clippy lint recommendations (#1051) 2022-01-19 20:32:48 +01:00
Tommy Verrall 3e46c8630d Merge pull request #1050 from nymtech/update/validator-client-profit-percentage
add new function to update profit percentage
2022-01-19 16:18:47 +00:00
fmtabbara 93e962524a update types 2022-01-19 14:05:43 +00:00
dependabot[bot] 5b6c1c032c Bump shelljs in /contracts/basic-bandwidth-generation (#1043)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-19 14:00:19 +00:00
dependabot[bot] 135f1a6e7f Bump follow-redirects in /contracts/basic-bandwidth-generation (#1041)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-19 14:00:12 +00:00
dependabot[bot] c61f89144e Bump follow-redirects from 1.14.5 to 1.14.7 in /testnet-faucet (#1040)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-19 14:00:06 +00:00
Tommy Verrall 67fe368e65 Merge pull request #1033 from nymtech/feature/configurable_wallet
Feature/configurable wallet
2022-01-19 10:36:17 +00:00
Bogdan-Ștefan Neacşu 522229459b Fix clippy on relevant lints (#1044)
* Fix clippy on relevant lints

return_self_not_must_use still produces errors, but that will be
auto-fixed once the change to move it to pedantic is released to beta
channel

* Run fmt
2022-01-18 21:37:51 +01:00
Drazen Urch e3d8b71ea2 Endpoint for rewarded set inclusion probabilities (#1042)
* Add validator-api endpoint

* Add validator-client method

* Make it a bit nicer

* Address review comments

* Cap probability at 1.
2022-01-18 21:26:15 +01:00
Fouad 4f98fde362 Merge pull request #1046 from nymtech/feature/additional-bond-validation
Feature/additional bond validation
2022-01-18 12:57:14 +00:00
fmtabbara aa75e54419 dont display warnings on successful bond or delegate 2022-01-18 11:45:27 +00:00
fmtabbara 5190a541a6 add warning to delegate page 2022-01-18 11:30:56 +00:00
fmtabbara 3a39fff006 PR updates 2022-01-18 10:16:36 +00:00
fmtabbara 0e302b83ab add warning for unbonding 2022-01-17 18:42:13 +00:00
Fouad 0d0637fe19 Merge pull request #1036 from nymtech/feature/node-settings-update
Feature/node settings update
2022-01-17 18:16:24 +00:00
fmtabbara 1f0c0090dc merge develop 2022-01-17 17:53:14 +00:00
fmtabbara 4f960330b1 Merge branch 'develop' into feature/additional-bond-validation
merge develop
2022-01-17 17:36:41 +00:00
fmtabbara a273980aa0 refactor 2022-01-17 17:34:39 +00:00
neacsu 13a55f00d8 [ci skip] Generate TS types 2022-01-17 15:50:06 +00:00
Bogdan-Ștefan Neacșu 4feec780d4 Use fn new() for Account 2022-01-17 17:39:21 +02:00
Bogdan-Ștefan Neacșu 35c044c340 Store all clients and discard mnemonic 2022-01-17 17:24:52 +02:00
Bogdan-Ștefan Neacșu ac5539a0fa Export ts type file 2022-01-17 14:44:43 +02:00
Bogdan-Ștefan Neacșu 9c569cbb62 Expose switch_network to frontend 2022-01-17 14:13:15 +02:00
Bogdan-Ștefan Neacșu 72485cacd3 Pass possible network values using Network type
Export a Network type to TS and make seamless transitions between this
type and the network defaults one. We may have more networks supported
in the backend then in the frontend at a certain moment in time.
2022-01-17 13:38:10 +02:00
Drazen Urch 56d36d2c46 Migrate to cw-storage-plus 0.11.1 (#1035) 2022-01-14 20:59:40 +01:00
Drazen Urch 8fb54dd4e7 Feature/downcast reward estimation (#1031)
* Downcast u128 to u64

* fmt

* Fix status

* fmt
2022-01-14 20:57:51 +01:00
dependabot[bot] 44d59ff8c2 Bump @openzeppelin/contracts in /contracts/basic-bandwidth-generation (#1034)
Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.4.1 to 4.4.2.
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/OpenZeppelin/openzeppelin-contracts/compare/v4.4.1...v4.4.2)

---
updated-dependencies:
- dependency-name: "@openzeppelin/contracts"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-14 15:50:57 +00:00
fmtabbara a8caf19f8c additional balance check before bonding 2022-01-14 14:32:16 +00:00
fmtabbara 53b44fb9c6 remove unused import 2022-01-13 17:30:11 +00:00
fmtabbara c0959e853e spacing updates 2022-01-13 17:07:18 +00:00
fmtabbara 144df00782 fix conflicts and refine UI 2022-01-13 16:40:59 +00:00
Fouad be4708cc84 Merge pull request #1028 from nymtech/feature/ui-updates
Wallet UI updates
2022-01-13 15:45:36 +00:00
fmtabbara d5cddec03c merge develop 2022-01-13 15:36:06 +00:00
fmtabbara 7c26cab4e6 get updated mixnode details after bonding/unbonding txs 2022-01-13 15:32:29 +00:00
Bogdan-Ștefan Neacșu f0bcf8c36f Update wallet backend 2022-01-13 17:20:17 +02:00
Bogdan-Ștefan Neacșu ac2f0a172e Store multiple network values in one place 2022-01-13 17:20:17 +02:00
Bogdan-Ștefan Neacșu 898070bc87 Rename some defaults 2022-01-13 17:20:17 +02:00
Bogdan-Ștefan Neacșu cc707660aa Expose both default and specific network values 2022-01-13 17:20:17 +02:00
fmtabbara 31624cf4e4 fix Rust u128 -> TS BiInt issue 2022-01-13 11:22:04 +00:00
fmtabbara e6a69170a4 raise mixnodedetails to main context 2022-01-13 11:22:04 +00:00
Bogdan-Ștefan Neacşu bc5e19514e Remove migration code (#1027) 2022-01-13 11:59:56 +01:00
fmtabbara 5c76b8483e add new function to update profit percentage 2022-01-13 10:10:42 +00:00
fmtabbara a9526c216f [ci skip] Generate TS types 2022-01-12 21:49:08 +00:00
fmtabbara 903af16a6b update settings state 2022-01-12 21:39:12 +00:00
fmtabbara 0de79b6953 create fee component 2022-01-12 21:38:06 +00:00
fmtabbara fd2fafb52a [ci skip] Generate TS types 2022-01-12 20:39:36 +00:00
fmtabbara fadb5b4ff9 update ui and state 2022-01-12 20:30:56 +00:00
fmtabbara 955583d0f0 merge develop 2022-01-12 16:04:48 +00:00
Fouad 3924c53d09 Merge pull request #1014 from nymtech/feature/update-profit-percentage
update frontend to use new profit update api
2022-01-12 15:33:28 +00:00
fmtabbara c0025ee9c6 update getfee function 2022-01-12 15:30:47 +00:00
fmtabbara 7dd0516b63 only request when settings open 2022-01-12 14:07:46 +00:00
fmtabbara d3cd3c9157 Merge branch 'develop' into feature/update-profit-percentage
merge develop
2022-01-12 12:49:59 +00:00
fmtabbara 83680473e0 Merge branch 'develop' into feature/additional-node-details
merge develop
2022-01-12 11:38:08 +00:00
fmtabbara 7f9a9f7a0a update node icon 2022-01-12 11:03:48 +00:00
fmtabbara e7ccb38502 use fullwidth input 2022-01-12 10:13:44 +00:00
Bogdan-Ștefan Neacşu 1f4c19d396 Add network defaults for qa (#1017)
* Add network defaults for qa

* update contract addresses

- have not updated the bandwith credential address - currently vesting

Co-authored-by: Tommy Verrall <tommyvez@protonmail.com>
2022-01-12 09:56:20 +01:00
fmtabbara 64842f40d7 integrate with new api 2022-01-11 19:41:16 +00:00
fmtabbara 2ec18721fc Merge branch 'develop' into feature/ui-updates
merge develop
2022-01-11 18:14:11 +00:00
fmtabbara 2ef1ac452f fix bug - send from address not showing 2022-01-11 18:11:46 +00:00
Jędrzej Stuczyński 6b3700aefe Feature/expanded events (#1015)
* Expanded emitted events for delegation-related transactions

* Expanded emitted events for gateway-related transactions

* Expanded emitted events for mixnode-related transactions

* Expanded emitted events for settings update transaction

* Expanded emitted events for rewarding-related transactions

* Fixed attribute look up in tests

* Making linter happier

* Reorganised cosmwasm contract-related modules

* Introduced similar event handling to the vesting contract
2022-01-11 16:56:12 +00:00
Jędrzej Stuczyński e2e06df4e6 Feature/validator api client endpoints (#1024)
* Moved mixnode status route to node status api module

* Introduced validator-api endpoint for estimating mixnode's reward

* Stake saturation endpoint

* kebab-cased coconut routes

* Created separate crate for validator API models

* Additional routes in validator API client

* Introduced support for new queries in the wallet

* Typescript type derivation

* Fixed up date in license notice
2022-01-11 16:37:07 +00:00
Jędrzej Stuczyński 835d4f46f6 Introduced denom check when trying to withdraw vested coins (#1018)
* Introduced denom check when trying to withdraw vested coins

* Using correct denom in the relevant unit test
2022-01-11 16:31:39 +00:00
Jędrzej Stuczyński d71ef635e2 Restricted blake3 dependency (#1025) 2022-01-11 16:22:55 +00:00
Bogdan-Ștefan Neacşu 6e3773a095 Feature/remove unused profit margin (#1011)
* Remove unused field, to avoid confusion

* Add migration code

* Update tests

* Make clippy happy
2022-01-11 16:05:15 +01:00
mfahampshire 17a30be842 added mainnet gravity contract address 2022-01-11 14:42:33 +01:00
mfahampshire d785d621ec temporarily removed indexd string (in place of just string now) from emitted event in bandwidth generator 2022-01-11 14:36:03 +01:00
mfahampshire 904caca9de added mainnet deploy script + prettified contract addresses json 2022-01-11 13:43:46 +01:00
Jędrzej Stuczyński 050d370396 Updated cosmrs to 0.4.1 (#1023) 2022-01-11 11:26:34 +00:00
Jędrzej Stuczyński 29340ed00c Feature/additional mixnode endpoints (#1019)
* Moved mixnode status route to node status api module

* Introduced validator-api endpoint for estimating mixnode's reward

* Stake saturation endpoint
2022-01-11 09:38:39 +00:00
fmtabbara 2b062b3e5b add link to network explorer 2022-01-10 23:00:17 +00:00
fmtabbara b405adb9e5 add icons to card headers and balance padding 2022-01-10 22:36:12 +00:00
fmtabbara 5c3c0ac39e remove border lines and grey bg for card component 2022-01-10 21:17:47 +00:00
fmtabbara 1cc06ef349 update get_approx_fee to new function name _outdated_get_approx_fee 2022-01-10 17:31:43 +00:00
fmtabbara 2bef1603ab style updates 2022-01-10 17:27:01 +00:00
Mx 11a458a43d Merge pull request #1020 from RiccardoMasutti/patch-1
Fix 404 link
2022-01-10 18:00:58 +01:00
mfahampshire 55775b6e7b added args for verifying token deployed by gravity bridge 2022-01-10 16:05:45 +01:00
mfahampshire bb959544af extra logging for verification 2022-01-10 15:18:44 +01:00
mfahampshire f7853c5531 added args library for etherscan verification 2022-01-10 15:14:49 +01:00
mfahampshire e6d2626fd7 deployed gravity to rinkeby 2022-01-10 15:14:24 +01:00
mfahampshire 08a2bc5c8d updated scripts to be network specific 2022-01-10 14:44:14 +01:00
mfahampshire 6d09e6fa7c updated configs + dependencies 2022-01-10 14:43:48 +01:00
mfahampshire b1f4ae434a updated test to use test contract versions 2022-01-10 13:26:49 +01:00
mfahampshire 1647c368fb updates:
* pragma bump to 0.8.10
* updated gravity bridge contracts
* moved modified contracts to new 'test' dir for unit test clarity
2022-01-10 12:19:26 +01:00
Jędrzej Stuczyński 1fbf37e0ec Changed wallet's client to a full validator client (#1021)
So that it could use validator API calls in the near future
2022-01-10 11:17:08 +00:00
mfahampshire 1acdb0c519 updated scripts + gitignore 2022-01-10 11:23:20 +01:00
Riccardo Masutti bc8efda08f Add wallet build instructions
Added wallet link
2022-01-09 16:00:17 +01:00
Riccardo Masutti cecd0b2b0a Fix 404 link 2022-01-09 15:56:45 +01:00
Jędrzej Stuczyński 62fa2ae5e4 Feature/node state endpoint (#1013)
* Introduced route to check mixnode's status (active/standby/inactive/not_found)

* Restored default validator API caching interval to a more sane value

* Changed status route
2022-01-07 11:57:38 +00:00
fmtabbara db2ce8070c display mixnode update fee 2022-01-06 16:16:32 +00:00
fmtabbara 70138ff54a update frontend to use new profit update api 2022-01-06 13:00:50 +00:00
Bogdan-Ștefan Neacşu 30e93c33bb Feature/configure profit (#1008)
* Introduce a method to update mixnode configuration

Right now, only for profit_margin_percent

* Check that the new profit margin is valid

* Extend a bit the test coverage of mixnode update

* Create validator client function

* [ci skip] Generate TS types

* Update wallet

* Update the bond height as well, as if a rebond was made

Co-authored-by: neacsu <neacsu@users.noreply.github.com>
2022-01-06 13:03:14 +01:00
Jędrzej Stuczyński ec4955f814 Feature/explorer node status (#1010)
* Restored mixnode refresh rate to a more sane value

* Moved PrettyMixNodeBondWithLocation to models.rs

* Renaming

* Exposed ability to query for rewarded mixnodes in the validator client

* Reorganised mix_nodes module

* Determining mixnode status (active/standby/inactive)

* Moved LocationCache to separate lock

* Minor cleanup

* Changed serialization case of status enum

* Made clippy happier

* Slightly better grammar
2022-01-06 10:38:14 +00:00
Drazen Urch e013517348 Use serial integer instead of random (#1009)
* Use serial integer instead of random

* [ci skip] Generate TS types

* cargo fmt

* Return u32
2022-01-05 15:28:17 +01:00
Bogdan-Ștefan Neacșu 2041b03046 Missed takes_value() call 2022-01-04 17:12:41 +01:00
Bogdan-Ștefan Neacşu 0b6adf59ce Feature/fix gateway sign (#1004)
* Include version check in sign command

* Ask for wallet address the same way as mixnode

The reason for this is that the cosmos mnemonic that is asked at
init is for the address that gets rewarded for gateway usage.
Since that address is not necessarly set now and it can take a
default value, we won't be using that to derive the address in the
signing process.
2022-01-04 13:49:24 +01:00
Jędrzej Stuczyński d95df4b286 Feature/implicit runtime (#973)
* Made mixnode runtime implicit

* Ibid for native and socks5 clients
2022-01-04 11:00:48 +00:00
Bogdan-Ștefan Neacşu 4f109169af Fix clippy (#1003) 2022-01-03 14:32:37 +01:00
Bogdan-Ștefan Neacșu 0cef1abbb2 Update mixnode version 2021-12-23 15:05:11 +02:00
Tommy Verrall 1871c6b2e3 Merge pull request #998 from nymtech/feature/wallet-update-version
Update wallet version
2021-12-23 10:01:13 +00:00
Tommy Verrall 75ad2a113f Update wallet version
- keep all the binaries aligned
2021-12-23 10:00:13 +00:00
Bogdan-Ștefan Neacşu 1d1496aa49 Make the separation between testnet-mode and erc20 bandwidth mode clearer (#994)
* Make the separation between testnet-mode and erc20 bandwidth mode more clear

* Update Cargo.toml

* Remove eth bw from native client under a feature flag

* Remove eth bw from socks5 client under a feature flag

* Remove eth bw from gateway under a feature flag

* Update gateway version

* Fix coconut build warnings
2021-12-23 11:55:01 +02:00
Tommy Verrall a48e06fe51 Fix wallet build instructions (#997)
* Fix wallet build instructions

- Supplying the .env file requirement

* re-added the admin - address
2021-12-23 11:54:34 +02:00
Drazen Urch 614b99a36e Differentiate staking and ownership (#961)
* Differentiate staking and ownership

* Ownership transfer, tests

* Consistent random keys

* Improve account tests

* Update Cargo.lock

* Make everybody happy

Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-12-22 13:22:46 +01:00
dependabot[bot] d8cb6199e0 Bump @openzeppelin/contracts in /contracts/basic-bandwidth-generation (#983)
Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 3.4.0 to 4.4.1.
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/OpenZeppelin/openzeppelin-contracts/compare/v3.4.0...v4.4.1)

---
updated-dependencies:
- dependency-name: "@openzeppelin/contracts"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-22 11:42:37 +01:00
Tommy Verrall 424c1695b3 Merge pull request #991 from nymtech/feature/change-wallet-version
Update wallet to align with versioning on nodes and gateways
2021-12-21 11:39:12 +00:00
Tommy Verrall 3ceb6d711f Update wallet to align with versioning on nodes and gateways 2021-12-21 11:38:13 +00:00
Dave Hrycyszyn 23d2279549 Merge branch 'develop' of github.com:nymtech/nym into develop 2021-12-21 11:21:28 +00:00
Dave Hrycyszyn 84d1909b18 Changelog for v0.12.0 2021-12-21 11:21:20 +00:00
Dave Hrycyszyn 29a22e95e6 Adding github_changelog_generator config files 2021-12-21 11:21:00 +00:00
Jess 0e0f9ed270 Update README.md 2021-12-21 10:34:29 +00:00
Jess 4c0c0bc49f Update README.md 2021-12-21 10:33:32 +00:00
Tommy Verrall ea350ef7dd Merge pull request #990 from nymtech/feature/fix-success-text
Fix success view messages.
2021-12-21 10:16:41 +00:00
Bogdan-Ștefan Neacșu 112820ad7b Fix rebase going wrong 2021-12-21 12:15:07 +02:00
Tommy Verrall fe27cbe7e2 Fix success view messages. 2021-12-21 10:07:35 +00:00
Bogdan-Ștefan Neacșu bd892e00bd Switch to sandbox as default build 2021-12-21 11:16:30 +02:00
Dave Hrycyszyn 8d2863e085 Back down on caching and we're good to redeploy 2021-12-20 18:01:19 +00:00
Dave Hrycyszyn 89cb931775 Cranking caching back up 2021-12-20 17:25:29 +00:00
Dave Hrycyszyn 0f58fb6437 Cutting client-side caching from 3.5 minutes to 5 seconds 2021-12-20 16:40:26 +00:00
Dave Hrycyszyn 837575c8d3 Knocking down cache interval some more 2021-12-20 15:19:48 +00:00
Dave Hrycyszyn 4cbe789f42 Merge branch 'develop' of github.com:nymtech/nym into develop 2021-12-20 15:13:29 +00:00
Dave Hrycyszyn 822c993f24 Setting cache to 2 seconds for explorer api 2021-12-20 15:13:22 +00:00
Bogdan-Ștefan Neacşu 9480233ca3 Feature/enable signature check (#989)
* Revert "Do not set proxy only for this time"

This reverts commit 47946ad79e.

* Reinstate signature check

* Enable migrate entry point
2021-12-20 16:09:42 +02:00
Dave Hrycyszyn 72944905cd Knocking down cache validation time 2021-12-20 14:08:49 +00:00
Dave Hrycyszyn effb756e2f Setting mixnode cache refresh to 30 seconds 2021-12-20 14:07:40 +00:00
Dave Hrycyszyn 583f5083e5 Merge branch 'develop' of github.com:nymtech/nym into develop 2021-12-20 14:00:04 +00:00
Dave Hrycyszyn 941e91d250 Re-enabling owner signature form on settings page 2021-12-20 13:59:52 +00:00
Bogdan-Ștefan Neacşu 0f1b9d138e Update mixnet contract address (#988) 2021-12-20 15:52:34 +02:00
mfahampshire 265696103c updated env sample 2021-12-20 13:58:38 +01:00
Bogdan-Ștefan Neacşu 22ce25d821 Fix verloc print (#987) 2021-12-20 12:52:32 +02:00
Dave Hrycyszyn 363f784714 Changing build command to match readme 2021-12-20 10:51:47 +00:00
Dave Hrycyszyn 1f360a5a27 Knocking validator-api refresh interval to 30 seconds 2021-12-20 10:36:43 +00:00
Dave Hrycyszyn ea3f2e9beb Moving country data refresh interval 15 minutes again 2021-12-20 10:35:04 +00:00
Dave Hrycyszyn 84924133b5 Knocking down the mixnode refresh interval to 30 seconds 2021-12-20 10:30:45 +00:00
Dave Hrycyszyn 860afc9086 Removing unused signing test module 2021-12-20 09:30:36 +00:00
Dave Hrycyszyn 0aab508633 Removing Dalek stuff, jst has already built this using cw apis 2021-12-19 16:18:08 +00:00
Dave Hrycyszyn bdfce8f663 Merge branch 'develop' of github.com:nymtech/nym into develop 2021-12-19 15:55:20 +00:00
Dave Hrycyszyn b5bb09588d Fixing Cargo.lock 2021-12-19 15:55:13 +00:00
Dave Hrycyszyn 983322d273 Feature/refactor mixnet contract test helpers (#986)
* Refactored test helpers

* Renaming mixnode "bond" coins to "pledge"

* Renaming gateway "bond" coins to "pledge"

* ibid

* Commenting out new tests, they will go in next PR
2021-12-19 15:54:11 +00:00
Dave Hrycyszyn e761989c6a Making the terminology consistent between mixnode/gateway output and … (#985)
* Making the terminology consistent between mixnode/gateway output and wallet display

* [ci skip] Generate TS types
2021-12-18 13:12:10 +00:00
futurechimp bc981873ff [ci skip] Generate TS types 2021-12-18 12:54:44 +00:00
Dave Hrycyszyn 8e99ae8979 Feature/add wallet to gateway init (#984)
* Moving sign_text method into common/crypto to dry it up

* Moved bech32 address validation into common/crypto

* ibid

* Gateway now requires a --wallet-address arg on init
2021-12-18 12:45:55 +00:00
Dave Hrycyszyn ed2b515a83 Feature/add wallet address to init (#982)
* Add a --wallet-adress parameter to init

* Rearranging signing code locations

* A bit more refactoring

* ibid

* Exiting if the stored bech32 address isn't valid at node start

* A few docs comments

* Moved crypto crate up to root src level

* Friendlier startup messages for node verification code

* Switching punk and nymt addresses in test
2021-12-18 10:44:30 +00:00
Fouad aca31dbaac Feature/wallet settings area (#974)
* set up Settings component

* Update network defaults

* Short node identity signature check

Fix tests

* Do not set proxy only for this time

* Update contract addresses

* file restructure

* file updates

* add settings tab panels

* update them color for nym fee

* rework layout

* update bond form to include signature and profit percent

* create info tooltip + make status component optional

* fix overflow

* update sys vars tab

* get mixnode bond details

* use mixnode id in settings

* set up profit percentage value on sys vars tab

* profit percentage styling

* add fix for delegations list

* fix unbond UI bug

* minor style updates

* dont allow profit percent on gateway bonding

* webpack prod fix

* update profit percentage from settings area

* hardcode signature for profit percentage update

Co-authored-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-12-18 07:54:53 +00:00
Mx f8fb6f524e Move cleaned up smart contracts to main code repo (#929)
* moved contracts from gitlab to main codebase

* added missing event param

* removed erroneous  from description

* updates:
* changed maths of token -> MB conversion
* new tests for changed maths
* length check on cosmos address
* begun code doc

* code documentation

* small comment cleanup

* cont. w tests, may have found bug in maths re: using not whole tokens: investigating

* finished code doc

* included requested changes to contract

* change to maths operations, shrunk test error to < .9

* updates:
* updated tests
* updated readme

* removed commented out code, changed variable name to be more informative

* removed unnecessary byte32 length check
2021-12-18 01:32:47 +00:00
Bogdan-Ștefan Neacşu 036369226b Bump version to 0.12.0 (#980) 2021-12-18 01:13:30 +00:00
Bogdan-Ștefan Neacşu 4972ad8c53 Feature/rename erc20 (#979)
* Rename erc20-bridge to bandwidth-claim

* Rename contract constant in network defaults
2021-12-18 01:13:11 +00:00
Dave Hrycyszyn a09581eea9 Removed web wallet (#978) 2021-12-18 01:09:57 +00:00
Tommy Verrall 4d447706fc Update message to bond mixnode (#981)
- This prevents the user navigating to the deprecated web-wallet.
2021-12-17 17:51:07 +00:00
Jędrzej Stuczyński 6c6e16035a Feature/optional bandwidth bypass (#965)
* Removed outdated constant

* ClaimFreeTestnetBandwidth ClientControlRequest

* Configuration option for the testnet mode in gateway

* Made testnet mode deserialize to default value if not present

* Fixed testnet mode override

* Testnet config options for clients and validator api

* Changed error message for when gateway is not using testnet mode

* Incorporated testnet mode into gateway client

* Activating testnet mode based on config values

* Allowing clippy warnings

* Fixed use of moved value in wasm build

Co-authored-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-12-17 18:55:33 +02:00
Tommy Verrall 96aa814a61 Merge pull request #977 from nymtech/bugfix/network-explorer-uptime-graph
Network Explorer: fix uptime history display to use new API response
2021-12-17 14:30:04 +00:00
Mark Sinclair 1fbf437786 Network Explorer: fix uptime history display to use new API response 2021-12-17 13:41:41 +00:00
Bogdan-Ștefan Neacşu 852d12b440 Make develop branch agnostic of the network (#976)
* Make develop branch agnostic of the network

* Update network defaults

* Short node identity signature check

Fix tests

* Do not set proxy only for this time

* Update contract addresses

* Network Explorer: configure URLs with `.env` file

* Network Explorer API improvements:
- upgrade `okapi` for swagger generation across multiple resources
- switched `GET mix-node` to `GET mix-nodes`
- added error message when no geolocation env var is set and process continues

* Network Explorer improvements:
- fix up API urls after Network Explorer API changes
- set currency denominations in `.env` file
- set API endpoints in `.env` file

* Network Explorer: change prod env to round robin DNS

* Update test

Co-authored-by: Mark Sinclair <mmsinclair@gmail.com>
2021-12-17 15:36:35 +02:00
Bogdan-Ștefan Neacşu 865759254f Fix windows fmt (#975) 2021-12-17 13:23:44 +02:00
Fouad 0a30eb1c64 Merge pull request #968 from nymtech/feature/new-testnet-wallet-updates
Feature/new testnet wallet updates
2021-12-16 16:08:32 +00:00
Bogdan-Ștefan Neacşu 63bb35e1a1 Use the renamed balance function (#971) 2021-12-16 17:36:50 +02:00
Jędrzej Stuczyński c1e809fd99 Feature/ts client update (#956)
* Made client compile again + set auto fees

* Simplified client construction by allowing only a single URL

* wip

* Simplified signing assertion

* Initial implementation of queries

* Implemented all basic nymd queries

* Validator API queries

* Signing related queries

* Using default arguments

* Removed redundant else branches

* `eslint` and `prettier` formatting on Typescript validator client

* Removed cyclic import on Coin type

* Missing direct dependencies

* Ingoring cyclic imports

* Removed unused argument

Co-authored-by: Mark Sinclair <mmsinclair@gmail.com>
2021-12-16 15:35:30 +00:00
Jędrzej Stuczyński 77ab22999c Feature/node info command (#972)
* Removed code duplication and introduced node-details command for mixnode

* ibid for the gateway

* Added port information
2021-12-16 14:55:03 +00:00
Bogdan-Ștefan Neacşu 747bf85ad8 Add custom denom balance query (#957)
* Add custom denom balance query

* Apply PR comment
2021-12-16 13:59:08 +02:00
Jędrzej Stuczyński cf4eadaa6b Introduced 'version' command to all relevant binaries (#969)
* Introduced 'version' command to all relevant binaries

* Removed separate 'version' subcommand in favour of clap's 'long_version' field
2021-12-16 11:48:50 +00:00
Jędrzej Stuczyński f43f07f0b9 Fixed invalid nodes being counted twice in unroutable category (#963) 2021-12-16 10:58:57 +00:00
fmtabbara c5cf7d19a3 add sample env 2021-12-16 10:10:39 +00:00
fmtabbara 7d7911c8e8 merge develop 2021-12-16 10:09:23 +00:00
Fouad 40d93e1eeb Merge pull request #964 from nymtech/feature/bond-details-handlers
Additional tauri commands to get bond details
2021-12-15 16:53:58 +00:00
Jędrzej Stuczyński 2f472c4e8e Additional tauri commands to get bond details 2021-12-15 16:05:31 +00:00
Bogdan-Ștefan Neacşu c93f3cfc4f Fix topology log (#962) 2021-12-15 13:19:34 +02:00
Mark Sinclair 87d18bbc16 Merge pull request #960 from nymtech/feature/network-explorer-ui-config
Network Explorer: configure URLs with `.env` file
2021-12-15 10:37:47 +00:00
Mark Sinclair 45ed46afa0 Network Explorer: add prod config 2021-12-15 10:14:41 +00:00
Mark Sinclair 9619e794b2 Network Explorer: configure URLs with .env file 2021-12-14 16:06:02 +00:00
Drazen Urch 305864aa0f Feature/vesting to wallet (#954)
* Better code structure, proper error handling, VestingSigningClient for wallet

* Add vesting contract queries to wallet

* Address review comments

Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-12-14 12:25:48 +01:00
Jędrzej Stuczyński 8f152d42f0 Feature/simulate (#950)
* Raw scaffold for tx simulate

* Proper error handling in AbciResult parsing

* Simulate without actual signing operation

* Moved all-fee related functionalities to separate module

* Adding GasInfo to transaction results

* Automated gas estimation

* Slightly adjusted public API

* Using auto fees in eth events

* Removed old print statement

* Reorganised nymd client fee handling

* Put bandaid on wallet gas estimation

* Fixed operation re-export

* warning note on get_approximate_fee

* [ci skip] Generate TS types

* Refactored ProtoAbciResult parsing

* Explicit error on abci query failure

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-12-14 09:28:15 +00:00
fmtabbara 140cc3f769 correct profitPercent variable name 2021-12-13 21:11:12 +00:00
Drazen Urch 791d051537 Different workshare calculations for rewarded vs active set (#951)
* Add Makefile to make running all checks easier locally

* Different workshare calculation for active vs rewarded set

* Rework omega calculation, update tests

* Remove ZERO const

* unym -> DENOM

Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-12-13 19:11:54 +01:00
Jędrzej Stuczyński f8099cb8c8 Bugfix/rewarding fixes (#953)
* Improved rewarding-related log messages

* Skipping empty mixnode chunks
2021-12-13 15:43:02 +00:00
fmtabbara 2045d0bafd update new fields 2021-12-13 15:26:35 +00:00
fmtabbara e68b48f296 use config so that env vars can be destructured 2021-12-13 14:39:26 +00:00
fmtabbara 3a2b553e38 use variable for currency 2021-12-13 13:04:17 +00:00
fmtabbara aa1955dc6b update webpack configs 2021-12-13 13:03:23 +00:00
Tommy Verrall f1e995b076 Merge pull request #947 from nymtech/feature/wallet-ui-updates-round-2
Desktop Wallet UI Updates
2021-12-13 11:11:30 +00:00
Bogdan-Ștefan Neacşu ed1fe22db2 Check the response for multiple sends (#955) 2021-12-10 09:22:37 +01:00
dependabot[bot] b1c45dc0f8 Bump next from 11.1.1 to 11.1.3 in /wallet-web (#952)
Bumps [next](https://github.com/vercel/next.js) from 11.1.1 to 11.1.3.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v11.1.1...v11.1.3)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-09 09:25:25 +00:00
Drazen Urch 0e0151f781 Feature/profit margin percent config (#949)
* Profit margin percent to config, fix vesting tests

* Add bonding bounds check

* Fix contract test
2021-12-08 20:17:31 +01:00
Drazen Urch 70e148b3ed Run CI for all contracts in one workflow (#948)
* Run CI for all contracts in one workflow

* Rename

* Fix vesting tests
2021-12-08 16:15:18 +01:00
fmtabbara 53138d6292 link to transaction hash 2021-12-07 22:39:13 +00:00
fmtabbara 39650de2bd style update 2021-12-07 21:46:02 +00:00
fmtabbara 7b04093cc5 style updates 2021-12-07 21:24:16 +00:00
fmtabbara a4c9a81399 refresh balance on balance page visit 2021-12-07 21:06:29 +00:00
Drazen Urch f42f76901a Add VestingExecute and VestingQuery client traits (#944)
* Add VestingExecute and VestingQuery client traits

* cover ed25519 verification

* cargo fmt

* `Unix` newline-style

* Remove newline force

Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-12-07 19:56:10 +01:00
fmtabbara 875bcb4e63 update bonding success UI 2021-12-07 13:42:23 +00:00
fmtabbara fa62de5bc6 undelegate page update 2021-12-07 13:17:46 +00:00
fmtabbara 5c3b08e1cd update delegate page 2021-12-07 12:36:21 +00:00
Tommy Verrall 745af89019 Merge pull request #946 from nymtech/feature/docker-updates
Docker updates
2021-12-07 11:53:37 +00:00
Tommy Verrall eb0fb90127 update arg for commit hash 2021-12-07 11:45:46 +00:00
Tommy Verrall 527d5a5d9b update 2021-12-07 11:25:03 +00:00
Tommy Verrall 2dfa0a9d2a update 2021-12-07 11:23:44 +00:00
Tommy Verrall d9bfa4562e Update docker-files
- updated the network explorer
- updated new vesting contract
- updated the version of comos-sdk to be used
2021-12-07 11:22:57 +00:00
Jędrzej Stuczyński aec0239d87 Removed reliance on cosmrs fork (#943)
* Removed reliance on cosmrs fork

* Removed the accidental optional flag on cosmrs import in the wallet
2021-12-07 11:04:32 +00:00
Jędrzej Stuczyński a2324f98f8 Feature/identity verification (#930)
* Base58 representation of ed25519 signature

* Helper for verifying ed25519 signature on sender address

* Signature verification for gateway bonding

* Signature verification for mixnode bonding

* Added owner signatures for bonding in vesting contract

* Fixed choosing mixnode layer test

* Added owner signature fields to nymd client for bonding

* 'Updated' tauri wallet with new bond requirements

* Mixnode sign command with extra address validation

* Sign command for the gateway

* Signing own gateway's address derived with known mnemonic in not(coconut) case

* Fixed imports post-merge
2021-12-07 10:28:44 +00:00
fmtabbara 001d166477 update bond page 2021-12-07 10:23:37 +00:00
fmtabbara bb14e95e61 update send page 2021-12-06 17:32:29 +00:00
Jędrzej Stuczyński 5aa1c29409 Feature/terminology update (#941)
* Corrected used bond/pledge terminology

* ibid for the wallet and explorer

* [ci skip] Generate TS types

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-12-06 16:30:55 +00:00
Bogdan-Ștefan Neacşu db111490b6 Check the response for other transactions as well (#937) 2021-12-06 17:21:11 +01:00
Jędrzej Stuczyński fe0bb007c9 Don't reset total delegation on mixnode rebond (#940) 2021-12-06 17:20:41 +01:00
Tommy Verrall ddad6d73db Merge pull request #934 from nymtech/feature/client_on_behalf
Feature/client on behalf
2021-12-06 15:33:24 +00:00
fmtabbara 35c04014e5 undo hard-coded data 2021-12-06 15:32:09 +00:00
fmtabbara 138daddfed add custom nav icons 2021-12-06 15:21:34 +00:00
fmtabbara ab3cfe79bc use svgs as React components with svgr 2021-12-06 12:57:46 +00:00
fmtabbara 9fcf3105e0 balance page updates 2021-12-06 10:41:41 +00:00
fmtabbara 51bf117007 fix memory leak 2021-12-06 10:24:44 +00:00
Jędrzej Stuczyński a04d4503b5 Feature/pre cosmrs updates (#935)
* Updated nymd client

* Fixed contract upload and initialisation

* Increased default contract upload fee

* [ci skip] Generate TS types

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-12-06 09:25:53 +00:00
neacsu 9fb44f9672 [ci skip] Generate TS types 2021-12-03 18:16:55 +00:00
Bogdan-Ștefan Neacșu f542c28e89 Batching for sends 2021-12-03 19:05:21 +01:00
Bogdan-Ștefan Neacșu b809eb6c5f Batch delegations on behalf as well 2021-12-03 16:06:23 +01:00
Bogdan-Ștefan Neacșu 51e82fe930 Add gateway bond on behalf functions 2021-12-03 15:25:47 +01:00
Bogdan-Ștefan Neacșu 67f847e674 Add batched delegated mixnode bonds 2021-12-03 15:02:39 +01:00
Bogdan-Ștefan Neacșu d4736bac27 Fix gas for operations 2021-12-03 15:02:19 +01:00
Bogdan-Ștefan Neacșu 6417feaaed Fix clippy 2021-12-03 15:02:19 +01:00
Bogdan-Ștefan Neacșu 718170c651 Update tauri client 2021-12-03 15:02:19 +01:00
Bogdan-Ștefan Neacșu c10038e688 Add client-side Operations as well, in case fees need to be modified 2021-12-03 15:02:19 +01:00
Bogdan-Ștefan Neacșu 2f68439916 Unbond/undelegate mixnode with rust client 2021-12-03 15:02:19 +01:00
Bogdan-Ștefan Neacșu b175480ba5 Bond/delegate mixnode with rust client 2021-12-03 15:02:19 +01:00
Bogdan-Ștefan Neacșu 34c9726ac9 Add vesting contract address to validator client library 2021-12-03 15:02:19 +01:00
Bogdan-Ștefan Neacșu 11b2a7ad3d Rename contract_address to mixnet_contract_address 2021-12-03 15:02:19 +01:00
Drazen Urch 18978c7599 Merge branch 'develop' of https://github.com/nymtech/nym into develop 2021-12-03 10:14:59 +01:00
Drazen Urch 8e52a70685 Update vesting image 2021-12-03 10:14:47 +01:00
Drazen Urch 1f42ce57e3 Allow proxy gateway bonding (#936)
* Allow proxy gateway bonding

* Update msg text

Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-12-02 18:16:26 +01:00
Dave Hrycyszyn 231fba34bc Spelling fix in variable name 2021-12-02 13:15:55 +00:00
Dave Hrycyszyn 0e05fc46c9 Merge remote-tracking branch 'origin/develop' into develop 2021-12-02 13:13:24 +00:00
Dave Hrycyszyn 52777efc53 Tiny spellcheck fix in comment 2021-12-02 13:13:03 +00:00
Jędrzej Stuczyński 54bc198885 Feature/mixnet contract further adjustments (#928)
* Upgraded code to be cosmwasm 1.0-beta.2 compatible (#923)

* Upgraded code to be cosmwasm 1.0-beta.2 compatible

* [ci skip] Generate TS types

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>

* Feature/cosmwasm plus storage (#924)

* Upgraded code to be cosmwasm 1.0-beta.2 compatible

* Added cw-storage-plus dependency

* Experimentally replaced storage for config and layers with cw plus Item

* The same for main mixnode storage

* Usingn IndexedMap for mixnodes

* Split delegations from mixnodes into separate module

* MixnodeIndex on Addr directly

* Moved namespace values to constants

* Outdated comment

* [ci skip] Generate TS types

* Removed redundant identity index on mixnodes

* IndexMap for gateways storage

* Moved total delegation into a Map

* Compiling contract code after delegation storage upgrades

Tests dont compile yet and neither, I would assume, the client code

* Delegation type cleanup

* Client fixes

* Migrated delegation tests + fixed them

* Moved Rewarding Status to rewards

* Reward pool

* Rewarding status migrated

* Made clippy happier

* Added explorer API to default workspace members

* Updated delegation types in explorer-api

* Fixed tauri wallet

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>

* Missing license notices

* Dead code removal

* Changed RewardMixnodeV2 to RewardMixnode

* Adjusted module visibility

* Setting rewarding validator address in init msg

* ContractSettings => ContractState

* Transaction-related cleanup

* Changed ownership queries to return full bond information instead of just a bool

* Function for updating post rewarding storage

* Changed the order of arguments in decrementing reward pool

* Helpers for updating storage after rewarding

* Removed redundant turbofish

* [ci skip] Generate TS types

* Changed bond/delegation validation

* Made clippy happier

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-12-02 12:16:16 +00:00
Tommy Verrall 577c5dc1ee Merge pull request #933 from nymtech/test/webpack-wallet
Webpack wallet prod configuration
2021-12-02 10:16:51 +00:00
Dave Hrycyszyn 7927846390 Merge branch 'develop' of github.com:nymtech/nym into develop 2021-12-02 10:12:09 +00:00
Dave Hrycyszyn e41f02ad0d Tiny readme fixup 2021-12-02 10:12:01 +00:00
tommyv1987 e57a5b73a2 [ci skip] Generate TS types 2021-12-02 09:54:58 +00:00
Tommy Verrall 608de11377 Merge pull request #932 from nymtech/feature/add-tx-hash-to-wallet-result
Adding tx_hash to wallet response
2021-12-02 09:44:54 +00:00
futurechimp b88153a2bd [ci skip] Generate TS types 2021-12-01 18:30:05 +00:00
Tommy Verrall 0fd2f946dc dev 2021-12-01 18:23:46 +00:00
Dave Hrycyszyn c5cdbd5bfe Params formatting 2021-12-01 18:23:11 +00:00
Tommy Verrall 3c05cf29e6 fix duplication 2021-12-01 18:22:07 +00:00
futurechimp 6cb58d1f1c Adding tx_hash to wallet response 2021-12-01 18:19:14 +00:00
Tommy Verrall 5727ac5161 minor changes, due to windows complaining on builds. 2021-12-01 18:00:47 +00:00
Tommy Verrall 804f254e16 Compiler complains...
The compiler complains, however, these references are needed to enabled menu actions on mac builds.
2021-12-01 17:30:54 +00:00
Tommy Verrall f03ce6e07b fix typo 2021-12-01 17:11:23 +00:00
Tommy Verrall 2631ed4d0c Add prod config for the wallet
When supplying `production` as the mode in the config for webpack, it complains about an unmet dependency issue with fav-icons. Then trying to supply a favicon.ico, returns a mimetype error. By using a png in alignment to the .ico. It builds. Tested on Linux.
2021-12-01 17:06:47 +00:00
Tommy Verrall 0f93dde8fc Merge pull request #925 from nymtech/feature/ui-enhancements
Feature/UI enhancements for Desktop Wallet
2021-12-01 14:47:21 +00:00
Drazen Urch eb93b428cf Release/1.0.0 pre1 (#931)
* Upgraded code to be cosmwasm 1.0-beta.2 compatible (#923)

* Upgraded code to be cosmwasm 1.0-beta.2 compatible

* [ci skip] Generate TS types

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>

* Feature/cosmwasm plus storage (#924)

* Upgraded code to be cosmwasm 1.0-beta.2 compatible

* Added cw-storage-plus dependency

* Experimentally replaced storage for config and layers with cw plus Item

* The same for main mixnode storage

* Usingn IndexedMap for mixnodes

* Split delegations from mixnodes into separate module

* MixnodeIndex on Addr directly

* Moved namespace values to constants

* Outdated comment

* [ci skip] Generate TS types

* Removed redundant identity index on mixnodes

* IndexMap for gateways storage

* Moved total delegation into a Map

* Compiling contract code after delegation storage upgrades

Tests dont compile yet and neither, I would assume, the client code

* Delegation type cleanup

* Client fixes

* Migrated delegation tests + fixed them

* Moved Rewarding Status to rewards

* Reward pool

* Rewarding status migrated

* Made clippy happier

* Added explorer API to default workspace members

* Updated delegation types in explorer-api

* Fixed tauri wallet

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>

* Vesting contract (#900)

* Initial interface spec

* .gitignore

* Finalize implementation

* Correct assumptions, use wasm_execute

* Cleanup

* Track delegation balance

* Add delegation flow img

* Proper messaging from the vesting side

* Add proxy_address to RawDelegationData

* Wrap up (un)delegation

* Add proxy: Addr to MixNodeBond

* Stub in bonding/unbonding

* Migrate vesting to cosmwasm 1.0

* Rebase on top of 1.0.0-pre1

* Reimplement delegations tracking with a Map

* Migrate to cw-storage-plus

* Restructure code, add tests

* Streamline contract code, as per review

* Address review comments

* Pre-merge rebase

* Few more nits

* Few more nits

* Fix test

* cargo fmt

* Fix beta CI

Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>

Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-12-01 15:42:34 +01:00
fmtabbara 04b6f83d99 pr updates 2021-12-01 12:35:41 +00:00
fmtabbara f5612cc64b update large button height 2021-11-30 13:39:51 +00:00
fmtabbara d525563a46 link to block explorer 2021-11-30 13:11:51 +00:00
fmtabbara 560b306d32 update admin nav item style 2021-11-30 10:08:29 +00:00
fmtabbara a4a4da1121 style updates 2021-11-29 22:31:11 +00:00
fmtabbara d69cb47c6c style updates 2021-11-29 22:11:28 +00:00
Aid19801 3e93b4ffd5 Merge pull request #926 from nymtech/copy-change-nodemap
typo copy change for nodemap
2021-11-29 13:15:22 +00:00
Aid Thompson 6da660623b typo copy change for nodemap 2021-11-29 13:09:13 +00:00
fmtabbara a85a67199a theme tweaks 2021-11-29 09:52:00 +00:00
fmtabbara 09b6d37ca6 [ci skip] Generate TS types 2021-11-27 22:59:48 +00:00
fmtabbara 4029b1b830 resolve conflict 2021-11-27 22:50:13 +00:00
fmtabbara e075759461 add tooltip hide delay 2021-11-27 22:36:16 +00:00
fmtabbara 1069032cd7 remove unecessary fullscreen property 2021-11-27 22:29:17 +00:00
fmtabbara b97b7410da update balance page 2021-11-27 22:15:57 +00:00
fmtabbara f259012faf update copy component 2021-11-27 22:15:42 +00:00
fmtabbara c00cdafc8c update getBalance hook name 2021-11-27 22:15:13 +00:00
fmtabbara 82c56351de add appbar component 2021-11-27 22:14:04 +00:00
Dave Hrycyszyn 5eeb55aa78 Fixing some clippy warnings (#922)
Co-authored-by: dave <dave@nym-mbp.lan>
2021-11-26 12:51:41 +00:00
Dave Hrycyszyn 94357c6132 Fixing go warning re unused btc lib (#921)
* Fixing go warning re unused btc lib

* Removed commented code

Co-authored-by: dave <dave@nym-mbp.lan>
2021-11-26 12:51:01 +00:00
Mark Sinclair 77c5296c39 testnet-faucet: fix line break in destructuring 2021-11-26 11:57:37 +00:00
Aid19801 6ee5b68b46 Merge pull request #920 from nymtech/nodemap-responsiveness
quick fix adding dimensions to nodemap page for consistency
2021-11-26 10:47:40 +00:00
Aid Thompson 56fa48215b changed country names from official to their aliases to fit in cells 2021-11-26 10:15:59 +00:00
Aid Thompson 26b0d9555f quick fix adding dimensions to nodemap page for consistency 2021-11-26 07:41:58 +00:00
fmtabbara 61a67ac334 add new sign in and create account pages 2021-11-25 23:22:14 +00:00
fmtabbara c2e268a1c9 update app layout to use mui v5 system 2021-11-25 23:21:19 +00:00
fmtabbara cfd0b7868a refine copytoclipboard component 2021-11-25 17:41:35 +00:00
fmtabbara 69b52ae629 new styling + new signin and create account pages 2021-11-25 17:41:15 +00:00
Mark Sinclair e2302466cc Use network explorer map data with disputed areas
See https://github.com/zcreativelabs/react-simple-maps/issues/251 and https://github.com/nvkelso/natural-earth-vector/issues?q=is%3Aissue+crimea+is%3Aclosed
2021-11-25 16:16:26 +00:00
Jędrzej Stuczyński c361de62a5 Introduces query for contract build information (#919)
* Introduces query for contract build information

* Removed temporary test garbage

* Removed unused imports in validator-client if built without nymd-client feature
2021-11-25 15:17:56 +00:00
fmtabbara 7d3d0d8874 upgrade to mui v5 2021-11-25 14:35:26 +00:00
Jędrzej Stuczyński 39c7b131b6 Bugfix/remove mixnode bonding overwrite (#917)
* Disallow double bonding

* Adjusted test assertions
2021-11-25 10:27:31 +00:00
dependabot[bot] 4071a20bb5 Bump nth-check from 2.0.0 to 2.0.1 in /nym-wallet (#918)
Bumps [nth-check](https://github.com/fb55/nth-check) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/fb55/nth-check/releases)
- [Commits](https://github.com/fb55/nth-check/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: nth-check
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-25 10:16:14 +00:00
Tommy Verrall b4519cd77e Merge pull request #911 from nymtech/feature/faucet-page-react
Feature/faucet page react
2021-11-25 09:59:54 +00:00
Dave Hrycyszyn 35748e07c4 Feature/mixnet contract refactor (#910)
* Starting a refactor to cut the huge files into chunks

* Fixing some lints

* ibid

* Mixnode and gateway bonding tests moved

* All transaction test moved into submodules

* Finished splitting out transactions.rs from root into submodules.

* Moved mixnet params state into submodule

* Recombined modules for few top-level actions

* Moving mixnode bonding queries into their own file

* Removed some unused imports

* Got tests running again. Max limit tests not right.

* Fixed tests

* Started moving delegation queries into own module

* Finished moving delegation queries into their own module

* Cleanup

* Moving query limits into relevant modules

* Putting query limits back at top-level

* Using prefix to make storage usage a little more explicit

* Separating storage into smaller chunks

* More storage refactoring

* Finished moving all storage into modules

* Moved all storage prefixes into relevant modules and made them not-public

* Renamed the mostly-empty queries module to query_support

* ibid

* Fixed query support rename problems

* Started to move rewards-related helpers into their own module

* Started moving delegations-related helpers into their own module

* Moved more code from global helpers into delegations helpers

* Moved all remaining test helper code from main helpers file into test helpers

* Made use of test_helpers explicit via a module rename.

Also got rid of non-explicit usages

* Moved mixnode storage retrieval limits into mixnodes storage module

* Moved bond retrieval max limit into storage moduel

* Moved more storage limits into mixnodes storage file; fixed a gateways limit test.

* Added a note on gateways limits constants

I'll re-use the mixnodes values, but it doesn't have to be this way.

We could easily make a specific constant for gateways instaed.

* Renamed "state" to GlobalContractParams

* Pulled bit of test helper code up a level

* Small cleanup of zero spacing in constants

* Made a local helper method private

* Renaming GlobalContractParams to ContractSettings and StateParams to ContractSettingsParams

* ibid

* Renamed contract settings storage methods from "config" (which is a bit vage to "contract_settings"

* Indulging a fullword as a personal protest vs the Go programming language

* Renaming mixnet settings to mixnet contract settings

* Making validate_mixnode_bond private and moving it downwards in the file

* Moving gateway bond validation to the bottom of the tests file

* Getting the wallet compiling again.

* Updated TypeScript client with new types and contract method names

* Updating rust validator client with new contract method names and types

* Fixed type error in mixnet-contract shared msg.

* Used new contract method names and types

* Fixed warnings in non-test code

* All tests compiling

But not passing yet

* Fixed test compilation warnings

* Fixed tests

* Test-locked Delegations struct

Co-authored-by: dave <dave@nym-mbp.lan>
Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
2021-11-24 22:14:38 +00:00
Aid19801 c8f2548090 Merge pull request #915 from nymtech/fix-mob-datagrids
Fix Mobile View for MUI data-grid (CARD 108)
2021-11-24 13:28:36 +00:00
Aid Thompson 62f20a905e Alignment on Overview page 2021-11-24 10:45:54 +00:00
Jędrzej Stuczyński a3dd94507a Feature/total delegation bucket (#913)
* Preliminary attempt at creating StoredMixnodeBond

* Fixed tests

* Removed dead code

* Moved StoredMixnodeBond to storage.rs

* Removed redundant clone
2021-11-23 16:36:48 +00:00
Aid Thompson dd36b329d5 renamed back to universal-datagrid 2021-11-23 16:03:39 +00:00
Aid Thompson 581af4a295 gateways page performant 2021-11-23 15:49:05 +00:00
Jędrzej Stuczyński 085761a9fb Feature/batch delegator rewarding (#898)
* Unnrolled the loop into separate function

* Ugly way of saving rewarding status

* Initial way of rewarding next page of delegators

* Attribute passing

* Promoted transactions to directory

* Moved rewarding-related functionalities into separate file

* [ci skip] Generate TS types

* Better errors on double rewarding attempt

* Removed old rewarding call

* Test fixes

* Some cleanup

* Paged mixnode rewarding test + serde fixes

* Tests for delegator rewarding

* ExecuteMsg for MixDelegatorRewarding

* Made validator-api code compliable

with bunch of todo!() macros

* Removed Option wrapper from params in MixnodeToReward

* Calculating uptime for entire epoch

* Created shared MIXNODE_DELEGATORS_PAGE_LIMIT constant

* Using new rewarding messages in validator API

* cargo fmt

* Updated wallet state types

* Additional test for correct rewarding information

* Query for rewarding status

* Additional test regarding delegator rewarding

* Client methods for obtaining rewarding status

* Validator API checking for full rewarding

* Removed unused field from validator api config template

* Waiting for MINIMUM number of test routes

* Waiting initialisation_backoff in the early return case

* Fixes crash condition in validator API when calculating last day uptime

* Fixed typo

* Dealing with the case of rewarding mixnode with 0 uptime

* Removed temporary unwrap

* Guarding against 0-size rewarded/active sets

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-11-23 15:36:20 +00:00
Aid Thompson 58537224df mixnode datagrid performant 2021-11-23 15:20:23 +00:00
fmtabbara 54e217ccea update logic 2021-11-23 15:01:05 +00:00
Jędrzej Stuczyński 78a5dbbf05 Fixes crash condition in validator API when calculating last day uptime (#909) 2021-11-23 14:47:49 +00:00
fmtabbara c8f81d118b fix bug with successful response ui 2021-11-23 12:16:07 +00:00
fmtabbara a193e948e6 link address to block explorer + refresh balance after tokens sent 2021-11-23 11:34:05 +00:00
AniaPiotrowska ab7f24dc1f Merge pull request #837 from nymtech/feature/vouchers
Feature/vouchers
2021-11-22 19:34:58 +00:00
fmtabbara cc77f6e392 add favicon 2021-11-22 14:48:37 +00:00
Tommy Verrall 58f02109be Add data-testids 2021-11-22 11:00:20 +00:00
Fouad 724e0f78c6 Update README.md 2021-11-20 21:27:07 +00:00
fmtabbara d764b11122 responsive tweaks 2021-11-20 21:24:30 +00:00
fmtabbara 4953b40a42 add readme file 2021-11-20 21:12:06 +00:00
fmtabbara 66e5afe485 add form validation and error handling 2021-11-20 21:04:44 +00:00
fmtabbara 9b17a1ca77 add responses 2021-11-19 22:46:32 +00:00
fmtabbara 5ce6147839 set up validator connection 2021-11-19 18:49:52 +00:00
fmtabbara dd3643a1bb set up form ui 2021-11-19 17:41:21 +00:00
fmtabbara 52fedd9866 create base project 2021-11-19 16:27:45 +00:00
Jędrzej Stuczyński 289605f36b Bugfix/monitor initial values wait (#907)
* Waiting for MINIMUM number of test routes

* Waiting initialisation_backoff in the early return case
2021-11-18 17:16:15 +00:00
Tommy Verrall 4f6bf3423b Merge pull request #905 from nymtech/update/readme
Update README.md
2021-11-18 09:59:55 +00:00
Tommy Verrall 04a32156d4 Merge pull request #891 from nymtech/update/remove-gateway-delegations
remove delegation and undelegation from gateways
2021-11-18 09:42:34 +00:00
Tommy Verrall 427880d23f Merge pull request #896 from nymtech/bug-fix/macos-keyboard-shortcuts
Bug fix/macos keyboard shortcuts
2021-11-18 09:22:33 +00:00
Tommy Verrall a5e47dead8 Update readme
. If `Webview2` is not installed on Windows, that app will not launch correctly. There's two ways to update if you're running on an older version of windows. 
- Update the Edge browser in your current OS
- Update via the installer now provided in the README documentation.
2021-11-18 09:18:04 +00:00
Tommy Verrall 297b7b2355 Merge pull request #904 from nymtech/bug-bond-denom
BUG: Bond cell denom
2021-11-17 12:30:45 +00:00
Tommy Verrall d7f3abfe7d Merge pull request #903 from nymtech/test/fix-detail-tables
Explorer UI tests missing data-testid
2021-11-17 12:29:34 +00:00
Aid Thompson 234952a6bb removed typo 2021-11-17 11:50:03 +00:00
Tommy Verrall 930561faf5 Explorer UI tests
. This `data-testid` was missing and is needed after changes to DataGrid into MUI-Table
2021-11-17 11:20:43 +00:00
Tommy Verrall 17507bc8c5 Merge pull request #899 from nymtech/test/wallet-readme-fix
Fix up Nym-Wallet README.md
2021-11-16 14:17:15 +00:00
Tommy Verrall 12f8e453ea Fix typo. 2021-11-16 10:20:50 +00:00
Tommy Verrall 97ef024b8a Fix up Nym-Wallet README.md
. Provide a descriptive overview
. Remove old references
2021-11-16 10:17:30 +00:00
Aid19801 3dc94223ae Bug mapp nodemap (#897)
* desktop onMouseEnter and leave handlers added

* clicking nav option closes drawer

* All AC met

* removed dead bool

* added hamburger to AppBar for mobile users small refactor

* nuts and bolts working needs a lot of tidying though

* Functionally complete.

* change hardcode colors to theming

* UI theme and border changes

* bug fix removed collapse nav flicker

* dead code

* resetting drawer to closed onload

* removal of hardcoded color

* made null functions into optional props

* Nested sx styling not global

* paperprops now working

* fixed breaking changes for DataGrid

* linting fix

* linting fix

* optional chaining for nodemap search

* leaner filter func

Co-authored-by: Aid Thompson <adrian@nymtech.net>
2021-11-12 18:22:03 +00:00
Aid19801 50cd18a926 Add a Mobile Nav to the Network Explorer (#895)
* desktop onMouseEnter and leave handlers added

* clicking nav option closes drawer

* All AC met

* removed dead bool

* added hamburger to AppBar for mobile users small refactor

* nuts and bolts working needs a lot of tidying though

* Functionally complete.

* change hardcode colors to theming

* UI theme and border changes

* bug fix removed collapse nav flicker

* dead code

* resetting drawer to closed onload

* removal of hardcoded color

* made null functions into optional props

* Nested sx styling not global

* paperprops now working

* fixed breaking changes for DataGrid

* linting fix

* linting fix

Co-authored-by: Aid Thompson <adrian@nymtech.net>
2021-11-12 16:14:37 +00:00
Tommy e5051f98c5 Adding a few more menu options 2021-11-12 11:23:36 +00:00
fmtabbara 2f69958e21 macos keyboard shortcut fix 2021-11-12 10:29:49 +00:00
fmtabbara d427591a66 dont commite dist folder contents 2021-11-12 10:29:33 +00:00
fmtabbara 0257c42ee9 update tauri bundle identifier 2021-11-12 10:29:04 +00:00
fmtabbara 8ebfc72da8 remove contents of dist folder 2021-11-12 10:28:39 +00:00
Aid19801 897d51cba0 Change MixnodeDetail page's datagrid into a reuseable table component (#887)
* basic table working

* broken out into sep component

* table is more dynamic now

* linting fixes

* Added types for Columns

* hangover from eslint work moving to diff PR

* Changed To DetailTable

* Killed unused flex val in Columns

* merge conflicts resolved

Co-authored-by: Aid Thompson <adrian@nymtech.net>
2021-11-12 10:28:12 +00:00
Tommy Verrall 1f1d91bd1e Adding data-test-ids for the explorer (#885)
* Adding all the data-test-ids

Test ID's for doing automation on explorer

* Applied lint-fix

Linting

* More data ids
2021-11-11 15:31:30 +00:00
Mark Sinclair 9d63a30b07 Merge pull request #890 from nymtech/feature/nym-wallet-rename
Feature/nym wallet rename
2021-11-11 15:00:55 +00:00
Tommy 5b22b1c298 getting branch up to date with tauri changes and webriver changes 2021-11-11 11:02:39 +00:00
Dave Hrycyszyn 0302d9ae5d Merge branch 'feature/nym-wallet-rename' of github.com:nymtech/nym into feature/nym-wallet-rename 2021-11-11 10:50:12 +00:00
Bogdan-Ștefan Neacşu eb6949528a Fix network monitor template (#892) 2021-11-11 10:36:43 +00:00
Mark Sinclair 41b77c3ad5 Merge pull request #894 from nymtech/feature-gate-ts-rs
Only use ts-rs in tests
2021-11-11 10:34:04 +00:00
Mark Sinclair 2f78f5eb26 Merge pull request #884 from nymtech/test/fix-gh-action
Fix path for github action running tauri-wallet-tests
2021-11-11 10:33:02 +00:00
Dave Hrycyszyn cdbd731f10 Changed all workflow references to nym-wallet 2021-11-11 10:25:51 +01:00
Dave Hrycyszyn 5cb4949d46 Renaming tauri-wallet to nym-wallet
Hopefully this will make it a bit clearer as to what people should
compile if they want the wallet.
2021-11-11 10:25:51 +01:00
Mark Sinclair 9ec0b30812 GitHub Actions: move explorer actions to k8s hosted runners 2021-11-10 16:08:15 +00:00
Jędrzej Stuczyński 7e1cf2f105 Feature/rewarding interval updates (#880)
* Introduced rewarding_interval_nonce to contract state

* Queries for ibid.

* Mixnode demanded set size

* Routes for obtaining demanded/active mixnode sets

* Testing only demanded nodes

* Typo

* Initial state

* Feature-locking unused imports

* Generating pseudorandom (with deterministic seed) demanded mixnodes set

* cargo fmt

* Fixed tauri state

* Renamed network monitor address to the rewarding validator

* [ci skip] Generate TS types

* Notice for the future

* Transactions to begin/finish mixnode rewarding + double rewarding protection

* Validator API using new contract calls

* Removed dead code from an old experiment

* [ci skip] Generate TS types

* Removed unused import

* Renamed 'demanded' set to 'rewarded' set

* Some renaming action

* [ci skip] Generate TS types

* Fixed post-merge dependency issue in tests

* Post merge test fix

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-11-10 15:28:16 +00:00
Mark Sinclair 04636a569a GitHub Actions: fix up reference to action 2021-11-10 15:24:47 +00:00
Mark Sinclair 52f5b980a4 GitHub Actions: use dynamic matrix for os types and rust versions 2021-11-10 15:15:31 +00:00
Mark Sinclair 0e4f833715 GitHub Actions: fix up 2021-11-10 14:44:52 +00:00
Mark Sinclair d22914c4dc GitHub Actions: fix up 2021-11-10 14:43:32 +00:00
Mark Sinclair 7d506e6e2a Slim down GitHub Actions 2021-11-10 14:34:02 +00:00
Drazen Urch c7007de1ea Only use ts-rs in tests 2021-11-10 15:02:59 +01:00
Bogdan-Ștefan Neacşu 10bf70b22b Feature/bandwidth token (#832)
* Remove check for bandwidth for incoming packets

We should only accunt for packets that the client inputs to the mixnet

* Introduce BandwidthController for both types of bandwidth creds

* Add some non-coconut token bandwidth handling

* Use thiserror for gateway-client lib

* Add error handling

* Unable to build for wasm for now

* Fix wasm strange error

* Disable non-coconut credentials for wasm client

* Check for status and throw the error up

* Send encrypted token cred from client

* Gateway receive message and signature validation

* Put the correct amount of tokens that were burned

* [ci skip] Generate TS types

* Eth endpoint and secret key as config parameters

* Add eth_endpoint config argument for gateway

* Update test as well

* Separate panicable code from the safe one

* Move some bandwidth controller panics up the call stack

* Save contract corresponding to the eth endpoint

* Fix template

* Pass the web3 interface as well

* Made event reads possible in gateway

* Add checks for event data

* Cosmos contract for double spending prevention

* Add workflow for the new contract

* Add validator rest URL to config

* Rename eth_events to erc20_bridge

* Pass cosmos mnemonic as well, and put the nymd client in ERC20Bridge

* Call cosmos contract for final verification

* Ask for config parameters in cli

* Fix various stuff

* Increase timeout to allow gateway to check the two chains

* Put some logs for the new flow

* Set consumed bandwidth invariantly of coconut feature

* Fix clippy error

* Add non-coconut checks

* Use 2018 rust instead of 2021

* More verbose nymd error

* Explicitly specify TOKENS_TO_BURN constant

* Put eth burn function in a constant

* Replace to_vec & append with iter & chain

* Test for (de)serialization of TokenCredential

* Minor rename

* Separate credential creation from bandwidth claiming

* Switch from panics to errors when claiming coconut bandwidth

* Another append changed to chain

* Update QA cosmos contract address

* Simplify build/test/clippy separation on coconut feature

* Fix bad features arg positioning

* Use the start_after in cosmos contract query

* Set a limit in line with a range on cosmos queries

* Added unit tests for new cosmos contract

* Fix bandwidth_remaining comparation

* Get remaining bandwidth from gateway

* Add contract build flag

* Add a useful info log

* Use a more robust eth depth for release builds

* Include recipt logs in error message

* Fix clippy for tests

* Use Arc instead of clone

* Rename as_bytes to to_bytes

* Make signature verification in contract more verbose

* Missed rename of paging constant

* Fix gateway start with coconut enabled

* Rename function to claim_token

* Simplify nymd client setup

* Check with block buffer on gateway as well

* Update comment of double spending protection

* Correct contract address

* Backup the keypairs used for buying tokens, in case of error cases

* Don't take any chances with the gateway timeout

* [ci skip] Generate TS types

* Updated cosmos contract to latest QA address

* Add cli options for eth

* Update network monitor timeout value as well

Co-authored-by: neacsu <neacsu@users.noreply.github.com>
2021-11-10 14:53:56 +02:00
Jędrzej Stuczyński d952f3233a Active sets => Rewarded + Active/Idle sets (#864)
* Introduced rewarding_interval_nonce to contract state

* Queries for ibid.

* Mixnode demanded set size

* Routes for obtaining demanded/active mixnode sets

* Testing only demanded nodes

* Typo

* Initial state

* Feature-locking unused imports

* Generating pseudorandom (with deterministic seed) demanded mixnodes set

* cargo fmt

* Fixed tauri state

* [ci skip] Generate TS types

* Renamed 'demanded' set to 'rewarded' set

* Some renaming action

* [ci skip] Generate TS types

* Fixed post-merge dependency issue in tests

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-11-10 12:52:13 +00:00
fmtabbara b1178b7ad5 remove delegation and undelegation from gateways 2021-11-10 10:42:45 +00:00
Jędrzej Stuczyński af4ac1b7c9 Reverted gateway registration handshake to its 0.11.0 version (#882) 2021-11-10 11:16:39 +01:00
Drazen Urch eae4276381 Tokenomics rewards (#802)
* Initial analysis

* Implement core rewards distribution

* Tests and refactoring for better testability

* Feature gate ts-rs in mixnet-contract

* No more floats

* Fix performance calculation

* Add migration

* Bandwidth fix, reduce inflation pool size

* Update tokenomics

* Refactor rewarding and replace num crate

* Address review comments

* Cleanup, better test values

* Simplify formula

* Cleanup, add rewarding formulas to README

* Address review comments

* Cleanup rebase

* [ci skip] Generate TS types

* fmt

Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-11-10 11:14:06 +01:00
Dave Hrycyszyn d8fab74df6 Changed all workflow references to nym-wallet 2021-11-09 17:04:07 +00:00
Dave Hrycyszyn b8c184cc60 Renaming tauri-wallet to nym-wallet
Hopefully this will make it a bit clearer as to what people should
compile if they want the wallet.
2021-11-09 16:55:49 +00:00
Jędrzej Stuczyński 8bcc931d9b Feature/removal of monitor good nodes (#833)
* Removed separated ipv4 and ipv6 testing

* Testing network using chosen core nodes

This should have probably been like 20 independent commits... sorry...

* SQL migrations for updated schema

* SQL updates

* Using absolute uptime directly

* New uptime calculations

* Config entries, more DB work, some cleanup

* Additional API query routes

* More SQL and API work

* Changed `_` to `-` in new routes

* Removed good topology from config

* Fixed gateways reader yield condition

* Initial gateways pinger

* Minor cleanup and logging level decreases

* Missing trait derivations

* Further logging adjustments

* Unused commented out import

* Claiming additional bandwidth in coconut feature when low

* Fixed build with coconut feature

* Minimum number of test routes

* Making beta/nightly clippy happier
2021-11-09 12:25:41 +00:00
Mark Sinclair 955ef7b871 GitHub Actions: only run job to generate types when not in a pull request (#886) 2021-11-09 11:56:43 +00:00
Mark Sinclair 9ee7ad4fa8 GitHub Actions: only run job to generate types when not in a pull request 2021-11-09 11:42:00 +00:00
Tommy Verrall 79aa1febbe Run all the tests 2021-11-08 15:01:21 +00:00
Tommy 4ed9d3a297 Updated rust version for installation 2021-11-08 14:55:49 +00:00
Tommy 97dee2e1a0 Fix path for github action running tauri-wallet-tests
. Applied prettier to the code base
. Removed delegation to gateway tests
2021-11-08 14:54:01 +00:00
Fouad 32c4974c44 Merge pull request #873 from nymtech/update/remove-gateway-delegation
remove gateway selection on delegation and undelegation pages
2021-11-08 15:31:58 +01:00
Mark Sinclair 5dadd73dfd Network Explorer (#881)
* fixed styled component

* dynamic colour for isSelected

* corrected type names

* wrapped nav for routing and positioning of main section and dynamic colour for selected section

* overview info panes added

* quick refactor break out components separately

* WorldMap implemented but not data

* map changed and updated to shades correctly

* live data in cards

* added any types for react simple map

* nested routing added but needs tidying and types refactored

* added tooltip to worldmap

* worldmap killed unused props

* updated MUI version to stable v5

* dark mode and ContentCard refactor complete

* refactor of DarkMode context and API into class and context setup

* context refactor for multiple APIs at top level

* mui typography used for error msging instead of jsx/html

* added typeDefs for node api types

* small changes to sx styling

* added types for api responses and main context

* promiseAll for better error handling of individual async calls

* switch out to live API for country nodes

* removal of unnecessary type any and shortening sx style block

* routing and basic mixnodes table and linking

* fixed TS error handling and ts exclude files

* refactor of class API fetch reqs

* renaming to more appropriate explorer-api

* broken - passing to Fouad

* fix for types in context main

* mixnode detail page

* rebasing back before fetch mixnode by ID was implemented

* added basic cache for huge dump of mixnode data

* broken mixnodes context

* fixed mixnode detail fetch

* added hardcoded BondBreakdown section

* added 2 col table for detail page and small refactor of ApiState type for consistent use throughout app

* basic chart with basic dark/theme implemented - no live data

* added scrollToTop useRef for Detail page

* tidied grid items

* media qry for smaller screens

* small changes

* added live data to bonds breakdown 1/2

* small changes/tweaks

* Bondbreakdown retrieves live data

* mixnode stats using live data

* added node status live data

* uptime story added with live data

* date formatting added

* mixnode map

* error handling for mixnode stats

* error handling for port stats

* improved error handling for table - unfinished

* error handling for mixnode table

* handle Loading state for 2colSmallTable

* Uptime story loading handling

* set up data grid component

* remove mixnode value check as handled inside MixnodesDataGrid component

* use loading prop in data grid component

* undo unintentional code formatting

* map blur and linkable data-grid added

* getting ready for gateways and removing con logs

* quickfix for map blur

* PR comment changes

* refactored data grid for reuseability

* Link to open Big Dipper for Blocks

* passing element to title instead of string for routing to Big Dipper

* quick fix for element passed as title for contentCard

* fix for colour coding nodes

* nuts and bolts of search and results per page are working

* media query for responsive search and no-per-page toolbar

* broke out search and pagesize to separate toolbar

* fix for going back to mixnodes datagrid and refetching

* corrected typings for WorldMap

* removed API for topojson

* Cleaner implementation of formatting inline for datagrid

* added Type to Datagrid Rows for mixnode

* removed optional from type for Datagrid

* added page listing the Gateway nodes

* adding clickable location to handleSearch

* tidying util functions and removing dead useEffect

* Add missing constant

* Validators link to Big Dipper

* added validators link to side nav as per Issues card

* SVG icons

* PR tweak to move logic to routes

* removed dead code post rebase

* fixed light dark mode for DataGrid

* light dark mode works on SVGs in Nav

* moving logic back to Nav to avoid window object issues

* neater ternary for SVG icons dark mode

* Better Linking/Styling for cells

* corrected prop/attr name in svg to Reactify it

* moved api url to constants

* SVGs dark now governed by context not props so reverting renderIcon method back to key value setup

* percentage for bond total added

* SVGs for Overview cards Mixnodes Gateways and Validators

* decimalised formatted punks and % of bond for BondBreakdown card

* number formatting via validator module

* adding cossmjs math pkg

* unfinished refactor BondBreakdown

* first few ui tweaks

* Adding google font Open Sans as per designs

* DataGrid unstylable in theme so nuking in css

* adding theming to Block Height card not hardcoded colours

* DataGrid styling

* Nav styling colours but without hover fix

* theme for bond breakdown

* killing con logs

* Datagrid styling

* Nav bar working

* added lines to nav

* removed cursive from fallback fonts

* trimming and refactoring

* removed dead isActive code from nav options

* Color correction for theme on 2col table

* Moved cell styles out to UniversalDatagrid for reuseability

* Nav colors moved to theme

* Removing comments and dead code

* DataGrid UI improvements

* theming for Overview content card

* Bonds updated from UPUNK to PUNK

* corrected SVG warning on stroke-width

* added Boolean class instead of ternary

* fixing up svg attr to jsx props

* merging UPUNK changes into ui-tweaks

* corrected SVG warning on stroke-width

* added Boolean class instead of ternary

* last instance of Boolean

* BondBreakdown handles 0 delegations

* formatting for webpack config and svgs

* Add `npm run lint` and `npm run lint:fix` targets to `package.json`

* Allow `.vscode` directories - exclude them individually like has been done already in the `.gitignore` directory

* Add `vscode` action to run `eslint` on save for the `/explorer/**` sub-directory

* eslint auto fix

* Fix some easy eslint issues

* removing grid pipes and pastel map colors

* Grid xl lg values to align with Search Toolbar

* GitHub Actions: do not trigger Rust actions when the paths are only `/explorer/**`

See https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths for details.

* GitHub Actions: run eslint and annotate pull requests

* socials added to Appbar and Footer

* smaller darkmode icon for mobile

* cleaner code for nav dark light selector

* almost all lint fixes

* post linting Nav fix

* killed con log and removed unused dep

* ref type and removed 1x ts ignore from worldMap

* disabl nested tern w/ nav is refactored on diff br

* icons smaller put into mui List format

* Added hover effect to match DarkLight switch

* ts ignore for worldMap vs no ts decl

* parking changes

* Flipped to MUI SVGs

* re-added external links to Socials

* nav functionality working

* spacing on Mixnode detail page

* datagrid alignment & detail page spacing

* map but no datagrid yet

* killed old SVGs now using mui icons

* added palette instead of strings

* Mixnode Map page working still needs tidying

* better lg xl responsive on Overview and sanitized Page Titles

* removed typography from imports as unused now

* search, sort working & added LG XL responsiveness

* Routing root reqs direct to Overview

* basic 404 page and btn back to overview

* killed fragments and comments

* updated Bond total in column

* Change bond col to type number not text

* Added field to DataGrid and updated MixnodeToGridrow logic

* Added type number so sorting works properly.

* added %self to Detail page

* basic scroll working desktop

* delegations now popout and scroll according to designs

* added stickyHeader and killed dead code

* ExpandMore only renders if delegations exist

* killed old svg icons

* added theme to Overview SVGs

* bringing Title into other pages

* linting fix

* pagination and spacing of gateways cols

* linting fix

* style override for pagination

* added hamburger and changed appbar to fixed

* bringing in other lint fix to pass linting

* PR feedback changes

* Add README.md for theme customisation

* Add hook to get app state context

* Add Nym theme typings to MUI `Theme` types

* Use new theme provider

* Fixing up components to use theme typings
Updated Overview Footer and ContentCard
Footer and Nav socials
Title, Nav chevron and Nav SVGs
Overview SVGs
Light Dark switch
BondBreakdown and 2 col table
DataGrid and 2col Tables
WorldMap UptimeChart and theme changes
WorldMap colors
merge changes
added StatsCard for overview

* Bug fix: do no close drawer when clicking on mixnodes or gateways

* Theme primary colour set to orange highlight, so that default/primary actions are clear to the user. This fixes colours on the pagination page list.

* Fixing up map projection

* Map view uses stroke colour from theme

* added useTheme from correct pkg

* react types upgrade to kill SXProps issue

* SXProps fix removing dead mixins from fixed AppBar

* Scale of Map changed to see more countries

* return type for main Context required

* Fixed map so more countries show

* type for useMainContext hook added

* Remove unused file

* Tidy up imports

* Remove use of `any` by using strongly typed hook to get the app state

* Remove module declaration so that @types/react-simple-maps is used

* API map response changed to indexed object

* Map view uses correct typings from `@types/react-simple-maps` and `d3-scale`

* Make content responsive and fills the view when screen widest

* Link network explorer in title to overview page

* Increase size of card headers to differentiate

* Fix column widths

* Fixed icons showing incorrectly the stats card in mixnode detail view

* Set default sort on mixnodes and gateways to be `bond` descending.

There is an error in MUI data-grid that does not adjust the sort caret based on initial `sortModel` value. Needs investigation.

* GitHub Action for deployment: prefix with network explorer to stop collisions with other deployment projects

* Mixnode list: fix up header title for `host`

* Fix up notification URLs and tidy up readme

* Fix up license information

Co-authored-by: Adrian Thompson <adrian@nymtech.net>
Co-authored-by: Adrian Thompson <adrianthompson@Adrians-MacBook-Air.local>
Co-authored-by: fmtabbara <fmtabbara@hotmail.co.uk>
Co-authored-by: Aid19801 <adrianThompson19801@gmail.com>
2021-11-08 12:23:27 +00:00
Mark Sinclair 6ad5badef4 GitHub Action to publish wallet
This is placeholder to allow the action to trigger in branches
2021-11-08 11:03:49 +00:00
Bogdan-Ștefan Neacşu 480ad18b2e Put client_address and id in the correct order (#875) 2021-11-04 16:33:18 +02:00
Jędrzej Stuczyński cdb21f418b Made daily uptime calculation be independent of epoch rewarding (#860)
* Made daily uptime calculation be independent of epoch rewarding

It was moved into a separate timer

* Don't lookup active gateways during rewarding
2021-11-04 13:06:20 +00:00
Jędrzej Stuczyński bd4c18c723 Set MSRV on all binaries to 1.56 (#872) 2021-11-03 20:07:43 +00:00
fmtabbara e7716ae852 remove gateway selection on delegation and undelegation pages 2021-11-03 15:50:36 +00:00
Jędrzej Stuczyński b19528d47e Removed gateway rewarding and delegation (#856)
* Removed gateway rewarding and delegation

* Removed redundant error variants

* [ci skip] Generate TS types

* Test fixes

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-11-03 15:01:59 +00:00
Tommy Verrall ef88ce9252 Merge pull request #871 from nymtech/bug-fix/keyboard-shortcuts-macos
add native window items (copy/paste) via tauri
2021-11-03 14:24:00 +00:00
Bogdan-Ștefan Neacşu 488f1c7742 Remove stale migration code (#868) 2021-11-03 16:01:13 +02:00
fmtabbara 63c698d903 add native menu items via tauri 2021-11-03 11:42:47 +00:00
Jędrzej Stuczyński 7e1c3b4501 Chore/cosmrs update (#862)
* Re-enabled `get_tx` endpoint

* Updated cosmrs to 0.3 and prost to 0.9

* [ci skip] Generate TS types

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-11-03 11:03:18 +00:00
Jędrzej Stuczyński e1d7772a78 Removed epoch rewarding variance (#857) 2021-11-03 11:02:44 +00:00
Tommy Verrall 9db589e0b3 Merge pull request #842 from nymtech/bug-fix/success-overflow
fix delegate success overflow
2021-11-03 10:33:31 +00:00
Tommy Verrall 57c8d69785 Merge branch 'develop' into bug-fix/success-overflow 2021-11-03 10:32:55 +00:00
Jędrzej Stuczyński 4a9cc5b757 Fixed most recent nightly clippy warnings (#865) 2021-11-02 10:48:54 +02:00
Tommy Verrall 06aac9393b Merge pull request #855 from nymtech/feature-request-template
Update feature-request template
2021-11-01 11:31:24 +00:00
Tommy Verrall f4c5b1d67f Update feature-request template 2021-11-01 11:05:54 +00:00
Tommy Verrall 2e0aba6100 Merge pull request #854 from nymtech/issue-template
Update issue templates
2021-11-01 10:51:37 +00:00
Tommy Verrall 8c6549c5dd Update report.md
consolidated the component area
2021-11-01 10:05:24 +00:00
Tommy Verrall 7b431ebfa8 Update .github/ISSUE_TEMPLATE/report.md
Co-authored-by: Mark Sinclair <mmsinclair@gmail.com>
2021-11-01 09:55:12 +00:00
Tommy Verrall 3152fd6887 Update .github/ISSUE_TEMPLATE/report.md
Co-authored-by: Mark Sinclair <mmsinclair@gmail.com>
2021-11-01 09:54:35 +00:00
Tommy Verrall e03e7f186a Delete create-an-issue.md 2021-11-01 09:47:10 +00:00
Tommy Verrall ec056a548f Delete issue-report.md 2021-11-01 09:46:59 +00:00
Tommy Verrall 24aa075a07 Update issue templates
new issue template for individuals
2021-11-01 09:41:29 +00:00
Jędrzej Stuczyński 8488c4cb0f Overflow checks in release (#846) 2021-10-28 13:07:08 +01:00
Tommy Verrall 20c96b940f Update nym_wallet.yml
check binary exists after name change
2021-10-26 14:10:23 +01:00
Tommy Verrall cfb43699d6 Update nym_wallet.yml
last check to run single test
2021-10-26 13:04:52 +01:00
Tommy Verrall 79e7b5b938 Update nym_wallet.yml
add directory
2021-10-26 12:43:44 +01:00
Tommy Verrall 47156e693c Update nym_wallet.yml
address directory
2021-10-26 12:20:36 +01:00
Mark Sinclair b61f6c8833 Update nym_wallet.yml 2021-10-26 12:32:39 +03:00
Mark Sinclair cc3b710af9 Delete nym-wallet-tests.yml 2021-10-26 12:23:06 +03:00
Mark Sinclair 4de3f16bb3 Merge pull request #841 from nymtech/feature/tauri-wallet-tests
Feature NYM wallet webdriverio test
2021-10-26 10:21:45 +01:00
fmtabbara 7aad7daa5e fix overflow 2021-10-22 17:52:15 +01:00
Tommy 4107d670cf remove stray character 2021-10-22 17:44:58 +01:00
Tommy 284e797fb3 update readme 2021-10-22 17:43:15 +01:00
Tommy 8a63df3e82 remove duplicate loglevel output 2021-10-22 17:27:32 +01:00
Tommy 7b8731ddcc line endings again 2021-10-22 17:25:56 +01:00
Tommy 1017c9c642 more line endings 2021-10-22 17:24:58 +01:00
Tommy 4e0c59a8f1 sort out line endings 2021-10-22 17:24:05 +01:00
Tommy f6d85a0784 remove empty comment 2021-10-22 17:21:25 +01:00
Tommy 6516811276 add assertion on sending funds
need to improve the calculator
2021-10-22 17:20:00 +01:00
Tommy Verrall ca0ed3594f Update nym_wallet.yml
line spacing between on push and defaults
2021-10-22 15:38:42 +01:00
Tommy Verrall a28ad4f81a Merge pull request #840 from nymtech/feature/nym-wallet-tests
Update nym_wallet.yml
2021-10-22 15:32:18 +01:00
Tommy 0ea3183288 set logging to silent 2021-10-22 14:08:54 +01:00
Tommy c6ff7c51f0 setting build path for running the binary 2021-10-22 13:55:48 +01:00
Tommy Verrall 0240ab6144 Update nym_wallet.yml
Draft at the moment whilst figuring out config data
2021-10-22 13:37:24 +01:00
Tommy 2746ec49a3 Fixing bonding tests 2021-10-22 12:29:40 +01:00
Tommy b3f1c943a7 Uncomment test script 2021-10-22 10:33:28 +01:00
Tommy 7654ede904 Update tests to use new selectors, implement reporting
. Use accessible ID's to identify elements
. Implement reporting
. Clean up 
. Input more notes in README.md
2021-10-22 10:30:17 +01:00
Tommy c882487d01 change casing on identifiers to kebab-casing 2021-10-21 11:18:45 +01:00
Tommy 865e4839f3 merging develop 2021-10-21 11:04:57 +01:00
Tommy 5a270f6489 pushing new wallet create - WIP 2021-10-21 11:02:28 +01:00
Tommy Verrall 6776bb4bab Merge pull request #836 from nymtech/feature/add-dataids-wallet
Apply readable ids to elements on Nym Wallet
2021-10-21 10:28:36 +01:00
Tommy cbe9bad66e Apply readable test-dataIds to elements on Nym Wallet
To easily identify elements on the wallet to help with automation.
2021-10-20 16:39:30 +01:00
Tommy Verrall 5761e1c1a4 Merge pull request #831 from nymtech/update/use-nym-icons
update app name and icons
2021-10-19 14:21:51 +01:00
Mark Sinclair 062a5edf76 Merge pull request #806 from nymtech/bugfix/network-explorer-api-geoip
Bug fix: Network Explorer: Add freegeoip API key and split out tasks for country distributions
2021-10-19 11:53:22 +01:00
Jędrzej Stuczyński a009e76568 Feature locked client-side bandwidth metering (#820) 2021-10-19 11:30:34 +02:00
Jędrzej Stuczyński dcc9b856d7 Flag to only run coconut-related functionalities (#824) 2021-10-19 11:30:07 +02:00
Mark Sinclair 592e52b333 Hush nightly clippy, hush 2021-10-19 10:20:00 +01:00
Mark Sinclair bc923be862 Update README 2021-10-19 10:20:00 +01:00
Mark Sinclair e880631500 Remove unused imports 2021-10-19 10:20:00 +01:00
Mark Sinclair d9b0834476 Review feedback 2021-10-19 10:20:00 +01:00
Mark Sinclair 2fda22e168 Run new tasks at startup 2021-10-19 10:20:00 +01:00
Mark Sinclair a5091cd124 Split refreshing of mixnode cache into a separate task 2021-10-19 10:20:00 +01:00
Mark Sinclair b2ec19ece4 Split geolcation into its own task the picks off mixnodes that don't have locations or ones where the cache TTL has expired 2021-10-19 10:20:00 +01:00
Mark Sinclair 72e64cfab7 Split the mixnode country distribution calculation into its own task and get data from the location cache 2021-10-19 10:20:00 +01:00
Mark Sinclair 7eacb6b57e Add TTL to location cache 2021-10-19 10:20:00 +01:00
Mark Sinclair e0e1ca992f Move locations to their own cache 2021-10-19 10:20:00 +01:00
Mark Sinclair f1a628dee4 Change freegeoip API hostname 2021-10-19 10:20:00 +01:00
Mark Sinclair 81d49dc4b9 Add thiserror crate 2021-10-19 10:20:00 +01:00
Mark Sinclair 7e581183f4 Network Explorer API: add env var GEO_IP_SERVICE_API_KEY to provide an API key for https://freegeoip.app/ 2021-10-19 10:20:00 +01:00
fmtabbara a9f3fa0c72 update app name and icons 2021-10-19 09:08:07 +01:00
Tommy e6c5a97f8c set to silent logging 2021-10-18 12:18:18 +01:00
Tommy efb9b70293 merge develop 2021-10-18 12:17:44 +01:00
Tommy 666c233d6c remove workflow 2021-10-18 12:14:57 +01:00
Mark Sinclair 4307756719 Network Explorer: GitHub Actions
- change notification channel
- remove trigger on PR
2021-10-18 12:05:21 +01:00
Mark Sinclair 622d0d3ff9 Merge pull request #829 from nymtech/nym-wallet-test-yml
Create nym-wallet-tests.yml
2021-10-18 11:22:54 +01:00
Tommy Verrall ad763c2131 Update nym_wallet.yml
remove clippy
2021-10-18 11:18:59 +01:00
Jędrzej Stuczyński 87a2ec9468 Updated CODEOWNERS (#828) 2021-10-18 08:41:27 +01:00
Tommy dd590e8779 Update Readme for windows. 2021-10-15 18:17:51 +01:00
Tommy 9555f3a2cd testing tauri-wallet-tests.yml 2021-10-15 18:06:24 +01:00
Tommy Verrall 0b79fc33d7 nym-wallet-tests.yml 2021-10-15 18:05:16 +01:00
Tommy Verrall b7e14489da Create nym-wallet-tests.yml
action for building and running the tauri-wallet-tests
2021-10-15 17:46:53 +01:00
Tommy 84b426042e wrong workflow check in 2021-10-15 17:24:35 +01:00
Tommy f683b9e770 Tauri Wallet Test
. Currently developed against a Linux machine
. POM design
. README.md states how to get up and running on Linux 
WIP - areas of focus inbound ->
. CI
. Test suite configuration
. Working on multiple platforms
. Improve selector selection to reduce fragility in the future
2021-10-15 17:05:00 +01:00
Fouad 5fb2c9d822 Merge pull request #827 from nymtech/tauri-wallet-patch
Tauri wallet
2021-10-15 15:19:01 +01:00
Jędrzej Stuczyński 0f7280c227 Fixed most recent nightly clippy warnings (#817)
* Fixed most recent nightly clippy warnings

* Missing wasm32 changes
2021-10-15 08:57:16 +01:00
mmsinclair 4ebca86a66 [ci skip] Generate TS types 2021-10-14 15:41:13 +00:00
fmtabbara 1a0c6eed27 Tauri wallet 2021-10-14 16:30:09 +01:00
Bogdan-Ștefan Neacşu 673e13ec57 Change false to true, as for mixnodes (#822) 2021-10-13 19:28:47 +03:00
Jędrzej Stuczyński 7caac334f4 Feature/resending rewards on timeout (#810)
* Additional methods on nymd client

* Checking for time out errors

* Attempting retransmission on suspected time out

* Don't report error if tx is a mempool duplicate
2021-10-11 10:48:59 +01:00
Jędrzej Stuczyński 4e0e081b3e Feature/coconut feature (#805)
* 'Coconut' feature in gateway

* Enabled coconut feature in gateway-requests

* Native client coconut feature

* Ibid for socks5 client

* Ibid for wasm client

* Coconut feature flag for validator-api

* Added coconut feature flag to our CI

* build.yml typo

* Continue on windows errors

* Missing quote

* Another typo in build.yml

* Reclaiming disk space when building for windows on CI
2021-10-11 09:17:58 +01:00
Jędrzej Stuczyński 51dc8c81ed Rocket picking up environment from Rocket.toml again (#801)
* Rocket picking up environment from Rocket.toml again

* Removed unused import
2021-10-08 14:33:29 +01:00
Max H 727eedf7d3 updated docs link 2021-10-05 13:34:18 +02:00
Mark Sinclair e37fddf3ab Network Explorer: GitHub Actions - notification channel 2021-10-05 11:53:17 +01:00
Mark Sinclair 885679e575 Network Explorer: GitHub Actions - notification channel 2021-10-05 11:46:41 +01:00
Mark Sinclair 36554c3c34 Network Explorer: GitHub Actions - notification messages 2021-10-05 11:39:33 +01:00
Mark Sinclair 2197062372 Network Explorer: GitHub Actions - notification messages 2021-10-04 11:22:37 +01:00
Mark Sinclair 487b894f3d Network Explorer: GitHub Actions - send message content via stdin 2021-10-04 10:53:39 +01:00
Mark Sinclair a03603b274 Network Explorer: GitHub Actions - fix JSON quote escaping 2021-10-04 10:45:02 +01:00
Mark Sinclair e6879dba63 Network Explorer: GitHub Actions - handle env differently 2021-10-01 15:47:57 +01:00
Mark Sinclair 68a43e33b9 Network Explorer: GitHub Actions - change notifications to be generated from template files 2021-10-01 15:44:26 +01:00
Bogdan-Ștefan Neacşu db2ab41636 Remove migration code (#796) 2021-10-01 16:55:48 +03:00
Mark Sinclair c624327a7a Network Explorer: GitHub Action - add keybase notifications 2021-10-01 14:28:13 +01:00
Mark Sinclair 32ff5cbc1e Network Explorer: GitHub Actions - fix dist path 2021-09-30 16:02:51 +01:00
Mark Sinclair 9ba203c7b3 Network Explorer: GitHub Actions: rsync install 2021-09-30 15:52:02 +01:00
Mark Sinclair 729625ef4f Network Explorer: GitHub Action: install rsync 2021-09-30 15:49:39 +01:00
Mark Sinclair fd3923a5f9 Network Explorer: GitHub Actions - disable tests 2021-09-30 15:37:52 +01:00
Mark Sinclair c2fd07ea18 Fix typo 2021-09-30 15:29:23 +01:00
Mark Sinclair d76a2d84b5 Add GitHub Action to build Network Explorer 2021-09-30 15:19:23 +01:00
Bogdan-Ștefan Neacşu 2a98f7482d Feature/migrate hidden delegations (#786)
* Remove migration code

* Added function to iterate over delegation of variable type

* Add unit tests

* Refactored some naming and reused mix/gateway functionality

* Borrow bucket instead of move

* Linked with existing delegations function

* Migration of left-over delegations

* Remove unused imports

* Put a gateway test as well, next to the mix one

* Expose queries for all delegations

* Change break point

* Added client side calls to the new queries

* Fix clippy

* Added pagination and read check tests

* Fix gateway test from the last commit

* Test functions for (de)serialization of identity and owner (in)to storage keys

* Add delegation function unit test

* Feature guard import

* Changed UnpackedDelegation from type to struct

* Remove mutable parameter and put start_after in returned value

* Made all delegations into iterator for OOM safety

* Fix clippy

* Add test for delegations iterator size in memory

* Change map with if let for ease of read

* Use DENOM instead of hardcoded value
2021-09-30 15:04:33 +03:00
Jędrzej Stuczyński 12637d93ff Feature/persistent gateway storage (#784)
* Sqlx struct stub

* Initial schema

* Initial error enum

* Managed for persisted shared keys

* Initial inbox manager

* Comments

* Using new database in clients handler

* Extending gateway storage API

* tokio::main + placeholder values

* Removed old client store

* Simplified logic of async packet processing

* Renamed table + not null restriction

* BandwidthManager

* Removed sled dependency

* Using centralised storage for bandwidth

* Dead code removal

* WIP connection_handler split and simplification

Maybe it doesn't look like it right now, but once completed it will remove bunch of redundant checks for Nones etc

* Further more explicit clients handler split

* Minor cleanup

* Temporary store for active client handles

* Fixed error types

* Error trait on iv and encrypted address

* Authentication and registration moved to the handler

* Removal of clients handler

* Further logic simplification + returned explicit bandwidth values

* Further cleanup and comments

* Updated config with relevant changes

* Basic bandwidth tracking in client

* FreshHandle doc comments + fixed stagger issue

* Removed side-effects from .map

* More doc comments

* Database migration on build

* Increased default claimed bandwidth

* Renaming

* Fixed client determining available bandwidth

* Removed dead sql table that might be used in the future

* Windows workaround

* Comment

* Return error rather than cap credential
2021-09-30 09:45:21 +01:00
Jędrzej Stuczyński f63aba9058 Removes code of executed migrations (#793) 2021-09-28 10:13:05 +01:00
Jędrzej Stuczyński 668325a4ce Feature/active sets (#764)
* Added separate gateway active set size

* Grabbing contract state

* Defined PartialOrd on MixnodeBond and GatewayBond

* Some initial stub for active set

* Unit tests for mixnode and gateway bond partialord implementation

* Obtaining active sets

* Active nodes routes

* Additional methods on validator client

* Added state migration

* Feature locking unused import

* Fixed State test fixture

* Included block height for partial_ord

* Missing post-merge imports

* api on the client for active nodes

* Native/socks5/wasm clients using active nodes

* Rewarding only active nodes

* Updated validator client StateParams definition

* Gateway active set size

* Contract migration update

* Cargo fmt

* Updated TauriStateParams

* [ci skip] Generate TS types

Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com>
2021-09-28 09:38:22 +01:00
Jędrzej Stuczyński e891c68158 Created getters for AccountData (#787) 2021-09-27 12:16:16 +02:00
Jędrzej Stuczyński b1fb032f43 Removed SQLx offline mode artifact (#790) 2021-09-27 12:06:13 +02:00
Jędrzej Stuczyński 23ea82952e Bugfix/validator api windows build (#791)
* Use https://github.com/nymtech/nym/pull/784/commits/3eceb349c695372cbb7a3bee9aa5e090da7c9c4d trick to make build.rs work with windows

* Re-enabled validator-api windows CI build
2021-09-27 12:05:53 +02:00
Drazen Urch 9a65e44166 Add Tauri wallet
--
Squashed commit of the following:

commit 3f4f9073b7
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Mon Sep 27 11:38:12 2021 +0200

    Delete .lock for merge

commit bf502f6338
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Mon Sep 27 11:36:51 2021 +0200

    Squashed commit of the following:

    commit 020cad897d
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Fri Sep 24 15:49:21 2021 +0100

        Feature/rust rewarding (#750)

        * Calculating gas fees

        * Ability to set custom fees

        * Added extra test

        * Removed commented code

        * Moved all msg types to common contract crate

        * Temporarily disabling get_tx method

        * Finishing up nymd client API

        * Comment fix

        * Remaining fee values

        * Some cleanup

        * Removed needless borrow

        * Fixed imports in contract tests

        * Moved error types around

        * New ValidatorClient

        * Experiment with new type of defaults

        * Removed dead module

        * Dealt with unwrap

        * Migrated mixnode to use new validator client

        * Migrated gateway to use new validator client

        * Mixnode and gateway adjustments

        * More exported defaults

        * Clients using new validator client

        * Fixed mixnode upgrade

        * Moved default values to a new crate

        * Changed behaviour of validator client features

        * Migrated basic functions of validator api

        * Updated config + fixed startup

        * Fixed wasm client build

        * Integration with the explorer api

        * Removed tokio dev dependency

        * Needless borrow

        * Fixex wasm client build

        * Fixed tauri client build

        * Needless borrows

        * New tables for rewarding

        * Updated cosmos-sdk version

        * Removed reward-specific node status routes

        * New rewarding-specific config entries

        * Additional network defaults

        * Initial periodic rewards from validator api

        * Replaced print with log

        * Filtering nodes with uptime > 0

        * Additional failure logging statements

        * Fixed operation ordering

        * Adjusted next rewarding epoch determination

        * Modified rewarding behaviour to keep track of rewarding in progress

        * Improved error message on config load failure

        * Additional log statement

        * Adjusted rewarding gas limit calculation

        * Made naming slightly more consistent

        * Fixed incorrect parentheses placement

        * Fixed fee calculation

        * Cargo fmt

        * Removed failed merge artifacts

        * Introduced comment for any future reward modification

        * typos

        * Helper functions for the future

        * Making @mfahampshire 's life easier

        * Redesigned epoch + rewarding skipped epochs (if possible)

        * Removed old merge artifacts

        * Naming consistency

        * Constraining arguments

        * Removed unnecessary if branch

        * Ignore monitor check for current epoch

        * Additional checks for current epoch data

        * Monitor threshold check

        * cargo fmt

        * Fixed post-merge issues in transactions.rs

    commit 5dfaff6296
    Author: Drazen Urch <drazen@urch.eu>
    Date:   Tue Sep 21 10:59:17 2021 +0200

        Update hmac and blake3 (#673)

        * Update hmac and blake3

        * Remain paranoid for `0.*` crates

        * Most paranoid versions :)

        * Updated aes and using published version of blake3

        Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>

    commit 5b03982043
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Mon Sep 20 10:40:03 2021 +0100

        Replaced unwrap_or_else with unwrap_or_default (#780)

    commit 8f6856d6fb
    Author: Drazen Urch <drazen@urch.eu>
    Date:   Mon Sep 20 11:15:06 2021 +0200

        Make fee helpers public (#777)

        Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>

commit 80664b911f
Merge: f66ea059 46149012
Author: Fouad <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 23 20:59:27 2021 +0100

    Merge pull request #783 from nymtech/tauri-wallet-frontend

    tauri wallet front-end

commit 46149012bd
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 23 17:42:34 2021 +0100

    PR updates

commit de601c319a
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 23 17:06:47 2021 +0100

    PR updates

commit 7318de23f2
Author: max <mfahampshire@gmail.com>
Date:   Wed Sep 22 18:07:29 2021 +0200

    added info on nym-wallet (tauri) in readme

commit 56e07753ea
Author: max <mfahampshire@gmail.com>
Date:   Wed Sep 22 14:44:22 2021 +0200

    added minimal readme for wallet

commit 21b008fae9
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 13 13:30:05 2021 +0100

    use wrapper functions for send and delegate

    form updates

    update working

    finish bonding and unbonding setup

    funds allocation check when bonding/sending/delegating

    update title

commit 27a202cbe8
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 17 11:32:41 2021 +0100

    integrate admin functions

    updates

    integrate admin form update function

commit 085538582b
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Fri Sep 17 10:43:26 2021 +0200

    Admin functions, reorganize code

commit f66ea05929
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Fri Sep 17 10:43:26 2021 +0200

    Admin functions, reorganize code

commit 052c7188ec
Merge: f6c316ee 976dd7aa
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 17 09:38:19 2021 +0100

    merge develop

commit f6c316eea9
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Thu Sep 16 18:02:15 2021 +0200

    fix typo

commit f33defc645
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Thu Sep 16 17:36:24 2021 +0200

    Squashed commit of the following:

    commit 976dd7aae2
    Author: Drazen Urch <drazen@urch.eu>
    Date:   Wed Sep 15 17:28:49 2021 +0200

        Add block_height method to Delegation (#778)

        Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>

    commit 0d21f4e937
    Merge: e84af4f6 1403449a
    Author: Fouad <fmtabbara@hotmail.co.uk>
    Date:   Wed Sep 15 12:41:29 2021 +0100

        Merge pull request #776 from nymtech/update/re-enable-bonding

        re-enable bonding

    commit 1403449ad5
    Author: fmtabbara <fmtabbara@hotmail.co.uk>
    Date:   Tue Sep 14 16:00:21 2021 +0100

        enable bonding

    commit e84af4f601
    Author: Drazen Urch <drazen@urch.eu>
    Date:   Tue Sep 14 15:15:26 2021 +0200

        Migrate legacy delegation data (#771)

        * Skip ReadOnlyBucket deserialization errors

        * empty migration

        * clippy

        * cargo schema

        * Drop invalid delegation data

        * Dont drop old data

        * Add todo

        * Unify on type param

        * gateways are different

        * cargo fmt

        Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>

    commit 26b032c15c
    Merge: e1ddaff0 cba36253
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Tue Sep 14 10:09:14 2021 +0100

        Merge pull request #774 from nymtech/feature/explorer-api-delegations

        Explorer-api: add API resource to show the delegations for each mix node

    commit cba3625394
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Mon Sep 13 10:33:41 2021 +0100

        explorer-api: add API resource to show the delegations for each mix node

    commit e1ddaff04d
    Merge: 0b9c03ca 66ab5de4
    Author: Fouad <fmtabbara@hotmail.co.uk>
    Date:   Fri Sep 10 17:17:14 2021 +0100

        Merge pull request #772 from nymtech/update/disable-bonding

        add app alert

    commit 66ab5de442
    Author: fmtabbara <fmtabbara@hotmail.co.uk>
    Date:   Fri Sep 10 16:16:58 2021 +0100

        add app alert

    commit 0b9c03ca90
    Author: Dave Hrycyszyn <futurechimp@users.noreply.github.com>
    Date:   Fri Sep 10 11:23:21 2021 +0300

        Adding deps for building the Tauri wallet under Ubuntu (#770)

    commit c9dce0c1da
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Thu Sep 9 11:21:45 2021 +0200

        Feature/consumable bandwidth (#766)

        * Set actual value for bandwidth

        Also put it as a public attribute, such that it can be actively used
        by the credential consumer

        * Switch from sending Attribute structs to sending the actual attribute bytes over the wire

        * Add atomic bandwidth value to gateway

        * Consume bandwidth based on the mix packet size

        * Use Bandwidth struct for specific functionality

        * Move bandwidth code outside the dependency path of wasm client

        * Use u64 instead of AtomicU64, as the handling is not parallel

    commit e00e77db15
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Wed Sep 8 15:07:24 2021 +0200

        Feature/bond blockstamp (#760)

        * Add block_height to MixNode/GatewayBond

        * Reward based on blockstamp of bonded node or of delegation

        * Add specific tests

        * Add migration code

        * Apply doc nit

    commit 1074449f91
    Merge: 08276e6e 9a3d824a
    Author: Fouad <fmtabbara@hotmail.co.uk>
    Date:   Tue Sep 7 23:45:10 2021 +0100

        Merge pull request #767 from nymtech/update/remove-app-alert

        remove alert

    commit 08276e6e42
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Tue Sep 7 16:33:30 2021 +0200

        Remove migration code (#759)

    commit 9a3d824a4a
    Author: fmtabbara <fmtabbara@hotmail.co.uk>
    Date:   Mon Sep 6 20:39:24 2021 +0100

        remove alert

    commit 2789ee8f18
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Fri Sep 3 15:30:45 2021 +0300

        Update coconut-rs and use hash_to_scalar from there (#765)

        Failed tests are due to some nightly issue, not related to this PR

    commit a7ba643c35
    Merge: 28be53ee c42f3c68
    Author: Fouad <fmtabbara@hotmail.co.uk>
    Date:   Fri Sep 3 09:14:50 2021 +0100

        Merge pull request #762 from nymtech/feature/app-alert

        add app alert banner

    commit 28be53eefb
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Thu Sep 2 18:26:40 2021 +0300

        Add block_height in the Delegation structure as well (#757)

    commit 219c45a352
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Thu Sep 2 15:48:29 2021 +0100

        Updated cosmos-sdk (#761)

        * Updated cosmos-sdk

        * Re-exposing more things

    commit 1a3b83752e
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Thu Sep 2 15:45:56 2021 +0100

        Bump next from 11.1.0 to 11.1.1 in /wallet-web (#758)

        Bumps [next](https://github.com/vercel/next.js) from 11.1.0 to 11.1.1.
        - [Release notes](https://github.com/vercel/next.js/releases)
        - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
        - [Commits](https://github.com/vercel/next.js/compare/v11.1.0...v11.1.1)

        ---
        updated-dependencies:
        - dependency-name: next
          dependency-type: direct:production
        ...

        Signed-off-by: dependabot[bot] <support@github.com>

        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit c42f3c6844
    Author: fmtabbara <fmtabbara@hotmail.co.uk>
    Date:   Thu Sep 2 12:29:47 2021 +0100

        add app alert banner

    commit a5d3ba3900
    Merge: 92e13a5d cdf0d443
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Tue Aug 31 15:59:11 2021 +0100

        Merge pull request #755 from nymtech/bugfix/explorer-api-ping

        Explorer API: port test now split out address resolution and add units tests

    commit cdf0d44341
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Tue Aug 31 14:37:28 2021 +0100

        explorer-api: turned down logging from `error` to `warn`

    commit 92f976a45d
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Fri Aug 27 11:34:21 2021 +0100

        explorer-api: sanitize hostname before running checks to avoid leading or trailing spaces that are known to exist in the current test net

    commit 2bc858cde3
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Fri Aug 27 09:32:26 2021 +0100

        explorer-api: port test: split out address resolution and add units tests

    commit 92e13a5d00
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Tue Aug 31 14:51:15 2021 +0300

        Feature/add blockstamp (#756)

        * Add RawDelegationData

        * Fix current tests for the new stored data

        * Added migration commit. Will be reverted after doing the migration

        * New tests for block height

        * Use current blockstamp instead of 24h old one

        * Put _alot_ of migration stuff in the migrate function scope

    commit 122f5d9f2e
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Mon Aug 30 10:27:20 2021 +0300

        Feature/cred after handshake (#745)

        * Call perform_initial_authentication instead of register in clients

        * Refactor the register/authenticate functions a bit

        * Introduce Bandwidth request type

        * Add encryption layer to cred

        * Remove cred pass and check from handshake

        * Replaced unreachable!  with error

        * Changed decrypt_tagged signature to not take mutable ownership of data

        * Put handle_bandwidth work inside a function

        * Add check before unwrap

        * Remove unnecessary async

        * Decouple bandwidth credential from authentication

        * Use new_error for ServerResponse:Error

        * Send a fresh IV each time the BandwidthCredential request is sent

        * Remove unwrap of bincode::serialize

        * Add comment regarding Bandwidth response

        * Remove _mut from naming

        * Leave Debug trait alone, as the initial error doesn't reproduce anymore

        * Pass iv as Vec<u8> instead of base58 string

        * Renamed AuthenticationIV to IV, as it is now used for more the just authentication

        * Did some IV refactorization

    commit 982ee0266c
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Fri Aug 27 16:02:34 2021 +0300

        Feature/get own delegations (#748)

        * Introduce reverse delegation bucket

        * Add client command

        * Fix clippy error

        * Added tests in queries

        * Add tests in transactions

        * Migration code. Will be reverted after it's called on testnet

        * Replace unwrap with expect

        * Move some test code in the right file...

        ... to remove unnecessary auxiliary function.

        * Reduce the scope to migration auxiliary functions

        * Rename everything from [node]reverse to reverse[node]

        * Fix fmt

    commit 5f42a9bd05
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Fri Aug 27 13:52:18 2021 +0100

        NetworkMonitorBuilder - starting the monitor after rocket has launched (#754)

        * NetworkMonitorBuilder - starting the monitor after rocket has launched

        * Removed unused import

    commit 1811df9ddb
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Fri Aug 27 13:52:10 2021 +0100

        Enabled validators api argument (#753)

    commit 6bdfe7f895
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Thu Aug 26 11:21:01 2021 +0100

        Correctly bounding nominator of uptime calculation (#752)

    commit c6b286a1db
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Wed Aug 25 14:50:57 2021 +0100

        Fixed argument parsing for ipv6 'good' topology (#751)

    commit b3568a26f5
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Tue Aug 24 11:25:05 2021 +0300

        Revert "Migration commit, will be reverted after the testnet contract is updated" (#749)

        This reverts commit 38d868bcce.

    commit 15ae0f521e
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Mon Aug 23 10:26:51 2021 +0100

        Feature/more reliable uptime calculation (#747)

        * New database table holding monitor run info

        * SQL interface for new table

        * Updated uptime calculation to instead rely on number of monitor test runs

    commit 2923d4b872
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Thu Aug 19 22:03:07 2021 +0300

        Update template toml key (#746)

commit 424230c3bb
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Thu Sep 16 17:33:20 2021 +0200

    Squashed commit of the following:

    commit cddd9e8e4c
    Merge: 40fbdff0 976dd7aa
    Author: Drazen Urch <durch@users.noreply.guthub.com>
    Date:   Thu Sep 16 17:27:27 2021 +0200

        Merge branch 'develop' into tauri-wallet

    commit 976dd7aae2
    Author: Drazen Urch <drazen@urch.eu>
    Date:   Wed Sep 15 17:28:49 2021 +0200

        Add block_height method to Delegation (#778)

        Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>

    commit 0d21f4e937
    Merge: e84af4f6 1403449a
    Author: Fouad <fmtabbara@hotmail.co.uk>
    Date:   Wed Sep 15 12:41:29 2021 +0100

        Merge pull request #776 from nymtech/update/re-enable-bonding

        re-enable bonding

    commit 1403449ad5
    Author: fmtabbara <fmtabbara@hotmail.co.uk>
    Date:   Tue Sep 14 16:00:21 2021 +0100

        enable bonding

    commit e84af4f601
    Author: Drazen Urch <drazen@urch.eu>
    Date:   Tue Sep 14 15:15:26 2021 +0200

        Migrate legacy delegation data (#771)

        * Skip ReadOnlyBucket deserialization errors

        * empty migration

        * clippy

        * cargo schema

        * Drop invalid delegation data

        * Dont drop old data

        * Add todo

        * Unify on type param

        * gateways are different

        * cargo fmt

        Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>

    commit 26b032c15c
    Merge: e1ddaff0 cba36253
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Tue Sep 14 10:09:14 2021 +0100

        Merge pull request #774 from nymtech/feature/explorer-api-delegations

        Explorer-api: add API resource to show the delegations for each mix node

    commit cba3625394
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Mon Sep 13 10:33:41 2021 +0100

        explorer-api: add API resource to show the delegations for each mix node

    commit e1ddaff04d
    Merge: 0b9c03ca 66ab5de4
    Author: Fouad <fmtabbara@hotmail.co.uk>
    Date:   Fri Sep 10 17:17:14 2021 +0100

        Merge pull request #772 from nymtech/update/disable-bonding

        add app alert

    commit 66ab5de442
    Author: fmtabbara <fmtabbara@hotmail.co.uk>
    Date:   Fri Sep 10 16:16:58 2021 +0100

        add app alert

    commit 0b9c03ca90
    Author: Dave Hrycyszyn <futurechimp@users.noreply.github.com>
    Date:   Fri Sep 10 11:23:21 2021 +0300

        Adding deps for building the Tauri wallet under Ubuntu (#770)

    commit c9dce0c1da
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Thu Sep 9 11:21:45 2021 +0200

        Feature/consumable bandwidth (#766)

        * Set actual value for bandwidth

        Also put it as a public attribute, such that it can be actively used
        by the credential consumer

        * Switch from sending Attribute structs to sending the actual attribute bytes over the wire

        * Add atomic bandwidth value to gateway

        * Consume bandwidth based on the mix packet size

        * Use Bandwidth struct for specific functionality

        * Move bandwidth code outside the dependency path of wasm client

        * Use u64 instead of AtomicU64, as the handling is not parallel

    commit e00e77db15
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Wed Sep 8 15:07:24 2021 +0200

        Feature/bond blockstamp (#760)

        * Add block_height to MixNode/GatewayBond

        * Reward based on blockstamp of bonded node or of delegation

        * Add specific tests

        * Add migration code

        * Apply doc nit

    commit 1074449f91
    Merge: 08276e6e 9a3d824a
    Author: Fouad <fmtabbara@hotmail.co.uk>
    Date:   Tue Sep 7 23:45:10 2021 +0100

        Merge pull request #767 from nymtech/update/remove-app-alert

        remove alert

    commit 08276e6e42
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Tue Sep 7 16:33:30 2021 +0200

        Remove migration code (#759)

    commit 9a3d824a4a
    Author: fmtabbara <fmtabbara@hotmail.co.uk>
    Date:   Mon Sep 6 20:39:24 2021 +0100

        remove alert

    commit 2789ee8f18
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Fri Sep 3 15:30:45 2021 +0300

        Update coconut-rs and use hash_to_scalar from there (#765)

        Failed tests are due to some nightly issue, not related to this PR

    commit a7ba643c35
    Merge: 28be53ee c42f3c68
    Author: Fouad <fmtabbara@hotmail.co.uk>
    Date:   Fri Sep 3 09:14:50 2021 +0100

        Merge pull request #762 from nymtech/feature/app-alert

        add app alert banner

    commit 28be53eefb
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Thu Sep 2 18:26:40 2021 +0300

        Add block_height in the Delegation structure as well (#757)

    commit 219c45a352
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Thu Sep 2 15:48:29 2021 +0100

        Updated cosmos-sdk (#761)

        * Updated cosmos-sdk

        * Re-exposing more things

    commit 1a3b83752e
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Thu Sep 2 15:45:56 2021 +0100

        Bump next from 11.1.0 to 11.1.1 in /wallet-web (#758)

        Bumps [next](https://github.com/vercel/next.js) from 11.1.0 to 11.1.1.
        - [Release notes](https://github.com/vercel/next.js/releases)
        - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
        - [Commits](https://github.com/vercel/next.js/compare/v11.1.0...v11.1.1)

        ---
        updated-dependencies:
        - dependency-name: next
          dependency-type: direct:production
        ...

        Signed-off-by: dependabot[bot] <support@github.com>

        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit c42f3c6844
    Author: fmtabbara <fmtabbara@hotmail.co.uk>
    Date:   Thu Sep 2 12:29:47 2021 +0100

        add app alert banner

    commit a5d3ba3900
    Merge: 92e13a5d cdf0d443
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Tue Aug 31 15:59:11 2021 +0100

        Merge pull request #755 from nymtech/bugfix/explorer-api-ping

        Explorer API: port test now split out address resolution and add units tests

    commit cdf0d44341
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Tue Aug 31 14:37:28 2021 +0100

        explorer-api: turned down logging from `error` to `warn`

    commit 92f976a45d
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Fri Aug 27 11:34:21 2021 +0100

        explorer-api: sanitize hostname before running checks to avoid leading or trailing spaces that are known to exist in the current test net

    commit 2bc858cde3
    Author: Mark Sinclair <mmsinclair@gmail.com>
    Date:   Fri Aug 27 09:32:26 2021 +0100

        explorer-api: port test: split out address resolution and add units tests

    commit 92e13a5d00
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Tue Aug 31 14:51:15 2021 +0300

        Feature/add blockstamp (#756)

        * Add RawDelegationData

        * Fix current tests for the new stored data

        * Added migration commit. Will be reverted after doing the migration

        * New tests for block height

        * Use current blockstamp instead of 24h old one

        * Put _alot_ of migration stuff in the migrate function scope

    commit 122f5d9f2e
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Mon Aug 30 10:27:20 2021 +0300

        Feature/cred after handshake (#745)

        * Call perform_initial_authentication instead of register in clients

        * Refactor the register/authenticate functions a bit

        * Introduce Bandwidth request type

        * Add encryption layer to cred

        * Remove cred pass and check from handshake

        * Replaced unreachable!  with error

        * Changed decrypt_tagged signature to not take mutable ownership of data

        * Put handle_bandwidth work inside a function

        * Add check before unwrap

        * Remove unnecessary async

        * Decouple bandwidth credential from authentication

        * Use new_error for ServerResponse:Error

        * Send a fresh IV each time the BandwidthCredential request is sent

        * Remove unwrap of bincode::serialize

        * Add comment regarding Bandwidth response

        * Remove _mut from naming

        * Leave Debug trait alone, as the initial error doesn't reproduce anymore

        * Pass iv as Vec<u8> instead of base58 string

        * Renamed AuthenticationIV to IV, as it is now used for more the just authentication

        * Did some IV refactorization

    commit 982ee0266c
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Fri Aug 27 16:02:34 2021 +0300

        Feature/get own delegations (#748)

        * Introduce reverse delegation bucket

        * Add client command

        * Fix clippy error

        * Added tests in queries

        * Add tests in transactions

        * Migration code. Will be reverted after it's called on testnet

        * Replace unwrap with expect

        * Move some test code in the right file...

        ... to remove unnecessary auxiliary function.

        * Reduce the scope to migration auxiliary functions

        * Rename everything from [node]reverse to reverse[node]

        * Fix fmt

    commit 5f42a9bd05
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Fri Aug 27 13:52:18 2021 +0100

        NetworkMonitorBuilder - starting the monitor after rocket has launched (#754)

        * NetworkMonitorBuilder - starting the monitor after rocket has launched

        * Removed unused import

    commit 1811df9ddb
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Fri Aug 27 13:52:10 2021 +0100

        Enabled validators api argument (#753)

    commit 6bdfe7f895
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Thu Aug 26 11:21:01 2021 +0100

        Correctly bounding nominator of uptime calculation (#752)

    commit c6b286a1db
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Wed Aug 25 14:50:57 2021 +0100

        Fixed argument parsing for ipv6 'good' topology (#751)

    commit b3568a26f5
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Tue Aug 24 11:25:05 2021 +0300

        Revert "Migration commit, will be reverted after the testnet contract is updated" (#749)

        This reverts commit 38d868bcce.

    commit 15ae0f521e
    Author: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
    Date:   Mon Aug 23 10:26:51 2021 +0100

        Feature/more reliable uptime calculation (#747)

        * New database table holding monitor run info

        * SQL interface for new table

        * Updated uptime calculation to instead rely on number of monitor test runs

    commit 2923d4b872
    Author: Bogdan-Ștefan Neacşu <bogdan@nymtech.net>
    Date:   Thu Aug 19 22:03:07 2021 +0300

        Update template toml key (#746)

commit cddd9e8e4c
Merge: 40fbdff0 976dd7aa
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Thu Sep 16 17:27:27 2021 +0200

    Merge branch 'develop' into tauri-wallet

commit 63bc42cd5f
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 16 10:01:53 2021 +0100

    update title

commit 9dc8ba7b77
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 15 21:39:18 2021 +0100

    funds allocation check when bonding/sending/delegating

commit e130131f16
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 15 20:37:24 2021 +0100

    finish bonding and unbonding setup

commit 64a5b4b593
Merge: 9934b9bc 40fbdff0
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Sep 14 12:08:38 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    rust updates

commit 40fbdff05a
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Tue Sep 14 10:29:31 2021 +0200

    Coin and denom tests

commit 9934b9bc8a
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 13 15:20:56 2021 +0100

    update working

commit 6954b383a7
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 13 14:26:21 2021 +0100

    form updates

commit 4b5276e816
Merge: 56a95274 0278bd2c
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 13 13:32:24 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    rust updates

commit 0278bd2c26
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Mon Sep 13 14:31:33 2021 +0200

    Fix coin to cosmwasm coin

commit 56a9527497
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 13 13:30:05 2021 +0100

    use wrapper functions for send and delegate

commit a601c28a20
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Mon Sep 13 13:07:57 2021 +0200

    Return useful info from bond/unbond

commit 005dd7513b
Merge: 3ebdc558 aaf5d186
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Mon Sep 13 12:58:01 2021 +0200

    Merge branch 'tauri-wallet-frontend' into tauri-wallet

commit 3ebdc55847
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Mon Sep 13 12:50:26 2021 +0200

    extract Coin and Denom

commit aaf5d18692
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 13 11:19:28 2021 +0100

    update admin component

commit bcbec1f3e6
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sun Sep 12 21:49:39 2021 +0100

    admin form style updates

commit c95005265d
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sun Sep 12 01:26:57 2021 +0100

    button updates

commit b299c9e4b5
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sun Sep 12 01:03:21 2021 +0100

    add qrcode to receive page

commit bacbd3dfce
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sun Sep 12 00:40:53 2021 +0100

    fix bug

commit 55561fe1f7
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sun Sep 12 00:26:15 2021 +0100

    add admin page

commit 0d01500b87
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sat Sep 11 00:35:14 2021 +0100

    remove login deets

commit 74e34567b4
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sat Sep 11 00:32:54 2021 +0100

    form updates

commit b77025bfd5
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sat Sep 11 00:10:03 2021 +0100

    form updates

commit 4d831efcd6
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 10 22:33:00 2021 +0100

    more fees work

commit d227d20385
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 10 17:31:04 2021 +0100

    add gas fees to bond form

commit fb2d3bae3c
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 10 14:17:24 2021 +0100

    use new getFee api

commit 967d74eb19
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 10 11:15:52 2021 +0100

    add nvmrc file

commit 228df278d9
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 10 11:13:18 2021 +0100

    update tsconfig

commit 37da23ab1c
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 10 09:56:04 2021 +0100

    set up global error handling

commit 0c9cf7b5d9
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 10 09:16:45 2021 +0100

    finish create account

commit 262149078c
Merge: 08fd1c1b 3bcbb901
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 9 19:21:38 2021 +0100

    rust updates

commit 08fd1c1b47
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 9 19:00:30 2021 +0100

    make getBalance global

commit 3bcbb90127
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Thu Sep 9 17:47:11 2021 +0200

    fix docs

commit 8156ed0029
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Thu Sep 9 17:43:56 2021 +0200

    get_fee, create_new_account

commit 265f7a7c2e
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Thu Sep 9 13:21:27 2021 +0200

    Dedicated workspace, random_mnemonic, gas_limits

commit 5de8c9d1ed
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 9 11:35:49 2021 +0100

    style updates

commit 7658eec9b9
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 9 09:16:38 2021 +0100

    create account page

commit 99c49581df
Merge: 7a8ad138 926689da
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 8 20:49:27 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    rust updates

commit 926689da1d
Merge: 714171f4 b40be179
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Wed Sep 8 11:54:49 2021 +0200

    Merge branch 'tauri-wallet' of https://github.com/nymtech/nym into tauri-wallet

commit 714171f4e5
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Wed Sep 8 11:54:36 2021 +0200

    redundant into

commit 7a8ad1387d
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 8 10:30:51 2021 +0100

    add eslint file

commit bd72426280
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Sep 7 23:44:02 2021 +0100

    start adding gas fees

commit 48d0f31d7e
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Sep 7 23:13:54 2021 +0100

    send updates

commit 4522c18a55
Merge: b9389f12 b40be179
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Sep 7 21:53:38 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    rust updates

commit b9389f1235
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Sep 7 21:53:05 2021 +0100

    send updates

commit b40be179ae
Author: durch <durch@users.noreply.github.com>
Date:   Tue Sep 7 12:37:24 2021 +0000

    [ci skip] Generate TS types

commit 32ef9e019e
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Tue Sep 7 14:26:48 2021 +0200

    More verbose send response

commit 45a56a7088
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 6 20:27:15 2021 +0100

    update logo

commit d50afd6113
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Mon Sep 6 20:00:47 2021 +0200

    Add coconut creds

commit 3205b1e0e6
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 6 16:42:56 2021 +0100

    start work on send form

commit 53ea8486f8
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Mon Sep 6 17:36:46 2021 +0200

    get_gas_price, get_gas_limits

commit 43ababf8d4
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Mon Sep 6 17:31:08 2021 +0200

    Rework client errors

commit 5461574023
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 6 13:23:20 2021 +0100

    small refactors

commit 01d2df7bb7
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Sep 6 11:12:39 2021 +0100

    set up form validation for undelegation

commit 7cff72757b
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sun Sep 5 00:07:46 2021 +0100

    set up delgate request

commit 5bcbf45d16
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Sat Sep 4 22:52:02 2021 +0100

    onerror onsuccess added to bond form

commit 4295d75e0f
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 16:53:32 2021 +0100

    format bonding data pre request

commit 018666a614
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 16:37:51 2021 +0100

    layout updates

commit 15048524a7
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 16:25:15 2021 +0100

    layout updates

commit 2b792945cc
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 15:07:38 2021 +0100

    update type roots

commit b6193270a6
Merge: 0b4a8fe6 29973379
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 15:02:56 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    rust updates

commit 0b4a8fe657
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 15:02:09 2021 +0100

    update type roots

commit 2997337948
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Fri Sep 3 15:29:20 2021 +0200

    printable balance should be major

commit e1bea43ff4
Author: Drazen Urch <drazen@urch.eu>
Date:   Fri Sep 3 15:22:48 2021 +0200

    Autogenerate types (#763)

    * Generate TS types on push

    * run shell

    * fix typo

    * pango

    * libpango-dev

    * hopefully all deps are in now :)

    Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>

commit 27ef28da8d
Merge: 42bf139e 87a0b05d
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 12:13:28 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    rust updates

commit 42bf139ebb
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 12:12:52 2021 +0100

    update args collection function

commit 352862e4d0
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 11:42:31 2021 +0100

    delegation form validation

commit 9f9ab010d8
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Sep 3 11:39:17 2021 +0100

    integrate rust generated types

commit 87a0b05d1a
Author: Drazen Urch <drazen@urch.eu>
Date:   Fri Sep 3 07:43:29 2021 +0200

    Send

commit dbf82da9b6
Author: Drazen Urch <drazen@urch.eu>
Date:   Fri Sep 3 07:36:02 2021 +0200

    Delegation docs

commit 01a4305883
Author: Drazen Urch <drazen@urch.eu>
Date:   Fri Sep 3 07:33:11 2021 +0200

    Delegation

commit 704b3241ee
Author: Drazen Urch <drazen@urch.eu>
Date:   Fri Sep 3 06:58:57 2021 +0200

    Gateway bonding

commit 4513edae46
Merge: 5d3f1b86 f020b211
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 2 21:38:19 2021 +0100

    rust updates

commit f020b21106
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Thu Sep 2 21:08:19 2021 +0200

    node unbond

commit 2587906473
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Thu Sep 2 20:57:10 2021 +0200

    TS exports, rework internals

commit 5d3f1b86e8
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 2 17:29:03 2021 +0100

    delegate form validation

commit 5a17e48581
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 2 16:11:54 2021 +0100

    finish bond form validation

commit 41356f2181
Merge: bd7d7887 63107c2b
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 2 10:10:55 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    merge rust updates

commit bd7d788741
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Thu Sep 2 10:10:18 2021 +0100

    more validation work

commit 63107c2bca
Author: Drazen Urch <drazen@urch.eu>
Date:   Thu Sep 2 10:27:49 2021 +0200

    WIP node bonding

commit f043639ad2
Merge: 1d2a1b26 6fb15fff
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 1 19:48:22 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    merge rust update

commit 1d2a1b2635
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 1 19:47:41 2021 +0100

    start form validation

commit 6fb15fff8b
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Wed Sep 1 16:33:29 2021 +0200

    printable_balance

commit c69d7fa46f
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 1 15:12:50 2021 +0100

    remove unused imports

commit c2ee02a2cf
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 1 15:12:25 2021 +0100

    use printable balance

commit 6f5f0c00b5
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 1 15:11:24 2021 +0100

    use printable balance

commit 12707c5f1e
Merge: 2aa7fa04 0daf89ee
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 1 14:59:27 2021 +0100

    merge rust updates

commit 0daf89eeb4
Author: Drazen Urch <drazen@urch.eu>
Date:   Wed Sep 1 15:14:50 2021 +0200

    Utility native <> printable functions

commit 2aa7fa0426
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 1 13:41:42 2021 +0100

    move balance function call to global state

commit f5aa6e2db2
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Sep 1 09:39:22 2021 +0100

    style updates

commit ee5d1c3419
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 31 20:57:21 2021 +0100

    fix nav styling

commit e68c261162
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 31 20:48:30 2021 +0100

    fix ts error

commit c7fe4cd24e
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 31 15:28:46 2021 +0100

    update imports

commit 1c690fc3d0
Merge: d8e6a5fb f56edb82
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 31 15:24:35 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    merge rust updates

commit f56edb825a
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Tue Aug 31 15:22:10 2021 +0200

    Fix client address

commit d8e6a5fb2e
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 31 12:55:13 2021 +0100

    make typescript happy

commit b95893bb02
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 31 11:20:12 2021 +0100

    update balance page

commit 6bdff701b4
Merge: ccdb5911 eff38c84
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 31 11:05:51 2021 +0100

    merge backend updates

commit ccdb5911c6
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 31 09:35:24 2021 +0100

    update routing and use new sign in function

commit eff38c8466
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Tue Aug 31 07:38:25 2021 +0200

    some cleanup, get blockchain stuff working

commit 5f4fabc0b8
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Fri Aug 27 15:17:15 2021 +0200

    Add internal documentation scaffolding

commit e2dd1cc9ae
Merge: c7e622f2 42f75028
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Aug 25 14:51:29 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    connect with mnemonic update

commit 42f75028bc
Author: Drazen Urch <durch@users.noreply.guthub.com>
Date:   Wed Aug 25 15:44:08 2021 +0200

    Resolve state deadlock

commit c7e622f284
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Aug 25 14:06:37 2021 +0100

    begin sign in rust integration

commit 248da351c6
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Aug 25 14:05:00 2021 +0100

    use color palette object

commit fe1c8a3b08
Merge: 84af9233 1bc17abb
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Aug 25 10:36:11 2021 +0100

    Merge branch 'tauri-wallet' into tauri-wallet-frontend
    merge rust api updates

commit 84af923389
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Wed Aug 25 10:35:42 2021 +0100

    update receive to use state value

commit 1bc17abbaa
Author: Drazen Urch <drazen@urch.eu>
Date:   Wed Aug 25 11:18:16 2021 +0200

    Add connect_with_mnemonic and get_balance tauri functions

commit b8c2735520
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 24 16:12:08 2021 +0100

    cargo lock update

commit 67fd4367ef
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 24 16:08:55 2021 +0100

    global theme update

commit 4540d2c447
Merge: ce757697 4ad25114
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 24 12:56:59 2021 +0100

    Merge branch 'feature/tauri-wallet-ui' into tauri-wallet
    merge with rust updates

commit 4ad25114c3
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 24 12:46:34 2021 +0100

    update nav cards

commit 3ce7888c07
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 24 11:59:10 2021 +0100

    address and balance cards

commit ce75769703
Author: Drazen Urch <drazen@urch.eu>
Date:   Tue Aug 24 12:54:49 2021 +0200

    Bootstrap nymd client with config

commit 66210658cb
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Tue Aug 24 10:35:54 2021 +0100

    add favicon

commit 728da763b3
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 22:54:30 2021 +0100

    fix padding issue

commit 3da08ee33c
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 22:49:39 2021 +0100

    style updates

commit 55977185fd
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 22:04:26 2021 +0100

    add unbond and undelegte pages

commit 1c8c0a47bc
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 21:34:14 2021 +0100

    receive page adjust margin

commit c161b2fe71
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 21:32:29 2021 +0100

    send wizard updates

commit eb91c1180d
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 17:23:25 2021 +0100

    update balance page

commit 13e357637b
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 17:18:07 2021 +0100

    style updates

commit 54c4bdb7d2
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 17:12:40 2021 +0100

    send wizard update

commit 9b5f50913f
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 14:56:52 2021 +0100

    add send wizard

commit 7cfa35b542
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 11:18:13 2021 +0100

    style updates

commit 581a6b0a6f
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 10:38:56 2021 +0100

    update nav bar

commit 85f23eb3d1
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 10:38:42 2021 +0100

    create delegation page

commit 17100fa7da
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Mon Aug 23 10:38:17 2021 +0100

    create node type selector component

commit 24af0c94bf
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Aug 20 22:26:14 2021 +0100

    add bond form

commit 8ec9e3121f
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Aug 20 17:35:59 2021 +0100

    side bar updates

commit 498dbb8ba3
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Aug 20 12:24:04 2021 +0100

    add balance page

commit 7345bd8148
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Aug 20 11:51:27 2021 +0100

    update navigation style

commit b405d2e4af
Author: fmtabbara <fmtabbara@hotmail.co.uk>
Date:   Fri Aug 20 09:03:21 2021 +0100

    set up tauri app with React frontend
2021-09-27 12:03:54 +02:00
Jędrzej Stuczyński 020cad897d Feature/rust rewarding (#750)
* Calculating gas fees

* Ability to set custom fees

* Added extra test

* Removed commented code

* Moved all msg types to common contract crate

* Temporarily disabling get_tx method

* Finishing up nymd client API

* Comment fix

* Remaining fee values

* Some cleanup

* Removed needless borrow

* Fixed imports in contract tests

* Moved error types around

* New ValidatorClient

* Experiment with new type of defaults

* Removed dead module

* Dealt with unwrap

* Migrated mixnode to use new validator client

* Migrated gateway to use new validator client

* Mixnode and gateway adjustments

* More exported defaults

* Clients using new validator client

* Fixed mixnode upgrade

* Moved default values to a new crate

* Changed behaviour of validator client features

* Migrated basic functions of validator api

* Updated config + fixed startup

* Fixed wasm client build

* Integration with the explorer api

* Removed tokio dev dependency

* Needless borrow

* Fixex wasm client build

* Fixed tauri client build

* Needless borrows

* New tables for rewarding

* Updated cosmos-sdk version

* Removed reward-specific node status routes

* New rewarding-specific config entries

* Additional network defaults

* Initial periodic rewards from validator api

* Replaced print with log

* Filtering nodes with uptime > 0

* Additional failure logging statements

* Fixed operation ordering

* Adjusted next rewarding epoch determination

* Modified rewarding behaviour to keep track of rewarding in progress

* Improved error message on config load failure

* Additional log statement

* Adjusted rewarding gas limit calculation

* Made naming slightly more consistent

* Fixed incorrect parentheses placement

* Fixed fee calculation

* Cargo fmt

* Removed failed merge artifacts

* Introduced comment for any future reward modification

* typos

* Helper functions for the future

* Making @mfahampshire 's life easier

* Redesigned epoch + rewarding skipped epochs (if possible)

* Removed old merge artifacts

* Naming consistency

* Constraining arguments

* Removed unnecessary if branch

* Ignore monitor check for current epoch

* Additional checks for current epoch data

* Monitor threshold check

* cargo fmt

* Fixed post-merge issues in transactions.rs
2021-09-24 15:49:21 +01:00
Drazen Urch 5dfaff6296 Update hmac and blake3 (#673)
* Update hmac and blake3

* Remain paranoid for `0.*` crates

* Most paranoid versions :)

* Updated aes and using published version of blake3

Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
2021-09-21 09:59:17 +01:00
Jędrzej Stuczyński 5b03982043 Replaced unwrap_or_else with unwrap_or_default (#780) 2021-09-20 10:40:03 +01:00
Drazen Urch 8f6856d6fb Make fee helpers public (#777)
Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-09-20 10:15:06 +01:00
Drazen Urch 976dd7aae2 Add block_height method to Delegation (#778)
Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-09-15 17:28:49 +02:00
Fouad 0d21f4e937 Merge pull request #776 from nymtech/update/re-enable-bonding
re-enable bonding
2021-09-15 12:41:29 +01:00
fmtabbara 1403449ad5 enable bonding 2021-09-14 16:00:21 +01:00
Drazen Urch e84af4f601 Migrate legacy delegation data (#771)
* Skip ReadOnlyBucket deserialization errors

* empty migration

* clippy

* cargo schema

* Drop invalid delegation data

* Dont drop old data

* Add todo

* Unify on type param

* gateways are different

* cargo fmt

Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
2021-09-14 14:15:26 +01:00
Mark Sinclair 26b032c15c Merge pull request #774 from nymtech/feature/explorer-api-delegations
Explorer-api: add API resource to show the delegations for each mix node
2021-09-14 10:09:14 +01:00
Mark Sinclair cba3625394 explorer-api: add API resource to show the delegations for each mix node 2021-09-13 10:46:57 +01:00
Fouad e1ddaff04d Merge pull request #772 from nymtech/update/disable-bonding
add app alert
2021-09-10 17:17:14 +01:00
fmtabbara 66ab5de442 add app alert 2021-09-10 16:16:58 +01:00
Dave Hrycyszyn 0b9c03ca90 Adding deps for building the Tauri wallet under Ubuntu (#770) 2021-09-10 10:23:21 +02:00
Bogdan-Ștefan Neacşu c9dce0c1da Feature/consumable bandwidth (#766)
* Set actual value for bandwidth

Also put it as a public attribute, such that it can be actively used
by the credential consumer

* Switch from sending Attribute structs to sending the actual attribute bytes over the wire

* Add atomic bandwidth value to gateway

* Consume bandwidth based on the mix packet size

* Use Bandwidth struct for specific functionality

* Move bandwidth code outside the dependency path of wasm client

* Use u64 instead of AtomicU64, as the handling is not parallel
2021-09-09 11:21:45 +02:00
Bogdan-Ștefan Neacşu e00e77db15 Feature/bond blockstamp (#760)
* Add block_height to MixNode/GatewayBond

* Reward based on blockstamp of bonded node or of delegation

* Add specific tests

* Add migration code

* Apply doc nit
2021-09-08 15:07:24 +02:00
Fouad 1074449f91 Merge pull request #767 from nymtech/update/remove-app-alert
remove alert
2021-09-07 23:45:10 +01:00
Bogdan-Ștefan Neacşu 08276e6e42 Remove migration code (#759) 2021-09-07 16:33:30 +02:00
fmtabbara 9a3d824a4a remove alert 2021-09-06 20:39:24 +01:00
Bogdan-Ștefan Neacşu 2789ee8f18 Update coconut-rs and use hash_to_scalar from there (#765)
Failed tests are due to some nightly issue, not related to this PR
2021-09-03 15:30:45 +03:00
Fouad a7ba643c35 Merge pull request #762 from nymtech/feature/app-alert
add app alert banner
2021-09-03 09:14:50 +01:00
Bogdan-Ștefan Neacşu 28be53eefb Add block_height in the Delegation structure as well (#757) 2021-09-02 18:26:40 +03:00
Jędrzej Stuczyński 219c45a352 Updated cosmos-sdk (#761)
* Updated cosmos-sdk

* Re-exposing more things
2021-09-02 15:48:29 +01:00
dependabot[bot] 1a3b83752e Bump next from 11.1.0 to 11.1.1 in /wallet-web (#758)
Bumps [next](https://github.com/vercel/next.js) from 11.1.0 to 11.1.1.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v11.1.0...v11.1.1)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-02 15:45:56 +01:00
fmtabbara c42f3c6844 add app alert banner 2021-09-02 12:29:47 +01:00
Mark Sinclair a5d3ba3900 Merge pull request #755 from nymtech/bugfix/explorer-api-ping
Explorer API: port test now split out address resolution and add units tests
2021-08-31 15:59:11 +01:00
Mark Sinclair cdf0d44341 explorer-api: turned down logging from error to warn 2021-08-31 14:37:28 +01:00
Mark Sinclair 92f976a45d explorer-api: sanitize hostname before running checks to avoid leading or trailing spaces that are known to exist in the current test net 2021-08-31 14:32:32 +01:00
Mark Sinclair 2bc858cde3 explorer-api: port test: split out address resolution and add units tests 2021-08-31 14:32:32 +01:00
Bogdan-Ștefan Neacşu 92e13a5d00 Feature/add blockstamp (#756)
* Add RawDelegationData

* Fix current tests for the new stored data

* Added migration commit. Will be reverted after doing the migration

* New tests for block height

* Use current blockstamp instead of 24h old one

* Put _alot_ of migration stuff in the migrate function scope
2021-08-31 14:51:15 +03:00
Bogdan-Ștefan Neacşu 122f5d9f2e Feature/cred after handshake (#745)
* Call perform_initial_authentication instead of register in clients

* Refactor the register/authenticate functions a bit

* Introduce Bandwidth request type

* Add encryption layer to cred

* Remove cred pass and check from handshake

* Replaced unreachable!  with error

* Changed decrypt_tagged signature to not take mutable ownership of data

* Put handle_bandwidth work inside a function

* Add check before unwrap

* Remove unnecessary async

* Decouple bandwidth credential from authentication

* Use new_error for ServerResponse:Error

* Send a fresh IV each time the BandwidthCredential request is sent

* Remove unwrap of bincode::serialize

* Add comment regarding Bandwidth response

* Remove _mut from naming

* Leave Debug trait alone, as the initial error doesn't reproduce anymore

* Pass iv as Vec<u8> instead of base58 string

* Renamed AuthenticationIV to IV, as it is now used for more the just authentication

* Did some IV refactorization
2021-08-30 10:27:20 +03:00
Bogdan-Ștefan Neacşu 982ee0266c Feature/get own delegations (#748)
* Introduce reverse delegation bucket

* Add client command

* Fix clippy error

* Added tests in queries

* Add tests in transactions

* Migration code. Will be reverted after it's called on testnet

* Replace unwrap with expect

* Move some test code in the right file...

... to remove unnecessary auxiliary function.

* Reduce the scope to migration auxiliary functions

* Rename everything from [node]reverse to reverse[node]

* Fix fmt
2021-08-27 16:02:34 +03:00
Jędrzej Stuczyński 5f42a9bd05 NetworkMonitorBuilder - starting the monitor after rocket has launched (#754)
* NetworkMonitorBuilder - starting the monitor after rocket has launched

* Removed unused import
2021-08-27 13:52:18 +01:00
Jędrzej Stuczyński 1811df9ddb Enabled validators api argument (#753) 2021-08-27 13:52:10 +01:00
Jędrzej Stuczyński 6bdfe7f895 Correctly bounding nominator of uptime calculation (#752) 2021-08-26 11:21:01 +01:00
Jędrzej Stuczyński c6b286a1db Fixed argument parsing for ipv6 'good' topology (#751) 2021-08-25 14:50:57 +01:00
Bogdan-Ștefan Neacşu b3568a26f5 Revert "Migration commit, will be reverted after the testnet contract is updated" (#749)
This reverts commit 38d868bcce.
2021-08-24 11:25:05 +03:00
Jędrzej Stuczyński 15ae0f521e Feature/more reliable uptime calculation (#747)
* New database table holding monitor run info

* SQL interface for new table

* Updated uptime calculation to instead rely on number of monitor test runs
2021-08-23 11:26:51 +02:00
Bogdan-Ștefan Neacşu 2923d4b872 Update template toml key (#746) 2021-08-19 21:03:07 +02:00
Bogdan-Ștefan Neacşu d740e8b8a9 Reinstate the POST method blind_sign (#744) 2021-08-18 18:31:12 +03:00
Jędrzej Stuczyński a274edffba Feature/nymd client integration (#736)
* Calculating gas fees

* Ability to set custom fees

* Added extra test

* Removed commented code

* Moved all msg types to common contract crate

* Temporarily disabling get_tx method

* Finishing up nymd client API

* Comment fix

* Remaining fee values

* Some cleanup

* Removed needless borrow

* Fixed imports in contract tests

* Moved error types around

* New ValidatorClient

* Experiment with new type of defaults

* Removed dead module

* Dealt with unwrap

* Migrated mixnode to use new validator client

* Migrated gateway to use new validator client

* Mixnode and gateway adjustments

* More exported defaults

* Clients using new validator client

* Fixed mixnode upgrade

* Moved default values to a new crate

* Changed behaviour of validator client features

* Migrated basic functions of validator api

* Updated config + fixed startup

* Fixed wasm client build

* Integration with the explorer api

* Removed tokio dev dependency

* Needless borrow

* Fixex wasm client build

* Fixed tauri client build

* Needless borrows

* Fixed client upgrade print

* Removed redundant comments

* Made note on aggregated verification key into a doc comment

* Removed mixnet contract references from verloc

* Modified default validators structure

* Reformatted validator-api Cargo.toml file

* Removed commented code

* Made the doc comment example a no-run

* Fixed a upgrade print... again

* Adjusted the doc example

* Removed unused import
2021-08-18 14:41:00 +01:00
Bogdan-Ștefan Neacşu eec211e038 Feature/use delegation rates (#741)
* Rename storage read functions for bond reward rates

* Add reward values per epoch in State

Calculate delegation rewards per epoch for mixnodes and gateways, which
are used when the delegators are rewarded for their stake.

* Migration commit, will be reverted after the testnet contract is updated
2021-08-18 16:24:00 +03:00
Mark Sinclair f5f888a0aa Merge pull request #742 from nymtech/feature/explorer-api-pending-ping
explorer-api: add pending field to port check response
2021-08-17 12:59:47 +01:00
Fouad 86ec1d6026 Feature/copy to clipboard (#740)
* add copy to clipboard component

* use fab button

* use regular button

* remove unneeded config
2021-08-16 17:45:41 +01:00
Mark Sinclair bc3f5838f1 explorer-api: add pending field to port check response 2021-08-16 17:29:51 +01:00
Bogdan-Ștefan Neacşu 7e58b3273d Feature/update wallet with stake rates (#739)
* Replace `BondMixnode` with `Bond` on frontend

* Update wallet to use stake reward rates
2021-08-16 12:24:17 +03:00
Bogdan-Ștefan Neacşu bed09bf8a4 Add stake reward rates and bump version of client (#738)
* Tiny PR to add stake reward rates and bump version

This is needed so that we can publish the 0.17 version.

* Add the changes to contracts as well

On second thought, update the contract together with the client, and
leave the wallet changes for another PR.

* Rename _stake_ to _delegation_
2021-08-16 11:43:24 +03:00
Drazen Urch 28e55c6de6 Hang coconut issuance off the validator-api (#679)
* Hand coconut issuance off the validator-api

* git to cargo

* Move to own module

* Integrate tauri-client, extract common interface

* cargo fmt

* Ergonomics

* Facelift

* Wrap up tauri client

* Set up publish

* Fix fmt

* Install CI dependencies

* Inline deps

* Remove mac deps

* Add dist dir

* Fix beta clippy nag

* Commit some gateway work

* Thread coconut creds through gateway handshake

* Push in progress patch

* Move State from tauri client to coconut interface

* Move get_aggregated_signature from tauri client to coconut interface

* Move prove_credential from tauri client to coconut interface

* Update sphinx version

* Mount coconut routes and manage config file in rocket

* Split default validator endpoint into host and port

* Add init for simple credential initialization

* Fix common gateway client

* Add coconut cred to webassembly client

* Add coconut cred to socks5 client

* Add coconut cred to native client

* Remove direct coconut-rs dependency

* Use only coconut interface in validator api

* Leave validator-api out of workspace and update Cargo.lock

* Fix clippy warnings and update Cargo.lock after rebase

* Switch from attohttpc to reqwest for async gets

This is not only needed for using async requests, but also because attohttpc
causes OpenSSL issues when cross compiling the webassembly client.

* Replace attohttpc with reqwest for puts too

* Make tauri client commands async

* Fix borrow error

* Guard gateway server code from compiling for wasm (client)

* Fix clippy wasm client

* Fix tests

* Fix clippy in tauri client

* Remove commented code

* Update comment of init message

* Remove unnecessary hex dependency

* Replace config argument with key_pair

* Use `trim()` for whitespace removal

* Move verification key query higher up the function calls

* Put KeyPair instead of Config into rocket's managed items

* Re-enable tauri client verify button

* Move verification key up the function calls for prove_credential

* Use consts for verification_key and blind_sign routes of validator-api

* Replace `match` with `map_err`

* Fix typo

* Remove now unnecessary `Clone` derives

... as config is no longer managed by rocket

* Replace `match` with `map_err`

* Make `InternalSignRequest` really internal to validator-api

* Make `with_keypair` live up to its name

* Update Cargo.lock after rebase

* Replace String error with HandshakeError

* Add CoconutInterfaceError to coconut-interface

* Format the new error in tauri client

* Remove  from default, as wasm client doesn't build

* Put public key as init argument...

... for the public attributes of the credential

* Use the hash_to_scalar function to make public key into attribute

Use the function from cli-demo-rs from https://github.com/nymtech/coconut
to make the identity public key into a public attribute.

* Replace vector with array for InitMessage

As we know beforehand the size of the keys, we can use fixed size array
instead of vectors. This eliminates the need for a prefixed length in
the serialized form of the InitMessage structure and enables a easy
deserialization of the remote identity before the actual bincode
deserialization that we do in the handshake process.

Before this, the `extract_remote_identity_from_register_init` function
attempted to deserialize into a public key the length-prefixed public key
received from the client, thus failing sporadically with a `Cannot decompress
Edwards point` error.

* Pass public and private attributes to state `init` instead of PublicKey

* Make tauri call with dummy attributes

* Make clients call with their keypairs

* Revert "Make clients call with their keypairs"

This reverts commit b348f47f7a.

* Put dummy, bandwidth private attribute

Co-authored-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-08-13 14:27:40 +03:00
Bogdan-Ștefan Neacşu abb4537551 Switch from wasm-timer to fluvio-wasm-timer... (#735)
... which addresses the problem from https://github.com/Amanieu/parking_lot/issues/269
by taking the unmerged workaround of https://github.com/tomaka/wasm-timer/pull/13 ,
as wasm-timer appears to be unmaintained.
2021-08-13 09:44:29 +01:00
dependabot[bot] b48f2f1660 Bump next from 10.1.3 to 11.1.0 in /wallet-web (#737)
Bumps [next](https://github.com/vercel/next.js) from 10.1.3 to 11.1.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v10.1.3...v11.1.0)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-13 09:35:16 +01:00
Mark Sinclair ccf8063a52 Explorer API: add new HTTP resource to decorate mix nodes with geoip locations (#734)
* explorer-api: decorate mix nodes with locations from the geoip service and keep mix node cache in a hash map instead of a vec

* explorer-api: add `lat` and `lng` for map views

* explorer-api: remove function and simplify code

* explorer-api: review feedback

* network-explorer: format
2021-08-11 17:24:34 +01:00
Jędrzej Stuczyński 8694396942 Feature/completing nymd client api (#732)
* Calculating gas fees

* Ability to set custom fees

* Added extra test

* Removed commented code

* Moved all msg types to common contract crate

* Temporarily disabling get_tx method

* Finishing up nymd client API

* Comment fix

* Remaining fee values

* Some cleanup

* Removed needless borrow

* Fixed imports in contract tests

* Made contract address optional to allow for contract upload and initialisation
2021-08-11 17:15:14 +01:00
Jędrzej Stuczyński fb253e53a4 Removed all sphinx key caching from mixnodes and gateways (#713)
* Removed all sphinx key caching from mixnodes and gateways

* Missing change in network monitor
2021-08-11 12:47:35 +01:00
Jędrzej Stuczyński fdd34863ba Feature/nymd client fee handling (#730)
* Calculating gas fees

* Ability to set custom fees

* Added extra test

* Removed commented code

* Removed needless borrow
2021-08-11 12:01:53 +01:00
Mark Sinclair 4ac95ad8cf Explorer API - add port check and node description/stats proxy (#731)
* explorer-api: move mix node client operations into a package

* explorer-api: add port test for mixnodes with cache for results

* explorer-api: add `humantime-serde` dependency

* explorer-api: mix node API proxy

This fixes mixed-content responses when using the mix node API from the network explorer. An in-memory cache protects the explorer API from over-querying the http API on the mix node.

* explorer-api: adjust naming

* explorer-api: fix up self refs

* explorer-api: add method to state to get a mix node by identity key

* explorer-api: add cached http resource to proxy the `/description` and `/stats` http api resources to allow the network explorer do https requests for the mix node api resource avoid mixed content requests

* explorer-api: set default mix node cache time to 30 minutes

* explorer-api: make clippy happy

* explorer-api: add CORS with wide open configuration

* explorer-api: fixes from review feedback

* explorer-api: move port check test into separate function

* explorer-api: use `rocket-cors` that is pinned in the `validator-api` and remove custom CORS handler
2021-08-10 15:27:17 +01:00
Fouad 132d550cb6 Merge pull request #721 from nymtech/update/bond-form-state-management
update state management and validation
2021-08-09 11:00:29 +01:00
fmtabbara efc5035144 Merge branch 'develop' into update/bond-form-state-management
Merge develop branch
2021-08-09 09:51:25 +01:00
Jędrzej Stuczyński ebeac73f30 Rust nymd/cosmwasm client (#724)
* Using forked cosmwasm

* Basic wallet functionalities

* WIP

* Generic abci_query method

* More API stubs with some semi-working code

* More API stub work

* Moving from fork of cosmos-rust to the upstream

* Implemented most sign-less cosmwasm client methods

* Full contract upload with log parsing

* Implemented most of remaining methods on signing client

* Some initial cleanup on existing code

* Feature-locking nymd client

* Better type for base account

* Pagination handling

* Searching transaction by concrete hash

* basic search_tx

* More cleanup

* Disabled default validator-client features on wasm client

* Fixed account conversion

* Fixed typo in cargo.toml

* Moving back to main cosmos-sdk repo

* Re-exported connect functions

* comment

* Wallet no longer storing signing keys

* Went back to the trait approach

* Example stub of future API

* Removed needless borrow

* Fixed starting page

* Fixed typo

* Using centralised config defaults
2021-08-06 16:31:57 +01:00
fmtabbara 5303288b9c remove unecessary type check 2021-08-06 14:51:20 +01:00
fmtabbara bcac045c77 remove husky 2021-08-06 11:57:34 +01:00
Jędrzej Stuczyński d643df74b3 Removed wasm feature bypassing cycling dependencies (#723) 2021-08-06 11:00:15 +01:00
Jess 4c1c6d86c8 Update DelegationCheck.tsx (#725)
* Update DelegationCheck.tsx

* Update NodeDelegation.tsx
2021-08-06 09:38:47 +01:00
fmtabbara 623448a220 remove husky 2021-08-05 15:16:04 +01:00
fmtabbara b403ce1e62 add test 2021-08-05 14:25:52 +01:00
fmtabbara 6faf8786ea add husky 2021-08-05 14:23:19 +01:00
Jędrzej Stuczyński aaa4378b33 Updated used sphinx dependency to the most recent revision (#722) 2021-08-05 12:01:37 +01:00
fmtabbara 6512bfb4d9 Merge branch 'develop' into update/bond-form-state-management
Merge develop branch
2021-08-05 09:14:40 +01:00
fmtabbara 1afabfd1b6 update tests :) 2021-08-04 18:43:17 +01:00
fmtabbara f05e2880a9 update config files 2021-08-04 16:52:25 +01:00
fmtabbara 81675008a6 update hostname and ip validation 2021-08-04 16:52:06 +01:00
fmtabbara 8b4fc5719e add tests 2021-08-04 15:51:20 +01:00
fmtabbara e4f7452241 install test packages 2021-08-04 15:51:10 +01:00
fmtabbara 9602379368 update rawport validation function 2021-08-04 15:47:39 +01:00
fmtabbara 35ba39c196 update rawport validation function 2021-08-04 15:44:29 +01:00
fmtabbara 6d09da40e0 remove unused generic 2021-08-04 15:19:12 +01:00
fmtabbara de44f21d64 add code source 2021-08-04 14:21:48 +01:00
fmtabbara edc91e0e36 use regex for validating hostname 2021-08-04 14:19:59 +01:00
fmtabbara 518cd21fd6 type function parameter 2021-08-04 12:42:25 +01:00
Dave Hrycyszyn b36ca2c4f1 Add Network Explorer API (#720)
* Adding the explorer API

* Added explorer-api to workspace

* Re-jigged explorer api cargo paths

* Fixed compiler warnings

* Removing unused code

* network-explorer-api: configure state with env var API_STATE_FILE or fall back to default value of `explorer-api-state.json`

* network-explorer-api: updates to `Cargo.lock` file after rebasing

* network-explorer-api: make clippy happy
2021-08-04 12:38:35 +01:00
Jędrzej Stuczyński 2db79de722 Feature/superbuild (#719)
* Adding build script

* Added build dependencies

* Cleaned up build.rs

* Restored validator-api to default workspace

* Removed split for validator-api build in github ations

* Don't build validator API on Windows

* Remove validator-api Cargo.lock

* Remove fmt from the conditional steps

Co-authored-by: Dave Hrycyszyn <futurechimp@users.noreply.github.com>
Co-authored-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-08-04 11:55:58 +03:00
fmtabbara 3a9531b586 remove console log 2021-08-04 09:26:22 +01:00
fmtabbara f96d768341 update state management and validation 2021-08-03 18:08:54 +01:00
Fouad 26fb13fe2d remove console log (#718) 2021-08-02 17:42:21 +01:00
Fouad 67a9d80299 Merge pull request #715 from nymtech/bug/form-validation
Bug/form validation
2021-08-02 16:29:11 +01:00
fmtabbara 84249cab4b update validation 2021-08-02 15:46:12 +01:00
Jędrzej Stuczyński f4305dfaa5 Warnings with identities of good nodes failing checks (#714)
* Warnings with identities of good nodes failing checks

* Fixed logging messages
2021-08-02 14:08:23 +01:00
fmtabbara 0c45c61c85 format to jsx double quotes 2021-08-02 13:49:46 +01:00
fmtabbara 7d250b3384 merge develop branch 2021-08-02 13:46:04 +01:00
fmtabbara bb2029e21c remove console log 2021-08-02 13:44:22 +01:00
fmtabbara 0f0611f390 form updates and bug fix 2021-08-02 13:42:20 +01:00
Fouad 2904141c14 Merge pull request #704 from nymtech/feature/receive-coins-page
Feature/receive coins page + UI tweaks
2021-08-02 13:32:08 +01:00
fmtabbara c569a7a858 ui tweak 2021-07-28 18:01:40 +01:00
fmtabbara 87db1fd8c1 update breakpoint for large screens 2021-07-28 17:45:45 +01:00
fmtabbara a1d2d09f28 fix conflicts 2021-07-28 16:15:40 +01:00
Fouad b949d7b221 Merge pull request #703 from nymtech/feature/user-sign-out
Allow users to sign out
2021-07-28 15:58:43 +01:00
fmtabbara de468760d6 update layout 2021-07-28 14:17:13 +01:00
fmtabbara 30a78df986 fix build error 2021-07-28 13:52:24 +01:00
fmtabbara e8622a190a layout and icon updates 2021-07-28 10:53:37 +01:00
fmtabbara 75f098f002 style update 2021-07-27 20:07:23 +01:00
fmtabbara b034a07439 display alert when no client detected 2021-07-27 17:50:42 +01:00
fmtabbara 68956456dd style updates 2021-07-27 17:24:23 +01:00
fmtabbara aa048cabe6 update pages to use new components 2021-07-27 16:44:11 +01:00
fmtabbara 5dc67b995e export new reusable components 2021-07-27 16:41:35 +01:00
fmtabbara 721e4bda8b create reuseable components 2021-07-27 16:40:15 +01:00
fmtabbara 2673f83116 fix bug 2021-07-27 15:08:37 +01:00
fmtabbara bc68513a78 allow user to log out 2021-07-27 14:23:17 +01:00
Bogdan-Ștefan Neacşu 91250f199a Feature/docker improvements (#702)
* DRY the docker prefix and wasmd variables

* Don't re-init nymd for the same container

* Specify env variables in x property

* Contract uploader now uses BECH32_PREFIX env var
2021-07-26 19:06:01 +03:00
Fouad 3ec92a0784 Merge pull request #698 from nymtech/bond_and_delegation_alerts
Bond and delegation alerts
2021-07-26 13:48:35 +01:00
Jędrzej Stuczyński 70a9317ab3 Exposed API port on the validator (#701) 2021-07-26 15:30:54 +03:00
Dave Hrycyszyn 71e36065e5 Using validator API instead of nymd (#690) 2021-07-26 10:59:29 +01:00
Jędrzej Stuczyński 389d1ba3b9 Cleaned up dependencies of our typescript client (#699)
* Cleaned up dependencies of our typescript client

* Explicitly added stargate dependency and not rely on it being in node_modules
2021-07-26 10:58:58 +01:00
Bogdan-Ștefan Neacşu 18f5d4084d Feature/default values (#700)
* Put endpoints and contract address in one place

* Put common ports in one place

* Split cache version from route

* Share validator-api port value between server and client

* Put BECH32 prefix in defaults

* Put DENOM in defaults

* Put network monitor address in defaults

* Fix clippy

* Fix another clippy + tests import of DENOM
2021-07-26 10:55:59 +01:00
fmtabbara 83744962f1 remove possible whitespace 2021-07-23 14:44:20 +01:00
fmtabbara df08a894cc only display alert when stakeValue is loaded 2021-07-23 14:34:17 +01:00
Bogdan-Ștefan Neacşu 2354828481 Feature/other containers (#692)
* Add block explorer to docker containers

* Add network explorer to docker containers

A private token is needed to build this container.

* Update docker README
2021-07-23 16:24:55 +03:00
fmtabbara 74693bda6f update allocation check 2021-07-23 14:14:27 +01:00
fmtabbara 613ff5da71 remove unused import 2021-07-23 12:18:45 +01:00
fmtabbara a11937699f Merge branch 'develop' into bond_and_delegation_alerts
Merge develop
2021-07-23 09:47:17 +01:00
fmtabbara eb59ca77ef catch error caused by invalid values 2021-07-23 09:11:11 +01:00
fmtabbara 12d07fd870 use helper function + code tidy 2021-07-22 22:11:59 +01:00
Jędrzej Stuczyński 1d18def642 Run cargo fmt 2021-07-22 15:34:34 +01:00
fmtabbara 70d4bce42f prettier updates 2021-07-22 15:17:37 +01:00
Jędrzej Stuczyński c81454e00b Validator API storage fixes and adjustments 2021-07-22 15:15:08 +01:00
fmtabbara ac4ee2bcf2 allocation check on delegation form 2021-07-22 15:00:24 +01:00
fmtabbara 9184c119d6 set balance warning 2021-07-22 14:23:02 +01:00
fmtabbara 216b114346 make reuseable hook to get balance 2021-07-22 13:29:14 +01:00
Fouad 793dbdef7e update types 2021-07-22 12:00:46 +01:00
Jędrzej Stuczyński 432e1e6065 Merge branch 'develop' of github.com:nymtech/nym into develop 2021-07-22 10:44:11 +01:00
Fouad c8a02e1354 update punk denomination 2021-07-22 10:40:02 +01:00
Jędrzej Stuczyński 698345dbe9 Bugfix/network monitor version check (#697)
* Fixed validator-api network version check

* Removed redundant clone
2021-07-22 10:32:08 +01:00
Jędrzej Stuczyński 5568073c17 Fixed validator-api network version check 2021-07-22 10:05:38 +01:00
Jędrzej Stuczyński addb721d66 Fixed gateway upgrade command argument description 2021-07-21 14:29:47 +01:00
Jędrzej Stuczyński 3bbf959086 Removed port information from bonding notice 2021-07-21 14:24:54 +01:00
Jędrzej Stuczyński 0db4aa5f39 Merge branch 'v0.11.0-release' into release/v0.11.0 2021-07-21 14:22:39 +01:00
Jędrzej Stuczyński f41ee7700d Merge branch 'release/v0.11.0' of github.com:nymtech/nym into release/v0.11.0 2021-07-21 14:18:35 +01:00
Jędrzej Stuczyński 1c335d3172 Merged upgrade commands 2021-07-21 14:16:36 +01:00
Bogdan-Ștefan Neacşu 191b3c09e2 V0.11.0 release (#696)
* Update the version to 0.11.0 for non-upgradable crates

* Fix target version for the current upgrade functions

* Upgrade native client

* Upgrade socks5 client

* Upgrade mixnode

* Upgrade gateway
2021-07-21 14:10:27 +01:00
Jędrzej Stuczyński 725b4de74a Updated changelog 2021-07-21 13:16:01 +01:00
Bogdan-Ștefan Neacșu ce038bf56a Upgrade gateway 2021-07-21 15:13:21 +03:00
Bogdan-Ștefan Neacșu 8727038443 Upgrade mixnode 2021-07-21 15:12:53 +03:00
Bogdan-Ștefan Neacșu afbed0e438 Upgrade socks5 client 2021-07-21 15:12:22 +03:00
Bogdan-Ștefan Neacșu b6a026da83 Upgrade native client 2021-07-21 15:11:45 +03:00
Bogdan-Ștefan Neacșu fc74b723fa Fix target version for the current upgrade functions 2021-07-21 15:11:08 +03:00
Bogdan-Ștefan Neacșu b1fe1f6073 Update the version to 0.11.0 for non-upgradable crates 2021-07-21 15:11:07 +03:00
Jędrzej Stuczyński 043ca9a63e Updated versions to 0.11.0 2021-07-21 13:07:15 +01:00
Jędrzej Stuczyński 46b49eea2f Updated bot channel name 2021-07-21 12:52:39 +01:00
Jędrzej Stuczyński 7430eb99cf Fixed upgraded description save location 2021-07-21 12:43:12 +01:00
Dave Hrycyszyn 111cccea97 Merge branch 'release/v0.11.0' of github.com:nymtech/nym into release/v0.11.0 2021-07-21 11:41:24 +01:00
Dave Hrycyszyn 5e9d87b1ad Updating wallet version prior to release 2021-07-21 11:40:37 +01:00
Jędrzej Stuczyński c28b320b66 Merge branch 'release/v0.11.0' of github.com:nymtech/nym into release/v0.11.0 2021-07-21 11:22:54 +01:00
Jędrzej Stuczyński a80a1bbe34 Only allow bonding nodes with version >= 0.11.0 2021-07-21 11:22:48 +01:00
Bogdan-Ștefan Neacșu c1808ae692 Update to RC 0.11.0-rc1 2021-07-21 13:19:50 +03:00
Jędrzej Stuczyński d8277e851f Updated sign command (#694) 2021-07-21 08:42:02 +01:00
Mx c795490164 got rid of denomination error (#691)
Co-authored-by: mfahampshire <>
2021-07-20 17:31:48 +01:00
Bogdan-Ștefan Neacşu 3f2fa717c9 Return the vec instead of the cache wrapper for topology (#695) 2021-07-20 17:30:58 +01:00
Bogdan-Ștefan Neacşu c0be2330b0 Docker testing env (#687)
* Add validator Docker container

* Add Docker contract upload container

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* Add docker-compose for validators and building deploy container

* One Docker image for each component

* Switch from hal to punk

* Add nym wallet docker

* Point web browser to the correct IP

* Better message parsing

* Rebase on the wallet merge

* Rename upload contract entrypoint script

* Remove unnecessary bash magic

* Put the contract image in the docker dir

* Put the wallet-web image in the docker dir

* Add some read-only specifiers to volumes

* Move typescript container code in docker directory

Also update lock files, as the containers work on a volume binded
to the local filesystem

* Fix volume permissions

* Add mnemonic echo

* Remove magic sleep value from secondary validator

* Adding README.md to the docker directory

* Change ENTRYPOINT to CMD for the typescript client image
2021-07-20 10:16:57 +01:00
Jędrzej Stuczyński e86467d007 Changed validator-api version to 0.10.2 2021-07-19 14:36:25 +01:00
Jędrzej Stuczyński e5afd54ce0 Feature/node status api (#680)
* Basic storage stub

* New models for new node status api

* Route handling

* Mounting new routes

* Missing selective commit

* Moved network monitor related files to separate package

* Starting to see some sqlx action

* Schema updates

* Log statement upon finished migration

* Removed old diesel related imports

* Converted mixnode cache initialisation into a fairing

* Moved cache related functionalities to separate package

Also defined staging there

* Created run method for validator cache + removed unwrap

* Removed old node-status-api types and left bunch of todo placeholders in their place

* Fixed managing validatorcache

* Status reports are starting to get constructed

* Submitting some dummy results to the database

* Removing duplicate code for generating reports

* Removed statuses older than 48h

* Initial attempt at trying to obtain reports for all active nodes

* Removed duplicates from the full report

* Grabbing uptime history

* Updating historical uptimes of active nodes

* Updated sqlx-data.json

* Removed all placeholder foomp owner values

* Changed Layer serde behaviour for easier usage

* Extended validator api config

* Initial (seems working !) integration with network monitor

* Added database path configuration to config

* Using ValidatorCache in NetworkMonitor

* Flag indicating whether validator cache has been initialised

* Introduced a locla-only route for reward script to perform daily chores

* Flag to save config to a file

* Moved spawning of receiving future to run method rather than new

* Removed arguments that dont make sense to be configured via CLI

* Removed dead code from config file

* More dead code removal

* Added validator API to CI

* Corrected manifest-path arguments

* Constructing network monitor by passing config

* Combined validator API CI with the main CI file

* Using query_as for NodeStatus

* Checking if historical uptimes were already calculated on particular day

* Making id field NOT NULL

* More query_as! action

* Updated sqlx-data.json

* Removed unused chrono feature

* Renamed the migration file

* Changed default validator endpoint to point to local validator

* Removing unnecessary clone

* More appropriate naming

* Removed dead code

* Lock file updates

* Updated network monitor address in contract code

* Don't stage node status api if network monitor is disabled

* cargo fmt

* Updated all license notices to SPDX
2021-07-19 14:02:47 +01:00
Jędrzej Stuczyński 25d2af3b04 Changed Layer serde behaviour for easier usage (#686) 2021-07-16 16:23:41 +01:00
Dave Hrycyszyn 8e24583f2a Updating wallet URL in mixnode startup output (#682) 2021-07-16 10:57:26 +01:00
Bogdan-Ștefan Neacşu c09846bb36 Merge the nym-wallet-web repo into a nym directory (#684)
A snapshot of https://github.com/nymtech/nym-wallet-web/tree/60b36db17d994e597b91981be5d60b0488618019
is put into a wallet-web folder.
2021-07-16 10:46:02 +01:00
Dave Hrycyszyn 86034bd955 Temporarily using non-cached gateways so we can get our next version deployed (#683) 2021-07-16 10:08:27 +01:00
Dave Hrycyszyn a9797879e8 Correcting the contract address 2021-07-15 16:16:20 +01:00
Dave Hrycyszyn 407d2bba47 Updating all default config values. 2021-07-14 16:56:51 +01:00
Dave Hrycyszyn 8f4b5ab4c7 Updating default settings to get the next testnet up 2021-07-14 16:46:13 +01:00
Jędrzej Stuczyński 0fd203371d Using specific commit of rocket cors (#678) 2021-07-13 16:14:11 +01:00
Dave Hrycyszyn 68f2d8b925 Version bump 2021-07-09 11:52:59 +01:00
Bogdan-Ștefan Neacşu 973c30592f Use cached topology for clients (#674)
* Add validator-api common client

* Call validator-api from different clients for gateway topology

* Call validator-api from different clients for mixnode topology

* Use consts for the validator-api queries

* Rename the new query_validator function to query_validator_api

* Add mut to mixnode validator client

* Add refreshValidatorAPIGateways as a way to get the gateways...

... from validator-api

* Add refreshValidatorAPIGateways as a way to get the mixnodes...

... from validator-api

* Add yet another mut

* Change the port to validator-api service when querying the topology

* Add parsing check on the config phase...

... to make sure the validator URLs are in the correct format.

* Fix another clippy error

* Use all provided validators instead of just the first one

* The mutable reference was not actually needed, so remove it

* Use global variable for validator-api port

* Use url crate for checking the format and changing the port

* Use URL for parsing and move constants of validator-api to index.ts...

... until we find a way to link to the values from the validator-api
crate.

* Change global variables naming and have the API version into each API query

* Revert the changes to the index on connect...

... as they were working correctly before.

* Use all provided validators for mixnodes as well

* Remove location and layer
2021-07-09 11:50:41 +01:00
Drazen Urch 3886ec5291 Minimize read/write cache contention (#676)
* Add timeout to cache.write() call

* mixnode_cache -> validator_cache

* Fix rename

* Minimize read/write contention
2021-07-08 10:42:53 +01:00
Dave Hrycyszyn 929775c517 Bumping version number for release 2021-07-06 16:10:38 +01:00
Dave Hrycyszyn 427893efef Feature/validator client upgrade (#675)
* Upgrading cosmos client to v0.25.5

* Formatting

* Renamed stakeDenom to prefix

* Added a denom field to the client

* New version needs a denom in the static methods

* ibid

* Formatting

* Renaming bech32prefix to prefix

* Adding a weird 'u' in the nymGasPrice

* Changing to use denom instead of prefix in nymGasPrice

* Alphabetizing fields

* Renaming method to something a bit more sane

* Using prefix, not denom, to build gas price

* Hardcoding an unavoidable and ugly manual conversion into the stargate helper

* denom is correct, for use in getBalance
2021-07-06 13:50:26 +02:00
Jędrzej Stuczyński cb33871934 Disables nightly clippy CI (#677) 2021-07-06 13:48:56 +02:00
Drazen Urch 4a86b24ff5 Use rocket 0.5-rc1, remove rocket-contrib (#672)
* Use rocket 0.5-rc1, remove rocket-contrib

* Revert thread_rng

* Continue on error for beta as well

* Add Drazen to authors

* Remain paranoid for unstable crates

* fmt again :/

* Most paranoid versions
2021-07-05 18:07:18 +02:00
Jędrzej Stuczyński 8f98de4abc Feature/validator api config (#671)
* Modified NymConfig trait to make id optional

* Basic validator-api config definition

* Optionally using the config during startup + flag to enable monitoring
2021-07-05 13:48:55 +02:00
Jędrzej Stuczyński e6460208d3 Removed standalone network-monitor (#669)
It has been integrated into the validator-api
2021-07-02 11:31:29 +01:00
Drazen Urch 3b7315d1e2 Fix a dependabot nag (#670) 2021-07-02 11:53:04 +02:00
Drazen Urch 3aafe54887 Remove mut where possible, parallel cache requests (#668) 2021-07-02 10:50:49 +02:00
Drazen Urch f08f19cd86 Rework validator client requests (#667)
* Rework validator-client to avoid &mut

* Comment

* More logging, sleep

* Fix wasm build

* My clippy missed this
2021-07-01 20:05:29 +02:00
Drazen Urch 2e6a32b298 Generalize cache, and cache gateways (#666)
* Generalize cache, and cache gateways

* Allow dead code
2021-07-01 17:24:23 +02:00
Bogdan-Ștefan Neacşu 57df77a995 Layer selection (#664)
* mixnode: Remove layer computation from mixnode

The layer is currently computed locally. This should be moved to
the validator, and the mixnode should find this information via
a query. Until the query is actually processed, we keep the layer
field as None.

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* contracts: Compute layer of bonding mixnode

Predictably compute the best layer of a bonding mixnode by putting it on
the layer with the fewest mixnodes and, in case of equality, with the
smallest index e.g. layer 1 is better then layer 3 if both have
the fewest mixnodes.

The layer received from the client app is regarded as a preferred option
and is only accepted if the number of nodes on the preferred layer is not
bigger then the one on the best layer.

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* contracts: Add tests for layer selection

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* mixnode: Upgrade from 0.10.2 to 0.10.3

The config file is changed so that it's only containing the layer if
the layer exists.

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* contracts: Move the layer from MixNode to MixNodeBond

Remove the option of a client app to propose a preferred
layer.

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* contracts: Move from u64 to Layer representation

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* contracts: Remove Layer::Invalid as it no longer makes sense...

... because layer choice is now present only in the contract.

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* contracts: Move layer selection algorithm in `choose_with_fewest` method

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* mixnode: Remove layer altogether

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* mixnode: Refactor upgrading system

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* mixnode: Remove layer from template as well

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* Remove invalid field from LayerDistribution

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-07-01 17:56:57 +03:00
Drazen Urch 343c55f981 Validator API server (#665)
* Rocket main stub

* Add anyhow

* Stub cache reads and writes

* Finalize stubs

* Add generic Rocket.toml

* Put back targets

* Have cache own its validator client

* allow dead code

* Update rocket.toml for 0.5
2021-07-01 14:08:04 +02:00
Dave Hrycyszyn 1660e0796d Removing validator binaries, these should go into Github releases (#663) 2021-06-30 10:16:43 +01:00
Drazen Urch b30f11ed7a Rename network-monitor (#662) 2021-06-29 14:48:15 +02:00
Jędrzej Stuczyński 2bdee705b7 Feature/total delegation field (#660)
* Changed bond Vec<Coin> into a Coin

* Introduced total_delegation field to bond models

* Restoring total old delegation

* Updating total delegation on new delegations

* Updating total delegation on removal

* Keeping track of delegation increase during rewarding

* Updating total delegation during rewarding + additional response attributes

* Removed irrelevant tests

* Fixed storage-related tests

* Added additional test assertions for delegation increase

* Added additional node rewarding test assertions

* Tests for correct reward calculation + gateway rewarding early termination

* Added delegation field to parsed node type

* Updated typescript bond types

* Moved `OLD_DELEGATIONS_CHUNK_SIZE` to file-wide namespace so that it could be used in tests

* Tests for finding old node delegations

* ibid.

* Issue#657

* Additional test assertions regardingn total delegation

* Missed test field after merge

* ibid

* Cleaning up storage related imports
2021-06-29 11:29:51 +01:00
Drazen Urch 31f567f1ef Use thiserror for validator-client (#658)
* Use thiserror for validator-client

* cargo fmt

* Move comment

* CI
2021-06-29 10:01:44 +02:00
Jędrzej Stuczyński 216573b65b Adds @neacsu as code owner (#661) 2021-06-29 10:01:25 +02:00
Bogdan-Ștefan Neacşu 4102690cf1 Merge pull request #659 from nymtech/remove_contract_location
contracts: Removed mixnode location from the bonding process
2021-06-28 17:08:15 +03:00
Bogdan-Ștefan Neacșu a82ac9c50d contracts: Removed mixnode location from the bonding process
Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-06-28 15:10:57 +03:00
Bogdan-Ștefan Neacşu bb0257ccc6 Merge pull request #656 from nymtech/feature/configurable-verloc-http-ports
Feature/configurable verloc http ports
2021-06-28 14:52:54 +03:00
Bogdan Neacşu 142a70365f Merge pull request #655 from nymtech/feature/describe_location
Feature/describe location
2021-06-25 15:24:09 +03:00
Bogdan-Ștefan Neacșu 12ddf80fe9 Applied feedback:
- Use concrete location for example
- Removed `Location` from displayed information
- Replace tuple with a type alias
- Commit description to disk once the upgrade is finalized
- Other minor changes

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-06-25 14:21:48 +03:00
Bogdan-Ștefan Neacșu 34fcca052b mixnode: Fix clippy warning
This fixes the warning caused by `clippy::field-reassign-with-default`

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-06-25 14:20:21 +03:00
Bogdan-Ștefan Neacșu e06e7aa8f3 mixnode: Add tests for upgrade to 10.0.2
Add a positive and a negative unit test for upgrading to 10.0.2.

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-06-25 14:20:21 +03:00
Bogdan-Ștefan Neacșu 4d701be053 mixnode: Add location to describe command
Removed location from the init output and added it as input in the
describe command.

Because this creates a different format of the description file, the
patch version number must also be increased.

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-06-25 14:20:20 +03:00
Bogdan-Ștefan Neacșu 3bf02c558c mixnode: Refactor upgrade functions
Renaming the function to have a clear separation between different
parts of the version, especially for future patch upgrade functions.

Also switch to a Result return value for these functions, to gather
all the
```
eprintln!
print_failed_upgrade
exit(1)
```
calls in one place.

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
2021-06-25 14:13:21 +03:00
Jędrzej Stuczyński e7dcc8dc30 Merge branch 'develop' into feature/configurable-verloc-http-ports 2021-06-25 10:36:17 +01:00
Jędrzej Stuczyński b7f197d278 Feature/host ip split (#654)
* Updated smart contract to work with future cosmwasm 0.14.0 update

* Updated the rest of the codebase

* Reordered imports

* Missing imports

* cargo fmt

* More cargo fmt action

* Introduced type alias for IdentityKey reference

* Constant defined arguments for gateway and mixnode

* Spliting host into explicit address and port(s)

* Using more type restrictive IpAddr rather than String for listening address

* Updated config templates

* Tentative upgrade commands, probably to be further changed before release

* Fixed mixnet contract test fixtures

* Further missing test adjustments
2021-06-25 10:33:12 +01:00
Jędrzej Stuczyński 3412a0b7bd Increased validator client version 2021-06-24 15:51:05 +01:00
Jędrzej Stuczyński 23951acdec Fixed trying to log invalid field 2021-06-24 14:51:44 +01:00
Jędrzej Stuczyński b56bb7f226 Updated typescript models 2021-06-24 10:46:02 +01:00
Jędrzej Stuczyński f0fafe97fe Using verloc with custom ports 2021-06-23 16:08:48 +01:00
Jędrzej Stuczyński 9df360cf63 Removed constructors only used in tests
To elaborate further, to update Mixnode constructor it would require adding yet two more arguments and at that point the compiler warns about too many arguments
2021-06-23 16:08:27 +01:00
Jędrzej Stuczyński 035ee3a402 Added new ports to bond model 2021-06-23 16:04:21 +01:00
Jędrzej Stuczyński 035a2554ee Configurable http api port 2021-06-23 15:49:38 +01:00
Jędrzej Stuczyński 4c8f8ff1b6 Renamed 'rtt_measurement' to verloc to avoid confusion 2021-06-23 15:38:52 +01:00
Jędrzej Stuczyński 35cddab3bd Introduced cli arguments for verloc and http ports 2021-06-23 15:33:57 +01:00
Jędrzej Stuczyński 0a5f6f2ca7 Added verloc and http port fields to config 2021-06-23 15:25:23 +01:00
Jędrzej Stuczyński 53253d443c Further missing test adjustments 2021-06-23 12:58:24 +01:00
Jędrzej Stuczyński 07f2f9c39e Fixed mixnet contract test fixtures 2021-06-23 12:46:38 +01:00
Jędrzej Stuczyński 1d4026ec71 Tentative upgrade commands, probably to be further changed before release 2021-06-23 12:26:06 +01:00
Jędrzej Stuczyński 6524fa3f9c Updated config templates 2021-06-23 12:25:40 +01:00
Jędrzej Stuczyński 6e24b2681b Using more type restrictive IpAddr rather than String for listening address 2021-06-23 12:25:29 +01:00
Jędrzej Stuczyński 5ba20268dd Allow passing optional explicit bond value (#652)
* Allows passing an optional argument to specify bond value

* Fixed incorrect coin array usage

* Using minimum gateway bond for gateway bonding

* Bumped validator client version number

* Made the explicit bond value required as an argument
2021-06-22 17:15:20 +01:00
Jędrzej Stuczyński 4e03759c0f Feature/cosmwasm 0.14.1 update (#653)
* Updated smart contract to work with future cosmwasm 0.14.0 update

* Updated the rest of the codebase

* Reordered imports

* Missing imports

* cargo fmt

* More cargo fmt action

* Introduced type alias for IdentityKey reference
2021-06-22 17:07:11 +01:00
Jędrzej Stuczyński a6be3e763f Spliting host into explicit address and port(s) 2021-06-22 16:39:07 +01:00
Jędrzej Stuczyński 29ac119127 Constant defined arguments for gateway and mixnode 2021-06-22 16:38:14 +01:00
Jędrzej Stuczyński 67ce93ffc8 Merge branch 'feature/cosmwasm-0.14.1-update' into feature/host-ip_split 2021-06-22 09:44:02 +01:00
Jędrzej Stuczyński 08964f8775 Introduced type alias for IdentityKey reference 2021-06-18 12:32:13 +01:00
dependabot[bot] d8d2d84aa7 Bump websockets in /clients/native/examples/python-examples/websocket (#638)
Bumps [websockets](https://github.com/aaugustin/websockets) from 8.1 to 9.1.
- [Release notes](https://github.com/aaugustin/websockets/releases)
- [Changelog](https://github.com/aaugustin/websockets/blob/9.1/docs/changelog.rst)
- [Commits](https://github.com/aaugustin/websockets/compare/8.1...9.1)

---
updated-dependencies:
- dependency-name: websockets
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-18 12:22:38 +01:00
Jędrzej Stuczyński 7d69fa3ed5 More cargo fmt action 2021-06-18 12:21:33 +01:00
Jędrzej Stuczyński dff7a8976a cargo fmt 2021-06-18 12:15:34 +01:00
Jędrzej Stuczyński 50fbe55be9 Missing imports 2021-06-18 12:01:29 +01:00
Jędrzej Stuczyński 648543e536 Merge branch 'feature/cosmwasm-0.14.0-update' into feature/cosmwasm-0.14.1-update 2021-06-18 11:59:45 +01:00
Jędrzej Stuczyński 3d2654923a Bugfix/delegation type fixes (#649)
* Extended no delegation found errors with address information

* Error now use Display implementation rather than Debug

* Delegation correctly contains owner address

* Updated js delegation type

* Bumped validator client version number

* Delegation::owner returns owned type

* cargo fmt
2021-06-17 10:51:50 +01:00
Jędrzej Stuczyński d03798629c Introduced type aliases for mixnode and gateway keys (#650)
* Introduced type aliases for mixnode and gateway keys

* Ibid for error types

* Ibid for tests
2021-06-17 09:01:41 +01:00
Dave Hrycyszyn e470ac4b0f Removing the ancient explorer in preparation for a new dawn. (#645) 2021-06-16 13:35:33 +02:00
Dave Hrycyszyn 9324e3511f Reverting trial README change 2021-06-15 16:05:30 +01:00
Dave Hrycyszyn 23d0607239 Testing code owners again (#644) 2021-06-15 14:07:19 +01:00
Dave Hrycyszyn ebba222a86 I was missing the *, fixing 2021-06-15 12:54:07 +01:00
Dave Hrycyszyn fdbecb2a3f Removing Bogdan for the moment so as not to flood him :) 2021-06-15 12:50:42 +01:00
Dave Hrycyszyn 785513914c Merge branch 'develop' of github.com:nymtech/nym into develop 2021-06-15 12:42:25 +01:00
Dave Hrycyszyn c789853b32 Adding codeowners who can be added to PRs by default 2021-06-15 12:42:15 +01:00
Jędrzej Stuczyński 97ec416b3e TypeScript client v0.12.0 (#641) 2021-06-15 10:46:42 +01:00
Jędrzej Stuczyński 164c8ad05c Feature/reverse contract mapping (#640)
* WIP

* One fewer todos

* Migrated transactions,queries + query tests

* Transaction-related tests restored

* Import cleanup

* Initial draft of the migration procedure

* Future migration test

* Fixed rust compilation errors

* Unbonding no longer requires explicit identity

* Delegation API changes

* Fixed incorrect gateway delegation object
2021-06-14 17:55:41 +01:00
Dave Hrycyszyn 7b02026476 Bumped to 0.11.1 2021-06-11 10:51:54 +01:00
Jędrzej Stuczyński 1fb26b68c6 Feature/delegated staking (#635)
* Initial delegation

* Queries for delegation

* Validation + delegation tests

* Removing delegation tests + fixes

* Tests for query related functions

* Adjusted delegation queries page limits

* Added delegation queries to validator client

* Methods for delegation inside validator client

* Some comments

* missing return types

* Post merge fixes

* Rewarding mix delegations

* Renaming

* Moved storage keys around

* Gateway delegation

* ibid

* Removed needlessly commented lines
2021-06-10 12:55:58 +01:00
Jędrzej Stuczyński 29fd8b8805 Chore/clippy nightly fixes (#636)
* Removed needless borrow in upgrade args matches

* Pathfinder needless borrows

* cmp needless borrow

* Network monitor needless borrows

* Topology control needless borrows

* Received buffer needless borrow

* Key manager needless borrows

* Network requester needless borrow

* Gateway client needless borrow

* Gateway requests needless borrow

* Nymsphinx needless borrows

* verloc needless borrows

* Socks5 needless borrow

* Clone on copy type
2021-06-07 14:52:11 +01:00
dependabot[bot] 31b9048144 Bump ws from 6.2.1 to 6.2.2 in /clients/webassembly/js-example (#632)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 12:41:39 +01:00
dependabot[bot] 10c0e04926 Bump ws in /clients/native/examples/js-examples/websocket (#633)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 12:41:33 +01:00
dependabot[bot] c0ad3ce1a6 Bump ws from 6.2.1 to 6.2.2 in /clients/validator (#634)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 12:41:26 +01:00
Jędrzej Stuczyński 82def1349f Feature/stats endpoint (#631)
* Idea for stats endpoint

* Introduced /stats endpoint replacing sending data to metrics server

* Removed metrics client

* Removed old metrics file

* cargo fmt
2021-06-07 12:01:43 +01:00
Jędrzej Stuczyński 94a52aa2db Updated all js related dependencies (#629) 2021-06-07 12:00:12 +01:00
Jędrzej Stuczyński 50f65aa698 Feature/per layer count (#628)
* Initial struct

* WIP

* Added test for migration

* unused import
2021-06-07 11:59:33 +01:00
Jędrzej Stuczyński e12314a6fa Feature/update validator binaries (#624)
* Removed old wasmd v0.14.1 binaries

* Uploaded new wasmd v0.14.2 binaries
2021-06-07 11:02:06 +01:00
Jędrzej Stuczyński 15e377e678 Changed rewarding behaviour on not found bonds (#627) 2021-06-07 11:00:07 +01:00
Jędrzej Stuczyński 7b1dab8546 Getting required bond from the contract (#623) 2021-06-02 12:51:28 +01:00
Jędrzej Stuczyński 93e9dc5c1e Bugfix/verloc fixes and adjustments (#618)
* Using new display trait for identity key

* Establishing verloc connection with timeout

* Further decrease in log severity

* Writing echo packets with timeout

* Sender formatting

* ConnectionWriteTimeout error definition

* Writing verloc results in chunks

* Added run started and run finished fields to verloc

* Reordered the fields

* Storing the timestamps as options to indicate run in progress
2021-06-02 12:50:36 +01:00
Jędrzej Stuczyński 0dcb046576 Changed omitted print to a debug call (#617) 2021-06-02 12:48:28 +01:00
dependabot[bot] 5288510979 Bump dns-packet in /clients/native/examples/js-examples/websocket (#626)
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-01 09:42:26 +01:00
dependabot[bot] 81481832d8 Bump dns-packet from 1.3.1 to 1.3.4 in /clients/webassembly/js-example (#625)
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-01 09:42:20 +01:00
Jędrzej Stuczyński 27e704ab80 Reordered imports 2021-05-27 11:42:11 +01:00
Jędrzej Stuczyński da339a83cd Updated the rest of the codebase 2021-05-27 11:29:31 +01:00
Jędrzej Stuczyński 99780d3eb0 Updated smart contract to work with future cosmwasm 0.14.0 update 2021-05-27 11:27:09 +01:00
dependabot[bot] aee0ec7dec Bump browserslist in /clients/native/examples/js-examples/websocket (#619)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.14.1 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.14.1...4.16.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 14:56:07 +01:00
Jędrzej Stuczyński b8e8beb62b Merge tag 'v0.10.1' into develop
release v0.10.1
2021-05-25 17:15:36 +01:00
Jędrzej Stuczyński b4ef0ae4f3 Merge branch 'release/v0.10.1' 2021-05-25 17:15:28 +01:00
Jędrzej Stuczyński d9087bf2a9 Upgrade commands 2021-05-24 11:52:31 +01:00
Jędrzej Stuczyński 2f29ee49db Updated changelog 2021-05-24 11:21:28 +01:00
Jędrzej Stuczyński abc5a58b19 Version bumps 2021-05-24 11:15:59 +01:00
Jędrzej Stuczyński 01d7e3a5f2 Bugfix/unique node ownership (#612)
* Removed old migration code

* Added new errors for duplicate nodes

* Checking for node ownership before adding them

* Tests
2021-05-21 09:03:07 -04:00
Jędrzej Stuczyński ea08fad2e0 Decreased log severity for verloc-related functionalities (#611)
* Decreased log severity for verloc-related functionalities

* Removed unused variable
2021-05-20 20:53:28 -04:00
Jędrzej Stuczyński a47bbf1e67 Disabled metrics reporting to the central server (#609) 2021-05-20 09:09:52 +01:00
Jędrzej Stuczyński 1fe38b1b9c Implemented display traits for identity and encryption keys (#607) 2021-05-19 10:33:01 -04:00
Jędrzej Stuczyński ed489149dc Feature/network monitor gateway pings (#608)
* Ability to send Ping frame to gateway

* Sending ping frame to gateways every 1min

* Increased monitor run interval back to 15min

* Whitespace
2021-05-19 10:32:31 -04:00
Dave Hrycyszyn 190d3c4972 Feature/add node description api (#605)
* Starting to build out node descriptions

* Renamed the mod to node_description instead of descriptor

* Returning results loaded from file

* Taking user input for node describe command

* Readline without new dependencies

* Adding input format hint

* Making sure the node can still start even when the descriptor file isn't there yet

* Adding some additional runtime checks

* Removing -dev from minimum node version

* Removing initial :: on serde

* Fixing comment on the /description endpoint

* Swapped json for toml

* Being a bit more specific with my startup message.

* Cleaning up path building

* Nicer runtime checks

* Put path building inside the file methods
2021-05-19 14:25:11 +01:00
Jędrzej Stuczyński ea62d01e65 Feature/updated network monitor (#604)
* Connecting to gateway with a timeout

* Added address value to InvalidAddress error

* Initial updated network monitor (does not submit results yet)

* Created client for node status api

* Changed default address to the local one

* Removed old validator client

* Renamed validator client rest to validator client

* Print conversion warnings using Display rather than Debug formattingn

* WIP for adding owner field in monitor

* Preserving changes before branch switch

* Keeping track of node owners during monitoring + using those for node status api

* Removed temporary log statement

* Dont notify node status api if good nodes are broken

* Changed default monitor interval to 5min

* Post merge issues

* Allowing dead version field in seocksrequest

* Updated monitor run interval to 15min

* Reporting gateways and mixnodes separately with the new api

* Unused imports

* Decreased testing interval to temporarily bypass the silent timeout issue

* Formattingn
2021-05-18 17:33:31 +01:00
dependabot[bot] 97156c918b Bump url-parse from 1.4.7 to 1.5.1 in /clients/webassembly/js-example (#598)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 09:55:58 +01:00
dependabot[bot] d79013f1c1 Bump url-parse in /clients/native/examples/js-examples/websocket (#599)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 09:55:52 +01:00
dependabot[bot] b69b221e62 Bump lodash in /clients/native/examples/js-examples/websocket (#601)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 09:55:45 +01:00
dependabot[bot] 266138dcf2 Bump lodash from 4.17.20 to 4.17.21 in /clients/validator (#602)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 09:55:12 +01:00
Jędrzej Stuczyński a8299e867d Feature/ping timings (#603)
* WIP

* WIP for time measurement

* In theory working sender and listener

* Further additions + main.rs for local testing

* Further improvements + config builder

* Initial integration into mixnode

* Verifying mixnode version

* 1.52+ clipy warning

* 1.54 nightly clippy fixes

* Changed HTTP Api to bind to the same ip as used for mix packets

* Changed measurements to instead write to shared object

* Required dependencies

* Connecting with the http api

* Updated mixnode common rand dependency
2021-05-12 11:20:03 -04:00
Dave Hrycyszyn 7dc4d653c2 Feature/add rocket (#600)
* Added rocket at a git tag

* Adding Rocket to the mixnode

* Verloc route now in place

* Adding an http api startup notification

* Updated version number to 0.10.1-dev

* Fixing clippy warnings

* Compressing split a bit

* Adjusted used version of js-sys

Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
2021-05-11 17:40:29 +01:00
Jędrzej Stuczyński 2f9e67e8b2 Recalculating reward rates on appropriate value changes (#594) 2021-05-05 11:47:36 -04:00
Jędrzej Stuczyński 2c058bcbca Feature/simple payments (#571)
* Calculating reward per epoch

* Initial uptime-based rewards

* Setting monitor address on init + minor cleanup

* Ability to reward nodes through validator client

* Preemptively updated client version

* Using hardcoded monitor address

* Removed unnecessary let binding

* Comment typo

* Changed validator-client package.json version

* Checking for broadcast error

* Added epoch_length to typescript client's stateparams

* Setting default state on migration

* Removed reward mixnode/gateway methods from the client api

* api for executing custom contract methods

* Removed whitespace leftover from the merge

* Extra comments

* Cleanup

Co-authored-by: Dave Hrycyszyn <futurechimp@users.noreply.github.com>
2021-04-29 14:22:14 -04:00
Jędrzej Stuczyński 528eba2faa Changed default mixnode query page limit (#592)
* Changed default mixnode query page limit

* Fixed the tests

* 0.11.0 validator client
2021-04-29 13:58:28 -04:00
Jędrzej Stuczyński 7f7c37eeba Feature/more exposed client api (#591)
* Added public sign and broadcast to net client

* Created a function to send funds multiple times in a single block
2021-04-28 09:13:41 -04:00
Jędrzej Stuczyński 18adb1f5bd Contract adjustment to check for node ownership before allowing bonding (#590)
* Checking for gateway/mixnode ownership before allowing bonding of the other type

* Renamed bond and unbond to bondmixnode and unbondmixnode
2021-04-28 09:12:20 -04:00
Jędrzej Stuczyński a521bc0f54 Logging adjustment (#585)
* Reduced severity of common harmless warnings

* Changed the same ip node warning

* More explicit error on network address binding failure
2021-04-28 09:11:04 -04:00
dependabot[bot] 6f173ffebd Bump ssri from 6.0.1 to 6.0.2 in /clients/webassembly/js-example (#589)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-23 17:14:33 +01:00
dependabot[bot] 7e31cbabe5 Bump ssri in /clients/native/examples/js-examples/websocket (#588)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-23 17:14:19 +01:00
Jędrzej Stuczyński e8e966b67a Feature/multiple validator endpoints (#583)
* Rust half done

* Removed the temporary 'test'

* Using multiple validator endpoints in the javascript client

* Dont attempt any switches with a single validator endpoint

* Removed the unused temporary function

* Updated validator-client version
2021-04-23 16:41:39 +01:00
Jędrzej Stuczyński 73af405400 Checking for tx success when sending coins (#586)
* Checking for tx success when sending coins

* Changed send return type to BroadcastTxSuccess
2021-04-23 15:34:35 +01:00
Jędrzej Stuczyński 037723eb90 Impl Error trait for ValidatorClientError (#587) 2021-04-23 10:58:06 +01:00
François Garillot d432bebce8 Minor cosmetic changes while reading around (#568)
* Simplify some Option / Result / ? operator patterns

... when they have a direct combinator equivalent.

Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust)

* Remove panic in socket state
2021-04-19 15:12:19 +01:00
Jędrzej Stuczyński 0a3cffa1a1 Validator client patch version increase 2021-04-16 10:17:01 +01:00
Jędrzej Stuczyński 796107c4c5 Refreshing nodes gets all available nodes from the contract (#575) 2021-04-16 10:15:25 +01:00
Jędrzej Stuczyński fd0df9fe47 Merge tag '0.10.0' into develop
release 0.10.0
2021-04-15 10:05:29 +01:00
1376 changed files with 222373 additions and 78257 deletions
+40
View File
@@ -0,0 +1,40 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# More details are here: https://help.github.com/articles/about-codeowners/
# The '*' pattern is global owners.
# Order is important. The last matching pattern has the most precedence.
# The folders are ordered as follows:
# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.
# Something weird not covered by anything else
* @futurechimp @mmsinclair
# Rust rules:
*.rs @durch @futurechimp @jstuczyn @neacsu @octol
Cargo.* @durch @futurechimp @jstuczyn @neacsu @octol
# JS rules:
*.js @mmsinclair @fmtabbara @Aid19801
*.ts @mmsinclair @fmtabbara @Aid19801
*.tsx @mmsinclair @fmtabbara @Aid19801
*.jsx @mmsinclair @fmtabbara @Aid19801
# Something looking like possible documentation rules:
*.md @mfahampshire
# our docker scripts
/docker/ @neacsu
# if there are any changes in the core crypto, I feel like Ania should take a look:
/common/crypto/ @aniampio
/common/nymsphinx/ @aniampio
# Explorer and wallet should probably get looked by the product team
/explorer/ @nymtech/product
/nym-wallet/ @nymtech/product
/wallet-web/ @nymtech/product
+32
View File
@@ -0,0 +1,32 @@
---
name: Feature request
about: Suggest an enhancement to the product
title: "[Feature Request]"
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is...
**Is your request a feature not related to an existing problem? A new feature.**
For example.
- Given I am using the nym wallet
- When I transfer nym tokens across the network
- Then I want to have an url link in the wallet which navigates outside the application to the nym-explorer
**Where does the feature fit in the Nym real estate?**
- Application / UI
**What is this solving?**
How will this improve the product...
**Is this an update to packages or libraries?**
If so, please list them. If not, please ignore this section.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+43
View File
@@ -0,0 +1,43 @@
---
name: Report
about: To help identify and reproduce issues
title: "[Issue]"
labels: bug, bug-needs-triage, qa
assignees: tommyv1987
---
**Describe the issue**
A clear and concise description of what the issue is...
**Expected behaviour**
A clear and concise description of what you expected to happen...
**Stack Traces**
If there are stack traces or logs, please provide them here...
**Steps to Reproduce**
Steps to reproduce the behaviour, if you're familiar with BDD syntax, please write it in this style:
- Given I was doing X
- And I installed Y
- When I actioned Y
- Then I expect Z
*An example:*
- Given I was setting up a mix-node following the instructions in the docs
- And I successfully bonded my node via the the wallet
- When I went to start my mixnode
- Then I was presented with an error
**Screenshots**
If applicable, add screenshots to help explain your problem...
**Which area of Nym were you using?**
- UI: [e.g. Websites - network-explorer, nym-website]
- Application: [e.g Gateway, Client, Wallet]
- OS: [e.g. Ubuntu 20.x, MacOs Big Sur, Windows 10]
- Browser: [e.g Chrome (if applicable)]
- Version: [e.g. nym binary(0.11.0), browser(94.0)]
**Additional context**
Please provide any other information
+63
View File
@@ -0,0 +1,63 @@
name: CI for ts-packages
on:
push:
paths:
- 'ts-packages/**'
jobs:
build:
runs-on: custom-runner-linux
steps:
- uses: actions/checkout@v2
- name: Install rsync
run: sudo apt-get install rsync
- uses: rlespinasse/github-slug-action@v3.x
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Setup yarn
run: npm install -g yarn
- name: Build
run: yarn && yarn build && yarn build:ci
- name: Deploy branch to CI www (storybook)
continue-on-error: true
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
ARGS: "-rltgoDzvO --delete"
SOURCE: "ts-packages/dist/storybook/"
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/ts-${{ env.GITHUB_REF_SLUG }}
EXCLUDE: "/dist/, /node_modules/"
- name: Deploy branch to CI www (example)
continue-on-error: true
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
ARGS: "-rltgoDzvO --delete"
SOURCE: "ts-packages/dist/example/"
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/ts-${{ env.GITHUB_REF_SLUG }}-example
EXCLUDE: "/dist/, /node_modules/"
- name: Keybase - Node Install
run: npm install
working-directory: .github/workflows/support-files
- name: Keybase - Send Notification
env:
NYM_NOTIFICATION_KIND: ts-packages
NYM_PROJECT_NAME: "ts-packages"
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
NYM_CI_WWW_LOCATION: "ts-${{ env.GITHUB_REF_SLUG }}"
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
GIT_BRANCH: "${GITHUB_REF##*/}"
KEYBASE_NYMBOT_USERNAME: "${{ secrets.KEYBASE_NYMBOT_USERNAME }}"
KEYBASE_NYMBOT_PAPERKEY: "${{ secrets.KEYBASE_NYMBOT_PAPERKEY }}"
KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}"
KEYBASE_NYM_CHANNEL: "ci-ts-packages"
IS_SUCCESS: "${{ job.status == 'success' }}"
uses: docker://keybaseio/client:stable-node
with:
args: .github/workflows/support-files/notifications/entry_point.sh
+55 -19
View File
@@ -1,42 +1,78 @@
name: Continuous integration
on: [push, pull_request]
on:
push:
paths-ignore:
- 'explorer/**'
pull_request:
paths-ignore:
- 'explorer/**'
jobs:
ci:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
rust: [stable, beta, nightly]
os: [ubuntu-latest, macos-latest, windows-latest]
build:
runs-on: [ self-hosted, custom-linux-exoscale ]
# Enable sccache via environment variable
env:
RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache
steps:
- uses: actions/checkout@v2
- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
- uses: actions-rs/toolchain@v1
- name: Check out repository code
uses: actions/checkout@v2
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
- name: Build all binaries
uses: actions-rs/cargo@v1
with:
command: build
args: --all
args: --workspace
- uses: actions-rs/cargo@v1
- name: Run all tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all
args: --workspace --all-features
- uses: actions-rs/cargo@v1
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
- uses: actions-rs/clippy-check@v1
name: Clippy checks
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: --workspace -- -D warnings
- name: Build all binaries with coconut enabled
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --features=coconut
- name: Run all tests with coconut enabled
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --features=coconut
- name: Run clippy with coconut enabled
uses: actions-rs/cargo@v1
with:
command: clippy
args: --features=coconut -- -D warnings
@@ -0,0 +1,19 @@
[
{
"os":"ubuntu-latest",
"rust":"stable",
"runOnEvent":"always"
},
{
"os":"windows-latest",
"rust":"stable",
"runOnEvent":"pull_request"
},
{
"os":"macos-latest",
"rust":"stable",
"runOnEvent":"pull_request"
}
]
-14
View File
@@ -1,14 +0,0 @@
name: Clippy check
on: push
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
@@ -0,0 +1,14 @@
[
{
"rust":"stable",
"runOnEvent":"always"
},
{
"rust":"beta",
"runOnEvent":"pull_request"
},
{
"rust":"nightly",
"runOnEvent":"pull_request"
}
]
+64
View File
@@ -0,0 +1,64 @@
name: Contracts
on:
push:
paths-ignore:
- 'explorer/**'
pull_request:
paths-ignore:
- 'explorer/**'
jobs:
matrix_prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
# creates the matrix strategy from build_matrix_includes.json
- uses: actions/checkout@v2
- id: set-matrix
uses: JoshuaTheMiller/conditional-build-matrix@main
with:
inputFile: '.github/workflows/contract_matrix_includes.json'
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
contracts:
# since it's going to be compiled into wasm, there's absolutely
# no point in running CI on different OS-es
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.rust == 'nightly' }}
needs: matrix_prep
strategy:
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
env:
RUSTFLAGS: '-C link-arg=-s'
with:
command: build
args: --manifest-path contracts/Cargo.toml --workspace --target wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path contracts/Cargo.toml
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path contracts/Cargo.toml --all -- --check
- uses: actions-rs/cargo@v1
if: ${{ matrix.rust != 'nightly' }}
with:
command: clippy
args: --manifest-path contracts/Cargo.toml --workspace -- -D warnings
-43
View File
@@ -1,43 +0,0 @@
name: Mixnet Contract
on: [push, pull_request]
jobs:
ci:
# since it's going to be compiled into wasm, there's absolutely
# no point in running CI on different OS-es
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
rust: [ stable, beta, nightly ]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path contracts/mixnet/Cargo.toml --target wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path contracts/mixnet/Cargo.toml
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path contracts/mixnet/Cargo.toml -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path contracts/mixnet/Cargo.toml -- -D warnings
@@ -0,0 +1,24 @@
name: Linting for Network Explorer (eslint/prettier)
on:
pull_request:
paths:
- 'explorer/**'
defaults:
run:
working-directory: explorer
jobs:
build:
runs-on: custom-runner-linux
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Setup yarn
run: npm install -g yarn
- name: Run ESLint
# GitHub should automatically annotate the PR
run: yarn && yarn lint
+63
View File
@@ -0,0 +1,63 @@
name: CI for Network Explorer
on:
push:
paths:
- 'explorer/**'
defaults:
run:
working-directory: explorer
jobs:
build:
runs-on: custom-runner-linux
steps:
- uses: actions/checkout@v2
- name: Install rsync
run: sudo apt-get install rsync
- uses: rlespinasse/github-slug-action@v3.x
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Setup yarn
run: npm install -g yarn
continue-on-error: true
- name: Build shared packages
run: cd .. && yarn && yarn build
- name: Set environment from the example
run: cp .env.prod .env
# - run: yarn test
# continue-on-error: true
- run: yarn && yarn build
continue-on-error: true
- name: Deploy branch to CI www
continue-on-error: true
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
ARGS: "-rltgoDzvO --delete"
SOURCE: "explorer/dist/"
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/network-explorer-${{ env.GITHUB_REF_SLUG }}
EXCLUDE: "/dist/, /node_modules/"
- name: Keybase - Node Install
run: npm install
working-directory: .github/workflows/support-files
- name: Keybase - Send Notification
env:
NYM_NOTIFICATION_KIND: network-explorer
NYM_PROJECT_NAME: "Network Explorer"
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
NYM_CI_WWW_LOCATION: "network-explorer-${{ env.GITHUB_REF_SLUG }}"
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
GIT_BRANCH: "${GITHUB_REF##*/}"
KEYBASE_NYMBOT_USERNAME: "${{ secrets.KEYBASE_NYMBOT_USERNAME }}"
KEYBASE_NYMBOT_PAPERKEY: "${{ secrets.KEYBASE_NYMBOT_PAPERKEY }}"
KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}"
KEYBASE_NYM_CHANNEL: "ci-network-explorer"
IS_SUCCESS: "${{ job.status == 'success' }}"
uses: docker://keybaseio/client:stable-node
with:
args: .github/workflows/support-files/notifications/entry_point.sh
+125
View File
@@ -0,0 +1,125 @@
name: Nightly builds
on:
schedule:
- cron: '14 4 * * *'
jobs:
matrix_prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
# creates the matrix strategy from nightly_build_matrix_includes.json
- uses: actions/checkout@v2
- id: set-matrix
uses: JoshuaTheMiller/conditional-build-matrix@main
with:
inputFile: '.github/workflows/nightly_build_matrix_includes.json'
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
build:
needs: matrix_prep
strategy:
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.rust == 'stable' }}
steps:
- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
if: matrix.os == 'ubuntu-latest'
- name: Check out repository code
uses: actions/checkout@v2
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Build all binaries
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace
- name: Run all tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Reclaim some disk space (because Windows is being annoying)
uses: actions-rs/cargo@v1
if: ${{ matrix.os == 'windows-latest' }}
with:
command: clean
- uses: actions-rs/clippy-check@v1
name: Clippy checks
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Run clippy
uses: actions-rs/cargo@v1
if: ${{ matrix.rust != 'nightly' }}
with:
command: clippy
args: --workspace --all-targets -- -D warnings
# COCONUT stuff
- name: Build all binaries with coconut enabled
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --features=coconut
- name: Run all tests with coconut enabled
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --features=coconut
- name: Run clippy with coconut enabled
uses: actions-rs/cargo@v1
if: ${{ matrix.rust != 'nightly' }}
with:
command: clippy
args: --workspace --all-targets --features=coconut -- -D warnings
notification:
needs: build
runs-on: ubuntu-latest
steps:
- name: Collect jobs status
uses: technote-space/workflow-conclusion-action@v2
- name: Check out repository code
uses: actions/checkout@v2
- name: Keybase - Node Install
if: env.WORKFLOW_CONCLUSION == 'failure'
run: npm install
working-directory: .github/workflows/support-files
- name: Keybase - Send Notification
if: env.WORKFLOW_CONCLUSION == 'failure'
env:
NYM_NOTIFICATION_KIND: nightly
NYM_PROJECT_NAME: "Nym nightly build"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
GIT_BRANCH: "${GITHUB_REF##*/}"
KEYBASE_NYMBOT_USERNAME: "${{ secrets.KEYBASE_NYMBOT_USERNAME }}"
KEYBASE_NYMBOT_PAPERKEY: "${{ secrets.KEYBASE_NYMBOT_PAPERKEY }}"
KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}"
KEYBASE_NYM_CHANNEL: "ci-nightly"
IS_SUCCESS: "${{ env.WORKFLOW_CONCLUSION == 'success' }}"
uses: docker://keybaseio/client:stable-node
with:
args: .github/workflows/support-files/notifications/entry_point.sh
@@ -0,0 +1,50 @@
[
{
"os":"ubuntu-latest",
"rust":"stable",
"runOnEvent":"schedule"
},
{
"os":"windows-latest",
"rust":"stable",
"runOnEvent":"schedule"
},
{
"os":"macos-latest",
"rust":"stable",
"runOnEvent":"schedule"
},
{
"os":"ubuntu-latest",
"rust":"beta",
"runOnEvent":"schedule"
},
{
"os":"windows-latest",
"rust":"beta",
"runOnEvent":"schedule"
},
{
"os":"macos-latest",
"rust":"beta",
"runOnEvent":"schedule"
},
{
"os":"ubuntu-latest",
"rust":"nightly",
"runOnEvent":"schedule"
},
{
"os":"windows-latest",
"rust":"nightly",
"runOnEvent":"schedule"
},
{
"os":"macos-latest",
"rust":"nightly",
"runOnEvent":"schedule"
}
]
+43
View File
@@ -0,0 +1,43 @@
name: Publish Nym binaries
on:
release:
types: [created]
jobs:
publish-nym:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Check the release tag starts with `nym-binaries-`
if: startsWith(github.ref, 'refs/tags/nym-binaries-') == false
uses: actions/github-script@v3
with:
script: |
core.setFailed('Release tag did not start with nym-binaries-...')
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build all binaries
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --release
- name: Upload to release based on tag name
uses: softprops/action-gh-release@v1
with:
files: |
target/release/nym-client
target/release/nym-gateway
target/release/nym-mixnode
target/release/nym-socks5-client
target/release/nym-validator-api
@@ -0,0 +1,77 @@
name: Publish Nym Wallet (MacOS)
on:
release:
types: [created]
defaults:
run:
working-directory: nym-wallet
jobs:
publish-tauri:
strategy:
fail-fast: false
matrix:
platform: [macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Check the release tag starts with `nym-wallet-`
if: startsWith(github.ref, 'refs/tags/nym-wallet-') == false
uses: actions/github-script@v3
with:
script: |
core.setFailed('Release tag did not start with nym-wallet-...')
- name: Node v16
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install the Apple developer certificate for code signing
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$APPLE_CERTIFICATE" | base64 --decode --output $CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$APPLE_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Install app dependencies and build it
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_IDENTITY_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
run: yarn && yarn build
- name: Upload to release based on tag name
uses: softprops/action-gh-release@v1
with:
files: nym-wallet/target/release/bundle/dmg/*.dmg
- name: Clean up keychain
if: ${{ always() }}
run: |
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
@@ -0,0 +1,46 @@
name: Publish Nym Wallet (Ubuntu)
on:
release:
types: [created]
defaults:
run:
working-directory: nym-wallet
jobs:
publish-tauri:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Tauri dependencies
run: >
sudo apt-get update &&
sudo apt-get install -y webkit2gtk-4.0
- name: Check the release tag starts with `nym-wallet-`
if: startsWith(github.ref, 'refs/tags/nym-wallet-') == false
uses: actions/github-script@v3
with:
script: |
core.setFailed('Release tag did not start with nym-wallet-...')
- name: Node v16
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install app dependencies and build it
run: yarn && yarn build
- name: Upload to release based on tag name
uses: softprops/action-gh-release@v1
with:
files: nym-wallet/target/release/bundle/appimage/*.AppImage
@@ -0,0 +1,71 @@
name: Publish Nym Wallet (Windows 10)
on:
release:
types: [created]
defaults:
run:
working-directory: nym-wallet
jobs:
publish-tauri:
strategy:
fail-fast: false
matrix:
platform: [windows10]
runs-on: ${{ matrix.platform }}
steps:
- name: Clean up first
continue-on-error: true
working-directory: .
run: |
cd ..
del /s /q /A:H nym
rmdir /s /q nym
- uses: actions/checkout@v3
- name: Check the release tag starts with `nym-wallet-`
if: startsWith(github.ref, 'refs/tags/nym-wallet-') == false
uses: actions/github-script@v3
with:
script: |
core.setFailed('Release tag did not start with nym-wallet-...')
- name: Import signing certificate
env:
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE
certutil -decode certificate/tempCert.txt certificate/certificate.pfx
Remove-Item -path certificate -include tempCert.txt
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText)
- name: Node v16
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install app dependencies
run: yarn
- name: Build and sign it
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_CODE_SIGNING: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
run: yarn build
- name: Upload to release based on tag name
uses: softprops/action-gh-release@v1
with:
files: nym-wallet/target/release/bundle/msi/*.msi
+77
View File
@@ -0,0 +1,77 @@
name: Webdriverio tests for nym wallet
on:
push:
paths:
- "nym-wallet/**"
defaults:
run:
working-directory: nym-wallet
jobs:
test:
name: wallet tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Tauri dependencies
run: >
sudo apt-get update &&
sudo apt-get install -y
libgtk-3-dev
libgtksourceview-3.0-dev
webkit2gtk-4.0
libappindicator3-dev
webkit2gtk-driver
xvfb
- name: Install minimal stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Node v16
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install yarn for building application
run: yarn install
- name: Build application
run: yarn run webpack:build & yarn run tauri:build
- name: Check binary exists
run: |
cd target/release/
(test -f nym-wallet && echo nym binary exists) || echo wallet does not exist
- name: Install dependencies
run: yarn install
working-directory: nym-wallet/webdriver
- name: Remove existing user datafile
uses: JesseTG/rm@v1.0.2
with:
path: nym-wallet/webdriver/common/data/user-data.json
- name: Create user data json file
id: create-json
uses: jsdaniell/create-json@1.1.2
with:
name: "user-data.json"
json: ${{ secrets.WALLET_USERDATA }}
dir: "nym-wallet/webdriver/common/data/"
- name: Install tauri-driver
uses: actions-rs/cargo@v1
with:
command: install
args: tauri-driver
- name: Launch tests
run: xvfb-run yarn test:runall
working-directory: nym-wallet/webdriver
@@ -0,0 +1,35 @@
KEYBASE_NYM_CHANNEL=
KEYBASE_NYMBOT_USERNAME=
KEYBASE_NYMBOT_PAPERKEY=
NYM_NOTIFICATION_KIND=nightly
NYM_PROJECT_NAME=Nightly Build
#----------------------------------------------------------------
# Custom GitHub Actions mock env vars
IS_SUCCESS=true
#----------------------------------------------------------------
# GitHub Actions context mock env vars
GITHUB_SHA=abcdef
GITHUB_RUN_ID=123456
GITHUB_REPOSITORY=nymtech/nym
GITHUB_SERVER_URL=https://github.com
GIT_BRANCH_NAME=feature/testing-support-files
GIT_BRANCH=feature/testing-support-files
GIT_COMMIT_MESSAGE=This is the commit message
GITHUB_ACTOR=octocat
# add a Personal Access Token (PAT) generated from GitHub here for use in testing
GITHUB_TOKEN=
#----------------------------------------------------------------
# Network Explorer
NYM_CI_WWW_LOCATION=some-branch
NYM_CI_WWW_BASE=example.com
#----------------------------------------------------------------
# Nightly builds
WORKFLOW_CONCLUSION=success
SHOW_DEBUG=true
@@ -0,0 +1,5 @@
node_modules
.idea
# don't commit the lock file to avoid cross-platform issues
package-lock.json
+1
View File
@@ -0,0 +1 @@
16
@@ -0,0 +1,6 @@
{
"trailingComma": "all",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2
}
+58
View File
@@ -0,0 +1,58 @@
# GitHub Actions Support Files
This is a collection of scripts and files to support GitHub Actions.
## Sending Notifications
These scripts send CI notifications to Keybase by creating messages from templates and env vars passed from GitHub Actions.
### Adding notifications to a GitHub Action
```
jobs:
build:
...
- name: Notifications - Node Install
run: npm install
working-directory: .github/workflows/support-files/notifications
- name: Notifications - Send
env:
NYM_NOTIFICATION_KIND: "my-component"
GIT_BRANCH: "${GITHUB_REF##*/}"
KEYBASE_NYMBOT_USERNAME: "${{ secrets.KEYBASE_NYMBOT_USERNAME }}"
KEYBASE_NYMBOT_PAPERKEY: "${{ secrets.KEYBASE_NYMBOT_PAPERKEY }}"
KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}"
KEYBASE_NYM_CHANNEL: "ci-network-explorer"
IS_SUCCESS: "${{ job.status == 'success' }}"
uses: docker://keybaseio/client:stable-node
with:
args: .github/workflows/support-files/notifications/entry_point.sh
```
Notifications are run by adding the snippet above to a GitHub Action, and:
1. Installing node packages needed at run time
2. Set the env vars as required:
- `NYM_NOTIFICATION_KIND` matches the directory in `.github/workflows/support-files/${NYM_NOTIFICATION_KIND}` to provide the templates and extra scripting in `index.js`
- Keybase credentials, channel and other env vars for the status of the build and repo
3. Replacing the default entry point shell script on the `keybaseio/client:stable-node` docker image to run `.github/workflows/support-files/notifications/entry_point.sh`
### Running locally
You will need:
- Node 16 LTS
- npm
Copy `.github/workflows/support-files/.env.example` to `.github/workflows/support-files/.env` and valid Keybase credentials.
Then run `npm install` to get dependencies.
Start development mode for the notification type you want either by passing the value as an env var called `NYM_NOTIFICATION_KIND` or set the `.env` file values correctly.
```bash
cd .github/workflows/support-files
npm install
cp .env.example .env
vi .env
npm run dev
```
+1
View File
@@ -0,0 +1 @@
require('./notifications/send_message');
@@ -0,0 +1,29 @@
const Handlebars = require('handlebars');
const fs = require('fs');
const path = require('path');
async function addToContextAndValidate(context) {
if (!context.env.NYM_CI_WWW_LOCATION) {
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
}
if (!context.env.NYM_CI_WWW_BASE) {
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
}
}
async function getMessageBody(context) {
const source = fs
.readFileSync(
context.env.IS_SUCCESS === 'true'
? path.resolve(__dirname, 'templates', 'success')
: path.resolve(__dirname, 'templates', 'failure'),
)
.toString();
const template = Handlebars.compile(source);
return template(context);
}
module.exports = {
addToContextAndValidate,
getMessageBody,
};
@@ -0,0 +1,11 @@
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
> :rocket: {{ env.NYM_PROJECT_NAME }}
> 🔴 **FAILURE** :cry:
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
Commit message:
```
{{ env.GIT_COMMIT_MESSAGE }}
```
@@ -0,0 +1,11 @@
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View output:** https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}/
> ✅ **SUCCESS**
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
```
{{ env.GIT_COMMIT_MESSAGE }}
```
@@ -0,0 +1,162 @@
const Handlebars = require('handlebars');
const fs = require('fs');
const path = require('path');
const { Octokit, App } = require('octokit');
async function addToContextAndValidate(context) {
if (!context.env.WORKFLOW_CONCLUSION) {
throw new Error('Please ensure the env var WORKFLOW_CONCLUSION is set');
}
if (!context.env.GITHUB_TOKEN) {
throw new Error('Please ensure the env var GITHUB_TOKEN is set');
}
if (!context.env.GITHUB_RUN_ID) {
throw new Error('Please ensure the env var GITHUB_RUN_ID is set');
}
if (!context.env.GITHUB_REPOSITORY) {
throw new Error('Please ensure the env var GITHUB_REPOSITORY is set');
}
}
async function getMessageBody(context) {
const source = fs
.readFileSync(
context.env.WORKFLOW_CONCLUSION === 'success'
? path.resolve(__dirname, 'templates', 'success')
: path.resolve(__dirname, 'templates', 'failure'),
)
.toString();
const template = Handlebars.compile(source);
// get job details from GitHub API
const octokit = new Octokit({ auth: context.env.GITHUB_TOKEN });
const [owner, repo] = context.env.GITHUB_REPOSITORY.split('/');
const {
data: { jobs },
} = await octokit.rest.actions.listJobsForWorkflowRun({
run_id: context.env.GITHUB_RUN_ID,
owner,
repo,
});
// uncomment this to see what is available for each job
if(process.env.SHOW_DEBUG) {
console.dir(jobs, { depth: null });
}
/*
a sample of the response is:
{
total_count: 10,
jobs: [
{
id: 5182940024,
run_id: 1840752095,
run_url: 'https://api.github.com/repos/nymtech/nym/actions/runs/1840752095',
run_attempt: 1,
node_id: 'CR_kwDODdjOis8AAAABNO1jeA',
head_sha: 'aa00eb70d57751bfa556bd3602df87c7473367fc',
url: 'https://api.github.com/repos/nymtech/nym/actions/jobs/5182940024',
html_url: 'https://github.com/nymtech/nym/runs/5182940024?check_suite_focus=true',
status: 'completed',
conclusion: 'success',
started_at: '2022-02-14T11:28:34Z',
completed_at: '2022-02-14T11:28:38Z',
name: 'matrix_prep',
steps: [
{
name: 'Set up job',
status: 'completed',
conclusion: 'success',
number: 1,
started_at: '2022-02-14T13:28:34.000+02:00',
completed_at: '2022-02-14T13:28:36.000+02:00'
},
{
name: 'Run actions/checkout@v2',
status: 'completed',
conclusion: 'success',
number: 2,
started_at: '2022-02-14T13:28:36.000+02:00',
completed_at: '2022-02-14T13:28:37.000+02:00'
},
...
],
check_run_url: 'https://api.github.com/repos/nymtech/nym/check-runs/5182940024',
labels: [ 'ubuntu-latest' ],
runner_id: 1,
runner_name: 'Hosted Agent',
runner_group_id: 2,
runner_group_name: 'GitHub Actions'
},
{
id: 5182943473,
run_id: 1840752095,
run_url: 'https://api.github.com/repos/nymtech/nym/actions/runs/1840752095',
run_attempt: 1,
node_id: 'CR_kwDODdjOis8AAAABNO1w8Q',
head_sha: 'aa00eb70d57751bfa556bd3602df87c7473367fc',
url: 'https://api.github.com/repos/nymtech/nym/actions/jobs/5182943473',
html_url: 'https://github.com/nymtech/nym/runs/5182943473?check_suite_focus=true',
status: 'completed',
conclusion: 'failure',
started_at: '2022-02-14T11:29:04Z',
completed_at: '2022-02-14T11:55:45Z',
name: 'build (macos-latest, stable, schedule)',
steps: [
{
name: 'Set up job',
status: 'completed',
conclusion: 'success',
number: 1,
started_at: '2022-02-14T13:29:04.000+02:00',
completed_at: '2022-02-14T13:29:26.000+02:00'
},
{
name: 'Install Dependencies (Linux)',
status: 'completed',
conclusion: 'skipped',
number: 2,
started_at: '2022-02-14T13:29:26.000+02:00',
completed_at: '2022-02-14T13:29:26.000+02:00'
},
{
name: 'Keybase - Send Notification',
status: 'completed',
conclusion: 'failure',
number: 15,
started_at: '2022-02-14T13:55:44.000+02:00',
completed_at: '2022-02-14T13:55:44.000+02:00'
},
],
check_run_url: 'https://api.github.com/repos/nymtech/nym/check-runs/5182943473',
labels: [ 'macos-latest' ],
runner_id: 4,
runner_name: 'GitHub Actions 4',
runner_group_id: 2,
runner_group_name: 'GitHub Actions'
},
...
]
}
*/
const jobResults = jobs
.map((job) => {
const icon = job.conclusion === 'success' ? '🟩' : '🟥';
// each job is converted into formatted markdown text
return `${icon} ${job.conclusion}: ${job.name} - ${job.html_url}`;
})
// and join with newlines for display in the template
.join('\n');
return template({ ...context, jobResults });
}
module.exports = {
addToContextAndValidate,
getMessageBody,
};
@@ -0,0 +1,9 @@
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
> :rocket: {{ env.NYM_PROJECT_NAME }}
> 🔴 **FAILURE** :cry:
> `when` {{ timestamp }}
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
{{ jobResults }}
@@ -0,0 +1,9 @@
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
> :rocket: {{ env.NYM_PROJECT_NAME }}
> ✅ **SUCCESS**
> `when` {{ timestamp }}
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
{{ jobResults }}
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# pass exit codes out to GitHub Actions
set -euxo pipefail
# change to the directory that contains this script
cd "${0%/*}"
# run the node script
node send_message.js
@@ -0,0 +1,153 @@
require('dotenv').config();
const Bot = require('keybase-bot');
let context = {
kinds: ['ts-packages', 'network-explorer', 'nightly'],
};
/**
* Validate that all required env and context vars are available
*/
function validateContext() {
if (!context.env.NYM_NOTIFICATION_KIND) {
throw new Error(
'Please set env var NYM_NOTIFICATION_KIND with the project kind that matches a directory in ".github/workflows/support-files"',
);
}
if (!context.kinds.includes(context.env.NYM_NOTIFICATION_KIND)) {
throw new Error(`Env var NYM_NOTIFICATION_KIND is not in ${context.kinds}`);
}
if (!context.env.NYM_PROJECT_NAME) {
throw new Error(
'Please set env var NYM_PROJECT_NAME with the project name for displaying in notification messages',
);
}
if (!context.env.KEYBASE_NYM_CHANNEL) {
throw new Error(
'Please set env var KEYBASE_NYM_CHANNEL with the channel name for the notification message',
);
}
if (!context.env.KEYBASE_NYMBOT_USERNAME) {
throw new Error(
'Username is not defined. Please set env var KEYBASE_NYMBOT_USERNAME',
);
}
if (!context.env.KEYBASE_NYMBOT_PAPERKEY) {
throw new Error(
'Paperkey is not defined. Please set env var KEYBASE_NYMBOT_PAPERKEY',
);
}
}
/**
* Creates a context that will be available in the templates for rendering notifications
*/
function createTemplateContext() {
const options = { dateStyle: 'full', timeStyle: 'long' };
context.timestamp = new Date().toLocaleString(undefined, options);
// add environment to template context and validate
context.env = process.env;
try {
validateContext();
} catch (e) {
if(process.env.SHOW_DEBUG) {
// recursively print the context for easy debugging and rethrow the error
console.dir({ context }, { depth: null });
}
throw e;
}
context.kind = context.env.NYM_NOTIFICATION_KIND;
context.keybase = {
channel: context.env.KEYBASE_NYM_CHANNEL,
username: context.env.KEYBASE_NYMBOT_USERNAME,
paperkey: context.env.KEYBASE_NYMBOT_PAPERKEY,
};
if (!context.env.GIT_BRANCH_NAME) {
context.env.GIT_BRANCH_NAME = context.env.GITHUB_REF.split('/')
.slice(2)
.join('/');
}
context.status = process.env.IS_SUCCESS === 'true' ? 'success' : 'failure';
}
async function sendKeybaseMessage(messageBody) {
const bot = new Bot();
try {
console.log(
`Initialising keybase with user "${
context.keybase.username
}" and key: "${'*'.repeat(context.keybase.paperkey.length)}"...`,
);
await bot.init(context.keybase.username, context.keybase.paperkey, {
verbose: false,
});
const channel = {
name: 'nymtech_bot',
membersType: 'team',
topicName: context.keybase.channel,
topic_type: 'CHAT',
};
const message = {
body: messageBody,
};
console.log(`Sending to ${channel.name}#${channel.topicName}...`);
await bot.chat.send(channel, message);
console.log('Message sent!');
} catch (error) {
console.error(error);
process.exitCode = -1;
} finally {
await bot.deinit();
}
}
/**
* Uses the `kind` set in the context to process the context and generate a notification message
* @returns {Promise<string>} A string notification message body
*/
async function processKindScript() {
const script = require(`../${context.kind}`);
if (!script.addToContextAndValidate) {
throw new Error(
`"./${context.kind}/index.js" does not export a method called "async addToContextAndValidate(context)"`,
);
}
if (!script.getMessageBody) {
throw new Error(
`"./${context.kind}/index.js" does not export a method called "async getMessageBody(context)"`,
);
}
// call the script to modify and validate the context
await script.addToContextAndValidate(context);
// let the script create a message body and return the result as a string for sending
return await script.getMessageBody(context);
}
/**
* The main function, as async so that await syntax is available
*/
async function main() {
createTemplateContext();
console.log(`Sending notification for kind "${context.kind}"...`);
const messageBody = await processKindScript();
if(process.env.SHOW_DEBUG) {
console.log('-----------------------------------------');
console.log(messageBody);
console.log('-----------------------------------------');
}
await sendKeybaseMessage(messageBody);
}
// call main function and let NodeJS handle the promise
main();
@@ -0,0 +1,19 @@
{
"name": "send-keybase-message",
"description": "Sends a notification message with the keybase package that fails when piped into the keybase CLI",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "node dev.js",
"format": "prettier --write **/*.js"
},
"dependencies": {
"dotenv": "^16.0.0",
"handlebars": "^4.7.7",
"keybase-bot": "^3.6.1",
"octokit": "^1.7.1"
},
"devDependencies": {
"prettier": "2.3.2"
}
}
@@ -0,0 +1,29 @@
const Handlebars = require('handlebars');
const fs = require('fs');
const path = require('path');
async function addToContextAndValidate(context) {
if (!context.env.NYM_CI_WWW_LOCATION) {
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
}
if (!context.env.NYM_CI_WWW_BASE) {
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
}
}
async function getMessageBody(context) {
const source = fs
.readFileSync(
context.env.IS_SUCCESS === 'true'
? path.resolve(__dirname, 'templates', 'success')
: path.resolve(__dirname, 'templates', 'failure'),
)
.toString();
const template = Handlebars.compile(source);
return template(context);
}
module.exports = {
addToContextAndValidate,
getMessageBody,
};
@@ -0,0 +1,11 @@
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
> :rocket: {{ env.NYM_PROJECT_NAME }}
> 🔴 **FAILURE** :cry:
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
Commit message:
```
{{ env.GIT_COMMIT_MESSAGE }}
```
@@ -0,0 +1,16 @@
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
> :rocket: {{ env.NYM_PROJECT_NAME }}
> ✅ **SUCCESS**
> ➡️➡️➡️➡️➡️ **View output:**
> `storybook`: https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}
> `example`: https://{{ env.NYM_CI_WWW_LOCATION }}-example.{{ env.NYM_CI_WWW_BASE }}
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
```
{{ env.GIT_COMMIT_MESSAGE }}
```
+18 -12
View File
@@ -1,9 +1,12 @@
name: Wasm Client
on: [push, pull_request]
on:
pull_request:
paths-ignore:
- 'explorer/**'
jobs:
ci:
wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -21,19 +24,22 @@ jobs:
command: build
args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown
# for some reason this does not seem to work correctly, leave it for later, building is good enough for now
# - uses: actions-rs/cargo@v1
# with:
# command: test
# args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown --features=coconut
- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path clients/webassembly/Cargo.toml
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path clients/webassembly/Cargo.toml -- --check
# for some reason this does not seem to work correctly, leave it for later, building is good enough for now
# - uses: actions-rs/cargo@v1
# with:
# command: clippy
# args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown -- -D warnings
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown -- -D warnings
+3
View File
@@ -0,0 +1,3 @@
unreleased=true
future-release=v0.12.0
since-tag=v0.11.0
+13 -1
View File
@@ -11,7 +11,6 @@ target
/.vscode/settings.json
validator/.vscode
sample-configs/validator-config.toml
.vscode
scripts/deploy_qa.sh
scripts/run_gate.sh
scripts/run_mix.sh
@@ -25,4 +24,17 @@ v6-topology.json
/explorer/downloads/topology.json
/explorer/public/downloads/mixmining.json
/explorer/public/downloads/topology.json
/nym-wallet/dist/*
/clients/validator/examples/nym-driver-example/current-contract.txt
validator-api/v4.json
validator-api/v6.json
**/node_modules
validator-api/keypair
contracts/mixnet/code_id
contracts/mixnet/Justfile
contracts/mixnet/Makefile
validator-config
*.patch
validator-api-config.toml
dist
storybook-static
+1
View File
@@ -0,0 +1 @@
2.7.5
+6
View File
@@ -0,0 +1,6 @@
{
"mainnet":[{
"nymd_url":"https://rpc.nyx.nodes.guru/",
"api_url":"https://api.nyx.nodes.guru/"
}]
}
+228 -743
View File
@@ -1,761 +1,246 @@
# Changelog
## [v0.10.0](https://github.com/nymtech/nym/tree/v0.10.0) (2020-14-15)
## [v0.12.0](https://github.com/nymtech/nym/tree/v0.12.0) (2021-12-21)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.9.2...v0.10.0)
This release brings a distributed directory authority powered by [Cosmos SDK](https://cosmos.network) and [CosmWasm](https://cosmwasm.com) smart contracts. It is designed to run [Testnet Finney](https://testnet-finney-explorer.nymtech.net), the new Nym testnet.
**Closed issues:**
- When I run this command :'./nym-mixnode run --id zzznym', an error occurs [\#548](https://github.com/nymtech/nym/issues/548)
**Merged pull requests:**
- Displaying address of the client on init [\#573](https://github.com/nymtech/nym/pull/573) ([jstuczyn](https://github.com/jstuczyn))
- Fixed nightly clippy warnings [\#572](https://github.com/nymtech/nym/pull/572) ([jstuczyn](https://github.com/jstuczyn))
- Changed default client topology refresh rate from 30s to 5min [\#570](https://github.com/nymtech/nym/pull/570) ([jstuczyn](https://github.com/jstuczyn))
- Adding the wallet url in startup instructions [\#569](https://github.com/nymtech/nym/pull/569) ([futurechimp](https://github.com/futurechimp))
- Removed unused data from cargo.toml [\#567](https://github.com/nymtech/nym/pull/567) ([jstuczyn](https://github.com/jstuczyn))
- Feature/cli signing [\#566](https://github.com/nymtech/nym/pull/566) ([futurechimp](https://github.com/futurechimp))
- Updated version number on the validator client [\#565](https://github.com/nymtech/nym/pull/565) ([jstuczyn](https://github.com/jstuczyn))
- Renamed mixnode registration into bonding [\#564](https://github.com/nymtech/nym/pull/564) ([jstuczyn](https://github.com/jstuczyn))
- A pull request for discussion about contract state variables [\#563](https://github.com/nymtech/nym/pull/563) ([futurechimp](https://github.com/futurechimp))
- Feature/mixnet contract ci [\#562](https://github.com/nymtech/nym/pull/562) ([jstuczyn](https://github.com/jstuczyn))
- Feature/bonding adjustments [\#561](https://github.com/nymtech/nym/pull/561) ([jstuczyn](https://github.com/jstuczyn))
- Feature/migration additions [\#560](https://github.com/nymtech/nym/pull/560) ([jstuczyn](https://github.com/jstuczyn))
- Changed default contract execution gas limit to 250\_000 \(from 9\_000\_000\_000\) [\#559](https://github.com/nymtech/nym/pull/559) ([jstuczyn](https://github.com/jstuczyn))
- Missing quotes in mixnet\_contract\_address config field [\#558](https://github.com/nymtech/nym/pull/558) ([jstuczyn](https://github.com/jstuczyn))
- Updated default validator url and contract address [\#557](https://github.com/nymtech/nym/pull/557) ([jstuczyn](https://github.com/jstuczyn))
- Bump y18n from 4.0.0 to 4.0.1 in /clients/native/examples/js-examples/websocket [\#556](https://github.com/nymtech/nym/pull/556) ([dependabot[bot]](https://github.com/apps/dependabot))
- Feature/bonding info on init [\#555](https://github.com/nymtech/nym/pull/555) ([jstuczyn](https://github.com/jstuczyn))
- Feature/validator client address getter [\#554](https://github.com/nymtech/nym/pull/554) ([jstuczyn](https://github.com/jstuczyn))
- Added extra step for publishing validator client [\#553](https://github.com/nymtech/nym/pull/553) ([jstuczyn](https://github.com/jstuczyn))
- Feature/validator client rc3 [\#552](https://github.com/nymtech/nym/pull/552) ([jstuczyn](https://github.com/jstuczyn))
- Feature/upgrade update [\#551](https://github.com/nymtech/nym/pull/551) ([jstuczyn](https://github.com/jstuczyn))
- Feature/export coin helper [\#550](https://github.com/nymtech/nym/pull/550) ([futurechimp](https://github.com/futurechimp))
- Chore/dependency updates [\#549](https://github.com/nymtech/nym/pull/549) ([jstuczyn](https://github.com/jstuczyn))
- Feature/validator query client [\#547](https://github.com/nymtech/nym/pull/547) ([jstuczyn](https://github.com/jstuczyn))
- Feature/validator client rc2 [\#546](https://github.com/nymtech/nym/pull/546) ([futurechimp](https://github.com/futurechimp))
- Feature/has node query validator client [\#545](https://github.com/nymtech/nym/pull/545) ([jstuczyn](https://github.com/jstuczyn))
- Added contract query to check if given address owns a mixnode/gateway [\#544](https://github.com/nymtech/nym/pull/544) ([jstuczyn](https://github.com/jstuczyn))
## [validator-client-0.10.0-rc1](https://github.com/nymtech/nym/tree/validator-client-0.10.0-rc1) (2021-03-24)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.9.2...validator-client-0.10.0-rc1)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.11.0...v0.12.0)
**Implemented enhancements:**
- Add option to whitelist IPv4 ranges to allowed.list in sphinx-socks [\#415](https://github.com/nymtech/nym/issues/415)
- Mixmining monitoring for gateways [\#384](https://github.com/nymtech/nym/issues/384)
- Introduces query for contract build information [\#919](https://github.com/nymtech/nym/pull/919) ([jstuczyn](https://github.com/jstuczyn))
**Fixed bugs:**
- Network requester should periodically remove stale proxies [\#424](https://github.com/nymtech/nym/issues/424)
- Network requester now prints correct version with --version [\#478](https://github.com/nymtech/nym/pull/478) ([jstuczyn](https://github.com/jstuczyn))
- Mixnodes - claim tokens scenario does not work with telegram bot [\#938](https://github.com/nymtech/nym/issues/938)
- \[Issue\]"create account" button does not work on Ubuntu 20.04.03 LTS [\#916](https://github.com/nymtech/nym/issues/916)
- \[Issue\] NodeJS 17.1.0 and webpack issues causing nym-wallet build to fail on Pop!OS 21.04\(Ubuntu\) [\#914](https://github.com/nymtech/nym/issues/914)
- Prevent overwriting of Mixnodes if the mixnode is already bonded [\#912](https://github.com/nymtech/nym/issues/912)
- Pasting mnemonic doesn't work on MacOS [\#908](https://github.com/nymtech/nym/issues/908)
- Wallet - investigate nav freezes [\#716](https://github.com/nymtech/nym/issues/716)
- Wallet - Fix console errors [\#707](https://github.com/nymtech/nym/issues/707)
- Fixed invalid nodes being counted twice in unroutable category [\#963](https://github.com/nymtech/nym/pull/963) ([jstuczyn](https://github.com/jstuczyn))
- Don't reset total delegation on mixnode rebond [\#940](https://github.com/nymtech/nym/pull/940) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/remove mixnode bonding overwrite [\#917](https://github.com/nymtech/nym/pull/917) ([jstuczyn](https://github.com/jstuczyn))
- Fixes crash condition in validator API when calculating last day uptime [\#909](https://github.com/nymtech/nym/pull/909) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/monitor initial values wait [\#907](https://github.com/nymtech/nym/pull/907) ([jstuczyn](https://github.com/jstuczyn))
- Bug fix: Network Explorer: Add freegeoip API key and split out tasks for country distributions [\#806](https://github.com/nymtech/nym/pull/806) ([mmsinclair](https://github.com/mmsinclair))
- Explorer API: port test now split out address resolution and add units tests [\#755](https://github.com/nymtech/nym/pull/755) ([mmsinclair](https://github.com/mmsinclair))
**Closed issues:**
- Change topology to work with validators. [\#538](https://github.com/nymtech/nym/issues/538)
- Unable to rejoin the network after powerdown [\#514](https://github.com/nymtech/nym/issues/514)
- nym-socks5-client 0.9.2 issue with outbound\_request\_filter.check [\#498](https://github.com/nymtech/nym/issues/498)
- nym-socks5-client high CPU usage on idle [\#491](https://github.com/nymtech/nym/issues/491)
- network requester too many Received a 'Send' before 'Connect' - going to buffer the data [\#483](https://github.com/nymtech/nym/issues/483)
- Socks5 client loops on malformed - invalidaddress message [\#482](https://github.com/nymtech/nym/issues/482)
- Socks5 client hangs [\#479](https://github.com/nymtech/nym/issues/479)
- Network Requester -V flag does not print version [\#469](https://github.com/nymtech/nym/issues/469)
- Gateway reconnection \(wasm\) [\#458](https://github.com/nymtech/nym/issues/458)
- Client warning 'No valid topology' [\#343](https://github.com/nymtech/nym/issues/343)
- private key file permission bits too open, readable for others [\#319](https://github.com/nymtech/nym/issues/319)
- Fix dependabot security notice [\#267](https://github.com/nymtech/nym/issues/267)
- Change how time intervals are serialized in configs [\#141](https://github.com/nymtech/nym/issues/141)
- Feature gate `ts-rs` everywhere and only build use it to export types during CI runs [\#893](https://github.com/nymtech/nym/issues/893)
- Error when init Nym client for Nym requester [\#800](https://github.com/nymtech/nym/issues/800)
- Website updates - Add new team members and translations [\#775](https://github.com/nymtech/nym/issues/775)
- Update Run Nym Nodes Documentation [\#773](https://github.com/nymtech/nym/issues/773)
- Upgrade `prost` to 0.8 [\#768](https://github.com/nymtech/nym/issues/768)
- How can I get 100punk\(Version: 0.11.0\) [\#743](https://github.com/nymtech/nym/issues/743)
- Wallet - Fix Bond Form validation issue [\#717](https://github.com/nymtech/nym/issues/717)
- help!!! [\#712](https://github.com/nymtech/nym/issues/712)
- UX feature request: show all delegated nodes in wallet [\#711](https://github.com/nymtech/nym/issues/711)
- UX feature request: add current balance on wallet pages [\#710](https://github.com/nymtech/nym/issues/710)
- got sign issue from bot [\#709](https://github.com/nymtech/nym/issues/709)
- As a wallet user, I would like to be able to log out of the wallet [\#706](https://github.com/nymtech/nym/issues/706)
- As a wallet user, I would like to have a "receive" page where I can see my own wallet address [\#705](https://github.com/nymtech/nym/issues/705)
- Update native client/socks client/mixnode/gateway `upgrade` command [\#689](https://github.com/nymtech/nym/issues/689)
- Update mixnode/gateway/client to use query for cached nodes rather than use validator [\#688](https://github.com/nymtech/nym/issues/688)
- '--directory' not expected error starting local mixnet [\#520](https://github.com/nymtech/nym/issues/520)
- nym-socks5-client is painfully slow [\#495](https://github.com/nymtech/nym/issues/495)
- nym-socks5-client crash after opening Keybase team "Browse all channels" [\#494](https://github.com/nymtech/nym/issues/494)
- Mixed Content problem [\#400](https://github.com/nymtech/nym/issues/400)
- Gateway disk quota [\#137](https://github.com/nymtech/nym/issues/137)
- Simplify message encapsulation with regards to topology [\#127](https://github.com/nymtech/nym/issues/127)
- Create constants for cli argument names [\#115](https://github.com/nymtech/nym/issues/115)
- Using Blake3 as a hash function [\#103](https://github.com/nymtech/nym/issues/103)
- Validator should decide which layer a node is in [\#86](https://github.com/nymtech/nym/issues/86)
- Clean shutdown for all processes [\#73](https://github.com/nymtech/nym/issues/73)
- Client API consistency [\#71](https://github.com/nymtech/nym/issues/71)
- Simplify concurrency with a proper actor framework [\#31](https://github.com/nymtech/nym/issues/31)
- Database for gateway [\#11](https://github.com/nymtech/nym/issues/11)
**Merged pull requests:**
- RC1 published [\#543](https://github.com/nymtech/nym/pull/543) ([futurechimp](https://github.com/futurechimp))
- Feature/prep for publish [\#542](https://github.com/nymtech/nym/pull/542) ([futurechimp](https://github.com/futurechimp))
- Feature/bigger better stronger mnemonics [\#541](https://github.com/nymtech/nym/pull/541) ([futurechimp](https://github.com/futurechimp))
- Removed a package-lock.json which seems to have been accidentally added [\#539](https://github.com/nymtech/nym/pull/539) ([futurechimp](https://github.com/futurechimp))
- Feature/convert to uhal [\#537](https://github.com/nymtech/nym/pull/537) ([futurechimp](https://github.com/futurechimp))
- Feature/topology conversion [\#536](https://github.com/nymtech/nym/pull/536) ([jstuczyn](https://github.com/jstuczyn))
- Feature/hook up url in validator client [\#535](https://github.com/nymtech/nym/pull/535) ([futurechimp](https://github.com/futurechimp))
- Feature/upgrade cosm client [\#534](https://github.com/nymtech/nym/pull/534) ([futurechimp](https://github.com/futurechimp))
- Feature/mix contract identity key [\#533](https://github.com/nymtech/nym/pull/533) ([jstuczyn](https://github.com/jstuczyn))
- Feature/validator client rust [\#532](https://github.com/nymtech/nym/pull/532) ([jstuczyn](https://github.com/jstuczyn))
- Feature/add currency helpers [\#531](https://github.com/nymtech/nym/pull/531) ([futurechimp](https://github.com/futurechimp))
- Exporting Coin struct, needed for wallet [\#530](https://github.com/nymtech/nym/pull/530) ([futurechimp](https://github.com/futurechimp))
- Getting correct user home dir in Python setup script [\#528](https://github.com/nymtech/nym/pull/528) ([futurechimp](https://github.com/futurechimp))
- Temporarily disabling fs access [\#527](https://github.com/nymtech/nym/pull/527) ([futurechimp](https://github.com/futurechimp))
- Feature/validator client gateway bonding [\#526](https://github.com/nymtech/nym/pull/526) ([jstuczyn](https://github.com/jstuczyn))
- Fixed eslint errors in the validator client [\#525](https://github.com/nymtech/nym/pull/525) ([jstuczyn](https://github.com/jstuczyn))
- Feature/gateway bonding [\#524](https://github.com/nymtech/nym/pull/524) ([jstuczyn](https://github.com/jstuczyn))
- Fix the remove mixnode test [\#522](https://github.com/nymtech/nym/pull/522) ([futurechimp](https://github.com/futurechimp))
- Bump elliptic from 6.5.3 to 6.5.4 in /clients/native/examples/js-examples/websocket [\#521](https://github.com/nymtech/nym/pull/521) ([dependabot[bot]](https://github.com/apps/dependabot))
- Feature/fix go errors in examples [\#516](https://github.com/nymtech/nym/pull/516) ([futurechimp](https://github.com/futurechimp))
- Feature/initial mixnet contract [\#515](https://github.com/nymtech/nym/pull/515) ([futurechimp](https://github.com/futurechimp))
- Running CI also on windows and macOS [\#512](https://github.com/nymtech/nym/pull/512) ([jstuczyn](https://github.com/jstuczyn))
- Feature/socks5 adjustments [\#510](https://github.com/nymtech/nym/pull/510) ([jstuczyn](https://github.com/jstuczyn))
- Fixed unused import in non-unix systems [\#509](https://github.com/nymtech/nym/pull/509) ([jstuczyn](https://github.com/jstuczyn))
- Checking if the delay has already expired before attempting to put it… [\#508](https://github.com/nymtech/nym/pull/508) ([jstuczyn](https://github.com/jstuczyn))
- Not including gateway non-delay when calculating total packet delay [\#507](https://github.com/nymtech/nym/pull/507) ([jstuczyn](https://github.com/jstuczyn))
- Allowing for a single topology refresh failure [\#505](https://github.com/nymtech/nym/pull/505) ([jstuczyn](https://github.com/jstuczyn))
- More restrictive unix key files permissions [\#504](https://github.com/nymtech/nym/pull/504) ([jstuczyn](https://github.com/jstuczyn))
- More human-readable errors on mixnode/gateway startup [\#503](https://github.com/nymtech/nym/pull/503) ([jstuczyn](https://github.com/jstuczyn))
- Feature/ip filtering [\#502](https://github.com/nymtech/nym/pull/502) ([jstuczyn](https://github.com/jstuczyn))
- Feature/wasm client compilation fixes [\#501](https://github.com/nymtech/nym/pull/501) ([jstuczyn](https://github.com/jstuczyn))
- Fixed possible crash on invalid topology [\#500](https://github.com/nymtech/nym/pull/500) ([jstuczyn](https://github.com/jstuczyn))
- Feature/gateway monitoring [\#499](https://github.com/nymtech/nym/pull/499) ([jstuczyn](https://github.com/jstuczyn))
- Feature/GitHub actions and clippy cleanup [\#493](https://github.com/nymtech/nym/pull/493) ([jstuczyn](https://github.com/jstuczyn))
- Fix typos [\#492](https://github.com/nymtech/nym/pull/492) ([rex4539](https://github.com/rex4539))
- Bump ini from 1.3.5 to 1.3.8 in /clients/native/examples/js-examples/websocket [\#490](https://github.com/nymtech/nym/pull/490) ([dependabot[bot]](https://github.com/apps/dependabot))
- Bump ini from 1.3.5 to 1.3.8 in /clients/webassembly/js-example [\#489](https://github.com/nymtech/nym/pull/489) ([dependabot[bot]](https://github.com/apps/dependabot))
- display 0 on no validators rather than crash [\#488](https://github.com/nymtech/nym/pull/488) ([jstuczyn](https://github.com/jstuczyn))
- NGI0 - Updating licensing aspects according REUSE [\#487](https://github.com/nymtech/nym/pull/487) ([lnceballosz](https://github.com/lnceballosz))
- Feature/removed topology [\#481](https://github.com/nymtech/nym/pull/481) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/explorer fixes [\#477](https://github.com/nymtech/nym/pull/477) ([jstuczyn](https://github.com/jstuczyn))
- Feature/0.9.2+only monitoring [\#475](https://github.com/nymtech/nym/pull/475) ([jstuczyn](https://github.com/jstuczyn))
## [v0.9.2](https://github.com/nymtech/nym/tree/v0.9.2) (2020-11-26)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.9.1...v0.9.2)
This release brings networking improvements, eliminating blocking calls and improving mixnode and gateway scalability.
**Fixed bugs:**
- Putting initial packet onto the queue when establishing connection [\#471](https://github.com/nymtech/nym/pull/471) ([jstuczyn](https://github.com/jstuczyn))
**Merged pull requests:**
- Release/v0.9.2 [\#474](https://github.com/nymtech/nym/pull/474) ([jstuczyn](https://github.com/jstuczyn))
- Minor mixnet client code simplification and optimization [\#472](https://github.com/nymtech/nym/pull/472) ([jstuczyn](https://github.com/jstuczyn))
## [v0.9.1](https://github.com/nymtech/nym/tree/v0.9.1) (2020-11-24)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.9.0...v0.9.1)
The main features of this release are:
- explicit `unregister` command for mixnodes
- introduced gateway client reconnection in case of obvious network failures
- changed network monitor to send at a constant, adjustable, rate
- changed the way in which packets are delayed by mixnodes that should reduce number of tasks spawned
- changed the way in which packets are forwarded to further mixes that should get rid of possible blocking
See the changelog for detailed release notes.
**Implemented enhancements:**
- Change how mix packets get delayed [\#361](https://github.com/nymtech/nym/issues/361)
- Feature/socks improvements [\#423](https://github.com/nymtech/nym/pull/423) ([jstuczyn](https://github.com/jstuczyn))
- Feature/instant sending [\#359](https://github.com/nymtech/nym/pull/359) ([jstuczyn](https://github.com/jstuczyn))
**Fixed bugs:**
- Update main.js [\#441](https://github.com/nymtech/nym/pull/441) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/metrics fixes [\#434](https://github.com/nymtech/nym/pull/434) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/upgrade fix [\#421](https://github.com/nymtech/nym/pull/421) ([jstuczyn](https://github.com/jstuczyn))
- Explicitly handling base58 key recovery errors [\#396](https://github.com/nymtech/nym/pull/396) ([jstuczyn](https://github.com/jstuczyn))
- Corrected version on client-core [\#377](https://github.com/nymtech/nym/pull/377) ([jstuczyn](https://github.com/jstuczyn))
**Closed issues:**
- Gateway reconnections \(simple\) [\#457](https://github.com/nymtech/nym/issues/457)
- Slow down network monitor sending rate [\#455](https://github.com/nymtech/nym/issues/455)
- Deploy the new explorer on the same box as metrics. [\#433](https://github.com/nymtech/nym/issues/433)
- Too many open files [\#366](https://github.com/nymtech/nym/issues/366)
- nym-mixnode doesn't bind to any port \(Ubuntu 20.04\) [\#290](https://github.com/nymtech/nym/issues/290)
**Merged pull requests:**
- Updated message on shutdown [\#467](https://github.com/nymtech/nym/pull/467) ([jstuczyn](https://github.com/jstuczyn))
- Additional feedback on unregistration on sigint [\#466](https://github.com/nymtech/nym/pull/466) ([jstuczyn](https://github.com/jstuczyn))
- Feature/upgrade additions [\#465](https://github.com/nymtech/nym/pull/465) ([jstuczyn](https://github.com/jstuczyn))
- Feature/nonblocking mix send [\#464](https://github.com/nymtech/nym/pull/464) ([jstuczyn](https://github.com/jstuczyn))
- Feature/delay queue mixnodes [\#462](https://github.com/nymtech/nym/pull/462) ([jstuczyn](https://github.com/jstuczyn))
- Feature/slowed down network monitor [\#461](https://github.com/nymtech/nym/pull/461) ([jstuczyn](https://github.com/jstuczyn))
- Feature/unregister command [\#460](https://github.com/nymtech/nym/pull/460) ([jstuczyn](https://github.com/jstuczyn))
- Simple gateway client reconnection in obvious network failures [\#459](https://github.com/nymtech/nym/pull/459) ([jstuczyn](https://github.com/jstuczyn))
- temporarily disabled mixnode status dot [\#454](https://github.com/nymtech/nym/pull/454) ([jstuczyn](https://github.com/jstuczyn))
- Removed incentives form url [\#451](https://github.com/nymtech/nym/pull/451) ([jstuczyn](https://github.com/jstuczyn))
- Removed hardcoded 'good gateways' in favour of pseusorandom choice fr… [\#450](https://github.com/nymtech/nym/pull/450) ([jstuczyn](https://github.com/jstuczyn))
- Fixed the URL of the websocket [\#449](https://github.com/nymtech/nym/pull/449) ([futurechimp](https://github.com/futurechimp))
- Extra argument to specify metrics websocket + long attribute [\#448](https://github.com/nymtech/nym/pull/448) ([jstuczyn](https://github.com/jstuczyn))
- Explorer public folder being relative to the binary [\#447](https://github.com/nymtech/nym/pull/447) ([jstuczyn](https://github.com/jstuczyn))
- Slightly friendlier upgrade argument description [\#446](https://github.com/nymtech/nym/pull/446) ([jstuczyn](https://github.com/jstuczyn))
- Updated nym-run gateway id [\#445](https://github.com/nymtech/nym/pull/445) ([jstuczyn](https://github.com/jstuczyn))
- Adjusted 'fastmode' settings [\#444](https://github.com/nymtech/nym/pull/444) ([jstuczyn](https://github.com/jstuczyn))
- Added validators to dashboard + validator and block count [\#443](https://github.com/nymtech/nym/pull/443) ([jstuczyn](https://github.com/jstuczyn))
- Adding keybase to allowed.list.sample [\#442](https://github.com/nymtech/nym/pull/442) ([futurechimp](https://github.com/futurechimp))
- Spawning rocket as a blocking task [\#440](https://github.com/nymtech/nym/pull/440) ([jstuczyn](https://github.com/jstuczyn))
- Passing validator base url as an argument [\#439](https://github.com/nymtech/nym/pull/439) ([jstuczyn](https://github.com/jstuczyn))
- Changing default validator location to make it clear we're testnet [\#437](https://github.com/nymtech/nym/pull/437) ([futurechimp](https://github.com/futurechimp))
- Added nym prefix to binary names [\#436](https://github.com/nymtech/nym/pull/436) ([jstuczyn](https://github.com/jstuczyn))
- Feature/explorer [\#431](https://github.com/nymtech/nym/pull/431) ([jstuczyn](https://github.com/jstuczyn))
- Updated default sending rates [\#430](https://github.com/nymtech/nym/pull/430) ([jstuczyn](https://github.com/jstuczyn))
- Fixed bunch of clippy warnings [\#427](https://github.com/nymtech/nym/pull/427) ([jstuczyn](https://github.com/jstuczyn))
- Starting cover traffic stream under correct condition [\#422](https://github.com/nymtech/nym/pull/422) ([jstuczyn](https://github.com/jstuczyn))
- Updated validator topology [\#420](https://github.com/nymtech/nym/pull/420) ([jstuczyn](https://github.com/jstuczyn))
- Added option to set incentives address during mix and gateway init [\#419](https://github.com/nymtech/nym/pull/419) ([jstuczyn](https://github.com/jstuczyn))
- Flag to start network requester in open proxy mode [\#418](https://github.com/nymtech/nym/pull/418) ([jstuczyn](https://github.com/jstuczyn))
- Renamed 'sphinx-socks' to 'network-requester' [\#417](https://github.com/nymtech/nym/pull/417) ([jstuczyn](https://github.com/jstuczyn))
- Updated upgrade commands to set new default validator [\#413](https://github.com/nymtech/nym/pull/413) ([jstuczyn](https://github.com/jstuczyn))
- Feature/network monitor file topology [\#412](https://github.com/nymtech/nym/pull/412) ([jstuczyn](https://github.com/jstuczyn))
- Removed debug print statement [\#411](https://github.com/nymtech/nym/pull/411) ([jstuczyn](https://github.com/jstuczyn))
- Feature/controlled reinit [\#410](https://github.com/nymtech/nym/pull/410) ([jstuczyn](https://github.com/jstuczyn))
- Feature/max retry [\#409](https://github.com/nymtech/nym/pull/409) ([jstuczyn](https://github.com/jstuczyn))
- Renamed directory arguments to validator [\#408](https://github.com/nymtech/nym/pull/408) ([jstuczyn](https://github.com/jstuczyn))
- Feature/no run config flag [\#405](https://github.com/nymtech/nym/pull/405) ([jstuczyn](https://github.com/jstuczyn))
- Feature/error on noninit [\#404](https://github.com/nymtech/nym/pull/404) ([jstuczyn](https://github.com/jstuczyn))
- Using metrics interval received from server [\#403](https://github.com/nymtech/nym/pull/403) ([jstuczyn](https://github.com/jstuczyn))
- Feature/validator api update [\#402](https://github.com/nymtech/nym/pull/402) ([jstuczyn](https://github.com/jstuczyn))
- Feature/directory server transition [\#401](https://github.com/nymtech/nym/pull/401) ([jstuczyn](https://github.com/jstuczyn))
- Feature/wasm client fix [\#399](https://github.com/nymtech/nym/pull/399) ([futurechimp](https://github.com/futurechimp))
- Fix compiler warnings for unneeded mut [\#398](https://github.com/nymtech/nym/pull/398) ([ethanfrey](https://github.com/ethanfrey))
- Feature/fix dependabot alerts [\#393](https://github.com/nymtech/nym/pull/393) ([futurechimp](https://github.com/futurechimp))
- moved new\_v4\_with\_node to test only section [\#392](https://github.com/nymtech/nym/pull/392) ([jstuczyn](https://github.com/jstuczyn))
- Feature/duration cleanup [\#391](https://github.com/nymtech/nym/pull/391) ([jstuczyn](https://github.com/jstuczyn))
- Feature/mix ed25519 identity [\#388](https://github.com/nymtech/nym/pull/388) ([jstuczyn](https://github.com/jstuczyn))
- Feature/double init prevention [\#386](https://github.com/nymtech/nym/pull/386) ([jstuczyn](https://github.com/jstuczyn))
- Feature/upgrade command [\#381](https://github.com/nymtech/nym/pull/381) ([jstuczyn](https://github.com/jstuczyn))
- Feature/remove validator [\#380](https://github.com/nymtech/nym/pull/380) ([futurechimp](https://github.com/futurechimp))
- Feature/version in config [\#376](https://github.com/nymtech/nym/pull/376) ([jstuczyn](https://github.com/jstuczyn))
- Feature/network monitor [\#369](https://github.com/nymtech/nym/pull/369) ([jstuczyn](https://github.com/jstuczyn))
- Added sphinx socks to default workspace members [\#358](https://github.com/nymtech/nym/pull/358) ([jstuczyn](https://github.com/jstuczyn))
- Feature/wasm update [\#341](https://github.com/nymtech/nym/pull/341) ([jstuczyn](https://github.com/jstuczyn))
## [v0.9.0](https://github.com/nymtech/nym/tree/v0.9.0) (2020-11-13)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.8.1...v0.9.0)
The main features of this release are:
* a reputation tracking system which starts to link node reputation to quality of service
* a new component, the `nym-network-monitor`, which tracks whether nodes are working properly and providing good service
* automatic node registration and de-registration at node startup
* working Cosmos validators with a `nym` token
* starting to decentralize the old directory server into the validators
* a new block explorer at https://testnet-explorer.nymtech.net which looks the same as the old dashboard but is the basis of something much more advanced. It can be run by anyone.
* de-coupling metrics collection from directory services to make the system scale better overall
* reliability and performance improvements for mixnode networking
See the changelog for detailed release notes.
**Implemented enhancements:**
- Nicer error if trying to run an uninitialised client/node [\#389](https://github.com/nymtech/nym/issues/389)
- Gateway announcement [\#383](https://github.com/nymtech/nym/issues/383)
- Add init flag for incentives address [\#382](https://github.com/nymtech/nym/issues/382)
- Ed25519 Identity Keys for Mixnodes [\#379](https://github.com/nymtech/nym/issues/379)
- Introduce version field to config files [\#375](https://github.com/nymtech/nym/issues/375)
- Change `init` to not blow away existing keys \(if exist\) [\#368](https://github.com/nymtech/nym/issues/368)
- Introduce an explicit `upgrade` command [\#367](https://github.com/nymtech/nym/issues/367)
- Show remote hostname in socks5 connection messages [\#365](https://github.com/nymtech/nym/issues/365)
- Make all `const` duration values more explicit. [\#333](https://github.com/nymtech/nym/issues/333)
**Fixed bugs:**
- React wasm example not compiling [\#394](https://github.com/nymtech/nym/issues/394)
**Closed issues:**
- Make validator URL configurable [\#438](https://github.com/nymtech/nym/issues/438)
- Change default directory location [\#432](https://github.com/nymtech/nym/issues/432)
- Crank up the default bandwidth settings. [\#429](https://github.com/nymtech/nym/issues/429)
- Change "sphinx-socks" to "nym-requester" [\#428](https://github.com/nymtech/nym/issues/428)
- Clients should use only "active" nodes [\#390](https://github.com/nymtech/nym/issues/390)
- Allow persistently changing config values from command line [\#387](https://github.com/nymtech/nym/issues/387)
- Remove `--config` flag in `run` [\#385](https://github.com/nymtech/nym/issues/385)
- Metrics server should return a metrics rate value [\#374](https://github.com/nymtech/nym/issues/374)
- Integer staking [\#372](https://github.com/nymtech/nym/issues/372)
- Mixnode and gateway blockchain registration [\#371](https://github.com/nymtech/nym/issues/371)
- Remove presence notifications [\#370](https://github.com/nymtech/nym/issues/370)
- Handle invalid base58 encoding for asymmetric key recovery \(encryption and identity\) [\#285](https://github.com/nymtech/nym/issues/285)
- Socks5 nym client + bitcoin service provider [\#254](https://github.com/nymtech/nym/issues/254)
- Message reception in webassembly client [\#204](https://github.com/nymtech/nym/issues/204)
- Simplest possible staking system [\#157](https://github.com/nymtech/nym/issues/157)
- Validator should hold topology [\#77](https://github.com/nymtech/nym/issues/77)
**Merged pull requests:**
- Release/v0.9.0 [\#453](https://github.com/nymtech/nym/pull/453) ([jstuczyn](https://github.com/jstuczyn))
## [v0.8.1](https://github.com/nymtech/nym/tree/v0.8.1) (2020-09-28)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.8.0...v0.8.1)
**Closed issues:**
- Hardcode two gateways for `client init` if none provided [\#352](https://github.com/nymtech/nym/issues/352)
- Make mixnodes take layer with fewest nodes [\#351](https://github.com/nymtech/nym/issues/351)
- Change default presence/metrics interval for mixnodes/gateways [\#349](https://github.com/nymtech/nym/issues/349)
- Mixnodes should only be able to enter layers 1, 2, or 3 [\#348](https://github.com/nymtech/nym/issues/348)
- Docs are inaccurate [\#337](https://github.com/nymtech/nym/issues/337)
- Figure out the cause of high packet loss on testnet [\#159](https://github.com/nymtech/nym/issues/159)
- Change Topology to GraphTopology [\#76](https://github.com/nymtech/nym/issues/76)
**Merged pull requests:**
- Hotfix/0.8.1 [\#357](https://github.com/nymtech/nym/pull/357) ([jstuczyn](https://github.com/jstuczyn))
## [v0.8.0](https://github.com/nymtech/nym/tree/v0.8.0) (2020-09-10)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.7.0...v0.8.0)
This release introduces, among other things, the following improvements:
- SURB-acks for significant boost to the mixnet messaging reliability,
- SURB-replies for allowing for anonymous replies,
- SOCKS5 proxying capabilities,
- replacing the `AuthToken` with a shared key derived between client and its gateway,
- encryption and tagging of mix messages exchanged between client and its gateway,
- end-to-end encryption of traffic between clients,
- general performance and reliability improvements.
**Implemented enhancements:**
- Change how un-ack'd packets are retransmitted [\#307](https://github.com/nymtech/nym/issues/307)
- Feature/socks5 sequencing [\#318](https://github.com/nymtech/nym/pull/318) ([jstuczyn](https://github.com/jstuczyn))
- Feature/socks client config [\#316](https://github.com/nymtech/nym/pull/316) ([jstuczyn](https://github.com/jstuczyn))
- Explicit proxy runner + closing local connection if remote is over [\#314](https://github.com/nymtech/nym/pull/314) ([jstuczyn](https://github.com/jstuczyn))
- Feature/ack messing [\#313](https://github.com/nymtech/nym/pull/313) ([jstuczyn](https://github.com/jstuczyn))
- Removed client list from topology [\#301](https://github.com/nymtech/nym/pull/301) ([jstuczyn](https://github.com/jstuczyn))
- Feature/reply surbs [\#299](https://github.com/nymtech/nym/pull/299) ([jstuczyn](https://github.com/jstuczyn))
**Fixed bugs:**
- Socks client no longer logging dns resolved addresses [\#329](https://github.com/nymtech/nym/pull/329) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/remove packet buffering [\#300](https://github.com/nymtech/nym/pull/300) ([jstuczyn](https://github.com/jstuczyn))
**Closed issues:**
- Do not buffer packets for mixes we are reconnecting to [\#291](https://github.com/nymtech/nym/issues/291)
- Loop cover messages need to be encrypted! [\#287](https://github.com/nymtech/nym/issues/287)
- Get rid of instances of Deref polymorphism antipattern [\#283](https://github.com/nymtech/nym/issues/283)
- Remove client list from topology [\#279](https://github.com/nymtech/nym/issues/279)
- The messages pushed from gateway should be encrypted. [\#276](https://github.com/nymtech/nym/issues/276)
- The shared key between client and gateway should be stored in a file. [\#273](https://github.com/nymtech/nym/issues/273)
- Refactor topology, NymTopology trait, and related code [\#200](https://github.com/nymtech/nym/issues/200)
- Fragment retransmission for split messages [\#164](https://github.com/nymtech/nym/issues/164)
- Clean up common/clients/mix-clients [\#126](https://github.com/nymtech/nym/issues/126)
- Reliable chunk transmission [\#84](https://github.com/nymtech/nym/issues/84)
- Change how topology is obtained [\#44](https://github.com/nymtech/nym/issues/44)
- More secured auth token - some signature on request [\#5](https://github.com/nymtech/nym/issues/5)
**Merged pull requests:**
- Recommended testnet gateway [\#335](https://github.com/nymtech/nym/pull/335) ([jstuczyn](https://github.com/jstuczyn))
- placeholder contact form url [\#334](https://github.com/nymtech/nym/pull/334) ([jstuczyn](https://github.com/jstuczyn))
- Knocking down delay on message sending default [\#332](https://github.com/nymtech/nym/pull/332) ([futurechimp](https://github.com/futurechimp))
- Made gateway mandatory during init [\#331](https://github.com/nymtech/nym/pull/331) ([jstuczyn](https://github.com/jstuczyn))
- Renaming client binary [\#330](https://github.com/nymtech/nym/pull/330) ([futurechimp](https://github.com/futurechimp))
- v0.8.0 Changelog update [\#328](https://github.com/nymtech/nym/pull/328) ([jstuczyn](https://github.com/jstuczyn))
- Feature/sphinx socks [\#326](https://github.com/nymtech/nym/pull/326) ([futurechimp](https://github.com/futurechimp))
- Feature/print client address on startup [\#325](https://github.com/nymtech/nym/pull/325) ([jstuczyn](https://github.com/jstuczyn))
- Feature/temp wasm example removal [\#324](https://github.com/nymtech/nym/pull/324) ([jstuczyn](https://github.com/jstuczyn))
- Feature/websocket js example dependency update [\#323](https://github.com/nymtech/nym/pull/323) ([jstuczyn](https://github.com/jstuczyn))
- snake\_cased replySURBs [\#322](https://github.com/nymtech/nym/pull/322) ([jstuczyn](https://github.com/jstuczyn))
- Feature/outbound request lists [\#321](https://github.com/nymtech/nym/pull/321) ([futurechimp](https://github.com/futurechimp))
- Feature/temp fix for ipv6 [\#317](https://github.com/nymtech/nym/pull/317) ([futurechimp](https://github.com/futurechimp))
- Removed unused dependencies [\#315](https://github.com/nymtech/nym/pull/315) ([jstuczyn](https://github.com/jstuczyn))
- Feature/perf messing [\#311](https://github.com/nymtech/nym/pull/311) ([futurechimp](https://github.com/futurechimp))
- Upgrades tungstenite libraries to new versions with 64MB message sizes. [\#310](https://github.com/nymtech/nym/pull/310) ([futurechimp](https://github.com/futurechimp))
- Assigning connection shared key post registration [\#308](https://github.com/nymtech/nym/pull/308) ([jstuczyn](https://github.com/jstuczyn))
- Feature/client binary api update [\#306](https://github.com/nymtech/nym/pull/306) ([jstuczyn](https://github.com/jstuczyn))
- Removes unused Cargo dependencies so we stay slim and trim. [\#305](https://github.com/nymtech/nym/pull/305) ([futurechimp](https://github.com/futurechimp))
- Removes unused code from the socks client implementation [\#304](https://github.com/nymtech/nym/pull/304) ([futurechimp](https://github.com/futurechimp))
- Feature/client core [\#303](https://github.com/nymtech/nym/pull/303) ([futurechimp](https://github.com/futurechimp))
- Feature/socks5 [\#302](https://github.com/nymtech/nym/pull/302) ([futurechimp](https://github.com/futurechimp))
- Updated blake3 dependency to 0.3.5 [\#281](https://github.com/nymtech/nym/pull/281) ([jstuczyn](https://github.com/jstuczyn))
- Feature/ws send confirmation removal [\#280](https://github.com/nymtech/nym/pull/280) ([jstuczyn](https://github.com/jstuczyn))
- Added simple react example [\#275](https://github.com/nymtech/nym/pull/275) ([keviinfoes](https://github.com/keviinfoes))
- Feature/topology refactor [\#274](https://github.com/nymtech/nym/pull/274) ([jstuczyn](https://github.com/jstuczyn))
- Feature/gateway shared key generation [\#272](https://github.com/nymtech/nym/pull/272) ([jstuczyn](https://github.com/jstuczyn))
- Removed the healthcheck module, it's no longer in use. [\#271](https://github.com/nymtech/nym/pull/271) ([futurechimp](https://github.com/futurechimp))
- Adding description field to wasm client to kill warning [\#270](https://github.com/nymtech/nym/pull/270) ([futurechimp](https://github.com/futurechimp))
- Running `npm audit fix` on js examples [\#269](https://github.com/nymtech/nym/pull/269) ([futurechimp](https://github.com/futurechimp))
- Feature/constant length packet payloads [\#268](https://github.com/nymtech/nym/pull/268) ([jstuczyn](https://github.com/jstuczyn))
- Feature/wasm topology duplication [\#265](https://github.com/nymtech/nym/pull/265) ([jstuczyn](https://github.com/jstuczyn))
- Removed misplaced WorkingDirectory parameter [\#264](https://github.com/nymtech/nym/pull/264) ([ststefa](https://github.com/ststefa))
- Feature/packet retransmission [\#263](https://github.com/nymtech/nym/pull/263) ([jstuczyn](https://github.com/jstuczyn))
- could not count to ten properly [\#262](https://github.com/nymtech/nym/pull/262) ([ststefa](https://github.com/ststefa))
- build\(deps\): bump websocket-extensions from 0.1.3 to 0.1.4 in /clients/webassembly/js-example [\#261](https://github.com/nymtech/nym/pull/261) ([dependabot[bot]](https://github.com/apps/dependabot))
- add disabling feature 'offline-test' for network-dependent tests [\#260](https://github.com/nymtech/nym/pull/260) ([hyperfekt](https://github.com/hyperfekt))
## [v0.7.0](https://github.com/nymtech/nym/tree/v0.7.0) (2020-06-08)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.6.0...v0.7.0)
The main features of this release are:
* the addition of gateway nodes
* the retiring of the store-and-forward providers in favour of gateway nodes
* got rid of TCP connections for clients, everything now happens through websockets
* a new [Nym webassembly client](https://www.npmjs.com/package/@nymproject/nym-client-wasm), making it possible interact with Nym easily in browser-based runtimes
* reliability and performance improvements for mixnode networking
* initial validator code running (little functionality yet though)
See the [changelog](https://github.com/nymtech/nym/blob/develop/CHANGELOG.md) for detailed release notes.
**Implemented enhancements:**
- Use tokio codecs for multi\_tcp\_client [\#207](https://github.com/nymtech/nym/issues/207)
- Consider rewriting sfw\_provider\_requests using tokio Framed + Codec [\#181](https://github.com/nymtech/nym/issues/181)
**Fixed bugs:**
- Unexplained traffic increase in presence of unroutable node [\#232](https://github.com/nymtech/nym/issues/232)
- Gateway won't send to restarted layer1 nodes [\#231](https://github.com/nymtech/nym/issues/231)
**Closed issues:**
- Move to userpubkey@gatewaypubkey addresses. [\#235](https://github.com/nymtech/nym/issues/235)
- Get `start_local_network.sh` working with the js example [\#227](https://github.com/nymtech/nym/issues/227)
- Fix indeterminate test failure [\#218](https://github.com/nymtech/nym/issues/218)
- Remove 'fetch' mechanism from desktop client's client in favour of push [\#211](https://github.com/nymtech/nym/issues/211)
- Mixnode - load Sphinx keys like Gateway [\#209](https://github.com/nymtech/nym/issues/209)
- Publish NPM package for WebAssembly client [\#206](https://github.com/nymtech/nym/issues/206)
- Change --sockettype option on desktop client [\#203](https://github.com/nymtech/nym/issues/203)
- Remove TCP sockets from desktop client [\#202](https://github.com/nymtech/nym/issues/202)
- Desktop client currently hard-codes first provider [\#198](https://github.com/nymtech/nym/issues/198)
- Webassembly client currently hard-codes first provider [\#197](https://github.com/nymtech/nym/issues/197)
- Add Rust-based route construction to wasm client [\#196](https://github.com/nymtech/nym/issues/196)
- Remove fetch event [\#195](https://github.com/nymtech/nym/issues/195)
- Control messages should all be JSON [\#194](https://github.com/nymtech/nym/issues/194)
- Desktop Client should attach to gateway websocket [\#193](https://github.com/nymtech/nym/issues/193)
- Merge gateway and provider nodes [\#192](https://github.com/nymtech/nym/issues/192)
- Remove direct Sphinx dependencies [\#184](https://github.com/nymtech/nym/issues/184)
- tests::client\_reconnects\_to\_server\_after\_it\_went\_down fails on aarch64-linux [\#179](https://github.com/nymtech/nym/issues/179)
- \[Windows\] Presence notification fill OS socket queue [\#170](https://github.com/nymtech/nym/issues/170)
- Figure out connection hiccups between client and provider [\#162](https://github.com/nymtech/nym/issues/162)
- Improve the healthchecker [\#160](https://github.com/nymtech/nym/issues/160)
- Rethink client addressability [\#135](https://github.com/nymtech/nym/issues/135)
- Give some love to the service provider client ledger [\#116](https://github.com/nymtech/nym/issues/116)
- Start Gateway node type [\#80](https://github.com/nymtech/nym/issues/80)
- Bring health-checker into validator mix-mining [\#78](https://github.com/nymtech/nym/issues/78)
- Solidify TCPSocket on client [\#72](https://github.com/nymtech/nym/issues/72)
- scripts: run\_local\_network.sh doesn't die nicely [\#45](https://github.com/nymtech/nym/issues/45)
- Persistently store ledger with registered clients and their auth tokens [\#6](https://github.com/nymtech/nym/issues/6)
- Persistent socket connection \(Websocket with client\) [\#17](https://github.com/nymtech/nym/issues/17)
- Persistent socket connection \(TCP Socket with provider\) [\#18](https://github.com/nymtech/nym/issues/18)
- Persistent socket connection \(Websocket with client\) [\#12](https://github.com/nymtech/nym/issues/12)
- Persistent socket connection \(TCP Socket with client\) [\#13](https://github.com/nymtech/nym/issues/13)
- WASM version of the Sphinx packet [\#19](https://github.com/nymtech/nym/issues/19)
**Merged pull requests:**
- Filtering compatible node versions [\#259](https://github.com/nymtech/nym/pull/259) ([jstuczyn](https://github.com/jstuczyn))
- systemd service unit example [\#257](https://github.com/nymtech/nym/pull/257) ([ststefa](https://github.com/ststefa))
- renaming desktop to native client [\#251](https://github.com/nymtech/nym/pull/251) ([futurechimp](https://github.com/futurechimp))
- Adding a pipenv dependencies file to the python client example [\#250](https://github.com/nymtech/nym/pull/250) ([futurechimp](https://github.com/futurechimp))
- Cleaning up startup messages in native client [\#249](https://github.com/nymtech/nym/pull/249) ([futurechimp](https://github.com/futurechimp))
- fixing up readme, bumping version number [\#246](https://github.com/nymtech/nym/pull/246) ([futurechimp](https://github.com/futurechimp))
- Feature/sphinx socket packet encoder [\#245](https://github.com/nymtech/nym/pull/245) ([jstuczyn](https://github.com/jstuczyn))
- Adding some documentation to the webassembly client [\#244](https://github.com/nymtech/nym/pull/244) ([futurechimp](https://github.com/futurechimp))
- Simplified some names and used the published npm package [\#242](https://github.com/nymtech/nym/pull/242) ([futurechimp](https://github.com/futurechimp))
- Feature/make andrew happy [\#241](https://github.com/nymtech/nym/pull/241) ([futurechimp](https://github.com/futurechimp))
- Removed redundant console.log [\#240](https://github.com/nymtech/nym/pull/240) ([jstuczyn](https://github.com/jstuczyn))
- Feature/explicit gateway addressing [\#239](https://github.com/nymtech/nym/pull/239) ([jstuczyn](https://github.com/jstuczyn))
- Feature/clean up [\#238](https://github.com/nymtech/nym/pull/238) ([futurechimp](https://github.com/futurechimp))
- Feature/addressing update [\#237](https://github.com/nymtech/nym/pull/237) ([jstuczyn](https://github.com/jstuczyn))
- Added hidden init flag to increase default traffic volume [\#234](https://github.com/nymtech/nym/pull/234) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/issue\#231 [\#233](https://github.com/nymtech/nym/pull/233) ([jstuczyn](https://github.com/jstuczyn))
- Fixed unwrap on none value [\#230](https://github.com/nymtech/nym/pull/230) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/gateway crash on incomplete ws handshake [\#229](https://github.com/nymtech/nym/pull/229) ([jstuczyn](https://github.com/jstuczyn))
- Feature/start local network improvements [\#228](https://github.com/nymtech/nym/pull/228) ([jstuczyn](https://github.com/jstuczyn))
- Updated directory\_client reqwest to 0.10 [\#226](https://github.com/nymtech/nym/pull/226) ([jstuczyn](https://github.com/jstuczyn))
- Updated js-example to get gateway from topology [\#225](https://github.com/nymtech/nym/pull/225) ([jstuczyn](https://github.com/jstuczyn))
- Requiring explicit timestamp when converting from rest to service mix… [\#224](https://github.com/nymtech/nym/pull/224) ([jstuczyn](https://github.com/jstuczyn))
- Feature/minor docs fixes [\#223](https://github.com/nymtech/nym/pull/223) ([futurechimp](https://github.com/futurechimp))
- Removed having to care about SURB\_ID [\#222](https://github.com/nymtech/nym/pull/222) ([jstuczyn](https://github.com/jstuczyn))
- Moved relevant parts of old mix-client to nymsphinx [\#221](https://github.com/nymtech/nym/pull/221) ([jstuczyn](https://github.com/jstuczyn))
- Feature/load keys on run [\#220](https://github.com/nymtech/nym/pull/220) ([jstuczyn](https://github.com/jstuczyn))
- Updated wasm code to work with new gateway and updated the example [\#219](https://github.com/nymtech/nym/pull/219) ([jstuczyn](https://github.com/jstuczyn))
- validator: removing health checker [\#217](https://github.com/nymtech/nym/pull/217) ([futurechimp](https://github.com/futurechimp))
- The great sfw-provider purge of 2020 [\#216](https://github.com/nymtech/nym/pull/216) ([jstuczyn](https://github.com/jstuczyn))
- Fixed compilation warnings on unreachable code when compiling with fe… [\#215](https://github.com/nymtech/nym/pull/215) ([jstuczyn](https://github.com/jstuczyn))
- Feature/healthchecker removal [\#214](https://github.com/nymtech/nym/pull/214) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/send to correct gateway [\#213](https://github.com/nymtech/nym/pull/213) ([jstuczyn](https://github.com/jstuczyn))
- Feature/client socket adjustments [\#212](https://github.com/nymtech/nym/pull/212) ([jstuczyn](https://github.com/jstuczyn))
- Sending sphinx packet independent of the receiver task [\#210](https://github.com/nymtech/nym/pull/210) ([jstuczyn](https://github.com/jstuczyn))
- Feature/gateway provider merge [\#208](https://github.com/nymtech/nym/pull/208) ([jstuczyn](https://github.com/jstuczyn))
- Feature/route from topology [\#201](https://github.com/nymtech/nym/pull/201) ([futurechimp](https://github.com/futurechimp))
- Intermediate gateway-heart surgery checkpoint [\#199](https://github.com/nymtech/nym/pull/199) ([jstuczyn](https://github.com/jstuczyn))
- Feature/wasm js demo [\#191](https://github.com/nymtech/nym/pull/191) ([futurechimp](https://github.com/futurechimp))
- Feature/improve js example [\#190](https://github.com/nymtech/nym/pull/190) ([futurechimp](https://github.com/futurechimp))
- Feature/limit direct sphinx dependency + remove direct curve25519 dependency from wasm client [\#189](https://github.com/nymtech/nym/pull/189) ([jstuczyn](https://github.com/jstuczyn))
- Feature/very minor refactoring [\#188](https://github.com/nymtech/nym/pull/188) ([jstuczyn](https://github.com/jstuczyn))
- Feature/persistent ledger [\#187](https://github.com/nymtech/nym/pull/187) ([jstuczyn](https://github.com/jstuczyn))
- Optimising wasm build size, shaves about 10% size off our wasm output. [\#186](https://github.com/nymtech/nym/pull/186) ([futurechimp](https://github.com/futurechimp))
- Ran `npm audit fix` on the wasm demo directory. [\#185](https://github.com/nymtech/nym/pull/185) ([futurechimp](https://github.com/futurechimp))
- Feature/nym sphinx wasm [\#183](https://github.com/nymtech/nym/pull/183) ([futurechimp](https://github.com/futurechimp))
- Improvements to sfw-provider - client communcation [\#180](https://github.com/nymtech/nym/pull/180) ([jstuczyn](https://github.com/jstuczyn))
- Adding Apache 2 license headers to all files [\#178](https://github.com/nymtech/nym/pull/178) ([futurechimp](https://github.com/futurechimp))
- Feature/service persistence [\#171](https://github.com/nymtech/nym/pull/171) ([futurechimp](https://github.com/futurechimp))
## [v0.6.0](https://github.com/nymtech/nym/tree/v0.6.0) (2020-04-07)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.5.0...v0.6.0)
This release fixes bugs in v0.5.0. All testnet node operators are advised to upgrade from v0.5.0.
* fixed premature EOFs on socket connections by using the new multi-TCP client
* fixed a bug causing client and mixnode connection hangs for misconfigured nodes
* by default 'Debug' section of saved configs is now empty and default values are used unless explicitly overridden
* introduced packet chunking allowing clients to send messages of arbitrary length. Note that packet retransmission is not implemented yet, so for longer messages, you might not get anything
* mixnodes now periodically log stats regarding number of packets mixed
* fixed possible client hang ups when sending high rates of traffic
* preventing mixes from starting with same announce-host as an existing node
* fixed overflow multiplication if connection backoff was set to a high value
**Closed issues:**
- Periodic activity summary [\#172](https://github.com/nymtech/nym/issues/172)
- Move contents of 'common/addressing' into 'common/nymsphinx' [\#161](https://github.com/nymtech/nym/issues/161)
- Make builds simpler for node operators [\#114](https://github.com/nymtech/nym/issues/114)
- Chunking in `nym-client` \(receive\) [\#83](https://github.com/nymtech/nym/issues/83)
- Chunking in `nym-client` \(send\) [\#82](https://github.com/nymtech/nym/issues/82)
**Merged pull requests:**
- Feature/tcp client connection timeout [\#176](https://github.com/nymtech/nym/pull/176) ([jstuczyn](https://github.com/jstuczyn))
- Feature/mixing stats logging [\#175](https://github.com/nymtech/nym/pull/175) ([jstuczyn](https://github.com/jstuczyn))
- Preventing multiplication overflow for reconnection backoff [\#174](https://github.com/nymtech/nym/pull/174) ([jstuczyn](https://github.com/jstuczyn))
- Feature/non mandatory debug config [\#173](https://github.com/nymtech/nym/pull/173) ([jstuczyn](https://github.com/jstuczyn))
- Feature/addressing move [\#169](https://github.com/nymtech/nym/pull/169) ([jstuczyn](https://github.com/jstuczyn))
- Checking if any other node is already announcing the same host [\#168](https://github.com/nymtech/nym/pull/168) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/closing tcp client connections on drop [\#167](https://github.com/nymtech/nym/pull/167) ([jstuczyn](https://github.com/jstuczyn))
- Yielding tokio task upon creating loop/real traffic message [\#166](https://github.com/nymtech/nym/pull/166) ([jstuczyn](https://github.com/jstuczyn))
- Feature/minor healthchecker improvements [\#165](https://github.com/nymtech/nym/pull/165) ([jstuczyn](https://github.com/jstuczyn))
- Feature/packet chunking [\#158](https://github.com/nymtech/nym/pull/158) ([jstuczyn](https://github.com/jstuczyn))
## [v0.5.0](https://github.com/nymtech/nym/tree/v0.5.0) (2020-03-23)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.5.0-rc.1...v0.5.0)
1. Introduced proper configuration options for mixnodes, clients and providers. Everything is initialised with the `init` command that creates a saved config.toml file. To run the binary you now use `nym-<binary-name> run`, for example `nym-mixnode run`. Each flag can be overwritten at any stage with the following priority: run flags, data in config.toml and finally init flags.
2. Made mixnet TCP connections persistent. When sending a Sphinx packet, it should no longer go through the lengthy process of establishing a TCP connection only to immediately tear it down after sending a single packet. This significantly boosts throughput.
3. A lot of work on code clean up and refactoring including some performance fixes.
4. Client now determines its default nym-sfw-provider at startup and should always try to connect to the same one. Note: we still can't reliably run more than a single provider on the network.
5. Logging messages now have timestamps and when running at more aggressive log mode (like debug or even trace) we should no longer be overwhelmed with messages from external crates.
6. Initial compatibility with Windows. Please let us know if you have problems.
7. More work on validator, including initial Tendermint integration in Rust, and the start of the mixmining system.
**Closed issues:**
- Introduce timestamps to log messages [\#124](https://github.com/nymtech/nym/issues/124)
**Merged pull requests:**
- removing spooky startup warning message [\#155](https://github.com/nymtech/nym/pull/155) ([futurechimp](https://github.com/futurechimp))
- Some more startup fixes [\#154](https://github.com/nymtech/nym/pull/154) ([futurechimp](https://github.com/futurechimp))
- Entering runtime context when creating mix traffic controller [\#153](https://github.com/nymtech/nym/pull/153) ([jstuczyn](https://github.com/jstuczyn))
- Friendlification of startup messages [\#151](https://github.com/nymtech/nym/pull/151) ([futurechimp](https://github.com/futurechimp))
- Entering runtime context when creating packet forwarder [\#150](https://github.com/nymtech/nym/pull/150) ([jstuczyn](https://github.com/jstuczyn))
- Feature/add topology to validator [\#149](https://github.com/nymtech/nym/pull/149) ([futurechimp](https://github.com/futurechimp))
- Making code work on windows machines [\#148](https://github.com/nymtech/nym/pull/148) ([jstuczyn](https://github.com/jstuczyn))
- validator: adding HTTP interface [\#146](https://github.com/nymtech/nym/pull/146) ([futurechimp](https://github.com/futurechimp))
- Extracting the log setup [\#145](https://github.com/nymtech/nym/pull/145) ([futurechimp](https://github.com/futurechimp))
- Feature/optional location in configs [\#144](https://github.com/nymtech/nym/pull/144) ([jstuczyn](https://github.com/jstuczyn))
- Feature/concurrent connection managers [\#142](https://github.com/nymtech/nym/pull/142) ([jstuczyn](https://github.com/jstuczyn))
- Defaulting for global 'Info' logging level if not set in .env [\#140](https://github.com/nymtech/nym/pull/140) ([jstuczyn](https://github.com/jstuczyn))
- Provider not storing loop cover messages [\#139](https://github.com/nymtech/nym/pull/139) ([jstuczyn](https://github.com/jstuczyn))
- Using log builder to include timestamps + filters [\#138](https://github.com/nymtech/nym/pull/138) ([jstuczyn](https://github.com/jstuczyn))
- Feature/client ws refactoring [\#134](https://github.com/nymtech/nym/pull/134) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/metrics presence delay fix [\#133](https://github.com/nymtech/nym/pull/133) ([jstuczyn](https://github.com/jstuczyn))
- Removed outdated and redundant sample-configs [\#131](https://github.com/nymtech/nym/pull/131) ([jstuczyn](https://github.com/jstuczyn))
- If not overridden, 'announce-host' should default to 'host' [\#130](https://github.com/nymtech/nym/pull/130) ([jstuczyn](https://github.com/jstuczyn))
- Nice to know who we're talking to at startup... [\#129](https://github.com/nymtech/nym/pull/129) ([futurechimp](https://github.com/futurechimp))
## [v0.5.0-rc.1](https://github.com/nymtech/nym/tree/v0.5.0-rc.1) (2020-03-06)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.4.1...v0.5.0-rc.1)
**Closed issues:**
- COMPILE: Could not compile project using Cargo [\#118](https://github.com/nymtech/nym/issues/118)
- Wherever unbounded mpsc channel is used, prefer unbounded\_send\(\) over send\(\).await [\#90](https://github.com/nymtech/nym/issues/90)
- Add a `Send` method in nym-client [\#81](https://github.com/nymtech/nym/issues/81)
- Start on Tendermint integration [\#79](https://github.com/nymtech/nym/issues/79)
- Ditch DummyKeyPair [\#75](https://github.com/nymtech/nym/issues/75)
- Replace args with proper config files [\#69](https://github.com/nymtech/nym/issues/69)
- Fix incorrectly used Arcs [\#47](https://github.com/nymtech/nym/issues/47)
- nym-mixnode mandatory host option [\#26](https://github.com/nymtech/nym/issues/26)
- Create config struct for mixnode \(possibly also for client\) [\#21](https://github.com/nymtech/nym/issues/21)
- Check if RwLock on MixProcessingData is still needed [\#8](https://github.com/nymtech/nym/issues/8)
- Once implementation is available, wherever appropriate, replace `futures::lock::Mutex` with `futures::lock::RwLock` [\#9](https://github.com/nymtech/nym/issues/9)
- Persistent socket connection with other mixes [\#2](https://github.com/nymtech/nym/issues/2)
- Reuse TCP socket connection between client and mixnodes [\#20](https://github.com/nymtech/nym/issues/20)
- Reuse TCP socket connection between mixnodes and providers [\#3](https://github.com/nymtech/nym/issues/3)
**Merged pull requests:**
- Feature/client refactoring [\#128](https://github.com/nymtech/nym/pull/128) ([jstuczyn](https://github.com/jstuczyn))
- Feature/provider refactoring [\#125](https://github.com/nymtech/nym/pull/125) ([jstuczyn](https://github.com/jstuczyn))
- all: fixing mis-spelling [\#123](https://github.com/nymtech/nym/pull/123) ([futurechimp](https://github.com/futurechimp))
- Feature/further clippy fixes [\#121](https://github.com/nymtech/nym/pull/121) ([jstuczyn](https://github.com/jstuczyn))
- Feature/tokio tungstenite dependency fix [\#120](https://github.com/nymtech/nym/pull/120) ([jstuczyn](https://github.com/jstuczyn))
- Feature/config files cleanup [\#119](https://github.com/nymtech/nym/pull/119) ([jstuczyn](https://github.com/jstuczyn))
- Feature/config files [\#117](https://github.com/nymtech/nym/pull/117) ([jstuczyn](https://github.com/jstuczyn))
- Feature/un genericize keys [\#111](https://github.com/nymtech/nym/pull/111) ([futurechimp](https://github.com/futurechimp))
- Feature/abci [\#110](https://github.com/nymtech/nym/pull/110) ([futurechimp](https://github.com/futurechimp))
- Simplified the use of generics on identity keypair by using output types [\#109](https://github.com/nymtech/nym/pull/109) ([jstuczyn](https://github.com/jstuczyn))
## [v0.4.1](https://github.com/nymtech/nym/tree/v0.4.1) (2020-01-29)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.4.0...v0.4.1)
**Closed issues:**
- Change healthcheck to run on provided topology rather than pull one itself [\#95](https://github.com/nymtech/nym/issues/95)
**Merged pull requests:**
- Bugfix/healthcheck on provided topology [\#108](https://github.com/nymtech/nym/pull/108) ([jstuczyn](https://github.com/jstuczyn))
## [v0.4.0](https://github.com/nymtech/nym/tree/v0.4.0) (2020-01-28)
[Full Changelog](https://github.com/nymtech/nym/compare/0.4.0-rc.2...v0.4.0)
Nym 0.4.0 Platform
In this release, we're taking a lot more care with version numbers, so that we can ensure upgrade compatibility for mixnodes, providers, clients, and validators more easily.
This release also integrates a health-checker and network topology refresh into the Nym client, so that the client can intelligently choose paths which route around any non-functional or incompatible nodes.
## [0.4.0-rc.2](https://github.com/nymtech/nym/tree/0.4.0-rc.2) (2020-01-28)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.4.0-rc.2...0.4.0-rc.2)
## [v0.4.0-rc.2](https://github.com/nymtech/nym/tree/v0.4.0-rc.2) (2020-01-28)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.4.0-rc.1...v0.4.0-rc.2)
**Merged pull requests:**
- Hotfix/semver compatibility [\#106](https://github.com/nymtech/nym/pull/106) ([jstuczyn](https://github.com/jstuczyn))
## [v0.4.0-rc.1](https://github.com/nymtech/nym/tree/v0.4.0-rc.1) (2020-01-28)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.3.3...v0.4.0-rc.1)
**Closed issues:**
- Check Sphinx packet length in client [\#98](https://github.com/nymtech/nym/issues/98)
- workflow test [\#97](https://github.com/nymtech/nym/issues/97)
- Client SemVer [\#85](https://github.com/nymtech/nym/issues/85)
- Move PemStore [\#74](https://github.com/nymtech/nym/issues/74)
- Periodic client refresh [\#70](https://github.com/nymtech/nym/issues/70)
- Logging [\#68](https://github.com/nymtech/nym/issues/68)
- Nym-client refactor [\#67](https://github.com/nymtech/nym/issues/67)
- Stop panicking! [\#66](https://github.com/nymtech/nym/issues/66)
- Fix Mixnode Panic on Sphinx packet replay [\#65](https://github.com/nymtech/nym/issues/65)
- Convert older code to start using logging [\#35](https://github.com/nymtech/nym/issues/35)
- Convert to non-url-safe base64 \(everywhere\) [\#28](https://github.com/nymtech/nym/issues/28)
- If a thread blows at startup, panic the entire application [\#15](https://github.com/nymtech/nym/issues/15)
- Split provider/mod.rs [\#10](https://github.com/nymtech/nym/issues/10)
**Merged pull requests:**
- Feature/health checker with existing keys [\#105](https://github.com/nymtech/nym/pull/105) ([jstuczyn](https://github.com/jstuczyn))
- Feature/remove topology equality check [\#104](https://github.com/nymtech/nym/pull/104) ([futurechimp](https://github.com/futurechimp))
- Feature/base58 [\#102](https://github.com/nymtech/nym/pull/102) ([futurechimp](https://github.com/futurechimp))
- Feature/panic improvements [\#101](https://github.com/nymtech/nym/pull/101) ([jstuczyn](https://github.com/jstuczyn))
- Feature/fix sphinx unwraps [\#100](https://github.com/nymtech/nym/pull/100) ([futurechimp](https://github.com/futurechimp))
- Feature/check packet length [\#99](https://github.com/nymtech/nym/pull/99) ([futurechimp](https://github.com/futurechimp))
- Feature/version filtering improvements [\#96](https://github.com/nymtech/nym/pull/96) ([futurechimp](https://github.com/futurechimp))
- Feature/refreshing topology [\#94](https://github.com/nymtech/nym/pull/94) ([jstuczyn](https://github.com/jstuczyn))
- Feature/consistent logging [\#93](https://github.com/nymtech/nym/pull/93) ([futurechimp](https://github.com/futurechimp))
- Feature/semver client [\#92](https://github.com/nymtech/nym/pull/92) ([futurechimp](https://github.com/futurechimp))
- Feature/client refactor [\#91](https://github.com/nymtech/nym/pull/91) ([jstuczyn](https://github.com/jstuczyn))
- Release builds should no longer silently fail - everything will be im… [\#89](https://github.com/nymtech/nym/pull/89) ([jstuczyn](https://github.com/jstuczyn))
## [v0.3.3](https://github.com/nymtech/nym/tree/v0.3.3) (2020-01-20)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.3.2...v0.3.3)
**Fixed bugs:**
- Nym client crashing and disconnecting local websocket with complaint about binary data [\#56](https://github.com/nymtech/nym/issues/56)
**Closed issues:**
- Websocket text fix [\#64](https://github.com/nymtech/nym/issues/64)
- Restore nym-client lib in crate [\#63](https://github.com/nymtech/nym/issues/63)
- Make websocket not crash on ping or pong messages [\#62](https://github.com/nymtech/nym/issues/62)
- Messages returned by fetch are base64 encoded [\#55](https://github.com/nymtech/nym/issues/55)
- Check layer 1 connectivity at client start [\#38](https://github.com/nymtech/nym/issues/38)
- Check required sfw-provider args [\#27](https://github.com/nymtech/nym/issues/27)
- Take version numbers into account when picking routes [\#14](https://github.com/nymtech/nym/issues/14)
- Make Electron app work with new Rust mixnet client [\#16](https://github.com/nymtech/nym/issues/16)
**Merged pull requests:**
- Feature/websocket improvements [\#88](https://github.com/nymtech/nym/pull/88) ([jstuczyn](https://github.com/jstuczyn))
- Using println rather than log for startup banner, it's not an error [\#87](https://github.com/nymtech/nym/pull/87) ([futurechimp](https://github.com/futurechimp))
- Feature/nym client lib [\#61](https://github.com/nymtech/nym/pull/61) ([jstuczyn](https://github.com/jstuczyn))
## [v0.3.2](https://github.com/nymtech/nym/tree/v0.3.2) (2020-01-17)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.3.1...v0.3.2)
**Merged pull requests:**
- Feature/separate presence address [\#59](https://github.com/nymtech/nym/pull/59) ([jstuczyn](https://github.com/jstuczyn))
## [v0.3.1](https://github.com/nymtech/nym/tree/v0.3.1) (2020-01-16)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.3.0...v0.3.1)
**Merged pull requests:**
- Bugfix/presence client crash [\#58](https://github.com/nymtech/nym/pull/58) ([jstuczyn](https://github.com/jstuczyn))
## [v0.3.0](https://github.com/nymtech/nym/tree/v0.3.0) (2020-01-14)
[Full Changelog](https://github.com/nymtech/nym/compare/v0.2.0...v0.3.0)
**Closed issues:**
- Error referring to mismatched types caused by topology [\#46](https://github.com/nymtech/nym/issues/46)
- Provider needs to announce two of its addresses \(+ issue of hardcoded port\) [\#32](https://github.com/nymtech/nym/issues/32)
- Port run\_network.sh from old Go mixnet [\#30](https://github.com/nymtech/nym/issues/30)
- Health Checker inside Validator [\#29](https://github.com/nymtech/nym/issues/29)
- Combine Rust repositories into a single master repo containing multiple crates [\#24](https://github.com/nymtech/nym/issues/24)
- Fix the version numbers on provider and mixnode [\#23](https://github.com/nymtech/nym/issues/23)
- Travis releases for Nym [\#22](https://github.com/nymtech/nym/issues/22)
- Add version number to presence [\#4](https://github.com/nymtech/nym/issues/4)
- Add version number to presence [\#1](https://github.com/nymtech/nym/issues/1)
**Merged pull requests:**
- Feature/client topology filtering [\#54](https://github.com/nymtech/nym/pull/54) ([jstuczyn](https://github.com/jstuczyn))
- print public key for nym client tools [\#53](https://github.com/nymtech/nym/pull/53) ([ghost](https://github.com/ghost))
- Showing binding warning on binding to localhost, 0.0.0.0 or 127.0.0.1 [\#52](https://github.com/nymtech/nym/pull/52) ([jstuczyn](https://github.com/jstuczyn))
- validator: moving sample config files into sample configs directory [\#51](https://github.com/nymtech/nym/pull/51) ([futurechimp](https://github.com/futurechimp))
- Feature/validator health checker [\#50](https://github.com/nymtech/nym/pull/50) ([jstuczyn](https://github.com/jstuczyn))
- Improving websocket connection errors [\#49](https://github.com/nymtech/nym/pull/49) ([futurechimp](https://github.com/futurechimp))
- Feature/crypto crate [\#48](https://github.com/nymtech/nym/pull/48) ([jstuczyn](https://github.com/jstuczyn))
- Feature/chill log messages [\#43](https://github.com/nymtech/nym/pull/43) ([futurechimp](https://github.com/futurechimp))
- persistence: improving PEM file reading and parsing failure messages [\#42](https://github.com/nymtech/nym/pull/42) ([futurechimp](https://github.com/futurechimp))
- Providing a nicer error than "failed on unwrap\(\)" when topology retri… [\#41](https://github.com/nymtech/nym/pull/41) ([futurechimp](https://github.com/futurechimp))
- Prettying up sfw-provider start sequence a bit. [\#40](https://github.com/nymtech/nym/pull/40) ([futurechimp](https://github.com/futurechimp))
- Removing the run command from code and documentation [\#39](https://github.com/nymtech/nym/pull/39) ([futurechimp](https://github.com/futurechimp))
- Feature/script/localnet [\#37](https://github.com/nymtech/nym/pull/37) ([futurechimp](https://github.com/futurechimp))
- Feature/arguments fix [\#36](https://github.com/nymtech/nym/pull/36) ([jstuczyn](https://github.com/jstuczyn))
- Feature/crates cleanup [\#34](https://github.com/nymtech/nym/pull/34) ([jstuczyn](https://github.com/jstuczyn))
- Features/version number to presence [\#25](https://github.com/nymtech/nym/pull/25) ([aniampio](https://github.com/aniampio))
- Feature/minor client changes [\#7](https://github.com/nymtech/nym/pull/7) ([jstuczyn](https://github.com/jstuczyn))
## [v0.2.0](https://github.com/nymtech/nym/tree/v0.2.0) (2020-01-07)
[Full Changelog](https://github.com/nymtech/nym/compare/0.2.0...v0.2.0)
## [0.2.0](https://github.com/nymtech/nym/tree/0.2.0) (2020-01-06)
[Full Changelog](https://github.com/nymtech/nym/compare/3c64a2facd753f4f2f431e7f888e54842e2bc64e...0.2.0)
- Fix success view messages. [\#990](https://github.com/nymtech/nym/pull/990) ([tommyv1987](https://github.com/tommyv1987))
- Feature/enable signature check [\#989](https://github.com/nymtech/nym/pull/989) ([neacsu](https://github.com/neacsu))
- Update mixnet contract address [\#988](https://github.com/nymtech/nym/pull/988) ([neacsu](https://github.com/neacsu))
- Fix verloc print [\#987](https://github.com/nymtech/nym/pull/987) ([neacsu](https://github.com/neacsu))
- Feature/refactor mixnet contract test helpers [\#986](https://github.com/nymtech/nym/pull/986) ([futurechimp](https://github.com/futurechimp))
- Making the terminology consistent between mixnode/gateway output and … [\#985](https://github.com/nymtech/nym/pull/985) ([futurechimp](https://github.com/futurechimp))
- Feature/add wallet to gateway init [\#984](https://github.com/nymtech/nym/pull/984) ([futurechimp](https://github.com/futurechimp))
- Feature/add wallet address to init [\#982](https://github.com/nymtech/nym/pull/982) ([futurechimp](https://github.com/futurechimp))
- Update message to bond mixnode [\#981](https://github.com/nymtech/nym/pull/981) ([tommyv1987](https://github.com/tommyv1987))
- Bump version to 0.12.0 [\#980](https://github.com/nymtech/nym/pull/980) ([neacsu](https://github.com/neacsu))
- Feature/rename erc20 [\#979](https://github.com/nymtech/nym/pull/979) ([neacsu](https://github.com/neacsu))
- Removed web wallet [\#978](https://github.com/nymtech/nym/pull/978) ([futurechimp](https://github.com/futurechimp))
- Network Explorer: fix uptime history display to use new API response [\#977](https://github.com/nymtech/nym/pull/977) ([mmsinclair](https://github.com/mmsinclair))
- Make develop branch agnostic of the network [\#976](https://github.com/nymtech/nym/pull/976) ([neacsu](https://github.com/neacsu))
- Fix windows fmt [\#975](https://github.com/nymtech/nym/pull/975) ([neacsu](https://github.com/neacsu))
- Feature/wallet settings area [\#974](https://github.com/nymtech/nym/pull/974) ([fmtabbara](https://github.com/fmtabbara))
- Feature/node info command [\#972](https://github.com/nymtech/nym/pull/972) ([jstuczyn](https://github.com/jstuczyn))
- Use the renamed balance function [\#971](https://github.com/nymtech/nym/pull/971) ([neacsu](https://github.com/neacsu))
- Introduced 'version' command to all relevant binaries [\#969](https://github.com/nymtech/nym/pull/969) ([jstuczyn](https://github.com/jstuczyn))
- Feature/new testnet wallet updates [\#968](https://github.com/nymtech/nym/pull/968) ([fmtabbara](https://github.com/fmtabbara))
- Feature/optional bandwidth bypass [\#965](https://github.com/nymtech/nym/pull/965) ([jstuczyn](https://github.com/jstuczyn))
- Additional tauri commands to get bond details [\#964](https://github.com/nymtech/nym/pull/964) ([jstuczyn](https://github.com/jstuczyn))
- Fix topology log [\#962](https://github.com/nymtech/nym/pull/962) ([neacsu](https://github.com/neacsu))
- Network Explorer: configure URLs with `.env` file [\#960](https://github.com/nymtech/nym/pull/960) ([mmsinclair](https://github.com/mmsinclair))
- Add custom denom balance query [\#957](https://github.com/nymtech/nym/pull/957) ([neacsu](https://github.com/neacsu))
- Feature/ts client update [\#956](https://github.com/nymtech/nym/pull/956) ([jstuczyn](https://github.com/jstuczyn))
- Check the response for multiple sends [\#955](https://github.com/nymtech/nym/pull/955) ([neacsu](https://github.com/neacsu))
- Feature/vesting to wallet [\#954](https://github.com/nymtech/nym/pull/954) ([durch](https://github.com/durch))
- Bugfix/rewarding fixes [\#953](https://github.com/nymtech/nym/pull/953) ([jstuczyn](https://github.com/jstuczyn))
- Bump next from 11.1.1 to 11.1.3 in /wallet-web [\#952](https://github.com/nymtech/nym/pull/952) ([dependabot[bot]](https://github.com/apps/dependabot))
- Different workshare calculations for rewarded vs active set [\#951](https://github.com/nymtech/nym/pull/951) ([durch](https://github.com/durch))
- Feature/simulate [\#950](https://github.com/nymtech/nym/pull/950) ([jstuczyn](https://github.com/jstuczyn))
- Feature/profit margin percent config [\#949](https://github.com/nymtech/nym/pull/949) ([durch](https://github.com/durch))
- Run CI for all contracts in one workflow [\#948](https://github.com/nymtech/nym/pull/948) ([durch](https://github.com/durch))
- Desktop Wallet UI Updates [\#947](https://github.com/nymtech/nym/pull/947) ([fmtabbara](https://github.com/fmtabbara))
- Docker updates [\#946](https://github.com/nymtech/nym/pull/946) ([tommyv1987](https://github.com/tommyv1987))
- Add VestingExecute and VestingQuery client traits [\#944](https://github.com/nymtech/nym/pull/944) ([durch](https://github.com/durch))
- Removed reliance on cosmrs fork [\#943](https://github.com/nymtech/nym/pull/943) ([jstuczyn](https://github.com/jstuczyn))
- Feature/terminology update [\#941](https://github.com/nymtech/nym/pull/941) ([jstuczyn](https://github.com/jstuczyn))
- Check the response for other transactions as well [\#937](https://github.com/nymtech/nym/pull/937) ([neacsu](https://github.com/neacsu))
- Allow proxy gateway bonding [\#936](https://github.com/nymtech/nym/pull/936) ([durch](https://github.com/durch))
- Feature/pre cosmrs updates [\#935](https://github.com/nymtech/nym/pull/935) ([jstuczyn](https://github.com/jstuczyn))
- Feature/client on behalf [\#934](https://github.com/nymtech/nym/pull/934) ([neacsu](https://github.com/neacsu))
- Webpack wallet prod configuration [\#933](https://github.com/nymtech/nym/pull/933) ([tommyv1987](https://github.com/tommyv1987))
- Adding tx\_hash to wallet response [\#932](https://github.com/nymtech/nym/pull/932) ([futurechimp](https://github.com/futurechimp))
- Release/1.0.0 pre1 [\#931](https://github.com/nymtech/nym/pull/931) ([durch](https://github.com/durch))
- Feature/identity verification [\#930](https://github.com/nymtech/nym/pull/930) ([jstuczyn](https://github.com/jstuczyn))
- Move cleaned up smart contracts to main code repo [\#929](https://github.com/nymtech/nym/pull/929) ([mfahampshire](https://github.com/mfahampshire))
- Feature/mixnet contract further adjustments [\#928](https://github.com/nymtech/nym/pull/928) ([jstuczyn](https://github.com/jstuczyn))
- typo copy change for nodemap [\#926](https://github.com/nymtech/nym/pull/926) ([Aid19801](https://github.com/Aid19801))
- Feature/UI enhancements for Desktop Wallet [\#925](https://github.com/nymtech/nym/pull/925) ([fmtabbara](https://github.com/fmtabbara))
- Fixing some clippy warnings [\#922](https://github.com/nymtech/nym/pull/922) ([futurechimp](https://github.com/futurechimp))
- Fixing go warning re unused btc lib [\#921](https://github.com/nymtech/nym/pull/921) ([futurechimp](https://github.com/futurechimp))
- quick fix adding dimensions to nodemap page for consistency [\#920](https://github.com/nymtech/nym/pull/920) ([Aid19801](https://github.com/Aid19801))
- Bump nth-check from 2.0.0 to 2.0.1 in /nym-wallet [\#918](https://github.com/nymtech/nym/pull/918) ([dependabot[bot]](https://github.com/apps/dependabot))
- Fix Mobile View for MUI data-grid \(CARD 108\) [\#915](https://github.com/nymtech/nym/pull/915) ([Aid19801](https://github.com/Aid19801))
- Feature/total delegation bucket [\#913](https://github.com/nymtech/nym/pull/913) ([jstuczyn](https://github.com/jstuczyn))
- Feature/faucet page react [\#911](https://github.com/nymtech/nym/pull/911) ([fmtabbara](https://github.com/fmtabbara))
- Feature/mixnet contract refactor [\#910](https://github.com/nymtech/nym/pull/910) ([futurechimp](https://github.com/futurechimp))
- Update README.md [\#905](https://github.com/nymtech/nym/pull/905) ([tommyv1987](https://github.com/tommyv1987))
- BUG: Bond cell denom [\#904](https://github.com/nymtech/nym/pull/904) ([Aid19801](https://github.com/Aid19801))
- Explorer UI tests missing data-testid [\#903](https://github.com/nymtech/nym/pull/903) ([tommyv1987](https://github.com/tommyv1987))
- Fix up Nym-Wallet README.md [\#899](https://github.com/nymtech/nym/pull/899) ([tommyv1987](https://github.com/tommyv1987))
- Feature/batch delegator rewarding [\#898](https://github.com/nymtech/nym/pull/898) ([jstuczyn](https://github.com/jstuczyn))
- Bug mapp nodemap [\#897](https://github.com/nymtech/nym/pull/897) ([Aid19801](https://github.com/Aid19801))
- Bug fix/macos keyboard shortcuts [\#896](https://github.com/nymtech/nym/pull/896) ([fmtabbara](https://github.com/fmtabbara))
- Add a Mobile Nav to the Network Explorer [\#895](https://github.com/nymtech/nym/pull/895) ([Aid19801](https://github.com/Aid19801))
- Only use ts-rs in tests [\#894](https://github.com/nymtech/nym/pull/894) ([durch](https://github.com/durch))
- Fix network monitor template [\#892](https://github.com/nymtech/nym/pull/892) ([neacsu](https://github.com/neacsu))
- remove delegation and undelegation from gateways [\#891](https://github.com/nymtech/nym/pull/891) ([fmtabbara](https://github.com/fmtabbara))
- Feature/nym wallet rename [\#890](https://github.com/nymtech/nym/pull/890) ([futurechimp](https://github.com/futurechimp))
- Change MixnodeDetail page's datagrid into a reuseable table component [\#887](https://github.com/nymtech/nym/pull/887) ([Aid19801](https://github.com/Aid19801))
- GitHub Actions: only run job to generate types when not in a PR [\#886](https://github.com/nymtech/nym/pull/886) ([mmsinclair](https://github.com/mmsinclair))
- Adding data-test-ids for the explorer [\#885](https://github.com/nymtech/nym/pull/885) ([tommyv1987](https://github.com/tommyv1987))
- Fix path for github action running tauri-wallet-tests [\#884](https://github.com/nymtech/nym/pull/884) ([tommyv1987](https://github.com/tommyv1987))
- Reverted gateway registration handshake to its 0.11.0 version [\#882](https://github.com/nymtech/nym/pull/882) ([jstuczyn](https://github.com/jstuczyn))
- Network Explorer [\#881](https://github.com/nymtech/nym/pull/881) ([mmsinclair](https://github.com/mmsinclair))
- Feature/rewarding interval updates [\#880](https://github.com/nymtech/nym/pull/880) ([jstuczyn](https://github.com/jstuczyn))
- Put client\_address and id in the correct order [\#875](https://github.com/nymtech/nym/pull/875) ([neacsu](https://github.com/neacsu))
- remove gateway selection on delegation and undelegation pages [\#873](https://github.com/nymtech/nym/pull/873) ([fmtabbara](https://github.com/fmtabbara))
- Set MSRV on all binaries to 1.56 [\#872](https://github.com/nymtech/nym/pull/872) ([jstuczyn](https://github.com/jstuczyn))
- add native window items \(copy/paste\) via tauri [\#871](https://github.com/nymtech/nym/pull/871) ([fmtabbara](https://github.com/fmtabbara))
- Remove stale migration code [\#868](https://github.com/nymtech/nym/pull/868) ([neacsu](https://github.com/neacsu))
- Fixed most recent nightly clippy warnings [\#865](https://github.com/nymtech/nym/pull/865) ([jstuczyn](https://github.com/jstuczyn))
- Active sets =\> Rewarded + Active/Idle sets [\#864](https://github.com/nymtech/nym/pull/864) ([jstuczyn](https://github.com/jstuczyn))
- Chore/cosmrs update [\#862](https://github.com/nymtech/nym/pull/862) ([jstuczyn](https://github.com/jstuczyn))
- Made daily uptime calculation be independent of epoch rewarding [\#860](https://github.com/nymtech/nym/pull/860) ([jstuczyn](https://github.com/jstuczyn))
- Removed epoch rewarding variance [\#857](https://github.com/nymtech/nym/pull/857) ([jstuczyn](https://github.com/jstuczyn))
- Removed gateway rewarding and delegation [\#856](https://github.com/nymtech/nym/pull/856) ([jstuczyn](https://github.com/jstuczyn))
- Update feature-request template [\#855](https://github.com/nymtech/nym/pull/855) ([tommyv1987](https://github.com/tommyv1987))
- Update issue templates [\#854](https://github.com/nymtech/nym/pull/854) ([tommyv1987](https://github.com/tommyv1987))
- Overflow checks in release [\#846](https://github.com/nymtech/nym/pull/846) ([jstuczyn](https://github.com/jstuczyn))
- fix delegate success overflow [\#842](https://github.com/nymtech/nym/pull/842) ([fmtabbara](https://github.com/fmtabbara))
- Feature NYM wallet webdriverio test [\#841](https://github.com/nymtech/nym/pull/841) ([tommyv1987](https://github.com/tommyv1987))
- Update nym\_wallet.yml [\#840](https://github.com/nymtech/nym/pull/840) ([tommyv1987](https://github.com/tommyv1987))
- Feature/vouchers [\#837](https://github.com/nymtech/nym/pull/837) ([aniampio](https://github.com/aniampio))
- Apply readable ids to elements on Nym Wallet [\#836](https://github.com/nymtech/nym/pull/836) ([tommyv1987](https://github.com/tommyv1987))
- Feature/removal of monitor good nodes [\#833](https://github.com/nymtech/nym/pull/833) ([jstuczyn](https://github.com/jstuczyn))
- Feature/bandwidth token [\#832](https://github.com/nymtech/nym/pull/832) ([neacsu](https://github.com/neacsu))
- update app name and icons [\#831](https://github.com/nymtech/nym/pull/831) ([fmtabbara](https://github.com/fmtabbara))
- Create nym-wallet-tests.yml [\#829](https://github.com/nymtech/nym/pull/829) ([tommyv1987](https://github.com/tommyv1987))
- Updated CODEOWNERS [\#828](https://github.com/nymtech/nym/pull/828) ([jstuczyn](https://github.com/jstuczyn))
- Tauri wallet [\#827](https://github.com/nymtech/nym/pull/827) ([fmtabbara](https://github.com/fmtabbara))
- Flag to only run coconut-related functionalities [\#824](https://github.com/nymtech/nym/pull/824) ([jstuczyn](https://github.com/jstuczyn))
- Change false to true, as for mixnodes [\#822](https://github.com/nymtech/nym/pull/822) ([neacsu](https://github.com/neacsu))
- Feature locked client-side bandwidth metering [\#820](https://github.com/nymtech/nym/pull/820) ([jstuczyn](https://github.com/jstuczyn))
- Fixed most recent nightly clippy warnings [\#817](https://github.com/nymtech/nym/pull/817) ([jstuczyn](https://github.com/jstuczyn))
- Feature/resending rewards on timeout [\#810](https://github.com/nymtech/nym/pull/810) ([jstuczyn](https://github.com/jstuczyn))
- Feature/coconut feature [\#805](https://github.com/nymtech/nym/pull/805) ([jstuczyn](https://github.com/jstuczyn))
- Tokenomics rewards [\#802](https://github.com/nymtech/nym/pull/802) ([durch](https://github.com/durch))
- Rocket picking up environment from Rocket.toml again [\#801](https://github.com/nymtech/nym/pull/801) ([jstuczyn](https://github.com/jstuczyn))
- Remove migration code [\#796](https://github.com/nymtech/nym/pull/796) ([neacsu](https://github.com/neacsu))
- Removes code of executed migrations [\#793](https://github.com/nymtech/nym/pull/793) ([jstuczyn](https://github.com/jstuczyn))
- Bugfix/validator api windows build [\#791](https://github.com/nymtech/nym/pull/791) ([jstuczyn](https://github.com/jstuczyn))
- Removed SQLx offline mode artifact [\#790](https://github.com/nymtech/nym/pull/790) ([jstuczyn](https://github.com/jstuczyn))
- Created getters for AccountData [\#787](https://github.com/nymtech/nym/pull/787) ([jstuczyn](https://github.com/jstuczyn))
- Feature/migrate hidden delegations [\#786](https://github.com/nymtech/nym/pull/786) ([neacsu](https://github.com/neacsu))
- Feature/persistent gateway storage [\#784](https://github.com/nymtech/nym/pull/784) ([jstuczyn](https://github.com/jstuczyn))
- Replaced unwrap\_or\_else with unwrap\_or\_default [\#780](https://github.com/nymtech/nym/pull/780) ([jstuczyn](https://github.com/jstuczyn))
- Add block\_height method to Delegation [\#778](https://github.com/nymtech/nym/pull/778) ([durch](https://github.com/durch))
- Make fee helpers public [\#777](https://github.com/nymtech/nym/pull/777) ([durch](https://github.com/durch))
- re-enable bonding [\#776](https://github.com/nymtech/nym/pull/776) ([fmtabbara](https://github.com/fmtabbara))
- Explorer-api: add API resource to show the delegations for each mix node [\#774](https://github.com/nymtech/nym/pull/774) ([mmsinclair](https://github.com/mmsinclair))
- add app alert [\#772](https://github.com/nymtech/nym/pull/772) ([fmtabbara](https://github.com/fmtabbara))
- Migrate legacy delegation data [\#771](https://github.com/nymtech/nym/pull/771) ([durch](https://github.com/durch))
- Adding deps for building the Tauri wallet under Ubuntu [\#770](https://github.com/nymtech/nym/pull/770) ([futurechimp](https://github.com/futurechimp))
- remove alert [\#767](https://github.com/nymtech/nym/pull/767) ([fmtabbara](https://github.com/fmtabbara))
- Feature/consumable bandwidth [\#766](https://github.com/nymtech/nym/pull/766) ([neacsu](https://github.com/neacsu))
- Update coconut-rs and use hash\_to\_scalar from there [\#765](https://github.com/nymtech/nym/pull/765) ([neacsu](https://github.com/neacsu))
- Feature/active sets [\#764](https://github.com/nymtech/nym/pull/764) ([jstuczyn](https://github.com/jstuczyn))
- add app alert banner [\#762](https://github.com/nymtech/nym/pull/762) ([fmtabbara](https://github.com/fmtabbara))
- Updated cosmos-sdk [\#761](https://github.com/nymtech/nym/pull/761) ([jstuczyn](https://github.com/jstuczyn))
- Feature/bond blockstamp [\#760](https://github.com/nymtech/nym/pull/760) ([neacsu](https://github.com/neacsu))
- Feature/revert migration code [\#759](https://github.com/nymtech/nym/pull/759) ([neacsu](https://github.com/neacsu))
- Bump next from 11.1.0 to 11.1.1 in /wallet-web [\#758](https://github.com/nymtech/nym/pull/758) ([dependabot[bot]](https://github.com/apps/dependabot))
- Add block\_height in the Delegation structure as well [\#757](https://github.com/nymtech/nym/pull/757) ([neacsu](https://github.com/neacsu))
- Feature/add blockstamp [\#756](https://github.com/nymtech/nym/pull/756) ([neacsu](https://github.com/neacsu))
- NetworkMonitorBuilder - starting the monitor after rocket has launched [\#754](https://github.com/nymtech/nym/pull/754) ([jstuczyn](https://github.com/jstuczyn))
- Enabled validators api argument [\#753](https://github.com/nymtech/nym/pull/753) ([jstuczyn](https://github.com/jstuczyn))
- Correctly bounding nominator of uptime calculation [\#752](https://github.com/nymtech/nym/pull/752) ([jstuczyn](https://github.com/jstuczyn))
- Fixed argument parsing for ipv6 'good' topology [\#751](https://github.com/nymtech/nym/pull/751) ([jstuczyn](https://github.com/jstuczyn))
- Feature/rust rewarding [\#750](https://github.com/nymtech/nym/pull/750) ([jstuczyn](https://github.com/jstuczyn))
- Revert "Migration commit, will be reverted after the testnet contract… [\#749](https://github.com/nymtech/nym/pull/749) ([neacsu](https://github.com/neacsu))
- Feature/get own delegations [\#748](https://github.com/nymtech/nym/pull/748) ([neacsu](https://github.com/neacsu))
- Feature/more reliable uptime calculation [\#747](https://github.com/nymtech/nym/pull/747) ([jstuczyn](https://github.com/jstuczyn))
- Update template toml key [\#746](https://github.com/nymtech/nym/pull/746) ([neacsu](https://github.com/neacsu))
- Feature/cred after handshake [\#745](https://github.com/nymtech/nym/pull/745) ([neacsu](https://github.com/neacsu))
- Reinstate the POST method blind\_sign [\#744](https://github.com/nymtech/nym/pull/744) ([neacsu](https://github.com/neacsu))
- explorer-api: add pending field to port check response [\#742](https://github.com/nymtech/nym/pull/742) ([mmsinclair](https://github.com/mmsinclair))
- Feature/use delegation rates [\#741](https://github.com/nymtech/nym/pull/741) ([neacsu](https://github.com/neacsu))
- Feature/copy to clipboard [\#740](https://github.com/nymtech/nym/pull/740) ([fmtabbara](https://github.com/fmtabbara))
- Feature/update wallet with stake rates [\#739](https://github.com/nymtech/nym/pull/739) ([neacsu](https://github.com/neacsu))
- Add stake reward rates and bump version of client [\#738](https://github.com/nymtech/nym/pull/738) ([neacsu](https://github.com/neacsu))
- Bump next from 10.1.3 to 11.1.0 in /wallet-web [\#737](https://github.com/nymtech/nym/pull/737) ([dependabot[bot]](https://github.com/apps/dependabot))
- Feature/nymd client integration [\#736](https://github.com/nymtech/nym/pull/736) ([jstuczyn](https://github.com/jstuczyn))
- Bug/fix parking lot on wasm [\#735](https://github.com/nymtech/nym/pull/735) ([neacsu](https://github.com/neacsu))
- Explorer API: add new HTTP resource to decorate mix nodes with geoip locations [\#734](https://github.com/nymtech/nym/pull/734) ([mmsinclair](https://github.com/mmsinclair))
- Feature/completing nymd client api [\#732](https://github.com/nymtech/nym/pull/732) ([jstuczyn](https://github.com/jstuczyn))
- Explorer API - add port check and node description/stats proxy [\#731](https://github.com/nymtech/nym/pull/731) ([mmsinclair](https://github.com/mmsinclair))
- Feature/nymd client fee handling [\#730](https://github.com/nymtech/nym/pull/730) ([jstuczyn](https://github.com/jstuczyn))
- Update DelegationCheck.tsx [\#725](https://github.com/nymtech/nym/pull/725) ([jessgess](https://github.com/jessgess))
- Rust nymd/cosmwasm client [\#724](https://github.com/nymtech/nym/pull/724) ([jstuczyn](https://github.com/jstuczyn))
- Removed wasm feature bypassing cyclic dependencies [\#723](https://github.com/nymtech/nym/pull/723) ([jstuczyn](https://github.com/jstuczyn))
- Updated used sphinx dependency to the most recent revision [\#722](https://github.com/nymtech/nym/pull/722) ([jstuczyn](https://github.com/jstuczyn))
- update state management and validation [\#721](https://github.com/nymtech/nym/pull/721) ([fmtabbara](https://github.com/fmtabbara))
- Add Network Explorer API [\#720](https://github.com/nymtech/nym/pull/720) ([futurechimp](https://github.com/futurechimp))
- Feature/superbuild [\#719](https://github.com/nymtech/nym/pull/719) ([jstuczyn](https://github.com/jstuczyn))
- remove console log [\#718](https://github.com/nymtech/nym/pull/718) ([fmtabbara](https://github.com/fmtabbara))
- Bug/form validation [\#715](https://github.com/nymtech/nym/pull/715) ([fmtabbara](https://github.com/fmtabbara))
- Warnings with identities of good nodes failing checks [\#714](https://github.com/nymtech/nym/pull/714) ([jstuczyn](https://github.com/jstuczyn))
- Removed all sphinx key caching from mixnodes and gateways [\#713](https://github.com/nymtech/nym/pull/713) ([jstuczyn](https://github.com/jstuczyn))
- Feature/receive coins page + UI tweaks [\#704](https://github.com/nymtech/nym/pull/704) ([fmtabbara](https://github.com/fmtabbara))
- Allow users to sign out [\#703](https://github.com/nymtech/nym/pull/703) ([fmtabbara](https://github.com/fmtabbara))
- Feature/docker improvements [\#702](https://github.com/nymtech/nym/pull/702) ([neacsu](https://github.com/neacsu))
- Exposed API port on the validator [\#701](https://github.com/nymtech/nym/pull/701) ([jstuczyn](https://github.com/jstuczyn))
- Feature/default values [\#700](https://github.com/nymtech/nym/pull/700) ([neacsu](https://github.com/neacsu))
- Cleaned up dependencies of our typescript client [\#699](https://github.com/nymtech/nym/pull/699) ([jstuczyn](https://github.com/jstuczyn))
- Bond and delegation alerts [\#698](https://github.com/nymtech/nym/pull/698) ([fmtabbara](https://github.com/fmtabbara))
- Bugfix/network monitor version check [\#697](https://github.com/nymtech/nym/pull/697) ([jstuczyn](https://github.com/jstuczyn))
- Feature/other containers [\#692](https://github.com/nymtech/nym/pull/692) ([neacsu](https://github.com/neacsu))
- Using validator API instead of nymd [\#690](https://github.com/nymtech/nym/pull/690) ([futurechimp](https://github.com/futurechimp))
- Hang coconut issuance off the validator-api [\#679](https://github.com/nymtech/nym/pull/679) ([durch](https://github.com/durch))
- Update hmac and blake3 [\#673](https://github.com/nymtech/nym/pull/673) ([durch](https://github.com/durch))
Generated
+4099 -808
View File
File diff suppressed because it is too large Load Diff
+19 -10
View File
@@ -4,28 +4,35 @@
[profile.release]
panic = "abort"
opt-level = "s"
overflow-checks = true
[profile.dev]
panic = "abort"
[workspace]
resolver = "2"
members = [
"clients/client-core",
"clients/native",
"clients/native/websocket-requests",
"clients/socks5",
"clients/webassembly",
"clients/client-core",
# "clients/tauri-client/src-tauri",
"common/client-libs/gateway-client",
"common/client-libs/metrics-client",
"common/client-libs/mixnet-client",
"common/client-libs/validator-client",
"common/client-libs/validator-client-rest",
"common/coconut-interface",
"common/config",
"common/credentials",
"common/crypto",
"common/mixnet-contract",
"common/bandwidth-claim-contract",
"common/cosmwasm-smart-contracts/contracts-common",
"common/cosmwasm-smart-contracts/mixnet-contract",
"common/cosmwasm-smart-contracts/vesting-contract",
"common/mixnode-common",
"common/network-defaults",
"common/nonexhaustive-delayqueue",
"common/nymcoconut",
"common/nymsphinx",
"common/nymsphinx/acknowledgements",
"common/nymsphinx/addressing",
@@ -37,25 +44,27 @@ members = [
"common/nymsphinx/params",
"common/nymsphinx/types",
"common/pemstore",
"common/socks5/requests",
"common/socks5/proxy-helpers",
"common/socks5/requests",
"common/topology",
"common/wasm-utils",
"explorer-api",
"gateway",
"gateway/gateway-requests",
"mixnode",
"network-monitor",
"service-providers/network-requester",
"validator-api",
"validator-api/validator-api-requests",
]
default-members = [
"clients/native",
"clients/socks5",
# "clients/webassembly",
"gateway",
"service-providers/network-requester",
"mixnode",
"network-monitor",
"validator-api",
"explorer-api",
]
exclude = ["explorer"]
exclude = ["explorer", "contracts", "tokenomics-py", "clients/webassembly"]
+56
View File
@@ -0,0 +1,56 @@
test: build clippy-all cargo-test wasm fmt
no-clippy: build cargo-test wasm fmt
happy: fmt clippy-happy test
clippy-all: clippy-all-main clippy-all-contracts clippy-all-wallet
clippy-happy: clippy-happy-main clippy-happy-contracts clippy-happy-wallet
cargo-test: test-main test-contracts test-wallet
build: build-contracts build-wallet build-main
fmt: fmt-main fmt-contracts fmt-wallet
clippy-happy-main:
cargo clippy
clippy-happy-contracts:
cargo clippy --manifest-path contracts/Cargo.toml --target wasm32-unknown-unknown
clippy-happy-wallet:
cargo clippy --manifest-path nym-wallet/Cargo.toml
clippy-all-main:
cargo clippy --workspace --all-features -- -D warnings
clippy-all-contracts:
cargo clippy --workspace --manifest-path contracts/Cargo.toml --all-features --target wasm32-unknown-unknown -- -D warnings
clippy-all-wallet:
cargo clippy --workspace --manifest-path nym-wallet/Cargo.toml --all-features -- -D warnings
test-main:
cargo test --all-features --workspace
test-contracts:
cargo test --manifest-path contracts/Cargo.toml --all-features
test-wallet:
cargo test --manifest-path nym-wallet/Cargo.toml --all-features
build-main:
cargo build --workspace
build-contracts:
cargo build --manifest-path contracts/Cargo.toml --workspace
build-wallet:
cargo build --manifest-path nym-wallet/Cargo.toml --workspace
fmt-main:
cargo fmt --all
fmt-contracts:
cargo fmt --manifest-path contracts/Cargo.toml --all
fmt-wallet:
cargo fmt --manifest-path nym-wallet/Cargo.toml --all
wasm:
RUSTFLAGS='-C link-arg=-s' cargo build --manifest-path contracts/Cargo.toml --release --target wasm32-unknown-unknown
+45 -3
View File
@@ -5,8 +5,6 @@ SPDX-License-Identifier: Apache-2.0
## The Nym Privacy Platform
This repository contains the Nym mixnet.
The platform is composed of multiple Rust crates. Top-level executable binary crates include:
* nym-mixnode - shuffles [Sphinx](https://github.com/nymtech/sphinx) packets together to provide privacy against network-level attackers.
@@ -15,6 +13,7 @@ The platform is composed of multiple Rust crates. Top-level executable binary cr
* nym-gateway - acts sort of like a mailbox for mixnet messages, removing the need for directly delivery to potentially offline or firewalled devices.
* nym-network-monitor - sends packets through the full system to check that they are working as expected, and stores node uptime histories as the basis of a rewards system ("mixmining" or "proof-of-mixing").
* nym-explorer - a (projected) block explorer and (existing) mixnet viewer.
* nym-wallet - a desktop wallet implemented using the [Tauri](https://tauri.studio/en/docs/about/intro) framework.
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge)](https://opensource.org/licenses/Apache-2.0)
[![Build Status](https://img.shields.io/github/workflow/status/nymtech/nym/Continuous%20integration/develop?style=for-the-badge&logo=github-actions)](https://github.com/nymtech/nym/actions?query=branch%3Adevelop)
@@ -22,16 +21,59 @@ The platform is composed of multiple Rust crates. Top-level executable binary cr
### Building
Platform build instructions are available on [our docs site](https://nymtech.net/docs).
Platform build instructions are available on [our docs site](https://nymtech.net/docs/stable/run-nym-nodes/build-nym).
Wallet build instructions are also available on [our docs site](https://nymtech.net/docs/stable/nym-apps/wallet#for-developers).
### Developing
There's a `.env.sample-dev` file provided which you can rename to `.env` if you want convenient logging, backtrace, or other environment variables pre-set. The `.env` file is ignored so you don't need to worry about checking it in.
For Typescript components, please see [ts-packages](./ts-packages).
### Developer chat
You can chat to us in [Keybase](https://keybase.io). Download their chat app, then click **Teams -> Join a team**. Type **nymtech.friends** into the team name and hit **continue**. For general chat, hang out in the **#general** channel. Our development takes places in the **#dev** channel. Node operators should be in the **#node-operators** channel.
### Rewards
Node, node operator and delegator rewards are determined according to the principles laid out in the section 6 of [Nym Whitepaper](https://nymtech.net/nym-whitepaper.pdf). Below is a TLDR of the variables and formulas involved in calculating the epoch rewards. Initial reward pool is set to 250 million Nym, making the circulating supply 750 million Nym.
|Symbol|Definition|
|---|---|
|<img src="https://render.githubusercontent.com/render/math?math=R">|global share of rewards available, starts at 2% of the reward pool.
|<img src="https://render.githubusercontent.com/render/math?math=R_{i}">|node reward for mixnode `i`.
|<img src="https://render.githubusercontent.com/render/math?math=\sigma_{i}">|ratio of total node stake (node bond + all delegations) to the token circulating supply.
|<img src="https://render.githubusercontent.com/render/math?math=\lambda_{i}">|ratio of stake operator has pledged to their node to the token circulating supply.
|<img src="https://render.githubusercontent.com/render/math?math=\omega_{i}">|fraction of total effort undertaken by node `i`, set to `1/k`.
|<img src="https://render.githubusercontent.com/render/math?math=k">|number of nodes stakeholders are incentivised to create, set by the validators, a matter of governance. Currently determined by the `reward set` size, and set to 720 in testnet Sandbox.
|<img src="https://render.githubusercontent.com/render/math?math=\alpha">|Sybil attack resistance parameter - the higher this parameter is set the stronger the reduction in competitivness gets for a Sybil attacker.
|<img src="https://render.githubusercontent.com/render/math?math=PM_{i}">|declared profit margin of operator `i`, defaults to 10% in.
|<img src="https://render.githubusercontent.com/render/math?math=PF_{i}">|uptime of node `i`, scaled to 0 - 1, for the rewarding epoch
|<img src="https://render.githubusercontent.com/render/math?math=PP_{i}">|cost of operating node `i` for the duration of the rewarding eopoch, set to 40 NYMT.
Node reward for node `i` is determined as:
<img src="https://render.githubusercontent.com/render/math?math=R_{i}=PF_{i} \cdot R \cdot (\sigma^'_{i} \cdot \omega_{i} \cdot k %2b \alpha \cdot \lambda^'_{i} \cdot \sigma^'_{i} \cdot k)/(1 %2b \alpha)">
where:
<img src="https://render.githubusercontent.com/render/math?math=\sigma^'_{i} = min\{\sigma_{i}, 1/k\}">
and
<img src="https://render.githubusercontent.com/render/math?math=\lambda^'_{i} = min\{\lambda_{i}, 1/k\}">
Operator of node `i` is credited with the following amount:
<img src="https://render.githubusercontent.com/render/math?math=min\{PP_{i},R_{i})\} %2b max\{0, (PM_{i} %2b (1 - PM_{i}) \cdot \lambda_{i}/\delta_{i}) \cdot (R_{i} - PP_{i})\}">
Delegate with stake `s` recieves:
<img src="https://render.githubusercontent.com/render/math?math=max\{0, (1-PM_{i}) \cdot (s^'/\sigma_{i}) \cdot (R_{i} - PP_{i})\}">
where `s'` is stake `s` scaled over total token circulating supply.
### Licensing and copyright information
This program is available as open source under the terms of the Apache 2.0 license. However, some elements are being licensed under CC0-1.0 and MIT. For accurate information, please check individual files.
+12
View File
@@ -0,0 +1,12 @@
# Shared assets
This directory contains asset files shared by many projects in this repo.
You will find:
- favicons
- logos
- shared fonts
- shared icon SVGs
See [ts-packages/react-webpack-with-theme-example](../ts-packages/react-webpack-with-theme-example) for examples of usage.
Binary file not shown.

After

Width:  |  Height:  |  Size: 545 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

+10
View File
@@ -0,0 +1,10 @@
<svg width="64" height="64" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M40 78.5C61.263 78.5 78.5 61.263 78.5 40C78.5 18.737 61.263 1.5 40 1.5C18.737 1.5 1.5 18.737 1.5 40C1.5 61.263 18.737 78.5 40 78.5Z" fill="#070B15" stroke="url(#paint0_linear_0_1)" stroke-width="3"/>
<path d="M31.4894 27.56L41.8623 56H48.5106H56V24H48.5106V52.4L38.1777 24H31.4894H24V56H31.4894V27.56Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear_0_1" x1="0.839161" y1="80" x2="80" y2="80" gradientUnits="userSpaceOnUse">
<stop offset="0.09375" stop-color="#FB6E4E"/>
<stop offset="1" stop-color="#F51473"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
@font-face {
font-family: 'Open Sans';
src: url('./OpenSans-VariableFont_wdth,wght.ttf') format('truetype-variations'),
url('./OpenSans-Italic-VariableFont_wdth,wght.ttf') format('truetype-variations');
font-weight: 100 1000;
}
+10
View File
@@ -0,0 +1,10 @@
<svg width="64" height="64" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M40 78.5C61.263 78.5 78.5 61.263 78.5 40C78.5 18.737 61.263 1.5 40 1.5C18.737 1.5 1.5 18.737 1.5 40C1.5 61.263 18.737 78.5 40 78.5Z" fill="#070B15" stroke="url(#paint0_linear_0_1)" stroke-width="3"/>
<path d="M31.4894 27.56L41.8623 56H48.5106H56V24H48.5106V52.4L38.1777 24H31.4894H24V56H31.4894V27.56Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear_0_1" x1="0.839161" y1="80" x2="80" y2="80" gradientUnits="userSpaceOnUse">
<stop offset="0.09375" stop-color="#FB6E4E"/>
<stop offset="1" stop-color="#F51473"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 714 B

+13
View File
@@ -0,0 +1,13 @@
<svg width="300" height="300" viewBox="0 0 296 296" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M148 296C229.738 296 296 229.738 296 148C296 66.2619 229.738 0 148 0C66.2619 0 0 66.2619 0 148C0 229.738 66.2619 296 148 296Z" fill="url(#paint0_linear_113_1244)"/>
<path d="M148 285.875C224.147 285.875 285.875 224.146 285.875 148C285.875 71.8536 224.147 10.1248 148 10.1248C71.8538 10.1248 10.125 71.8536 10.125 148C10.125 224.146 71.8538 285.875 148 285.875Z" fill="#121725"/>
<path d="M88.8829 120.143H88.7169V120.281V168.637L68.3289 120.226L68.3012 120.143H68.1905H56.6272H43.653H43.5146V120.281V175.719V175.857H43.653H56.6272H56.7655V175.719V127.28L77.2365 175.774L77.2642 175.857H77.3748H88.8829H101.829H101.968V175.719V120.281V120.143H101.829H88.8829Z" fill="white"/>
<path d="M252.347 120.143H227.616H227.477L227.45 120.253L214.78 168.858L202.082 120.253L202.054 120.143H201.944H177.157H176.991V120.281V175.719V175.857H177.157H190.104H190.242V175.719V127.667L202.774 175.747L202.801 175.857H202.94H226.564H226.675L226.703 175.747L239.234 127.667V175.719V175.857H239.373H252.347H252.485V175.719V120.281V120.143H252.347Z" fill="white"/>
<path d="M155.663 120.143H155.58L155.552 120.198L139.812 147.557L123.988 120.198L123.96 120.143H123.877H108.911H108.635L108.773 120.364L133.145 162.579V175.719V175.857H133.283H146.257H146.396V175.719V162.579L170.767 120.364L170.905 120.143H170.629H155.663Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear_113_1244" x1="0" y1="148" x2="296" y2="148" gradientUnits="userSpaceOnUse">
<stop offset="0.09375" stop-color="#FB6E4E"/>
<stop offset="1" stop-color="#FC1D60"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

+5
View File
@@ -0,0 +1,5 @@
<svg width="210" height="56" viewBox="0 0 210 56" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M45.8829 0.142822H45.7169V0.28114V48.637L25.3289 0.225818L25.3012 0.142822H25.1905H13.6272H0.652966H0.514648V0.28114V55.7189V55.8572H0.652966H13.6272H13.7655V55.7189V7.28002L34.2365 55.7742L34.2642 55.8572H34.3748H45.8829H58.8294H58.9677V55.7189V0.28114V0.142822H58.8294H45.8829Z"/>
<path d="M209.347 0.142822H184.616H184.477L184.45 0.253483L171.78 48.8583L159.082 0.253483L159.054 0.142822H158.944H134.157H133.991V0.28114V55.7189V55.8572H134.157H147.104H147.242V55.7189V7.66731L159.774 55.7466L159.801 55.8572H159.94H183.564H183.675L183.703 55.7466L196.234 7.66731V55.7189V55.8572H196.373H209.347H209.485V55.7189V0.28114V0.142822H209.347Z"/>
<path d="M112.663 0.142822H112.58L112.552 0.198153L96.8116 27.5574L80.988 0.198153L80.9604 0.142822H80.8774H65.9114H65.6348L65.7731 0.364136L90.1447 42.5787V55.7189V55.8572H90.283H103.257H103.396V55.7189V42.5787L127.767 0.364136L127.905 0.142822H127.629H112.663Z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

+5
View File
@@ -0,0 +1,5 @@
<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M170.7 29.3001C131.7 -9.7999 68.3001 -9.7999 29.3001 29.3001C-9.7999 68.4001 -9.7999 131.7 29.3001 170.7C68.4001 209.8 131.7 209.8 170.7 170.7C209.8 131.7 209.8 68.3001 170.7 29.3001ZM162.1 162.1C127.8 196.4 72.1001 196.4 37.8001 162.1C3.5001 127.8 3.5001 72.1001 37.8001 37.8001C72.1001 3.5001 127.8 3.5001 162.1 37.8001C196.5 72.2001 196.5 127.8 162.1 162.1Z" fill="white"/>
<path d="M162.1 37.9C127.8 3.60005 72.1002 3.60005 37.8002 37.9C3.50019 72.2 3.50019 127.9 37.8002 162.2C72.1002 196.5 127.8 196.5 162.1 162.2C196.5 127.8 196.5 72.2 162.1 37.9ZM63.0002 170.7C56.8002 167.4 51.1002 163.2 46.1002 158.4V41.7C51.3002 36.7 57.2002 32.5 63.6002 29.1L137 140.9V29.3C143.2 32.6 148.9 36.8 153.9 41.6V158.3C148.7 163.3 142.8 167.5 136.4 170.9L63.0002 59.1V170.7Z" fill="#070B15"/>
<path d="M154 158.3V41.7C148.9 36.9 143.2 32.7 137.1 29.4V140.9L63.5 29C57.1 32.4 51.2 36.6 46 41.6V158.3C51.1 163.1 56.8 167.3 62.9 170.6V59.1L136.5 171C142.9 167.6 148.8 163.3 154 158.3Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+5
View File
@@ -0,0 +1,5 @@
<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M170.7 29.3001C131.7 -9.7999 68.3001 -9.7999 29.3001 29.3001C-9.7999 68.4001 -9.7999 131.7 29.3001 170.7C68.4001 209.8 131.7 209.8 170.7 170.7C209.8 131.7 209.8 68.3001 170.7 29.3001ZM162.1 162.1C127.8 196.4 72.1001 196.4 37.8001 162.1C3.5001 127.8 3.5001 72.1001 37.8001 37.8001C72.1001 3.5001 127.8 3.5001 162.1 37.8001C196.5 72.2001 196.5 127.8 162.1 162.1Z" fill="#141521"/>
<path d="M162.1 37.9C127.8 3.60005 72.1002 3.60005 37.8002 37.9C3.50019 72.2 3.50019 127.9 37.8002 162.2C72.1002 196.5 127.8 196.5 162.1 162.2C196.5 127.8 196.5 72.2 162.1 37.9ZM63.0002 170.7C56.8002 167.4 51.1002 163.2 46.1002 158.4V41.7C51.3002 36.7 57.2002 32.5 63.6002 29.1L137 140.9V29.3C143.2 32.6 148.9 36.8 153.9 41.6V158.3C148.7 163.3 142.8 167.5 136.4 170.9L63.0002 59.1V170.7Z" fill="white"/>
<path d="M154 158.3V41.7C148.9 36.9 143.2 32.7 137.1 29.4V140.9L63.5 29C57.1 32.4 51.2 36.6 46 41.6V158.3C51.1 163.1 56.8 167.3 62.9 170.6V59.1L136.5 171C142.9 167.6 148.8 163.3 154 158.3Z" fill="#141521"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+8 -4
View File
@@ -1,8 +1,8 @@
[package]
name = "client-core"
version = "0.10.0"
version = "1.0.0-rc.1"
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
edition = "2018"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -15,6 +15,7 @@ rand = { version = "0.7.3", features = ["wasm-bindgen"] }
serde = { version = "1.0", features = ["derive"] }
sled = "0.34"
tokio = { version = "1.4", features = ["macros"] }
url = { version ="2.2", features = ["serde"] }
# internal
config = { path = "../../common/config" }
@@ -25,7 +26,10 @@ nonexhaustive-delayqueue = { path = "../../common/nonexhaustive-delayqueue" }
nymsphinx = { path = "../../common/nymsphinx" }
pemstore = { path = "../../common/pemstore" }
topology = { path = "../../common/topology" }
validator-client-rest = { path = "../../common/client-libs/validator-client-rest" }
validator-client = { path = "../../common/client-libs/validator-client" }
[dev-dependencies]
tempfile = "3.1.0"
tempfile = "3.1.0"
[features]
coconut = []
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::client::mix_traffic::BatchMixMessageSender;
use crate::client::topology_control::TopologyAccessor;
@@ -24,7 +13,6 @@ use nymsphinx::utils::sample_poisson_duration;
use rand::{rngs::OsRng, CryptoRng, Rng};
use std::pin::Pin;
use std::sync::Arc;
use tokio::runtime::Handle;
use tokio::task::JoinHandle;
use tokio::time;
@@ -176,8 +164,8 @@ impl LoopCoverTrafficStream<OsRng> {
}
}
pub fn start(mut self, handle: &Handle) -> JoinHandle<()> {
handle.spawn(async move {
pub fn start(mut self) -> JoinHandle<()> {
tokio::spawn(async move {
self.run().await;
})
}
+9 -21
View File
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::config::persistence::key_pathfinder::ClientKeyPathfinder;
use crypto::asymmetric::{encryption, identity};
@@ -72,8 +61,8 @@ impl KeyManager {
// I have absolutely no idea why the compiler insists it's unused. The call happens during client::init::execute
#[allow(dead_code)]
/// After shared key with the gateway is derived, puts its ownership to this instance of a [`KeyManager`].
pub fn insert_gateway_shared_key(&mut self, gateway_shared_key: SharedKeys) {
self.gateway_shared_key = Some(Arc::new(gateway_shared_key))
pub fn insert_gateway_shared_key(&mut self, gateway_shared_key: Arc<SharedKeys>) {
self.gateway_shared_key = Some(gateway_shared_key)
}
/// Loads previously stored keys from the disk.
@@ -90,9 +79,9 @@ impl KeyManager {
))?;
let gateway_shared_key: SharedKeys =
pemstore::load_key(&client_pathfinder.gateway_shared_key().to_owned())?;
pemstore::load_key(client_pathfinder.gateway_shared_key())?;
let ack_key: AckKey = pemstore::load_key(&client_pathfinder.ack_key().to_owned())?;
let ack_key: AckKey = pemstore::load_key(client_pathfinder.ack_key())?;
// TODO: ack key is never stored so it is generated now. But perhaps it should be stored
// after all for consistency sake?
@@ -127,12 +116,12 @@ impl KeyManager {
),
)?;
pemstore::store_key(self.ack_key.as_ref(), &client_pathfinder.ack_key())?;
pemstore::store_key(self.ack_key.as_ref(), client_pathfinder.ack_key())?;
match self.gateway_shared_key.as_ref() {
None => warn!("No gateway shared key available to store!"),
Some(gate_key) => {
pemstore::store_key(gate_key.as_ref(), &client_pathfinder.gateway_shared_key())?
pemstore::store_key(gate_key.as_ref(), client_pathfinder.gateway_shared_key())?
}
}
@@ -154,8 +143,7 @@ impl KeyManager {
// hence it's up to us to ensure it's called in correct context
pub fn gateway_shared_key(&self) -> Arc<SharedKeys> {
Arc::clone(
&self
.gateway_shared_key
self.gateway_shared_key
.as_ref()
.expect("tried to unwrap empty gateway key!"),
)
+6 -18
View File
@@ -1,23 +1,11 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use futures::channel::mpsc;
use futures::StreamExt;
use gateway_client::GatewayClient;
use log::*;
use nymsphinx::forwarding::packet::MixPacket;
use tokio::runtime::Handle;
use tokio::task::JoinHandle;
pub type BatchMixMessageSender = mpsc::UnboundedSender<Vec<MixPacket>>;
@@ -51,7 +39,7 @@ impl MixTrafficController {
async fn on_messages(&mut self, mut mix_packets: Vec<MixPacket>) {
debug_assert!(!mix_packets.is_empty());
let success = if mix_packets.len() == 1 {
let result = if mix_packets.len() == 1 {
let mix_packet = mix_packets.pop().unwrap();
self.gateway_client.send_mix_packet(mix_packet).await
} else {
@@ -60,7 +48,7 @@ impl MixTrafficController {
.await
};
match success {
match result {
Err(e) => {
error!("Failed to send sphinx packet(s) to the gateway! - {:?}", e);
self.consecutive_gateway_failure_count += 1;
@@ -83,8 +71,8 @@ impl MixTrafficController {
}
}
pub fn start(mut self, handle: &Handle) -> JoinHandle<()> {
handle.spawn(async move {
pub fn start(mut self) -> JoinHandle<()> {
tokio::spawn(async move {
self.run().await;
})
}
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use super::action_controller::{Action, ActionSender};
use futures::StreamExt;
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use super::PendingAcknowledgement;
use crate::client::real_messages_control::acknowledgement_control::RetransmissionRequestSender;
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use super::action_controller::{Action, ActionSender};
use super::PendingAcknowledgement;
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use self::{
acknowledgement_listener::AcknowledgementListener, action_controller::ActionController,
@@ -24,7 +13,6 @@ use crate::client::{inbound_messages::InputMessageReceiver, topology_control::To
use futures::channel::mpsc;
use gateway_client::AcknowledgementReceiver;
use log::*;
use nymsphinx::params::PacketMode;
use nymsphinx::{
acknowledgements::AckKey,
addressing::clients::Recipient,
@@ -131,14 +119,6 @@ pub(super) struct Config {
/// Average delay a data packet is going to get delayed at a single mixnode.
average_packet_delay: Duration,
/// Mode of all mix packets created - VPN or Mix. They indicate whether packets should get delayed
/// and keys reused.
packet_mode: PacketMode,
/// If the mode of the client is set to VPN it specifies number of packets created with the
/// same initial secret until it gets rotated.
vpn_key_reuse_limit: Option<usize>,
}
impl Config {
@@ -147,16 +127,12 @@ impl Config {
ack_wait_multiplier: f64,
average_ack_delay: Duration,
average_packet_delay: Duration,
packet_mode: PacketMode,
vpn_key_reuse_limit: Option<usize>,
) -> Self {
Config {
ack_wait_addition,
ack_wait_multiplier,
average_ack_delay,
average_packet_delay,
packet_mode,
vpn_key_reuse_limit,
}
}
}
@@ -197,8 +173,6 @@ where
ack_recipient,
config.average_packet_delay,
config.average_ack_delay,
config.packet_mode,
config.vpn_key_reuse_limit,
);
// will listen for any acks coming from the network
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use super::action_controller::{Action, ActionSender};
use super::PendingAcknowledgement;
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use super::action_controller::{Action, ActionSender};
use super::SentPacketNotificationReceiver;
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
// INPUT: InputMessage from user
// INPUT2: Acks from mix
@@ -30,11 +19,9 @@ use gateway_client::AcknowledgementReceiver;
use log::*;
use nymsphinx::acknowledgements::AckKey;
use nymsphinx::addressing::clients::Recipient;
use nymsphinx::params::PacketMode;
use rand::{rngs::OsRng, CryptoRng, Rng};
use std::sync::Arc;
use std::time::Duration;
use tokio::runtime::Handle;
use tokio::task::JoinHandle;
mod acknowledgement_control;
@@ -62,20 +49,9 @@ pub struct Config {
/// Average delay an acknowledgement packet is going to get delayed at a single mixnode.
average_ack_delay_duration: Duration,
/// Mode of all mix packets created - VPN or Mix. They indicate whether packets should get delayed
/// and keys reused.
packet_mode: PacketMode,
/// If the mode of the client is set to VPN it specifies number of packets created with the
/// same initial secret until it gets rotated.
vpn_key_reuse_limit: Option<usize>,
}
impl Config {
// at this point I'm not entirely sure how to deal with this warning without
// some considerable refactoring
#[allow(clippy::too_many_arguments)]
pub fn new(
ack_key: Arc<AckKey>,
ack_wait_multiplier: f64,
@@ -84,8 +60,6 @@ impl Config {
average_message_sending_delay: Duration,
average_packet_delay_duration: Duration,
self_recipient: Recipient,
packet_mode: PacketMode,
vpn_key_reuse_limit: Option<usize>,
) -> Self {
Config {
ack_key,
@@ -95,8 +69,6 @@ impl Config {
average_message_sending_delay,
average_packet_delay_duration,
average_ack_delay_duration,
packet_mode,
vpn_key_reuse_limit,
}
}
}
@@ -137,8 +109,6 @@ impl RealMessagesController<OsRng> {
config.ack_wait_multiplier,
config.average_ack_delay_duration,
config.average_packet_delay_duration,
config.packet_mode,
config.vpn_key_reuse_limit,
);
let ack_control = AcknowledgementController::new(
@@ -174,7 +144,7 @@ impl RealMessagesController<OsRng> {
}
}
pub(super) async fn run(&mut self, vpn_mode: bool) {
pub(super) async fn run(&mut self) {
let mut out_queue_control = self.out_queue_control.take().unwrap();
let mut ack_control = self.ack_control.take().unwrap();
@@ -182,7 +152,7 @@ impl RealMessagesController<OsRng> {
// the task to ever finish. This will of course change once we introduce
// graceful shutdowns.
let out_queue_control_fut = tokio::spawn(async move {
out_queue_control.run_out_queue_control(vpn_mode).await;
out_queue_control.run_out_queue_control().await;
error!("The out queue controller has finished execution!");
out_queue_control
});
@@ -199,11 +169,9 @@ impl RealMessagesController<OsRng> {
self.ack_control = Some(ack_control_fut.await.unwrap());
}
// &Handle is only passed for consistency sake with other client modules, but I think
// when we get to refactoring, we should apply gateway approach and make it implicit
pub fn start(mut self, handle: &Handle, vpn_mode: bool) -> JoinHandle<Self> {
handle.spawn(async move {
self.run(vpn_mode).await;
pub fn start(mut self) -> JoinHandle<Self> {
tokio::spawn(async move {
self.run().await;
self
})
}
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::client::mix_traffic::BatchMixMessageSender;
use crate::client::real_messages_control::acknowledgement_control::SentPacketNotificationSender;
@@ -260,15 +249,6 @@ where
tokio::task::yield_now().await;
}
async fn on_batch_received(&mut self, real_messages: Vec<RealMessage>) {
let mut mix_packets = Vec::with_capacity(real_messages.len());
for real_message in real_messages.into_iter() {
self.sent_notify(real_message.fragment_id);
mix_packets.push(real_message.mix_packet);
}
self.mix_tx.unbounded_send(mix_packets).unwrap();
}
// Send messages at certain rate and if no real traffic is available, send cover message.
async fn run_normal_out_queue(&mut self) {
// we should set initial delay only when we actually start the stream
@@ -282,20 +262,8 @@ where
}
}
// Send real message as soon as it's available and don't inject ANY cover traffic.
async fn run_vpn_out_queue(&mut self) {
while let Some(next_messages) = self.real_receiver.next().await {
self.on_batch_received(next_messages).await
}
}
pub(crate) async fn run_out_queue_control(&mut self, vpn_mode: bool) {
if vpn_mode {
debug!("Starting out queue controller in vpn mode...");
self.run_vpn_out_queue().await
} else {
debug!("Starting out queue controller...");
self.run_normal_out_queue().await
}
pub(crate) async fn run_out_queue_control(&mut self) {
debug!("Starting out queue controller...");
self.run_normal_out_queue().await
}
}
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::client::reply_key_storage::ReplyKeyStorage;
use crypto::asymmetric::encryption;
@@ -26,7 +15,6 @@ use nymsphinx::params::{ReplySurbEncryptionAlgorithm, ReplySurbKeyDigestAlgorith
use nymsphinx::receiver::{MessageReceiver, MessageRecoveryError, ReconstructedMessage};
use std::collections::HashSet;
use std::sync::Arc;
use tokio::runtime::Handle;
use tokio::task::JoinHandle;
// Buffer Requests to say "hey, send any reconstructed messages to this channel"
@@ -196,7 +184,7 @@ impl ReceivedMessagesBuffer {
let zero_iv = stream_cipher::zero_iv::<ReplySurbEncryptionAlgorithm>();
let mut reply_msg = stream_cipher::decrypt::<ReplySurbEncryptionAlgorithm>(
&reply_key.inner(),
reply_key.inner(),
&zero_iv,
reply_ciphertext,
);
@@ -302,8 +290,8 @@ impl RequestReceiver {
}
}
fn start(mut self, handle: &Handle) -> JoinHandle<()> {
handle.spawn(async move {
fn start(mut self) -> JoinHandle<()> {
tokio::spawn(async move {
while let Some(request) = self.query_receiver.next().await {
match request {
ReceivedBufferMessage::ReceiverAnnounce(sender) => {
@@ -333,8 +321,8 @@ impl FragmentedMessageReceiver {
mixnet_packet_receiver,
}
}
fn start(mut self, handle: &Handle) -> JoinHandle<()> {
handle.spawn(async move {
fn start(mut self) -> JoinHandle<()> {
tokio::spawn(async move {
while let Some(new_messages) = self.mixnet_packet_receiver.next().await {
self.received_buffer.handle_new_received(new_messages).await;
}
@@ -366,9 +354,9 @@ impl ReceivedMessagesBufferController {
}
}
pub fn start(self, handle: &Handle) {
pub fn start(self) {
// TODO: should we do anything with JoinHandle(s) returned by start methods?
self.fragmented_message_receiver.start(handle);
self.request_receiver.start(handle);
self.fragmented_message_receiver.start();
self.request_receiver.start();
}
}
@@ -1,21 +1,10 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crypto::generic_array::typenum::Unsigned;
use log::*;
use nymsphinx::anonymous_replies::{
encryption_key::EncryptionKeyDigest, encryption_key::Unsigned, SurbEncryptionKey,
SurbEncryptionKeySize,
encryption_key::EncryptionKeyDigest, SurbEncryptionKey, SurbEncryptionKeySize,
};
use std::path::Path;
@@ -29,7 +18,7 @@ pub enum ReplyKeyStorageError {
/// Permanent storage for keys in all sent [`ReplySURB`]
///
/// Each sent out [`ReplySURB`] has a new key associated with it that is going to be used for
/// payload encryption. In order to decrypt whatever reply we receive, we need to know which
/// payload encryption. In order to -decrypt whatever reply we receive, we need to know which
/// key to use for that purpose. We do it based on received `H(t)` which has to be included
/// with each reply.
/// Moreover, there is no restriction when the [`ReplySURB`] might get used so we need to
@@ -54,7 +43,7 @@ impl ReplyKeyStorage {
// if this fails it means we have some database corruption and we
// absolutely can't continue
if key_bytes_ref.len() != SurbEncryptionKeySize::to_usize() {
if key_bytes_ref.len() != SurbEncryptionKeySize::USIZE {
error!("REPLY KEY STORAGE DATA CORRUPTION - ENCRYPTION KEY HAS INVALID LENGTH");
panic!("REPLY KEY STORAGE DATA CORRUPTION - ENCRYPTION KEY HAS INVALID LENGTH");
}
@@ -70,7 +59,7 @@ impl ReplyKeyStorage {
) -> Result<(), ReplyKeyStorageError> {
let digest = encryption_key.compute_digest();
let insertion_result = match self.db.insert(digest.to_vec(), encryption_key.to_bytes()) {
let insertion_result = match self.db.insert(digest, encryption_key.to_bytes()) {
Err(e) => Err(ReplyKeyStorageError::DbWriteError(e)),
Ok(existing_key) => {
if existing_key.is_some() {
@@ -90,7 +79,7 @@ impl ReplyKeyStorage {
&self,
key_digest: EncryptionKeyDigest,
) -> Result<Option<SurbEncryptionKey>, ReplyKeyStorageError> {
let removal_result = match self.db.remove(&key_digest.to_vec()) {
let removal_result = match self.db.remove(key_digest) {
Err(e) => Err(ReplyKeyStorageError::DbReadError(e)),
Ok(existing_key) => {
Ok(existing_key.map(|existing_key| self.read_encryption_key(existing_key)))
@@ -1,28 +1,19 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use log::*;
use nymsphinx::addressing::clients::Recipient;
use nymsphinx::params::DEFAULT_NUM_MIX_HOPS;
use rand::seq::SliceRandom;
use rand::thread_rng;
use std::ops::Deref;
use std::sync::Arc;
use std::time;
use std::time::Duration;
use tokio::runtime::Handle;
use tokio::sync::{RwLock, RwLockReadGuard};
use tokio::task::JoinHandle;
use topology::{nym_topology_from_bonds, NymTopology};
use url::Url;
// I'm extremely curious why compiler NEVER complained about lack of Debug here before
#[derive(Debug)]
@@ -71,9 +62,9 @@ impl<'a> TopologyReadPermit<'a> {
Some(topology_ref) => {
// see if it's possible to route the packet to both gateways
if !topology_ref.can_construct_path_through(DEFAULT_NUM_MIX_HOPS)
|| !topology_ref.gateway_exists(&ack_recipient.gateway())
|| !topology_ref.gateway_exists(ack_recipient.gateway())
|| if let Some(packet_recipient) = packet_recipient {
!topology_ref.gateway_exists(&packet_recipient.gateway())
!topology_ref.gateway_exists(packet_recipient.gateway())
} else {
false
}
@@ -115,7 +106,7 @@ impl TopologyAccessor {
self.inner.read().await.into()
}
async fn update_global_topology(&mut self, new_topology: Option<NymTopology>) {
async fn update_global_topology(&self, new_topology: Option<NymTopology>) {
self.inner.write().await.update(new_topology);
}
@@ -136,56 +127,128 @@ impl Default for TopologyAccessor {
}
pub struct TopologyRefresherConfig {
validator_rcp_base_url: String,
mixnet_contract_address: String,
validator_api_urls: Vec<Url>,
refresh_rate: time::Duration,
client_version: String,
}
impl TopologyRefresherConfig {
pub fn new(
validator_rcp_base_url: String,
mixnet_contract_address: String,
validator_api_urls: Vec<Url>,
refresh_rate: time::Duration,
client_version: String,
) -> Self {
TopologyRefresherConfig {
validator_rcp_base_url,
mixnet_contract_address,
validator_api_urls,
refresh_rate,
client_version,
}
}
}
pub struct TopologyRefresher {
validator_client: validator_client_rest::Client,
validator_client: validator_client::ApiClient,
client_version: String,
validator_api_urls: Vec<Url>,
topology_accessor: TopologyAccessor,
refresh_rate: Duration,
currently_used_api: usize,
was_latest_valid: bool,
}
impl TopologyRefresher {
pub fn new(cfg: TopologyRefresherConfig, topology_accessor: TopologyAccessor) -> Self {
let validator_client_config = validator_client_rest::Config::new(
cfg.validator_rcp_base_url,
cfg.mixnet_contract_address,
);
let validator_client = validator_client_rest::Client::new(validator_client_config);
pub fn new(mut cfg: TopologyRefresherConfig, topology_accessor: TopologyAccessor) -> Self {
cfg.validator_api_urls.shuffle(&mut thread_rng());
TopologyRefresher {
validator_client,
validator_client: validator_client::ApiClient::new(cfg.validator_api_urls[0].clone()),
client_version: cfg.client_version,
validator_api_urls: cfg.validator_api_urls,
topology_accessor,
refresh_rate: cfg.refresh_rate,
currently_used_api: 0,
was_latest_valid: true,
}
}
fn use_next_validator_api(&mut self) {
if self.validator_api_urls.len() == 1 {
warn!("There's only a single validator API available - it won't be possible to use a different one");
return;
}
self.currently_used_api = (self.currently_used_api + 1) % self.validator_api_urls.len();
self.validator_client
.change_validator_api(self.validator_api_urls[self.currently_used_api].clone())
}
/// Verifies whether nodes a reasonably distributed among all mix layers.
///
/// In ideal world we would have 33% nodes on layer 1, 33% on layer 2 and 33% on layer 3.
/// However, this is a rather unrealistic expectation, instead we check whether there exists
/// a layer with more than 66% of nodes or with fewer than 15% and if so, we trigger a failure.
///
/// # Arguments
///
/// * `topology`: active topology constructed from validator api data
/// * `mixnodes_count`: total number of active mixnodes
fn check_layer_distribution(
&self,
active_topology: &NymTopology,
mixnodes_count: usize,
) -> bool {
let mixes = active_topology.mixes();
if active_topology.gateways().is_empty() {
return false;
}
// trivial check to see if have at least a single node on each layer (regardless of active set size)
if mixes.get(&1).is_none() || mixes.get(&2).is_none() || mixes.get(&3).is_none() {
return false;
}
let upper_bound = (mixnodes_count as f32 * 0.66) as usize;
let lower_bound = (mixnodes_count as f32 * 0.15) as usize;
let layer1 = mixes.get(&1).unwrap().len();
let layer2 = mixes.get(&2).unwrap().len();
let layer3 = mixes.get(&3).unwrap().len();
if layer1 < lower_bound || layer1 > upper_bound {
warn!(
"nodes: {}, layer1: {}, layer2: {}, layer3: {}",
mixnodes_count, layer1, layer2, layer3
);
return false;
}
if layer2 < lower_bound || layer2 > upper_bound {
warn!(
"nodes: {}, layer1: {}, layer2: {}, layer3: {}",
mixnodes_count, layer1, layer2, layer3
);
return false;
}
if layer3 < lower_bound || layer3 > upper_bound {
warn!(
"nodes: {}, layer1: {}, layer2: {}, layer3: {}",
mixnodes_count, layer1, layer2, layer3
);
return false;
}
true
}
async fn get_current_compatible_topology(&self) -> Option<NymTopology> {
// TODO: optimization for the future:
// only refresh mixnodes on timer and refresh gateways only when
// we have to send to a new, unknown, gateway
let mixnodes = match self.validator_client.get_mix_nodes().await {
let mixnodes = match self.validator_client.get_cached_active_mixnodes().await {
Err(err) => {
error!("failed to get network mixnodes - {}", err);
return None;
@@ -193,7 +256,7 @@ impl TopologyRefresher {
Ok(mixes) => mixes,
};
let gateways = match self.validator_client.get_gateways().await {
let gateways = match self.validator_client.get_cached_gateways().await {
Err(err) => {
error!("failed to get network gateways - {}", err);
return None;
@@ -201,17 +264,26 @@ impl TopologyRefresher {
Ok(gateways) => gateways,
};
let topology = nym_topology_from_bonds(mixnodes, gateways);
let mixnodes_count = mixnodes.len();
let topology =
nym_topology_from_bonds(mixnodes, gateways).filter_system_version(&self.client_version);
// TODO: I didn't want to change it now, but the expected system version should rather be put in config
// rather than pulled from package version of `client_core`
Some(topology.filter_system_version(env!("CARGO_PKG_VERSION")))
if !self.check_layer_distribution(&topology, mixnodes_count) {
warn!("The current filtered active topology has extremely skewed layer distribution. It cannot be used.");
None
} else {
Some(topology)
}
}
pub async fn refresh(&mut self) {
trace!("Refreshing the topology");
let new_topology = self.get_current_compatible_topology().await;
if new_topology.is_none() {
self.use_next_validator_api();
}
if new_topology.is_none() && self.was_latest_valid {
// if we failed to grab this topology, but the one before it was alright, let's assume
// validator had a tiny hiccup and use the old data
@@ -231,8 +303,8 @@ impl TopologyRefresher {
self.topology_accessor.is_routable().await
}
pub fn start(mut self, handle: &Handle) -> JoinHandle<()> {
handle.spawn(async move {
pub fn start(mut self) -> JoinHandle<()> {
tokio::spawn(async move {
loop {
tokio::time::sleep(self.refresh_rate).await;
self.refresh().await;
+135 -199
View File
@@ -1,35 +1,18 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use config::defaults::*;
use config::NymConfig;
use serde::{
de::{self, IntoDeserializer, Visitor},
Deserialize, Deserializer, Serialize,
};
use serde::{Deserialize, Serialize};
use std::marker::PhantomData;
use std::path::PathBuf;
use std::time::Duration;
use url::Url;
pub mod persistence;
pub const MISSING_VALUE: &str = "MISSING VALUE";
// 'CLIENT'
pub const DEFAULT_VALIDATOR_REST_ENDPOINT: &str =
"http://testnet-finney-validator.nymtech.net:1317";
pub const DEFAULT_MIXNET_CONTRACT_ADDRESS: &str = "hal1k0jntykt7e4g3y88ltc60czgjuqdy4c9c6gv94";
// 'DEBUG'
const DEFAULT_ACK_WAIT_MULTIPLIER: f64 = 1.5;
@@ -39,57 +22,10 @@ const DEFAULT_MESSAGE_STREAM_AVERAGE_DELAY: Duration = Duration::from_millis(20)
const DEFAULT_AVERAGE_PACKET_DELAY: Duration = Duration::from_millis(50);
const DEFAULT_TOPOLOGY_REFRESH_RATE: Duration = Duration::from_secs(5 * 60); // every 5min
const DEFAULT_TOPOLOGY_RESOLUTION_TIMEOUT: Duration = Duration::from_millis(5_000);
const DEFAULT_GATEWAY_RESPONSE_TIMEOUT: Duration = Duration::from_millis(1_500);
const DEFAULT_VPN_KEY_REUSE_LIMIT: usize = 1000;
const ZERO_DELAY: Duration = Duration::from_nanos(0);
// custom function is defined to deserialize based on whether field contains a pre 0.9.0
// u64 interpreted as milliseconds or proper duration introduced in 0.9.0
//
// TODO: when we get to refactoring down the line, this code can just be removed
// and all Duration fields could just have #[serde(with = "humantime_serde")] instead
// reason for that is that we don't expect anyone to be upgrading from pre 0.9.0 when we have,
// for argument sake, 0.11.0 out
fn deserialize_duration<'de, D>(deserializer: D) -> Result<Duration, D::Error>
where
D: Deserializer<'de>,
{
struct DurationVisitor;
impl<'de> Visitor<'de> for DurationVisitor {
type Value = Duration;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("u64 or a duration")
}
fn visit_i64<E>(self, value: i64) -> Result<Duration, E>
where
E: de::Error,
{
self.visit_u64(value as u64)
}
fn visit_u64<E>(self, value: u64) -> Result<Duration, E>
where
E: de::Error,
{
Ok(Duration::from_millis(Deserialize::deserialize(
value.into_deserializer(),
)?))
}
fn visit_str<E>(self, value: &str) -> Result<Duration, E>
where
E: de::Error,
{
humantime_serde::deserialize(value.into_deserializer())
}
}
deserializer.deserialize_any(DurationVisitor)
}
// Set this to a high value for now, so that we don't risk sporadic timeouts that might cause
// bought bandwidth tokens to not have time to be spent; Once we remove the gateway from the
// bandwidth bridging protocol, we can come back to a smaller timeout value
const DEFAULT_GATEWAY_RESPONSE_TIMEOUT: Duration = Duration::from_secs(5 * 60);
pub fn missing_string_value() -> String {
MISSING_VALUE.to_string()
@@ -167,23 +103,48 @@ impl<T: NymConfig> Config<T> {
self::Client::<T>::default_reply_encryption_key_store_path(&id);
}
#[cfg(not(feature = "coconut"))]
if self
.client
.backup_bandwidth_token_keys_dir
.as_os_str()
.is_empty()
{
self.client.backup_bandwidth_token_keys_dir =
self::Client::<T>::default_backup_bandwidth_token_keys_dir(&id);
}
self.client.id = id;
}
pub fn with_testnet_mode(&mut self, testnet_mode: bool) {
self.client.testnet_mode = testnet_mode;
}
pub fn with_gateway_endpoint<S: Into<String>>(&mut self, id: S, owner: S, listener: S) {
self.client.gateway_endpoint = GatewayEndpoint {
gateway_id: id.into(),
gateway_owner: owner.into(),
gateway_listener: listener.into(),
};
}
pub fn with_gateway_id<S: Into<String>>(&mut self, id: S) {
self.client.gateway_id = id.into();
self.client.gateway_endpoint.gateway_id = id.into();
}
pub fn with_gateway_listener<S: Into<String>>(&mut self, gateway_listener: S) {
self.client.gateway_listener = gateway_listener.into();
#[cfg(not(feature = "coconut"))]
pub fn with_eth_private_key<S: Into<String>>(&mut self, eth_private_key: S) {
self.client.eth_private_key = eth_private_key.into();
}
pub fn set_custom_validator<S: Into<String>>(&mut self, validator: S) {
self.client.validator_rest_url = validator.into();
#[cfg(not(feature = "coconut"))]
pub fn with_eth_endpoint<S: Into<String>>(&mut self, eth_endpoint: S) {
self.client.eth_endpoint = eth_endpoint.into();
}
pub fn set_mixnet_contract<S: Into<String>>(&mut self, contract_address: S) {
self.client.mixnet_contract_address = contract_address.into();
pub fn set_custom_validator_apis(&mut self, validator_api_urls: Vec<Url>) {
self.client.validator_api_urls = validator_api_urls;
}
pub fn set_high_default_traffic_volume(&mut self) {
@@ -192,14 +153,6 @@ impl<T: NymConfig> Config<T> {
self.debug.message_sending_average_delay = Duration::from_millis(4); // 250 "real" messages / s
}
pub fn set_vpn_mode(&mut self, vpn_mode: bool) {
self.client.vpn_mode = vpn_mode;
}
pub fn set_vpn_key_reuse_limit(&mut self, reuse_limit: usize) {
self.debug.vpn_key_reuse_limit = Some(reuse_limit)
}
pub fn set_custom_version(&mut self, version: &str) {
self.client.version = version.to_string();
}
@@ -208,6 +161,10 @@ impl<T: NymConfig> Config<T> {
self.client.id.clone()
}
pub fn get_testnet_mode(&self) -> bool {
self.client.testnet_mode
}
pub fn get_nym_root_directory(&self) -> PathBuf {
self.client.nym_root_directory.clone()
}
@@ -240,37 +197,44 @@ impl<T: NymConfig> Config<T> {
self.client.ack_key_file.clone()
}
pub fn get_validator_rest_endpoint(&self) -> String {
self.client.validator_rest_url.clone()
}
pub fn get_validator_mixnet_contract_address(&self) -> String {
self.client.mixnet_contract_address.clone()
pub fn get_validator_api_endpoints(&self) -> Vec<Url> {
self.client.validator_api_urls.clone()
}
pub fn get_gateway_id(&self) -> String {
self.client.gateway_id.clone()
self.client.gateway_endpoint.gateway_id.clone()
}
pub fn get_gateway_owner(&self) -> String {
self.client.gateway_endpoint.gateway_owner.clone()
}
pub fn get_gateway_listener(&self) -> String {
self.client.gateway_listener.clone()
self.client.gateway_endpoint.gateway_listener.clone()
}
#[cfg(not(feature = "coconut"))]
pub fn get_backup_bandwidth_token_keys_dir(&self) -> PathBuf {
self.client.backup_bandwidth_token_keys_dir.clone()
}
#[cfg(not(feature = "coconut"))]
pub fn get_eth_endpoint(&self) -> String {
self.client.eth_endpoint.clone()
}
#[cfg(not(feature = "coconut"))]
pub fn get_eth_private_key(&self) -> String {
self.client.eth_private_key.clone()
}
// Debug getters
pub fn get_average_packet_delay(&self) -> Duration {
if self.client.vpn_mode {
ZERO_DELAY
} else {
self.debug.average_packet_delay
}
self.debug.average_packet_delay
}
pub fn get_average_ack_delay(&self) -> Duration {
if self.client.vpn_mode {
ZERO_DELAY
} else {
self.debug.average_ack_delay
}
self.debug.average_ack_delay
}
pub fn get_ack_wait_multiplier(&self) -> f64 {
@@ -286,11 +250,7 @@ impl<T: NymConfig> Config<T> {
}
pub fn get_message_sending_average_delay(&self) -> Duration {
if self.client.vpn_mode {
ZERO_DELAY
} else {
self.debug.message_sending_average_delay
}
self.debug.message_sending_average_delay
}
pub fn get_gateway_response_timeout(&self) -> Duration {
@@ -305,21 +265,6 @@ impl<T: NymConfig> Config<T> {
self.debug.topology_resolution_timeout
}
pub fn get_vpn_mode(&self) -> bool {
self.client.vpn_mode
}
pub fn get_vpn_key_reuse_limit(&self) -> Option<usize> {
match self.get_vpn_mode() {
false => None,
true => Some(
self.debug
.vpn_key_reuse_limit
.unwrap_or(DEFAULT_VPN_KEY_REUSE_LIMIT),
),
}
}
pub fn get_version(&self) -> &str {
&self.client.version
}
@@ -335,6 +280,19 @@ impl<T: NymConfig> Default for Config<T> {
}
}
#[derive(Debug, Default, Deserialize, PartialEq, Serialize)]
struct GatewayEndpoint {
/// gateway_id specifies ID of the gateway to which the client should send messages.
/// If initially omitted, a random gateway will be chosen from the available topology.
gateway_id: String,
/// Address of the gateway owner to which the client should send messages.
gateway_owner: String,
/// Address of the gateway listener to which all client requests should be sent.
gateway_listener: String,
}
#[derive(Debug, Deserialize, PartialEq, Serialize)]
pub struct Client<T> {
/// Version of the client for which this configuration was created.
@@ -344,19 +302,13 @@ pub struct Client<T> {
/// ID specifies the human readable ID of this particular client.
id: String,
/// URL to the validator server for obtaining network topology.
#[serde(default = "missing_string_value")]
validator_rest_url: String,
/// Address of the validator contract managing the network.
#[serde(default = "missing_string_value")]
mixnet_contract_address: String,
/// Special mode of the system such that all messages are sent as soon as they are received
/// and no cover traffic is generated. If set all message delays are set to 0 and overwriting
/// 'Debug' values will have no effect.
/// Indicates whether this client is running in a testnet mode, thus attempting
/// to claim bandwidth without presenting bandwidth credentials.
#[serde(default)]
vpn_mode: bool,
testnet_mode: bool,
/// Addresses to APIs running on validator from which the client gets the view of the network.
validator_api_urls: Vec<Url>,
/// Path to file containing private identity key.
private_identity_key_file: PathBuf,
@@ -382,12 +334,22 @@ pub struct Client<T> {
/// sent but not received back.
reply_encryption_key_store_path: PathBuf,
/// gateway_id specifies ID of the gateway to which the client should send messages.
/// If initially omitted, a random gateway will be chosen from the available topology.
gateway_id: String,
/// Information regarding how the client should send data to gateway.
gateway_endpoint: GatewayEndpoint,
/// Address of the gateway listener to which all client requests should be sent.
gateway_listener: String,
/// Path to directory containing public/private keys used for bandwidth token purchase.
/// Those are saved in case of emergency, to be able to reclaim bandwidth tokens.
/// The public key is the name of the file, while the private key is the content.
#[cfg(not(feature = "coconut"))]
backup_bandwidth_token_keys_dir: PathBuf,
/// Ethereum private key.
#[cfg(not(feature = "coconut"))]
eth_private_key: String,
/// Address to an Ethereum full node.
#[cfg(not(feature = "coconut"))]
eth_endpoint: String,
/// nym_home_directory specifies absolute path to the home nym Clients directory.
/// It is expected to use default value and hence .toml file should not redefine this field.
@@ -403,9 +365,8 @@ impl<T: NymConfig> Default for Client<T> {
Client {
version: env!("CARGO_PKG_VERSION").to_string(),
id: "".to_string(),
validator_rest_url: DEFAULT_VALIDATOR_REST_ENDPOINT.to_string(),
mixnet_contract_address: DEFAULT_MIXNET_CONTRACT_ADDRESS.to_string(),
vpn_mode: false,
testnet_mode: false,
validator_api_urls: default_api_endpoints(),
private_identity_key_file: Default::default(),
public_identity_key_file: Default::default(),
private_encryption_key_file: Default::default(),
@@ -413,8 +374,13 @@ impl<T: NymConfig> Default for Client<T> {
gateway_shared_key_file: Default::default(),
ack_key_file: Default::default(),
reply_encryption_key_store_path: Default::default(),
gateway_id: "".to_string(),
gateway_listener: "".to_string(),
gateway_endpoint: Default::default(),
#[cfg(not(feature = "coconut"))]
backup_bandwidth_token_keys_dir: Default::default(),
#[cfg(not(feature = "coconut"))]
eth_private_key: "".to_string(),
#[cfg(not(feature = "coconut"))]
eth_endpoint: "".to_string(),
nym_root_directory: T::default_root_directory(),
super_struct: Default::default(),
}
@@ -423,44 +389,43 @@ impl<T: NymConfig> Default for Client<T> {
impl<T: NymConfig> Client<T> {
fn default_private_identity_key_file(id: &str) -> PathBuf {
T::default_data_directory(id).join("private_identity.pem")
T::default_data_directory(Some(id)).join("private_identity.pem")
}
fn default_public_identity_key_file(id: &str) -> PathBuf {
T::default_data_directory(id).join("public_identity.pem")
T::default_data_directory(Some(id)).join("public_identity.pem")
}
fn default_private_encryption_key_file(id: &str) -> PathBuf {
T::default_data_directory(id).join("private_encryption.pem")
T::default_data_directory(Some(id)).join("private_encryption.pem")
}
fn default_public_encryption_key_file(id: &str) -> PathBuf {
T::default_data_directory(id).join("public_encryption.pem")
T::default_data_directory(Some(id)).join("public_encryption.pem")
}
fn default_gateway_shared_key_file(id: &str) -> PathBuf {
T::default_data_directory(id).join("gateway_shared.pem")
T::default_data_directory(Some(id)).join("gateway_shared.pem")
}
fn default_ack_key_file(id: &str) -> PathBuf {
T::default_data_directory(id).join("ack_key.pem")
T::default_data_directory(Some(id)).join("ack_key.pem")
}
fn default_reply_encryption_key_store_path(id: &str) -> PathBuf {
T::default_data_directory(id).join("reply_key_store")
T::default_data_directory(Some(id)).join("reply_key_store")
}
#[cfg(not(feature = "coconut"))]
fn default_backup_bandwidth_token_keys_dir(id: &str) -> PathBuf {
T::default_data_directory(Some(id)).join("backup_bandwidth_token_keys")
}
}
#[derive(Debug, Deserialize, PartialEq, Serialize)]
#[derive(Debug, Default, Deserialize, PartialEq, Serialize)]
#[serde(deny_unknown_fields)]
pub struct Logging {}
impl Default for Logging {
fn default() -> Self {
Logging {}
}
}
#[derive(Debug, Deserialize, PartialEq, Serialize)]
#[serde(default, deny_unknown_fields)]
pub struct Debug {
@@ -468,20 +433,14 @@ pub struct Debug {
/// sent packet is going to be delayed at any given mix node.
/// So for a packet going through three mix nodes, on average, it will take three times this value
/// until the packet reaches its destination.
#[serde(
deserialize_with = "deserialize_duration",
serialize_with = "humantime_serde::serialize"
)]
#[serde(with = "humantime_serde")]
average_packet_delay: Duration,
/// The parameter of Poisson distribution determining how long, on average,
/// sent acknowledgement is going to be delayed at any given mix node.
/// So for an ack going through three mix nodes, on average, it will take three times this value
/// until the packet reaches its destination.
#[serde(
deserialize_with = "deserialize_duration",
serialize_with = "humantime_serde::serialize"
)]
#[serde(with = "humantime_serde")]
average_ack_delay: Duration,
/// Value multiplied with the expected round trip time of an acknowledgement packet before
@@ -492,58 +451,36 @@ pub struct Debug {
/// Value added to the expected round trip time of an acknowledgement packet before
/// it is assumed it was lost and retransmission of the data packet happens.
/// In an ideal network with 0 latency, this value would have been 0.
#[serde(
deserialize_with = "deserialize_duration",
serialize_with = "humantime_serde::serialize"
)]
#[serde(with = "humantime_serde")]
ack_wait_addition: Duration,
/// The parameter of Poisson distribution determining how long, on average,
/// it is going to take for another loop cover traffic message to be sent.
#[serde(
deserialize_with = "deserialize_duration",
serialize_with = "humantime_serde::serialize"
)]
#[serde(with = "humantime_serde")]
loop_cover_traffic_average_delay: Duration,
/// The parameter of Poisson distribution determining how long, on average,
/// it is going to take another 'real traffic stream' message to be sent.
/// If no real packets are available and cover traffic is enabled,
/// a loop cover message is sent instead in order to preserve the rate.
#[serde(
deserialize_with = "deserialize_duration",
serialize_with = "humantime_serde::serialize"
)]
#[serde(with = "humantime_serde")]
message_sending_average_delay: Duration,
/// How long we're willing to wait for a response to a message sent to the gateway,
/// before giving up on it.
#[serde(
deserialize_with = "deserialize_duration",
serialize_with = "humantime_serde::serialize"
)]
#[serde(with = "humantime_serde")]
gateway_response_timeout: Duration,
/// The uniform delay every which clients are querying the directory server
/// to try to obtain a compatible network topology to send sphinx packets through.
#[serde(
deserialize_with = "deserialize_duration",
serialize_with = "humantime_serde::serialize"
)]
#[serde(with = "humantime_serde")]
topology_refresh_rate: Duration,
/// During topology refresh, test packets are sent through every single possible network
/// path. This timeout determines waiting period until it is decided that the packet
/// did not reach its destination.
#[serde(
deserialize_with = "deserialize_duration",
serialize_with = "humantime_serde::serialize"
)]
#[serde(with = "humantime_serde")]
topology_resolution_timeout: Duration,
/// If the mode of the client is set to VPN it specifies number of packets created with the
/// same initial secret until it gets rotated.
vpn_key_reuse_limit: Option<usize>,
}
impl Default for Debug {
@@ -558,7 +495,6 @@ impl Default for Debug {
gateway_response_timeout: DEFAULT_GATEWAY_RESPONSE_TIMEOUT,
topology_refresh_rate: DEFAULT_TOPOLOGY_REFRESH_RATE,
topology_resolution_timeout: DEFAULT_TOPOLOGY_RESOLUTION_TIMEOUT,
vpn_key_reuse_limit: None,
}
}
}
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::config::Config;
use config::NymConfig;
@@ -1,15 +1,4 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
pub mod key_pathfinder;
+17 -6
View File
@@ -1,8 +1,9 @@
[package]
name = "nym-client"
version = "0.10.0"
version = "1.0.0-rc.1"
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
edition = "2018"
edition = "2021"
rust-version = "1.56"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -16,14 +17,14 @@ futures = "0.3" # bunch of futures stuff, however, now that I think about it, it
# the AsyncRead, AsyncWrite, Stream, Sink, etc. traits could be used from tokio
# channels should really be replaced with crossbeam due to that implementation being more efficient
# and the single instance of abortable we have should really be refactored anyway
url = "2.1" # I think we should just replace it with String
url = "2.2"
clap = "2.33.0" # for the command line arguments
dirs = "3.0" # for determining default store directories in config
dotenv = "0.15.0" # for obtaining environmental variables (only used for RUST_LOG for time being)
log = "0.4" # self explanatory
pretty_env_logger = "0.4" # for formatting log messages
rand = {version = "0.7.3", features = ["wasm-bindgen"]} # rng-related traits + some rng implementation to use
rand = { version = "0.7.3", features = ["wasm-bindgen"] } # rng-related traits + some rng implementation to use
serde = { version = "1.0.104", features = ["derive"] } # for config serialization/deserialization
sled = "0.34" # for storage of replySURB decryption keys
tokio = { version = "1.4", features = ["rt-multi-thread", "net", "signal"] } # async runtime
@@ -31,6 +32,8 @@ tokio-tungstenite = "0.14" # websocket
## internal
client-core = { path = "../client-core" }
coconut-interface = { path = "../../common/coconut-interface", optional = true }
credentials = { path = "../../common/credentials", optional = true }
config = { path = "../../common/config" }
crypto = { path = "../../common/crypto" }
gateway-client = { path = "../../common/client-libs/gateway-client" }
@@ -39,8 +42,16 @@ nymsphinx = { path = "../../common/nymsphinx" }
pemstore = { path = "../../common/pemstore" }
topology = { path = "../../common/topology" }
websocket-requests = { path = "websocket-requests" }
validator-client-rest = { path = "../../common/client-libs/validator-client-rest" }
validator-client = { path = "../../common/client-libs/validator-client" }
version-checker = { path = "../../common/version-checker" }
network-defaults = { path = "../../common/network-defaults" }
[features]
coconut = ["coconut-interface", "credentials", "gateway-requests/coconut", "gateway-client/coconut"]
eth = []
[dev-dependencies]
serde_json = "1.0" # for the "textsend" example
serde_json = "1.0" # for the "textsend" example
[build-dependencies]
vergen = { version = "5", default-features = false, features = ["build", "git", "rustc", "cargo"] }
+8
View File
@@ -0,0 +1,8 @@
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use vergen::{vergen, Config};
fn main() {
vergen(Config::default()).expect("failed to extract build metadata")
}
@@ -3,6 +3,5 @@ module github.com/nymtech/nym/clients/native/examples/go
go 1.14
require (
github.com/btcsuite/btcutil v1.0.2 // indirect
github.com/gorilla/websocket v1.4.2
)
File diff suppressed because it is too large Load Diff
@@ -18,14 +18,12 @@
"author": "Dave Hrycyszyn",
"license": "Apache-2.0",
"devDependencies": {
"autoprefixer": "^9.8.0",
"clean-webpack-plugin": "^3.0.0",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0"
"clean-webpack-plugin": "^4.0.0",
"webpack": "^5.70.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4"
},
"dependencies": {
"core-js": "^3.6.5",
"html-webpack-plugin": "^4.2.0"
"html-webpack-plugin": "^5.5.0"
}
}
@@ -1,9 +1,9 @@
const autoprefixer = require('autoprefixer');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
mode: 'production',
entry: './src/index.js',
output: {
filename: 'bundle.js',
@@ -18,7 +18,7 @@ module.exports = {
})
],
devServer: {
contentBase: path.join(__dirname, 'dist'),
static: path.join(__dirname, 'dist'),
compress: true,
port: 8888
}
+34 -23
View File
@@ -36,31 +36,42 @@
},
"websockets": {
"hashes": [
"sha256:0e4fb4de42701340bd2353bb2eee45314651caa6ccee80dbd5f5d5978888fed5",
"sha256:1d3f1bf059d04a4e0eb4985a887d49195e15ebabc42364f4eb564b1d065793f5",
"sha256:20891f0dddade307ffddf593c733a3fdb6b83e6f9eef85908113e628fa5a8308",
"sha256:295359a2cc78736737dd88c343cd0747546b2174b5e1adc223824bcaf3e164cb",
"sha256:2db62a9142e88535038a6bcfea70ef9447696ea77891aebb730a333a51ed559a",
"sha256:3762791ab8b38948f0c4d281c8b2ddfa99b7e510e46bd8dfa942a5fff621068c",
"sha256:3db87421956f1b0779a7564915875ba774295cc86e81bc671631379371af1170",
"sha256:3ef56fcc7b1ff90de46ccd5a687bbd13a3180132268c4254fc0fa44ecf4fc422",
"sha256:4f9f7d28ce1d8f1295717c2c25b732c2bc0645db3215cf757551c392177d7cb8",
"sha256:5c01fd846263a75bc8a2b9542606927cfad57e7282965d96b93c387622487485",
"sha256:5c65d2da8c6bce0fca2528f69f44b2f977e06954c8512a952222cea50dad430f",
"sha256:751a556205d8245ff94aeef23546a1113b1dd4f6e4d102ded66c39b99c2ce6c8",
"sha256:7ff46d441db78241f4c6c27b3868c9ae71473fe03341340d2dfdbe8d79310acc",
"sha256:965889d9f0e2a75edd81a07592d0ced54daa5b0785f57dc429c378edbcffe779",
"sha256:9b248ba3dd8a03b1a10b19efe7d4f7fa41d158fdaa95e2cf65af5a7b95a4f989",
"sha256:9bef37ee224e104a413f0780e29adb3e514a5b698aabe0d969a6ba426b8435d1",
"sha256:c1ec8db4fac31850286b7cd3b9c0e1b944204668b8eb721674916d4e28744092",
"sha256:c8a116feafdb1f84607cb3b14aa1418424ae71fee131642fc568d21423b51824",
"sha256:ce85b06a10fc65e6143518b96d3dca27b081a740bae261c2fb20375801a9d56d",
"sha256:d705f8aeecdf3262379644e4b55107a3b55860eb812b673b28d0fbc347a60c55",
"sha256:e898a0863421650f0bebac8ba40840fc02258ef4714cb7e1fd76b6a6354bda36",
"sha256:f8a7bff6e8664afc4e6c28b983845c5bc14965030e3fb98789734d416af77c4b"
"sha256:0dd4eb8e0bbf365d6f652711ce21b8fd2b596f873d32aabb0fbb53ec604418cc",
"sha256:1d0971cc7251aeff955aa742ec541ee8aaea4bb2ebf0245748fbec62f744a37e",
"sha256:1d6b4fddb12ab9adf87b843cd4316c4bd602db8d5efd2fb83147f0458fe85135",
"sha256:230a3506df6b5f446fed2398e58dcaafdff12d67fe1397dff196411a9e820d02",
"sha256:276d2339ebf0df4f45df453923ebd2270b87900eda5dfd4a6b0cfa15f82111c3",
"sha256:2cf04601633a4ec176b9cc3d3e73789c037641001dbfaf7c411f89cd3e04fcaf",
"sha256:3ddff38894c7857c476feb3538dd847514379d6dc844961dc99f04b0384b1b1b",
"sha256:48c222feb3ced18f3dc61168ca18952a22fb88e5eb8902d2bf1b50faefdc34a2",
"sha256:51d04df04ed9d08077d10ccbe21e6805791b78eac49d16d30a1f1fe2e44ba0af",
"sha256:597c28f3aa7a09e8c070a86b03107094ee5cdafcc0d55f2f2eac92faac8dc67d",
"sha256:5c8f0d82ea2468282e08b0cf5307f3ad022290ed50c45d5cb7767957ca782880",
"sha256:7189e51955f9268b2bdd6cc537e0faa06f8fffda7fb386e5922c6391de51b077",
"sha256:7df3596838b2a0c07c6f6d67752c53859a54993d4f062689fdf547cb56d0f84f",
"sha256:826ccf85d4514609219725ba4a7abd569228c2c9f1968e8be05be366f68291ec",
"sha256:836d14eb53b500fd92bd5db2fc5894f7c72b634f9c2a28f546f75967503d8e25",
"sha256:85db8090ba94e22d964498a47fdd933b8875a1add6ebc514c7ac8703eb97bbf0",
"sha256:85e701a6c316b7067f1e8675c638036a796fe5116783a4c932e7eb8e305a3ffe",
"sha256:900589e19200be76dd7cbaa95e9771605b5ce3f62512d039fb3bc5da9014912a",
"sha256:9147868bb0cc01e6846606cd65cbf9c58598f187b96d14dd1ca17338b08793bb",
"sha256:9e7fdc775fe7403dbd8bc883ba59576a6232eac96dacb56512daacf7af5d618d",
"sha256:ab5ee15d3462198c794c49ccd31773d8a2b8c17d622aa184f669d2b98c2f0857",
"sha256:ad893d889bc700a5835e0a95a3e4f2c39e91577ab232a3dc03c262a0f8fc4b5c",
"sha256:b2e71c4670ebe1067fa8632f0d081e47254ee2d3d409de54168b43b0ba9147e0",
"sha256:b43b13e5622c5a53ab12f3272e6f42f1ce37cd5b6684b2676cb365403295cd40",
"sha256:b4ad84b156cf50529b8ac5cc1638c2cf8680490e3fccb6121316c8c02620a2e4",
"sha256:be5fd35e99970518547edc906efab29afd392319f020c3c58b0e1a158e16ed20",
"sha256:caa68c95bc1776d3521f81eeb4d5b9438be92514ec2a79fececda814099c8314",
"sha256:d144b350045c53c8ff09aa1cfa955012dd32f00c7e0862c199edcabb1a8b32da",
"sha256:d2c2d9b24d3c65b5a02cac12cbb4e4194e590314519ed49db2f67ef561c3cf58",
"sha256:e9e5fd6dbdf95d99bc03732ded1fc8ef22ebbc05999ac7e0c7bf57fe6e4e5ae2",
"sha256:ebf459a1c069f9866d8569439c06193c586e72c9330db1390af7c6a0a32c4afd",
"sha256:f31722f1c033c198aa4a39a01905951c00bd1c74f922e8afc1b1c62adbcdd56a",
"sha256:f68c352a68e5fdf1e97288d5cec9296664c590c25932a8476224124aaf90dbcd"
],
"index": "pypi",
"version": "==8.1"
"version": "==9.1"
}
},
"develop": {}
@@ -35,7 +35,7 @@ async fn send_file_with_reply() {
let (mut ws_stream, _) = connect_async(uri).await.unwrap();
let recipient = get_self_address(&mut ws_stream).await;
println!("our full address is: {}", recipient.to_string());
println!("our full address is: {}", recipient);
let read_data = std::fs::read("examples/dummy_file").unwrap();
@@ -83,7 +83,7 @@ async fn send_file_without_reply() {
let (mut ws_stream, _) = connect_async(uri).await.unwrap();
let recipient = get_self_address(&mut ws_stream).await;
println!("our full address is: {}", recipient.to_string());
println!("our full address is: {}", recipient);
let read_data = std::fs::read("examples/dummy_file").unwrap();
@@ -36,7 +36,7 @@ async fn send_text_with_reply() {
let (mut ws_stream, _) = connect_async(uri).await.unwrap();
let recipient = get_self_address(&mut ws_stream).await;
println!("our full address is: {}", recipient.to_string());
println!("our full address is: {}", recipient);
let send_request = json!({
"type" : "send",
@@ -76,7 +76,7 @@ async fn send_text_without_reply() {
let (mut ws_stream, _) = connect_async(uri).await.unwrap();
let recipient = get_self_address(&mut ws_stream).await;
println!("our full address is: {}", recipient.to_string());
println!("our full address is: {}", recipient);
let send_request = json!({
"type" : "send",
+4 -16
View File
@@ -1,28 +1,16 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::client::config::template::config_template;
use client_core::config::Config as BaseConfig;
pub use client_core::config::MISSING_VALUE;
use config::defaults::DEFAULT_WEBSOCKET_LISTENING_PORT;
use config::NymConfig;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
mod template;
const DEFAULT_LISTENING_PORT: u16 = 1977;
#[derive(Debug, Deserialize, PartialEq, Serialize, Clone, Copy)]
#[serde(deny_unknown_fields)]
pub enum SocketType {
@@ -128,7 +116,7 @@ impl Default for Socket {
fn default() -> Self {
Socket {
socket_type: SocketType::WebSocket,
listening_port: DEFAULT_LISTENING_PORT,
listening_port: DEFAULT_WEBSOCKET_LISTENING_PORT,
}
}
}
+34 -29
View File
@@ -1,22 +1,11 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
pub(crate) fn config_template() -> &'static str {
// While using normal toml marshalling would have been way simpler with less overhead,
// I think it's useful to have comments attached to the saved config file to explain behaviour of
// particular fields.
// Note: any changes to the template must be reflected in the appropriate structs in mod.rs.
// Note: any changes to the template must be reflected in the appropriate structs.
r#"
# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml
@@ -30,16 +19,16 @@ version = '{{ client.version }}'
# Human readable ID of this particular client.
id = '{{ client.id }}'
# URL to the validator server for obtaining network topology.
validator_rest_url = '{{ client.validator_rest_url }}'
# Indicates whether this client is running in a testnet mode, thus attempting
# to claim bandwidth without presenting bandwidth credentials.
testnet_mode = {{ client.testnet_mode }}
# Address of the validator contract managing the network.
mixnet_contract_address = '{{ client.mixnet_contract_address }}'
# Special mode of the system such that all messages are sent as soon as they are received
# and no cover traffic is generated. If set all message delays are set to 0 and overwriting
# 'Debug' values will have no effect.
vpn_mode = {{ client.vpn_mode }}
# Addresses to APIs running on validator from which the client gets the view of the network.
validator_api_urls = [
{{#each client.validator_api_urls }}
'{{this}}',
{{/each}}
]
# Path to file containing private identity key.
private_identity_key_file = '{{ client.private_identity_key_file }}'
@@ -57,14 +46,19 @@ public_encryption_key_file = '{{ client.public_encryption_key_file }}'
# sent but not received back.
reply_encryption_key_store_path = '{{ client.reply_encryption_key_store_path }}'
# Path to directory containing public/private keys used for bandwidth token purchase.
# Those are saved in case of emergency, to be able to reclaim bandwidth tokens.
# The public key is the name of the file, while the private key is the content.
backup_bandwidth_token_keys_dir = '{{ client.backup_bandwidth_token_keys_dir }}'
# Ethereum private key.
eth_private_key = '{{ client.eth_private_key }}'
# Addess to an Ethereum full node.
eth_endpoint = '{{ client.eth_endpoint }}'
##### additional client config options #####
# ID of the gateway from which the client should be fetching messages.
gateway_id = '{{ client.gateway_id }}'
# Address of the gateway listener to which all client requests should be sent.
gateway_listener = '{{ client.gateway_listener }}'
# A gateway specific, optional, base58 stringified shared key used for
# communication with particular gateway.
gateway_shared_key_file = '{{ client.gateway_shared_key_file }}'
@@ -78,6 +72,17 @@ ack_key_file = '{{ client.ack_key_file }}'
# Absolute path to the home Nym Clients directory.
nym_root_directory = '{{ client.nym_root_directory }}'
[client.gateway_endpoint]
# ID of the gateway from which the client should be fetching messages.
gateway_id = '{{ client.gateway_endpoint.gateway_id }}'
# Address of the gateway owner to which the client should send messages.
gateway_owner = '{{ client.gateway_endpoint.gateway_owner }}'
# Address of the gateway listener to which all client requests should be sent.
gateway_listener = '{{ client.gateway_endpoint.gateway_listener }}'
##### socket config options #####
+55 -75
View File
@@ -1,19 +1,6 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::client::config::{Config, SocketType};
use crate::websocket;
use client_core::client::cover_traffic_stream::LoopCoverTrafficStream;
use client_core::client::inbound_messages::{
InputMessage, InputMessageReceiver, InputMessageSender,
@@ -35,6 +22,7 @@ use client_core::client::topology_control::{
use client_core::config::persistence::key_pathfinder::ClientKeyPathfinder;
use crypto::asymmetric::identity;
use futures::channel::mpsc;
use gateway_client::bandwidth::BandwidthController;
use gateway_client::{
AcknowledgementReceiver, AcknowledgementSender, GatewayClient, MixnetMessageReceiver,
MixnetMessageSender,
@@ -43,9 +31,10 @@ use log::*;
use nymsphinx::addressing::clients::Recipient;
use nymsphinx::addressing::nodes::NodeIdentity;
use nymsphinx::anonymous_replies::ReplySurb;
use nymsphinx::params::PacketMode;
use nymsphinx::receiver::ReconstructedMessage;
use tokio::runtime::Runtime;
use crate::client::config::{Config, SocketType};
use crate::websocket;
pub(crate) mod config;
@@ -54,11 +43,6 @@ pub struct NymClient {
/// key filepaths, etc.
config: Config,
/// Tokio runtime used for futures execution.
// TODO: JS: Personally I think I prefer the implicit way of using it that we've done with the
// gateway.
runtime: Runtime,
/// KeyManager object containing smart pointers to all relevant keys used by the client.
key_manager: KeyManager,
@@ -78,7 +62,6 @@ impl NymClient {
let key_manager = KeyManager::load_keys(&pathfinder).expect("failed to load stored keys");
NymClient {
runtime: Runtime::new().unwrap(),
config,
key_manager,
input_tx: None,
@@ -104,9 +87,6 @@ impl NymClient {
mix_tx: BatchMixMessageSender,
) {
info!("Starting loop cover traffic stream...");
// we need to explicitly enter runtime due to "next_delay: time::delay_for(Default::default())"
// set in the constructor which HAS TO be called within context of a tokio runtime
let _guard = self.runtime.enter();
LoopCoverTrafficStream::new(
self.key_manager.ack_key(),
@@ -119,7 +99,7 @@ impl NymClient {
self.as_mix_recipient(),
topology_accessor,
)
.start(self.runtime.handle());
.start();
}
fn start_real_traffic_controller(
@@ -130,12 +110,6 @@ impl NymClient {
input_receiver: InputMessageReceiver,
mix_sender: BatchMixMessageSender,
) {
let packet_mode = if self.config.get_base().get_vpn_mode() {
PacketMode::Vpn
} else {
PacketMode::Mix
};
let controller_config = real_messages_control::Config::new(
self.key_manager.ack_key(),
self.config.get_base().get_ack_wait_multiplier(),
@@ -144,15 +118,9 @@ impl NymClient {
self.config.get_base().get_message_sending_average_delay(),
self.config.get_base().get_average_packet_delay(),
self.as_mix_recipient(),
packet_mode,
self.config.get_base().get_vpn_key_reuse_limit(),
);
info!("Starting real traffic stream...");
// we need to explicitly enter runtime due to "next_delay: time::delay_for(Default::default())"
// set in the constructor [of OutQueueControl] which HAS TO be called within context of a tokio runtime
// When refactoring this restriction should definitely be removed.
let _guard = self.runtime.enter();
RealMessagesController::new(
controller_config,
@@ -162,7 +130,7 @@ impl NymClient {
topology_accessor,
reply_key_storage,
)
.start(self.runtime.handle(), self.config.get_base().get_vpn_mode());
.start();
}
// buffer controlling all messages fetched from provider
@@ -180,10 +148,10 @@ impl NymClient {
mixnet_receiver,
reply_key_storage,
)
.start(self.runtime.handle())
.start()
}
fn start_gateway_client(
async fn start_gateway_client(
&mut self,
mixnet_message_sender: MixnetMessageSender,
ack_sender: AcknowledgementSender,
@@ -192,6 +160,10 @@ impl NymClient {
if gateway_id.is_empty() {
panic!("The identity of the gateway is unknown - did you run `nym-client` init?")
}
let gateway_owner = self.config.get_base().get_gateway_owner();
if gateway_owner.is_empty() {
panic!("The owner of the gateway is unknown - did you run `nym-client` init?")
}
let gateway_address = self.config.get_base().get_gateway_listener();
if gateway_address.is_empty() {
panic!("The address of the gateway is unknown - did you run `nym-client` init?")
@@ -200,51 +172,59 @@ impl NymClient {
let gateway_identity = identity::PublicKey::from_base58_string(gateway_id)
.expect("provided gateway id is invalid!");
#[cfg(feature = "coconut")]
let bandwidth_controller = BandwidthController::new(
self.config.get_base().get_validator_api_endpoints(),
*self.key_manager.identity_keypair().public_key(),
);
#[cfg(not(feature = "coconut"))]
let bandwidth_controller = BandwidthController::new(
self.config.get_base().get_eth_endpoint(),
self.config.get_base().get_eth_private_key(),
self.config.get_base().get_backup_bandwidth_token_keys_dir(),
)
.expect("Could not create bandwidth controller");
let mut gateway_client = GatewayClient::new(
gateway_address,
self.key_manager.identity_keypair(),
gateway_identity,
gateway_owner,
Some(self.key_manager.gateway_shared_key()),
mixnet_message_sender,
ack_sender,
self.config.get_base().get_gateway_response_timeout(),
Some(bandwidth_controller),
);
self.runtime.block_on(async {
gateway_client
.authenticate_and_start()
.await
.expect("could not authenticate and start up the gateway connection")
});
if self.config.get_base().get_testnet_mode() {
gateway_client.set_testnet_mode(true)
}
gateway_client
.authenticate_and_start()
.await
.expect("could not authenticate and start up the gateway connection");
gateway_client
}
// future responsible for periodically polling directory server and updating
// the current global view of topology
fn start_topology_refresher(&mut self, topology_accessor: TopologyAccessor) {
async fn start_topology_refresher(&mut self, topology_accessor: TopologyAccessor) {
let topology_refresher_config = TopologyRefresherConfig::new(
self.config.get_base().get_validator_rest_endpoint(),
self.config
.get_base()
.get_validator_mixnet_contract_address(),
self.config.get_base().get_validator_api_endpoints(),
self.config.get_base().get_topology_refresh_rate(),
env!("CARGO_PKG_VERSION").to_string(),
);
let mut topology_refresher =
TopologyRefresher::new(topology_refresher_config, topology_accessor);
// before returning, block entire runtime to refresh the current network view so that any
// components depending on topology would see a non-empty view
info!(
"Obtaining initial network topology from {}",
self.config.get_base().get_validator_rest_endpoint()
);
self.runtime.block_on(topology_refresher.refresh());
info!("Obtaining initial network topology");
topology_refresher.refresh().await;
// TODO: a slightly more graceful termination here
if !self
.runtime
.block_on(topology_refresher.is_topology_routable())
{
if !topology_refresher.is_topology_routable().await {
panic!(
"The current network topology seem to be insufficient to route any packets through\
- check if enough nodes and a gateway are online"
@@ -252,7 +232,7 @@ impl NymClient {
}
info!("Starting topology refresher...");
topology_refresher.start(self.runtime.handle());
topology_refresher.start();
}
// controller for sending sphinx packets to mixnet (either real traffic or cover traffic)
@@ -265,7 +245,7 @@ impl NymClient {
gateway_client: GatewayClient,
) {
info!("Starting mix traffic controller...");
MixTrafficController::new(mix_rx, gateway_client).start(self.runtime.handle());
MixTrafficController::new(mix_rx, gateway_client).start();
}
fn start_websocket_listener(
@@ -278,8 +258,7 @@ impl NymClient {
let websocket_handler =
websocket::Handler::new(msg_input, buffer_requester, self.as_mix_recipient());
websocket::Listener::new(self.config.get_listening_port())
.start(self.runtime.handle(), websocket_handler);
websocket::Listener::new(self.config.get_listening_port()).start(websocket_handler);
}
/// EXPERIMENTAL DIRECT RUST API
@@ -326,9 +305,9 @@ impl NymClient {
}
/// blocking version of `start` method. Will run forever (or until SIGINT is sent)
pub fn run_forever(&mut self) {
self.start();
if let Err(e) = self.runtime.block_on(tokio::signal::ctrl_c()) {
pub async fn run_forever(&mut self) {
self.start().await;
if let Err(e) = tokio::signal::ctrl_c().await {
error!(
"There was an error while capturing SIGINT - {:?}. We will terminate regardless",
e
@@ -340,7 +319,7 @@ impl NymClient {
);
}
pub fn start(&mut self) {
pub async fn start(&mut self) {
info!("Starting nym client");
// channels for inter-component communication
// TODO: make the channels be internally created by the relevant components
@@ -372,14 +351,17 @@ impl NymClient {
// the components are started in very specific order. Unless you know what you are doing,
// do not change that.
self.start_topology_refresher(shared_topology_accessor.clone());
self.start_topology_refresher(shared_topology_accessor.clone())
.await;
self.start_received_messages_buffer_controller(
received_buffer_request_receiver,
mixnet_messages_receiver,
reply_key_storage.clone(),
);
let gateway_client = self.start_gateway_client(mixnet_messages_sender, ack_sender);
let gateway_client = self
.start_gateway_client(mixnet_messages_sender, ack_sender)
.await;
self.start_mix_traffic_controller(sphinx_message_receiver, gateway_client);
self.start_real_traffic_controller(
@@ -390,9 +372,7 @@ impl NymClient {
sphinx_message_sender.clone(),
);
if !self.config.get_base().get_vpn_mode() {
self.start_cover_traffic_stream(shared_topology_accessor, sphinx_message_sender);
}
self.start_cover_traffic_stream(shared_topology_accessor, sphinx_message_sender);
match self.config.get_socket_type() {
SocketType::WebSocket => {
+106 -67
View File
@@ -1,37 +1,45 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::client::config::Config;
use crate::commands::override_config;
use clap::{App, Arg, ArgMatches};
use client_core::client::key_manager::KeyManager;
use client_core::config::persistence::key_pathfinder::ClientKeyPathfinder;
#[cfg(feature = "coconut")]
use coconut_interface::{hash_to_scalar, Credential, Parameters};
use config::NymConfig;
#[cfg(feature = "coconut")]
use credentials::coconut::bandwidth::{
obtain_signature, prepare_for_spending, BandwidthVoucherAttributes, TOTAL_ATTRIBUTES,
};
#[cfg(feature = "coconut")]
use credentials::obtain_aggregate_verification_key;
use crypto::asymmetric::{encryption, identity};
use gateway_client::GatewayClient;
use gateway_requests::registration::handshake::SharedKeys;
#[cfg(feature = "coconut")]
use network_defaults::BANDWIDTH_VALUE;
use nymsphinx::addressing::clients::Recipient;
use nymsphinx::addressing::nodes::NodeIdentity;
use rand::rngs::OsRng;
use rand::seq::SliceRandom;
use rand::thread_rng;
use std::convert::TryInto;
use std::sync::Arc;
use std::time::Duration;
use topology::{filter::VersionFilterable, gateway};
use url::Url;
use crate::client::config::Config;
use crate::commands::override_config;
#[cfg(feature = "eth")]
#[cfg(not(feature = "coconut"))]
use crate::commands::{
DEFAULT_ETH_ENDPOINT, DEFAULT_ETH_PRIVATE_KEY, ETH_ENDPOINT_ARG_NAME, ETH_PRIVATE_KEY_ARG_NAME,
TESTNET_MODE_ARG_NAME,
};
pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> {
App::new("init")
let app = App::new("init")
.about("Initialise a Nym client. Do this first!")
.arg(Arg::with_name("id")
.long("id")
@@ -44,14 +52,9 @@ pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> {
.help("Id of the gateway we are going to connect to.")
.takes_value(true)
)
.arg(Arg::with_name("validator")
.long("validator")
.help("Address of the validator server the client is getting topology from")
.takes_value(true),
)
.arg(Arg::with_name("mixnet-contract")
.long("mixnet-contract")
.help("Address of the validator contract managing the network")
.arg(Arg::with_name("validators")
.long("validators")
.help("Comma separated list of rest endpoints of the validators")
.takes_value(true),
)
.arg(Arg::with_name("disable-socket")
@@ -64,32 +67,76 @@ pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> {
.help("Port for the socket (if applicable) to listen on in all subsequent runs")
.takes_value(true)
)
.arg(Arg::with_name("vpn-mode")
.long("vpn-mode")
.help("Set the vpn mode of the client")
.long_help(
r#"
Special mode of the system such that all messages are sent as soon as they are received
and no cover traffic is generated. If set all message delays are set to 0 and overwriting
'Debug' values will have no effect.
"#
)
)
.arg(Arg::with_name("fastmode")
.long("fastmode")
.hidden(true) // this will prevent this flag from being displayed in `--help`
.help("Mostly debug-related option to increase default traffic rate so that you would not need to modify config post init")
);
#[cfg(feature = "eth")]
#[cfg(not(feature = "coconut"))]
let app = app
.arg(
Arg::with_name(TESTNET_MODE_ARG_NAME)
.long(TESTNET_MODE_ARG_NAME)
.help("Set this client to work in a testnet mode that would attempt to use gateway without bandwidth credential requirement. If this value is set, --eth_endpoint and --eth_private_key don't need to be set.")
.conflicts_with_all(&[ETH_ENDPOINT_ARG_NAME, ETH_PRIVATE_KEY_ARG_NAME])
)
.arg(Arg::with_name(ETH_ENDPOINT_ARG_NAME)
.long(ETH_ENDPOINT_ARG_NAME)
.help("URL of an Ethereum full node that we want to use for getting bandwidth tokens from ERC20 tokens. If you don't want to set this value, use --testnet-mode instead")
.takes_value(true)
.default_value_if(TESTNET_MODE_ARG_NAME, None, DEFAULT_ETH_ENDPOINT)
.required(true))
.arg(Arg::with_name(ETH_PRIVATE_KEY_ARG_NAME)
.long(ETH_PRIVATE_KEY_ARG_NAME)
.help("Ethereum private key used for obtaining bandwidth tokens from ERC20 tokens. If you don't want to set this value, use --testnet-mode instead")
.takes_value(true)
.default_value_if(TESTNET_MODE_ARG_NAME, None, DEFAULT_ETH_PRIVATE_KEY)
.required(true)
);
app
}
// this behaviour should definitely be changed, we shouldn't
// need to get bandwidth credential for registration
#[cfg(feature = "coconut")]
async fn _prepare_temporary_credential(validators: &[Url], raw_identity: &[u8]) -> Credential {
let verification_key = obtain_aggregate_verification_key(validators)
.await
.expect("could not obtain aggregate verification key of validators");
let params = Parameters::new(TOTAL_ATTRIBUTES).unwrap();
let bandwidth_credential_attributes = BandwidthVoucherAttributes {
serial_number: params.random_scalar(),
binding_number: params.random_scalar(),
voucher_value: hash_to_scalar(BANDWIDTH_VALUE.to_be_bytes()),
voucher_info: hash_to_scalar(String::from("BandwidthVoucher").as_bytes()),
};
let bandwidth_credential =
obtain_signature(&params, &bandwidth_credential_attributes, validators)
.await
.expect("could not obtain bandwidth credential");
prepare_for_spending(
raw_identity,
&bandwidth_credential,
&bandwidth_credential_attributes,
&verification_key,
)
.expect("could not prepare out bandwidth credential for spending")
}
async fn register_with_gateway(
gateway: &gateway::Node,
our_identity: Arc<identity::KeyPair>,
) -> SharedKeys {
) -> Arc<SharedKeys> {
let timeout = Duration::from_millis(1500);
let mut gateway_client = GatewayClient::new_init(
gateway.client_listener.clone(),
gateway.clients_address(),
gateway.identity_key,
gateway.owner.clone(),
our_identity.clone(),
timeout,
);
@@ -98,21 +145,21 @@ async fn register_with_gateway(
.await
.expect("failed to establish connection with the gateway!");
gateway_client
.register()
.perform_initial_authentication()
.await
.expect("failed to register with the gateway!")
}
async fn gateway_details(
validator_server: &str,
mixnet_contract: &str,
validator_servers: Vec<Url>,
chosen_gateway_id: Option<&str>,
) -> gateway::Node {
let validator_client_config =
validator_client_rest::Config::new(validator_server, mixnet_contract);
let validator_client = validator_client_rest::Client::new(validator_client_config);
let validator_api = validator_servers
.choose(&mut thread_rng())
.expect("The list of validator apis is empty");
let validator_client = validator_client::ApiClient::new(validator_api.clone());
let gateways = validator_client.get_gateways().await.unwrap();
let gateways = validator_client.get_cached_gateways().await.unwrap();
let valid_gateways = gateways
.into_iter()
.filter_map(|gateway| gateway.try_into().ok())
@@ -173,12 +220,12 @@ fn show_address(config: &Config) {
println!("\nThe address of this client is: {}", client_recipient);
}
pub fn execute(matches: &ArgMatches) {
pub async fn execute(matches: ArgMatches<'static>) {
println!("Initialising client...");
let id = matches.value_of("id").unwrap(); // required for now
let already_init = if Config::default_config_file_path(id).exists() {
let already_init = if Config::default_config_file_path(Some(id)).exists() {
println!("Client \"{}\" was already initialised before! Config information will be overwritten (but keys will be kept)!", id);
true
} else {
@@ -191,7 +238,7 @@ pub fn execute(matches: &ArgMatches) {
// TODO: ideally that should be the last thing that's being done to config.
// However, we are later further overriding it with gateway id
config = override_config(config, matches);
config = override_config(config, &matches);
if matches.is_present("fastmode") {
config.get_base_mut().set_high_default_traffic_volume();
}
@@ -204,27 +251,19 @@ pub fn execute(matches: &ArgMatches) {
let chosen_gateway_id = matches.value_of("gateway");
let registration_fut = async {
let gate_details = gateway_details(
&config.get_base().get_validator_rest_endpoint(),
&config.get_base().get_validator_mixnet_contract_address(),
chosen_gateway_id,
)
.await;
config
.get_base_mut()
.with_gateway_id(gate_details.identity_key.to_base58_string());
let shared_keys =
register_with_gateway(&gate_details, key_manager.identity_keypair()).await;
(shared_keys, gate_details.client_listener)
};
let gateway_details = gateway_details(
config.get_base().get_validator_api_endpoints(),
chosen_gateway_id,
)
.await;
let shared_keys =
register_with_gateway(&gateway_details, key_manager.identity_keypair()).await;
// TODO: is there perhaps a way to make it work without having to spawn entire runtime?
let rt = tokio::runtime::Runtime::new().unwrap();
let (shared_keys, gateway_listener) = rt.block_on(registration_fut);
config
.get_base_mut()
.with_gateway_listener(gateway_listener);
config.get_base_mut().with_gateway_endpoint(
gateway_details.identity_key.to_base58_string(),
gateway_details.owner.clone(),
gateway_details.clients_address(),
);
key_manager.insert_gateway_shared_key(shared_keys);
let pathfinder = ClientKeyPathfinder::new_from_config(config.get_base());
+51 -23
View File
@@ -1,31 +1,42 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::client::config::{Config, SocketType};
use clap::ArgMatches;
use url::Url;
pub(crate) const TESTNET_MODE_ARG_NAME: &str = "testnet-mode";
#[cfg(not(feature = "coconut"))]
pub(crate) const ETH_ENDPOINT_ARG_NAME: &str = "eth_endpoint";
#[cfg(not(feature = "coconut"))]
pub(crate) const ETH_PRIVATE_KEY_ARG_NAME: &str = "eth_private_key";
#[cfg(not(feature = "coconut"))]
pub(crate) const DEFAULT_ETH_ENDPOINT: &str =
"https://rinkeby.infura.io/v3/00000000000000000000000000000000";
#[cfg(not(feature = "coconut"))]
pub(crate) const DEFAULT_ETH_PRIVATE_KEY: &str =
"0000000000000000000000000000000000000000000000000000000000000001";
pub(crate) mod init;
pub(crate) mod run;
pub(crate) mod upgrade;
pub(crate) fn override_config(mut config: Config, matches: &ArgMatches) -> Config {
if let Some(validator) = matches.value_of("validator") {
config.get_base_mut().set_custom_validator(validator);
}
fn parse_validators(raw: &str) -> Vec<Url> {
raw.split(',')
.map(|raw_validator| {
raw_validator
.trim()
.parse()
.expect("one of the provided validator api urls is invalid")
})
.collect()
}
if let Some(contract_address) = matches.value_of("mixnet-contract") {
config.get_base_mut().set_mixnet_contract(contract_address)
pub(crate) fn override_config(mut config: Config, matches: &ArgMatches<'_>) -> Config {
if let Some(raw_validators) = matches.value_of("validators") {
config
.get_base_mut()
.set_custom_validator_apis(parse_validators(raw_validators));
}
if let Some(gateway_id) = matches.value_of("gateway") {
@@ -36,10 +47,6 @@ pub(crate) fn override_config(mut config: Config, matches: &ArgMatches) -> Confi
config = config.with_socket(SocketType::None);
}
if matches.is_present("vpn-mode") {
config.get_base_mut().set_vpn_mode(true);
}
if let Some(port) = matches.value_of("port").map(|port| port.parse::<u16>()) {
if let Err(err) = port {
// if port was overridden, it must be parsable
@@ -48,5 +55,26 @@ pub(crate) fn override_config(mut config: Config, matches: &ArgMatches) -> Confi
config = config.with_port(port.unwrap());
}
#[cfg(not(feature = "coconut"))]
if let Some(eth_endpoint) = matches.value_of(ETH_ENDPOINT_ARG_NAME) {
config.get_base_mut().with_eth_endpoint(eth_endpoint);
} else if !cfg!(feature = "eth") {
config
.get_base_mut()
.with_eth_endpoint(DEFAULT_ETH_ENDPOINT);
}
#[cfg(not(feature = "coconut"))]
if let Some(eth_private_key) = matches.value_of(ETH_PRIVATE_KEY_ARG_NAME) {
config.get_base_mut().with_eth_private_key(eth_private_key);
} else if !cfg!(feature = "eth") {
config
.get_base_mut()
.with_eth_private_key(DEFAULT_ETH_PRIVATE_KEY);
}
if !cfg!(feature = "eth") || matches.is_present(TESTNET_MODE_ARG_NAME) {
config.get_base_mut().with_testnet_mode(true)
}
config
}
+33 -38
View File
@@ -1,27 +1,19 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::client::config::Config;
use crate::client::NymClient;
use crate::commands::override_config;
#[cfg(feature = "eth")]
#[cfg(not(feature = "coconut"))]
use crate::commands::{ETH_ENDPOINT_ARG_NAME, ETH_PRIVATE_KEY_ARG_NAME, TESTNET_MODE_ARG_NAME};
use clap::{App, Arg, ArgMatches};
use config::NymConfig;
use log::*;
use version_checker::is_minor_version_compatible;
pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> {
App::new("run")
let app = App::new("run")
.about("Run the Nym client with provided configuration client optionally overriding set parameters")
.arg(Arg::with_name("id")
.long("id")
@@ -30,15 +22,10 @@ pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> {
.required(true)
)
// the rest of arguments are optional, they are used to override settings in config file
.arg(Arg::with_name("validator")
.long("validator")
.help("Address of the validator server the client is getting topology from")
.takes_value(true),
)
.arg(Arg::with_name("mixnet-contract")
.long("mixnet-contract")
.help("Address of the validator contract managing the network")
.takes_value(true),
.arg(Arg::with_name("validators")
.long("validators")
.help("Comma separated list rest rest endpoints of the validators")
.takes_value(true),
)
.arg(Arg::with_name("gateway")
.long("gateway")
@@ -49,23 +36,31 @@ pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> {
.long("disable-socket")
.help("Whether to not start the websocket")
)
.arg(Arg::with_name("vpn-mode")
.long("vpn-mode")
.help("Set the vpn mode of the client")
.long_help(
r#"
Special mode of the system such that all messages are sent as soon as they are received
and no cover traffic is generated. If set all message delays are set to 0 and overwriting
'Debug' values will have no effect.
"#
)
)
.arg(Arg::with_name("port")
.short("p")
.long("port")
.help("Port for the socket (if applicable) to listen on")
.takes_value(true)
);
#[cfg(feature = "eth")]
#[cfg(not(feature = "coconut"))]
let app = app
.arg(
Arg::with_name(TESTNET_MODE_ARG_NAME)
.long(TESTNET_MODE_ARG_NAME)
.help("Set this client to work in a testnet mode that would attempt to use gateway without bandwidth credential requirement. If this value is set, --eth_endpoint and --eth_private_key don't need to be set.")
.conflicts_with_all(&[ETH_ENDPOINT_ARG_NAME, ETH_PRIVATE_KEY_ARG_NAME])
)
.arg(Arg::with_name(ETH_ENDPOINT_ARG_NAME)
.long(ETH_ENDPOINT_ARG_NAME)
.help("URL of an Ethereum full node that we want to use for getting bandwidth tokens from ERC20 tokens. If you don't want to set this value, use --testnet-mode instead")
.takes_value(true))
.arg(Arg::with_name(ETH_PRIVATE_KEY_ARG_NAME)
.long(ETH_PRIVATE_KEY_ARG_NAME)
.help("Ethereum private key used for obtaining bandwidth tokens from ERC20 tokens. If you don't want to set this value, use --testnet-mode instead")
.takes_value(true));
app
}
// this only checks compatibility between config the binary. It does not take into consideration
@@ -87,10 +82,10 @@ fn version_check(cfg: &Config) -> bool {
}
}
pub fn execute(matches: &ArgMatches) {
pub async fn execute(matches: ArgMatches<'static>) {
let id = matches.value_of("id").unwrap();
let mut config = match Config::load_from_file(id) {
let mut config = match Config::load_from_file(Some(id)) {
Ok(cfg) => cfg,
Err(err) => {
error!("Failed to load config for {}. Are you sure you have run `init` before? (Error was: {})", id, err);
@@ -98,12 +93,12 @@ pub fn execute(matches: &ArgMatches) {
}
};
config = override_config(config, matches);
config = override_config(config, &matches);
if !version_check(&config) {
error!("failed the local version check");
return;
}
NymClient::new(config).run_forever();
NymClient::new(config).run_forever().await;
}
+50 -153
View File
@@ -1,24 +1,19 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::client::config::{Config, MISSING_VALUE};
use clap::{App, Arg, ArgMatches};
use client_core::config::{DEFAULT_MIXNET_CONTRACT_ADDRESS, DEFAULT_VALIDATOR_REST_ENDPOINT};
use config::defaults::default_api_endpoints;
use config::NymConfig;
use std::fmt::Display;
use std::process;
use version_checker::{parse_version, Version};
use version_checker::Version;
#[allow(dead_code)]
fn fail_upgrade<D1: Display, D2: Display>(from_version: D1, to_version: D2) -> ! {
print_failed_upgrade(from_version, to_version);
process::exit(1)
}
fn print_start_upgrade<D1: Display, D2: Display>(from: D1, to: D2) {
println!(
@@ -41,28 +36,29 @@ fn print_successful_upgrade<D1: Display, D2: Display>(from: D1, to: D2) {
);
}
pub fn command_args<'a, 'b>() -> App<'a, 'b> {
App::new("upgrade").about("Try to upgrade the client")
.arg(
Arg::with_name("id")
.long("id")
.help("Id of the nym-client we want to upgrade")
.takes_value(true)
.required(true),
)
// the rest of arguments depend on the upgrade path
.arg(Arg::with_name("current version")
.long("current-version")
.help("REQUIRED FOR PRE-0.9.0 UPGRADES. Specifies current version of the configuration file to help to determine a valid upgrade path. Valid formats include '0.8.1', 'v0.8.1' or 'V0.8.1'")
.takes_value(true)
)
fn outdated_upgrade(config_version: &Version, package_version: &Version) -> ! {
eprintln!(
"Cannot perform upgrade from {} to {}. Your version is too old to perform the upgrade.!",
config_version, package_version
);
process::exit(1)
}
fn unsupported_upgrade(config_version: Version, package_version: Version) -> ! {
eprintln!("Cannot perform upgrade from {} to {}. Please let the developers know about this issue if you expected it to work!", config_version, package_version);
fn unsupported_upgrade(current_version: &Version, config_version: &Version) -> ! {
eprintln!("Cannot perform upgrade from {} to {}. Please let the developers know about this issue if you expected it to work!", config_version, current_version);
process::exit(1)
}
pub fn command_args<'a, 'b>() -> App<'a, 'b> {
App::new("upgrade").about("Try to upgrade the client").arg(
Arg::with_name("id")
.long("id")
.help("Id of the nym-client we want to upgrade")
.takes_value(true)
.required(true),
)
}
fn parse_config_version(config: &Config) -> Version {
let version = Version::parse(config.get_base().get_version()).unwrap_or_else(|err| {
eprintln!("failed to parse client version! - {:?}", err);
@@ -97,125 +93,33 @@ fn parse_package_version() -> Version {
version
}
fn pre_090_upgrade(from: &str, mut config: Config) -> Config {
// this is not extracted to separate function as you only have to manually pass version
// if upgrading from pre090 version
let from = match from.strip_prefix("v") {
Some(stripped) => stripped,
None => from,
};
let from = match from.strip_prefix("V") {
Some(stripped) => stripped,
None => from,
};
let from_version = parse_version(from).expect("invalid version provided!");
if from_version.major == 0 && from_version.minor < 8 {
// technically this could be implemented, but is there any point in that?
eprintln!("upgrading client from before v0.8.0 is not supported. Please run `init` with new binary instead");
process::exit(1)
}
if (from_version.major == 0 && from_version.minor >= 9) || from_version.major >= 1 {
eprintln!("self reported version is higher than 0.9.0. Those releases should have already contained version numbers in config! Make sure you provided correct version");
process::exit(1)
}
// note: current is guaranteed to not have any `build` information suffix (nor pre-release
// information), as this was asserted at the beginning of this command)
//
// upgrade to current (if it's a 0.9.X) or try to upgrade to 0.9.0 as an intermediate
// step in future upgrades (so, for example, we might go 0.8.0 -> 0.9.0 -> 0.10.0)
// this way we don't need to have all the crazy paths on how to upgrade from any version to any
// other version. We just upgrade one minor version at a time.
let current = Version::parse(env!("CARGO_PKG_VERSION")).unwrap();
let to_version = if current.major == 0 && current.minor == 9 {
current
} else {
Version::new(0, 9, 0)
};
if config.get_base().get_validator_rest_endpoint() != MISSING_VALUE {
eprintln!("existing config seems to have specified new validator rest endpoint which was only introduced in 0.9.0! Can't perform upgrade.");
print_failed_upgrade(&from_version, &to_version);
process::exit(1);
}
print_start_upgrade(&from_version, &to_version);
config
.get_base_mut()
.set_custom_version(to_version.to_string().as_ref());
println!(
"Setting validator REST endpoint to to {}",
DEFAULT_VALIDATOR_REST_ENDPOINT
);
config
.get_base_mut()
.set_custom_validator(DEFAULT_VALIDATOR_REST_ENDPOINT);
config.save_to_file(None).unwrap_or_else(|err| {
eprintln!("failed to overwrite config file! - {:?}", err);
print_failed_upgrade(&from_version, &to_version);
process::exit(1);
});
print_successful_upgrade(from_version, to_version);
config
}
/*
changes:
- introduction of mixnet contract address field
- change to default validator rest endpoint
*/
fn minor_010_upgrade(
fn minor_0_12_upgrade(
mut config: Config,
_matches: &ArgMatches,
_matches: &ArgMatches<'_>,
config_version: &Version,
package_version: &Version,
) -> Config {
let to_version = if package_version.major == 0 && package_version.minor == 10 {
let to_version = if package_version.major == 0 && package_version.minor == 12 {
package_version.clone()
} else {
Version::new(0, 10, 0)
Version::new(0, 12, 0)
};
print_start_upgrade(&config_version, &to_version);
println!(
"Setting validator API endpoints to {:?}",
default_api_endpoints()
);
config
.get_base_mut()
.set_custom_validator_apis(default_api_endpoints());
config
.get_base_mut()
.set_custom_version(to_version.to_string().as_ref());
if config.get_base().get_validator_mixnet_contract_address() != MISSING_VALUE {
eprintln!("existing config seems to have specified mixnet contract address which was only introduced in 0.10.0! Can't perform upgrade.");
print_failed_upgrade(&config_version, &to_version);
process::exit(1);
}
println!(
"Setting mixnet contract address to {}",
DEFAULT_MIXNET_CONTRACT_ADDRESS
);
config
.get_base_mut()
.set_mixnet_contract(DEFAULT_MIXNET_CONTRACT_ADDRESS);
// The default validator endpoint changed
println!(
"Setting validator REST endpoint to to {}",
DEFAULT_VALIDATOR_REST_ENDPOINT
);
config
.get_base_mut()
.set_custom_validator(DEFAULT_VALIDATOR_REST_ENDPOINT);
config.save_to_file(None).unwrap_or_else(|err| {
eprintln!("failed to overwrite config file! - {:?}", err);
print_failed_upgrade(&config_version, &to_version);
@@ -227,7 +131,7 @@ fn minor_010_upgrade(
config
}
fn do_upgrade(mut config: Config, matches: &ArgMatches, package_version: Version) {
fn do_upgrade(mut config: Config, matches: &ArgMatches<'_>, package_version: Version) {
loop {
let config_version = parse_config_version(&config);
@@ -238,35 +142,28 @@ fn do_upgrade(mut config: Config, matches: &ArgMatches, package_version: Version
config = match config_version.major {
0 => match config_version.minor {
9 => minor_010_upgrade(config, &matches, &config_version, &package_version),
_ => unsupported_upgrade(config_version, package_version),
9 | 10 => outdated_upgrade(&config_version, &package_version),
11 => minor_0_12_upgrade(config, matches, &config_version, &package_version),
_ => unsupported_upgrade(&config_version, &package_version),
},
_ => unsupported_upgrade(config_version, package_version),
_ => unsupported_upgrade(&config_version, &package_version),
}
}
}
pub fn execute(matches: &ArgMatches) {
pub fn execute(matches: &ArgMatches<'_>) {
let package_version = parse_package_version();
let id = matches.value_of("id").unwrap();
let mut existing_config = Config::load_from_file(id).unwrap_or_else(|err| {
let existing_config = Config::load_from_file(Some(id)).unwrap_or_else(|err| {
eprintln!("failed to load existing config file! - {:?}", err);
process::exit(1)
});
// versions fields were added in 0.9.0
if existing_config.get_base().get_version() == MISSING_VALUE {
let self_reported_version = matches.value_of("current version").unwrap_or_else(|| {
eprintln!(
"trying to upgrade from pre v0.9.0 without providing current system version!"
);
process::exit(1)
});
// upgrades up to 0.9.0
existing_config = pre_090_upgrade(self_reported_version, existing_config);
eprintln!("the existing configuration file does not seem to contain version number.");
process::exit(1);
}
// here be upgrade path to 0.9.X and beyond based on version number from config
+2 -13
View File
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
pub mod client;
pub mod websocket;
+43 -21
View File
@@ -1,30 +1,21 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use clap::{App, ArgMatches};
use clap::{crate_version, App, ArgMatches};
pub mod client;
pub mod commands;
pub mod websocket;
fn main() {
#[tokio::main]
async fn main() {
dotenv::dotenv().ok();
setup_logging();
println!("{}", banner());
let arg_matches = App::new("Nym Client")
.version(env!("CARGO_PKG_VERSION"))
.version(crate_version!())
.long_version(&*long_version())
.author("Nymtech")
.about("Implementation of the Nym Client")
.subcommand(commands::init::command_args())
@@ -32,13 +23,13 @@ fn main() {
.subcommand(commands::upgrade::command_args())
.get_matches();
execute(arg_matches);
execute(arg_matches).await;
}
fn execute(matches: ArgMatches) {
async fn execute(matches: ArgMatches<'static>) {
match matches.subcommand() {
("init", Some(m)) => commands::init::execute(m),
("run", Some(m)) => commands::run::execute(m),
("init", Some(m)) => commands::init::execute(m.clone()).await,
("run", Some(m)) => commands::run::execute(m.clone()).await,
("upgrade", Some(m)) => commands::upgrade::execute(m),
_ => println!("{}", usage()),
}
@@ -61,7 +52,38 @@ fn banner() -> String {
(client - version {:})
"#,
env!("CARGO_PKG_VERSION")
crate_version!()
)
}
fn long_version() -> String {
format!(
r#"
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
"#,
"Build Timestamp:",
env!("VERGEN_BUILD_TIMESTAMP"),
"Build Version:",
env!("VERGEN_BUILD_SEMVER"),
"Commit SHA:",
env!("VERGEN_GIT_SHA"),
"Commit Date:",
env!("VERGEN_GIT_COMMIT_TIMESTAMP"),
"Commit Branch:",
env!("VERGEN_GIT_BRANCH"),
"rustc Version:",
env!("VERGEN_RUSTC_SEMVER"),
"rustc Channel:",
env!("VERGEN_RUSTC_CHANNEL"),
"cargo Profile:",
env!("VERGEN_CARGO_PROFILE"),
)
}
+2 -13
View File
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use client_core::client::{
inbound_messages::{InputMessage, InputMessageSender},
+12 -20
View File
@@ -1,22 +1,10 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use super::handler::Handler;
use log::*;
use std::{net::SocketAddr, sync::Arc};
use std::{net::SocketAddr, process, sync::Arc};
use tokio::io::AsyncWriteExt;
use tokio::runtime;
use tokio::{sync::Notify, task::JoinHandle};
enum State {
@@ -45,9 +33,13 @@ impl Listener {
}
pub(crate) async fn run(&mut self, handler: Handler) {
let tcp_listener = tokio::net::TcpListener::bind(self.address)
.await
.expect("Failed to start websocket listener");
let tcp_listener = match tokio::net::TcpListener::bind(self.address).await {
Ok(listener) => listener,
Err(err) => {
error!("Failed to bind to {} - {}. Are you sure nothing else is running on the specified port and your user has sufficient permission to bind to the requested address?", self.address, err);
process::exit(1);
}
};
let notify = Arc::new(Notify::new());
@@ -94,9 +86,9 @@ impl Listener {
}
}
pub(crate) fn start(mut self, rt_handle: &runtime::Handle, handler: Handler) -> JoinHandle<()> {
pub(crate) fn start(mut self, handler: Handler) -> JoinHandle<()> {
info!("Running websocket on {:?}", self.address.to_string());
rt_handle.spawn(async move { self.run(handler).await })
tokio::spawn(async move { self.run(handler).await })
}
}
+5 -16
View File
@@ -1,19 +1,8 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub(crate) mod handler;
pub(crate) mod listener;
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
pub(crate) use handler::Handler;
pub(crate) use listener::Listener;
pub(crate) mod handler;
pub(crate) mod listener;
+1 -1
View File
@@ -2,7 +2,7 @@
name = "websocket-requests"
version = "0.1.0"
authors = ["Jędrzej Stuczyński <andrew@nymtech.net>"]
edition = "2018"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+2 -13
View File
@@ -1,16 +1,5 @@
// Copyright 2020 Nym Technologies SA
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use serde::{Deserialize, Serialize};
use std::fmt;

Some files were not shown because too many files have changed in this diff Show More