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

Domain client refactoring #2087

Merged
merged 4 commits into from
Oct 12, 2023
Merged

Domain client refactoring #2087

merged 4 commits into from
Oct 12, 2023

Conversation

NingLin-P
Copy link
Member

This PR brings some refactoring to the domain client, including changes of:

  • Do not process the consensus chain leaves on the operator node setup
    • This was introduced so long time ago but is not needed anymore because the domain client is fork-aware, these leaves will be processed properly when their descendant block is imported
  • Handling consensus block import and new slot one by one sequentially
    • In main, they are handled concurrently, if the consensus block processing is not finished (the ER is not generated) and there is a new slot hence bundle produced, the bundle will submitted along with a stale ER and cause the whole bundle to be rejected (especially when Enforce the bundles contain ER that pointing to the last domain block or extend the head receipt #1731 is implemented), so it is more rational to wait consensus block processing finish before handle new slot
    • Another way to achieve the goal is to use async Mutex to block the slot handler when there is consensus block under processing, which will bring more complexity with little performance improve
  • Add testing infra support to have a way to know when all of the operator's previous tasks are finished, this will fix the domain test in Fix inherents race condition #1974

Code contributor checklist:

It is okay to not process the consensus chain leaves on setup because the operator client
are fork-aware, these leaves will be processed when their descendants block is imported

Signed-off-by: linning <[email protected]>
…ducing bundle

The consensus block processing and new slot are handled one by one, so the block
processing (include the receipt generation) must completely finished when producing
bundle

Signed-off-by: linning <[email protected]>
This stream is used to confirm acknowledgement of all of the operator's previous tasks
so we can know exactly whether the operator have finish processing block/producing bundle

Signed-off-by: linning <[email protected]>
@NingLin-P NingLin-P added this pull request to the merge queue Oct 12, 2023
Merged via the queue into main with commit 95d9aa0 Oct 12, 2023
@NingLin-P NingLin-P deleted the domain-client-refactor branch October 12, 2023 12:44
@NingLin-P NingLin-P mentioned this pull request Oct 13, 2023
1 task
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