Skip to content

Commit

Permalink
Cumulative PR - omega branch (wRPC v2, integrations, typescript-v2, r…
Browse files Browse the repository at this point in the history
…esolver v2) (kaspanet#506)

* support numeric interface (ip) arg without port in --rpclisten-borsh or --rpclisten-json

* isActive for UtxoProcessor and UtxoContext

* Script utility functions + WASM changelog update

* versioned serialization for wRPC

* spelling

* Refactorize State into PoW (kaspanet#43)

* Add fromRaw with optional target_bits

* Upload builds as GitHub Artifact

* try moving calculateTarget into PoW class as static funct

* Use FromHex trait

* Make PoW constructor accept IHeader & refactorize some parts

* Lint

* TransactionDataT and BindingT (kaspanet#44)

* borsh update to 1.5.1

* fix returning receive addr from bindings change addr fn.

* lints

* update WASM changelog

* fix WASM module reference in examples

* migrate lints.clippy to workspace and inherit this in the relevant crates

* Add provisional fields for storage metrics (db size)

* fix file creation timestamp issue on some ext4 file systems (updated via workflow-store::fs)

* bigint values in TransactionRecord (kaspanet#48)

* change address decoding panics to errors

* update error messaging

* Update for bind/listen compatibility with WRS

* range support added for transactions pagination (kaspanet#49)

* range support added for transactions pagination

* cargo fmt/clippy

* lints

* WRS 0.13.0

* wallet ergonomics helper functions

* WRS 0.13.1

* WRS 0.13.1 lock

* WRS 0.13.2

* kaspa-wallet (cli) updates (using latest resolver APIs + guide cleanup)

* range support for indexdb store load_range function (kaspanet#52)

* add balance info to account descriptors, additional wallet connectivity utilities and connect api method changes, export wallet utils in wallet prelude,

* Improve ConnectRequest builder interface

* Allow UtxoEntryReference to be re-integrated from a flat object structure.

* indexdb data maintenance: timestamp fix (kaspanet#53)

* range support for indexdb store load_range function

* indexdb data maintenance: timestamp fix

* removing unused

* Fix incorrect balance when sending to self

* fix child_number typo

* allow setting custom transaction maturity periods

* fix missing renaming for record.value

* fix typedoc references

* pre-borsh-1-5-1 compat

* testing typedoc

* testing typedoc

* lock typedoc to 0.25.8

* disable typedoc treatWarningsAsErrors

* deps

* WIP SPK WASM

* Cargo.lock

* SPK raw object cast + fix return of ISerializableTransaction

* fix le to be when parsing SPK hex version

* remove string version parsing from SPK

* update WASM SDK changelog

* incorrect balance issue (kaspanet#55)

* TransactionInput signature_script as Option, add associated TS types

* restructure PSKT + WASM scaffolding (WIP)

* wallet guard implementation to block concurrent async access to account operations

* tx serialization example

* change struct serialization version fields from u32 to u16

* WIP - decoupling RPC type aliases (kaspanet#45)

* Provisional RpcConnection propagation via RpcApi methods (kaspanet#46)

* provisional RpcConnection propagation via RpcApi methods

* lints

* change api version handling affecting get_server_info_call

* Wallet watch-only accounts (kaspanet#59)

* Prints extended public keys on export mnemonic command (feature of go kaspawallet).

* Watch-only account implementation for bip32 and multisig kind of accounts with new command account import watchonly.

* Refactor code for less variables.

* Patch import type for command.

* CLI Support for watch only accounts in select account with args function.

* Function sig_op_count equals implemented.

* Helper function in wallet to format XPUB according to network. Converter NetworkId for Prefix. BIP32-Watch Account renamed from WatchOnly, multisig feature removed. Multisig account import as watch-only command added.

* cli watch-only header in list and select.

* Resolve merge.

* update resolver to use v2 API

* change default resolver subdomains

* resolver v2 updates

* Refactorize some addresses and Script related parts (kaspanet#61)

* Refactorize some addresses and Script related parts

* A ScriptBuilder example on TypeScript

* addOps Opcodes are now BinaryT

* Move txscript bindings to relevant folders

* Sort lines of deps and imports

* Lint

* fix wasm subscribe_daa_score

* expose native RpcClient multiplexer in KaspaRpcClient

* WIP (local wRPC)

* breakdown wRPC serialization trait into two ser/de; improve future compatibility patterns;

* get_connections_call() RPC method + provisional metrics dictionary

* change get_connections() to return the actual value instead of Response struct.

* priorityEntries implementation for tx generator

* fix transaction WASM interface types affecting some function returns

* input and output types on transactions (WASM)

* rpc caps

* update client resolver resolution

* GetSystemInfo RPC call

* make priorityEntries optional in the TS interface definition

* merge cli-resolver

* remove resolver crate from workspace (move to https://github.com/aspectron/kaspa-resolver)

* WRS 0.14.0

* fix merge mishap

* refactor systeminfo + update resolver target generation

* Custom input signatureScript ability (kaspanet#69)

* Refactorize some addresses and Script related parts

* A ScriptBuilder example on TypeScript

* addOps Opcodes are now BinaryT

* Move txscript bindings to relevant folders

* Sort lines of deps and imports

* Lint

* Prototype of custom sighash operations

* Experimental

* Add SighashType enum and option on SignInput

* Format and a small fix

* Clippy

* hex view for ScriptBuilder (kaspanet#67)

* add git_hash to system_id

* add git_hash to system_id

* wip

* wip

* refactor git head fetch to use build.rs

* comment

* split utils/sysinfo into utils/git, refactor utils/build.rs to run git to obtain hashes (in addition to file check)

* using WalletGuard, account guard (kaspanet#73)

1) private context issue on legacy accounts
2) optional url option handling on rpc client connect method
3) using `WalletGuard` type instead of `AsyncMutexGuard`

* add short hash to sysinfo, return short hash in GetSystemInfo

* add contributor DNS seeders (gerri and H@H)

* Update phrase.rs (kaspanet#74)

* Base implementation for PSKB and usage in core account with generator wrapper (kaspanet#64)

* Base implementation for PSKB and usage in core account with generator wrapper stream handling.

* prune test file

* prune test file

* Converters for transanction and populated transaction.

* Optional signature import in PSKT conversion.

* PSKB wallet cli commands.

* More PSKB wallet cli commands for custom script locks.

* Serialization test case

* Reviews patches, cli script debug command added.

* Doc about fee per transaction for script unlocking UTXOS

* Parameter changed to priority_fee_sompi_per_transaction, revert function renaming.

* Error handling

* fix missing RPC refs

* Update resolver config (WIP)

* add version to GetSystemInfoResponse

* fix git version handling

* update client-side resolver properties to match current structs

* update resolvers

* fix kaspa-utils/build.rs to always produce git related env vars.

* add git commit hash to WASM32 SDK artifacts during CI build

* fix WASM32 CI build (testing)

* fix the default url handling in wRPC client

* Key attributes (make XPrv and XPub inspectable) (kaspanet#77)

* getters for XPrv and XPub attributes

* fmt

* post merge fixes

* Merge RBF (kaspanet#80)

* Replace by fee on mempool (kaspanet#499)

* Replace by fee on mempool with tests

* Add a custom RemovalReason -- ReplacedByFee

* Let `MinerManager` handle replace by fee (RBF) for RPC and P2P

* Refines success conditions and process of RBF policies

* Add an RPC `submit_transaction_replacement` method

* fix fmt

* Fix CLI Build WASM32 error

* Avoid breaking wRPC

* Extend some tests coverage to all priority, orphan & RBF policy combinations

* Let RBF fail early or at least before checking transaction scripts in consensus

* Cleaning

* More cleaning

* Use contextual instead of compute mass in RBF eviction rule

* Avoid collision with another PR

* Avoid collision with another PR (2)

* Extended test coverage of RBF

* Extended test coverage of RBF (2)

* Rename `TransactionBatchValidationArgs` to `TransactionValidationBatchArgs`

* Add comments

* Assert instead of condition

* Add an `RbfPolicy` parameter to mining manager tx validate_and_insert_... fns

* Infer RBF policy from unorphaned transaction

* Apply the RBF policy to all orphan-related cases

* In Rbf allowed mode, check feerate threshold vs all double spends (i.e., compare to the max)

* Minor hashset optimization

* Rename: fee_per_mass -> feerate

* Use rbf policy arg for post processing step as well

* Renames and comments

* Relaxation: fail gracefully if rbf replaced tx is missing (also fixes an edge case where mempool duplication resulted in this scenario)

* Tx id is appended by the caller anyway

---------

Co-authored-by: Tiram <[email protected]>
Co-authored-by: Michael Sutton <[email protected]>

* post merge fixes

---------

Co-authored-by: KaffinPX <[email protected]>
Co-authored-by: Tiram <[email protected]>
Co-authored-by: Michael Sutton <[email protected]>

* createInputSignature() utility function (kaspanet#79)

* ``signTransactionInput`` and move sign_input to its proper location

* Fix typedoc warnings left from old PR

* createInputSignature

* Update docs for ConsensusParams (WASM mass calc)

* fmt

* bump wRPC

* wrs 0.15.0

* replace Uuid.as_ref() to as_bytes()

* assign RpcApiOps variants numerical values

* cleanup

* Remove WASM32 mass calculator + change createTransaction() signature (kaspanet#81)

* Kip9 updates to WASM/wallet framework mass calc (kaspanet#66)

* WIP

* update kip9 processing in WASM mass calculator

* XPrv.toPrivateKey support

* replace lazy_static with OnceLock

* remove NetworkParams Inner

* make signatureScript optional on ITransactionInput (WASM32)

* WIP mass calc (WASM32)

* remove WASM32 mass calc, replace with dedicated functions

* use OnceCell for NetworkParams (wallet-core)

* Update changelog

* fmt

---------

Co-authored-by: Surinder Singh Matoo <[email protected]>

* change OnceCell to LazyLock in wallet-core utxo settings

* WASM: update signTransaction() signature

* fix TS types and method names

* lints

* split GetConnections counter into separate clients and peers variables

* fix missing version in GetConnections method

* Adding type conversion. (kaspanet#76)

* fmt

* refactor kaspa-metrics to expose some internal methods (needed for external processing).

* Word count (kaspanet#83)

* Update phrase.rs

* private context issue for importing legacy wallet

* account filter updated for calculating account_index

* gen1 decrypt_mnemonic updated for error unwraping

* adding resolver tls option

* cleanup

* Improve input signature capability (kaspanet#85)

* ``signTransactionInput`` and move sign_input to its proper location

* Fix typedoc warnings left from old PR

* createInputSignature

* Fix createInputSignature and improve PendingTransaction Inputs DX

* Format

* A small Omega change applied to existing code

* Pass reference of transaction in createInputSignature

* fix WASM32 PSKT function names

* refactor PSKB as a type wrapper + update serialization (kaspanet#86)

* Cleanup of unused JSON test file for PSKB and comments (kaspanet#87)

* Remove PSKB json test file.

* Remove/change old PSKB comments and commented out inclusions.

* PSKB+PSKT merge with omega branch (kaspanet#82)

* TransactionInput signature_script as Option, add associated TS types

* restructure PSKT + WASM scaffolding (WIP)

* Base implementation for PSKB and usage in core account with generator wrapper (kaspanet#64)

* Base implementation for PSKB and usage in core account with generator wrapper stream handling.

* prune test file

* prune test file

* Converters for transanction and populated transaction.

* Optional signature import in PSKT conversion.

* PSKB wallet cli commands.

* More PSKB wallet cli commands for custom script locks.

* Serialization test case

* Reviews patches, cli script debug command added.

* Doc about fee per transaction for script unlocking UTXOS

* Parameter changed to priority_fee_sompi_per_transaction, revert function renaming.

* Error handling

* Adding type conversion. (kaspanet#76)

* fmt

* fix WASM32 PSKT function names

* refactor PSKB as a type wrapper + update serialization (kaspanet#86)

* Cleanup of unused JSON test file for PSKB and comments (kaspanet#87)

* Remove PSKB json test file.

* Remove/change old PSKB comments and commented out inclusions.

---------

Co-authored-by: 1bananagirl <[email protected]>

* extra new line char removed (kaspanet#89)

* lock issue on wallet creation (kaspanet#91)

* wasm cast refs

* resolver updates

* CLI review: import cli watch-only changed to watch, PSKB parse view added (kaspanet#92)

* CLI - Import commands for watch-only accounts changed to: account watch bip32 and account watch multisig.

* CLI - PSKB parse view added next to debug view showing input/output addresses and amounts. PSKT finalized check moved from debug view to parse view. Selected account requirement in commands only if needed.

* WASM RBF (RPC)

* WASM FeeEstimate (RPC)

* hex encoding for kaspa_utils::SystemInfo

* Some symmetry and type fixes (kaspanet#93)

* UtxoEntry typing fix and isometry w UtxoEntryReference

* Fix type of IUtxoProcessorEvent

* Fix interface typings of UtxoProcessor

* Remove UtxoProcessorEventData and improve UtxoProcessor event

* Remove unneeded overwrite

* Clippy and a small mistake fix

* Note: Clippy can cause fmt issues :nerd:

* update WASM GeneratorSettings::priorityEntries? to accept UtxoEntryReference[]

* WASM32 - update resolver casting

* cleanup

* WASM32: remove no longer used WAPI account module

* cleanup

* introduce new rpc header/block types for BBT and SB (kaspanet#95)

* introduce new rpc header/block types for BBT and SB

* remove unneeded clone

* WASM - Update types for Mnemonic::random()

* WASM update deprecated methods in web-sys

* Add bip32 Mnemonic class to kaspa-wasm-sdk-keys build package

* misc dependency updates

* Introduce profile data to GetConnections RPC method

* WASM update TS declarations for wallet events

* fix WASM sdk submitTransaction API (kaspanet#96)

* Add custom Debug to GetSystemInfoResponse

* Add HexString type to ITransactionOutput::scriptPublicKey

* fix camelCase on RpcTransactionOutpoint

---------

Co-authored-by: KaffinPX <[email protected]>
Co-authored-by: surinder singh <[email protected]>
Co-authored-by: 1bananagirl <[email protected]>
Co-authored-by: Tiram <[email protected]>
Co-authored-by: Michael Sutton <[email protected]>
Co-authored-by: IgorKhomenko <[email protected]>
  • Loading branch information
7 people authored Aug 26, 2024
1 parent b0f07ef commit 1c1a692
Show file tree
Hide file tree
Showing 273 changed files with 14,059 additions and 5,023 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:


check-wasm32:
name: Check Wasm32
name: Check WASM32
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand Down Expand Up @@ -274,12 +274,16 @@ jobs:
run: cargo clippy -p kaspa-wasm --target wasm32-unknown-unknown

build-wasm32:
name: Build Wasm32
name: Build WASM32 SDK
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup Environment
shell: bash
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
Expand Down Expand Up @@ -337,8 +341,19 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build wasm release
run: cd wasm && bash build-release

run: |
pushd .
cd wasm
bash build-release
popd
mv wasm/release/kaspa-wasm32-sdk.zip wasm/release/kaspa-wasm32-sdk-${{ env.SHORT_SHA }}.zip
- name: Upload WASM build to GitHub
uses: actions/upload-artifact@v4
with:
name: kaspa-wasm32-sdk-${{ env.SHORT_SHA }}.zip
path: wasm/release/kaspa-wasm32-sdk-${{ env.SHORT_SHA }}.zip

build-release:
name: Build Ubuntu Release
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 1c1a692

Please sign in to comment.