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

Implement ordered maps for smart contracts #405

Merged
merged 38 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8f2016b
Add quick in-memory version of state-btree
limemloh Feb 15, 2024
3779ada
Move Btree nodes and values into the contract state
limemloh Feb 20, 2024
5e9d818
Btree: use keys instead of value ID
limemloh Feb 20, 2024
25d5673
BTree: add more docs and use maybeuninit for node keys
limemloh Feb 22, 2024
54c5714
Implement remove and fix a few insert bugs
limemloh Feb 27, 2024
39b0a7d
Reuse already loaded nodes when deleting, fixing some issues aswell
limemloh Feb 28, 2024
2ef3354
Reduce the number of state lookups when deleting
limemloh Feb 29, 2024
692a51d
Implement `iter` and `clear`
limemloh Mar 1, 2024
461c6f0
Improve documentation of statebtreemap
limemloh Mar 1, 2024
7b676dd
Document StateBTreeMap and StateBTreeSet + add few more methods
limemloh Mar 1, 2024
78352b0
Fix clippy feedback
limemloh Mar 4, 2024
c9ae82b
Update changelog
limemloh Mar 4, 2024
cb19bea
StateBTreeSet::remove now avoids searching ahead for replacement key
limemloh Mar 5, 2024
50dd73b
Address review comments
limemloh Mar 6, 2024
4427511
Address some more review comments
limemloh Mar 8, 2024
1365d24
Restructure StateBTreeSet/Map into a separate module
limemloh Mar 11, 2024
33e731b
Fix related to empty root after removal, dublicate keys after split
limemloh Mar 12, 2024
fa9c07f
Introduce unit-tests using quickcheck for the btree
limemloh Mar 12, 2024
e0cb873
Introduce concordium-std feature 'internal-wasm-test'
limemloh Mar 12, 2024
04460a7
Fix clippy and doc complaints
limemloh Mar 12, 2024
01783cf
Fix no_std issues in state_btree
limemloh Mar 12, 2024
b69be0c
Remove type parameter S from StateBTreeMap and StateBTreeSet
limemloh Mar 13, 2024
99b461b
Add quickcheck tests for iter, higher and lower
limemloh Mar 14, 2024
4a91934
Add unit tests for eq_or_lower and eq_or_higher
limemloh Mar 14, 2024
c73d37f
Add must_use and warning for insert on StateMap
limemloh Mar 14, 2024
fd57aee
Add quickcheck test for clearing btree, checking state
limemloh Mar 14, 2024
166687b
Update btree documentation related to benchmarks and update rust sdk
limemloh Mar 21, 2024
54cb24a
Merge remote-tracking branch 'origin/main' into state-btree-map
limemloh Mar 21, 2024
29de383
Add guide for choosing the right collection (#409)
limemloh Mar 22, 2024
b4f08f8
Update rust version and fix clippy
limemloh Mar 22, 2024
aeaae93
Fix warnings
limemloh Mar 22, 2024
c20981a
Address review comments
limemloh Mar 25, 2024
5e7fdce
Update rust-sdk
limemloh Mar 25, 2024
3a9b1c6
Update rust version in contract-testing CI
limemloh Mar 25, 2024
e3b3d6f
Address yet another round of comments
limemloh Mar 25, 2024
d59719a
Merge remote-tracking branch 'origin/main' into state-btree-map
limemloh Mar 26, 2024
1702ccf
Address review comments
limemloh Mar 27, 2024
66a283e
Address last round of comments
limemloh Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions concordium-std/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
via the `HasHost::contract_module_reference` and `HasHost::contract_name` functions.
These are only available from protocol version 7, and as such are guarded by the
`p7` feature flag.
- Add two ordered collections: `StateBTreeMap` and `StateBTreeSet`. These are based on [B-Tree](https://en.wikipedia.org/wiki/B-tree), but where each node is stored in the low-level smart contract key-value store.
limemloh marked this conversation as resolved.
Show resolved Hide resolved

## concordium-std 10.0.0 (2024-02-22)

Expand Down
2 changes: 1 addition & 1 deletion concordium-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ bump_alloc = []
p7 = []

[lib]
crate-type = ["rlib"]
crate-type = ["cdylib", "rlib"]
limemloh marked this conversation as resolved.
Show resolved Hide resolved

[profile.release]
# Tell `rustc` to optimize for small code size.
Expand Down
Loading
Loading