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

feature/delete_temp_siks_when_election_ends #1080

Merged
merged 15 commits into from
Sep 4, 2023

Commits on Sep 1, 2023

  1. support for create elections with tempSIKs flag, temp SIKs will be pu…

    …rged by the IST after results calculation
    lucasmenendez authored and p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    d132d57 View commit details
    Browse the repository at this point in the history
  2. changes on end2end tests: reverting almost all the tests to the previ…

    …ous API, splitting census proofs generation from siks proof generations. SIK related purges on election with tempSIKs moved to the top of the functions, trying to solve IST and State issue
    lucasmenendez authored and p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    1171fe9 View commit details
    Browse the repository at this point in the history
  3. add NoState test

    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    5b54de1 View commit details
    Browse the repository at this point in the history
  4. arbo: implement the Delete() method

    For the temporary SIK elections, we need Arbo
    to implement a Delete() mechanism.
    
    The current Delete method removes the key, leaf and
    also all the intermediary nodes that are not needed.
    
    Signed-off-by: p4u <[email protected]>
    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    58f5afe View commit details
    Browse the repository at this point in the history
  5. arbo: fix clean-up of empty nodes when going up

    Fix the upAfterDelete function and unify it with up().
    So now also Update and Add methods are removing empty nodes.
    
    Add a test to check the disk size after some operations.
    
    Signed-off-by: p4u <[email protected]>
    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    b850224 View commit details
    Browse the repository at this point in the history
  6. arbo test

    Signed-off-by: p4u <[email protected]>
    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    443384b View commit details
    Browse the repository at this point in the history
  7. metadb: add goleveldb implementation

    Having a second implementation of the db interface is useful
    for testing purposes. We can easily switch from pebble to leveldb
    in order to test something in a different storage layer.
    
    In addition add a Compact() method to the db interface.
    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    6d45964 View commit details
    Browse the repository at this point in the history
  8. arbo: fix the clean up of nodes after delete/update/add

    Remove all intermediate nodes from the database once
    they are not necessary anymore.
    
    Break up the code into smaller Go files.
    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    d0d27ed View commit details
    Browse the repository at this point in the history
  9. arbo: reorder neighbour nodes on delete

    When a leaf of the tree is removed, if the neighbour
    child is not empty, it should be moved to the upper level
    where there are no other leaves.
    
    Add tests to verify the operation.
    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    317f1bb View commit details
    Browse the repository at this point in the history
  10. arbo: add RootsFromLevel() method

    Since we do not hold old intermediate nodes anymore,
    SetRoot(), Snapshot(), Dump() and so on require to have
    an existing current intermediate node (or nil to use the
    current root). To this end we introduce a new method to
    facilitate retrieve the list of existing roots from a level.
    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    d7807bd View commit details
    Browse the repository at this point in the history
  11. run mod tidy

    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    1695f3d View commit details
    Browse the repository at this point in the history
  12. final fixes after arbo refactor

    The main issue was that on update, if the key and value are the same,
    the clean up routine for removing old intermediate nodes, was removing
    the current valid intermediate nodes up to the root.
    
    In addition adapt some tests to become compatible with the new impl.
    And remove some that are not longer valid.
    p4u committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    d2f2e60 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    bb970dd View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    960d9f3 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2023

  1. arbo: add a test and benchmark for comparing Add and AddBatch

    Ensure we produce the same root using both methods.
    
    Also update the dev genesis file.
    p4u committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    753fe1f View commit details
    Browse the repository at this point in the history