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

Proof (Invariant): <totalIssuance> being the sum of balances in the state #55

Open
ehildenb opened this issue Nov 20, 2019 · 1 comment

Comments

@ehildenb
Copy link
Member

After #54, let's write a simple high-level property of the set-balance.md module which proves the invariant that the <totalIssuance> remains the sum of the balances in the account storage.

@ehildenb
Copy link
Member Author

ehildenb commented Nov 20, 2019

    rule 
      <set-balance> 
        <k> ANY_ACTION:EntryAction => . ... </k> 
        <now> _ => _ </now> 
        <events> _ => _ </events> 
        <return-value> _ => _ </return-value> 
        <call-stack> _ => _ </call-stack> 
        <existentialDeposit> _ </existentialDeposit> 
        <creationFee> _ </creationFee> 
        <transferFee> _ </transferFee> 
        <totalIssuance> TOTAL_ISSUANCE => TOTAL_ISSUANCE' </totalIssuance> 
        <accountList> ACCOUNT_LIST => ACCOUNT_LIST' </accountList>
        <accounts> ACCOUNTS => ACCOUNTS' </accounts>
      </set-balance> 
      requires accountsValid(ACCOUNT_LIST, ACCOUNTS)
       andBool accountsValid(ACCOUNT_LIST', ACCOUNTS')
       andBool sumBalances(ACCOUNT_LIST) ==Int TOTAL_ISSUANCE
       andBool sumBalances(ACCOUNT_LIST') ==Int TOTAL_ISSUANCE'

@ehildenb ehildenb changed the title Simple property about <totalIssuance> being the sum of balances in the state Proof (Invariant): <totalIssuance> being the sum of balances in the state Nov 21, 2019
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