Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/functional/feature_dip4_coinbasemerkleroots.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def getmnlistdiff(self, baseBlockHash, blockHash):
class LLMQCoinbaseCommitmentsTest(DashTestFramework):
def set_test_params(self):
self.set_dash_test_params(4, 3, fast_dip3_enforcement=True)
self.set_dash_dip8_activation(200)

def run_test(self):
self.test_node = self.nodes[0].add_p2p_connection(TestP2PConn())
Expand Down Expand Up @@ -83,13 +82,18 @@ def run_test(self):

self.nodes[0].generate(1)
oldhash = self.nodes[0].getbestblockhash()
# Have to disable ChainLocks here because they won't let you to invalidate already locked blocks
self.nodes[0].spork("SPORK_19_CHAINLOCKS_ENABLED", 4070908800)
self.wait_for_sporks_same()
# Test DIP8 activation once with a pre-existing quorum and once without (we don't know in which order it will activate on mainnet)
self.test_dip8_quorum_merkle_root_activation(True)
for n in self.nodes:
n.invalidateblock(oldhash)
self.sync_all()
first_quorum = self.test_dip8_quorum_merkle_root_activation(False)

# Re-enable ChainLocks again
self.nodes[0].spork("SPORK_19_CHAINLOCKS_ENABLED", 0)
self.nodes[0].spork("SPORK_17_QUORUM_DKG_ENABLED", 0)
self.wait_for_sporks_same()

Expand Down
9 changes: 0 additions & 9 deletions test/functional/feature_llmq_chainlocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class LLMQChainLocksTest(DashTestFramework):
def set_test_params(self):
self.set_dash_test_params(4, 3, fast_dip3_enforcement=True)
self.set_dash_dip8_activation(10)

def run_test(self):

Expand All @@ -43,9 +42,6 @@ def run_test(self):
for i in range(4):
self.mine_quorum()

self.nodes[0].spork("SPORK_19_CHAINLOCKS_ENABLED", 0)
self.wait_for_sporks_same()

self.log.info("Mine single block, wait for chainlock")
self.nodes[0].generate(1)
self.wait_for_chainlocked_block_all_nodes(self.nodes[0].getbestblockhash())
Expand Down Expand Up @@ -106,11 +102,6 @@ def run_test(self):
self.wait_for_chainlocked_block(self.nodes[0], self.nodes[1].getbestblockhash())
assert(self.nodes[0].getbestblockhash() == self.nodes[1].getbestblockhash())

self.log.info("Enable LLMQ bases InstantSend, which also enables checks for \"safe\" transactions")
self.nodes[0].spork("SPORK_2_INSTANTSEND_ENABLED", 0)
self.nodes[0].spork("SPORK_3_INSTANTSEND_BLOCK_FILTERING", 0)
self.wait_for_sporks_same()

self.log.info("Isolate a node and let it create some transactions which won't get IS locked")
isolate_node(self.nodes[0])
txs = []
Expand Down
1 change: 0 additions & 1 deletion test/functional/feature_llmq_dkgerrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
class LLMQDKGErrors(DashTestFramework):
def set_test_params(self):
self.set_dash_test_params(4, 3, [["-whitelist=127.0.0.1"]] * 4, fast_dip3_enforcement=True)
self.set_dash_dip8_activation(10)

def run_test(self):

Expand Down
4 changes: 0 additions & 4 deletions test/functional/feature_llmq_is_cl_conflicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def on_getdata(self, message):
class LLMQ_IS_CL_Conflicts(DashTestFramework):
def set_test_params(self):
self.set_dash_test_params(4, 3, fast_dip3_enforcement=True)
self.set_dash_dip8_activation(10)
#disable_mocktime()

def run_test(self):
Expand All @@ -62,9 +61,6 @@ def run_test(self):
self.nodes[0].p2p.wait_for_verack()

self.nodes[0].spork("SPORK_17_QUORUM_DKG_ENABLED", 0)
self.nodes[0].spork("SPORK_19_CHAINLOCKS_ENABLED", 0)
self.nodes[0].spork("SPORK_2_INSTANTSEND_ENABLED", 0)
self.nodes[0].spork("SPORK_3_INSTANTSEND_BLOCK_FILTERING", 0)
self.wait_for_sporks_same()

