Skip to content

Commit

Permalink
switch to instant finality at launch
Browse files Browse the repository at this point in the history
  • Loading branch information
taokayan committed Aug 27, 2024
1 parent 08028af commit 41dc888
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/nodeos_eos_evm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def toDict(dictToParse):
extraNodeosArgs="--contracts-console --resource-monitor-not-shutdown-on-threshold-exceeded"

Print("Stand up cluster")
if cluster.launch(pnodes=pnodes, totalNodes=total_nodes, extraNodeosArgs=extraNodeosArgs, specificExtraNodeosArgs=specificExtraNodeosArgs,loadSystemContract=False,delay=5) is False:
if cluster.launch(pnodes=pnodes, totalNodes=total_nodes, extraNodeosArgs=extraNodeosArgs, specificExtraNodeosArgs=specificExtraNodeosArgs,loadSystemContract=False,activateIF=True,delay=5) is False:
errorExit("Failed to stand up eos cluster.")

Print ("Wait for Cluster stabilization")
Expand All @@ -284,6 +284,10 @@ def toDict(dictToParse):
errorExit("Cluster never stabilized")
Print ("Cluster stabilized")

Utils.Print("make sure instant finality is switched")
info = cluster.biosNode.getInfo(exitOnError=True)
assert (info["head_block_num"] - info["last_irreversible_block_num"]) < 9, "Instant finality enabled LIB diff should be small"

prodNode = cluster.getNode(0)
nonProdNode = cluster.getNode(1)

Expand Down Expand Up @@ -1120,13 +1124,6 @@ def get_block(num):
Utils.Print(" Found ERROR in EOS EVM RPC log: ", line)
foundErr = True

Utils.Print("Switching to Savanna")
cluster.activateInstantFinality()

info = cluster.biosNode.getInfo(exitOnError=True)
assert (info["head_block_num"] - info["last_irreversible_block_num"]) < 9, "Instant finality enabled LIB diff should be small"


# --------------------------------------------
# EVM -> EOS
# 0x9E126C57330FA71556628e0aabd6B6B6783d99fA private key: 0xba8c9ff38e4179748925335a9891b969214b37dc3723a1754b8b849d3eea9ac0
Expand Down

0 comments on commit 41dc888

Please sign in to comment.