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

[move framework][move-prover] Some specs from LIP-6, refactoring of initialization in Genesis #5997

Merged
merged 1 commit into from
Sep 19, 2020

Commits on Sep 19, 2020

  1. [breaking][move framework][move-prover] Add LIP-6 specs, refactor Gen…

    …esis a bit.
    
    Potential breaking change:
    
    I'm actually not sure if this is a breaking change.  I changed the
    order of some initialization functions in Genesis.move and it turns
    out the event handle generator has a counter that is incremented for
    each new event handle, and that this becomes part of the guid for the
    event handle. The resulting serialized string appears as *-event-key
    in the json records in json-rpc.  I don't know whether clients depend
    on the counter values in the guids (it would better to use some other
    means to identify event streams, if one exists). If clients do depend
    on these, they might see the names event-keys change when genesis is
    rebuilt.  For example, "received_events_key":
    "0000000000000000000000000000000000000000000000dd", might become
    "received_events_key":
    "0300000000000000000000000000000000000000000000dd",
    
    General comments on changes:
    
    Changes to a bunch of .move files related to LibraAccount and LibraSystem.
    
    Added specification that every account has a role in LibraAccount.
    Refactored Genesis and LibraAccount some to make this easier to prove,
    and to clean up initialization.  Specifically, roles for libra root
    and treasury compliance were added in Genesis separately from the
    account creation functions.  So, I moved role creation into the
    account creation functions. Genesis was also creating the libra root
    and treasury compliance accounts directly, so I moved those into
    LibraAccount::initialize, which simplifies the Genesis code and
    eliminates some dependencies.
    
    In various places, I renamed accounts to reflect their roles, if
    known.  I also added some assertion checks in SlidingNonce, which was
    getting errors from unchecked aborts. A fair number of files were
    touched for this purpose.
    
    I experimented in couple of places with cross references.
    
    Closes: diem#5997
    DavidLDill authored and bors-libra committed Sep 19, 2020
    Configuration menu
    Copy the full SHA
    837052e View commit details
    Browse the repository at this point in the history