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

Phase 1 rebase #1504

Merged
merged 118 commits into from
Jan 23, 2020
Merged

Phase 1 rebase #1504

merged 118 commits into from
Jan 23, 2020

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Dec 5, 2019

Rebase and replace #1483

-------- original comment from previous PR ------------

This PR continues the work of @vbuterin and #1427 contributors, rebases it to the latest branch dev branch (with v0.9.1 changes too), and refactors it for integration into the pyspec:

  • Split proposal into:
    • "The Beacon Chain for Shards"
    • Shard transition / Fraud proof doc. (The WIP part)
  • The old "misc beacon chain" and "shard data chain" docs are moved to specs/old. Some of it may still be relevant. To be removed from the spec once the last details are integrated well in the new docs.
    • Permanently remove old docs
  • Start pruning/updating the outdated parts of the custody game doc
    • From conversation with Vitalik:
      • Remove challenge records and responses, the game can be more simple and immediate now
      • "I provide a preimage of some root along with proof that you signed it, and your subkey, and on-chain the entire custody function gets executed; if the bit doesn't match you get slashed and I get a reward"
    • the record creation and response processing needs to be merged
      • And I'm probably missing part of the new picture still, this is not my domain. More discussion helper. implemented custody revamp with the (simplified/faster) custody slashings 🎉
  • WIP: refactor spec builder:
    • Phase 0 and phase 1 are namespaced as modules Same as previous
    • Phase 1 copies phase 0 functions, and overrides everything with the same name
    • Phase 1 type definitions overrule the phase 0 definitions. However, they inherit the phase0 types to make the new types compatible with the previous phase0 functions. Override with spec-builder. Imports from more modules result in import-loops and inheritance issues. Not to mention config reload problems.
      • WIP: make pyspec SSZ correctly pick up that the super-type (phase 0) field annotations should be ignored in favor of the sub-type (phase 1) fields See above
    • Change config system to load presets immediately before container declarations. Reload spec module to apply config changes. No code-gen re-init containers anymore.
      • test new approach
  • update configs with all the new constants.

djrtwo and others added 29 commits December 5, 2019 13:29
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
@protolambda
Copy link
Collaborator

Python 3.8 use in the spec now works thanks to the deposit contract PR.

So CI passes, and re-introduces phase1 spec 🎉.

Note that it's not perfect yet, and likely has some bugs left. It's experimental code after all.
Regardless, I am happy that we can finally surface this work into dev. From here we can iterate on the design, and make use of the performance and usability improvements that happened in parallel.

Copy link
Collaborator

@protolambda protolambda left a comment

Choose a reason for hiding this comment

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

LGTM 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants