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

ISS detector not getting all signatures #18114

Open
lpetrovic05 opened this issue Feb 28, 2025 · 0 comments
Open

ISS detector not getting all signatures #18114

lpetrovic05 opened this issue Feb 28, 2025 · 0 comments
Assignees

Comments

@lpetrovic05
Copy link
Contributor

lpetrovic05 commented Feb 28, 2025

Problem

With multiple rounds per block (2 seconds of consensus time), we've found that the DefaultIssDetector will not process StateSignatureTransaction's for non-boundary rounds, so ISS's are essentially not detected. We will need to change something for this in the PlatformWiring or the DefaultIssDetector. For now we are going to change release/0.60 and main back to 1 round per block (through changing BlockStreamConfig::blockPeriod to 0, falls back to roundsPerBlock).For more context:The key issue is in the PlatformWiring.java file where the wiring is set up:\

  1. The transactionHandlerStateAndRoundOutput is created with a filter that only passes StateAndRound objects with a non-null reservedSignedState:

    final OutputWire transactionHandlerStateAndRoundOutput = transactionHandlerWiring
    .getOutputWire()
    .buildFilter("notNullStateFilter", "state and round", ras -> ras.reservedSignedState() != null)
    .buildAdvancedTransformer(new StateAndRoundReserver("postHandler_stateAndRoundReserver"));

  2. This filtered output is then passed through the StateHasher and eventually to the IssDetector:

hashedStateAndRoundOutputWire.solderTo(issDetectorWiring.getInputWire(IssDetector::handleStateAndRound));

  1. The DefaultIssDetector.handleStateAndRound() method processes the system transactions from the StateAndRound object:

    issNotifications.addAll(handlePostconsensusSignatures(stateAndRound.systemTransactions()));

The problem is that only StateAndRound objects with a non-null reservedSignedState (which are only created for boundary rounds or freeze rounds) are passed to the IssDetector.This means:\

  1. System transactions in non-boundary rounds are not directly passed to the IssDetector through the handleStateAndRound method.\
  2. The IssDetector only sees system transactions from boundary rounds.This will lead to missed ISS detections if a boundary round doesn't contain the system transactions (StateSignatureTransaction) for an ISS round. Which will be almost always given a longer block period.

Proposed Solution

Change the output of the TransactionHandler to be RoutableData with two types of data: StateAndRound as it provides today, and Queue<ScopedSystemTransaction<StateSignatureTransaction>>. If the output is a StateAndRound object, it will be routed exactly as it is today. If it is a queue of signature transactions, it will be routed straight to the IssDetector. Thus, all signature transactions will be routed to the IssDetector either via the StateAndRound record or the queue.

@poulok poulok self-assigned this Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants