* start
* pass tests, (cannot get before put!) and clean up.
* add rpc call.
* create and pass tests, fix bugs. fully implement rpc
* As always fmt
* remover old test
* clean up proto comment
* put the logger back in place.
* revert back to 10 sec limit.
* migration, change utxoChanged removal to whole utxoEntryPair, add methods to update circulating supply, intialize circulating supply from reset.
* Update utxoindex.go
* ad
* rename to max, change comment
* one more total to max
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Move OnBlockAdded event to the channel that was only used by virtualChanged events
* Don't send notifications for header-only and invalid blocks
* Return block status from block processor and use it for event raising decision
* Use MaybeEnqueue for consensus events
* go lint
* Fix RPC call to actually include tx ids
Co-authored-by: msutton <mikisiton2@gmail.com>
* Increase virtualChangeChan to 100e3
Don't crash when sending UTXO RPC notification to a closed route
Throw error if virtualChangeChan is full
* Use MaybeEnqueue in more places
* Remove comment
* Ignore capacity reached errors on MaybeEnqueue
* Use a channel from within consensus in order to raise change events in order -- note that this is only a draft commit for discussion
* Fix compilation
* Check for nil
* Allow nil virtualChangeChan
* Remove redundant comments
* Call notifyVirtualChange instead of notifyUTXOsChanged
* Remove redundant comment
* Add a separate function for initVirtualChangeHandler
* Remove redundant type
* Check for nil in the right place
* Fix integration test
* Add data to virtual changeset and cleanup block added event logic
* Renames
* Comment
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Allow blank address in NotifyUTXOsChanged to get all updates
* To see if address is possible to extract: Check for NonStandardTy rather than error
* Don't swallow errors
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Block template cache improvement
* Avoid concurrent calls to template builder
* Clear cache on new block event
* Move IsNearlySynced logic to within consensus and cache it for each template
* Use a single consensus call for building template and checking synced
Co-authored-by: msutton <mikisiton2@gmail.com>
* Add "sweep" command to kaspawallet
* minor linting & layout improvements.
* contain code in "sweep"
* update to sweep.go
* formatting and bugs
* clean up renaming of ExtractTransaction functions
* Nicer formating of display
* address reveiw.
* one more sweeped -> swept
* missed one reveiw comment. (extra mass).
* remove redundant code from split function.
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Use separate than finality depth for merge set calculations after HF
* Add comments and edit error messages
* Fix TestValidateTransactionInContextAndPopulateFee
* Don't disconnect from node if isViolatingBoundedMergeDepth
* Use new merge root for virtual pick parents; apply HF1 daa score split for validation only
* Use `blue work` heuristic to skip irrelevant relay blocks
* Minor
* Make sure virtual's merge depth root is a real block
* For ghostdag data we always use the non-trusted data
* Fix TestBoundedMergeDepth and in IBD use VirtualMergeDepthRoot instead of MergeDepthRoot
* Update HF1DAAScore
* Make sure merge root and finality are called + avoid calculating virtual root twice
* Update block version to 1 after HF
* Update to v0.12.0
Co-authored-by: msutton <mikisiton2@gmail.com>
* minor text fix
* Implement a block template cache with template modification/reuse mechanism
* Fix compilation error
* Address review comments
* Added a through TestModifyBlockTemplate test
* Update header timestamp if possible
* Avoid copying the transactions when only the header changed
* go fmt
* In blockParentBuilder.BuildParents check if a block is isInFutureOfVirtualGenesisChildren instead of checking if it has reachability data
* Add comment
* Unite all reachability stores
* Upgrade script
* Fix tests
* Add UpdateReindexRoot to RebuildReachability
* Use dbTx when deleting reachability stores
* Use ghostdagDataWithoutPrunedBlocks when rebuilding reachability
* Use next tree ancestor wherever possible and avoid finality point search if the block is too close to pruning point
* Address the boundary case where the pruning point becomes the finality point
* some minor fixes
* Remove RebuildReachability and use manual syncing between old and new consensus for migration
* Remove sanity test (it failed when tips where not in the same order)
Co-authored-by: msutton <mikisiton2@gmail.com>
* Add GetUTXOsByBalances command to rpc
* Fix wrong commands in GetBalanceByAddress
* Moved calculation of TransactionMass out of TransactionValidator, so t that it can be used in kaspawallet
* Allow CreateUnsignedTransaction to return multiple transactions
* Start working on split
* Implement maybeSplitTransactionInner
* estimateMassIncreaseForSignatures should multiply by the number of inputs
* Implement createSplitTransaction
* Implement mergeTransactions
* Broadcast all transaction, not only 1
* workaround missing UTXOEntry in partially signed transaction
* Bugfix in broadcast loop
* Add underscores in some constants
* Make all nets RelayNonStdTxs: false
* Change estimateMassIncreaseForSignatures to estimateMassAfterSignatures
* Allow situations where merge transaction doesn't have enough funds to pay fees
* Add comments
* A few of renames
* Handle missed errors
* Fix clone of PubKeySignaturePair to properly clone nil signatures
* Add sanity check to make sure originalTransaction has exactly two outputs
* Re-use change address for splitAddress
* Add one more utxo if the total amount is smaller then what we need to send due to fees
* Fix off-by-1 error in splitTrasnaction
* Add a comment to maybeAutoCompoundTransaction
* Add comment on why we are increasing inputCountPerSplit
* Add comment explaining while originalTransaction has 1 or 2 outputs
* Move oneMoreUTXOForMergeTransaction to split_transaction.go
* Allow to add multiple utxos to pay fee for mergeTransactions, if needed
* calculate split input counts and sizes properly
* Allow multiple transactions inside the create-unsigned-transaction -> sign -> broadcast workflow
* Print the number of transaction which was sent, in case there were multiple
* Rename broadcastConfig.Transaction(File) to Transactions(File)
* Convert alreadySelectedUTXOs to a map
* Fix a typo
* Add comment explaining that we assume all inputs are the same
* Revert over-refactor of rename of config.Transaction -> config.Transactions
* Rename: inputPerSplitCount -> inputsPerSplitCount
* Add comment for splitAndInputPerSplitCounts
* Use createSplitTransaction to calculate the upper bound of mass for split transactions
* Improve output of non-critical protocol errors to avoid user panic
* Add log messages at the end of IBD with headers proof
* Found a case where this was falsely triggered due to the wrong equality test
* Fix error message referencing wrong function name
* Ignore not found errors from tp.transactionsOrderedByFeeRate.Remove.
Co-authored-by: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com>
* add p2p v5 which is currently identical to v4
* set all internal imports to v5
* set default version to 5
* Send pruning point and its anticone in batches
* go lint
* Fix jsom format
* Use DequeueWithTimeout
* Assert that batch size < route capacity
* oops, this is a flow handler, by definition it needs to be w/o a timeout
* here however, a timeout is required
* Keep IDs of prev messages unmodified
* previous merge operation accidentally erased an important part of this pr
* Extend timeout of simple sync
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* add p2p v5 which is currently identical to v4
* set all internal imports to v5
* wip
* set default version to 5
* protobuf gen for new ibd chain locator
* wire for new ibd chain locator types
* new ibd shared block algo -- only basic test passing
* address the case where pruning points disagree, now both IBD tests pass
* protobuf gen for new past diff request message
* wire for new request past diff message
* handle and flow for new request past diff message - logic unimplemented yet
* implement ibd sync past diff of relay and selected tip
* go fmt
* remove unused methods
* missed one err check
* addressing simple comments
* apply the traversal limit logic and sort headers
* rename pastdiff -> anticone
* apply Don't relay blocks in virtual anticone #1970 to v5
* go fmt
* Fixed minor comments
* Limit the number of chain negotiation restarts
* Make findTransactionIndex return wasFound explicitly + fix crash caused by invalid handling of not found transaction
* Add comment on findTransactionIndex
* Add cache to block window
* Copy the window heap slice with the right capacity
* Use WindowHeapSliceStore
* Use the selected parent window as a basis (and some comments and variable renames)
* Clone slice on newSizedUpHeapFromSlice
* Rename isNotFoundError->currentIsNonTrustedBlock
* Increase windowHeapSliceStore cache size to 2000 and some cosmetic changes
* Make MaxBlockLevel a DAG params instead of a constant.
* Change the testnet network name to 9.
* Fix TestBlockWindow.
* Set MaxBlockLevels for non-mainnet networks to 250.
* Revert "Fix TestBlockWindow."
This reverts commit 30a7892f53e0bb8d0d24435a68f0561a8efab575.
* Fix TestPruning.
* Split ApplyPruningPointProof to multiple small database transactions.
* Increase the timeout duration in TestIBDWithPruning.
* Increase the timeout duration in simple-sync.
* Explain that if ApplyPruningPointProof fails, the database must be discarded.
* Fix for rare consensus bug: daa window min-time-block was not deterministic when timestamps are equal
* Something is missing
* Extract compare logic to a function with better performance
* typo
* Copy blockrelay flows to v4
* Remove duplicate sending of the same DAA blocks
* Advance testnet version
* Renames and add comments
* Add IBD test between v3 and v4
* Fix syncee v4 p2p version
* Check if netsync finished with selected tip
* Implement upgrade mechanism for p2p
* Remove dependencies from flowcontext to v3
* Add p2p v4
* Add Ready flow
* Remove copy paste code of v3
* Register SendAddresses flow at the top level
* Add option to set protocol version from CLI and add TestAddressExchangeV3V4
* Send ready message on minimal net adapter
* Rename defaultMaxProtocolVersion->maxAcceptableProtocolVersion
* Don't assume pruning point is at specific level
* Reverse pruning points order in ArePruningPointsViolatingFinality
Co-authored-by: Michael Sutton <mikisiton2@gmail.com>
* Remove unused functions, constants, and variables.
* Rename maxSubsidy to baseSubsidy.
* Remove unused parameters from CalcBlockSubsidy.
* Remove link to old monetary policy.
* If a block's DAA score is smaller than half a year, it should have a base subsidy.
* Fix merge errors.
* Fix more merge errors.
* Add DeflationaryPhaseBaseSubsidy to the params.
* Implement TestCalcDeflationaryPeriodBlockSubsidy.
* Implement calcDeflationaryPeriodBlockSubsidy naively.
* Implement calcDeflationaryPeriodBlockSubsidy not naively.
* Adjust the subsidy based on target block rate.
* Fix deflationaryPhaseDaaScore in TestCalcDeflationaryPeriodBlockSubsidy.
* Explain how secondsPerMonth is calculated.
* Don't adjust the subsidy based on the target block rate.
* Update defaultDeflationaryPhaseDaaScore and add an explanation.
* Use a pre-calculated table for subsidy per month
* Make the generation function fail if base subsidy is changed
* go fmt
* Use test logger for printing + simplify print loop
Co-authored-by: msutton <mikisiton2@gmail.com>
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Update to version v0.11.8
* bugfix: addresses issue #1903, raised kaspawallet bruteforce core limit to 256
* fix contributing.md text
* added dns seeder kaspadns.kaspacalc.net
Co-authored-by: Ori Newman <orinewman1@gmail.com>