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

Use consistent notification for the Yes fork and the No fork #247

Open
edmundedgar opened this issue Mar 2, 2024 · 1 comment
Open

Use consistent notification for the Yes fork and the No fork #247

edmundedgar opened this issue Mar 2, 2024 · 1 comment

Comments

@edmundedgar
Copy link
Contributor

Clean up the inconsistency in naming with appropriate enums/constants to make sure we're clear which fork stands for "yes" and which for "no".

@edmundedgar
Copy link
Contributor Author

edmundedgar commented Mar 8, 2024

Something like:

  • Rename NewInstances.AddressPair's .one .two to .yesFork .noFork
  • Define constants yesAnswer => bytes32(1) noAnswer => bytes32(0) for reality.eth answers
  • Rename internal vars like child1, child2 to yesChild, noChild
  • Leave children in ForkableStructure alone with indexes (don't bother making constants like yesChildIndex->0, noChildIndex->1) but rename internal variables child0, child1 to yesChild, noChild
  • Leave forkResult which has 3 values (0 for not forked over a question, 1 for yesChild, 2 for noChild alone but rename internal child1 etc variables
  • Everything on the L2 side is a reality.eth-style bytes32, but L2ChainInfo consumes forkResult as a uint8 then translates it. Make the forkQuestionResult internal mapping private, make getForkQuestionResult translate to a bytes32 and revert if no answer, and add an external isForkQuestionResultAvailable which returns true if there's an answer

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

1 participant