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

Implement a chain rebroadcast mechanism independent of GPBFT #814

Closed
Tracked by #792
masih opened this issue Jan 7, 2025 · 4 comments · Fixed by #840
Closed
Tracked by #792

Implement a chain rebroadcast mechanism independent of GPBFT #814

masih opened this issue Jan 7, 2025 · 4 comments · Fixed by #840
Assignees

Comments

@masih
Copy link
Member

masih commented Jan 7, 2025

As part of #792 the propagation of EC Chain is separated into its own pubsub topic, managed via chainexchange. Initially, the broadcast of chain and its reboradcast is coupled to GPBFT broadcast/re-boradcast: Whenever GPBFT broadcasts a message we broadcast its chain and so on. But we can do better, because: all chain subsets can be inferred from the longest broadcasted chain (i.e. the QUALITY proposal), and depending on the progress it may not be necessary to rebroadcast the chain.

Ideally, the system should have control over the chain broadcast intensity. Separate out the heuristic of chain broadcast from GPBFT.

Ideas:

  • Only broadcast a chain a fixed number of times.
  • Introduce an incrementing sequence number in messages to work around gossipsub deduplication.
  • For safety rebroadcast subsets of the QUALITY chain relative to progress?
    • Or just stick with always broadcasting the QUALITY proposal. Because from it we can infer all the sub chains that could be stemmed from it during an instance, and it is simpler to implement/maintain.
@github-project-automation github-project-automation bot moved this to Todo in F3 Jan 7, 2025
@masih masih self-assigned this Jan 7, 2025
@BigLep BigLep added this to the M2: Mainnet Passive Testing milestone Jan 8, 2025
@BigLep BigLep moved this from Todo to In progress in F3 Jan 9, 2025
@masih
Copy link
Member Author

masih commented Jan 16, 2025

Discussed with @Kubuxu at Standup:

The chain rebroadcast heuristic:

  • Broadcast chains periodically for the lifetime of a GPBFT instance.
  • The broadcast message includes a timestamp rounded to some minimum acceptable interval. This is to:
    1. Work around the pubsub deduplication.
    2. Protect against an adversarial model of swaying the network with spam about a particular chain early on/ too soon (compared to using plain monotonically increasing sequence numbers).
  • The broadcasted chain is initially the QUALITY proposal for at least n number of times.
  • The broadcasted chain then may change to whatever proposal the instance is swayed.
  • The time interval for rebroadcast of QUALITY proposal and swayed chain is independently configurable via manifest to give us room for experimentation during passive testing.

@Stebalien can I get a quick sanity check on this please whenever you get a chance?

Thanks

@Stebalien
Copy link
Member

The broadcast message includes a timestamp rounded to some minimum acceptable interval. This is to:

We can also use a separate topic with separate message ID rules in this case. But a timestamp is probably acceptable?

I'm not sure how this relates to adversaries.

The broadcasted chain then may change to whatever proposal the instance is swayed.

I'd handle more than swaying here. E.g., we need to consider anything we try to commit to.

@masih
Copy link
Member Author

masih commented Jan 20, 2025

Thanks Steven, the topic for publishing chain is already separated with its own id function.

@Stebalien
Copy link
Member

Stebalien commented Jan 20, 2025

Hm. Yeah, I guess that doesn't help because there's no way to specify different timed-cache timeouts on different topics...

masih added a commit that referenced this issue Jan 21, 2025
Based on a configured rebroadcast interval periodically rebroadcast the
longest chain currently being progressed by GPBFT.

Extend the chain exchange broadcast message to include a timestamp
rounded down to the rebroadcast interval as a way to work around
gossipsub deduplication. This is to help gain better message
propagation.

The rebroadcast interval is reset as soon as the first message with a
larger instance is observed, signaling the start of the next instance.
This helps synchronize the chain rebroadcast intervals relative to the
GPBFT instance start.

Fixes #814
@masih masih moved this from In progress to In review in F3 Jan 21, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 23, 2025
Based on a configured rebroadcast interval periodically rebroadcast the
longest chain currently being progressed by GPBFT.

Extend the chain exchange broadcast message to include a timestamp
rounded down to the rebroadcast interval as a way to work around
gossipsub deduplication. This is to help gain better message
propagation.

The rebroadcast interval is reset as soon as the first message with a
larger instance is observed, signaling the start of the next instance.
This helps synchronize the chain rebroadcast intervals relative to the
GPBFT instance start.

Fixes #814
@github-project-automation github-project-automation bot moved this from In review to Done in F3 Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants