updated soft fork to 2300000 (#10170)

This commit is contained in:
wjblanke 2022-02-09 18:02:06 -08:00 committed by GitHub
parent 6315cb4a4b
commit 419f88f296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View File

@ -54,7 +54,7 @@ testnet_kwargs = {
"MAX_GENERATOR_SIZE": 1000000,
"MAX_GENERATOR_REF_LIST_SIZE": 512, # Number of references allowed in the block generator ref list
"POOL_SUB_SLOT_ITERS": 37600000000, # iters limit * NUM_SPS
"SOFT_FORK_HEIGHT": 2000000,
"SOFT_FORK_HEIGHT": 2300000,
}

View File

@ -35,7 +35,7 @@ def db_version(request):
return request.param
@pytest.fixture(scope="function", params=[1000000, 2000000])
@pytest.fixture(scope="function", params=[1000000, 2300000])
def softfork_height(request):
return request.param

View File

@ -1796,10 +1796,10 @@ class TestGeneratorConditions:
[
(True, 0, -1, Err.GENERATOR_RUNTIME_ERROR.value),
(False, 1000000, -1, None),
(False, 2000000, -1, Err.GENERATOR_RUNTIME_ERROR.value),
(False, 2300000, -1, Err.GENERATOR_RUNTIME_ERROR.value),
(True, 0, 1, None),
(False, 1000000, 1, None),
(False, 2000000, 1, None),
(False, 2300000, 1, None),
],
)
def test_div(self, mempool, height, operand, expected):
@ -2034,7 +2034,7 @@ class TestGeneratorConditions:
[
(True, None),
(False, 1000000),
(False, 2000000),
(False, 2300000),
],
)
def test_unknown_condition(self, mempool, height):
@ -2180,7 +2180,7 @@ class TestMaliciousGenerators:
start_time = time()
npc_result = generator_condition_tester(condition, quote=False, height=softfork_height)
run_time = time() - start_time
if softfork_height >= 2000000:
if softfork_height >= 2300000:
assert npc_result.error == error_for_condition(opcode)
else:
assert npc_result.error is None
@ -2208,7 +2208,7 @@ class TestMaliciousGenerators:
start_time = time()
npc_result = generator_condition_tester(condition, quote=False, height=softfork_height)
run_time = time() - start_time
if softfork_height >= 2000000:
if softfork_height >= 2300000:
assert npc_result.error == error_for_condition(opcode)
else:
assert npc_result.error is None
@ -2236,7 +2236,7 @@ class TestMaliciousGenerators:
start_time = time()
npc_result = generator_condition_tester(condition, quote=False, height=softfork_height)
run_time = time() - start_time
if softfork_height >= 2000000:
if softfork_height >= 2300000:
assert npc_result.error == error_for_condition(opcode)
else:
assert npc_result.error is None
@ -2266,7 +2266,7 @@ class TestMaliciousGenerators:
start_time = time()
npc_result = generator_condition_tester(condition, quote=False, height=softfork_height)
run_time = time() - start_time
if softfork_height >= 2000000:
if softfork_height >= 2300000:
assert npc_result.error == error_for_condition(opcode)
else:
assert npc_result.error is None
@ -2303,7 +2303,7 @@ class TestMaliciousGenerators:
start_time = time()
npc_result = generator_condition_tester(condition, quote=False, height=softfork_height)
run_time = time() - start_time
if softfork_height >= 2000000:
if softfork_height >= 2300000:
assert npc_result.error == error_for_condition(opcode)
else:
assert npc_result.error is None

View File

@ -246,7 +246,7 @@ class TestCostCalculation:
# raise the max cost to make sure this passes
# ensure we pass if the program does not exceeds the cost
npc_result = get_name_puzzle_conditions(
generator, 20000000, cost_per_byte=0, mempool_mode=False, height=softfork_height
generator, 23000000, cost_per_byte=0, mempool_mode=False, height=softfork_height
)
assert npc_result.error is None