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

Mariari/v3 storage #95

Merged
merged 8 commits into from
Jan 5, 2024
Merged

Mariari/v3 storage #95

merged 8 commits into from
Jan 5, 2024

Conversation

mariari
Copy link
Member

@mariari mariari commented Dec 21, 2023

No description provided.

@mariari mariari marked this pull request as draft December 21, 2023 10:01
@mariari mariari added V3 Topology ordering Consensus, Execution, Mempool labels Dec 21, 2023
@mariari mariari force-pushed the mariari/v3-storage branch 4 times, most recently from c24bc6a to 97bfb52 Compare December 22, 2023 06:26
@mariari mariari marked this pull request as ready for review December 22, 2023 06:27
@mariari mariari mentioned this pull request Dec 22, 2023
@mariari mariari force-pushed the mariari/v3-storage branch 4 times, most recently from 9b6818e to efa59fc Compare December 26, 2023 05:10
This serves as the basis for what a real order would expect the format
to be.

Making this an explicit type makes it easy to refactor the intenral
representation without having to go and change every instance of it
We remove all known warnings, this makes it nice as `mix test` and
other commands will not spit any wanrings anymore
This ensures that the db is initialized before we run any tests. This
matters in a lot of topics that require the DB to be online
This module consists of two parts:
1. An ordering map which tells of the latest order in the
   qualification map
2. A qualification map which maps from a qualified key to the stored
   value

Further we provide types for everything so the code can be somewhat
grocked by looking at the types
We test:

1. reads
2. blocking_reads
3. puts
4. blocking_reads with data not in yet
The intended strategy is to hold a current order and cache of ids to
orders, to better get timestamps of the keyspace

This is highly inefficient but is the best we can do without
partitioning the key_space explicitly somehow
As we can see by running:

mix test --cover

we end up testing most of the module, with just a few basic calls, the
ordering system is quite simple, and one can just take a number to
figure out where they are next in line

Percentage | Module
-----------|--------------------------
    60.00% | Anoma.Node.Storage
    92.86% | Anoma.Node.Storage.Communicator
    96.43% | Anoma.Node.Storage.Ordering
@mariari mariari force-pushed the mariari/v3-storage branch from e6a91ea to 6e3b7cc Compare January 1, 2024 10:00
@juped juped merged commit ab03274 into base Jan 5, 2024
2 checks passed
@mariari mariari deleted the mariari/v3-storage branch July 20, 2024 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ordering Consensus, Execution, Mempool
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants