Repository: kaspanet/kaspad
Pull request #1680 (2021-04-18 12:49:11)

Add consensus.Config as a wrapper for dagParams
This is a follow up built on #1679 it wrapps `isArchivalNode` and `EnableSanityCheckPruningUTXO` in a struct that also wraps `dagParams`

codecov[bot]: # [Codecov](https://codecov.io/gh/kaspanet/kaspad/pull/1680?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet) Report
> :exclamation: No coverage uploaded for pull request base (`v0.10.0-dev@acdc59b`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet#section-missing-base-commit).
> The diff coverage is `92.85%`.

[![Impacted file tree graph](https://codecov.io/gh/kaspanet/kaspad/pull/1680/graphs/tree.svg?width=650&height=150&src=pr&token=2FBIEEJTNU&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet)](https://codecov.io/gh/kaspanet/kaspad/pull/1680?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet)

```diff
@@              Coverage Diff               @@
##             v0.10.0-dev    #1680   +/-   ##
==============================================
  Coverage               ?   59.35%           
==============================================
  Files                  ?      550           
  Lines                  ?    21838           
  Branches               ?        0           
==============================================
  Hits                   ?    12962           
  Misses                 ?     6817           
  Partials               ?     2059           
```


| [Impacted Files](https://codecov.io/gh/kaspanet/kaspad/pull/1680?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet) | Coverage Δ | |
|---|---|---|
| [domain/consensus/utils/testutils/test\_ghostdag.go](https://codecov.io/gh/kaspanet/kaspad/pull/1680/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet#diff-ZG9tYWluL2NvbnNlbnN1cy91dGlscy90ZXN0dXRpbHMvdGVzdF9naG9zdGRhZy5nbw==) | `73.33% <ø> (ø)` | |
| [infrastructure/config/config.go](https://codecov.io/gh/kaspanet/kaspad/pull/1680/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet#diff-aW5mcmFzdHJ1Y3R1cmUvY29uZmlnL2NvbmZpZy5nbw==) | `11.11% <ø> (ø)` | |
| [...ensus/processes/blockbuilder/test\_block\_builder.go](https://codecov.io/gh/kaspanet/kaspad/pull/1680/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet#diff-ZG9tYWluL2NvbnNlbnN1cy9wcm9jZXNzZXMvYmxvY2tidWlsZGVyL3Rlc3RfYmxvY2tfYnVpbGRlci5nbw==) | `69.56% <50.00%> (ø)` | |
| [...nsensus/processes/pruningmanager/pruningmanager.go](https://codecov.io/gh/kaspanet/kaspad/pull/1680/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet#diff-ZG9tYWluL2NvbnNlbnN1cy9wcm9jZXNzZXMvcHJ1bmluZ21hbmFnZXIvcHJ1bmluZ21hbmFnZXIuZ28=) | `55.21% <83.33%> (ø)` | |
| [app/component\_manager.go](https://codecov.io/gh/kaspanet/kaspad/pull/1680/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet#diff-YXBwL2NvbXBvbmVudF9tYW5hZ2VyLmdv) | `61.84% <100.00%> (ø)` | |
| [domain/consensus/factory.go](https://codecov.io/gh/kaspanet/kaspad/pull/1680/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet#diff-ZG9tYWluL2NvbnNlbnN1cy9mYWN0b3J5Lmdv) | `91.27% <100.00%> (ø)` | |
| [domain/consensus/utils/testutils/for\_all\_nets.go](https://codecov.io/gh/kaspanet/kaspad/pull/1680/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet#diff-ZG9tYWluL2NvbnNlbnN1cy91dGlscy90ZXN0dXRpbHMvZm9yX2FsbF9uZXRzLmdv) | `100.00% <100.00%> (ø)` | |
| [domain/domain.go](https://codecov.io/gh/kaspanet/kaspad/pull/1680/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet#diff-ZG9tYWluL2RvbWFpbi5nbw==) | `83.33% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/kaspanet/kaspad/pull/1680?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/kaspanet/kaspad/pull/1680?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet). Last update [acdc59b...a5fcdb5](https://codecov.io/gh/kaspanet/kaspad/pull/1680?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kaspanet).

svarogg: Approved. Waiting on #1679 for merge

Patch:
diff --git a/app/component_manager.go b/app/component_manager.go
index 02680dc8..7e2d09de 100644
--- a/app/component_manager.go
+++ b/app/component_manager.go
@@ -4,23 +4,19 @@ import (
 	"fmt"
 	"sync/atomic"
 
-	"github.com/kaspanet/kaspad/domain/utxoindex"
-
-	infrastructuredatabase "github.com/kaspanet/kaspad/infrastructure/db/database"
-
-	"github.com/kaspanet/kaspad/domain"
-
-	"github.com/kaspanet/kaspad/infrastructure/network/addressmanager"
-
-	"github.com/kaspanet/kaspad/infrastructure/network/netadapter/id"
-
 	"github.com/kaspanet/kaspad/app/appmessage"
 	"github.com/kaspanet/kaspad/app/protocol"
 	"github.com/kaspanet/kaspad/app/rpc"
+	"github.com/kaspanet/kaspad/domain"
+	"github.com/kaspanet/kaspad/domain/consensus"
+	"github.com/kaspanet/kaspad/domain/utxoindex"
 	"github.com/kaspanet/kaspad/infrastructure/config"
+	infrastructuredatabase "github.com/kaspanet/kaspad/infrastructure/db/database"
+	"github.com/kaspanet/kaspad/infrastructure/network/addressmanager"
 	"github.com/kaspanet/kaspad/infrastructure/network/connmanager"
 	"github.com/kaspanet/kaspad/infrastructure/network/dnsseed"
 	"github.com/kaspanet/kaspad/infrastructure/network/netadapter"
+	"github.com/kaspanet/kaspad/infrastructure/network/netadapter/id"
 	"github.com/kaspanet/kaspad/util/panics"
 )
 
@@ -82,7 +78,13 @@ func (a *ComponentManager) Stop() {
 func NewComponentManager(cfg *config.Config, db infrastructuredatabase.Database, interrupt chan<- struct{}) (
 	*ComponentManager, error) {
 
-	domain, err := domain.New(cfg.ActiveNetParams, db, cfg.IsArchivalNode)
+	consensusConfig := consensus.Config{
+		Params:                          *cfg.ActiveNetParams,
+		IsArchival:                      cfg.IsArchivalNode,
+		EnableSanityCheckPruningUTXOSet: cfg.EnableSanityCheckPruningUTXOSet,
+	}
+
+	domain, err := domain.New(&consensusConfig, db)
 	if err != nil {
 		return nil, err
 	}
diff --git a/domain/consensus/factory.go b/domain/consensus/factory.go
index 77415b4c..857eb038 100644
--- a/domain/consensus/factory.go
+++ b/domain/consensus/factory.go
@@ -5,13 +5,6 @@ import (
 	"os"
 	"sync"
 
-	daablocksstore "github.com/kaspanet/kaspad/domain/consensus/datastructures/daablocksstore"
-
-	"github.com/kaspanet/kaspad/domain/consensus/datastructures/headersselectedchainstore"
-
-	"github.com/kaspanet/kaspad/domain/consensus/processes/dagtraversalmanager"
-	"github.com/kaspanet/kaspad/domain/consensus/processes/finalitymanager"
-
 	consensusdatabase "github.com/kaspanet/kaspad/domain/consensus/database"
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/acceptancedatastore"
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/blockheaderstore"
@@ -19,8 +12,10 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/blockstatusstore"
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/blockstore"
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/consensusstatestore"
+	daablocksstore "github.com/kaspanet/kaspad/domain/consensus/datastructures/daablocksstore"
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/finalitystore"
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/ghostdagdatastore"
+	"github.com/kaspanet/kaspad/domain/consensus/datastructures/headersselectedchainstore"
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/headersselectedtipstore"
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/multisetstore"
 	"github.com/kaspanet/kaspad/domain/consensus/datastructures/pruningstore"
@@ -34,7 +29,9 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/processes/coinbasemanager"
 	"github.com/kaspanet/kaspad/domain/consensus/processes/consensusstatemanager"
 	"github.com/kaspanet/kaspad/domain/consensus/processes/dagtopologymanager"
+	"github.com/kaspanet/kaspad/domain/consensus/processes/dagtraversalmanager"
 	"github.com/kaspanet/kaspad/domain/consensus/processes/difficultymanager"
+	"github.com/kaspanet/kaspad/domain/consensus/processes/finalitymanager"
 	"github.com/kaspanet/kaspad/domain/consensus/processes/ghostdagmanager"
 	"github.com/kaspanet/kaspad/domain/consensus/processes/headersselectedtipmanager"
 	"github.com/kaspanet/kaspad/domain/consensus/processes/mergedepthmanager"
@@ -54,11 +51,20 @@ const (
 	defaultTestPreallocateCaches   = false
 )
 
+// Config is the full config required to run consensus
+type Config struct {
+	dagconfig.Params
+	// IsArchival tells the consensus if it should not prune old blocks
+	IsArchival bool
+	// EnableSanityCheckPruningUTXOSet checks the full pruning point utxo set against the commitment at every pruning movement
+	EnableSanityCheckPruningUTXOSet bool
+}
+
 // Factory instantiates new Consensuses
 type Factory interface {
-	NewConsensus(dagParams *dagconfig.Params, db infrastructuredatabase.Database, isArchivalNode bool) (
+	NewConsensus(config *Config, db infrastructuredatabase.Database) (
 		externalapi.Consensus, error)
-	NewTestConsensus(dagParams *dagconfig.Params, isArchivalNode bool, testName string) (
+	NewTestConsensus(config *Config, testName string) (
 		tc testapi.TestConsensus, teardown func(keepDataDir bool), err error)
 
 	SetTestDataDir(dataDir string)
@@ -88,12 +94,12 @@ func NewFactory() Factory {
 }
 
 // NewConsensus instantiates a new Consensus
-func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredatabase.Database, isArchivalNode bool) (
+func (f *factory) NewConsensus(config *Config, db infrastructuredatabase.Database) (
 	externalapi.Consensus, error) {
 
 	dbManager := consensusdatabase.New(db)
 
-	pruningWindowSizeForCaches := int(dagParams.PruningDepth())
+	pruningWindowSizeForCaches := int(config.PruningDepth())
 
 	var preallocateCaches bool
 	if f.preallocateCaches != nil {
@@ -104,7 +110,7 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 
 	// This is used for caches that are used as part of deletePastBlocks that need to traverse until
 	// the previous pruning point.
-	pruningWindowSizePlusFinalityDepthForCache := int(dagParams.PruningDepth() + dagParams.FinalityDepth())
+	pruningWindowSizePlusFinalityDepthForCache := int(config.PruningDepth() + config.FinalityDepth())
 
 	// Data Structures
 	acceptanceDataStore := acceptancedatastore.New(200, preallocateCaches)
@@ -129,15 +135,15 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 	// a single DifficultyAdjustmentWindow. To alleviate this problem we make sure that the cache size is at least
 	// dagParams.DifficultyAdjustmentWindowSize
 	ghostdagDataCacheSize := pruningWindowSizeForCaches
-	if ghostdagDataCacheSize < dagParams.DifficultyAdjustmentWindowSize {
-		ghostdagDataCacheSize = dagParams.DifficultyAdjustmentWindowSize
+	if ghostdagDataCacheSize < config.DifficultyAdjustmentWindowSize {
+		ghostdagDataCacheSize = config.DifficultyAdjustmentWindowSize
 	}
 	ghostdagDataStore := ghostdagdatastore.New(ghostdagDataCacheSize, preallocateCaches)
 
 	headersSelectedTipStore := headersselectedtipstore.New()
 	finalityStore := finalitystore.New(200, preallocateCaches)
 	headersSelectedChainStore := headersselectedchainstore.New(pruningWindowSizeForCaches, preallocateCaches)
-	daaBlocksStore := daablocksstore.New(pruningWindowSizeForCaches, int(dagParams.FinalityDepth()), preallocateCaches)
+	daaBlocksStore := daablocksstore.New(pruningWindowSizeForCaches, int(config.FinalityDepth()), preallocateCaches)
 
 	// Processes
 	reachabilityManager := reachabilitymanager.New(
@@ -154,7 +160,7 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 		dagTopologyManager,
 		ghostdagDataStore,
 		blockHeaderStore,
-		dagParams.K)
+		config.K)
 	dagTraversalManager := dagtraversalmanager.New(
 		dbManager,
 		dagTopologyManager,
@@ -162,20 +168,20 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 		reachabilityDataStore,
 		ghostdagManager,
 		consensusStateStore,
-		dagParams.GenesisHash)
+		config.GenesisHash)
 	pastMedianTimeManager := f.pastMedianTimeConsructor(
-		dagParams.TimestampDeviationTolerance,
+		config.TimestampDeviationTolerance,
 		dbManager,
 		dagTraversalManager,
 		blockHeaderStore,
 		ghostdagDataStore,
-		dagParams.GenesisHash)
-	transactionValidator := transactionvalidator.New(dagParams.BlockCoinbaseMaturity,
-		dagParams.EnableNonNativeSubnetworks,
-		dagParams.MassPerTxByte,
-		dagParams.MassPerScriptPubKeyByte,
-		dagParams.MassPerSigOp,
-		dagParams.MaxCoinbasePayloadLength,
+		config.GenesisHash)
+	transactionValidator := transactionvalidator.New(config.BlockCoinbaseMaturity,
+		config.EnableNonNativeSubnetworks,
+		config.MassPerTxByte,
+		config.MassPerScriptPubKeyByte,
+		config.MassPerSigOp,
+		config.MaxCoinbasePayloadLength,
 		dbManager,
 		pastMedianTimeManager,
 		ghostdagDataStore,
@@ -188,29 +194,29 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 		daaBlocksStore,
 		dagTopologyManager,
 		dagTraversalManager,
-		dagParams.PowMax,
-		dagParams.DifficultyAdjustmentWindowSize,
-		dagParams.DisableDifficultyAdjustment,
-		dagParams.TargetTimePerBlock,
-		dagParams.GenesisHash)
+		config.PowMax,
+		config.DifficultyAdjustmentWindowSize,
+		config.DisableDifficultyAdjustment,
+		config.TargetTimePerBlock,
+		config.GenesisHash)
 	coinbaseManager := coinbasemanager.New(
 		dbManager,
-		dagParams.SubsidyReductionInterval,
-		dagParams.BaseSubsidy,
-		dagParams.CoinbasePayloadScriptPublicKeyMaxLength,
+		config.SubsidyReductionInterval,
+		config.BaseSubsidy,
+		config.CoinbasePayloadScriptPublicKeyMaxLength,
 		ghostdagDataStore,
 		acceptanceDataStore,
 		daaBlocksStore)
 	headerTipsManager := headersselectedtipmanager.New(dbManager, dagTopologyManager, dagTraversalManager,
 		ghostdagManager, headersSelectedTipStore, headersSelectedChainStore)
-	genesisHash := dagParams.GenesisHash
+	genesisHash := config.GenesisHash
 	finalityManager := finalitymanager.New(
 		dbManager,
 		dagTopologyManager,
 		finalityStore,
 		ghostdagDataStore,
 		genesisHash,
-		dagParams.FinalityDepth())
+		config.FinalityDepth())
 	mergeDepthManager := mergedepthmanager.New(
 		dbManager,
 		dagTopologyManager,
@@ -218,15 +224,15 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 		finalityManager,
 		ghostdagDataStore)
 	blockValidator := blockvalidator.New(
-		dagParams.PowMax,
-		dagParams.SkipProofOfWork,
+		config.PowMax,
+		config.SkipProofOfWork,
 		genesisHash,
-		dagParams.EnableNonNativeSubnetworks,
-		dagParams.MaxBlockSize,
-		dagParams.MergeSetSizeLimit,
-		dagParams.MaxBlockParents,
-		dagParams.TimestampDeviationTolerance,
-		dagParams.TargetTimePerBlock,
+		config.EnableNonNativeSubnetworks,
+		config.MaxBlockSize,
+		config.MergeSetSizeLimit,
+		config.MaxBlockParents,
+		config.TimestampDeviationTolerance,
+		config.TargetTimePerBlock,
 
 		dbManager,
 		difficultyManager,
@@ -249,10 +255,10 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 	)
 	consensusStateManager, err := consensusstatemanager.New(
 		dbManager,
-		dagParams.PruningDepth(),
-		dagParams.MaxMassAcceptedByBlock,
-		dagParams.MaxBlockParents,
-		dagParams.MergeSetSizeLimit,
+		config.PruningDepth(),
+		config.MaxMassAcceptedByBlock,
+		config.MaxBlockParents,
+		config.MergeSetSizeLimit,
 		genesisHash,
 
 		ghostdagManager,
@@ -299,11 +305,11 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 		blockHeaderStore,
 		utxoDiffStore,
 		daaBlocksStore,
-		isArchivalNode,
+		config.IsArchival,
 		genesisHash,
-		dagParams.FinalityDepth(),
-		dagParams.PruningDepth(),
-		dagParams.EnableSanityCheckPruningUTXOSet)
+		config.FinalityDepth(),
+		config.PruningDepth(),
+		config.EnableSanityCheckPruningUTXOSet)
 
 	syncManager := syncmanager.New(
 		dbManager,
@@ -337,7 +343,7 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 
 	blockProcessor := blockprocessor.New(
 		genesisHash,
-		dagParams.TargetTimePerBlock,
+		config.TargetTimePerBlock,
 		dbManager,
 		consensusStateManager,
 		pruningManager,
@@ -412,7 +418,7 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 	}
 
 	if !genesisInfo.Exists {
-		_, err = c.ValidateAndInsertBlock(dagParams.GenesisBlock)
+		_, err = c.ValidateAndInsertBlock(config.GenesisBlock)
 		if err != nil {
 			return nil, err
 		}
@@ -434,7 +440,7 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
 	return c, nil
 }
 
-func (f *factory) NewTestConsensus(dagParams *dagconfig.Params, isArchivalNode bool, testName string) (
+func (f *factory) NewTestConsensus(config *Config, testName string) (
 	tc testapi.TestConsensus, teardown func(keepDataDir bool), err error) {
 	datadir := f.dataDir
 	if datadir == "" {
@@ -456,7 +462,7 @@ func (f *factory) NewTestConsensus(dagParams *dagconfig.Params, isArchivalNode b
 	if err != nil {
 		return nil, nil, err
 	}
-	consensusAsInterface, err := f.NewConsensus(dagParams, db, isArchivalNode)
+	consensusAsInterface, err := f.NewConsensus(config, db)
 	if err != nil {
 		return nil, nil, err
 	}
@@ -466,7 +472,7 @@ func (f *factory) NewTestConsensus(dagParams *dagconfig.Params, isArchivalNode b
 	testTransactionValidator := transactionvalidator.NewTestTransactionValidator(consensusAsImplementation.transactionValidator)
 
 	tstConsensus := &testConsensus{
-		dagParams:                 dagParams,
+		dagParams:                 &config.Params,
 		consensus:                 consensusAsImplementation,
 		database:                  db,
 		testConsensusStateManager: testConsensusStateManager,
diff --git a/domain/dagconfig/params.go b/domain/dagconfig/params.go
index 13ae0d98..e1675b4f 100644
--- a/domain/dagconfig/params.go
+++ b/domain/dagconfig/params.go
@@ -179,9 +179,6 @@ type Params struct {
 
 	// BaseSubsidy is the starting subsidy amount for mined blocks.
 	BaseSubsidy uint64
-
-	// EnableSanityCheckPruningUTXOSet checks the full pruning point utxo set against the commitment at every pruning movement
-	EnableSanityCheckPruningUTXOSet bool
 }
 
 // NormalizeRPCServerAddress returns addr with the current network default
diff --git a/domain/domain.go b/domain/domain.go
index 124cfd87..e1bfb054 100644
--- a/domain/domain.go
+++ b/domain/domain.go
@@ -3,7 +3,6 @@ package domain
 import (
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/kaspanet/kaspad/domain/miningmanager"
 	infrastructuredatabase "github.com/kaspanet/kaspad/infrastructure/db/database"
 )
@@ -28,15 +27,15 @@ func (d domain) MiningManager() miningmanager.MiningManager {
 }
 
 // New instantiates a new instance of a Domain object
-func New(dagParams *dagconfig.Params, db infrastructuredatabase.Database, isArchivalNode bool) (Domain, error) {
+func New(consensusConfig *consensus.Config, db infrastructuredatabase.Database) (Domain, error) {
 	consensusFactory := consensus.NewFactory()
-	consensusInstance, err := consensusFactory.NewConsensus(dagParams, db, isArchivalNode)
+	consensusInstance, err := consensusFactory.NewConsensus(consensusConfig, db)
 	if err != nil {
 		return nil, err
 	}
 
 	miningManagerFactory := miningmanager.NewFactory()
-	miningManager := miningManagerFactory.NewMiningManager(consensusInstance, dagParams)
+	miningManager := miningManagerFactory.NewMiningManager(consensusInstance, &consensusConfig.Params)
 
 	return &domain{
 		consensus:     consensusInstance,
diff --git a/infrastructure/config/config.go b/infrastructure/config/config.go
index c684d00c..d130d34c 100644
--- a/infrastructure/config/config.go
+++ b/infrastructure/config/config.go
@@ -577,9 +577,6 @@ func LoadConfig() (*Config, error) {
 	if configFileError != nil {
 		log.Warnf("%s", configFileError)
 	}
-
-	cfg.ActiveNetParams.EnableSanityCheckPruningUTXOSet = cfg.EnableSanityCheckPruningUTXOSet
-
 	return cfg, nil
 }
 


Test patch:
diff --git a/app/protocol/flows/testing/handle_relay_invs_test.go b/app/protocol/flows/testing/handle_relay_invs_test.go
index 2a3be5e2..ba672503 100644
--- a/app/protocol/flows/testing/handle_relay_invs_test.go
+++ b/app/protocol/flows/testing/handle_relay_invs_test.go
@@ -10,6 +10,7 @@ import (
 	"github.com/kaspanet/kaspad/app/protocol/flows/blockrelay"
 	peerpkg "github.com/kaspanet/kaspad/app/protocol/peer"
 	"github.com/kaspanet/kaspad/domain"
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/ruleerrors"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/blockheader"
@@ -1496,7 +1497,7 @@ func TestHandleRelayInvs(t *testing.T) {
 		},
 	}
 
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		for _, test := range tests {
 
 			// This is done to avoid race condition
@@ -1511,7 +1512,7 @@ func TestHandleRelayInvs(t *testing.T) {
 				errChan := make(chan error)
 				context := &fakeRelayInvsContext{
 					testName:    test.name,
-					params:      params,
+					params:      &consensusConfig.Params,
 					finishedIBD: make(chan struct{}),
 
 					trySetIBDRunningResponse:    true,
diff --git a/app/protocol/flows/testing/receiveaddresses_test.go b/app/protocol/flows/testing/receiveaddresses_test.go
index b38b3fec..eb64784b 100644
--- a/app/protocol/flows/testing/receiveaddresses_test.go
+++ b/app/protocol/flows/testing/receiveaddresses_test.go
@@ -1,15 +1,16 @@
 package testing
 
 import (
+	"testing"
+	"time"
+
 	"github.com/kaspanet/kaspad/app/appmessage"
 	"github.com/kaspanet/kaspad/app/protocol/flows/addressexchange"
 	peerpkg "github.com/kaspanet/kaspad/app/protocol/peer"
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/kaspanet/kaspad/infrastructure/network/addressmanager"
 	"github.com/kaspanet/kaspad/infrastructure/network/netadapter/router"
-	"testing"
-	"time"
 )
 
 type fakeReceiveAddressesContext struct{}
@@ -19,7 +20,7 @@ func (f fakeReceiveAddressesContext) AddressManager() *addressmanager.AddressMan
 }
 
 func TestReceiveAddressesErrors(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		incomingRoute := router.NewRoute()
 		outgoingRoute := router.NewRoute()
 		peer := peerpkg.New(nil)
diff --git a/app/rpc/rpchandlers/get_blocks_test.go b/app/rpc/rpchandlers/get_blocks_test.go
index f558cbc5..bd7e61b8 100644
--- a/app/rpc/rpchandlers/get_blocks_test.go
+++ b/app/rpc/rpchandlers/get_blocks_test.go
@@ -15,7 +15,6 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/hashes"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/kaspanet/kaspad/domain/miningmanager"
 	"github.com/kaspanet/kaspad/infrastructure/config"
 )
@@ -28,18 +27,18 @@ func (d fakeDomain) Consensus() externalapi.Consensus           { return d }
 func (d fakeDomain) MiningManager() miningmanager.MiningManager { return nil }
 
 func TestHandleGetBlocks(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		stagingArea := model.NewStagingArea()
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestHandleGetBlocks")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestHandleGetBlocks")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
 		fakeContext := rpccontext.Context{
-			Config: &config.Config{Flags: &config.Flags{NetworkFlags: config.NetworkFlags{ActiveNetParams: params}}},
+			Config: &config.Config{Flags: &config.Flags{NetworkFlags: config.NetworkFlags{ActiveNetParams: &consensusConfig.Params}}},
 			Domain: fakeDomain{tc},
 		}
 
@@ -81,7 +80,7 @@ func TestHandleGetBlocks(t *testing.T) {
 		//        \       |      /
 		//               etc.
 		expectedOrder := make([]*externalapi.DomainHash, 0, 40)
-		mergingBlock := params.GenesisHash
+		mergingBlock := consensusConfig.GenesisHash
 		for i := 0; i < 10; i++ {
 			splitBlocks := make([]*externalapi.DomainHash, 0, 3)
 			for j := 0; j < 3; j++ {
@@ -134,13 +133,13 @@ func TestHandleGetBlocks(t *testing.T) {
 				virtualSelectedParent, actualBlocks.BlockHashes)
 		}
 
-		expectedOrder = append([]*externalapi.DomainHash{params.GenesisHash}, expectedOrder...)
+		expectedOrder = append([]*externalapi.DomainHash{consensusConfig.GenesisHash}, expectedOrder...)
 		actualOrder := getBlocks(nil)
 		if !reflect.DeepEqual(actualOrder.BlockHashes, hashes.ToStrings(expectedOrder)) {
 			t.Fatalf("TestHandleGetBlocks \nexpected: %v \nactual:\n%v", expectedOrder, actualOrder.BlockHashes)
 		}
 
-		requestAllExplictly := getBlocks(params.GenesisHash)
+		requestAllExplictly := getBlocks(consensusConfig.GenesisHash)
 		if !reflect.DeepEqual(requestAllExplictly.BlockHashes, hashes.ToStrings(expectedOrder)) {
 			t.Fatalf("TestHandleGetBlocks \nexpected: \n%v\n. actual:\n%v", expectedOrder, requestAllExplictly.BlockHashes)
 		}
diff --git a/cmd/kaspawallet/libkaspawallet/transaction_test.go b/cmd/kaspawallet/libkaspawallet/transaction_test.go
index 5c75a851..0bdf33a3 100644
--- a/cmd/kaspawallet/libkaspawallet/transaction_test.go
+++ b/cmd/kaspawallet/libkaspawallet/transaction_test.go
@@ -9,7 +9,6 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/txscript"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/utxo"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/kaspanet/kaspad/util"
 	"strings"
 	"testing"
@@ -26,10 +25,10 @@ func forSchnorrAndECDSA(t *testing.T, testFunc func(t *testing.T, ecdsa bool)) {
 }
 
 func TestMultisig(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		forSchnorrAndECDSA(t, func(t *testing.T, ecdsa bool) {
-			params.BlockCoinbaseMaturity = 0
-			tc, teardown, err := consensus.NewFactory().NewTestConsensus(params, false, "TestMultisig")
+			consensusConfig.BlockCoinbaseMaturity = 0
+			tc, teardown, err := consensus.NewFactory().NewTestConsensus(consensusConfig, "TestMultisig")
 			if err != nil {
 				t.Fatalf("Error setting up tc: %+v", err)
 			}
@@ -46,7 +45,7 @@ func TestMultisig(t *testing.T) {
 			}
 
 			const minimumSignatures = 2
-			address, err := libkaspawallet.Address(params, publicKeys, minimumSignatures, ecdsa)
+			address, err := libkaspawallet.Address(&consensusConfig.Params, publicKeys, minimumSignatures, ecdsa)
 			if err != nil {
 				t.Fatalf("Address: %+v", err)
 			}
@@ -65,7 +64,7 @@ func TestMultisig(t *testing.T) {
 				ExtraData:       nil,
 			}
 
-			fundingBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, coinbaseData, nil)
+			fundingBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, coinbaseData, nil)
 			if err != nil {
 				t.Fatalf("AddBlock: %+v", err)
 			}
@@ -170,10 +169,10 @@ func TestMultisig(t *testing.T) {
 }
 
 func TestP2PK(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		forSchnorrAndECDSA(t, func(t *testing.T, ecdsa bool) {
-			params.BlockCoinbaseMaturity = 0
-			tc, teardown, err := consensus.NewFactory().NewTestConsensus(params, false, "TestMultisig")
+			consensusConfig.BlockCoinbaseMaturity = 0
+			tc, teardown, err := consensus.NewFactory().NewTestConsensus(consensusConfig, "TestMultisig")
 			if err != nil {
 				t.Fatalf("Error setting up tc: %+v", err)
 			}
@@ -190,7 +189,7 @@ func TestP2PK(t *testing.T) {
 			}
 
 			const minimumSignatures = 1
-			address, err := libkaspawallet.Address(params, publicKeys, minimumSignatures, ecdsa)
+			address, err := libkaspawallet.Address(&consensusConfig.Params, publicKeys, minimumSignatures, ecdsa)
 			if err != nil {
 				t.Fatalf("Address: %+v", err)
 			}
@@ -215,7 +214,7 @@ func TestP2PK(t *testing.T) {
 				ExtraData:       nil,
 			}
 
-			fundingBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, coinbaseData, nil)
+			fundingBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, coinbaseData, nil)
 			if err != nil {
 				t.Fatalf("AddBlock: %+v", err)
 			}
diff --git a/domain/consensus/consensus_test.go b/domain/consensus/consensus_test.go
index 9b423c45..2c1c3bc0 100644
--- a/domain/consensus/consensus_test.go
+++ b/domain/consensus/consensus_test.go
@@ -1,26 +1,26 @@
-package consensus
+package consensus_test
 
 import (
 	"testing"
 
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/ruleerrors"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/pkg/errors"
 )
 
 func TestConsensus_GetBlockInfo(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		factory := NewFactory()
-		consensus, teardown, err := factory.NewTestConsensus(params, false, "TestConsensus_GetBlockInfo")
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		factory := consensus.NewFactory()
+		consensus, teardown, err := factory.NewTestConsensus(consensusConfig, "TestConsensus_GetBlockInfo")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		invalidBlock, _, err := consensus.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		invalidBlock, _, err := consensus.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatal(err)
 		}
diff --git a/domain/consensus/factory_test.go b/domain/consensus/factory_test.go
index 1390c85f..9317717b 100644
--- a/domain/consensus/factory_test.go
+++ b/domain/consensus/factory_test.go
@@ -11,7 +11,7 @@ import (
 func TestNewConsensus(t *testing.T) {
 	f := NewFactory()
 
-	dagParams := &dagconfig.DevnetParams
+	config := &Config{Params: dagconfig.DevnetParams}
 
 	tmpDir, err := ioutil.TempDir("", "TestNewConsensus")
 	if err != nil {
@@ -23,7 +23,7 @@ func TestNewConsensus(t *testing.T) {
 		t.Fatalf("error in NewLevelDB: %s", err)
 	}
 
-	_, err = f.NewConsensus(dagParams, db, false)
+	_, err = f.NewConsensus(config, db)
 	if err != nil {
 		t.Fatalf("error in NewConsensus: %+v", err)
 	}
diff --git a/domain/consensus/finality_test.go b/domain/consensus/finality_test.go
index a80b8a4a..357cbf09 100644
--- a/domain/consensus/finality_test.go
+++ b/domain/consensus/finality_test.go
@@ -1,26 +1,26 @@
-package consensus
+package consensus_test
 
 import (
+	"fmt"
+	"github.com/kaspanet/kaspad/domain/consensus"
+	"testing"
+
 	"github.com/kaspanet/kaspad/domain/consensus/model"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
 	"github.com/kaspanet/kaspad/domain/consensus/ruleerrors"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/pkg/errors"
-
-	"fmt"
-	"testing"
 )
 
 func TestFinality(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		// Set finalityInterval to 50 blocks, so that test runs quickly
-		params.FinalityDuration = 50 * params.TargetTimePerBlock
+		consensusConfig.FinalityDuration = 50 * consensusConfig.TargetTimePerBlock
 
-		factory := NewFactory()
-		consensus, teardown, err := factory.NewTestConsensus(params, false, "TestFinality")
+		factory := consensus.NewFactory()
+		consensus, teardown, err := factory.NewTestConsensus(consensusConfig, "TestFinality")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -40,9 +40,9 @@ func TestFinality(t *testing.T) {
 		}
 
 		// Build a chain of `finalityInterval - 1` blocks
-		finalityInterval := params.FinalityDepth()
+		finalityInterval := consensusConfig.FinalityDepth()
 		var mainChainTip *externalapi.DomainBlock
-		mainChainTipHash := params.GenesisHash
+		mainChainTipHash := consensusConfig.GenesisHash
 
 		for i := uint64(0); i < finalityInterval-1; i++ {
 			mainChainTip, err = buildAndInsertBlock([]*externalapi.DomainHash{mainChainTipHash})
@@ -63,7 +63,7 @@ func TestFinality(t *testing.T) {
 
 		// Mine another chain of `finality-Interval - 2` blocks
 		var sideChainTip *externalapi.DomainBlock
-		sideChainTipHash := params.GenesisHash
+		sideChainTipHash := consensusConfig.GenesisHash
 		for i := uint64(0); i < finalityInterval-2; i++ {
 			sideChainTip, err = buildAndInsertBlock([]*externalapi.DomainHash{sideChainTipHash})
 			if err != nil {
@@ -127,7 +127,7 @@ func TestFinality(t *testing.T) {
 			t.Fatalf("TestFinality: Failed getting the virtual's finality point: %v", err)
 		}
 
-		if virtualFinality.Equal(params.GenesisHash) {
+		if virtualFinality.Equal(consensusConfig.GenesisHash) {
 			t.Fatalf("virtual's finalityPoint is still genesis after adding finalityInterval + 1 blocks to the main chain")
 		}
 
@@ -178,12 +178,12 @@ func TestFinality(t *testing.T) {
 }
 
 func TestBoundedMergeDepth(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		// Set finalityInterval to 50 blocks, so that test runs quickly
-		params.FinalityDuration = 50 * params.TargetTimePerBlock
-		finalityInterval := int(params.FinalityDepth())
+		consensusConfig.FinalityDuration = 50 * consensusConfig.TargetTimePerBlock
+		finalityInterval := int(consensusConfig.FinalityDepth())
 
-		if int(params.K) >= finalityInterval {
+		if int(consensusConfig.K) >= finalityInterval {
 			t.Fatal("K must be smaller than finality duration for this test to run")
 		}
 
@@ -235,20 +235,20 @@ func TestBoundedMergeDepth(t *testing.T) {
 			return blockInfo.BlockStatus
 		}
 
-		factory := NewFactory()
-		consensusBuild, teardownFunc1, err := factory.NewTestConsensus(params, false, "TestBoundedMergeTestBuild")
+		factory := consensus.NewFactory()
+		consensusBuild, teardownFunc1, err := factory.NewTestConsensus(consensusConfig, "TestBoundedMergeTestBuild")
 		if err != nil {
 			t.Fatalf("TestBoundedMergeDepth: Error setting up consensus: %+v", err)
 		}
 
-		consensusReal, teardownFunc2, err := factory.NewTestConsensus(params, false, "TestBoundedMergeTestReal")
+		consensusReal, teardownFunc2, err := factory.NewTestConsensus(consensusConfig, "TestBoundedMergeTestReal")
 		if err != nil {
 			t.Fatalf("TestBoundedMergeDepth: Error setting up consensus: %+v", err)
 		}
 		defer teardownFunc2(false)
 
 		// Create a block on top on genesis
-		block1 := buildAndInsertBlock(consensusBuild, []*externalapi.DomainHash{params.GenesisHash})
+		block1 := buildAndInsertBlock(consensusBuild, []*externalapi.DomainHash{consensusConfig.GenesisHash})
 
 		// Create a chain
 		selectedChain := make([]*externalapi.DomainBlock, 0, finalityInterval+1)
@@ -342,7 +342,7 @@ func TestBoundedMergeDepth(t *testing.T) {
 		// Now let's make the kosherizing block red and try to merge again
 		tip := consensushashing.BlockHash(selectedChain[len(selectedChain)-1])
 		// we use k-1 because `kosherizingBlock` points at tip-2, so 2+k-1 = k+1 anticone.
-		for i := 0; i < int(params.K)-1; i++ {
+		for i := 0; i < int(consensusConfig.K)-1; i++ {
 			block := buildAndInsertBlock(consensusReal, []*externalapi.DomainHash{tip})
 			tip = consensushashing.BlockHash(block)
 		}
diff --git a/domain/consensus/processes/blockbuilder/block_builder_test.go b/domain/consensus/processes/blockbuilder/block_builder_test.go
index 9129aacd..29f36385 100644
--- a/domain/consensus/processes/blockbuilder/block_builder_test.go
+++ b/domain/consensus/processes/blockbuilder/block_builder_test.go
@@ -1,24 +1,21 @@
 package blockbuilder_test
 
 import (
-	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks"
+	"github.com/pkg/errors"
 	"testing"
 
-	"github.com/kaspanet/kaspad/domain/consensus/ruleerrors"
-
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
+	"github.com/kaspanet/kaspad/domain/consensus/ruleerrors"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
-	"github.com/pkg/errors"
 )
 
 func TestBuildBlockErrorCases(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		testConsensus, teardown, err := factory.NewTestConsensus(
-			params, false, "TestBlockBuilderErrorCases")
+		testConsensus, teardown, err := factory.NewTestConsensus(consensusConfig, "TestBlockBuilderErrorCases")
 		if err != nil {
 			t.Fatalf("Error initializing consensus for: %+v", err)
 		}
@@ -36,7 +33,7 @@ func TestBuildBlockErrorCases(t *testing.T) {
 				"scriptPublicKey too long",
 				&externalapi.DomainCoinbaseData{
 					ScriptPublicKey: &externalapi.ScriptPublicKey{
-						Script:  make([]byte, params.CoinbasePayloadScriptPublicKeyMaxLength+1),
+						Script:  make([]byte, consensusConfig.CoinbasePayloadScriptPublicKeyMaxLength+1),
 						Version: 0,
 					},
 					ExtraData: nil,
diff --git a/domain/consensus/processes/blockbuilder/test_block_builder.go b/domain/consensus/processes/blockbuilder/test_block_builder.go
index 54ec4118..155a27a4 100644
--- a/domain/consensus/processes/blockbuilder/test_block_builder.go
+++ b/domain/consensus/processes/blockbuilder/test_block_builder.go
@@ -6,7 +6,7 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/blockheader"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/txscript"
 	"github.com/kaspanet/kaspad/infrastructure/logger"
 	"github.com/pkg/errors"
 )
@@ -119,7 +119,11 @@ func (bb *testBlockBuilder) buildBlockWithParents(stagingArea *model.StagingArea
 	*externalapi.DomainBlock, externalapi.UTXODiff, error) {
 
 	if coinbaseData == nil {
-		scriptPublicKey, _ := testutils.OpTrueScript()
+		scriptPublicKeyScript, err := txscript.PayToScriptHashScript([]byte{txscript.OpTrue})
+		if err != nil {
+			panic(errors.Wrapf(err, "Couldn't parse opTrueScript. This should never happen"))
+		}
+		scriptPublicKey := &externalapi.ScriptPublicKey{Script: scriptPublicKeyScript, Version: constants.MaxScriptPublicKeyVersion}
 		coinbaseData = &externalapi.DomainCoinbaseData{
 			ScriptPublicKey: scriptPublicKey,
 			ExtraData:       []byte{},
diff --git a/domain/consensus/processes/blockprocessor/validateandinsertblock_test.go b/domain/consensus/processes/blockprocessor/validateandinsertblock_test.go
index 2a4c93bd..64319abb 100644
--- a/domain/consensus/processes/blockprocessor/validateandinsertblock_test.go
+++ b/domain/consensus/processes/blockprocessor/validateandinsertblock_test.go
@@ -4,25 +4,22 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/kaspanet/kaspad/domain/consensus/model"
-
-	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/merkle"
-
 	"github.com/kaspanet/kaspad/domain/consensus"
+	"github.com/kaspanet/kaspad/domain/consensus/model"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/ruleerrors"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/blockheader"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/merkle"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/pkg/errors"
 )
 
 func TestBlockStatus(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestBlockStatus")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestBlockStatus")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -39,7 +36,7 @@ func TestBlockStatus(t *testing.T) {
 			}
 		}
 
-		tipHash := params.GenesisHash
+		tipHash := consensusConfig.GenesisHash
 		for i := 0; i < 2; i++ {
 			tipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
 			if err != nil {
@@ -56,7 +53,7 @@ func TestBlockStatus(t *testing.T) {
 
 		checkStatus(headerHash, externalapi.StatusHeaderOnly)
 
-		nonChainBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		nonChainBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -119,17 +116,17 @@ func TestValidateAndInsertErrors(t *testing.T) {
 	// Each test is covering the error cases in a sub-function in "validateAndInsertBlock" function.
 	// Currently, implemented only for some of the errors.
 
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestBlockStatus")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestBlockStatus")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
-		tipHash, emptyCoinbase, tx1 := initData(params)
+		tipHash, emptyCoinbase, tx1 := initData(consensusConfig)
 
 		// Tests all the error case on the function: "checkBlockStatus"(sub-function in function validateBlock)
-		blockWithStatusInvalid, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash},
+		blockWithStatusInvalid, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash},
 			&emptyCoinbase, []*externalapi.DomainTransaction{tx1, tx1})
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
@@ -184,8 +181,8 @@ func TestValidateAndInsertErrors(t *testing.T) {
 	})
 }
 
-func initData(params *dagconfig.Params) (*externalapi.DomainHash, externalapi.DomainCoinbaseData, *externalapi.DomainTransaction) {
-	return params.GenesisHash,
+func initData(consensusConfig *consensus.Config) (*externalapi.DomainHash, externalapi.DomainCoinbaseData, *externalapi.DomainTransaction) {
+	return consensusConfig.GenesisHash,
 		externalapi.DomainCoinbaseData{
 			ScriptPublicKey: &externalapi.ScriptPublicKey{
 				Script:  nil,
diff --git a/domain/consensus/processes/blockprocessor/validateandinsertimportedpruningpoint_test.go b/domain/consensus/processes/blockprocessor/validateandinsertimportedpruningpoint_test.go
index b6b4fed6..60dc38ee 100644
--- a/domain/consensus/processes/blockprocessor/validateandinsertimportedpruningpoint_test.go
+++ b/domain/consensus/processes/blockprocessor/validateandinsertimportedpruningpoint_test.go
@@ -42,27 +42,27 @@ func addBlock(tcSyncer, tcSyncee testapi.TestConsensus, parentHashes []*external
 }
 
 func TestValidateAndInsertImportedPruningPoint(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		// This is done to reduce the pruning depth to 6 blocks
 		finalityDepth := 3
-		params.FinalityDuration = time.Duration(finalityDepth) * params.TargetTimePerBlock
-		params.K = 0
+		consensusConfig.FinalityDuration = time.Duration(finalityDepth) * consensusConfig.TargetTimePerBlock
+		consensusConfig.K = 0
 
 		factory := consensus.NewFactory()
 
-		tcSyncer, teardownSyncer, err := factory.NewTestConsensus(params, false, "TestValidateAndInsertPruningPointSyncer")
+		tcSyncer, teardownSyncer, err := factory.NewTestConsensus(consensusConfig, "TestValidateAndInsertPruningPointSyncer")
 		if err != nil {
 			t.Fatalf("Error setting up tcSyncer: %+v", err)
 		}
 		defer teardownSyncer(false)
 
-		tcSyncee, teardownSyncee, err := factory.NewTestConsensus(params, false, "TestValidateAndInsertPruningPointSyncee")
+		tcSyncee, teardownSyncee, err := factory.NewTestConsensus(consensusConfig, "TestValidateAndInsertPruningPointSyncee")
 		if err != nil {
 			t.Fatalf("Error setting up tcSyncee: %+v", err)
 		}
 		defer teardownSyncee(false)
 
-		tipHash := params.GenesisHash
+		tipHash := consensusConfig.GenesisHash
 		for i := 0; i < finalityDepth-2; i++ {
 			tipHash = addBlock(tcSyncer, tcSyncee, []*externalapi.DomainHash{tipHash}, t)
 		}
@@ -83,7 +83,7 @@ func TestValidateAndInsertImportedPruningPoint(t *testing.T) {
 				t.Fatalf("PruningPoint: %+v", err)
 			}
 
-			if !pruningPoint.Equal(params.GenesisHash) {
+			if !pruningPoint.Equal(consensusConfig.GenesisHash) {
 				break
 			}
 		}
@@ -212,28 +212,28 @@ func TestValidateAndInsertImportedPruningPoint(t *testing.T) {
 // IBD, while it already has a non-empty UTXO-Set originating from blocks mined on top of genesis - the resulting
 // UTXO set is correct
 func TestValidateAndInsertPruningPointWithSideBlocks(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		// This is done to reduce the pruning depth to 6 blocks
 		finalityDepth := 3
-		params.FinalityDuration = time.Duration(finalityDepth) * params.TargetTimePerBlock
-		params.K = 0
+		consensusConfig.FinalityDuration = time.Duration(finalityDepth) * consensusConfig.TargetTimePerBlock
+		consensusConfig.K = 0
 
 		factory := consensus.NewFactory()
 
-		tcSyncer, teardownSyncer, err := factory.NewTestConsensus(params, false, "TestValidateAndInsertPruningPointSyncer")
+		tcSyncer, teardownSyncer, err := factory.NewTestConsensus(consensusConfig, "TestValidateAndInsertPruningPointSyncer")
 		if err != nil {
 			t.Fatalf("Error setting up tcSyncer: %+v", err)
 		}
 		defer teardownSyncer(false)
 
-		tcSyncee, teardownSyncee, err := factory.NewTestConsensus(params, false, "TestValidateAndInsertPruningPointSyncee")
+		tcSyncee, teardownSyncee, err := factory.NewTestConsensus(consensusConfig, "TestValidateAndInsertPruningPointSyncee")
 		if err != nil {
 			t.Fatalf("Error setting up tcSyncee: %+v", err)
 		}
 		defer teardownSyncee(false)
 
 		// Mine 2 block in the syncee on top of genesis
-		side, _, err := tcSyncee.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, &externalapi.DomainCoinbaseData{ScriptPublicKey: &externalapi.ScriptPublicKey{}, ExtraData: []byte{1, 2}}, nil)
+		side, _, err := tcSyncee.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, &externalapi.DomainCoinbaseData{ScriptPublicKey: &externalapi.ScriptPublicKey{}, ExtraData: []byte{1, 2}}, nil)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -242,7 +242,7 @@ func TestValidateAndInsertPruningPointWithSideBlocks(t *testing.T) {
 			t.Fatal(err)
 		}
 
-		tipHash := params.GenesisHash
+		tipHash := consensusConfig.GenesisHash
 		for i := 0; i < finalityDepth-2; i++ {
 			tipHash = addBlock(tcSyncer, tcSyncee, []*externalapi.DomainHash{tipHash}, t)
 		}
@@ -261,7 +261,7 @@ func TestValidateAndInsertPruningPointWithSideBlocks(t *testing.T) {
 				t.Fatalf("PruningPoint: %+v", err)
 			}
 
-			if !pruningPoint.Equal(params.GenesisHash) {
+			if !pruningPoint.Equal(consensusConfig.GenesisHash) {
 				break
 			}
 		}
@@ -421,16 +421,16 @@ func makeFakeUTXOs() []*externalapi.OutpointAndUTXOEntryPair {
 }
 
 func TestGetPruningPointUTXOs(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		// This is done to reduce the pruning depth to 8 blocks
 		finalityDepth := 4
-		params.FinalityDuration = time.Duration(finalityDepth) * params.TargetTimePerBlock
-		params.K = 0
+		consensusConfig.FinalityDuration = time.Duration(finalityDepth) * consensusConfig.TargetTimePerBlock
+		consensusConfig.K = 0
 
-		params.BlockCoinbaseMaturity = 0
+		consensusConfig.BlockCoinbaseMaturity = 0
 
 		factory := consensus.NewFactory()
-		testConsensus, teardown, err := factory.NewTestConsensus(params, false, "TestGetPruningPointUTXOs")
+		testConsensus, teardown, err := factory.NewTestConsensus(consensusConfig, "TestGetPruningPointUTXOs")
 		if err != nil {
 			t.Fatalf("Error setting up testConsensus: %+v", err)
 		}
@@ -518,7 +518,7 @@ func TestGetPruningPointUTXOs(t *testing.T) {
 			if err != nil {
 				t.Fatalf("Error getting the pruning point: %+v", err)
 			}
-			if !pruningPoint.Equal(params.GenesisHash) {
+			if !pruningPoint.Equal(consensusConfig.GenesisHash) {
 				break
 			}
 		}
@@ -580,18 +580,18 @@ func TestGetPruningPointUTXOs(t *testing.T) {
 }
 
 func BenchmarkGetPruningPointUTXOs(b *testing.B) {
-	params := dagconfig.DevnetParams
+	consensusConfig := consensus.Config{Params: dagconfig.DevnetParams}
 
 	// This is done to reduce the pruning depth to 200 blocks
 	finalityDepth := 100
-	params.FinalityDuration = time.Duration(finalityDepth) * params.TargetTimePerBlock
-	params.K = 0
+	consensusConfig.FinalityDuration = time.Duration(finalityDepth) * consensusConfig.TargetTimePerBlock
+	consensusConfig.K = 0
 
-	params.SkipProofOfWork = true
-	params.BlockCoinbaseMaturity = 0
+	consensusConfig.SkipProofOfWork = true
+	consensusConfig.BlockCoinbaseMaturity = 0
 
 	factory := consensus.NewFactory()
-	testConsensus, teardown, err := factory.NewTestConsensus(&params, false, "TestGetPruningPointUTXOs")
+	testConsensus, teardown, err := factory.NewTestConsensus(&consensusConfig, "TestGetPruningPointUTXOs")
 	if err != nil {
 		b.Fatalf("Error setting up testConsensus: %+v", err)
 	}
@@ -671,7 +671,7 @@ func BenchmarkGetPruningPointUTXOs(b *testing.B) {
 		if err != nil {
 			b.Fatalf("Error getting the pruning point: %+v", err)
 		}
-		if !pruningPoint.Equal(params.GenesisHash) {
+		if !pruningPoint.Equal(consensusConfig.GenesisHash) {
 			break
 		}
 	}
diff --git a/domain/consensus/processes/blockvalidator/block_body_in_context_test.go b/domain/consensus/processes/blockvalidator/block_body_in_context_test.go
index 4b3e5407..8222ed7e 100644
--- a/domain/consensus/processes/blockvalidator/block_body_in_context_test.go
+++ b/domain/consensus/processes/blockvalidator/block_body_in_context_test.go
@@ -11,26 +11,25 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/pkg/errors"
 )
 
 func TestCheckBlockIsNotPruned(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		// This is done to reduce the pruning depth to 6 blocks
-		params.FinalityDuration = 2 * params.TargetTimePerBlock
-		params.K = 0
+		consensusConfig.FinalityDuration = 2 * consensusConfig.TargetTimePerBlock
+		consensusConfig.K = 0
 
 		factory := consensus.NewFactory()
 
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckBlockIsNotPruned")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckBlockIsNotPruned")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
 		// Add blocks until the pruning point changes
-		tipHash := params.GenesisHash
+		tipHash := consensusConfig.GenesisHash
 		tipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
@@ -52,7 +51,7 @@ func TestCheckBlockIsNotPruned(t *testing.T) {
 				t.Fatalf("PruningPoint: %+v", err)
 			}
 
-			if !pruningPoint.Equal(params.GenesisHash) {
+			if !pruningPoint.Equal(consensusConfig.GenesisHash) {
 				break
 			}
 		}
@@ -76,20 +75,20 @@ func TestCheckBlockIsNotPruned(t *testing.T) {
 }
 
 func TestCheckParentBlockBodiesExist(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		// This is done to reduce the pruning depth to 6 blocks
-		params.FinalityDuration = 2 * params.TargetTimePerBlock
-		params.K = 0
+		consensusConfig.FinalityDuration = 2 * consensusConfig.TargetTimePerBlock
+		consensusConfig.K = 0
 
 		factory := consensus.NewFactory()
 
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckParentBlockBodiesExist")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckParentBlockBodiesExist")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		headerHash, _, err := tc.AddUTXOInvalidHeader([]*externalapi.DomainHash{params.GenesisHash})
+		headerHash, _, err := tc.AddUTXOInvalidHeader([]*externalapi.DomainHash{consensusConfig.GenesisHash})
 		if err != nil {
 			t.Fatalf("AddUTXOInvalidHeader: %+v", err)
 		}
@@ -105,7 +104,7 @@ func TestCheckParentBlockBodiesExist(t *testing.T) {
 		}
 
 		// Add blocks until the pruning point changes
-		tipHash := params.GenesisHash
+		tipHash := consensusConfig.GenesisHash
 		anticonePruningBlock, err := tc.BuildUTXOInvalidBlock([]*externalapi.DomainHash{tipHash})
 		if err != nil {
 			t.Fatalf("BuildUTXOInvalidBlock: %+v", err)
@@ -131,7 +130,7 @@ func TestCheckParentBlockBodiesExist(t *testing.T) {
 				t.Fatalf("PruningPoint: %+v", err)
 			}
 
-			if !pruningPoint.Equal(params.GenesisHash) {
+			if !pruningPoint.Equal(consensusConfig.GenesisHash) {
 				break
 			}
 		}
@@ -146,20 +145,20 @@ func TestCheckParentBlockBodiesExist(t *testing.T) {
 }
 
 func TestIsFinalizedTransaction(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		stagingArea := model.NewStagingArea()
 
-		params.BlockCoinbaseMaturity = 0
+		consensusConfig.BlockCoinbaseMaturity = 0
 		factory := consensus.NewFactory()
 
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestIsFinalizedTransaction")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestIsFinalizedTransaction")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
 		// Build a small DAG
-		outerParents := []*externalapi.DomainHash{params.GenesisHash}
+		outerParents := []*externalapi.DomainHash{consensusConfig.GenesisHash}
 		for i := 0; i < 5; i++ {
 			var innerParents []*externalapi.DomainHash
 			for i := 0; i < 4; i++ {
diff --git a/domain/consensus/processes/blockvalidator/block_body_in_isolation_test.go b/domain/consensus/processes/blockvalidator/block_body_in_isolation_test.go
index 35a88ffb..e0aa1bd6 100644
--- a/domain/consensus/processes/blockvalidator/block_body_in_isolation_test.go
+++ b/domain/consensus/processes/blockvalidator/block_body_in_isolation_test.go
@@ -2,39 +2,37 @@ package blockvalidator_test
 
 import (
 	"bytes"
-	"github.com/kaspanet/kaspad/domain/consensus/model"
-	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/merkle"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/utxo"
 	"math"
 	"testing"
 
-	"github.com/kaspanet/kaspad/domain/consensus/utils/blockheader"
-
 	"github.com/kaspanet/kaspad/domain/consensus"
+	"github.com/kaspanet/kaspad/domain/consensus/model"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
+	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
 	"github.com/kaspanet/kaspad/domain/consensus/ruleerrors"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/blockheader"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/merkle"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/utxo"
 	"github.com/pkg/errors"
 )
 
 func TestChainedTransactions(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		params.BlockCoinbaseMaturity = 0
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		consensusConfig.BlockCoinbaseMaturity = 0
 
 		factory := consensus.NewFactory()
 
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestChainedTransactions")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestChainedTransactions")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		fundingBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		fundingBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -93,9 +91,9 @@ func TestChainedTransactions(t *testing.T) {
 // TestCheckBlockSanity tests the CheckBlockSanity function to ensure it works
 // as expected.
 func TestCheckBlockSanity(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckBlockSanity")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckBlockSanity")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -1000,15 +998,15 @@ var blockWithWrongTxOrder = externalapi.DomainBlock{
 }
 
 func TestCheckBlockHashMerkleRoot(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckBlockHashMerkleRoot")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckBlockHashMerkleRoot")
 		if err != nil {
 			t.Fatalf("Error setting up tc: %+v", err)
 		}
 		defer teardown(false)
 
-		block, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		block, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("BuildBlockWithParents: %+v", err)
 		}
@@ -1030,16 +1028,16 @@ func TestCheckBlockHashMerkleRoot(t *testing.T) {
 }
 
 func TestBlockSize(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestBlockSize")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestBlockSize")
 		if err != nil {
 			t.Fatalf("Error setting up tc: %+v", err)
 		}
 		defer teardown(false)
 
-		block, _, err := initBlockWithInvalidBlockSize(params, tc)
+		block, _, err := initBlockWithInvalidBlockSize(consensusConfig, tc)
 		if err != nil {
 			t.Fatalf("Error BuildBlockWithParents : %+v", err)
 		}
@@ -1055,7 +1053,7 @@ func TestBlockSize(t *testing.T) {
 	})
 }
 
-func initBlockWithInvalidBlockSize(params *dagconfig.Params, tc testapi.TestConsensus) (*externalapi.DomainBlock, externalapi.UTXODiff, error) {
+func initBlockWithInvalidBlockSize(consensusConfig *consensus.Config, tc testapi.TestConsensus) (*externalapi.DomainBlock, externalapi.UTXODiff, error) {
 	emptyCoinbase := externalapi.DomainCoinbaseData{
 		ScriptPublicKey: &externalapi.ScriptPublicKey{
 			Script:  nil,
@@ -1084,20 +1082,20 @@ func initBlockWithInvalidBlockSize(params *dagconfig.Params, tc testapi.TestCons
 		Payload: []byte{0x01},
 	}
 
-	return tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, &emptyCoinbase, []*externalapi.DomainTransaction{tx})
+	return tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, &emptyCoinbase, []*externalapi.DomainTransaction{tx})
 }
 
 func TestCheckBlockDuplicateTransactions(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckBlockDuplicateTransactions")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckBlockDuplicateTransactions")
 		if err != nil {
 			t.Fatalf("Error setting up tc: %+v", err)
 		}
 		defer teardown(false)
 
-		block, _, err := initBlockWithDuplicateTransaction(params, tc)
+		block, _, err := initBlockWithDuplicateTransaction(consensusConfig, tc)
 		if err != nil {
 			t.Fatalf("Error BuildBlockWithParents : %+v", err)
 		}
@@ -1113,7 +1111,7 @@ func TestCheckBlockDuplicateTransactions(t *testing.T) {
 	})
 }
 
-func initBlockWithDuplicateTransaction(params *dagconfig.Params, tc testapi.TestConsensus) (*externalapi.DomainBlock, externalapi.UTXODiff, error) {
+func initBlockWithDuplicateTransaction(consensusConfig *consensus.Config, tc testapi.TestConsensus) (*externalapi.DomainBlock, externalapi.UTXODiff, error) {
 	emptyCoinbase := externalapi.DomainCoinbaseData{
 		ScriptPublicKey: &externalapi.ScriptPublicKey{
 			Script:  nil,
@@ -1141,20 +1139,20 @@ func initBlockWithDuplicateTransaction(params *dagconfig.Params, tc testapi.Test
 		SubnetworkID: subnetworks.SubnetworkIDNative,
 	}
 
-	return tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, &emptyCoinbase, []*externalapi.DomainTransaction{tx, tx})
+	return tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, &emptyCoinbase, []*externalapi.DomainTransaction{tx, tx})
 }
 
 func TestCheckBlockContainsOnlyOneCoinbase(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckBlockContainsOnlyOneCoinbase")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckBlockContainsOnlyOneCoinbase")
 		if err != nil {
 			t.Fatalf("Error setting up tc: %+v", err)
 		}
 		defer teardown(false)
 
-		block, _, err := initBlockWithMoreThanOneCoinbase(params, tc)
+		block, _, err := initBlockWithMoreThanOneCoinbase(consensusConfig, tc)
 		if err != nil {
 			t.Fatalf("Error BuildBlockWithParents : %+v", err)
 		}
@@ -1170,7 +1168,7 @@ func TestCheckBlockContainsOnlyOneCoinbase(t *testing.T) {
 	})
 }
 
-func initBlockWithMoreThanOneCoinbase(params *dagconfig.Params, tc testapi.TestConsensus) (*externalapi.DomainBlock, externalapi.UTXODiff, error) {
+func initBlockWithMoreThanOneCoinbase(consensusConfig *consensus.Config, tc testapi.TestConsensus) (*externalapi.DomainBlock, externalapi.UTXODiff, error) {
 	emptyCoinbase := externalapi.DomainCoinbaseData{
 		ScriptPublicKey: &externalapi.ScriptPublicKey{
 			Script:  nil,
@@ -1198,20 +1196,20 @@ func initBlockWithMoreThanOneCoinbase(params *dagconfig.Params, tc testapi.TestC
 		SubnetworkID: subnetworks.SubnetworkIDCoinbase,
 	}
 
-	return tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, &emptyCoinbase, []*externalapi.DomainTransaction{tx})
+	return tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, &emptyCoinbase, []*externalapi.DomainTransaction{tx})
 }
 
 func TestCheckBlockDoubleSpends(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckBlockDoubleSpends")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckBlockDoubleSpends")
 		if err != nil {
 			t.Fatalf("Error setting up tc: %+v", err)
 		}
 		defer teardown(false)
 
-		block, _, err := initBlockWithDoubleSpends(params, tc)
+		block, _, err := initBlockWithDoubleSpends(consensusConfig, tc)
 		if err != nil {
 			t.Fatalf("Error BuildBlockWithParents : %+v", err)
 		}
@@ -1227,7 +1225,7 @@ func TestCheckBlockDoubleSpends(t *testing.T) {
 	})
 }
 
-func initBlockWithDoubleSpends(params *dagconfig.Params, tc testapi.TestConsensus) (*externalapi.DomainBlock, externalapi.UTXODiff, error) {
+func initBlockWithDoubleSpends(consensusConfig *consensus.Config, tc testapi.TestConsensus) (*externalapi.DomainBlock, externalapi.UTXODiff, error) {
 	emptyCoinbase := externalapi.DomainCoinbaseData{
 		ScriptPublicKey: &externalapi.ScriptPublicKey{
 			Script:  nil,
@@ -1273,21 +1271,21 @@ func initBlockWithDoubleSpends(params *dagconfig.Params, tc testapi.TestConsensu
 		SubnetworkID: subnetworks.SubnetworkIDNative,
 	}
 
-	return tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash},
+	return tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash},
 		&emptyCoinbase, []*externalapi.DomainTransaction{tx, txSameOutpoint})
 }
 
 func TestCheckFirstBlockTransactionIsCoinbase(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckFirstBlockTransactionIsCoinbase")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckFirstBlockTransactionIsCoinbase")
 		if err != nil {
 			t.Fatalf("Error setting up tc: %+v", err)
 		}
 		defer teardown(false)
 
-		block := initBlockWithFirstTransactionDifferentThanCoinbase(params)
+		block := initBlockWithFirstTransactionDifferentThanCoinbase(consensusConfig)
 		blockHash := consensushashing.BlockHash(block)
 		stagingArea := model.NewStagingArea()
 		tc.BlockStore().Stage(stagingArea, blockHash, block)
@@ -1300,7 +1298,7 @@ func TestCheckFirstBlockTransactionIsCoinbase(t *testing.T) {
 	})
 }
 
-func initBlockWithFirstTransactionDifferentThanCoinbase(params *dagconfig.Params) *externalapi.DomainBlock {
+func initBlockWithFirstTransactionDifferentThanCoinbase(consensusConfig *consensus.Config) *externalapi.DomainBlock {
 	prevOutTxID := &externalapi.DomainTransactionID{}
 	prevOutPoint := externalapi.DomainOutpoint{TransactionID: *prevOutTxID, Index: 1}
 	txInput := externalapi.DomainTransactionInput{
@@ -1320,7 +1318,7 @@ func initBlockWithFirstTransactionDifferentThanCoinbase(params *dagconfig.Params
 	return &externalapi.DomainBlock{
 		Header: blockheader.NewImmutableBlockHeader(
 			constants.MaxBlockVersion,
-			[]*externalapi.DomainHash{params.GenesisHash},
+			[]*externalapi.DomainHash{consensusConfig.GenesisHash},
 			merkle.CalculateHashMerkleRoot([]*externalapi.DomainTransaction{tx}),
 			&externalapi.DomainHash{},
 			externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
diff --git a/domain/consensus/processes/blockvalidator/block_header_in_context_test.go b/domain/consensus/processes/blockvalidator/block_header_in_context_test.go
index 5f82fc45..0dd4e236 100644
--- a/domain/consensus/processes/blockvalidator/block_header_in_context_test.go
+++ b/domain/consensus/processes/blockvalidator/block_header_in_context_test.go
@@ -12,13 +12,12 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/ruleerrors"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestValidateMedianTime(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestValidateMedianTime")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestValidateMedianTime")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -62,8 +61,8 @@ func TestValidateMedianTime(t *testing.T) {
 			return pastMedianTime
 		}
 
-		tip := params.GenesisBlock
-		tipHash := params.GenesisHash
+		tip := consensusConfig.GenesisBlock
+		tipHash := consensusConfig.GenesisHash
 
 		blockTime := tip.Header.TimeInMilliseconds()
 
@@ -84,15 +83,15 @@ func TestValidateMedianTime(t *testing.T) {
 }
 
 func TestCheckParentsIncest(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckParentsIncest")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckParentsIncest")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		a, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		a, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -102,7 +101,7 @@ func TestCheckParentsIncest(t *testing.T) {
 			t.Fatalf("AddBlock: %+v", err)
 		}
 
-		c, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		c, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -129,7 +128,7 @@ func TestCheckParentsIncest(t *testing.T) {
 		indirectParentsRelationBlock := &externalapi.DomainBlock{
 			Header: blockheader.NewImmutableBlockHeader(
 				0,
-				[]*externalapi.DomainHash{params.GenesisHash, b},
+				[]*externalapi.DomainHash{consensusConfig.GenesisHash, b},
 				&externalapi.DomainHash{},
 				&externalapi.DomainHash{},
 				&externalapi.DomainHash{},
@@ -154,25 +153,25 @@ func TestCheckParentsIncest(t *testing.T) {
 }
 
 func TestCheckMergeSizeLimit(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		params.MergeSetSizeLimit = 2 * uint64(params.K)
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		consensusConfig.MergeSetSizeLimit = 2 * uint64(consensusConfig.K)
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckParentsIncest")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckParentsIncest")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		chain1TipHash := params.GenesisHash
-		for i := uint64(0); i < params.MergeSetSizeLimit+2; i++ {
+		chain1TipHash := consensusConfig.GenesisHash
+		for i := uint64(0); i < consensusConfig.MergeSetSizeLimit+2; i++ {
 			chain1TipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{chain1TipHash}, nil, nil)
 			if err != nil {
 				t.Fatalf("AddBlock: %+v", err)
 			}
 		}
 
-		chain2TipHash := params.GenesisHash
-		for i := uint64(0); i < params.MergeSetSizeLimit+1; i++ {
+		chain2TipHash := consensusConfig.GenesisHash
+		for i := uint64(0); i < consensusConfig.MergeSetSizeLimit+1; i++ {
 			chain2TipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{chain2TipHash}, nil, nil)
 			if err != nil {
 				t.Fatalf("AddBlock: %+v", err)
diff --git a/domain/consensus/processes/blockvalidator/block_header_in_isolation_test.go b/domain/consensus/processes/blockvalidator/block_header_in_isolation_test.go
index 78d64afc..51fb3aec 100644
--- a/domain/consensus/processes/blockvalidator/block_header_in_isolation_test.go
+++ b/domain/consensus/processes/blockvalidator/block_header_in_isolation_test.go
@@ -1,6 +1,8 @@
 package blockvalidator_test
 
 import (
+	"testing"
+
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
@@ -8,24 +10,22 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/utils/blockheader"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/kaspanet/kaspad/util/mstime"
 	"github.com/pkg/errors"
-	"testing"
 )
 
 func TestCheckParentsLimit(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
 
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckParentsLimit")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckParentsLimit")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		for i := model.KType(0); i < params.MaxBlockParents+1; i++ {
-			_, _, err = tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		for i := model.KType(0); i < consensusConfig.MaxBlockParents+1; i++ {
+			_, _, err = tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 			if err != nil {
 				t.Fatalf("AddBlock: %+v", err)
 			}
@@ -44,16 +44,16 @@ func TestCheckParentsLimit(t *testing.T) {
 }
 
 func TestCheckBlockVersion(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
 
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckBlockVersion")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckBlockVersion")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		block, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		block, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("BuildBlockWithParents: %+v", err)
 		}
@@ -77,23 +77,23 @@ func TestCheckBlockVersion(t *testing.T) {
 }
 
 func TestCheckBlockTimestampInIsolation(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
 
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckBlockTimestampInIsolation")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckBlockTimestampInIsolation")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		block, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		block, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("BuildBlockWithParents: %+v", err)
 		}
 
 		// Give 10 seconds slack to take care of the test duration
 		timestamp := mstime.Now().UnixMilliseconds() +
-			int64(params.TimestampDeviationTolerance)*params.TargetTimePerBlock.Milliseconds() + 10_000
+			int64(consensusConfig.TimestampDeviationTolerance)*consensusConfig.TargetTimePerBlock.Milliseconds() + 10_000
 
 		block.Header = blockheader.NewImmutableBlockHeader(
 			block.Header.Version(),
diff --git a/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty_test.go b/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty_test.go
index 0cd3be31..a22b58d4 100644
--- a/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty_test.go
+++ b/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty_test.go
@@ -7,7 +7,9 @@ import (
 	"testing"
 	"time"
 
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model"
+	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/model/pow"
 	"github.com/kaspanet/kaspad/domain/consensus/ruleerrors"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/blockheader"
@@ -15,28 +17,24 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/merkle"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/mining"
-	"github.com/kaspanet/kaspad/util/difficulty"
-
-	"github.com/kaspanet/kaspad/domain/consensus"
-	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
+	"github.com/kaspanet/kaspad/util/difficulty"
 	"github.com/pkg/errors"
 )
 
 // TestPOW tests the validation of the block's POW.
 func TestPOW(t *testing.T) {
 	// We set the flag "skip pow" to be false (second argument in the function) for not skipping the check of POW and validate its correctness.
-	testutils.ForAllNets(t, false, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, false, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestPOW")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestPOW")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
 		// Builds and checks block with invalid POW.
-		invalidBlockWrongPOW, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		invalidBlockWrongPOW, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -46,12 +44,12 @@ func TestPOW(t *testing.T) {
 			t.Fatalf("Expected block to be invalid with err: %v, instead found: %v", ruleerrors.ErrInvalidPoW, err)
 		}
 
-		abovePowMaxBlock, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		abovePowMaxBlock, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatal(err)
 		}
 
-		abovePowMaxTarget := big.NewInt(0).Add(big.NewInt(1), params.PowMax)
+		abovePowMaxTarget := big.NewInt(0).Add(big.NewInt(1), consensusConfig.PowMax)
 		abovePowMaxBlock.Header = blockheader.NewImmutableBlockHeader(
 			abovePowMaxBlock.Header.Version(),
 			abovePowMaxBlock.Header.ParentHashes(),
@@ -68,7 +66,7 @@ func TestPOW(t *testing.T) {
 			t.Fatalf("Unexpected error: %+v", err)
 		}
 
-		negativeTargetBlock, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		negativeTargetBlock, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -90,7 +88,7 @@ func TestPOW(t *testing.T) {
 		}
 
 		// test on a valid block.
-		validBlock, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		validBlock, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -120,16 +118,16 @@ func solveBlockWithWrongPOW(block *externalapi.DomainBlock) *externalapi.DomainB
 }
 
 func TestCheckParentHeadersExist(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
 
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckParentHeadersExist")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckParentHeadersExist")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		orphanBlock, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		orphanBlock, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -159,7 +157,7 @@ func TestCheckParentHeadersExist(t *testing.T) {
 		}
 
 		invalidBlock, _, err := tc.BuildBlockWithParents(
-			[]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+			[]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -183,7 +181,7 @@ func TestCheckParentHeadersExist(t *testing.T) {
 
 		invalidBlockHash := consensushashing.BlockHash(invalidBlock)
 
-		invalidBlockChild, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		invalidBlockChild, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -207,21 +205,21 @@ func TestCheckParentHeadersExist(t *testing.T) {
 }
 
 func TestCheckPruningPointViolation(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		// This is done to reduce the pruning depth to 6 blocks
-		params.FinalityDuration = 2 * params.TargetTimePerBlock
-		params.K = 0
+		consensusConfig.FinalityDuration = 2 * consensusConfig.TargetTimePerBlock
+		consensusConfig.K = 0
 
 		factory := consensus.NewFactory()
 
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestCheckPruningPointViolation")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCheckPruningPointViolation")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
 		// Add blocks until the pruning point changes
-		tipHash := params.GenesisHash
+		tipHash := consensusConfig.GenesisHash
 		for {
 			tipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
 			if err != nil {
@@ -233,12 +231,12 @@ func TestCheckPruningPointViolation(t *testing.T) {
 				t.Fatalf("PruningPoint: %+v", err)
 			}
 
-			if !pruningPoint.Equal(params.GenesisHash) {
+			if !pruningPoint.Equal(consensusConfig.GenesisHash) {
 				break
 			}
 		}
 
-		_, _, err = tc.AddUTXOInvalidBlock([]*externalapi.DomainHash{params.GenesisHash})
+		_, _, err = tc.AddUTXOInvalidBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash})
 		if !errors.Is(err, ruleerrors.ErrPruningPointViolation) {
 			t.Fatalf("Unexpected error: %+v", err)
 		}
@@ -251,7 +249,7 @@ func TestCheckPruningPointViolation(t *testing.T) {
 // "calculated" by the mocDifficultyManager, where mocDifficultyManager is special implementation
 // of the type DifficultyManager for this test (defined below).
 func TestValidateDifficulty(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
 		mocDifficulty := &mocDifficultyManager{}
 		factory.SetTestDifficultyManager(func(_ model.DBReader, _ model.GHOSTDAGManager, _ model.GHOSTDAGDataStore,
@@ -262,10 +260,10 @@ func TestValidateDifficulty(t *testing.T) {
 			mocDifficulty.daaBlocksStore = daaBlocksStore
 			return mocDifficulty
 		})
-		genesisDifficulty := params.GenesisBlock.Header.Bits()
+		genesisDifficulty := consensusConfig.GenesisBlock.Header.Bits()
 		mocDifficulty.testDifficulty = genesisDifficulty
 		mocDifficulty.testGenesisBits = genesisDifficulty
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestValidateDifficulty")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestValidateDifficulty")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -277,7 +275,7 @@ func TestValidateDifficulty(t *testing.T) {
 				Version: 0,
 			},
 		}
-		block, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{params.GenesisHash}, &emptyCoinbase, nil)
+		block, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{consensusConfig.GenesisHash}, &emptyCoinbase, nil)
 		if err != nil {
 			t.Fatalf("TestValidateDifficulty: Failed build block with parents: %v.", err)
 		}
diff --git a/domain/consensus/processes/consensusstatemanager/add_block_to_virtual_test.go b/domain/consensus/processes/consensusstatemanager/add_block_to_virtual_test.go
index 1c3ec4bc..51a02c99 100644
--- a/domain/consensus/processes/consensusstatemanager/add_block_to_virtual_test.go
+++ b/domain/consensus/processes/consensusstatemanager/add_block_to_virtual_test.go
@@ -10,20 +10,19 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestVirtualDiff(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestVirtualDiff")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestVirtualDiff")
 		if err != nil {
 			t.Fatalf("Error setting up tc: %+v", err)
 		}
 		defer teardown(false)
 
 		// Add block A over the genesis
-		blockAHash, blockInsertionResult, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		blockAHash, blockInsertionResult, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("Error adding block A: %+v", err)
 		}
diff --git a/domain/consensus/processes/consensusstatemanager/calculate_past_utxo_test.go b/domain/consensus/processes/consensusstatemanager/calculate_past_utxo_test.go
index bb50a9bc..d8690767 100644
--- a/domain/consensus/processes/consensusstatemanager/calculate_past_utxo_test.go
+++ b/domain/consensus/processes/consensusstatemanager/calculate_past_utxo_test.go
@@ -3,25 +3,21 @@ package consensusstatemanager_test
 import (
 	"testing"
 
-	"github.com/kaspanet/kaspad/domain/consensus/model"
-
-	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
-
-	"github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper"
-
 	"github.com/kaspanet/kaspad/domain/consensus"
+	"github.com/kaspanet/kaspad/domain/consensus/model"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
+	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/multiset"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper"
 )
 
 func TestUTXOCommitment(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		params.BlockCoinbaseMaturity = 0
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		consensusConfig.BlockCoinbaseMaturity = 0
 		factory := consensus.NewFactory()
 
-		consensus, teardown, err := factory.NewTestConsensus(params, false, "TestUTXOCommitment")
+		consensus, teardown, err := factory.NewTestConsensus(consensusConfig, "TestUTXOCommitment")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -31,7 +27,7 @@ func TestUTXOCommitment(t *testing.T) {
 		// G <- A <- B <- C <- E
 		//             <- D <-
 		// Where block D has a non-coinbase transaction
-		genesisHash := params.GenesisHash
+		genesisHash := consensusConfig.GenesisHash
 
 		// Block A:
 		blockAHash, _, err := consensus.AddBlock([]*externalapi.DomainHash{genesisHash}, nil, nil)
@@ -115,19 +111,19 @@ func checkBlockUTXOCommitment(t *testing.T, consensus testapi.TestConsensus, blo
 }
 
 func TestPastUTXOMultiset(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		stagingArea := model.NewStagingArea()
 
 		factory := consensus.NewFactory()
 
-		consensus, teardown, err := factory.NewTestConsensus(params, false, "TestUTXOCommitment")
+		consensus, teardown, err := factory.NewTestConsensus(consensusConfig, "TestUTXOCommitment")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
 		// Build a short chain
-		currentHash := params.GenesisHash
+		currentHash := consensusConfig.GenesisHash
 		for i := 0; i < 3; i++ {
 			currentHash, _, err = consensus.AddBlock([]*externalapi.DomainHash{currentHash}, nil, nil)
 			if err != nil {
diff --git a/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes_test.go b/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes_test.go
index 83743529..f5d337a6 100644
--- a/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes_test.go
+++ b/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes_test.go
@@ -7,20 +7,19 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestCalculateChainPath(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		consensus, teardown, err := factory.NewTestConsensus(params, false, "TestCalculateChainPath")
+		consensus, teardown, err := factory.NewTestConsensus(consensusConfig, "TestCalculateChainPath")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
 		// Add block A over the genesis
-		blockAHash, blockAInsertionResult, err := consensus.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		blockAHash, blockAInsertionResult, err := consensus.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("Error adding block A: %+v", err)
 		}
@@ -42,7 +41,7 @@ func TestCalculateChainPath(t *testing.T) {
 		}
 
 		// Add block B over the genesis
-		blockBHash, _, err := consensus.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		blockBHash, _, err := consensus.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("Error adding block B: %+v", err)
 		}
@@ -93,7 +92,7 @@ func TestCalculateChainPath(t *testing.T) {
 		}
 
 		// Add block D over the genesis
-		_, blockDInsertionResult, err := consensus.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		_, blockDInsertionResult, err := consensus.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("Error adding block D: %+v", err)
 		}
diff --git a/domain/consensus/processes/consensusstatemanager/resolve_block_status_test.go b/domain/consensus/processes/consensusstatemanager/resolve_block_status_test.go
index ab17e0c8..97d7ab8b 100644
--- a/domain/consensus/processes/consensusstatemanager/resolve_block_status_test.go
+++ b/domain/consensus/processes/consensusstatemanager/resolve_block_status_test.go
@@ -16,25 +16,24 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestDoubleSpends(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		stagingArea := model.NewStagingArea()
 
-		params.BlockCoinbaseMaturity = 0
+		consensusConfig.BlockCoinbaseMaturity = 0
 
 		factory := consensus.NewFactory()
 
-		consensus, teardown, err := factory.NewTestConsensus(params, false, "TestUTXOCommitment")
+		consensus, teardown, err := factory.NewTestConsensus(consensusConfig, "TestUTXOCommitment")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
 		// Mine chain of two blocks to fund our double spend
-		firstBlockHash, _, err := consensus.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		firstBlockHash, _, err := consensus.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("Error creating firstBlock: %+v", err)
 		}
@@ -161,19 +160,19 @@ func TestDoubleSpends(t *testing.T) {
 // TestTransactionAcceptance checks that blue blocks transactions are favoured above
 // red blocks transactions, and that the block reward is paid only for blue blocks.
 func TestTransactionAcceptance(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		stagingArea := model.NewStagingArea()
 
-		params.BlockCoinbaseMaturity = 0
+		consensusConfig.BlockCoinbaseMaturity = 0
 
 		factory := consensus.NewFactory()
-		testConsensus, teardown, err := factory.NewTestConsensus(params, false, "TestTransactionAcceptance")
+		testConsensus, teardown, err := factory.NewTestConsensus(consensusConfig, "TestTransactionAcceptance")
 		if err != nil {
 			t.Fatalf("Error setting up testConsensus: %+v", err)
 		}
 		defer teardown(false)
 
-		fundingBlock1Hash, _, err := testConsensus.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		fundingBlock1Hash, _, err := testConsensus.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("Error creating fundingBlock1: %+v", err)
 		}
@@ -192,7 +191,7 @@ func TestTransactionAcceptance(t *testing.T) {
 		// Add a chain of K blocks above fundingBlock3 so we'll
 		// be able to mine a red block on top of it.
 		tipHash := fundingBlock3Hash
-		for i := model.KType(0); i < params.K; i++ {
+		for i := model.KType(0); i < consensusConfig.K; i++ {
 			var err error
 			tipHash, _, err = testConsensus.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
 			if err != nil {
@@ -394,16 +393,16 @@ func TestTransactionAcceptance(t *testing.T) {
 }
 
 func TestResolveBlockStatusSanity(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		stagingArea := model.NewStagingArea()
 
-		consensus, teardown, err := consensus.NewFactory().NewTestConsensus(params, false, "TestResolveBlockStatusSanity")
+		consensus, teardown, err := consensus.NewFactory().NewTestConsensus(consensusConfig, "TestResolveBlockStatusSanity")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
-		genesisHash := params.GenesisHash
+		genesisHash := consensusConfig.GenesisHash
 		allHashes := []*externalapi.DomainHash{genesisHash}
 
 		// Make sure that the status of genesisHash is valid
@@ -415,7 +414,7 @@ func TestResolveBlockStatusSanity(t *testing.T) {
 			t.Fatalf("genesis is unexpectedly non-valid. Its status is: %s", genesisStatus)
 		}
 
-		chainLength := int(params.K) + 1
+		chainLength := int(consensusConfig.K) + 1
 
 		// Add a chain of blocks over the genesis and make sure all their
 		// statuses are valid
diff --git a/domain/consensus/processes/consensusstatemanager/virtual_parents_test.go b/domain/consensus/processes/consensusstatemanager/virtual_parents_test.go
index 70c232a4..a201ebe6 100644
--- a/domain/consensus/processes/consensusstatemanager/virtual_parents_test.go
+++ b/domain/consensus/processes/consensusstatemanager/virtual_parents_test.go
@@ -10,14 +10,13 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestConsensusStateManager_pickVirtualParents(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		stagingArea := model.NewStagingArea()
 
-		tc, teardown, err := consensus.NewFactory().NewTestConsensus(params, false, "TestConsensusStateManager_pickVirtualParents")
+		tc, teardown, err := consensus.NewFactory().NewTestConsensus(consensusConfig, "TestConsensusStateManager_pickVirtualParents")
 		if err != nil {
 			t.Fatalf("Error setting up tc: %+v", err)
 		}
@@ -42,10 +41,10 @@ func TestConsensusStateManager_pickVirtualParents(t *testing.T) {
 			return virtualRelations.Parents
 		}
 
-		// We build 2*params.MaxBlockParents each one with blueWork higher than the other.
-		parents := make([]*externalapi.DomainHash, 0, params.MaxBlockParents)
-		for i := 0; i < 2*int(params.MaxBlockParents); i++ {
-			lastBlock := params.GenesisHash
+		// We build 2*consensusConfig.MaxBlockParents each one with blueWork higher than the other.
+		parents := make([]*externalapi.DomainHash, 0, consensusConfig.MaxBlockParents)
+		for i := 0; i < 2*int(consensusConfig.MaxBlockParents); i++ {
+			lastBlock := consensusConfig.GenesisHash
 			for j := 0; j <= i; j++ {
 				lastBlock, _, err = tc.AddBlock([]*externalapi.DomainHash{lastBlock}, nil, nil)
 				if err != nil {
@@ -60,15 +59,15 @@ func TestConsensusStateManager_pickVirtualParents(t *testing.T) {
 
 		// Make sure the first half of the blocks are with highest blueWork
 		// we use (max+1)/2 because the first "half" is rounded up, so `(dividend + (divisor - 1)) / divisor` = `(max + (2-1))/2` = `(max+1)/2`
-		for i := 0; i < int(params.MaxBlockParents+1)/2; i++ {
+		for i := 0; i < int(consensusConfig.MaxBlockParents+1)/2; i++ {
 			if !virtualParents[i].Equal(parents[i]) {
 				t.Fatalf("Expected block at %d to be equal, instead found %s != %s", i, virtualParents[i], parents[i])
 			}
 		}
 
 		// Make sure the second half is the candidates with lowest blueWork
-		end := len(parents) - int(params.MaxBlockParents)/2
-		for i := (params.MaxBlockParents + 1) / 2; i < params.MaxBlockParents; i++ {
+		end := len(parents) - int(consensusConfig.MaxBlockParents)/2
+		for i := (consensusConfig.MaxBlockParents + 1) / 2; i < consensusConfig.MaxBlockParents; i++ {
 			if !virtualParents[i].Equal(parents[end]) {
 				t.Fatalf("Expected block at %d to be equal, instead found %s != %s", i, virtualParents[i], parents[end])
 			}
@@ -94,9 +93,9 @@ func TestConsensusStateManager_pickVirtualParents(t *testing.T) {
 				break
 			}
 		}
-		// build exactly params.MaxBlockParents
-		parents = make([]*externalapi.DomainHash, 0, params.MaxBlockParents)
-		for i := 0; i < int(params.MaxBlockParents); i++ {
+		// build exactly consensusConfig.MaxBlockParents
+		parents = make([]*externalapi.DomainHash, 0, consensusConfig.MaxBlockParents)
+		for i := 0; i < int(consensusConfig.MaxBlockParents); i++ {
 			block, _, err := tc.AddBlock([]*externalapi.DomainHash{virtualSelectedParent}, nil, nil)
 			if err != nil {
 				t.Fatalf("Failed Adding block to tc: %v", err)
diff --git a/domain/consensus/processes/dagtopologymanager/dagtopologymanager_external_test.go b/domain/consensus/processes/dagtopologymanager/dagtopologymanager_external_test.go
index 0891b2cf..4db1b691 100644
--- a/domain/consensus/processes/dagtopologymanager/dagtopologymanager_external_test.go
+++ b/domain/consensus/processes/dagtopologymanager/dagtopologymanager_external_test.go
@@ -8,13 +8,12 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestIsAncestorOf(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false, "TestIsAncestorOf")
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig, "TestIsAncestorOf")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %s", err)
 		}
@@ -22,7 +21,7 @@ func TestIsAncestorOf(t *testing.T) {
 
 		// Add a chain of two blocks above the genesis. This will be the
 		// selected parent chain.
-		blockA, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		blockA, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -33,7 +32,7 @@ func TestIsAncestorOf(t *testing.T) {
 		}
 
 		// Add another block above the genesis
-		blockC, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		blockC, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %s", err)
 		}
diff --git a/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager_test.go b/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager_test.go
index d07ef845..d268c07a 100644
--- a/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager_test.go
+++ b/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager_test.go
@@ -9,7 +9,6 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 const commonChainSize = 5
@@ -17,18 +16,18 @@ const depth uint64 = 2
 
 //TestBlockAtDepthOnChainDag compares the result of BlockAtDepth to the result of looping over the SelectedChain on a single chain DAG.
 func TestBlockAtDepthOnChainDag(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		stagingArea := model.NewStagingArea()
 
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false,
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig,
 			"TestBlockAtDepthOnChainDag")
 		if err != nil {
 			t.Fatalf("Failed creating a NewTestConsensus: %s", err)
 		}
 		defer tearDown(false)
 
-		highHash, err := createAChainDAG(params.GenesisHash, tc)
+		highHash, err := createAChainDAG(consensusConfig.GenesisHash, tc)
 		if err != nil {
 			t.Fatalf("Failed creating a Chain DAG In BlockAtDepthTEST: %+v", err)
 		}
@@ -74,9 +73,9 @@ func createAChainDAG(genesisHash *externalapi.DomainHash, tc testapi.TestConsens
 // TestBlockAtDepthOnDAGWhereTwoBlocksHaveSameSelectedParent compares the results of BlockAtDepth
 // of 2 children that have the same selectedParent.
 func TestBlockAtDepthOnDAGWhereTwoBlocksHaveSameSelectedParent(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false,
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig,
 			"TestBlockAtDepthOnDAGWhereTwoBlocksHaveSameSelectedParent")
 		if err != nil {
 			t.Fatalf("Failed creating a NewTestConsensus: %s", err)
@@ -85,7 +84,7 @@ func TestBlockAtDepthOnDAGWhereTwoBlocksHaveSameSelectedParent(t *testing.T) {
 
 		stagingArea := model.NewStagingArea()
 
-		firstChild, secondChild, err := createADAGTwoChildrenWithSameSelectedParent(params.GenesisHash, tc)
+		firstChild, secondChild, err := createADAGTwoChildrenWithSameSelectedParent(consensusConfig.GenesisHash, tc)
 		if err != nil {
 			t.Fatalf("Failed creating a DAG where two blocks have same selected parent: %+v", err)
 		}
@@ -128,9 +127,9 @@ func createADAGTwoChildrenWithSameSelectedParent(genesisHash *externalapi.Domain
 // TestBlockAtDepthOnDAGWithTwoDifferentChains compares results of BlockAtDepth on two different chains,
 // on the same DAG, and validates they merge at the correct point.
 func TestBlockAtDepthOnDAGWithTwoDifferentChains(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false,
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig,
 			"TestBlockAtDepthOnDAGWithTwoDifferentChains")
 		if err != nil {
 			t.Fatalf("Failed creating a NewTestConsensus: %s", err)
@@ -140,7 +139,7 @@ func TestBlockAtDepthOnDAGWithTwoDifferentChains(t *testing.T) {
 		const sizeOfTheFirstChildSubChainDAG = 3
 		const sizeOfTheSecondChildSubChainDAG = 2
 
-		firstChild, secondChild, err := createADAGWithTwoDifferentChains(params.GenesisHash, tc, sizeOfTheFirstChildSubChainDAG,
+		firstChild, secondChild, err := createADAGWithTwoDifferentChains(consensusConfig.GenesisHash, tc, sizeOfTheFirstChildSubChainDAG,
 			sizeOfTheSecondChildSubChainDAG)
 		if err != nil {
 			t.Fatalf("Failed creating a DAG with two different chains in BlockAtDepthTEST: %+v", err)
@@ -207,10 +206,10 @@ func createADAGWithTwoDifferentChains(genesisHash *externalapi.DomainHash, tc te
 }
 
 func TestLowestChainBlockAboveOrEqualToBlueScore(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		params.FinalityDuration = 10 * params.TargetTimePerBlock
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		consensusConfig.FinalityDuration = 10 * consensusConfig.TargetTimePerBlock
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false,
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig,
 			"TestLowestChainBlockAboveOrEqualToBlueScore")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %s", err)
@@ -241,8 +240,8 @@ func TestLowestChainBlockAboveOrEqualToBlueScore(t *testing.T) {
 			}
 		}
 
-		chain := []*externalapi.DomainHash{params.GenesisHash}
-		tipHash := params.GenesisHash
+		chain := []*externalapi.DomainHash{consensusConfig.GenesisHash}
+		tipHash := consensusConfig.GenesisHash
 		for i := 0; i < 9; i++ {
 			var err error
 			tipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
@@ -253,7 +252,7 @@ func TestLowestChainBlockAboveOrEqualToBlueScore(t *testing.T) {
 			chain = append(chain, tipHash)
 		}
 
-		sideChain1TipHash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		sideChain1TipHash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -277,7 +276,7 @@ func TestLowestChainBlockAboveOrEqualToBlueScore(t *testing.T) {
 			chain = append(chain, tipHash)
 		}
 
-		sideChain2TipHash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		sideChain2TipHash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -302,7 +301,7 @@ func TestLowestChainBlockAboveOrEqualToBlueScore(t *testing.T) {
 		}
 
 		// Check by exact blue score
-		checkExpectedBlock(tipHash, 0, params.GenesisHash)
+		checkExpectedBlock(tipHash, 0, consensusConfig.GenesisHash)
 		checkExpectedBlock(tipHash, 5, chain[5])
 		checkExpectedBlock(tipHash, 19, chain[len(chain)-3])
 
diff --git a/domain/consensus/processes/dagtraversalmanager/window_test.go b/domain/consensus/processes/dagtraversalmanager/window_test.go
index 38230003..6faa6a5f 100644
--- a/domain/consensus/processes/dagtraversalmanager/window_test.go
+++ b/domain/consensus/processes/dagtraversalmanager/window_test.go
@@ -310,10 +310,10 @@ func TestBlockWindow(t *testing.T) {
 			},
 		},
 	}
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		params.K = 1
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		consensusConfig.K = 1
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false, "TestBlockWindow")
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig, "TestBlockWindow")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %s", err)
 		}
@@ -322,10 +322,10 @@ func TestBlockWindow(t *testing.T) {
 		windowSize := 10
 		blockByIDMap := make(map[string]*externalapi.DomainHash)
 		idByBlockMap := make(map[externalapi.DomainHash]string)
-		blockByIDMap["A"] = params.GenesisHash
-		idByBlockMap[*params.GenesisHash] = "A"
+		blockByIDMap["A"] = consensusConfig.GenesisHash
+		idByBlockMap[*consensusConfig.GenesisHash] = "A"
 
-		blocksData := tests[params.Name]
+		blocksData := tests[consensusConfig.Name]
 
 		for _, blockData := range blocksData {
 			parents := hashset.New()
diff --git a/domain/consensus/processes/difficultymanager/difficultymanager_test.go b/domain/consensus/processes/difficultymanager/difficultymanager_test.go
index 494caa8a..8fb71ff7 100644
--- a/domain/consensus/processes/difficultymanager/difficultymanager_test.go
+++ b/domain/consensus/processes/difficultymanager/difficultymanager_test.go
@@ -18,23 +18,23 @@ import (
 )
 
 func TestDifficulty(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		if params.DisableDifficultyAdjustment {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		if consensusConfig.DisableDifficultyAdjustment {
 			return
 		}
 		// This test generates 3066 blocks above genesis with at least 1 second between each block, amounting to
 		// a bit less then an hour of timestamps.
 		// To prevent rejected blocks due to timestamps in the future, the following safeguard makes sure
 		// the genesis block is at least 1 hour in the past.
-		if params.GenesisBlock.Header.TimeInMilliseconds() > mstime.ToMSTime(time.Now().Add(-time.Hour)).UnixMilliseconds() {
+		if consensusConfig.GenesisBlock.Header.TimeInMilliseconds() > mstime.ToMSTime(time.Now().Add(-time.Hour)).UnixMilliseconds() {
 			t.Fatalf("TestDifficulty requires the GenesisBlock to be at least 1 hour old to pass")
 		}
 
-		params.K = 1
-		params.DifficultyAdjustmentWindowSize = 264
+		consensusConfig.K = 1
+		consensusConfig.DifficultyAdjustmentWindowSize = 264
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestDifficulty")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestDifficulty")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -54,7 +54,7 @@ func TestDifficulty(t *testing.T) {
 					t.Fatalf("BlockHeader: %+v", err)
 				}
 
-				blockTime = header.TimeInMilliseconds() + params.TargetTimePerBlock.Milliseconds()
+				blockTime = header.TimeInMilliseconds() + consensusConfig.TargetTimePerBlock.Milliseconds()
 			}
 
 			block, _, err := tc.BuildBlockWithParents(parents, nil, nil)
@@ -99,18 +99,18 @@ func TestDifficulty(t *testing.T) {
 			return addBlock(minTime, parents...)
 		}
 
-		tipHash := params.GenesisHash
-		tip := params.GenesisBlock
-		for i := 0; i < params.DifficultyAdjustmentWindowSize; i++ {
+		tipHash := consensusConfig.GenesisHash
+		tip := consensusConfig.GenesisBlock
+		for i := 0; i < consensusConfig.DifficultyAdjustmentWindowSize; i++ {
 			tip, tipHash = addBlock(0, tipHash)
-			if tip.Header.Bits() != params.GenesisBlock.Header.Bits() {
+			if tip.Header.Bits() != consensusConfig.GenesisBlock.Header.Bits() {
 				t.Fatalf("As long as the block blue score is less then the difficulty adjustment " +
 					"window size, the difficulty should be the same as genesis'")
 			}
 		}
-		for i := 0; i < params.DifficultyAdjustmentWindowSize+100; i++ {
+		for i := 0; i < consensusConfig.DifficultyAdjustmentWindowSize+100; i++ {
 			tip, tipHash = addBlock(0, tipHash)
-			if tip.Header.Bits() != params.GenesisBlock.Header.Bits() {
+			if tip.Header.Bits() != consensusConfig.GenesisBlock.Header.Bits() {
 				t.Fatalf("As long as the block rate remains the same, the difficulty shouldn't change")
 			}
 		}
@@ -128,7 +128,7 @@ func TestDifficulty(t *testing.T) {
 		}
 
 		var expectedBits uint32
-		switch params.Name {
+		switch consensusConfig.Name {
 		case dagconfig.TestnetParams.Name, dagconfig.DevnetParams.Name:
 			expectedBits = uint32(0x1e7f83df)
 		case dagconfig.MainnetParams.Name:
@@ -140,7 +140,7 @@ func TestDifficulty(t *testing.T) {
 		}
 
 		// Increase block rate to increase difficulty
-		for i := 0; i < params.DifficultyAdjustmentWindowSize; i++ {
+		for i := 0; i < consensusConfig.DifficultyAdjustmentWindowSize; i++ {
 			tip, tipHash = addBlockWithMinimumTime(tipHash)
 			tipGHOSTDAGData, err := tc.GHOSTDAGDataStore().Get(tc.DatabaseContext(), stagingArea, tipHash)
 			if err != nil {
@@ -161,7 +161,7 @@ func TestDifficulty(t *testing.T) {
 		// Add blocks until difficulty stabilizes
 		lastBits := tip.Header.Bits()
 		sameBitsCount := 0
-		for sameBitsCount < params.DifficultyAdjustmentWindowSize+1 {
+		for sameBitsCount < consensusConfig.DifficultyAdjustmentWindowSize+1 {
 			tip, tipHash = addBlock(0, tipHash)
 			if tip.Header.Bits() == lastBits {
 				sameBitsCount++
@@ -171,7 +171,7 @@ func TestDifficulty(t *testing.T) {
 			}
 		}
 
-		slowBlockTime := tip.Header.TimeInMilliseconds() + params.TargetTimePerBlock.Milliseconds() + 1000
+		slowBlockTime := tip.Header.TimeInMilliseconds() + consensusConfig.TargetTimePerBlock.Milliseconds() + 1000
 		slowBlock, tipHash := addBlock(slowBlockTime, tipHash)
 		if slowBlock.Header.Bits() != tip.Header.Bits() {
 			t.Fatalf("The difficulty should only change when slowBlock is in the past of a block")
@@ -192,7 +192,7 @@ func TestDifficulty(t *testing.T) {
 		// blocks in its past and one without.
 		splitBlockHash := tipHash
 		blueTipHash := splitBlockHash
-		for i := 0; i < params.DifficultyAdjustmentWindowSize; i++ {
+		for i := 0; i < consensusConfig.DifficultyAdjustmentWindowSize; i++ {
 			_, blueTipHash = addBlock(0, blueTipHash)
 		}
 
@@ -212,7 +212,7 @@ func TestDifficulty(t *testing.T) {
 		// out the red blocks from the window, and check that the red blocks don't
 		// affect the difficulty.
 		blueTipHash = splitBlockHash
-		for i := 0; i < params.DifficultyAdjustmentWindowSize+redChainLength+1; i++ {
+		for i := 0; i < consensusConfig.DifficultyAdjustmentWindowSize+redChainLength+1; i++ {
 			_, blueTipHash = addBlock(0, blueTipHash)
 		}
 
@@ -230,24 +230,24 @@ func TestDifficulty(t *testing.T) {
 }
 
 func TestDAAScore(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		params.DifficultyAdjustmentWindowSize = 264
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		consensusConfig.DifficultyAdjustmentWindowSize = 264
 
 		stagingArea := model.NewStagingArea()
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestDifficulty")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestDifficulty")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
 		defer teardown(false)
 
 		// We create a small DAG in order to skip from block with blue score of 1 directly to 3
-		split1Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		split1Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
-		block, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		block, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -287,7 +287,7 @@ func TestDAAScore(t *testing.T) {
 
 		split2Hash := tipHash
 		split2DAAScore := tipDAAScore
-		for i := uint64(0); i < uint64(params.DifficultyAdjustmentWindowSize)-1; i++ {
+		for i := uint64(0); i < uint64(consensusConfig.DifficultyAdjustmentWindowSize)-1; i++ {
 			tipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
 			if err != nil {
 				t.Fatalf("AddBlock: %+v", err)
@@ -309,7 +309,7 @@ func TestDAAScore(t *testing.T) {
 			t.Fatalf("AddBlock: %+v", err)
 		}
 
-		// This block is in the anticone of params.DifficultyAdjustmentWindowSize-1 blocks, so it must be part
+		// This block is in the anticone of consensusConfig.DifficultyAdjustmentWindowSize-1 blocks, so it must be part
 		// of the DAA window of a merging block
 		blockAboveSplit2, _, err := tc.AddBlock([]*externalapi.DomainHash{split2Hash}, nil, nil)
 		if err != nil {
diff --git a/domain/consensus/processes/ghostdagmanager/ghostdag_test.go b/domain/consensus/processes/ghostdagmanager/ghostdag_test.go
index ceb221c7..9380b12d 100644
--- a/domain/consensus/processes/ghostdagmanager/ghostdag_test.go
+++ b/domain/consensus/processes/ghostdagmanager/ghostdag_test.go
@@ -9,16 +9,15 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/kaspanet/kaspad/domain/consensus/utils/blockheader"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
-	"github.com/kaspanet/kaspad/util/difficulty"
-
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/processes/ghostdag2"
 	"github.com/kaspanet/kaspad/domain/consensus/processes/ghostdagmanager"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/blockheader"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
+	"github.com/kaspanet/kaspad/util/difficulty"
 	"github.com/pkg/errors"
 )
 
@@ -58,7 +57,7 @@ func TestGHOSTDAG(t *testing.T) {
 		{ghostdagmanager.New, "Original"},
 		{ghostdag2.New, "Tal's impl"},
 	}
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		dagTopology := &DAGTopologyManagerImpl{
 			parentsMap: make(map[externalapi.DomainHash][]*externalapi.DomainHash),
 		}
@@ -72,7 +71,7 @@ func TestGHOSTDAG(t *testing.T) {
 		}
 
 		blockGHOSTDAGDataGenesis := model.NewBlockGHOSTDAGData(0, new(big.Int), nil, nil, nil, nil)
-		genesisHeader := params.GenesisBlock.Header
+		genesisHeader := consensusConfig.GenesisBlock.Header
 		genesisWork := difficulty.CalcWork(genesisHeader.Bits())
 
 		var testsCounter int
@@ -95,7 +94,7 @@ func TestGHOSTDAG(t *testing.T) {
 			if err != nil {
 				t.Fatalf("TestGHOSTDAG:failed decoding json: %v", err)
 			}
-			params.K = test.K
+			consensusConfig.K = test.K
 
 			genesisHash := *StringToDomainHash(test.GenesisID)
 
diff --git a/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager_test.go b/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager_test.go
index 936dba21..55e2ce8e 100644
--- a/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager_test.go
+++ b/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager_test.go
@@ -8,15 +8,14 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/kaspanet/kaspad/infrastructure/db/database"
 	"github.com/pkg/errors"
 )
 
 func TestAddHeaderTip(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false, "TestAddHeaderTip")
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig, "TestAddHeaderTip")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %s", err)
 		}
@@ -51,8 +50,8 @@ func TestAddHeaderTip(t *testing.T) {
 			}
 		}
 
-		expectedSelectedChain := []*externalapi.DomainHash{params.GenesisHash}
-		tipHash := params.GenesisHash
+		expectedSelectedChain := []*externalapi.DomainHash{consensusConfig.GenesisHash}
+		tipHash := consensusConfig.GenesisHash
 		for i := 0; i < 10; i++ {
 			var err error
 			tipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
@@ -64,8 +63,8 @@ func TestAddHeaderTip(t *testing.T) {
 			checkExpectedSelectedChain(expectedSelectedChain)
 		}
 
-		expectedSelectedChain = []*externalapi.DomainHash{params.GenesisHash}
-		tipHash = params.GenesisHash
+		expectedSelectedChain = []*externalapi.DomainHash{consensusConfig.GenesisHash}
+		tipHash = consensusConfig.GenesisHash
 		for i := 0; i < 11; i++ {
 			var err error
 			tipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
diff --git a/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager_test.go b/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager_test.go
index 901c623e..7755b4e7 100644
--- a/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager_test.go
+++ b/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager_test.go
@@ -9,13 +9,12 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestPastMedianTime(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false, "TestUpdateReindexRoot")
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig, "TestUpdateReindexRoot")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %s", err)
 		}
@@ -23,8 +22,8 @@ func TestPastMedianTime(t *testing.T) {
 
 		numBlocks := uint32(300)
 		blockHashes := make([]*externalapi.DomainHash, numBlocks)
-		blockHashes[0] = params.GenesisHash
-		blockTime := params.GenesisBlock.Header.TimeInMilliseconds()
+		blockHashes[0] = consensusConfig.GenesisHash
+		blockTime := consensusConfig.GenesisBlock.Header.TimeInMilliseconds()
 		for i := uint32(1); i < numBlocks; i++ {
 			blockTime += 1000
 			block, _, err := tc.BuildBlockWithParents([]*externalapi.DomainHash{blockHashes[i-1]}, nil, nil)
@@ -73,7 +72,7 @@ func TestPastMedianTime(t *testing.T) {
 			}
 
 			millisecondsSinceGenesis := pastMedianTime -
-				params.GenesisBlock.Header.TimeInMilliseconds()
+				consensusConfig.GenesisBlock.Header.TimeInMilliseconds()
 
 			if millisecondsSinceGenesis != test.expectedMillisecondsSinceGenesis {
 				t.Errorf("TestCalcPastMedianTime: expected past median time of block %v to be %v milliseconds "+
diff --git a/domain/consensus/processes/pruningmanager/pruning_test.go b/domain/consensus/processes/pruningmanager/pruning_test.go
index 016c7a69..c8106839 100644
--- a/domain/consensus/processes/pruningmanager/pruning_test.go
+++ b/domain/consensus/processes/pruningmanager/pruning_test.go
@@ -42,7 +42,7 @@ func TestPruning(t *testing.T) {
 		},
 	}
 
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		err := filepath.Walk("./testdata", func(path string, info os.FileInfo, err error) error {
 			if err != nil {
 				return err
@@ -65,22 +65,22 @@ func TestPruning(t *testing.T) {
 				t.Fatalf("TestPruning: failed decoding json: %v", err)
 			}
 
-			params.FinalityDuration = time.Duration(test.FinalityDepth) * params.TargetTimePerBlock
-			params.MergeSetSizeLimit = test.MergeSetSizeLimit
+			consensusConfig.FinalityDuration = time.Duration(test.FinalityDepth) * consensusConfig.TargetTimePerBlock
+			consensusConfig.MergeSetSizeLimit = test.MergeSetSizeLimit
 
 			factory := consensus.NewFactory()
-			tc, teardown, err := factory.NewTestConsensus(params, false, "TestPruning")
+			tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestPruning")
 			if err != nil {
 				t.Fatalf("Error setting up consensus: %+v", err)
 			}
 			defer teardown(false)
 
 			blockIDToHash := map[string]*externalapi.DomainHash{
-				"0": params.GenesisHash,
+				"0": consensusConfig.GenesisHash,
 			}
 
 			blockHashToID := map[externalapi.DomainHash]string{
-				*params.GenesisHash: "0",
+				*consensusConfig.GenesisHash: "0",
 			}
 
 			stagingArea := model.NewStagingArea()
@@ -133,7 +133,7 @@ func TestPruning(t *testing.T) {
 			}
 
 			pruningPointID := blockHashToID[*pruningPoint]
-			expectedPruningPoint := expectedPruningPointByNet[info.Name()][params.Name]
+			expectedPruningPoint := expectedPruningPointByNet[info.Name()][consensusConfig.Name]
 			if expectedPruningPoint != pruningPointID {
 				t.Fatalf("%s: Expected pruning point to be %s but got %s", info.Name(), expectedPruningPoint, pruningPointID)
 			}
diff --git a/domain/consensus/processes/reachabilitymanager/reachabilityManager_test.go b/domain/consensus/processes/reachabilitymanager/reachabilityManager_test.go
index a6748bd3..805306c3 100644
--- a/domain/consensus/processes/reachabilitymanager/reachabilityManager_test.go
+++ b/domain/consensus/processes/reachabilitymanager/reachabilityManager_test.go
@@ -8,13 +8,12 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestReachabilityIsDAGAncestorOf(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestReachabilityIsDAGAncestorOf")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestReachabilityIsDAGAncestorOf")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -25,7 +24,7 @@ func TestReachabilityIsDAGAncestorOf(t *testing.T) {
 		//      genesis       \              \  sharedBlock
 		//              \       \            /
 		//                C  <-  D  - - - - /
-		genesisHash := params.GenesisHash
+		genesisHash := consensusConfig.GenesisHash
 		blockHashA, _, err := tc.AddBlock([]*externalapi.DomainHash{genesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %v", err)
diff --git a/domain/consensus/processes/reachabilitymanager/reachability_external_test.go b/domain/consensus/processes/reachabilitymanager/reachability_external_test.go
index f86eecef..ecbe00fd 100644
--- a/domain/consensus/processes/reachabilitymanager/reachability_external_test.go
+++ b/domain/consensus/processes/reachabilitymanager/reachability_external_test.go
@@ -9,14 +9,13 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestAddChildThatPointsDirectlyToTheSelectedParentChainBelowReindexRoot(t *testing.T) {
 	reachabilityReindexWindow := uint64(10)
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false,
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig,
 			"TestAddChildThatPointsDirectlyToTheSelectedParentChainBelowReindexRoot")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %+v", err)
@@ -32,12 +31,12 @@ func TestAddChildThatPointsDirectlyToTheSelectedParentChainBelowReindexRoot(t *t
 			t.Fatalf("ReachabilityReindexRoot: %s", err)
 		}
 
-		if !reindexRoot.Equal(params.GenesisHash) {
+		if !reindexRoot.Equal(consensusConfig.GenesisHash) {
 			t.Fatalf("reindex root is expected to initially be genesis")
 		}
 
 		// Add a block on top of the genesis block
-		chainRootBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		chainRootBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -67,13 +66,13 @@ func TestAddChildThatPointsDirectlyToTheSelectedParentChainBelowReindexRoot(t *t
 		slackSize := tc.ReachabilityManager().ReachabilityReindexSlack()
 		blocksToAdd := uint64(math.Log2(float64(slackSize))) + 2
 		for i := uint64(0); i < blocksToAdd; i++ {
-			_, _, err = tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+			_, _, err = tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 			if err != nil {
 				t.Fatalf("AddBlock: %+v", err)
 			}
 		}
 
-		err = tc.ReachabilityManager().ValidateIntervals(params.GenesisHash)
+		err = tc.ReachabilityManager().ValidateIntervals(consensusConfig.GenesisHash)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -82,9 +81,9 @@ func TestAddChildThatPointsDirectlyToTheSelectedParentChainBelowReindexRoot(t *t
 
 func TestUpdateReindexRoot(t *testing.T) {
 	reachabilityReindexWindow := uint64(10)
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false, "TestUpdateReindexRoot")
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig, "TestUpdateReindexRoot")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %s", err)
 		}
@@ -103,12 +102,12 @@ func TestUpdateReindexRoot(t *testing.T) {
 		}
 
 		// Add two blocks on top of the genesis block
-		chain1RootBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		chain1RootBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
 
-		chain2RootBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		chain2RootBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -132,7 +131,7 @@ func TestUpdateReindexRoot(t *testing.T) {
 				t.Fatalf("ReachabilityReindexRoot: %s", err)
 			}
 
-			if !reindexRoot.Equal(params.GenesisHash) {
+			if !reindexRoot.Equal(consensusConfig.GenesisHash) {
 				t.Fatalf("reindex root unexpectedly moved")
 			}
 		}
@@ -163,14 +162,14 @@ func TestUpdateReindexRoot(t *testing.T) {
 
 		// Make sure that the rest of the interval has been allocated to
 		// chain1RootNode, minus slack from both sides
-		expectedChain1RootIntervalSize := intervalSize(params.GenesisHash) - 1 -
+		expectedChain1RootIntervalSize := intervalSize(consensusConfig.GenesisHash) - 1 -
 			intervalSize(chain2RootBlock) - 2*tc.ReachabilityManager().ReachabilityReindexSlack()
 		if intervalSize(chain1RootBlock) != expectedChain1RootIntervalSize {
 			t.Fatalf("got unexpected chain1RootBlock interval. Want: %d, got: %d",
 				intervalSize(chain1RootBlock), expectedChain1RootIntervalSize)
 		}
 
-		err = tc.ReachabilityManager().ValidateIntervals(params.GenesisHash)
+		err = tc.ReachabilityManager().ValidateIntervals(consensusConfig.GenesisHash)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -179,9 +178,9 @@ func TestUpdateReindexRoot(t *testing.T) {
 
 func TestReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 	reachabilityReindexWindow := uint64(10)
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false, "TestUpdateReindexRoot")
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig, "TestUpdateReindexRoot")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %+v", err)
 		}
@@ -200,17 +199,17 @@ func TestReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 		}
 
 		// Add three children to the genesis: leftBlock, centerBlock, rightBlock
-		leftBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		leftBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
 
-		centerBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		centerBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
 
-		rightBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		rightBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -248,7 +247,7 @@ func TestReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 			t.Fatalf("rightBlock interval not tight after reindex")
 		}
 
-		err = tc.ReachabilityManager().ValidateIntervals(params.GenesisHash)
+		err = tc.ReachabilityManager().ValidateIntervals(consensusConfig.GenesisHash)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -266,7 +265,7 @@ func TestReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 				t.Fatalf("AddBlock: %+v", err)
 			}
 
-			err = tc.ReachabilityManager().ValidateIntervals(params.GenesisHash)
+			err = tc.ReachabilityManager().ValidateIntervals(consensusConfig.GenesisHash)
 			if err != nil {
 				t.Fatal(err)
 			}
@@ -284,13 +283,13 @@ func TestReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 				t.Fatalf("AddBlock: %+v", err)
 			}
 
-			err = tc.ReachabilityManager().ValidateIntervals(params.GenesisHash)
+			err = tc.ReachabilityManager().ValidateIntervals(consensusConfig.GenesisHash)
 			if err != nil {
 				t.Fatal(err)
 			}
 		}
 
-		err = tc.ReachabilityManager().ValidateIntervals(params.GenesisHash)
+		err = tc.ReachabilityManager().ValidateIntervals(consensusConfig.GenesisHash)
 		if err != nil {
 			t.Fatal(err)
 		}
@@ -299,9 +298,9 @@ func TestReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 
 func TestTipsAfterReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 	reachabilityReindexWindow := uint64(10)
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false, "TestUpdateReindexRoot")
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig, "TestUpdateReindexRoot")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %s", err)
 		}
@@ -311,7 +310,7 @@ func TestTipsAfterReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 
 		// Add a chain of reachabilityReindexWindow + 1 blocks above the genesis.
 		// This will set the reindex root to the child of genesis
-		chainTipHash := params.GenesisHash
+		chainTipHash := consensusConfig.GenesisHash
 		for i := uint64(0); i < reachabilityReindexWindow+1; i++ {
 			chainTipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{chainTipHash}, nil, nil)
 			if err != nil {
@@ -321,7 +320,7 @@ func TestTipsAfterReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 
 		// Add another block above the genesis block. This will trigger an
 		// earlier-than-reindex-root reindex
-		sideBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		sideBlock, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -333,7 +332,7 @@ func TestTipsAfterReindexIntervalsEarlierThanReindexRoot(t *testing.T) {
 			t.Fatalf("AddBlock: %+v", err)
 		}
 
-		err = tc.ReachabilityManager().ValidateIntervals(params.GenesisHash)
+		err = tc.ReachabilityManager().ValidateIntervals(consensusConfig.GenesisHash)
 		if err != nil {
 			t.Fatal(err)
 		}
diff --git a/domain/consensus/processes/reachabilitymanager/reachability_stretch_test.go b/domain/consensus/processes/reachabilitymanager/reachability_stretch_test.go
index 1d376ff8..392a71b8 100644
--- a/domain/consensus/processes/reachabilitymanager/reachability_stretch_test.go
+++ b/domain/consensus/processes/reachabilitymanager/reachability_stretch_test.go
@@ -22,9 +22,9 @@ const numBlocksExponent = 12
 
 func initializeTest(t *testing.T, testName string) (tc testapi.TestConsensus, teardown func(keepDataDir bool)) {
 	t.Parallel()
-	params := dagconfig.SimnetParams
-	params.SkipProofOfWork = true
-	tc, teardown, err := consensus.NewFactory().NewTestConsensus(&params, false, testName)
+	consensusConfig := consensus.Config{Params: dagconfig.SimnetParams}
+	consensusConfig.SkipProofOfWork = true
+	tc, teardown, err := consensus.NewFactory().NewTestConsensus(&consensusConfig, testName)
 	if err != nil {
 		t.Fatalf("Error setting up consensus: %+v", err)
 	}
diff --git a/domain/consensus/processes/syncmanager/blocklocator_test.go b/domain/consensus/processes/syncmanager/blocklocator_test.go
index 8d3e9370..c6e65b67 100644
--- a/domain/consensus/processes/syncmanager/blocklocator_test.go
+++ b/domain/consensus/processes/syncmanager/blocklocator_test.go
@@ -8,23 +8,22 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/kaspanet/kaspad/infrastructure/db/database"
 	"github.com/pkg/errors"
 )
 
 func TestCreateBlockLocator(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false,
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig,
 			"TestCreateBlockLocator")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %+v", err)
 		}
 		defer tearDown(false)
 
-		chain := []*externalapi.DomainHash{params.GenesisHash}
-		tipHash := params.GenesisHash
+		chain := []*externalapi.DomainHash{consensusConfig.GenesisHash}
+		tipHash := consensusConfig.GenesisHash
 		for i := 0; i < 20; i++ {
 			var err error
 			tipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
@@ -35,13 +34,13 @@ func TestCreateBlockLocator(t *testing.T) {
 			chain = append(chain, tipHash)
 		}
 
-		sideChainTipHash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		sideChainTipHash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
 
 		// Check a situation where low hash is not on the exact step blue score
-		locator, err := tc.CreateBlockLocator(params.GenesisHash, tipHash, 0)
+		locator, err := tc.CreateBlockLocator(consensusConfig.GenesisHash, tipHash, 0)
 		if err != nil {
 			t.Fatalf("CreateBlockLocator: %+v", err)
 		}
@@ -74,7 +73,7 @@ func TestCreateBlockLocator(t *testing.T) {
 		}
 
 		// Check block locator with limit
-		locator, err = tc.CreateBlockLocator(params.GenesisHash, tipHash, 3)
+		locator, err = tc.CreateBlockLocator(consensusConfig.GenesisHash, tipHash, 3)
 		if err != nil {
 			t.Fatalf("CreateBlockLocator: %+v", err)
 		}
@@ -88,13 +87,13 @@ func TestCreateBlockLocator(t *testing.T) {
 		}
 
 		// Check a block locator from genesis to genesis
-		locator, err = tc.CreateBlockLocator(params.GenesisHash, params.GenesisHash, 0)
+		locator, err = tc.CreateBlockLocator(consensusConfig.GenesisHash, consensusConfig.GenesisHash, 0)
 		if err != nil {
 			t.Fatalf("CreateBlockLocator: %+v", err)
 		}
 
 		if !externalapi.HashesEqual(locator, []*externalapi.DomainHash{
-			params.GenesisHash,
+			consensusConfig.GenesisHash,
 		}) {
 			t.Fatalf("unexpected block locator %s", locator)
 		}
@@ -134,17 +133,17 @@ func TestCreateBlockLocator(t *testing.T) {
 }
 
 func TestCreateHeadersSelectedChainBlockLocator(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, tearDown, err := factory.NewTestConsensus(params, false,
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig,
 			"TestCreateHeadersSelectedChainBlockLocator")
 		if err != nil {
 			t.Fatalf("NewTestConsensus: %+v", err)
 		}
 		defer tearDown(false)
 
-		chain := []*externalapi.DomainHash{params.GenesisHash}
-		tipHash := params.GenesisHash
+		chain := []*externalapi.DomainHash{consensusConfig.GenesisHash}
+		tipHash := consensusConfig.GenesisHash
 		for i := 0; i < 20; i++ {
 			var err error
 			tipHash, _, err = tc.AddBlock([]*externalapi.DomainHash{tipHash}, nil, nil)
@@ -155,13 +154,13 @@ func TestCreateHeadersSelectedChainBlockLocator(t *testing.T) {
 			chain = append(chain, tipHash)
 		}
 
-		sideChainTipHash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+		sideChainTipHash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
 
 		// Check a situation where low hash is not on the exact step
-		locator, err := tc.CreateHeadersSelectedChainBlockLocator(params.GenesisHash, tipHash)
+		locator, err := tc.CreateHeadersSelectedChainBlockLocator(consensusConfig.GenesisHash, tipHash)
 		if err != nil {
 			t.Fatalf("CreateBlockLocator: %+v", err)
 		}
@@ -194,13 +193,13 @@ func TestCreateHeadersSelectedChainBlockLocator(t *testing.T) {
 		}
 
 		// Check a block locator from genesis to genesis
-		locator, err = tc.CreateHeadersSelectedChainBlockLocator(params.GenesisHash, params.GenesisHash)
+		locator, err = tc.CreateHeadersSelectedChainBlockLocator(consensusConfig.GenesisHash, consensusConfig.GenesisHash)
 		if err != nil {
 			t.Fatalf("CreateBlockLocator: %+v", err)
 		}
 
 		if !externalapi.HashesEqual(locator, []*externalapi.DomainHash{
-			params.GenesisHash,
+			consensusConfig.GenesisHash,
 		}) {
 			t.Fatalf("unexpected block locator %s", locator)
 		}
@@ -225,7 +224,7 @@ func TestCreateHeadersSelectedChainBlockLocator(t *testing.T) {
 		}
 
 		// Check block locator with non chain blocks
-		_, err = tc.CreateHeadersSelectedChainBlockLocator(params.GenesisHash, sideChainTipHash)
+		_, err = tc.CreateHeadersSelectedChainBlockLocator(consensusConfig.GenesisHash, sideChainTipHash)
 		if !errors.Is(err, model.ErrBlockNotInSelectedParentChain) {
 			t.Fatalf("expected error '%s' but got '%s'", database.ErrNotFound, err)
 		}
diff --git a/domain/consensus/processes/syncmanager/syncmanager_test.go b/domain/consensus/processes/syncmanager/syncmanager_test.go
index e9a45da1..c2efad13 100644
--- a/domain/consensus/processes/syncmanager/syncmanager_test.go
+++ b/domain/consensus/processes/syncmanager/syncmanager_test.go
@@ -11,15 +11,14 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 func TestSyncManager_GetHashesBetween(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		stagingArea := model.NewStagingArea()
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestSyncManager_GetHashesBetween")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestSyncManager_GetHashesBetween")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -36,7 +35,7 @@ func TestSyncManager_GetHashesBetween(t *testing.T) {
 		//        \       |      /
 		//               etc.
 		expectedOrder := make([]*externalapi.DomainHash, 0, 40)
-		mergingBlock := params.GenesisHash
+		mergingBlock := consensusConfig.GenesisHash
 		for i := 0; i < 10; i++ {
 			splitBlocks := make([]*externalapi.DomainHash, 0, 3)
 			for j := 0; j < 3; j++ {
@@ -70,7 +69,7 @@ func TestSyncManager_GetHashesBetween(t *testing.T) {
 		}
 
 		actualOrder, _, err := tc.SyncManager().GetHashesBetween(
-			stagingArea, params.GenesisHash, expectedOrder[len(expectedOrder)-1], math.MaxUint64)
+			stagingArea, consensusConfig.GenesisHash, expectedOrder[len(expectedOrder)-1], math.MaxUint64)
 		if err != nil {
 			t.Fatalf("TestSyncManager_GetHashesBetween failed returning actualOrder: %v", err)
 		}
diff --git a/domain/consensus/processes/transactionvalidator/transaction_in_isolation_test.go b/domain/consensus/processes/transactionvalidator/transaction_in_isolation_test.go
index b45f785f..5e0cdb8f 100644
--- a/domain/consensus/processes/transactionvalidator/transaction_in_isolation_test.go
+++ b/domain/consensus/processes/transactionvalidator/transaction_in_isolation_test.go
@@ -10,7 +10,6 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/kaspanet/kaspad/util"
 	"github.com/pkg/errors"
 )
@@ -22,9 +21,9 @@ type txSubnetworkData struct {
 }
 
 func TestValidateTransactionInIsolation(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestValidateTransactionInIsolation")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestValidateTransactionInIsolation")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -79,7 +78,7 @@ func TestValidateTransactionInIsolation(t *testing.T) {
 				1,
 				1,
 				subnetworks.SubnetworkIDNative,
-				&txSubnetworkData{subnetworks.SubnetworkIDCoinbase, 0, make([]byte, params.MaxCoinbasePayloadLength+1)},
+				&txSubnetworkData{subnetworks.SubnetworkIDCoinbase, 0, make([]byte, consensusConfig.MaxCoinbasePayloadLength+1)},
 				nil,
 				ruleerrors.ErrBadCoinbasePayloadLen},
 			{"non-zero gas in Kaspa", 1, 1, 0,
diff --git a/domain/consensus/processes/transactionvalidator/transactionvalidator_test.go b/domain/consensus/processes/transactionvalidator/transactionvalidator_test.go
index 89ed77b9..6327d3ad 100644
--- a/domain/consensus/processes/transactionvalidator/transactionvalidator_test.go
+++ b/domain/consensus/processes/transactionvalidator/transactionvalidator_test.go
@@ -16,7 +16,6 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/pkg/errors"
 )
 
@@ -30,7 +29,7 @@ func (mdf *mocPastMedianTimeManager) PastMedianTime(*model.StagingArea, *externa
 }
 
 func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
 		factory := consensus.NewFactory()
 		pastMedianManager := &mocPastMedianTimeManager{}
@@ -38,7 +37,7 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
 			model.GHOSTDAGDataStore, *externalapi.DomainHash) model.PastMedianTimeManager {
 			return pastMedianManager
 		})
-		tc, tearDown, err := factory.NewTestConsensus(params, false,
+		tc, tearDown, err := factory.NewTestConsensus(consensusConfig,
 			"TestValidateTransactionInContextAndPopulateMassAndFee")
 		if err != nil {
 			t.Fatalf("Failed create a NewTestConsensus: %s", err)
@@ -58,7 +57,7 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
 		if err != nil {
 			t.Fatalf("Failed to serialize public key: %v", err)
 		}
-		addr, err := util.NewAddressPublicKey(publicKeySerialized[:], params.Prefix)
+		addr, err := util.NewAddressPublicKey(publicKeySerialized[:], consensusConfig.Prefix)
 		if err != nil {
 			t.Fatalf("Failed to generate p2pk address: %v", err)
 		}
@@ -158,7 +157,7 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
 		stagingArea := model.NewStagingArea()
 
 		povBlockHash := externalapi.NewDomainHashFromByteArray(&[32]byte{0x01})
-		tc.DAABlocksStore().StageDAAScore(stagingArea, povBlockHash, params.BlockCoinbaseMaturity+txInput.UTXOEntry.BlockDAAScore())
+		tc.DAABlocksStore().StageDAAScore(stagingArea, povBlockHash, consensusConfig.BlockCoinbaseMaturity+txInput.UTXOEntry.BlockDAAScore())
 		tc.DAABlocksStore().StageDAAScore(stagingArea, povBlockHash, 10)
 
 		tests := []struct {
@@ -240,10 +239,10 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
 }
 
 func TestSigningTwoInputs(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		params.BlockCoinbaseMaturity = 0
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		consensusConfig.BlockCoinbaseMaturity = 0
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestSigningTwoInputs")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestSigningTwoInputs")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -261,7 +260,7 @@ func TestSigningTwoInputs(t *testing.T) {
 		if err != nil {
 			t.Fatalf("Failed to serialize public key: %v", err)
 		}
-		addr, err := util.NewAddressPublicKey(publicKeySerialized[:], params.Prefix)
+		addr, err := util.NewAddressPublicKey(publicKeySerialized[:], consensusConfig.Prefix)
 		if err != nil {
 			t.Fatalf("Failed to generate p2pk address: %v", err)
 		}
@@ -275,7 +274,7 @@ func TestSigningTwoInputs(t *testing.T) {
 			ScriptPublicKey: scriptPublicKey,
 		}
 
-		block1Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, coinbaseData, nil)
+		block1Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, coinbaseData, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
@@ -364,10 +363,10 @@ func TestSigningTwoInputs(t *testing.T) {
 }
 
 func TestSigningTwoInputsECDSA(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		params.BlockCoinbaseMaturity = 0
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		consensusConfig.BlockCoinbaseMaturity = 0
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestSigningTwoInputsECDSA")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestSigningTwoInputsECDSA")
 		if err != nil {
 			t.Fatalf("Error setting up consensus: %+v", err)
 		}
@@ -385,7 +384,7 @@ func TestSigningTwoInputsECDSA(t *testing.T) {
 		if err != nil {
 			t.Fatalf("Failed to serialize public key: %v", err)
 		}
-		addr, err := util.NewAddressPublicKeyECDSA(publicKeySerialized[:], params.Prefix)
+		addr, err := util.NewAddressPublicKeyECDSA(publicKeySerialized[:], consensusConfig.Prefix)
 		if err != nil {
 			t.Fatalf("Failed to generate p2pk address: %v", err)
 		}
@@ -399,7 +398,7 @@ func TestSigningTwoInputsECDSA(t *testing.T) {
 			ScriptPublicKey: scriptPublicKey,
 		}
 
-		block1Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, coinbaseData, nil)
+		block1Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, coinbaseData, nil)
 		if err != nil {
 			t.Fatalf("AddBlock: %+v", err)
 		}
diff --git a/domain/consensus/pruning_test.go b/domain/consensus/pruning_test.go
index bd574ee1..bab0800b 100644
--- a/domain/consensus/pruning_test.go
+++ b/domain/consensus/pruning_test.go
@@ -1,8 +1,9 @@
-package consensus
+package consensus_test
 
 import (
 	"testing"
 
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
 	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
@@ -14,13 +15,13 @@ func TestPruningDepth(t *testing.T) {
 		dagconfig.DevnetParams.Name:  244838,
 		dagconfig.SimnetParams.Name:  192038,
 	}
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		expected, found := expectedResult[params.Name]
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		expected, found := expectedResult[consensusConfig.Name]
 		if !found {
-			t.Fatalf("TestPruningDepth: expectedResult doesn't contain '%s'", params.Name)
+			t.Fatalf("TestPruningDepth: expectedResult doesn't contain '%s'", consensusConfig.Name)
 		}
-		if params.PruningDepth() != expected {
-			t.Errorf("pruningDepth in %s is expected to be %d but got %d", params.Name, expected, params.PruningDepth())
+		if consensusConfig.PruningDepth() != expected {
+			t.Errorf("pruningDepth in %s is expected to be %d but got %d", consensusConfig.Name, expected, consensusConfig.PruningDepth())
 		}
 	})
 }
diff --git a/domain/consensus/utils/testutils/for_all_nets.go b/domain/consensus/utils/testutils/for_all_nets.go
index dde91068..e47315ce 100644
--- a/domain/consensus/utils/testutils/for_all_nets.go
+++ b/domain/consensus/utils/testutils/for_all_nets.go
@@ -3,12 +3,13 @@ package testutils
 import (
 	"testing"
 
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/dagconfig"
 )
 
 // ForAllNets runs the passed testFunc with all available networks
 // if setDifficultyToMinumum = true - will modify the net params to have minimal difficulty, like in SimNet
-func ForAllNets(t *testing.T, skipPow bool, testFunc func(*testing.T, *dagconfig.Params)) {
+func ForAllNets(t *testing.T, skipPow bool, testFunc func(*testing.T, *consensus.Config)) {
 	allParams := []dagconfig.Params{
 		dagconfig.MainnetParams,
 		dagconfig.TestnetParams,
@@ -17,12 +18,12 @@ func ForAllNets(t *testing.T, skipPow bool, testFunc func(*testing.T, *dagconfig
 	}
 
 	for _, params := range allParams {
-		paramsCopy := params
-		t.Run(paramsCopy.Name, func(t *testing.T) {
+		consensusConfig := consensus.Config{Params: params}
+		t.Run(consensusConfig.Name, func(t *testing.T) {
 			t.Parallel()
-			paramsCopy.SkipProofOfWork = skipPow
-			t.Logf("Running test for %s", paramsCopy.Name)
-			testFunc(t, &paramsCopy)
+			consensusConfig.SkipProofOfWork = skipPow
+			t.Logf("Running test for %s", consensusConfig.Name)
+			testFunc(t, &consensusConfig)
 		})
 	}
 }
diff --git a/domain/consensus/utils/testutils/test_ghostdag.go b/domain/consensus/utils/testutils/test_ghostdag.go
index bc6bfdc6..ada832eb 100644
--- a/domain/consensus/utils/testutils/test_ghostdag.go
+++ b/domain/consensus/utils/testutils/test_ghostdag.go
@@ -5,7 +5,6 @@ import (
 	"testing"
 
 	"github.com/kaspanet/kaspad/domain/consensus/model"
-
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
 	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
 )
diff --git a/domain/miningmanager/miningmanager_test.go b/domain/miningmanager/miningmanager_test.go
index e19c102c..70359aa0 100644
--- a/domain/miningmanager/miningmanager_test.go
+++ b/domain/miningmanager/miningmanager_test.go
@@ -1,41 +1,38 @@
 package miningmanager_test
 
 import (
-	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper"
-	"github.com/kaspanet/kaspad/domain/miningmanager"
-	"github.com/pkg/errors"
 	"strings"
+	"testing"
 
 	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
-	"github.com/kaspanet/kaspad/domain/consensus/utils/utxo"
-
+	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/testutils"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/txscript"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
-
-	"testing"
+	"github.com/kaspanet/kaspad/domain/consensus/utils/utxo"
+	"github.com/kaspanet/kaspad/domain/miningmanager"
+	"github.com/pkg/errors"
 )
 
 const blockMaxMass uint64 = 10000000
 
 // TestValidateAndInsertTransaction verifies that valid transactions were successfully inserted into the mempool.
 func TestValidateAndInsertTransaction(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
-		params.BlockCoinbaseMaturity = 0
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
+		consensusConfig.BlockCoinbaseMaturity = 0
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestValidateAndInsertTransaction")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestValidateAndInsertTransaction")
 		if err != nil {
 			t.Fatalf("Error setting up TestConsensus: %+v", err)
 		}
 		defer teardown(false)
 
 		miningFactory := miningmanager.NewFactory()
-		miningManager := miningFactory.NewMiningManager(tc, params)
+		miningManager := miningFactory.NewMiningManager(tc, &consensusConfig.Params)
 		transactionsToInsert := make([]*externalapi.DomainTransaction, 10)
 		for i := range transactionsToInsert {
 			transactionsToInsert[i] = createTransactionWithUTXOEntry(t, i)
@@ -58,7 +55,7 @@ func TestValidateAndInsertTransaction(t *testing.T) {
 
 		// The parent's transaction was inserted by consensus(AddBlock), and we want to verify that
 		// the transaction is not considered an orphan and inserted into the mempool.
-		transactionNotAnOrphan, err := createChildTxWhenParentTxWasAddedByConsensus(params, tc)
+		transactionNotAnOrphan, err := createChildTxWhenParentTxWasAddedByConsensus(consensusConfig, tc)
 		if err != nil {
 			t.Fatalf("Error in createParentAndChildrenTransaction: %v", err)
 		}
@@ -76,17 +73,17 @@ func TestValidateAndInsertTransaction(t *testing.T) {
 // TestInsertDoubleTransactionsToMempool verifies that an attempt to insert a transaction
 // more than once into the mempool will result in raising an appropriate error.
 func TestInsertDoubleTransactionsToMempool(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestInsertDoubleTransactionsToMempool")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestInsertDoubleTransactionsToMempool")
 		if err != nil {
 			t.Fatalf("Error setting up TestConsensus: %+v", err)
 		}
 		defer teardown(false)
 
 		miningFactory := miningmanager.NewFactory()
-		miningManager := miningFactory.NewMiningManager(tc, params)
+		miningManager := miningFactory.NewMiningManager(tc, &consensusConfig.Params)
 		transaction := createTransactionWithUTXOEntry(t, 0)
 		err = miningManager.ValidateAndInsertTransaction(transaction, true)
 		if err != nil {
@@ -101,17 +98,17 @@ func TestInsertDoubleTransactionsToMempool(t *testing.T) {
 
 // TestHandleNewBlockTransactions verifies that all the transactions in the block were successfully removed from the mempool.
 func TestHandleNewBlockTransactions(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestHandleNewBlockTransactions")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestHandleNewBlockTransactions")
 		if err != nil {
 			t.Fatalf("Error setting up TestConsensus: %+v", err)
 		}
 		defer teardown(false)
 
 		miningFactory := miningmanager.NewFactory()
-		miningManager := miningFactory.NewMiningManager(tc, params)
+		miningManager := miningFactory.NewMiningManager(tc, &consensusConfig.Params)
 		transactionsToInsert := make([]*externalapi.DomainTransaction, 10)
 		for i := range transactionsToInsert {
 			transaction := createTransactionWithUTXOEntry(t, i)
@@ -167,17 +164,17 @@ func domainBlocksToBlockIds(blocks []*externalapi.DomainTransaction) []*external
 // TestDoubleSpends verifies that any transactions which are now double spends as a result of the block's new transactions
 // will be removed from the mempool.
 func TestDoubleSpends(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestDoubleSpends")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestDoubleSpends")
 		if err != nil {
 			t.Fatalf("Failed setting up TestConsensus: %+v", err)
 		}
 		defer teardown(false)
 
 		miningFactory := miningmanager.NewFactory()
-		miningManager := miningFactory.NewMiningManager(tc, params)
+		miningManager := miningFactory.NewMiningManager(tc, &consensusConfig.Params)
 		transactionInTheMempool := createTransactionWithUTXOEntry(t, 0)
 		err = miningManager.ValidateAndInsertTransaction(transactionInTheMempool, true)
 		if err != nil {
@@ -199,18 +196,18 @@ func TestDoubleSpends(t *testing.T) {
 
 // TestOrphanTransactions verifies that a transaction could be a part of a new block template, only if it's not an orphan.
 func TestOrphanTransactions(t *testing.T) {
-	testutils.ForAllNets(t, true, func(t *testing.T, params *dagconfig.Params) {
+	testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
 
-		params.BlockCoinbaseMaturity = 0
+		consensusConfig.BlockCoinbaseMaturity = 0
 		factory := consensus.NewFactory()
-		tc, teardown, err := factory.NewTestConsensus(params, false, "TestOrphanTransactions")
+		tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestOrphanTransactions")
 		if err != nil {
 			t.Fatalf("Error setting up TestConsensus: %+v", err)
 		}
 		defer teardown(false)
 
 		miningFactory := miningmanager.NewFactory()
-		miningManager := miningFactory.NewMiningManager(tc, params)
+		miningManager := miningFactory.NewMiningManager(tc, &consensusConfig.Params)
 		// Before each parent transaction, We will add two blocks by consensus in order to fund the parent transactions.
 		parentTransactions, childTransactions, err := createArraysOfParentAndChildrenTransactions(tc)
 		if err != nil {
@@ -386,9 +383,8 @@ func createParentAndChildrenTransactions(tc testapi.TestConsensus) (*externalapi
 	return txParent, txChild, nil
 }
 
-func createChildTxWhenParentTxWasAddedByConsensus(params *dagconfig.Params, tc testapi.TestConsensus) (*externalapi.DomainTransaction, error) {
-
-	firstBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{params.GenesisHash}, nil, nil)
+func createChildTxWhenParentTxWasAddedByConsensus(consensusConfig *consensus.Config, tc testapi.TestConsensus) (*externalapi.DomainTransaction, error) {
+	firstBlockHash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, nil, nil)
 	if err != nil {
 		return nil, errors.Wrapf(err, "AddBlock: %v", err)
 	}
diff --git a/stability-tests/common/mine/mine.go b/stability-tests/common/mine/mine.go
index 513274ec..98ba54af 100644
--- a/stability-tests/common/mine/mine.go
+++ b/stability-tests/common/mine/mine.go
@@ -12,23 +12,22 @@ import (
 	"github.com/kaspanet/kaspad/domain/consensus/model/testapi"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
 	"github.com/kaspanet/kaspad/domain/consensus/utils/mining"
-	"github.com/kaspanet/kaspad/domain/dagconfig"
 	"github.com/kaspanet/kaspad/stability-tests/common/rpc"
 	"github.com/pkg/errors"
 )
 
 // FromFile mines all blocks as described by `jsonFile`
-func FromFile(jsonFile string, dagParams *dagconfig.Params, rpcClient *rpc.Client, dataDir string) error {
+func FromFile(jsonFile string, consensusConfig *consensus.Config, rpcClient *rpc.Client, dataDir string) error {
 	log.Infof("Mining blocks from JSON file %s from data directory %s", jsonFile, dataDir)
 	blockChan, err := readBlocks(jsonFile)
 	if err != nil {
 		return err
 	}
 
-	return mineBlocks(dagParams, rpcClient, blockChan, dataDir)
+	return mineBlocks(consensusConfig, rpcClient, blockChan, dataDir)
 }
 
-func mineBlocks(dagParams *dagconfig.Params, rpcClient *rpc.Client, blockChan <-chan JSONBlock, dataDir string) error {
+func mineBlocks(consensusConfig *consensus.Config, rpcClient *rpc.Client, blockChan <-chan JSONBlock, dataDir string) error {
 	mdb, err := newMiningDB(dataDir)
 	if err != nil {
 		return err
@@ -37,7 +36,7 @@ func mineBlocks(dagParams *dagconfig.Params, rpcClient *rpc.Client, blockChan <-
 	dbPath := filepath.Join(dataDir, "db")
 	factory := consensus.NewFactory()
 	factory.SetTestDataDir(dbPath)
-	testConsensus, tearDownFunc, err := factory.NewTestConsensus(dagParams, false, "minejson")
+	testConsensus, tearDownFunc, err := factory.NewTestConsensus(consensusConfig, "minejson")
 	if err != nil {
 		return err
 	}
@@ -50,7 +49,7 @@ func mineBlocks(dagParams *dagconfig.Params, rpcClient *rpc.Client, blockChan <-
 
 	log.Infof("Starting with data directory with %d headers and %d blocks", info.HeaderCount, info.BlockCount)
 
-	err = mdb.putID("0", dagParams.GenesisHash)
+	err = mdb.putID("0", consensusConfig.GenesisHash)
 	if err != nil {
 		return err
 	}
diff --git a/stability-tests/minejson/main.go b/stability-tests/minejson/main.go
index 5566d28b..dd71e3fd 100644
--- a/stability-tests/minejson/main.go
+++ b/stability-tests/minejson/main.go
@@ -1,6 +1,7 @@
 package main
 
 import (
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"github.com/kaspanet/kaspad/stability-tests/common"
 	"github.com/kaspanet/kaspad/stability-tests/common/mine"
 	"github.com/kaspanet/kaspad/stability-tests/common/rpc"
@@ -33,7 +34,9 @@ func main() {
 		panic(err)
 	}
 
-	err = mine.FromFile(cfg.DAGFile, cfg.NetParams(), rpcClient, dataDir)
+	consensusConfig := consensus.Config{Params: *cfg.NetParams()}
+
+	err = mine.FromFile(cfg.DAGFile, &consensusConfig, rpcClient, dataDir)
 	if err != nil {
 		panic(errors.Wrap(err, "error in mine.FromFile"))
 	}
diff --git a/stability-tests/netsync/node.go b/stability-tests/netsync/node.go
index 61efd571..c271247a 100644
--- a/stability-tests/netsync/node.go
+++ b/stability-tests/netsync/node.go
@@ -2,6 +2,7 @@ package main
 
 import (
 	"fmt"
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"os/exec"
 	"strings"
 	"sync/atomic"
@@ -151,7 +152,7 @@ func setupSyncer() (*rpc.Client, func(), error) {
 		return nil, nil, err
 	}
 
-	err = mine.FromFile(cfg.DAGFile, activeConfig().NetParams(), rpcClient, miningDataDir)
+	err = mine.FromFile(cfg.DAGFile, &consensus.Config{Params: *activeConfig().NetParams()}, rpcClient, miningDataDir)
 	if err != nil {
 		return nil, nil, errors.Wrap(err, "error in mine.FromFile")
 	}
diff --git a/stability-tests/orphans/prepare_blocks.go b/stability-tests/orphans/prepare_blocks.go
index f4b059be..1a340646 100644
--- a/stability-tests/orphans/prepare_blocks.go
+++ b/stability-tests/orphans/prepare_blocks.go
@@ -24,7 +24,7 @@ func prepareBlocks() (blocks []*externalapi.DomainBlock, topBlock *externalapi.D
 	}
 	defer db.Close()
 
-	testConsensus, tearDownFunc, err := consensus.NewFactory().NewTestConsensus(config.ActiveNetParams, false, "prepareBlocks")
+	testConsensus, tearDownFunc, err := consensus.NewFactory().NewTestConsensus(&consensus.Config{Params: *config.ActiveNetParams}, "prepareBlocks")
 	if err != nil {
 		return nil, nil, err
 	}
diff --git a/stability-tests/reorg/reorg.go b/stability-tests/reorg/reorg.go
index a0e0e8fc..3f1fbbdf 100644
--- a/stability-tests/reorg/reorg.go
+++ b/stability-tests/reorg/reorg.go
@@ -17,11 +17,11 @@ import (
 )
 
 func testReorg(cfg *configFlags) {
-	params := dagconfig.DevnetParams
-	params.SkipProofOfWork = true
+	consensusConfig := consensus.Config{Params: dagconfig.DevnetParams}
+	consensusConfig.SkipProofOfWork = true
 
 	factory := consensus.NewFactory()
-	tc, teardown, err := factory.NewTestConsensus(&params, false, "ReorgHonest")
+	tc, teardown, err := factory.NewTestConsensus(&consensusConfig, "ReorgHonest")
 	if err != nil {
 		panic(err)
 	}
@@ -44,7 +44,7 @@ func testReorg(cfg *configFlags) {
 		panic(err)
 	}
 
-	tcAttacker, teardownAttacker, err := factory.NewTestConsensus(&params, false, "ReorgAttacker")
+	tcAttacker, teardownAttacker, err := factory.NewTestConsensus(&consensusConfig, "ReorgAttacker")
 	if err != nil {
 		panic(err)
 	}
diff --git a/util/difficulty/difficulty_test.go b/util/difficulty/difficulty_test.go
index ed563b80..157e2820 100644
--- a/util/difficulty/difficulty_test.go
+++ b/util/difficulty/difficulty_test.go
@@ -2,6 +2,7 @@ package difficulty_test
 
 import (
 	"fmt"
+	"github.com/kaspanet/kaspad/domain/consensus"
 	"math"
 	"math/big"
 	"testing"
@@ -18,11 +19,11 @@ func TestGetHashrateString(t *testing.T) {
 		dagconfig.DevnetParams.Name:  "131.07 KH/s",
 		dagconfig.SimnetParams.Name:  "2.00 KH/s",
 	}
-	testutils.ForAllNets(t, false, func(t *testing.T, params *dagconfig.Params) {
-		targetGenesis := difficulty.CompactToBig(params.GenesisBlock.Header.Bits())
-		hashrate := difficulty.GetHashrateString(targetGenesis, params.TargetTimePerBlock)
-		if hashrate != results[params.Name] {
-			t.Errorf("Expected %s, found %s", results[params.Name], hashrate)
+	testutils.ForAllNets(t, false, func(t *testing.T, consensusConfig *consensus.Config) {
+		targetGenesis := difficulty.CompactToBig(consensusConfig.GenesisBlock.Header.Bits())
+		hashrate := difficulty.GetHashrateString(targetGenesis, consensusConfig.TargetTimePerBlock)
+		if hashrate != results[consensusConfig.Name] {
+			t.Errorf("Expected %s, found %s", results[consensusConfig.Name], hashrate)
 		}
 	})
 }