self.mine_quorum()
Expand Down
4 changes: 0 additions & 4 deletions test/functional/feature_llmq_is_retroactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,13 @@ def set_test_params(self):
# -whitelist is needed to avoid the trickling logic on node0
self.set_dash_test_params(6, 5, [["-whitelist=127.0.0.1"], [], [], [], ["-minrelaytxfee=0.001"], ["-minrelaytxfee=0.001"]], fast_dip3_enforcement=True)
self.set_dash_llmq_test_params(5, 3)
self.set_dash_dip8_activation(10)

def run_test(self):
while self.nodes[0].getblockchaininfo()["bip9_softforks"]["dip0008"]["status"] != "active":
self.nodes[0].generate(10)
self.sync_blocks(self.nodes, timeout=60*5)

self.nodes[0].spork("SPORK_17_QUORUM_DKG_ENABLED", 0)
self.nodes[0].spork("SPORK_19_CHAINLOCKS_ENABLED", 0)
self.nodes[0].spork("SPORK_2_INSTANTSEND_ENABLED", 0)
self.nodes[0].spork("SPORK_3_INSTANTSEND_BLOCK_FILTERING", 0)
self.wait_for_sporks_same()

self.mine_quorum()
Expand Down
2 changes: 2 additions & 0 deletions test/functional/feature_llmq_simplepose.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def repair_masternodes(self, restart):
addr = self.nodes[0].getnewaddress()
self.nodes[0].sendtoaddress(addr, 0.1)
self.nodes[0].protx('update_service', mn.proTxHash, '127.0.0.1:%d' % p2p_port(mn.node.index), mn.keyOperator, "", addr)
# Make sure this tx "safe" to mine even when InstantSend and ChainLocks are no longer functional
self.bump_mocktime(60 * 10 + 1)
self.nodes[0].generate(1)
assert(not self.check_banned(mn))

Expand Down
3 changes: 0 additions & 3 deletions test/functional/interface_zmq_dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def set_test_params(self):
node0_extra_args.append("-whitelist=127.0.0.1")

self.set_dash_test_params(4, 3, fast_dip3_enforcement=True, extra_args=[node0_extra_args, [], [], []])
self.set_dash_dip8_activation(10)

def run_test(self):
# Check that dashd has been built with ZMQ enabled.
Expand All @@ -65,9 +64,7 @@ def run_test(self):
while self.nodes[0].getblockchaininfo()["bip9_softforks"]["dip0008"]["status"] != "active":
self.nodes[0].generate(10)
self.sync_blocks()
self.nodes[0].spork("SPORK_2_INSTANTSEND_ENABLED", 0)
self.nodes[0].spork("SPORK_17_QUORUM_DKG_ENABLED", 0)
self.nodes[0].spork("SPORK_19_CHAINLOCKS_ENABLED", 0)
self.wait_for_sporks_same()
# Create an LLMQ for testing
self.quorum_type = 100 # llmq_test
Expand Down
4 changes: 0 additions & 4 deletions test/functional/p2p_instantsend.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ def run_test(self):
self.wait_for_sporks_same()
self.mine_quorum()

self.nodes[0].spork("SPORK_2_INSTANTSEND_ENABLED", 0)
self.nodes[0].spork("SPORK_3_INSTANTSEND_BLOCK_FILTERING", 0)
self.wait_for_sporks_same()

self.test_mempool_doublespend()
self.test_block_doublespend()

Expand Down
8 changes: 8 additions & 0 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,9 @@ def set_dash_test_params(self, num_nodes, masterodes_count, extra_args=None, fas
for i in range(0, num_nodes):
self.extra_args[i].append("-dip3params=30:50")

# make sure to activate dip8 after prepare_masternodes has finished its job already
self.set_dash_dip8_activation(200)

# LLMQ default test params (no need to pass -llmqtestparams)
self.llmq_size = 3
self.llmq_threshold = 2
Expand Down Expand Up @@ -696,6 +699,11 @@ def setup_network(self):
self.nodes[0].generate(1)
# sync nodes
self.sync_all()
# Enable InstantSend (including block filtering) and ChainLocks by default
self.nodes[0].spork("SPORK_2_INSTANTSEND_ENABLED", 0)
self.nodes[0].spork("SPORK_3_INSTANTSEND_BLOCK_FILTERING", 0)
self.nodes[0].spork("SPORK_19_CHAINLOCKS_ENABLED", 0)
self.wait_for_sporks_same()
self.bump_mocktime(1)

mn_info = self.nodes[0].masternodelist("status")
Expand Down