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

Question : what's the purpose of witness proof in catch up process ? #124

Closed
DreamWuGit opened this issue Sep 4, 2018 · 1 comment
Closed

Comments

@DreamWuGit
Copy link

Hi, Tony & other contributors

  • I started reading byteball code about one month ago , I know that one fresh client need to do catch up to pull old data from peers and each wallet may have different witness list . at the beginning of catch up, wallet need to send its witness list and last know mci to destination peer, then the peer got it and start to calculate the 'last_ball_mci' and 'last_ball_unit ' which is designed to indicate where the catch up ends.

  • What I confused is why the 'last_ball_mci' depends on clients' witnesses since the catch up data were historical and old. what happen if there is no enough units associated with passed witnesses ?
    will the catch up request be rejected ? why ?

    I am new to byteball ,appreciate for your explanation ! @tonyofbyteball @kakysha

@tonyofbyteball
Copy link
Member

Indeed, the list of witnesses can change completely over a long time, but it is not an issue.

The client sends his witness list (or rather just the list of any 12 addresses he trusts, not necessarily the same as his witnesses, but the current implementation sends the list of his witnesses) and the peer builds a "witness proof" based on the recent units posted by the 12 trusted addresses. The proof just proofs one of the recent stable units. From this unit, the peer builds a chain by following last_ball_unit links, the chain goes back up to the latest point that the client knows. Witnesses are not required to build and validate this chain, the chain is composed just of links to last_ball_unit.

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

2 participants