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

Add check to AppendEntries #3

Open
dricketts opened this issue Aug 5, 2016 · 1 comment
Open

Add check to AppendEntries #3

dricketts opened this issue Aug 5, 2016 · 1 comment

Comments

@dricketts
Copy link

I don't think there's a correctness issue with AppendEntries, but I think there's a simple way to make verification (by proof) easier. In particular, it would be useful to add a check to this line to test if prevLogIndex <= Len(log[i]). I believe that this check is unnecessary, but verifying this adds substantial complexity to the type invariant for the system. Is there any downside to adding the check?

@ongardie
Copy link
Owner

ongardie commented Aug 9, 2016

I suspect this isn't the only change you'll want to make verification easier. Want to just accumulate them locally or in a fork for now?

As to this particular change, I'd expect to see the invariant 1 <= nextIndex[i][*] <= Len(log[i]) + 1 somewhere. I don't think you'll be able to avoid that, right? Perhaps other parts of the spec don't do enough to enforce that (the spec might well be buggy).

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