Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
6261968
feat: initial implementation of ffi iterator
AminR443 Jul 29, 2025
071a5eb
feat: better go interface for iterator, edge case fixes
AminR443 Jul 30, 2025
28bc2a8
style: cargo fmt
AminR443 Jul 30, 2025
9d1ef4b
Merge branch 'main' into amin/ffi-iterator
AminR443 Jul 30, 2025
23f7e6d
fix: tiny issues after merge
AminR443 Jul 30, 2025
3295568
fix: test clippy error, better test case
AminR443 Jul 30, 2025
4029d20
feat: better iterator abstraction in ffi, iter_on_root
AminR443 Aug 1, 2025
96acf50
chore: only include firewood crate changes to make pr smaller
AminR443 Aug 4, 2025
0be5eb0
fix: apply suggestions, add docs, add tests
AminR443 Aug 4, 2025
316f9a3
Merge branch 'main' into amin/ffi-iterator-base
AminR443 Aug 4, 2025
338a4c9
fix: stuff from merge, style
AminR443 Aug 4, 2025
4d08b12
fix: format variable for clippy
AminR443 Aug 4, 2025
3ea4f7f
feat: better abstraction, deduplication in DbViewSyncBytes
AminR443 Aug 4, 2025
7cfa1cf
test: add tests for iterate, fix tiny issues
AminR443 Aug 5, 2025
8ec3991
ci: trigger tests
AminR443 Aug 5, 2025
40671f1
Merge branch 'main' into amin/ffi-iterator-base
AminR443 Aug 5, 2025
bde139e
test: add fuzz test for iterate
AminR443 Aug 6, 2025
b1546f2
Merge branch 'main' into amin/ffi-iterator-base
AminR443 Aug 6, 2025
3f76257
wip: new iterator
AminR443 Aug 12, 2025
74ff74b
feat: merkle_ref for supporting arc in merklenodestream
AminR443 Aug 13, 2025
236a710
merge: needed new parts from ffi-iterator-base
AminR443 Aug 13, 2025
b1586d7
fix: missed stuff, fmt
AminR443 Aug 13, 2025
bce4d7d
feat: all ffi methods initial impl
AminR443 Aug 13, 2025
4c8a2bb
feat: go ffi, tidy rust ffi and use borrowed
AminR443 Aug 13, 2025
10c9551
chore: remove go side for now
AminR443 Aug 14, 2025
a42aae2
feat: iter_on_proposal, code cleanup
AminR443 Aug 14, 2025
b17113e
todo: key value note
AminR443 Aug 14, 2025
7440a5f
feat(async-removal): Phase 1 - lint on `clippy::unused_async`
demosdemon Aug 14, 2025
84ff6ce
feat(async-removal): Phase 2 - make `Proposal` trait sync
demosdemon Aug 14, 2025
6d05477
feat(async-removal): Phase 3 - make `Db` trait sync
demosdemon Aug 14, 2025
cc95f6d
Merge branch 'main' into brandon.leblanc/remove-async-p2
demosdemon Aug 14, 2025
83a3c77
Merge branch 'brandon.leblanc/remove-async-p2' into brandon.leblanc/r…
demosdemon Aug 14, 2025
16fe8be
Merge branch 'main' into amin/ffi-iterator-new
AminR443 Aug 14, 2025
a47843b
Merge branch 'main' into brandon.leblanc/remove-async-p2
demosdemon Aug 18, 2025
e7540bf
Merge branch 'brandon.leblanc/remove-async-p2' into brandon.leblanc/r…
demosdemon Aug 18, 2025
d0d8b2b
Merge branch 'main' into brandon.leblanc/remove-async-p2
demosdemon Aug 19, 2025
f6ca77a
Merge branch 'brandon.leblanc/remove-async-p2' into brandon.leblanc/r…
demosdemon Aug 19, 2025
dd3f3cf
Merge branch 'main' into brandon.leblanc/remove-async-p3
demosdemon Aug 19, 2025
ce44145
Merge branch 'main' into amin/ffi-iterator-new
AminR443 Aug 20, 2025
c1452a3
refactor: better types
AminR443 Aug 20, 2025
eeee17e
Merge branch 'main' into brandon.leblanc/remove-async-p3
demosdemon Aug 20, 2025
f07184e
feat(async-removal): Phase 4 - Make `DbView` synchronous
demosdemon Aug 20, 2025
4d8db9d
missed some
demosdemon Aug 20, 2025
28dc159
fix metrics
demosdemon Aug 20, 2025
e330a0b
fix benchmark again
demosdemon Aug 20, 2025
89c0d9b
make tokio/prometheus optional
demosdemon Aug 20, 2025
43227dc
add grpc-testtool back (even though it's broken)
demosdemon Aug 20, 2025
2e387c2
replace DbViewSyncBytes with ArcDynDbView
demosdemon Aug 20, 2025
64ce27a
comment typo
demosdemon Aug 20, 2025
ae15477
cleanup
demosdemon Aug 20, 2025
56ab74e
remove commented code
demosdemon Aug 20, 2025
87bd241
more cleanup
demosdemon Aug 20, 2025
b1d847a
fix root ethhash
demosdemon Aug 20, 2025
bf766d1
Merge remote-tracking branch 'origin/main' into brandon.leblanc/remov…
demosdemon Aug 20, 2025
c30c847
lifetime label consistency
demosdemon Aug 20, 2025
d27fd65
extension trait
demosdemon Aug 20, 2025
628668d
Merge branch 'main' into brandon.leblanc/remove-async-p4
demosdemon Aug 20, 2025
79815d1
remove needless impls
demosdemon Aug 21, 2025
ad310a2
nit-picky change
demosdemon Aug 21, 2025
468291b
move try_extend into its own module and add test
demosdemon Aug 21, 2025
7b2279f
update test
demosdemon Aug 21, 2025
94d6dec
collapse trait bounds
demosdemon Aug 21, 2025
d034c8a
wip: merge remote-tracking branch 'origin/brandon.leblanc/remove-asyn…
AminR443 Aug 22, 2025
3a0ae2d
feat: OwnedIterView and use new sync api
AminR443 Aug 22, 2025
7dee974
feat(ffi-refactor): replace sequence id with pointer to proposals (8/8)
demosdemon Aug 22, 2025
a5ba724
Merge branch 'amin/ffi-iterator-sync' into amin/ffi-iterator-new
AminR443 Aug 23, 2025
5949620
Merge branch 'main' into amin/ffi-iterator-new
AminR443 Aug 23, 2025
1ee07d9
fix: merge errors
AminR443 Aug 23, 2025
546ffc8
Merge remote-tracking branch 'origin/brandon.leblanc/ffi-refactor' in…
AminR443 Aug 23, 2025
d80c022
feat: iterator with new ffi structure
AminR443 Aug 25, 2025
3f06f81
chore: remove irrelevant comments
AminR443 Aug 25, 2025
8020a02
fix: cargo fmt
AminR443 Aug 25, 2025
247fcad
feat: add docs, cleanup
AminR443 Aug 25, 2025
c8b88e1
fmt: .
AminR443 Aug 25, 2025
53fb5f4
Merge branch 'main' into brandon.leblanc/ffi-refactor
demosdemon Aug 27, 2025
7efdf98
Merge branch 'main' into brandon.leblanc/ffi-refactor
demosdemon Aug 27, 2025
1a2a37e
review: apply pr comments
AminR443 Sep 4, 2025
f50427d
feat: better iter interface for views, clean code, better docs
AminR443 Sep 5, 2025
b828883
fix: doc ref
AminR443 Sep 5, 2025
9071f19
Merge remote-tracking branch 'origin/main' into brandon.leblanc/ffi-r…
demosdemon Sep 5, 2025
483538f
use something adding in merge
demosdemon Sep 5, 2025
d8ebb92
Merge remote-tracking branch 'origin/main' into brandon.leblanc/ffi-r…
demosdemon Sep 5, 2025
87515fc
errant change from resolving merge conflicts
demosdemon Sep 5, 2025
6b1e3af
start moving things out of memory.go
demosdemon Sep 5, 2025
8171ef7
fix doc error
demosdemon Sep 5, 2025
fcac3a8
Merge remote-tracking branch 'origin/brandon.leblanc/ffi-refactor' in…
AminR443 Sep 8, 2025
d3e2ac7
Merge branch 'main' into brandon.leblanc/ffi-refactor
demosdemon Sep 8, 2025
c04104b
feat!: rename `Hashable::key`
demosdemon Sep 9, 2025
6792c2f
put back the filtered child_hashes
demosdemon Sep 9, 2025
1d1c29a
comments
demosdemon Sep 9, 2025
1705b44
correct comments on the trait
demosdemon Sep 9, 2025
acf3e94
feat(proofs)!: add v0 serialization for RangeProofs
demosdemon Sep 10, 2025
eb9e4ec
go fmt
demosdemon Sep 10, 2025
febb68e
update err to match on both ethhash and not
demosdemon Sep 10, 2025
49f9366
ensure partial range proofs generate and serialize
demosdemon Sep 10, 2025
ec8ee02
Merge branch 'main' into brandon.leblanc/ffi-refactor
demosdemon Sep 10, 2025
c3e0da7
feedback updates
demosdemon Sep 10, 2025
9cc3c53
golint
demosdemon Sep 10, 2025
7802d5e
update documentation
demosdemon Sep 10, 2025
40c33cc
make ChildrenMap generic
demosdemon Sep 10, 2025
3629d76
fix docs
demosdemon Sep 10, 2025
ccc5f1c
Merge branch 'brandon.leblanc/hashable-trait-methods' into brandon.le…
demosdemon Sep 10, 2025
d182370
Merge branch 'brandon.leblanc/serialized-range-proofs' into brandon.l…
demosdemon Sep 10, 2025
7aaa681
more tests and document the DOS
demosdemon Sep 10, 2025
6b33cf2
simplify tests
demosdemon Sep 10, 2025
31648d7
consistency
demosdemon Sep 10, 2025
e84ae42
rewrite reader to be easier to read
demosdemon Sep 10, 2025
60b54ae
finish moving things around
demosdemon Sep 10, 2025
f0375c4
fix docs
demosdemon Sep 10, 2025
72a444d
hide ProofType too
demosdemon Sep 10, 2025
4ed5534
Merge branch 'brandon.leblanc/serialized-range-proofs' into brandon.l…
demosdemon Sep 10, 2025
b46ca19
check that the keys drom the dropped proposal are not in the db
demosdemon Sep 10, 2025
7508405
Merge branch 'main' into brandon.leblanc/hashable-trait-methods
demosdemon Sep 15, 2025
21ba3b7
Merge branch 'brandon.leblanc/hashable-trait-methods' into brandon.le…
demosdemon Sep 15, 2025
3669d24
Merge branch 'brandon.leblanc/serialized-range-proofs' into brandon.l…
demosdemon Sep 15, 2025
5e7cca7
fix(range-proofs): serialize range proof key consistently
demosdemon Sep 15, 2025
6a6648d
Merge remote-tracking branch 'origin/main' into brandon.leblanc/seria…
demosdemon Sep 15, 2025
b818975
Merge remote-tracking branch 'origin/main' into brandon.leblanc/fix-l…
demosdemon Sep 15, 2025
7ab26ab
Merge branch 'main' into brandon.leblanc/serialized-range-proofs
demosdemon Sep 15, 2025
6348f89
fix(range-proofs): fix verify of exclusion proofs
demosdemon Sep 15, 2025
4a6a77d
Merge branch 'brandon.leblanc/fix-left-exclusion-proof' into brandon.…
demosdemon Sep 15, 2025
662daa3
Merge branch 'main' into brandon.leblanc/fix-left-exclusion-proof
demosdemon Sep 15, 2025
ff250bc
Merge branch 'brandon.leblanc/fix-left-exclusion-proof' into brandon.…
demosdemon Sep 15, 2025
e57666a
fix for ethhash
demosdemon Sep 15, 2025
e4f8ee8
Merge branch 'brandon.leblanc/fix-left-exclusion-proof' into brandon.…
demosdemon Sep 15, 2025
07bf0d1
Merge branch 'brandon.leblanc/serialized-range-proofs' into brandon.l…
demosdemon Sep 15, 2025
7580057
Merge remote-tracking branch 'origin/brandon.leblanc/fix-verify-exclu…
demosdemon Sep 16, 2025
228b463
Merge remote-tracking branch 'origin/main' into brandon.leblanc/ffi-r…
demosdemon Sep 16, 2025
ec865c8
Merge branch 'main' into brandon.leblanc/ffi-refactor
demosdemon Sep 16, 2025
5266c78
Merge branch 'main' into brandon.leblanc/ffi-refactor
demosdemon Sep 24, 2025
fcc07b8
Merge branch 'main' into brandon.leblanc/ffi-refactor
demosdemon Sep 26, 2025
29d4ccc
Merge commit 'fcc07b8ba5e0716e3d8892a275010e77daaebbe5' into amin/ffi…
AminR443 Oct 2, 2025
60eb9e7
Merge commit '8df1ccc1464f58839c732b57c6cd703e88137abc' into amin/ffi…
AminR443 Oct 2, 2025
340058d
Merge remote-tracking branch 'origin/main' into amin/ffi-iterator-p1
AminR443 Oct 2, 2025
f1177df
chore: cargo.lock update
AminR443 Oct 2, 2025
1d98216
Merge branch 'amin/ffi-revision' into amin/ffi-iterator-p1
AminR443 Oct 2, 2025
975fe4c
feat: integrate with revision handle
AminR443 Oct 2, 2025
96ce89d
docs: ..
AminR443 Oct 2, 2025
332fba7
Merge branch 'amin/ffi-revision' into amin/ffi-iterator-p1
AminR443 Oct 2, 2025
42ef414
fmt: ...
AminR443 Oct 2, 2025
193563f
review: apply Ron's suggestions
AminR443 Oct 2, 2025
ac53d8d
fix: docs
AminR443 Oct 3, 2025
bda609d
fmt: ...
AminR443 Oct 3, 2025
1902e23
Merge branch 'amin/ffi-revision' into amin/ffi-iterator-p1
AminR443 Oct 10, 2025
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 Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ chrono = "0.4.42"
oxhttp = "0.3.1"
# Optional dependencies
env_logger = { workspace = true, optional = true }
derive-where = "1.6.0"

[target.'cfg(unix)'.dependencies]
tikv-jemallocator = "0.6.0"
Expand Down
221 changes: 221 additions & 0 deletions ffi/firewood.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions ffi/src/iterator.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (C) 2025, Ava Labs, Inc. All rights reserved.
// See the file LICENSE.md for licensing terms.

use std::ops::{Deref, DerefMut};

use derive_where::derive_where;
use firewood::v2::api::BoxKeyValueIter;

/// An opaque wrapper around a [`BoxKeyValueIter`].
#[derive_where(Debug)]
#[derive_where(skip_inner)]
pub struct IteratorHandle<'view>(BoxKeyValueIter<'view>);

impl<'view> From<BoxKeyValueIter<'view>> for IteratorHandle<'view> {
fn from(value: BoxKeyValueIter<'view>) -> Self {
IteratorHandle(value)
}
}

impl<'view> Deref for IteratorHandle<'view> {
type Target = BoxKeyValueIter<'view>;

fn deref(&self) -> &Self::Target {
&self.0
}
}

impl DerefMut for IteratorHandle<'_> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}

#[derive(Debug)]
pub struct CreateIteratorResult<'db>(pub IteratorHandle<'db>);
Loading
Loading