* Constructing `EpochRewardParams` with proper staking_supply
* Query for current staking supply
* More crate visibility on epoch reward params
* unused import
* Remove duplicate save of epoch_reward_params
* test fixes
* Changelog
* Moved PR references to correct section
* cargo fmt
* Removed old migration code
* Adding simple hardware info reporting to the mixnode HTTP API
* Adding sgx availability as another example field
* Added sysinfo crate for addtitional simple hardware reporting
* Added reporting on number of cpu cores and available ram
* Cleanup of unused struct
* Fixing merge conflict
* Checking for supported system before using sysinfo
* Breaking commit containing additional types
...and a painfully wrong implementation of the SMT processor cores type.
* Handling unavailable brand string
* Fixed getting SMT logical processor count
* Rebase with develop + cleaned up changelog
* unused import
Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
* Make gateway mnemonic optional
* Remove unnecessary timer struct
* Prepare for code reuse
* Use trait for stats collector
* Put trait definition in common crate
* Gateway stats runner
* Custom statistics url arg
* Build & send stats req to url
* Storage support for new stats type
* Make gateway stats opt in
* Test&clippy fixes
* CHANGELOG update
* wip checking ts-package
* adding the validation to the identity form field
* changing the error message
* changing node oversaturated error mss
* adding oversaturated modal blocker
* adding error colour to palette, and styles to basic modal
* wip
* wip
* some refactor
* dont validate field till we have api response
* fix typo
* adding line break
* catch error when node is not valid
* handle error out of the field component
* removing logs
* Adding disableCompoundRewards prop in DelegationsActionsMenu
* Adding disableCompoundRewards to DelegationsActionsMenu
* refactor validation
* Revert some not needed changes
* adding line break
* adding stories
Co-authored-by: fmtabbara <fmtabbara@hotmail.co.uk>
* Add TODO reminders to implement vesting contract checks for operator reward compounding and redemption
* Add tauri operation to compound and redeem for locked and unlocked tokens
* Remove rewards from delegations context
* Claim and compound rewards for rewards context
* Delegations modal handles multiple transactions and can show the vested token balance (when present)
* Integrate changes to reward and delegation contexts
* Remove unused files
* Fix eslint errors
* Regenerate types
* Add tauri operation to undelegate using the mixnet and vesting contracts for a mixnode, producing two txs
* Fix up undelegation for mixed mixnet and vesting contract delegations
* Changelog grooming
* Update changelog
* feat(wallet): style changes to match new design
* fix(wallet): style
* feat(wallet): remove useless color
* feat(wallet): some style changes
in balance page, show entire address
set a small size to avatar account
set vertical alignment to start for page cards
* feat(wallet): fix padding
* Delegation UI:
Update QA vars
fmt
re-map coin type for qa
add correct bech32 address as the network-explorer-api was complaining
clean up
fmt
Delegation components
Show delegation story on paper
Remove actions header from delegations list
Add copy to clipboard for delegation list node ids
Move tooltip
Modals
Extract modal styles
Fix exports
Rewards summary and redeem modal
Factor out simple modal
Delegations actions modals: delegate, delegate more, undelegate
Coin mark and move logo stories
Rust types
React components handle currency
Form field to enter and display an Identity Key
Fix up build order
Update README
Flat buttons
End adornment
Currency form field
Add more props
Export components
Add currency and mixnode fields
Group stories into folders and add flow
Change exports from shared packages to stop webpack bundling issues
Fix logo import
Add mock for tauri api in storybook that shows a console error for operations that are not mocked
Delegations views and routes for wallet
Delegations list show pending delegations and undelegations
wip - delegations page status
Add typescript type checking to storybook webpack config and more mocks for tauri
Add more interstitial states and confirmation modals
Copy change
Move config to inside source tree
Fix up `Console` typings
Add wrapper around Tauri `invoke` that logs operations in development mode
wip
wip
wip
ts-rs: remove old files
ts-rs: update paths to `ts-packages/types`
ts-rs: remove old files
ts-rs: export new types to `ts-packages/types`
Add `MajorCurrencyAmount` to convert to and from TS types for various backend currency types
New crate `nym-types` to provide types for frontend apps (wallet, explorer, etc)
wip
update type imports and fix some lint errors
update packages
update type imports
update type imports
update type imports
update type imports
start pulling out use of minorMajor and majorMinor
update type imports
update import
Add missing types generated by ts-rs
fix types
Adding denom to account
type updates
Handle micro currency denoms
Fix type conversion mistake
Add clean target
eslint: formatting
Update React currency components to use `MajorCurrencyAmount`
Add separators and extra props to currency components
replace currency mapper with denom returning from service
Adjust type while generation is broken
start integrating new CurrencyFormField component
update balance and vesting on client change (not only client address)
Fix up conversion from cosmwasm coin to major currency for minor denoms
Fix up typings and validations to remove more `Coin` usage
fix conflict
fix delegations form
start fixing validation
type update
remove console log
tidy up
remove more unused types
remove more unused types
Fix `Coin` denom to be `minor`
Fix up to minor_cosmos_coin
Fix up send
Remove `Coin` type
Fix up exported types
start delegation UI
more UI work
close actions modal on action select
update label
fix old delegateion form
minor updates
undo change to currency in stringD
Fix up types
Add feature flag for generating typescript
Generate types behind feature flag
Use custom cli tool to export `ts-rs` types
`ts-rs-cli` moves files into place and fix up `Makefile`
Update generations target
Add missing types for generation
Generate typescript types
reorder imports
use make generate-typescript for new types + type import updates
update types
Add delegate with everything
Add get block to nymd client
More conversions
Get a big list of delegations with lots of stuff
Add `avg_uptime_percent`
component api updates
ui updates and fixes
Add delegation history and pending events
Fix up addition
Fix up pending delegation event types
Filter pending delegation events
add history and pending events
set total delegations
rebase
fix breaking type change on delegate page
Fix mixnode mapping
Add back refresh and set periodic refresh
upgrade to react router 6
Add logging
Export new types for gas and transactions
increase container size!
add sendtx type
update onOK to return MAjorCurrencyAmount
align table items
display dash if amount not availble
work on delegate and undelegate
Make serializable
More types
Fix up errors
align item icon
type updates
Add operation to get all pending delegation/undelegation events
Fix up logging
Add more logging
Fix undelegate error
get pending delegation events
remove unused import
* Fix rebase errors
* Integrate fees changes:
- make operations available as requests (typed with any for now, needs changing)
- move `FeeDetails` to `common/types`
- mock `getGasFee()`
* get wallet balance after transactions
* fix duplicate key
* use token pool selector
* update wording
* Created nymd internal coin
* spell delegations correctly!
* Additional From implementations plus a constructor
* try_add
* Changed client API to use the new coin type
* CoinConverter trait
* Made wallet compilable with the recent changes
* Simplified the API by removing the generics in favour of explicit Coin type
* Fixed validator api
* integrate modal divider with modal component
* handle undelegation of locked tokens
* only return events table if there are events
* Fixed up tests and clippy
* Refactored missed coin-generic API methods
* changelog
* refresh on network or client details change
* Bunch of temporary workaround to have wallet working-ish
* Add claim and compound wallet endpoints, proc_macro to generate execute and simulate
* CHANGELOG
* Sort CHANGELOG lines
* PR comments
* allow sorting of pending events
* fix lint errors
* handle page overflow
* handle reedem and vesting redeem requests
* set up compound rewards
* refresh locked tokens on page load
* remove old delegations pages + remove settings modal + update network explorer url
* update validation for hostname (prevent leading spaces)
* add compound success case
* display est fee until new simulations are used
* fix up coin validation
* tommy fixes
* Show app version at bottom of nav
* Show admin page when account matches account id from `.env` file `ADMIN_ADDRESS` map. Value is fetch from GH Actions secrets at build time.
* Update change log
Co-authored-by: tommy <tommyvez@protonmail.com>
Co-authored-by: Mark Sinclair <mmsinclair@gmail.com>
Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
Co-authored-by: durch <durch@users.noreply.github.com>
* Replace client address with service address
* Copy over the server parts of the statistics server
* Separate API in module
* Rename struct
* Add insertion endpoint
* Remove unused code from network requester
* Box big rocket error
* Remove the feature-specific code
* Construct http req
* Clippy + Cargo.lock update
* Re-added needed sqlx feature
* Wrap http req in ordered msg
* Add http headers
* Move common api functionality into the separate crate
* Make stats server address configurable, especially for testing
* Update changelog
* Fix clippy
* Help command update
* mixnode: add graceful notification to most tasks
* Add note about remaining work
* task/shutdown: add shutdown timer
* changelog: add entry for shutdown
* mixnode: revert some temp changes
* common/task: make sure to use latest tokio
* Add coconut verifier structure for coconut protocol in gateway
* Add endpoint for validator-api cred verification
* Remove unused signature field
* Register new endpoint
* Improve validator-api config handling
* Aggregate verif result from all apis
* Simplify aggregate functions
* Verify cred on apis correctly
* Introduced coconut bandwidth contract to validator client
* Fix rebase double import
* Fix clippy on non-coconut
* Add multisig contract address to validator client
* Refactor Credential struct
* Do bincode magic in the coconut interface
* Implement serialization for credential and remove bindcode
* Fix clippy and don't remove dkg
* Client release funds proposal
* Add wrapper for blinded serial number
Also compare theta with a blinded serial number (in base 58 form)
for future double spend protection.
* Only post blinded serial number to blockchain
* Validator api propose credential spending
* Fix wallet
* Gateway calls proposal creation
* Query for proposal in verify coconut
* Remove db from git
* Verify against proposal description
* Validator apis vote based on verification of cred
* Fix wallet fmt
* Execute the release of funds
* Fix translation between token and bytes
* Update CHANGELOG
* Removed Add/Sub that somehow got brought back in a merge
* Created 'get_old_and_incorrect_hardcoded_fee' to make wallet as it did before
* Brought back all Operation variants just in case
* Created nymd internal coin
* Additional From implementations plus a constructor
* try_add
* Changed client API to use the new coin type
* CoinConverter trait
* Made wallet compilable with the recent changes
* Simplified the API by removing the generics in favour of explicit Coin type
* Fixed validator api
* Fixed up tests and clippy
* Refactored missed coin-generic API methods
* changelog
* Add more data to reward-estimate response
* Fix uptime integer division error
* typo
* Reify tuple response
* Fix uptime calculation
* Use lambda and sigma instead of ticked versions for delegator and operator rewards calculation
* Changelog
* Updated cosmrs
* Simpler fmt::Display for Operation
* Adjusted GasPrice parsing test due to changes in Denom FromStr impl
* Removed direct dependency on cosmrs in the wallet
* Removed TryFrom<GasPrice> for Coin as it didn't make much sense
* disgusting workaround for providing serde for fee
* NymdError improvements
* Ability to simulate "send"
* Removed needless conversions
* Changedi nterface to "normal" send to account for new fee
* Removed outdated imports in tests
* Removal of 'Operation' enum
* Implemented simulate endpoints for all other txs
* Added abci::Data field to ExecuteResult
* optional serde support for ed25519 keys
* optional serde support for x25519 keys
* actually calling dotenv at validator API startup
* Added STATE_DENOM network specific constant
* unit test fixes
* Send message from service provider to stats service
* Put some actual data in stats
* Put stats sender on its own thread and send response data too
* Use SQLite for storing stats
* Add the data interval and timestamp
* Fix clippy
* Set description at boot
* Guard stats service functionality under a feature for now
* Make stats service address data into consts
* Add README to network requester
* Retrieve sql data in interval
* Expose sql data via rocket rest api
* Add entry to changelog
* wallet: add support for validator nymd name
* changelog: add entry for wallt validator name
* rustfmt
* wallet: keep nymd_name entirely on wallet side
* wallet: lint fixes
* adding delegators number info on mixnode details
* add PM, Delegators and Avg. Uptime fields to the node list hardcoded
* make delegations number dynamic
* fixing bg color bug
* wip node info statistics
* adding basic tooltip new section and some ui
* tooltip customisation
* progress bar styles
* remove not used import
* fix info icons color
* remove discord icon
* Economic dynamics stats endpoint on the explorer API with dummy fixture data
* fetching economic-dynamics-stats
* Populating the endpoint with real data aggregated from validator api
* Introduced new cache functionalities
* using explorer-api data
* adding marging profit
* adding average update
* Update network-explorer.yml
* adding more info on mix nodes page
* display only part of wallet and node id
* typo
* remove log
* adding new values on node response and fix a typo
* remove delegators number column
* Endpoints for average mixnode uptime
* remove TODO
* Clippy
* some ui fixes for percentage linear progress
* GitHub Actions: build storybook for the Network Explorer and add to notification
* Fix file extension to `.ts`
* Fix up formatting and types
* Add storybook
* Add story for mix node details economics
* Fix unused warning
* adding percentage symbol on uptime in mix nodes
* Change eslint config
* some refactor
* progress bar story
* wip refactoring
* more refactor
* adding empty state to the story
* change default values for empty state
* refactor naming and progress bar contrast
* adding hardcoded selection chance and update the storybook
* adding selection chance stories
* adding the progress bar back
* tooltip button padding fix
* Endpoints for average mixnode uptime
* Fix unused warning
* Rustfmt
* moking selection chance response and new colors
* remove log
* fix camelCases issue
* remove hardcoded code
* remove avg_uptime at mixnodes table
* Add jsonchema to uptimeresponse struct
- add the route for avg_uptimes
* adding space between words
* update selection chance colours
* adding the 2 missing tooltips
* fix up uptimeresponse
* fix duplicate entry
* fmt
* validator-client: use statement
* explorer: PR requests
Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
Co-authored-by: Fouad <fmtabbara@hotmail.co.uk>
Co-authored-by: Jon Häggblad <jon.haggblad@gmail.com>
Co-authored-by: Mark Sinclair <mmsinclair@gmail.com>
Co-authored-by: tommy <tommyvez@protonmail.com>
* workflow: add wallet rust ci job
* workflow: remove not used matrix file
* workflow: add wallet rust part to nightly build
* workflow: add nym-wallet to step names
* workflow: tweak wallet names
* workflow: run on ubuntu-latest
* workflow: skip sccache
* workflow: tweak name
* workflow: switch back to self-hosted tag
* Bumped up version numbers to 1.0.1
* Updated changelog attempting to use new format
* Bumped up wallet version number
* Updated changelog attempting to use new format
* Updated tauri version
* Broadcast tx in a sync mode and poll for its inclusion
* Adjusted internal type used in TauriTxResult
* Re-exported MsgSend
* Increased polling rate + removed print
* Fix gateway test wallet address
Since we're switching to mainnet as default, use the correct wallet
address format.
* Fix other test with prefix problems
* Passing proxy value when attempting to compound delegator reward
* Do not attempt to delegate reward to mixnode if its zero
* Additional guards against sending 0 tokens
* Removed sign of sloppiness
* Fixes to rewards and delegation events storage
* Remove block count check, epoch cannot be advanced while in progress
* Add reward compound ops to vesting contract
* Migration to remove 0 value delegationns
Co-authored-by: durch <durch@users.noreply.github.com>
* Utility for parsing Vec<ProtoCoin>
* Support for different types of vesting accounts
* Derived Debug for Account
* Exposed method for querying for account details
* Renamed ibid. to a more appropriate name
* Import cw3-flex-multisig and cw4-group contracts
* Add release_funds to coconut-bandwidth-contract
* Create contract.rs file
* Add cw multi test and a test that uses it
* Use mnemonic for coconut mode too
* Stricter access to config file, which contains mnemonic
* Update tests
* Remove signed deposits dir after merging that into sql db
* Clippy nits
* More clippy
* Remove backtraces features to pass clippy tests
* Merge the same mnemonic for rewarding and coconut
* Simplify things, letting network monitor use testnet-mode with gateways
* Unify the nymd clients
* Sqlx common storage for buying/consuming credentials
* Link credential storage to credential client
* Trigger rewarded_set update on bootstrap error
* Fix bug on message signing
* Simplify coconut feature in code and set it in validator-api
* Update some local consts
* Link clients to credential storage
* Simplify sql query and change socks5 too
* Update attr handling such that public ones are usable
* Normalize test addresses
* Fix clippy
* Merge storages for (non)coconut creds
* Fmt miss
* Disable wasm client support for now
Co-authored-by: durch <durch@users.noreply.github.com>
* Cosmwasm beta6 => beta8 upgrade
* Introducing additional unique index constraint on sphinx key
* Unit test for checking for duplicate sphinx key
* Fixed other unit tests due to changed constraint
* Work in progress NIDKG
* Encryption of multiple shares
* Extracted baby-step giant-step lookup table as a separate entity
* Proof of discrete log
* Adjusted discrete log domainn
* Producing proof of log during keygen
* Zeroize for epoch
* Proof of secret sharing
* empty main for compiler appeasement
* Construction of proof of chunking
* Initial untested verification of proof of chunking
* Converted chunk responses from Scalar to u64
* Additional tests for proof of chunking
* Minor cleanup and reorganisation
* Fixed enc/dec to use f0
* Deriving node coverage of required tree nodes
* Finally seemingnly working encryption under nonzero epoch
* Branch park
* Decryption key updates to specified epochs
* Ciphertext integrity checks
* Progress in integration tests
* Fixed ciphertext combining and integration test
* Dealing type and simplification of the integration test
* Benchmark for creation of baby-step-giant-step lookup table
* Initial import cleanup + broken 2nd integration test
* Using correct assertions in the integration test (and correctly combining shares)
* Removed unused modules
* Changed proof of sharing to allow for node indices being different from [1,2,...n]
* Reorganised bte module
* Benchmark for g2 precomputation
* Created more strongly typed Epoch type
which is essentially a Tau such that it is a leaf node
* Extending tau with a temporary oracle output
* Using random oracle for tau extension
* More benchmarks!
* encryption-related benchmarks
* Serialization of PublicKeyWithProof
* Typos
* Removed any changes made in validator-api or smart contracts
* Made the integration test slightly more concise
* Further purge of unused modules
* Fixed combining share to use lagrangian interpolation
* Recovery of verification keys from the dealings
* Verification key verification + extended integration tests
* Fixed Tau not being included in digest for producing Tau_h
* Tau serialization
* Serialization of a BTE Node
* Serialization of DecryptionKey
* Serialization of PublicCoefficients
* Utility method for setting constant coefficient of a polynomial
* Serialization of Ciphertexts
* Serialization of Proof of Secret Sharing
* Serialization of Proof of Chunking
* Serialization of Dealing
* Adjusted capacity of responses_r in proof of chunking
* Made notation more consistent with the paper equivalents
* Optional arguments for creating/verifying resharing dealings
* Have reward set updater run its own timer (#1200)
* Have reward set updater run its own timer
* Filter rocket log spam
* Take last day of uptime for rewarding (#1202)
* Take last day of uptime for rewarding
* Rejigger calculations
* Blacklist based on last 24 hr
* Cleanup
* Clippy
* Additional, more informative routes
* Improve blacklist updates
* Fix rewards estimation
* wallet: support multiple accounts per encrypted login
Rework wallet storage to allow grouping accounts under a single
encrypted entry, in a way that is backwards compatible.
* wallet: remove commented out lines
* Economic dynamics stats endpoint on the explorer API with dummy fixture data
* Populating the endpoint with real data aggregated from validator api
* Introduced new cache functionalities
* new password flow
* update global error and load state from children
* fix linting
* dont load account when creating mnemonic
* wallets: provide placeholder functions for ui password
* wallet: platform_constants
* wallet: swap println to log
* UI for existing mnemonic to be use
* wallet: inline encryption of wallet file
* wallet: tweak error enum names
* wallet: general wallet_storage tidy
* wallet: tweak some type names
* create sign-in context
* update sign in functions
* move state to context
* update pages
* connect new rust methods with frontend
* update components
* remove non-existent method
* add separate sign in pages for mnemonic and password
* add a hook for clipboard copy
* fix workmark svg sizing issue
* create step component
* use new sign in pages
* reorder pages
* use clipboard lib directly
* ui tweaks
* use login type selector
* update password strength test + use autofocus prop for password input
* start adding routes
* restructure with routes
* wip
* more wip
* more wip
* reset state where required
* minor flow updates
* validate version (any valid semver version)
* reset error on page move
* flow tweaks
* content update
Co-authored-by: Jon Häggblad <jon.haggblad@gmail.com>
* new password flow
* update global error and load state from children
* fix linting
* dont load account when creating mnemonic
* wallets: provide placeholder functions for ui password
* wallet: platform_constants
* wallet: swap println to log
* UI for existing mnemonic to be use
* wallet: inline encryption of wallet file
* wallet: tweak error enum names
* wallet: general wallet_storage tidy
* wallet: tweak some type names
* create sign-in context
* update sign in functions
* move state to context
* update pages
* connect new rust methods with frontend
* update components
* remove non-existent method
* add separate sign in pages for mnemonic and password
* add a hook for clipboard copy
* fix workmark svg sizing issue
* create step component
* use new sign in pages
* reorder pages
* use clipboard lib directly
* ui tweaks
* use login type selector
* update password strength test + use autofocus prop for password input
* start adding routes
* restructure with routes
* wip
* more wip
* more wip
* reset state where required
* wallet: remove unused rust use statements
* fix unbond page
Co-authored-by: fmtabbara <fmtabbara@hotmail.co.uk>
Co-authored-by: Jon Häggblad <jon.haggblad@gmail.com>
Co-authored-by: Tommy Verrall <tommyvez@protonmail.com>
* 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
* Add placeholder client for implementing coconut interactions
* Add db for persistance
* Add nymd client
* Add new coconut-bandwidth contract
* Call deposit function
* Introduce error handling
* Call the old flow of getting a signature
* List available tx hashes
* Add signed req in body
* Save signature received
* Add event generation
* Checks in validator-api
* Fail with error instead of panic in validator-api route
* Fix contract address and small bug
* Add file db for storing previous signatures
* Encrypt and store data in validator-api
* Decrypt the received signature
* Remove tx hashes after getting credentials
* Small listing changes in client
* Change response so that it easier to serialize
* Error message is sent to client for display
* Remove already signed error and return the previous sig
* Merge signature with deposit data in client
* Entrypoint for getting the encrypted signature
* Refactor blinding stuff so that it can be backed up
* Backed up the blind sign request
* Client can re-request the encrypted signature shares
* Update crypto features
* Fix clippy
* Activate instantiate test and remove unused code
* Add tx tests
* Add verification key endpoint test
* Voucher consistency test
* Test for some errors and a race condition on blind signing
* Refactor and add client trait for enabling better testing env
* Test some more of blind sign
* Finished testing all extract_encryption_key paths
* Split into function test and endpoint test
* Test for correct signature
* Test for state functions
* Remove print
* Test blind_sign endpoint
* Test for cached signature endpoint
* Stricter types in voucher
* Rename signature with partial_bandwidth_credential
* Extra route levels
* Length check and remove some unused code from coconut interface
* Renamed coconut-bandwidth common crate
* Renamed verification_key to identity_key
* Use const instead of hardcoded values
* Use type aliases for crypto algorithms
* Remove unused mods, until needed
* Remove unneeded unwrap
* Fix some coconut issues that were blocking the wasm client build
* Move from sled to existing sql database
* Update tests for new db type
* Fix wasm for coconut too
* Remove sled from dependencies
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
* 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
* 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
* 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>
* 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>
* 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
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.
* 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
* 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>
* 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>
* 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
* 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
* mixnode: make command modules private
* mixnode: make some node modules private
* mixnode: make config structs private
* mixnode: restore accidentally moved function
* 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>
* 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'
* 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
* 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>
* 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
* 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
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.
* 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>
* 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
* 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
* 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>
* 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
* 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.
* 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
* 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
* 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
* 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
* 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>
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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>
* 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>
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.
* 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>
* Introduces query for contract build information
* Removed temporary test garbage
* Removed unused imports in validator-client if built without nymd-client feature
* 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>
* 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>
. 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.
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.
@@ -13,7 +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 (currently in development)- a desktop wallet implemented using the [Tauri](https://tauri.studio/en/docs/about/intro) framework.
* nym-wallet - a desktop wallet implemented using the [Tauri](https://tauri.studio/en/docs/about/intro) framework.
@@ -21,12 +21,15 @@ 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/0.11.0/overview/index/).
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.
@@ -37,36 +40,40 @@ Node, node operator and delegator rewards are determined according to the princi
|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 plaged 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` in testnet Milhon.
|<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 `active set` size, and set to 5000 in testnet Milhon.
|<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 testnet Milhon.
|<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 Nym for testnet Milhon.
|<img src="https://render.githubusercontent.com/render/math?math=R#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}R#gh-dark-mode-only">|global share of rewards available, starts at 2% of the reward pool.
|<img src="https://render.githubusercontent.com/render/math?math=R_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}R_{i}#gh-dark-mode-only">|node reward for mixnode `i`.
|<img src="https://render.githubusercontent.com/render/math?math=\sigma_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}\sigma_{i}#gh-dark-mode-only">|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}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}\lambda_{i}#gh-dark-mode-only">|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}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}\omega_{i}#gh-dark-mode-only">|fraction of total effort undertaken by node `i`, set to `1/k`.
|<img src="https://render.githubusercontent.com/render/math?math=k#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}k#gh-dark-mode-only">|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#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}\alpha#gh-dark-mode-only">|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}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}PM_{i}#gh-dark-mode-only">|declared profit margin of operator `i`, defaults to 10% in.
|<img src="https://render.githubusercontent.com/render/math?math=PF_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}PF_{i}#gh-dark-mode-only">|uptime of node `i`, scaled to 0 - 1, for the rewarding epoch
|<img src="https://render.githubusercontent.com/render/math?math=PP_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}PP_{i}#gh-dark-mode-only">|cost of operating node `i` for the duration of the rewarding epoch, 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)">
<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)#gh-light-mode-only">
<img src="https://render.githubusercontent.com/render/math?math=\color{white}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)#gh-dark-mode-only">
If you're here because you're trying to figure out how to notify us of a security issue, go to Discord, and alert the core engineers:
Dave Hrycyszyn futurechimp#5430
Drazen Urch drazen#4873
Jedrzej Stuczynski "Jedrzej | Nym#5666"
Please avoid opening public issues on GitHub that contain information about a potential security vulnerability as this makes it difficult to reduce the impact and harm of valid security issues.
1. Go to https://fonts.google.com/specimen/Open+Sans
2. Add all the styles you want and select `@import`
3. Copy the url (e.g. curl https://fonts.googleapis.com/css2\?family\=Open+Sans:ital,wght@0,300\;0,400\;0,500\;0,600\;0,700\;0,800\;1,300\;1,400\;1,500\;1,600\;1,700\;1,800\&display\=swap)
4. Run `curl curl https://fonts.googleapis.com/css2\?family\=Open+Sans:ital,wght@0,300\;0,400\;0,500\;0,600\;0,700\;0,800\;1,300\;1,400\;1,500\;1,600\;1,700\;1,800\&display\=swap`
5. Use the response as the CSS import directives and download the font files for each font weight
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.