-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
staging -> master #5405
Merged
Merged
staging -> master #5405
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows us to over-ride the built in OCLIF JSON flag group which exists at https://github.com/oclif/core/blob/213e9203fd7f0f5aaffdcc9eb28d2828f7679373/src/util/aggregate-flags.ts#L4C1-L7C3
This should make all the RPC flags show up in their own section in --help now.
Because it defaulted to true instead of undefined.
It will show an example to see the native currency information
This creates a standard in laying our command code.
I don't think anyone used this, and it's confusing showing up in the list.
In an attempt to make them follow the style guide
* feat(rust): Add xchacha20poly1305 functions * chore(rust): Add license header * chore(rust): Add audit for cpufeatures * chore(rust): Add audit for password-hash * chore(rust): Move crates to exemptions * refactor(rust): Use NONCE_LENGTH const
…1305 (#5217) * feat(rust,rust-nodejs): Add napi `encrypt` function for xchacha20poly1305 * chore(rust): lint rust
* feat(rust,rust-nodejs): Add napi `encrypt` function for xchacha20poly1305 * chore(rust): lint rust * feat(rust-nodejs): Add napi `decrypt` xchacha20poly1305 function
* feat(ironfish,rust-nodejs): Add EncryptedAccount class * chore(rust-nodejs): lint rust * chore(rust-nodejs): cargo clippy fix * feat(ironfish): Add test for invalid passphrase * feat(ironfish): Add error type for failed decryption
* feat(ironfish): Save encrypted accounts in the wallet * feat(ironfish): Revert storing id * test(ironfish): Fix account value test
* feat(ironfish): Add `encrypt` method for account * fix(ironfish): Remove extra KEY_LENGTH constant * test(ironfish): Fix serialization test * test(ironfish): Update fixture * feat(ironfish): Fix encrypt test for account
* update migrations descriptions, migrations list supports json * use waitForOpen instead of a try/catch for DB
Making these commands consistent with our style guide
We need to make the secret field optional to accommodate the ledger device usecase. The secret never leaves the device. We can write a migration where we add a flag that indicates if the secret exists or not. But we thought of an alternative that doesn't require a migration - store an empty buffer if the secret doesn't exist. When deserializing, if the buffer is all zeros, then you know the secret is undefined.
…ltisigSecrets Rahul/make secret optional multisig secrets
handles import of accounts where multisigKeys contains an identity, but no keyPackage adds json test case
* wip * adds helper functions to deserialize round2 public packages deserialize_round2_combined_public_package takes a serialized 'CombinedPublicPackage' from dkg round2 and returns an object containing an array of round2 public packages with all fields available as strings * dirty upgrade to frost no-std * fixes errors and warnings from error formatting throws FrostLibErrors using new_with_source to give error messages updates decryption test for new decryption error message * uses decrypt_legacy to decrypt legacy account exports we've updated encryption/decryption in the ironfish-frost crate and changed the structure of encrypted data older account exports cannot be decrypted with the current 'decrypt' method and must use 'decrypt_legacy' instead defines 'decrypt_legacy_data' on ParticipantSecret and updates account decryption to try decrypting with that method if the first decryption attempt fails * updates ironfish-frost dependency to latest commit on main * fixes rust lint in multisig.rs, removes commented-out code * broadens cargo vet audit policy for reddsa * updates cargo vet with exemptions and audits for new dependencies * updates ironfish-frost in Cargo.lock for allocation fix * uses default features from ironfish-frost * bubbles up errors as napi errors in multisig.rs instead of unwrapping * refactors derive_account_keys to return a result * removes unwrap uses * avoids mapping FrostLibErrors unnecessarily --------- Co-authored-by: Mat <[email protected]>
* feat(rust-nodejs): Create napi struct for xchacha20poly1305 key * feat(ironfish): Add xchacha namespace * feat(ironfish): Add X
Edge cases solved - cannot import an account with a name that is the same as an existing multisig identity of a different secret. - if the secret of this account is the same as of an identity in the wallet, then we can import this account.
…-identity feat: Import multisig identity during account import
* feat(rust-nodejs): Create napi struct for xchacha20poly1305 key * feat(ironfish): Store salt and nonce on encrypted account * cargo fmt * Fix imports * Fix import
merging identity and secret logic
…-without-secret feat: Import multisig hw identity
adds typescript version of test_dkg_signing example adds multisig.test.slow.ts that replicates the logic of test_dkg_signing from ironfish-rust - adds method to retrieve frost signing package from deserialized signing package - adds signingPackageFromRaw method - allows construction of signing package from identities and raw commitments (from frost, not ironfish) - adds method to NativeSigningCommitment to get raw_commitments - defines NativeSignatureShare to support deserializing ironfish SignatureShares and accessing the underlying identity and frost signature share - adds from_frost factor method to reconstruct SignatureShare from parts
…5377) * feat(ironfish): Create master key * feat(rust,rust-nodejs,ironfish): Remove old encrypt/decrypt methods * chore(rust): lint * test(ironfish): Fix tests * Fix test * fixtures
This is going to be a useful feature when we start to integrate ledger because all identities from ledger will not export their secret.
updates ironfish-frost dependency to latest commit adds napi binding for SigningCommitment::from_raw to support constructing a signing commitment from its raw parts (the signer identity, the raw commitments, and the transaction hash and list of signers for computing a checksum) removes signing_package_from_raw in favor of constructing SingingCommitments and using existing signing_package method
…pant-list-to-indicate-whether-participant
In preparation for adding ledger support to the DKG rounds, this commit adds a `--ledger` flag to the `dkg round1`, `dkg round2`, and `dkg round3` commands. This flag will be used to specify that the user wants to use a Ledger device to perform DKG operations
allows us to construct a PublicKeyPackage from the raw parts: the frost public key package, the list of signer identities, and the minimum number of signers following the round3_min changes to ironfish-frost the Ledger app will produce a raw frost public key package at the end of DKG round3, so we will need to construct the ironfish-frost PublicKeyPackage from its parts
* adds wallet/multisig/importParticipant RPC provides an RPC route for importing an existing identity and optional secret into the walletdb useful for creating a record of the identity retrieved from a Ledger device participating in DKG to generate a multisig account throws errors if the identity already exists in the walletdb or if the name is already in use for another identity or account * fixes importParticipant test
uses walletDb.getMultisigIdentityByName instead of looking up secret by name since some identities may not have secrets (i.e., identities created using Ledger) these identities won't be found when looking identities up using walletDb.getMultisigSecretByName
throws RPC errors with recognizable error codes allows CLI to hadnle RPC errors more easily
patnir
approved these changes
Sep 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Testing Plan
Documentation
Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference)? If yes, link a
related documentation pull request for the website.
Breaking Change
Is this a breaking change? If yes, add notes below on why this is breaking and label it with
breaking-change-rpc
orbreaking-change-sdk
.