* Added option to choose from address in kaspawallet + fixed a bug with 0 change
* Checking if From is missing
* Fixed after merge to kaspad0.12
* Applying changes also to send command
* Better help description
* Fixed bug where we take all utxos except the one we wanted
* Swallow the parsing error only when we want to filter
* checking for wallet address directly
* go fmt
* Changing to `--from-address`
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Added model and stubs for all main methods
* Add constructors to all main objects
* Implement BlockCandidateTransactions
* implement expireOldTransactions and expireOrphanTransactions
* Rename isHighPriority to neverExpires
* Add stub for checkDoubleSpends
* Revert "Rename isHighPriority to neverExpires"
This reverts commit b2da9a4a00c02fb380d2518cf54fa16257bd8423.
* Imeplement transactionsOrderedByFeeRate
* Orphan maps should be idToOrphan
* Add error.go to mempool
* Invert the condition for banning when mempool rejects a transaction
* Move all model objects to model package
* Implement getParentsInPool
* Implemented mempoolUTXOSet.addTransaction
* Implement removeTransaction, remove sanity checks
* Implemented mempoolUTXOSet.checkDoubleSpends
* Implemented removeOrphan
* Implement removeOrphan
* Implement maybeAddOrphan and AddOrphan
* Implemented processOrphansAfterAcceptedTransaction
* Implement transactionsPool.addTransaction
* Implement RemoveTransaction
* If a transaction was removed from the mempool - update it's redeemers in orphan pool as well
* Use maximumOrphanTransactionCount
* Add allowOrphans to ValidateAndInsertTransaction stub
* Implement validateTransaction functions
* Implement fillInputs
* Implement ValidateAndInsertTransaction
* Implement HandleNewBlockTransactions
* Implement missing mempool interface methods
* Add comments to exported functions
* Call ValidateTransactionInIsolation where needed
* Implement RevalidateHighPriorityTransactions
* Rewire kaspad to use new mempool, and fix compilation errors
* Update rebroadcast logic to use new structure
* Handle non-standard transaction errors properly
* Add mutex to mempool
* bugfix: GetTransaction panics when ok is false
* properly calculate targetBlocksPerSecond in config.go
* Fix various lint errors and tests
* Fix expected text in test for duplicate transactions
* Skip the coinbase transaction in HandleNewBlockTransactions
* Unorphan the correct transactions
* Call ValidateTransactionAndPopulateWithConsensusData on unorphanTransaction
* Re-apply policy_test as check_transactions_standard_test
* removeTransaction: Remove redeemers in orphan pool as well
* Remove redundant check for uint64 < 0
* Export and rename isDust -> IsTransactionOutputDust to allow usage by rothschild
* Add allowOrphan to SubmitTransaction RPC request
* Remove all implementation from mempool.go
* tidy go mod
* Don't pass acceptedOrphans to handleNewBlockTransactions
* Use t.Errorf in stead of t.Fatalf
* Remove minimum relay fee from TestDust, as it's no longer configurable
* Add separate VirtualDAASCore method for faster retrieval where it's repeated multiple times
* Broadcast all transactions that were accepted
* Don't re-use GetVirtualDAAScore in GetVirtualInfo - this causes a deadlock
* Use real transaction count, and not Orphan
* Get mempool config from outside, incorporating values received from cli
* Use MinRelayFee and MaxOrphanTxs from global kaspad config
* Add explanation for the seemingly redundant check for transaction version in checkTransactionStandard
* Update some comment
* Convert creation of acceptedTransactions to a single line
* Move mempoolUTXOSet out of checkDoubleSpends
* Add test for attempt to insert double spend into mempool
* fillInputs: Skip check for coinbase - it's always false in mempool
* Clarify comment about removeRedeemers when removing random orphan
* Don't remove high-priority transactions in limitTransactionCount
* Use mempool.removeTransaction in limitTransactionCount
* Add mutex comment to handleNewBlockTransactions
* Return error from limitTransactionCount
* Pluralize the map types
* mempoolUTXOSet.removeTransaction: Don't restore utxo if it was not created in mempool
* Don't evacuate from orphanPool high-priority transactions
* Disallow double-spends in orphan pool
* Don't use exported (and locking) methods from inside mempool
* Check for double spends in mempool during revalidateTransaction
* Add checkOrphanDuplicate
* Add orphan to acceptedOrphans, not current
* Add TestHighPriorityTransactions
* Fix off-by-one error in limitTransactionCount
* Add TestRevalidateHighPriorityTransactions
* Remove checkDoubleSpends from revalidateTransaction
* Fix TestRevalidateHighPriorityTransactions
* Move check for MaximumOrphanCount to beggining of maybeAddOrphan
* Rename all map type to singulateToSingularMap
* limitOrphanPool only after the orphan was added
* TestDoubleSpendInMempool: use createChildTxWhenParentTxWasAddedByConsensus instead of createTransactionWithUTXOEntry
* Fix some comments
* Have separate min/max transaction versions for mempool
* Add comment on defaultMaximumOrphanTransactionCount to keep it small as long as we have recursion
* Fix comment
* Rename: createChildTxWhenParentTxWasAddedByConsensus -> createChildTxWhereParentTxWasAddedByConsensus
* Handle error from createChildTxWhereParentTxWasAddedByConsensus
* Rename createChildTxWhereParentTxWasAddedByConsensus -> createChildAndParentTxsAndAddParentToConsensus
* Convert all MaximumXXX constants to uint64
* Add comment
* remove mutex comments
* Naive bip39 with address reuse
* Avoid address reuse in libkaspawallet
* Add wallet daemon
* Use daemon everywhere
* Add forceOverride
* Make CreateUnsignedTransaction endpoint receive amount in sompis
* Collect close UTXOs
* Filter out non-spendable UTXOs from selectUTXOs
* Use different paths for multisig and non multisig
* Fix tests to use non zero path
* Fix multisig cosigner index detection
* Add comments
* Fix dump_unencrypted_data.go according to bip39 and bip32
* Fix wrong derivation path for multisig on wallet creation
* Remove IsSynced endpoint and add validation if wallet is synced for the relevant endpoints
* Rename server address to daemon address
* Fix capacity for extendedPublicKeys
* Use ReadBytes instead of ReadLine
* Add validation when importing
* Increment before using index value, and use it as is
* Save keys file exactly where needed
* Use %+v printErrorAndExit
* Remove redundant consts
* Rnemae collectCloseUTXOs and collectFarUTXOs
* Move typedefs around
* Add comment to addressesToQuery
* Update collectUTXOsFromRecentAddresses comment about locks
* Split collectUTXOs to small functions
* Add sanity check
* Add addEntryToUTXOSet function
* Change validateIsSynced to isSynced
* Simplify createKeyPairsFromFunction logic
* Rename .Sync() to .Save()
* Fix typo
* Create bip39BitSize const
* Add consts to purposes
* Add multisig check for 'send'
* Rename updatedPSTxBytes to partiallySignedTransaction
* Change collectUTXOsFromFarAddresses's comment
* Use setters for last used indexes
* Don't use the pstx acronym
* Fix SetPath
* Remove spaces when reading lines
* Fix walletserver to daemonaddress
* Fix isUTXOSpendable to use DAA score
Co-authored-by: Svarog <feanorr@gmail.com>
* Update go-secp256k1 to v0.0.3
* Update the txscript engine to support only 32 bytes pubkeys
* Update the txscript engine tests
* Update txscript/sign.go to use the new Schnorr KeyPair API
* Update txscript sign_test to use the new schnorr
* Update sigcache tests to use new schnorr pubkey
* Update integration tests to use the new txscript and new schnorr pubkey
* [NOD-1500] Added Domain type and Constructor
* [NOD-1500] Replaced dag+txpool with domain in flowContext
* [NOD-1500] Replaced dag+txpool with domain in flowContext
* [NOD-1500] Converters: domain objects from/to appmessage
* [NOD-1500] Convert hashes to DomainHashes in appmessages
* [NOD-1500] Remove references to daghash in dagconfig
* [NOD-1500] Fixed all appmessage usages of hashes
* [NOD-1500] Update all RPC to use domain
* [NOD-1500] Big chunk of protocol flows re-wired to domain
* [NOD-1500] Finished re-wiring all protocol flows to new Domain
* [NOD-1500] Fix some mempool and kaspaminer compilation errors
* [NOD-1500] Deleted util/{block,tx,daghash} and dbaccess
* [NOD-1500] util.CoinbaseTransactionIndex -> transactionhelper.CoinbaseTransactionIndex
* [NOD-1500] Fix txsigner
* [NOD-1500] Removed all references to util/subnetworkid
* [NOD-1500] Update RpcGetBlock related messages
* [NOD-1500] Many more compilation fixes
* [NOD-1500] Return full list of missing blocks for orphan resolution
* [NOD-1500] Fixed handshake
* [NOD-1500] Fixed flowcontext compilation
* [NOD-1500] Update users of StartIBDIfRequired to handle error
* [NOD-1500] Removed some more fields from RPC
* [NOD-1500] Fix the getBlockTemplate flow
* [NOD-1500] Fix HandleGetCurrentNetwork
* [NOD-1500] Remove redundant code
* [NOD-1500] Remove obsolete notifications
* [NOD-1500] Split MiningManager and Consensus to separate fields in Domain
* [NOD-1500] Update two wrong references to location of txscript
* [NOD-1500] Added comments
* [NOD-1500] Fix some tests
* [NOD-1500] Removed serialization logic from appmessage
* [NOD-1500] Rename database/serialization/messages.proto to dbobjects.proto
* [NOD-1500] Delete integration tests
* [NOD-1500] Remove txsort
* [NOD-1500] Fix tiny bug
* [NOD-1500] Remove rogue dependancy on bchd
* [NOD-1500] Some stylistic fixes
* [NOD-1220] Add network name to the version message.
* [NOD-1220] Ban peers from the wrong network.
* [NOD-1220] Add the network parameter to protowire.
* [NOD-1220] Add "kaspa-" to network names.
* [NOD-1118] Added protobufs for the MessageStream
* [NOD-1118] Implement some of the basic grpc methods
* [NOD-1118] Implemented gRPCConnection send and receive
* [NOD-1118] Implemented basic connection loops
* [NOD-1118] gRPC server implementation ready
* [NOD-1118] Add connection management
* [NOD-1118] Sort out the connection loops
* [NOD-1118] Add temporary testConnection
* [NOD-1118] Send to c.errChan whether error was recieved or not
* [NOD-1118] Call OnConnectHandler in time
* [NOD-1118] Handle closing connections properly
* [NOD-1118] Add comments to exported functions
* [NOD-1118] Call server.addConnection on newConnection
* [NOD-1118] Add a TODO comment
* [NOD-1118] Add a TODO comment
* [NOD-1118] Make connection a Stringer
* [NOD-1118] Made the connection loops 100% synchronic
* [NOD-1118] Make connection.isConnected uint32
* [NOD-1118] Move the Add/Remove connection from grpcConnection to register/unregister connection
* [NOD-1118] Convert error messages to lower case
* [NOD-1118] Remove protoc inline dependency
* [NOD-1118] Fix comment
* [NOD-1118] Exit if there was an error starting the protocol manager
* [NOD-1118] Fix error message
* [NOD-1118] Fixed a few comments
* [NOD-1118] Extract listenOn to a method
* [NOD-1118] Use !=0 for isConnected
* [NOD-1118] Refactor listenOn
* [NOD-1118] Add lock on channelWrites in gRPCConnection
* [NOD-1118] Rename channelWriteLock -> writeDuringDisconnectLock
* [NOD-1118] Reshuffle a comment
* [NOD-1118] Add a TODO comment
* [NOD-641] Upgrade to github.com/pkg/errors v0.9.1 and use errors.As where needed
* [NOD-641] Fix find and replace error
* [NOD-641] Use errors.As for error type checking
* [NOD-641] Fix errors.As for pointer types
* [NOD-641] Use errors.As where needed
* [NOD-641] Rename rErr->ruleErr
* [NOD-641] Rename derr->dbErr
* [NOD-641] e->flagsErr where necessary
* [NOD-641] change jerr to more appropriate name
* [NOD-641] Rename cerr->bdRuleErr
* [NOD-641] Rename serr->scriptErr
* [NOD-641] Use errors.Is instead of testutil.AreErrorsEqual in TestNewHashFromStr
* [NOD-641] Rename bdRuleErr->dagRuleErr
* [NOD-641] Rename mErr->msgErr
* [NOD-641] Rename dErr->deserializeErr
* [NOD-652] Add selectedTip and getSelectedTip messages
* [NOD-652] Remove peerSyncState.isSelectedTipKnown
* [NOD-652] Do nothing on OnSelectedTip if the peer selected tip hasn't changed
* [NOD-652] Handle selected tip message with block handler
* [NOD-652] Add comments
* [NOD-652] go mod tidy
* [NOD-652] Fix TestVersion
* [NOD-652] Use dag.AdjustedTime instead of dag.timeSource.AdjustedTime
* [NOD-652] Create shouldQueryPeerSelectedTips and queueMsgGetSelectedTip functions
* [NOD-652] Change selectedTip to selectedTipHash where needed
* [NOD-652] add minDAGTimeDelay constant
* [NOD-652] add comments
* [NOD-652] Fix names and comments
* [NOD-652] Put msg.reply push in the right place
* [NOD-652] Fix comments and names
* [NOD-495] Remove txgen to separate repository
* [NOD-495] Remove DNSSeeder to separate repository
* [NOD-495] Remove kasparov to separate repository
* [NOD-495] Remove miningsimulator to separate repository
* [NOD-495] httpserverutils should use kaspad logger package
* [NOD-495] Remove faucet to separate repository
* [NOD-495] httpserverutils should use kasparov logger
* [NOD-488] Make getBlueBlocksBetween return error if start hash is not in the selected parent chain of stop hash
* [NOD-488] Convert for to while style
* [NOD-445] Added option to mining simulator to get address list from AWS
* [NOD-445] Add support to get miningsimulator addresslist from AWS
* [NOD-445] Added mechanism to update when new servers come online
* [NOD-445] Set config in connectionManager
* [NOD-445] Invert DisableTLS condition in readCert
* [NOD-380] Add MQTT to the project.
* [NOD-380] Add MQTT params to config.
* [NOD-380] Implement connecting to an mqtt broker.
* [NOD-380] Fix a comment.
* [NOD-380] Removed unnecessary option.
* [NOD-380] Added comments to MQTT functions.
* [NOD-380] Fix copy+paste error.
* [NOD-380] Make it so that all the mqtt flags must be passed together.
* [NOD-380] Use activeConfig instead of passing it everywhere.
* [NOD-350] Implement testnet faucet
* [NOD-350] Add JSON annotations to api server response types
* [NOD-350] Fix IP check query, update IP usage with upsert, and make IP a primary key
* [NOD-377] Remove redundant float conversion
* [NOD-377] Change not current database error message
* [NOD-377] change API route from /money_request to /request_money
* [NOD-377] Add a constant for 24 hours
* [NOD-377] Remove redundant call for getWalletUTXOSet()
* [NOD-377] Condition refactoring
* [NOD-377] Fix POST request to API server content type
* [NOD-350] Rename day -> timeBetweenRequests
* [NOD-377] Rename timeBetweenRequests -> minRequestInterval, timeBefore24Hours -> minRequestInterval
* [NOD-350] Rename file responsetypes -> response_types
* [NOD-350] Rename convertTxModelToTxResponse -> convertTxDBModelToTxResponse
* [NOD-350] Explicitly select blue_score in fetchSelectedTipBlueScore
* [NOD-350] Refactor and add comments
* [NOD-350] Make calcFee use MassPerTxByte
* [NOD-350] Convert IP column to varchar(39) to allow ipv6 addresses
* [NOD-350] Add comments to isFundedAndIsChangeOutputRequired
* [NOD-350] Remove approximateConfirmationsForCoinbaseMaturity
* [NOD-350] Fix comments
* [NOD-322] Make database.DB a function
* [NOD-322] Move context to be the first parameter in all functions
* [NOD-322] Set db to nil on database.Close()
* [NOD-322] Tidy go.mod/go.sum
* [NOD-322] Use http package const + message for StatusInternalServerError
* [NOD-303] Implement get transaction by id for api server
* [NOD-303] Make routeParamTxID a constant
* [NOD-303] Change database is not current error.
* [NOD-303] Add ID to TransactionInput and TransactionOutput models
* [NOD-303] Change transactions_outputs table name to transaction_outputs and transactions_inputs to transaction_inputs
* [NOD-303] Add json annotations to transaction response types
* [NOD-303] Split server package
* [NOD-303] Add GetTransactionByHashHandler
* [NOD-303] Add comments to exported functions and variables
* [NOD-303] Put response types in a separate file
* [NOD-303] Rename functions
* [NOD-310] Implement REST server in API server
* [NOD-310] MetaData -> Metadata
* [NOD-310] Make custom context methods instead of custom request functions
* [NOD-310] change "Request ID" prefix to "RID" and convert to apiServerContext with newAPIServerContext everywhere
* [NOD-285] Map API-Server database using GORM
* [NOD-285] Add accepting block to transactions and blocks models, and remove accepting block model
* [NOD-285] Define model relations
* [NOD-285] Fix many to many for Transaction and Block models
* [NOD-285] Remove redundant main file