* 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>
* Increase size of reachability cache
* Change DomainHash to struct with unexported hashArray
* Fixing compilation errors stemming from new DomainHash structure
* Remove obsolete Read/WriteElement methods in appmessage
* Fix all tests
* Fix all tests
* Add comments
* A few renamings
* go mod tidy
* 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-1566] Add a dependency to golang-lru.
* [NOD-1566] Add caching to blockstore.go.
* [NOD-1566] Add LRUCache to all store objects and initialize them.
* [NOD-1566] Add caching to acceptanceDataStore.
* [NOD-1566] Add caching to blockHeaderStore.
* [NOD-1566] Implement a simpler LRU cache.
* [NOD-1566] Use the simpler cache implementation everywhere.
* [NOD-1566] Remove dependency in golang-lru.
* [NOD-1566] Fix object reuse issues in store Get functions.
* [NOD-1566] Add caching to blockRelationStore.
* [NOD-1566] Add caching to blockStatusStore.
* [NOD-1566] Add caching to ghostdagDataStore.
* [NOD-1566] Add caching to multisetStore.
* [NOD-1566] Add caching to reachabilityDataStore.
* [NOD-1566] Add caching to utxoDiffStore.
* [NOD-1566] Add caching to reachabilityReindexRoot.
* [NOD-1566] Add caching to pruningStore.
* [NOD-1566] Add caching to headerTipsStore.
* [NOD-1566] Add caching to consensusStateStore.
* [NOD-1566] Add comments explaining why we don't discard staging at the normal location in consensusStateStore.
* [NOD-1566] Make go vet happy.
* [NOD-1566] Fix merge errors.
* [NOD-1566] Add a missing break statement.
* [NOD-1566] Run go mod tidy.
* [NOD-1566] Remove serializedUTXOSetCache.
* [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-1249] Add pruning related constants (#869)
* [NOD-1249] Add pruning related constants
* [NOD-1249] Change status suspect to UTXONotVerified
* [NOD-1249] Add TestPruningDepth
* [NOD-1249] Add comment to pruningDepth
* [NOD-1249] Add pruning helper functions (#875)
* [NOD-1249] Added node.blockAtDepth
* [NOD-1249] Added node.finalityPoint()
* [NOD-1249] Add hasFinalityPointInOthersSelectedChain
* [NOD-1249] Add nonFinalityViolatingBlues
* [NOD-1249] Added isInPastOfAny
* [NOD-1249] Updated all calls to blockNode functions that require dag
* [NOD-1249] Add blockNode.reds field and persist it
* [NOD-1249] Add checkObjectiveFinality
* [NOD-1249] Add isViolatingSubjectiveFinality
* [NOD-1249] Added to TestGHOSTDAG check that reds are as expected
* [NOD-1249] Add checkMergeLimit and checkDAGRelations
* [NOD-1249] Invert condition in blockInDepth
* [NOD-1249] Make isInPastOfAny resemble isInPast
* [NOD-1249] Added comments to isInPast and isInPastOfAny
* [NOD-1252] Remove any references to legacy finality (#876)
* [NOD-1032] validateParents: check number of parents and that no parents were manually rejected (#877)
* [NOD-1254] Block verification changes (#882)
* [NOD-1254] Call checkDAGRelations and move it to correct place
* [NOD-1254] Use blockStatuses properly
* [NOD-1254] Add support for setting node's verification flag and set it to UTXONotVerified once block passes basic verification
* [NOD-1254] Check for subjctiveFinality, and for node not being in the selectedParentChain
* [NOD-1254] Make blockStatus an ordinary value - not bit flags
* [NOD-1254] Isolate all utxo-requiring validation into a single separate if branches
* [NOD-1254] Re-arrange connectBloc so that things that happen in UTXO-validated blocks only are all grouped together
* [NOD-1254] Resolve and check selectedParent's status before validatingUTXO
* [NOD-1254] Separate virtualUTXODiff from utxoVerificationOutput
* [NOD-1254] Stylistic fixes
* [NOD-1254] Use dag.index.(Set)BlockNodeStatus instead of accessing node.status
* [NOD-1288] Sub-routinize checkConnectToPastUTXO
* [NOD-1288] Re-write checkConnectToPastUTXO in a way that allows to filter-out invalid transactions
* [NOD-1288] Make checkTxSequenceLock use already calculated utxo outputs
* [NOD-1288] Make checkTxMass use already calculated utxo outputs
* [NOD-1288] Use dag.sigCache for ValidateTransactionScripts
* [NOD-1288] Use checkConnectTransactionToPastUTXO in applyBlueBlocks
* [NOD-1288] Clean-up old code-path from no longer used functions
* [NOD-1288] Skip any irrelevant parts of txo verification if block is genesis
* [NOD-1288] Set where it should have been
* [NOD-1288] Fix reachability checks to never use the new node + make isInSelectedParentChainOf return true if node == other
* [NOD-1288] invert the condition for isNewSelectedTip
* [NOD-1288] Separate checkIsAccepted to own function, and properly handle coinbase
* [NOD-1288] Don't update utxo-diff for UTXONotVerified parents/tips + Make PrepareBlockForTest resolve the selectedParent's UTXOSet if needed
* [NOD-1288] Include mass off coinbase transactions
* [NOD-1288] Move comment to correct position
* [NOD-1288] If blockAtDepth should return genesis - do it immidiately
* [NOD-1288] Comment-out instead of removeing scriptval_test.go
* [NOD-1288] Rename: entry -> utxoEntry
* [NOD-1288] Remove special function for calcCoinbaseTxMass
* [NOD-1288] Remove redundant check from checkEntryAmounts
* [NOD-1288] Rename: MaxMassPerBlock -> MaxMassAcceptedByBlock
* [NOD-1255] Implement boundedMergeBreakingParents
* [NOD-1255] Implement selectAllowedTips
* [NOD-1255] Integrate virtual parent selection into block verification process
* [NOD-1255] Add node to tips all the time, remove it from candidates and add it's parents if it's disqualified
* [NOD-1255] remove tips from virtaulBlock
* [NOD-1255] Rename: didVirtualParentsChanged -> didVirtualParentsChange
* [NOD-1255] Remove redundant sanity check
* [NOD-1255] Handle a forgotten error
* [NOD-1255] Prettify selectVirtualParents
* [NOD-1255] UpdateTipsUTXO should run over all UTXO-Verified tips, even if they are not parents of virtual
* [NOD-1311] Make isInPast inclusive
* [NOD-1032] Handle finality conflicts (#904)
* [NOD-1312] AddTip should not include finalityViolating and manuallyRejected blocks
* [NOD-1312] Implement resolveFinalityConflict
* [NOD-1312] Implement dag notifications for finalityChanges + updateing DAG state
* [NOD-1312] Added finality conflict rpc boilerplate
* [NOD-1312] Implement handling of getFinalityConflicts + resolveFinalityConflict RPCs
* [NOD-1312] Implement finality conflict related notifications
* [NOD-1312] Move all time to millisecond time
* [NOD-1312] Add comments + unexport some methods
* [NOD-1312] Add clarification in comments
* [NOD-1312] Move updateFinalityConflictResolution to finality_conflicts.go
* [NOD-1312] Rename: currentSelectedTip -> selectedTip
* [NOD-1312] Add long comment to ResolveFinalityConflict
* [NOD-1312] Convert areAllInSelectedParentChainOf into isInSelectedParentChainOfAll
* [NOD-1312] Rename chainUpdates (type) -> selectedParentChainUpdates, to distinguish from the variable chainUpdates
* [NOD-1032] Make all blockdag tests compile
* [NOD-1278] Fix finality-related tests (#910)
* [NOD-1032] Don't return node.dag.genesis from blockAtDepth because it might still not exist
* [NOD-1032] Actually add a tip in dag.addTip
* [NOD-1278] Add transaction to utxo set if it's coinbase
* [NOD-1278] Use VirtualParentHashes instead of TipHashes where appropriate
* [NOD-1278] If no valid virtual parent candidates - return error, don't wait for panic
* [NOD-1278] Transition TestCalcSequenceLock from newTestDAG to DAGSetup
* [NOD-1278] Fix .bluest() tie-breaker
* [NOD-1278] Remove feeData structure, as it no longer works, store feeData in acceptanceData
* [NOD-1278] Remove dag parameter from blockNode methods
* [NOD-1278] Fix TestBlueBlockWindow
* [NOD-1278] Don't subject selectedParent to MaxMergeSet
* [NOD-1278] se PrepareAndProcessBlockForTest instead of .addTip in TestSelectedPath
* [NOD-1278] Fixed TestDAGStateSerialization
* [NOD-1278] Fix TestAcceptanceIndexRecover
* [NOD-1278] Fix TestCheckConnectBlockTemplate
* [NOD-1278] Fix TestChainUpdates
* [NOD-1278] Fix and rename TestVirtualBlock -> TestTips
* [NOD-1278] Rename checkIsAccepted -> maybeAcceptTx
* [NOD-1278] Re-activate TestDoubleSpends
* Revert "[NOD-1278] Fixed TestDAGStateSerialization"
This reverts commit 845095d6de7207b07cf819d05f3f38ad94da9cf6.
* [NOD-1278] Remove dag parameter from expectedCoinbaseTransaction
* [NOD-1348] Implemented simplified Finality Conflict Resolution scheme (#911)
* [NOD-1348] Rename functions according to Research spec
* [NOD-1348] Added blockSet.areAllIn
* [NOD-1348] Implemented simplified finality conflict resolution scheme
* [NOD-1348] Refactorings and fixes in selectVirtualParents
* [NOD-1278] Fix bugs discovered by unit-tests + Fix unit-tests (#916)
* Updated to version v0.3.1
* [NOD-858] Don't switch sync peer if the syncing process hasn't yet started with the current sync peer (#700)
* [NOD-858] Don't switch sync peer if the syncing process hasn't yet started with the current sync peer
* [NOD-858] SetShouldSendBlockLocator(false) on OnBlockLocator
* [NOD-858] Rename shouldSendBlockLocator->wasBlockLocatorRequested
* [NOD-858] Move panic to shouldReplaceSyncPeer
* [NOD-869] Add a print after os.Exit(1) to see if it is ever called (#701)
* [NOD-1238] Fix acceptance index never being initialized. (#859)
* [NOD-1278] Genesis never violates finality
* [NOD-1348] Refactorings and fixes in selectVirtualParents
* [NOD-1278] Don't call dag.selectVirtualParents for genesis
* [NOD-1278] Properly organize errors in maybeAcceptBlock
* [NOD-1278] updateTipsUTXO should only run on tips whose status is
* [NOD-1278] updateTipsUTXO should only run on tips whose status is `valid`
* [NOD-1278] Fix TestDoubleSpends
* [NOD-1278] Fix TestDAGIndexFailedStatus
* [NOD-1278] IsFinalizedTransaction should use uint64 everywhere
* [NOD-1278] If tx is coinbase and not selectedParent - don't update pastUTXO
* [NOD-1278] Store tips and validTips separately
* [NOD-1278] Store ValidTips and VirtualParents in dagState
* [NOD-1278] Fix TestProcessOrphans
* [NOD-1278] Fix TestProcessOrphans
* [NOD-1278] Fix TestOrderInDiffFromAcceptanceData
* [NOD-1278] Fix TestHelp
* [NOD-1278] Remove mining.PrepareBlockForTest; use blockdag.PrepareBlockForTest instead
* [NOD-1278] Explicitly disallow chained transactions
* [NOD-1278]
* [NOD-1278] Fix some comments
Co-authored-by: Ori Newman <orinewman1@gmail.com>
Co-authored-by: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com>
Co-authored-by: Yuval Shaul <yuval.shaul@gmail.com>
* [NOD-1355] Add unit-test for finality + When resolving finalityConflict - make sure the block that will come out selectedTip is statusValid (#919)
* [NOD-1355] Added test for finality
* [NOD-1355] When resolving finalityConflict - make sure the block that will come out selectedTip is statusValid
* [NOD-1032] Renames: anything about inputsWithReferencedUTXOEntries -> remove 'Referenced'
* [NOD-1032] Don't ignore non-rule errors
* [NOD-1032] Fix comment
* [NOD-1032] Enhanced comments on TestChainUpdates
* [NOD-1032] Remove scriptval_test.go
* [NOD-1032] Extracted isNewSelectedTip to a method
* [NOD-1032] Use dag.Now() instead of mstime.Now()
* [NOD-1032] Print block status when accepting block
* [NOD-1032] Add comment explaining boundedMergeBreakingParents
* [NOD-1032] Enhanced test and imporved comments in TestFinality
* [NOD-1032] Rename: Objective finality -> bounded merge depth
* [NOD-1032] No need to check that validTips are valid
* [NOD-1032] Remove dag from arguments of updateDiffAndDiffChild
* [NOD-1032] Correct variable names in LookupNodes
[NOD-1032] Correct variable names in LookupNodes
* [NOD-1032] Fix some comments
* [NOD-1032] Some style changes
* [NOD-1032] Refactor isAnyInPastOf
* [NOD-1032] Enhance comment in updateVirtualParents
* [NOD-1032] Flip condition in updateVirtualParents
* [NOD-1032] Stylistic and grammatic fixes in dag.go and dag_test.go
* [NOD-1032] Explain why updateSelectedParentSet receives geneses on init
* [NOD-1032] Remove ErrParentManuallyRejected
* [NOD-1032] Added wrapper for resolveNodeStatus that creates a special transaction for it
* [NOD-1032] Rename: statusUTXONotVerified -> statusUTXOPendingVerification
* [NOD-1032] Use virtual parents in CurrentBits()
* [NOD-1032] rename: isViolatingSubjectiveFinality -> isViolatingFinality
* [NOD-1032] Move updateVirtualAndTips to applyDAGChanges
* [NOD-1032] Invert condition for isFinalityPointInPast
* [NOD-1032] Fix antiPastBetween isInPast became inclusive
* [NOD-1032] Remove redundant call for addTip
* [NOD-1032] Use calcCoinbaseTxMass where appropriate
* [NOD-1032] Remove time fields from conflict notifications
* [NOD-1032] Assign the correct thing to i
* [NOD-1032] unify checkOutputsAmounts and checkTxOutputAmounts
* [NOD-1032] Cleanup in CheckTransactionInputsAndCalulateFee
* [NOD-1032] Fixed some style and comments
* [NOD-1032] If selectedParent is disqualifiedFromChain - validateAndApplyUTXOSet should return this as a ruleError
* [NOD-1032] Set the status in resolveNodeStatus
* [NOD-1032] Correct comment on boundedMergeBreakingParents
* [NOD-1032] Fix a typo.
* [NOD-1032] Update a variable name.
* [NOD-1032] Fix a comment.
* [NOD-1032] Fix merge errors.
* [NOD-1032] Add VirtualParentHashes to getBlockDagInfo.
* [NOD-1032] Update handleGetBlockTemplate.
* [NOD-1032] Comment out all the old RPC stuff.
* [NOD-1032] Remove irrelevant type.
* [NOD-1032] Implement ResolveFinalityConflict.
* [NOD-1032] Remove irrelevant comments.
* [NOD-1032] Implement NotifyFinalityConflicts.
* [NOD-1032] Add FinalityConflictNotification and FinalityConflictResolvedNotification.
* [NOD-1032] Finish implementing finality conflict notifications.
* [NOD-1032] Remove old RPC stuff.
* [NOD-1032] Fix grammar in a comment.
Co-authored-by: Ori Newman <orinewman1@gmail.com>
Co-authored-by: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com>
Co-authored-by: Yuval Shaul <yuval.shaul@gmail.com>
Co-authored-by: stasatdaglabs <stas@daglabs.com>
* [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-289] Implemented database isCurrent checking and connection.
* [NOD-289] Added GetChainFromBlock to RPCClient.
* [NOD-289] Limited the amount of blocks in GetChainFromBlockResponse.
* [NOD-289] Fixed various issues that were keeping GetChainFromBlocks from working properly.
* [NOD-289] Created blockloop.go.
* [NOD-289] Updated go.mod after merge.
* [NOD-289] Implemented collection of current selected parent chain.
* [NOD-289] Fixed test. Reverted not deleting utxoDiffData from the DB.
* [NOD-289] Implemented GetBlocks.
* [NOD-289] Added comment to BlockHashesFrom.
* [NOD-289] Added GetBlocks to rpcclient.
* [NOD-289] Added verboseBlocks to GetBlocks.
* [NOD-289] Implemented block insertion.
* [NOD-289] Added AUTO_INCREMENT to tables that were missing it.
* [NOD-289] Made gasLimit in subnetwork nullable.
* [NOD-289] Renamed transactions_outputs to transaction_outputs.
* [NOD-289] Fixed weird coinbase behavior in vin.
* [NOD-289] Made collectCurrentBlocks start from the most recent startHash.
* [NOD-289] Added IsChainBlock to GetBlockVerboseResult.
* [NOD-289] Implemented adding a block from onBlockAdded.
* [NOD-289] Added removedParentChainHashes to getChainFromBlock.
* [NOD-289] Implemented updating the selected parent chain from onChainChanged.
* [NOD-289] Implemented some initial logic for updating the UTXO.
* [NOD-289] Fixed merge errors.
* [NOD-326] Fixed some more merge errors.
* [NOD-289] Added error handling for missing required records.
* [NOD-289] Implemented handling removedChainHashes.
* [NOD-289] Implemented handling addedChainBlocks.
* [NOD-289] Fixed incorrect coinbase check.
* [NOD-289] Implemented inserting the transaction output address.
* [NOD-289] Added updating block.IsChainBlock.
* [NOD-289] Split insertBlock into many small functions.
* [NOD-289] Split updateSelectedParentChain into smaller functions.
* [NOD-289] Fixed pointer errors.
* [NOD-289] Fixed a bad exists check.
* [NOD-289] Fixed a couple of small bugs.
* [NOD-289] Fixed a TxID/Hash mixup.
* [NOD-289] Added block/tx mass to getBlockVerboseResponse.
* [NOD-289] Renamed blockLoop.go to sync.go. Added comments.
* [NOD-289] Deleted apiserver README.
* [NOD-289] Fixed golint errors.
* [NOD-289] Renamed findMostRecentBlockHash to findHashOfBluestBlock.
* [NOD-289] Fixed style in syncBlocks and fixed a comment.
* [NOD-289] Copied NewErrorFromDBErrors over from NOD-324.
* [NOD-289] Created a couple of utils to make error handling with gorm slightly less painful.
* [NOD-289] Added error handling for database calls.
* [NOD-289] Fixed some more style/comments.
* [NOD-289] Fixed comments.
* [NOD-289] Renamed TransactionInput.TransactionOutput to TransactionInput.PreviousTransactionOutput.
* [NOD-289] Added a commends about pagination in getBlocks and getChainFromBlock.
* [NOD-289] Removed the coinbase field from Vin.
* [NOD-289] Deferred handling chainChangedMsgs until we have the appropriate data.
* [NOD-289] Optimized queries in updateRemovedChainHashes and updateAddedChainBlocks.
* [NOD-289] Optimized queries in insertBlockParents.
* [NOD-289] Optimized queries in insertTransactionInput.
* [NOD-289] Split Where calls to separate lines.
* [NOD-289] Fixed merge errors.
* [NOD-289] Exited early from insertBlockParents if we're the genesis block.
* [NOD-289] Improved nextChainChangedChan mechanism.
* [NOD-289] Fixed the above sync mechanism a bit.
* [NOD-289] Renamed IsDBRecordNotFoundError to HasDBRecordNotFoundError and IsDBError to HasDBError.
* [NOD-289] Replaced old error handling for db errors with the lovely new stuff.
* [NOD-289] Exited early if we already inserted a block. This saves us checking if a record already exists for some record types.
* [NOD-289] Decoupled syncBlocks from syncSelectedParentChain.
* [NOD-289] Made a comment more explicit.
* [NOD-289] Extracted net resolution to a separate function.
* [NOD-289] Extracted syncing to a separate function.
* [NOD-289] Fixed a comment.
* [NOD-289] Fixed merge erros.
* [NOD-289] Fixed a couple of bugs.
* [NOD-289] Fixed another bug.
* [NOD-289] Extracted ChainChangedMsg conversion to a separate function.
* [NOD-289] Optimized queries in canHandleChainChangedMsg.
* [NOD-289] Moved the sync function closer to its call site.
* [NOD-289] Renamed HasDBRecordNotFoundError to IsDBRecordNotFoundError.
* [NOD-289] Used count instead of first.
* [NOD-289] Renamed address to hexAddress.
* [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