Esempio n. 1
0
 def test_node_5_consistency_3(self, sandbox, session):
     node_id = 5
     restart(sandbox, node_id)
     expected_level = session['head_level']
     # last allowed fork level of the head
     expected_checkpoint = (expected_level -
                            PRESERVED_CYCLES * BLOCKS_PER_CYCLE)
     head = sandbox.client(node_id).get_head()
     max_op_ttl = head['metadata']['max_operations_ttl']
     expected_savepoint = expected_checkpoint - (RETAINED_CYCLES *
                                                 BLOCKS_PER_CYCLE)
     expected_caboose = max(expected_checkpoint - max_op_ttl, 0)
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.rolling_node_blocks_availability(
         node_id,
         sandbox,
         expected_savepoint,
         expected_caboose,
         expected_level,
     )
Esempio n. 2
0
 def test_node_5_consistency_2(self, sandbox, session, legacy_stores):
     # pylint: disable=unused-argument
     node_id = 5
     restart(sandbox, node_id)
     expected_level = session['head_level']
     expected_checkpoint = expected_level - 2 * 8  # lafl(head)
     head = sandbox.client(node_id).get_head()
     max_op_ttl = head['metadata']['max_operations_ttl']
     expected_savepoint = expected_checkpoint - max_op_ttl
     expected_caboose = expected_savepoint
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.rolling_node_blocks_availability(
         node_id,
         sandbox,
         expected_savepoint,
         expected_caboose,
         expected_level,
     )
Esempio n. 3
0
 def test_node_5_consistency_2(self, sandbox, session):
     node_id = 5
     restart(sandbox, node_id)
     expected_level = session['head_level']
     expected_checkpoint = expected_level - 2 * 8  # lafl(head)
     savepoint_when_imported = session['snapshot_level']
     expected_savepoint = savepoint_when_imported
     head = sandbox.client(node_id).get_head()
     max_op_ttl = head['metadata']['max_operations_ttl']
     expected_caboose = expected_checkpoint - max_op_ttl
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.rolling_node_blocks_availability(
         node_id,
         sandbox,
         expected_savepoint,
         expected_caboose,
         expected_level,
     )
Esempio n. 4
0
 def test_node_3_consistency_4(self, sandbox, session):
     node_id = 3
     restart(sandbox, node_id)
     expected_level = session['head_level']
     expected_checkpoint = expected_level
     expected_savepoint = expected_checkpoint
     expected_caboose = 0
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.full_node_blocks_availability(node_id, sandbox,
                                         expected_savepoint, expected_level)
Esempio n. 5
0
 def test_node_1_consistency_1(self, sandbox, session, legacy_stores):
     # pylint: disable=unused-argument
     node_id = 1
     restart(sandbox, node_id)
     expected_level = session['head_level']
     expected_checkpoint = expected_level
     expected_savepoint = expected_checkpoint
     expected_caboose = 0
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.full_node_blocks_availability(node_id, sandbox,
                                         expected_savepoint, expected_level)
Esempio n. 6
0
 def test_node_3_consistency_2(self, sandbox, session):
     node_id = 3
     restart(sandbox, node_id)
     expected_level = session['head_level']
     expected_checkpoint = expected_level - 2 * 8  # lafl(head)
     savepoint_when_imported = session['snapshot_level']
     expected_savepoint = savepoint_when_imported
     expected_caboose = 0
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.full_node_blocks_availability(
         node_id, sandbox, expected_savepoint, expected_level
     )
Esempio n. 7
0
 def test_node_3_consistency_3(self, sandbox, session):
     node_id = 3
     restart(sandbox, node_id)
     expected_level = session['head_level']
     expected_checkpoint = expected_level - 2 * 8  # lafl(head)
     head = sandbox.client(node_id).get_head()
     max_op_ttl = head['metadata']['max_operations_ttl']
     expected_savepoint = expected_checkpoint - max_op_ttl
     expected_caboose = 0
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.full_node_blocks_availability(
         node_id, sandbox, expected_savepoint, expected_level
     )
Esempio n. 8
0
 def test_node_3_consistency_3(self, sandbox, session):
     node_id = 3
     restart(sandbox, node_id)
     expected_level = session['head_level']
     # last allowed fork level of the head
     expected_checkpoint = (expected_level -
                            PRESERVED_CYCLES * BLOCKS_PER_CYCLE)
     expected_savepoint = expected_checkpoint - (RETAINED_CYCLES *
                                                 BLOCKS_PER_CYCLE)
     expected_caboose = 0
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.full_node_blocks_availability(node_id, sandbox,
                                         expected_savepoint, expected_level)
Esempio n. 9
0
 def test_node_1_consistency_2(self, sandbox, session):
     node_id = 1
     restart(sandbox, node_id)
     expected_level = session['head_level']
     # last allowed fork level of the head
     expected_checkpoint = (expected_level -
                            PRESERVED_CYCLES * BLOCKS_PER_CYCLE)
     savepoint_when_imported = session['snapshot_level']
     expected_savepoint = savepoint_when_imported
     expected_caboose = 0
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.full_node_blocks_availability(node_id, sandbox,
                                         expected_savepoint, expected_level)
Esempio n. 10
0
 def test_node_5_consistency_1(self, sandbox, session):
     node_id = 5
     restart(sandbox, node_id)
     expected_level = session['snapshot_level']
     expected_checkpoint = expected_level
     expected_savepoint = expected_checkpoint
     expected_caboose = 0
     utils.node_consistency_after_import(
         node_id,
         sandbox,
         expected_level,
         expected_checkpoint,
         expected_savepoint,
         expected_caboose,
     )
     utils.rolling_node_blocks_availability(
         node_id,
         sandbox,
         expected_savepoint,
         expected_caboose,
         expected_level,
     )