* Address manager refactor stage 1
* Use a simpler weightedRand function which makes it easier parameterize to the process
* Switch back to connectionFailedCount
* Simplify selected entry deletion
* Fix function comment
Co-authored-by: Constantine Bitensky <cbitensky1@gmail.com>
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Fix stability test mining (allow submission of non DAA blocks too)
* Comments for go fmt
* Use SubmitBlockAlsoIfNonDAA for all tests
Co-authored-by: Elichai Turkel <elichai.turkel@gmail.com>
* 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>
* Seed from DNS only if we ran out of addresses to connect to
* Remove address if it has failed 10 connections
* Change connectionFailedCountForRemove to 3
* Disallow by default RPC submission of out of date blocks (blocks which are out of virtual DAA window)
* go fmt
* Better condition test
* Make allowNonDAABlocks an RPC field and not a command line flag
* go fmt
* one more go fmt
* 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>
* Update to version v0.11.8
* Call OnPruningPointUTXOSetOverride after committing the staging consensus
* use domain.Consensus() in utxo index so it'll always check the right consensus
* Add NewFileFromMnemonics
* Export InternalKeychain and ExternalKeychain
* Rename NewFileFromMnemonics -> NewFileFromMnemonic
* NewFileFromMnemonic: change also argument name
* Use libkaspawallet.ExternalKeychain instead of externalKeychain
* Fix num threads using getAEAD instead of decryptMnemonic
* Use d.NumThread to init bruteforce for num threads in getAEAD
Co-authored-by: Ori Newman <>
* Get rid of genesis's UTXO dump
* Allow known orphans when AllowSubmitBlockWhenNotSynced=true
* gofmt
* Avoid IBD without changing the pruning point when only genesis is available
* Add DisallowDirectBlocksOnTopOfGenesis=true for mainnet
* Remove any mention to nobanning to let stability tests run
* Rename ifGenesisSetUtxoSet to loadUTXODataForGenesis
Co-authored-by: Ori Newman <>
* UTXO dump of block 0fca37ca667c2d550a6c4416dad9717e50927128c424fa4edbebc436ab13aeef
* Activate HF immediately and change reward to 1000
* Change protocol version and datadir location
* Delete comments
* Fix zero hash to muhash zero hash in genesis utxo dump check
* Don't omit genesis as direct parent
* Fix tests
* Change subsidy to 500
* Dont assume genesis multiset is empty
* Fix BlockReward test
* Fix TestValidateAndInsertImportedPruningPoint test
* Fix pruning point genesis utxo set
* Fix tests related to mainnet utxo set
* Dont change the difficulty before you have a full window
* Fix TestBlockWindow tests
* Remove global utxo set variable, and persist mainnetnet utxo deserialization between runs
* Fix last tests
* Make peer banning opt-in
* small fix for a test
* Fix go lint
* Fix Ori's review comments
* Change DAA score of genesis to checkpoint DAA score and fix all tests
* Fix the BlockLevel bits counting
* Fix some tests and make them run a little faster
* Change datadir name back to kaspa-mainnet and change db path from /data to /datadir
* Last changes for the release and change the version to 0.11.5
Co-authored-by: Ori Newman <orinewman1@gmail.com>
Co-authored-by: Ori Newman <>
Co-authored-by: msutton <mikisiton2@gmail.com>
* Added a test which reproduces a bug where virtual's mergeset exceeds the mergeset limit -- this test currently fails
* Added a simple condition to fix the mergeset limit bug
* Format issue
* Modify DefaultTimeout to 120 seconds
A temporary workaround for nodes having trouble to sync (currently the download of pruning point related data during IBD takes more than 30 seconds)
* Cache existence in reachability store
* Cache block level in the header
* Fix IBD indication on submit block
* Add hardForkOmitGenesisFromParentsDAAScore logic
* Fix NumThreads bug in the wallet
* Get rid of ParentsAtLevel header method
* Fix a bug in BuildPruningPointProof
* Increase race detector timeout
* Add cache to BuildPruningPointProof
* Add comments and temp comment out go vet
* Fix ParentsAtLevel
* Dont fill empty parents
* Change HardForkOmitGenesisFromParentsDAAScore in fast netsync test
* Add --allow-submit-block-when-not-synced in stability tests
* Fix TestPruning
* Return fast tests
* Fix off by one error on kaspawallet
* Fetch only one block with trusted data at a time
* Update fork DAA score
* Don't ban for unexpected message type
* Fix tests
Co-authored-by: Michael Sutton <mikisiton2@gmail.com>
Co-authored-by: Ori Newman <>
* Decrease the dial timeout to 1 second
* Don't set blocks from the pruning point anticone as the header selected tip.
Co-authored-by: Kaspa Profiler <>
* Fix a bug in the matrix ranking algorithm
* Add tests and benchmarks for matrix generation and ranking
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Implement a MinerState to cache the matrix and friends
* Modify the miner and related code to use the new MinerCache
* Change MinerState to State
* Make go lint happy
Co-authored-by: Ori Newman <orinewman1@gmail.com>
Co-authored-by: Kaspa Profiler <>
* Replace keccak with CSHAKE256 in oPoW
* Add benchmarks to hash writers to compare blake2b to the CSHAKE
* Update genesis blocks
* Update tests
* Define genesis's block level to be the maximal one
* Add message to genesis coinbase
* Add comments to genesis coinbase
* Fix tests
Co-authored-by: Ori Newman <orinewman1@gmail.com>