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

core: init sketch for pluggable consensus #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

whilei
Copy link
Owner

@whilei whilei commented Nov 19, 2018

Implements example of running arbitrary code as a configurabe
validation demand. Protocol for header validator proc currently has
three arguments:
1: current header JSON (stringified)
2: parent header JSON (stringified)
3: isUncle bool (stringified)

And should return 0 if passed validation OK, or 1.. (exit err)
if not.


This PR for high-level discussion and review only.

@whilei whilei force-pushed the feat/pluggable-consensus-01 branch 4 times, most recently from f0f5323 to fa3a5fb Compare November 20, 2018 13:02
Implements example of running arbitrary code as a configurabe
validation demand. Protocol for header validator proc currently has
three arguments:
1: current header JSON (stringified)
2: parent header JSON (stringified)
3: isUncle bool (stringified)

And should return 0 if passed validation OK, or 1.. (exit err)
if not.

cmd/orb-verify: sketch example of arbitrary headerValidatorProc

cmd/orb-verify,core: simply verifier and add os stdout/err

core: use local env path for orb-verifier test

fix: header and parent args backwards

cmd/orb-verify: implement another basic validation example

problem: deveoper had to do extra build steps for testing

headerValidateProc test w/ orb-verify example

solution: add orb-verify build commands to test

problem@core: tests broke b/c handling nil error as nonnil

problem: test fails on windows

solve: use really ilegible path parsing to be generalized
core: implement orb-verify as optional golang plugin lib

fix: orb-verify binary should not exist in project root
solution: don't windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant