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

executor #2

Merged
merged 114 commits into from
Aug 6, 2024
Merged

executor #2

merged 114 commits into from
Aug 6, 2024

Conversation

sh-cha
Copy link
Collaborator

@sh-cha sh-cha commented Jul 25, 2024

Node

  • store its current progress
  • be able to register actions externally to execute specificfunctions
  • support tx, event, beginblock, endblock
  • broadcast tx from its own msg queue with registered key

Executor

  • has two nodes: Host, Child
  • each node atomically save actions and msgs happened within one block
  • fetch bridge info & start nodes with the data
  1. Host
  • handle InitiateDeposit msg event and broadcast finalize token deposit to Child
  • handle new 0th tx and submit UpdateOracle msg to Child
  1. Child
  • query chain output data & sync if it has no data or is behind compared to the recent block
  • manage a merkle tree and submit output every output submission interval * 2 / 3
  • handle InitiateWithdrawal and save it as leaf node to current working tree
  • support to query withdrawal and proof info

Merkle

  • does not sort leaves
  • there is no need to do this because each leaf node has a sequence.
  • does not have all the nodes in memory, but only the nodes that need to be currently used (one node per tree height)
  • support to query leaf node and its proofs

sh-cha added 30 commits July 4, 2024 16:38
@sh-cha sh-cha changed the title deposit & output & oracle executor Aug 6, 2024
executor/README.md Outdated Show resolved Hide resolved
Copy link
Member

@beer-1 beer-1 left a comment

Choose a reason for hiding this comment

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

LGTM

@sh-cha sh-cha merged commit 7046b55 into main Aug 6, 2024
3 checks passed
@sh-cha sh-cha deleted the feat/executor branch August 6, 2024 10:28
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