Skip to content

feat!: Use log id from event for interop root indexing#835

Open
Artemka374 wants to merge 43 commits intomainfrom
afo/use-interop-log-id
Open

feat!: Use log id from event for interop root indexing#835
Artemka374 wants to merge 43 commits intomainfrom
afo/use-interop-log-id

Conversation

@Artemka374
Copy link
Contributor

@Artemka374 Artemka374 commented Jan 28, 2026

Summary

Rework interop watcher persistence to work with log id instead of event indexes in block.
All the places where InteropRootLogIndex was used was made to work with explicit id of event instead of event index.

Breaking changes

Replay record format was changed - remove old value for root indexes and added new value for root id.
Therefore, latest replay record version was changed

Rollout instructions

ENs should be upgraded before main node

@github-actions
Copy link

github-actions bot commented Jan 28, 2026

Test results

186 tests   185 ✅  21m 29s ⏱️
 27 suites    0 💤
  1 files      1 ❌

For more details on these failures, see this check.

Results for commit 4e4893a.

♻️ This comment has been updated with latest results.

@Artemka374 Artemka374 changed the title feat[WIP]: use log id from event for interop root indexing feat: [WIP]use log id from event for interop root indexing Jan 28, 2026
@Artemka374 Artemka374 changed the base branch from main to afo/accumulated-interop-txs January 29, 2026 09:47
## Summary

This PR fixes possible issue when interop transaction come too often
leaving no space for regular ones by adding a
`next_interop_tx_allowed_after` value to `InteropTxStream`. This way we
allow new interop transactions(blocks) to come 3 times less often than
regular blocks
@Artemka374 Artemka374 changed the base branch from afo/accumulated-interop-txs to afo/separated-interop-tx-pool-storage February 2, 2026 12:52
@Artemka374 Artemka374 marked this pull request as ready for review February 2, 2026 13:02
Base automatically changed from afo/separated-interop-tx-pool-storage to main February 3, 2026 10:27
@Artemka374 Artemka374 changed the title feat: [WIP]use log id from event for interop root indexing feat: Use log id from event for interop root indexing Feb 4, 2026
@Artemka374 Artemka374 changed the title feat: Use log id from event for interop root indexing feat!: Use log id from event for interop root indexing Feb 4, 2026
itegulov
itegulov previously approved these changes Feb 5, 2026
Copy link
Collaborator

@itegulov itegulov left a comment

Choose a reason for hiding this comment

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

LGTM, just a bunch of nits

blockOrBatchNumber: tx.batchNumber,
sides: vec![tx.chainRoot],
blockOrBatchNumber: tx.blockNumber,
sides: tx.sides.clone(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: why clone here?

BlockReplayColumnFamily::BlockOutputHash,
BlockReplayColumnFamily::ForcePreimages,
BlockReplayColumnFamily::StartingInteropEventIndex,
BlockReplayColumnFamily::StartingInteropRootId,
Copy link
Collaborator

Choose a reason for hiding this comment

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

So side effect of this is we'll have garbage orphan data under old "starting_interop_event_index" CF, correct? That seems acceptable if so

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, kinda like that

}
}

impl From<ReplayWireFormatV4> for ReplayRecord {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Off-topic: ok, I think we need to get rid of v1-v5 formats at this point. Work for a separate PR ofc

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

Successfully merging this pull request may close these issues.

2 participants