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

Merged
merged 19 commits into from
Apr 25, 2023
Merged

STAGING -> MASTER #3851

merged 19 commits into from
Apr 25, 2023

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Apr 25, 2023

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.

[ ] 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

danield9tqh and others added 16 commits April 22, 2023 07:47
* fix: gracefully shutdown simulator on unexpected exit

* make simulator a normal const in start cmd
* Add spends to chain/getTransaction

* Resolve conflict
* feat(ironfish): add spends to wallet/getTransaction

* feat(ironfish): add spend support to cli get txn command

* test(ironfish) add unt test for wallet/getAccountTransaction

* Update unit test

---------

Co-authored-by: ygao76 <[email protected]>
* adds custom transaction funding by note hash

supporting custom transaction funding will allow users and developers to choose
the notes to spend in a transaction using whatever note selection algorithm they
choose.

adds optional 'spendNoteHashes' parameter to 'wallet/createTransaction' rpc
endpoint to accept a list of hex string note hashes to use to fund a
transaction.

implements 'fundWithNoteHashes' to load decrypted notes from the specified
hashes and use them to build the spends for a raw transaction. ensures that the
specified notes have enough value to fund the transaction. requires that notes
have an index so that a witness can be created.

does not check whether the notes have already been spent. this is intentional to
support use cases like 'canceling' or 'speeding up' a transaction by creating a
transaction that spends the same notes but offers a higher fee.

adds unit tests for wallet and rpc transaction creation methods.

* adds error messages to assertions in 'fundFromNoteHashes'

* supports partial funding from notes passed to createTransaction

if the notes passed to createTransaction do not cover the amount needed, the
wallet will fund the rest of the transaction using available unspent notes.

refactors fund to optionally take a list of notes.

renames 'createSpendsForAsset' to 'addSpendsForAsset' and modifies to take a set
of notes already spent and an amount already spent.

removes unneeded code: 'checkNoteSpentOnChainAndRepair', 'createSpends'

renames 'spendNoteHashes' to 'notes' in RPC and createTransaction method

* iterate over amounts needed map entries instead of keys

avoid defaulting to 0 if the key is missing.

* defaults notes to [] in fund, unindents
* feat(ironfish): add spends to wallet/getTransactions

* test(ironfish) refactor spend / notes tests for wallet/getTransactions into separate tests
* Rename RPC route files to match endpoints

* Try fix fixtures

* Rename another fixture
Makes devnet consistent with all the other networks
before mainnet many miners and mining pools were mining on the testnet. the
hashpower on the testnet at that time pushed the difficulty very high.

now that that mining power has migrated to mainnet the testnet chain is
effectively halted.

resetting the testnet with a new genesis block will allow us to get the testnet
running again with lower mining power.
@hughy hughy requested a review from a team as a code owner April 25, 2023 21:06
@hughy hughy merged commit 6dc93a4 into master Apr 25, 2023
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