You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ A demonstration of a gas-efficient key-value store implementation using Red-Blac
4
4
5
5
## Overview
6
6
7
-
This project implements a Red-Black Tree based key-value store (`RedBlockTreeKV`) that stores complex value structures efficiently. The implementation is particularly beneficial for use cases involving frequent insertions and deletions, as it reuses storage slots and minimizes gas consumption.
7
+
This project implements a Red-Black Tree based key-value store (`RedBlackTreeKV`) that stores complex value structures efficiently. The implementation is particularly beneficial for use cases involving frequent insertions and deletions, as it reuses storage slots and minimizes gas consumption.
8
8
9
9
The Red-Black Tree implementation is based on [Solady's RedBlackTreeLib](https://github.com/vectorized/solady/blob/main/src/utils/RedBlackTreeLib.sol). In this example, we modified the `remove` function to prevent deleting storage when removing nodes, enabling storage slot reuse for subsequent insertions.
10
10
@@ -38,15 +38,15 @@ The Red-Black Tree implementation shows **90% gas reduction** for hot insertions
38
38
39
39
```
40
40
src/
41
-
├── RedBlockTreeKV.sol # Main KV store implementation
41
+
├── RedBlackTreeKV.sol # Main KV store implementation
42
42
├── MappingKV.sol # Traditional mapping implementation for comparison
43
43
└── lib/
44
44
├── RedBlackTreeLib.sol # Red-Black Tree data structure library
45
45
└── Value.sol # Value struct definition
46
46
47
47
test/
48
-
├── RedBlockTreeKV.t.sol # Comprehensive unit tests
49
-
└── RedBlockTreeKVGas.t.sol # Gas benchmark tests
48
+
├── RedBlackTreeKV.t.sol # Comprehensive unit tests
0 commit comments