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 #4626

Merged
merged 34 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dacf5c0
Remove customNetwork config value (#4568)
danield9tqh Jan 23, 2024
84d1e19
removes nonces from round one output (#4591)
hughy Jan 23, 2024
e904551
split spender key takes a borrowed sapling key (#4590)
patnir Jan 23, 2024
f63d9fc
Pool validates FishHash blocks (#4589)
danield9tqh Jan 23, 2024
813d1bd
Rahul/ifl 2084 unspent note hashes sorted by value (#4525)
patnir Jan 23, 2024
76c3e59
Rahul/ifl 2014 create napi function to split a secret (#4592)
patnir Jan 23, 2024
ae0a432
adds napi binding for signing package (#4593)
hughy Jan 24, 2024
fa8481e
feat(IFL-2051): Add frost signing function (#4546)
jowparks Jan 24, 2024
b0e43eb
napi binding for sign frost (#4594)
jowparks Jan 24, 2024
a439b2c
fixes napi binding for frost round two (#4597)
hughy Jan 24, 2024
c0c71d3
adds build method to rawTransaction (#4596)
hughy Jan 24, 2024
b1f7a21
public key randomness napi binding (#4598)
patnir Jan 24, 2024
990e698
Factor out RPC tests into a standard test suite (#4585)
NullSoldier Jan 24, 2024
193cb6f
feat: enable rpc.tcp automatically if tcp port or host is provided (#…
jowparks Jan 24, 2024
7b0109f
adds frost participant napi bindings (#4599)
hughy Jan 25, 2024
eec7458
updates test to validate you can import an account with the same view…
patnir Jan 25, 2024
84fe53b
Make config networkDefinitionPath static (#4603)
danield9tqh Jan 25, 2024
86ca87a
Feat/ifl 2132/multisig integration (#4602)
patnir Jan 25, 2024
2127064
fixes flaky filestore test (#4600)
patnir Jan 25, 2024
62ccd5e
Add new PrefixArrayEncoding (#4604)
NullSoldier Jan 25, 2024
27a29e9
chore: updates split secret location, also uses key based approach fo…
jowparks Jan 25, 2024
256c9e3
Remove networkId config value (#4610)
danield9tqh Jan 25, 2024
318a71c
Add timeouts back to RPC tests (#4609)
NullSoldier Jan 25, 2024
2f0d849
updates ParticipantSecret napi with serde (#4607)
hughy Jan 25, 2024
0e6dba8
feat: create trusted dealer key packages rpc (#4611)
jowparks Jan 25, 2024
4f64729
adds test of simple transaction signing (#4606)
hughy Jan 26, 2024
882c7b8
Use typed versions of default network definitions (#4613)
danield9tqh Jan 26, 2024
a59fcbd
Rahul/ifl 2052 add walletmultisigcreatesigningcommitment (#4615)
patnir Jan 26, 2024
59664c2
adds UnsignedTransaction primitive (#4619)
jowparks Jan 26, 2024
c7b87c6
simplifies signing commitment test (#4622)
patnir Jan 27, 2024
489d83f
Combine networks into network files (#4623)
NullSoldier Jan 27, 2024
e4c7c45
Require Node.js 20 for tests in README (#4612)
dguenther Jan 27, 2024
040bb17
filestore handles empty file (#4625)
patnir Jan 28, 2024
da6dd2b
Bump SDK to 1.18.0 (#4627)
NullSoldier Jan 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ See https://ironfish.network

The following steps should only be used to install if you are planning on contributing to the Iron Fish codebase. Otherwise, we **strongly** recommend using the installation methods here: https://ironfish.network/use/get-started/installation

1. Install [Node.js LTS](https://nodejs.org/en/download/)
1. Install [Node.js 20 LTS (or greater)](https://nodejs.org/en/download/).
1. Install [Rust](https://www.rust-lang.org/learn/get-started).
1. Install [Yarn](https://classic.yarnpkg.com/en/docs/install).
1. Windows:
Expand Down Expand Up @@ -52,6 +52,8 @@ Once your environment is set up - you can run the CLI by following [these direct

## Running Tests

> **Note:** Running tests requires Node.js 20 or greater.

1. To test the entire monorepo:
1. Run `yarn test` at the root of the repository
1. Run `yarn test:slow` in ./ironfish/ to run slow tests
Expand Down
6 changes: 3 additions & 3 deletions ironfish-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ironfish",
"version": "1.17.0",
"version": "1.18.0",
"description": "CLI for running and interacting with an Iron Fish node",
"author": "Iron Fish <[email protected]> (https://ironfish.network)",
"main": "build/src/index.js",
Expand Down Expand Up @@ -62,8 +62,8 @@
"@aws-sdk/client-s3": "3",
"@aws-sdk/client-secrets-manager": "3",
"@aws-sdk/s3-request-presigner": "3",
"@ironfish/rust-nodejs": "1.14.0",
"@ironfish/sdk": "1.17.0",
"@ironfish/rust-nodejs": "1.15.0",
"@ironfish/sdk": "1.18.0",
"@oclif/core": "1.23.1",
"@oclif/plugin-help": "5.1.12",
"@oclif/plugin-not-found": "2.3.1",
Expand Down
4 changes: 4 additions & 0 deletions ironfish-cli/src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ export abstract class IronfishCommand extends Command {
const rpcTcpHostFlag = getFlag(flags, RpcTcpHostFlagKey)
if (typeof rpcTcpHostFlag === 'string') {
configOverrides.rpcTcpHost = rpcTcpHostFlag
configOverrides.enableRpcTcp = true
}

const rpcTcpPortFlag = getFlag(flags, RpcTcpPortFlagKey)
if (typeof rpcTcpPortFlag === 'number') {
configOverrides.rpcTcpPort = rpcTcpPortFlag
configOverrides.enableRpcTcp = true
}

const rpcConnectHttpFlag = getFlag(flags, RpcUseHttpFlagKey)
Expand All @@ -152,11 +154,13 @@ export abstract class IronfishCommand extends Command {
const rpcHttpHostFlag = getFlag(flags, RpcHttpHostFlagKey)
if (typeof rpcHttpHostFlag === 'string') {
configOverrides.rpcHttpHost = rpcHttpHostFlag
configOverrides.enableRpcHttp = true
}

const rpcHttpPortFlag = getFlag(flags, RpcHttpPortFlagKey)
if (typeof rpcHttpPortFlag === 'number') {
configOverrides.rpcHttpPort = rpcHttpPortFlag
configOverrides.enableRpcHttp = true
}

const rpcTcpTlsFlag = getFlag(flags, RpcTcpTlsFlagKey)
Expand Down
11 changes: 4 additions & 7 deletions ironfish-cli/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,19 +201,16 @@ export default class Start extends IronfishCommand {
'Cannot specify both the networkId and customNetwork flags at the same time',
)
}
if (networkId !== undefined && networkId !== this.sdk.config.get('networkId')) {
this.sdk.config.setOverride('networkId', networkId)
}
if (customNetwork !== undefined && customNetwork !== this.sdk.config.get('customNetwork')) {
this.sdk.config.setOverride('customNetwork', customNetwork)
}

if (!this.sdk.internal.get('telemetryNodeId')) {
this.sdk.internal.set('telemetryNodeId', uuid())
await this.sdk.internal.save()
}

const node = await this.sdk.node()
const node = await this.sdk.node({
customNetworkPath: customNetwork,
networkId,
})

const nodeName = this.sdk.config.get('nodeName').trim() || null
const blockGraffiti = this.sdk.config.get('blockGraffiti').trim() || null
Expand Down
1 change: 1 addition & 0 deletions ironfish-rust-nodejs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ironfish = { path = "../ironfish-rust" }
ironfish_mpc = { path = "../ironfish-mpc" }
napi = { version = "2.13.2", features = ["napi6"] }
napi-derive = "2.13.0"
rand = "0.8.5"

[build-dependencies]
napi-build = "2.0.1"
32 changes: 25 additions & 7 deletions ironfish-rust-nodejs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

/* auto-generated by NAPI-RS */

export interface RoundOneSigningData {
nonceHiding: string
nonceBinding: string
commitmentHiding: string
commitmentBinding: string
export interface SigningCommitments {
hiding: string
binding: string
}
export function roundOne(keyPackage: string, seed: number): RoundOneSigningData
export function roundOne(keyPackage: string, seed: number): SigningCommitments
export function roundTwo(signingPackage: string, keyPackage: string, publicKeyRandomness: string, seed: number): string
export function splitSecret(coordinatorSaplingKey: string, minSigners: number, maxSigners: number, identifiers: Array<string>): TrustedDealerKeyPackages
export function contribute(inputPath: string, outputPath: string, seed?: string | undefined | null): Promise<string>
export function verifyTransform(paramsPath: string, newParamsPath: string): Promise<string>
export const KEY_LENGTH: number
Expand Down Expand Up @@ -56,14 +56,18 @@ export const TRANSACTION_EXPIRATION_LENGTH: number
export const TRANSACTION_FEE_LENGTH: number
export const LATEST_TRANSACTION_VERSION: number
export function verifyTransactions(serializedTransactions: Array<Buffer>): boolean
export interface IdentiferKeyPackage {
identifier: string
keyPackage: string
}
export interface TrustedDealerKeyPackages {
verifyingKey: string
proofGenerationKey: string
viewKey: string
incomingViewKey: string
outgoingViewKey: string
publicAddress: string
keyPackages: Record<string, string>
keyPackages: Array<IdentiferKeyPackage>
publicKeyPackage: string
}
export const enum LanguageCode {
Expand Down Expand Up @@ -95,6 +99,17 @@ export class FishHashContext {
prebuildDataset(threads: number): void
hash(header: Buffer): Buffer
}
export class ParticipantSecret {
constructor(jsBytes: Buffer)
serialize(): Buffer
static random(): ParticipantSecret
toIdentity(): ParticipantIdentity
}
export class ParticipantIdentity {
constructor(jsBytes: Buffer)
serialize(): Buffer
toFrostIdentifier(): string
}
export class BoxKeyPair {
constructor()
static fromHex(secretHex: string): BoxKeyPair
Expand Down Expand Up @@ -230,6 +245,9 @@ export type NativeUnsignedTransaction = UnsignedTransaction
export class UnsignedTransaction {
constructor(jsBytes: Buffer)
serialize(): Buffer
publicKeyRandomness(): string
signingPackage(nativeCommitments: Record<string, SigningCommitments>): string
signFrost(publicKeyPackageStr: string, signingPackageStr: string, signatureSharesMap: Record<string, string>): Buffer
}
export class FoundBlockResult {
randomness: string
Expand Down
6 changes: 5 additions & 1 deletion ironfish-rust-nodejs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,14 @@ if (!nativeBinding) {
throw new Error(`Failed to load native binding`)
}

const { FishHashContext, roundOne, contribute, verifyTransform, KEY_LENGTH, NONCE_LENGTH, BoxKeyPair, randomBytes, boxMessage, unboxMessage, RollingFilter, initSignalHandler, triggerSegfault, ASSET_ID_LENGTH, ASSET_METADATA_LENGTH, ASSET_NAME_LENGTH, ASSET_LENGTH, Asset, NOTE_ENCRYPTION_KEY_LENGTH, MAC_LENGTH, ENCRYPTED_NOTE_PLAINTEXT_LENGTH, ENCRYPTED_NOTE_LENGTH, NoteEncrypted, PUBLIC_ADDRESS_LENGTH, RANDOMNESS_LENGTH, MEMO_LENGTH, AMOUNT_VALUE_LENGTH, DECRYPTED_NOTE_LENGTH, Note, PROOF_LENGTH, TRANSACTION_SIGNATURE_LENGTH, TRANSACTION_PUBLIC_KEY_RANDOMNESS_LENGTH, TRANSACTION_EXPIRATION_LENGTH, TRANSACTION_FEE_LENGTH, LATEST_TRANSACTION_VERSION, TransactionPosted, Transaction, verifyTransactions, UnsignedTransaction, LanguageCode, generateKey, spendingKeyToWords, wordsToSpendingKey, generateKeyFromPrivateKey, initializeSapling, FoundBlockResult, ThreadPoolHandler, isValidPublicAddress } = nativeBinding
const { FishHashContext, roundOne, roundTwo, ParticipantSecret, ParticipantIdentity, splitSecret, contribute, verifyTransform, KEY_LENGTH, NONCE_LENGTH, BoxKeyPair, randomBytes, boxMessage, unboxMessage, RollingFilter, initSignalHandler, triggerSegfault, ASSET_ID_LENGTH, ASSET_METADATA_LENGTH, ASSET_NAME_LENGTH, ASSET_LENGTH, Asset, NOTE_ENCRYPTION_KEY_LENGTH, MAC_LENGTH, ENCRYPTED_NOTE_PLAINTEXT_LENGTH, ENCRYPTED_NOTE_LENGTH, NoteEncrypted, PUBLIC_ADDRESS_LENGTH, RANDOMNESS_LENGTH, MEMO_LENGTH, AMOUNT_VALUE_LENGTH, DECRYPTED_NOTE_LENGTH, Note, PROOF_LENGTH, TRANSACTION_SIGNATURE_LENGTH, TRANSACTION_PUBLIC_KEY_RANDOMNESS_LENGTH, TRANSACTION_EXPIRATION_LENGTH, TRANSACTION_FEE_LENGTH, LATEST_TRANSACTION_VERSION, TransactionPosted, Transaction, verifyTransactions, UnsignedTransaction, LanguageCode, generateKey, spendingKeyToWords, wordsToSpendingKey, generateKeyFromPrivateKey, initializeSapling, FoundBlockResult, ThreadPoolHandler, isValidPublicAddress } = nativeBinding

module.exports.FishHashContext = FishHashContext
module.exports.roundOne = roundOne
module.exports.roundTwo = roundTwo
module.exports.ParticipantSecret = ParticipantSecret
module.exports.ParticipantIdentity = ParticipantIdentity
module.exports.splitSecret = splitSecret
module.exports.contribute = contribute
module.exports.verifyTransform = verifyTransform
module.exports.KEY_LENGTH = KEY_LENGTH
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-darwin-arm64",
"version": "1.14.0",
"version": "1.15.0",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-darwin-x64",
"version": "1.14.0",
"version": "1.15.0",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-linux-arm64-gnu",
"version": "1.14.0",
"version": "1.15.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-linux-arm64-musl",
"version": "1.14.0",
"version": "1.15.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-linux-x64-gnu",
"version": "1.14.0",
"version": "1.15.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-linux-x64-musl",
"version": "1.14.0",
"version": "1.15.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-win32-x64-msvc",
"version": "1.14.0",
"version": "1.15.0",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs",
"version": "1.14.0",
"version": "1.15.0",
"description": "Node.js bindings for Rust code required by the Iron Fish SDK",
"main": "index.js",
"types": "index.d.ts",
Expand Down
Loading
Loading