Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IF: Test: Transition to instant-finality with multiple producers #2224

Merged
merged 8 commits into from
Feb 8, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented Feb 8, 2024

  • Adds integration test that verifies transition to instant-finality works with multiple producers producing before transition
  • Adds integration test for setprods after transition to instant-finality
  • Fix issue found with setprods to activate new proposer policy at correct block (the first block of the producer)

Resolves #1512

@heifner heifner added the OCI Work exclusive to OCI team label Feb 8, 2024
setFinStr = f'{{"finalizer_policy": {{'
setFinStr += f' "threshold": {threshold}, '
setFinStr += f' "finalizers": ['
finNum = 1
for n in launcher.network.nodes.values():
if n.index == Node.biosNodeId and not biosFinalizer:
for n in (self.nodes + [self.biosNode]):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this for loop be combined with the one above? They are in similar shape.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, need to have threshold calculated first.

@@ -1457,6 +1461,30 @@ def cleanup(self):
os.remove(f)

# Create accounts, if account does not already exist, and validates that the last transaction is received on root node
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be moved down. Add a new comment about setProds if needed.

Print(f'producing nodes: {pnodes}, topology: {topo}, delay between nodes launch: {delay} second{"s" if delay != 1 else ""}')

Print("Stand up cluster")
if args.plugin:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we ever test with extra plugins? If so, add the plugins to the test command in CMakeLists.txt.

@@ -1044,6 +1045,7 @@ def activateInstantFinality(self, launcher, biosFinalizer, pnodes):
if not self.biosNode.waitForTransFinalization(transId, timeout=21*12*3):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is the host function sent to the biosNode first even if biosFinalizer is false?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Doesn't matter which node you look for the transaction on. Maybe we should rename this python method now. It has been there for a long time. It means is the transaction in a LIB block.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change the name now as a part of the big changes for IF.

@heifner heifner merged commit 8440aea into hotstuff_integration Feb 8, 2024
26 checks passed
@heifner heifner deleted the GH-1512-if-transition-test branch February 8, 2024 15:38
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: TEST
summary: Integration test that verifies transition to instant-finality works with multiple producers.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants