Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging -> Master #4583

Merged
merged 38 commits into from
Jan 23, 2024
Merged

Staging -> Master #4583

merged 38 commits into from
Jan 23, 2024

Conversation

danield9tqh
Copy link
Member

Summary

Staging -> Master for release 1.17.0

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.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

jowparks and others added 30 commits January 16, 2024 14:12
* adds optional multiSigKeys to AccountValue

multiSigKeys includes three fields needed for an account to participate in a
FROST signing group: identifier, keyPackage, and proofGenerationKey

the identifier field is still to be determined as either a public key identifier
for the participant, or a private key from which we can derive the public key
identifier

the keyPackage is the key package generated for the participant during key
generation and contains the participant's authorizing key shard

the proofGenerationKey is a key shared by the signing group that is needed for
any participant to generate spend or mint proofs

* updates test so that spendingKey is null when multiSigKeys is defined
* accepts notes as input

* send transaction accepts notes as input

* adding test for send transaction with notes

* adding test for sending transaction with note

* moving to a slow test
* adds optional multiSigKeys to Account type

includes multiSigKeys (identifier, keyPackage, proofGenerationKey) in Account
constructor

throws an error if an account is created that includes both multiSigKeys and a
non-null spendingKey

* removes assertion from constructor

we should validate input in the import logic instead of in the constructor
…or FROST (#4551)

* split secret implementation

* adding tests

* test for split secret

* running formatter

* changing keyparts type to Vec<_>

* removing comment

* moving test to tests.rc
uses hex strings and stores multisig keys as buffers in the wallet db instead of
using utf8 strings

this more closely matches the precedent set with our other keys and may simplify
ser/de between TypeScript and Rust
* moving split secret to frost_utils

* removing unused import

* removing double &

* source code heading
* adds multiSigKeys to account imports, exports

updates bech32 and json account encoders

adds multiSigKeys to RpcAccountImport

increases account version

* fixes import test
* moves proof generation key trait to ironfish rust for better usage with external libraries

* formatting

* cleanup of ironfish-rust-nodejs usage of ProofGenerationKey

* add license
* Use createdAt as head of imported account

* Fix test about importAccount

* sets head of imported account to createdAt - 1

the head of an account refers to the latest block in the chain that the account
has scanned

createdAt refers to the head of the chain when an account was created or to the
earliest block in the chain on which an account received a transaction

when importing an account we can set the account head to the block previous to
'createdAt'. we cannot set it to createdAt because the account may have received
tokens in that block (e.g., the genesis block)

* removes extra block lookup

* fixes lint

---------

Co-authored-by: Hugh Cunningham <[email protected]>
All RPC types now have an "Rpc" prefix. This is useful so you don't mix
Rpc types unknowingly in other systems. Names now generally follow
this protocol

1. Rpc
2. Adapter (ex Socket, Ipc, Http) (Optional if applies to all protocols)
3. Server | Client (Optional if applies to both)
4. Thing (Ex Response, Error, etc)
5. Schema (Optional if this is a schema for that thing)
There's no reason to declare this variable in this scope.
This is optional and you don't need to pass it in
not sure why this is on the next line
* split_spender_key

* test stub

* moving split_spender_key to frost_utils

* publishing hash_viewing_key

* removing unused import

* spender key config

* removing comment

* no need to recreate the incoming viewkey

* asserting keys are split correctly

* directly calling thread rng

* adding test for mismatch lengths

* changing test name

* adding partial eq to errors

* adding frost error kind

* split secret returns ironfish error type

* updating tests with new error type

* removing unwrap

* changed split_secret to pub crate

* variable name changes

* vec to array helper

* asserting error type

* sorting vectors

* fixing lint error

* moving identifiers after assignment

* adding test comment

* changing split_secret to map to an ironfish error
jowparks and others added 7 commits January 22, 2024 13:00
…edTransaction`. Makes it so no new method is required for build layer (#4572)
To keep this consistent with other RPC types.
This fixes a typo pointed out in another PR
this adds a new RpcHttpClient to the SDK which allows you to make
HTTP requests against the RpcHttpAdapter.
* unsigned transaction napi

* adds unsigned transaction napi binding and test to verify ser/de works on JS side
@danield9tqh danield9tqh requested a review from a team as a code owner January 23, 2024 00:37
@danield9tqh danield9tqh merged commit ed05969 into master Jan 23, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants