From a1413b20019235a6e4c1e33b79b990a52f8a51a9 Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Mon, 14 Oct 2024 06:05:11 -0700 Subject: [PATCH] Revert fix in db_migration.py --- pytest/tests/sanity/db_migration.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pytest/tests/sanity/db_migration.py b/pytest/tests/sanity/db_migration.py index 645d6b6821c..47a6d5dfaf2 100644 --- a/pytest/tests/sanity/db_migration.py +++ b/pytest/tests/sanity/db_migration.py @@ -20,22 +20,10 @@ NUM_SHARDS = 4 EPOCH_LENGTH = 5 -# Used while the node is running with the old binary. -LARGE_GC_NUM_EPOCHS_TO_KEEP = 15 -# Used while the node is running with the new binary. -DEFAULT_GC_NUM_EPOCHS_TO_KEEP = 5 # Config to track all shards. node_config = { "tracked_shards": list(range(NUM_SHARDS)), - # We should have large enough GC window while the node running with the old binary (2.0), because we need to - # bootstrap the congestion info from the genesis block and the genesis block should not be garbage collected. - # The new binary (2.1) has a mechanism to save the congestion info on disk to be resilient against GC of - # genesis block, however the old binary does not have this mechanism, thus we need to prevent GC to kick in - # before the node transitions to the new binary. Note that, after restarting the node with the new binary - # we can switch back to the usual GC window (see below). - # TODO(#11902): This change for GC can be removed when the old binary version becomes 2.1 in this test. - "gc_num_epochs_to_keep": LARGE_GC_NUM_EPOCHS_TO_KEEP, } @@ -129,9 +117,6 @@ def main(): send_some_tx(node) unstake_and_stake(nodes[1], node) - height, _ = utils.wait_for_blocks(node, count=1) - assert height < EPOCH_LENGTH * LARGE_GC_NUM_EPOCHS_TO_KEEP, "Node should run without GC" - node.kill() logging.info( @@ -141,7 +126,6 @@ def main(): logging.info("Starting the current node...") node.near_root = executables.current.root node.binary_name = executables.current.neard - node.change_config({"gc_num_epochs_to_keep": DEFAULT_GC_NUM_EPOCHS_TO_KEEP}) node.start(boot_node=node) logging.info("Running the current node...")