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

feat: add heartbeat to eth-forwarder so last-seen block heights stay … #11411

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

wwestgarth
Copy link
Contributor

@wwestgarth wwestgarth commented Jun 26, 2024

closes #11334

The Ethereum event forwarder will now send out a "heartbeat" chain event if no event-logs are seen on a contract for over an hour (configurable). This is so that the "last-seen" block saved into the snapshot remains relatively up to date so that after a protocol upgrade fewer block-spans need to be rechecked.

Other changes worth noting:

  • All of the per-contract last seen block heights are saved in "tracker" engine in the evtforward package, instead of being dotted around each individual engine that processes a chain event.
  • Its this engine which verifies the heartbeats
  • I've added a block-time field to the EthereumConfig network parameter, like we have in the EVMConfig parameter, so core is aware of the expected block duration on Ethereum.

@wwestgarth wwestgarth force-pushed the 11334-forwarder-heartbeat branch 5 times, most recently from e817e7e to 8e364da Compare June 26, 2024 11:58
@wwestgarth wwestgarth marked this pull request as ready for review June 26, 2024 11:58
@wwestgarth wwestgarth requested review from candida-d and a team as code owners June 26, 2024 11:58
@wwestgarth wwestgarth force-pushed the 11334-forwarder-heartbeat branch 3 times, most recently from 05a3091 to aa251fc Compare June 27, 2024 10:23
candida-d
candida-d previously approved these changes Jun 27, 2024
@jeremyletang jeremyletang merged commit 553d904 into develop Jul 2, 2024
16 checks passed
@jeremyletang jeremyletang deleted the 11334-forwarder-heartbeat branch July 2, 2024 12:36
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.

[Feature]: Add a "heartbeat" for bridge contract chain events
3 participants