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

Bridge: Randomized Backfill Strategy (for history) #1135

Open
pipermerriam opened this issue Feb 1, 2024 · 0 comments
Open

Bridge: Randomized Backfill Strategy (for history) #1135

pipermerriam opened this issue Feb 1, 2024 · 0 comments

Comments

@pipermerriam
Copy link
Member

What is wrong

When running the bridge, in a federated environment where there are many bridges running we want the following properties.

  • new HEAD data is fetched and injected by default
  • holes in history are found and filled

At present, the second item: "holes in history are found and filled" isn't good enough. The current implementation is designed to backfill a specific section from history (which is functionality that we currently need), however, that functionality doesn't do a good job of finding random missing data.

How can it be fixed

There should be a dedicated process that "randomly" looks for missing data in the history of the chain. The simplest approach is to generate a random block number between genesis and HEAD and then check for whether that block can be found in the network. If it is missing the bridge should inject it.

There are potentially more clever approaches to doing this that we should explore over time, but the initial implementation should be simple.

Future Plans

In theory, in an environment where we have many bridges operating simultaneously, we could have the bridge prioritize certain sections of historical data so that we get emergent coordination among the bridge nodes to more reliably check. An example of such an approach would be for each node to prioritize checking data that is close to their node-id. With a sufficiently sized pool of bridge nodes, this would reduce duplicate checks and allow for nodes to focus on more thoroughly checking a certain block number range.

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

1 participant