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

feat(consensus): HeaviestSubtreeForkChoice #505

Merged
merged 104 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
a55efa6
Init dir structure
dadepo Jan 14, 2025
0a147f4
Added basic data structures
dadepo Jan 14, 2025
4a69818
temp
dadepo Jan 15, 2025
3a9de72
Should be able to create from root
dadepo Jan 19, 2025
390b168
Fix style
dadepo Jan 19, 2025
6159bcf
Fmt
dadepo Jan 19, 2025
db954ff
Renamed new to init
dadepo Jan 19, 2025
914e006
Merge branch 'main' into dade/fork-choice
dadepo Jan 19, 2025
f75a050
Make sure to walk up the tree when propagating the best slot
dadepo Jan 22, 2025
5592833
Added containsBlock
dadepo Jan 22, 2025
d09fc1d
Add bestOverallSlot
dadepo Jan 22, 2025
0f254d4
Todo
dadepo Jan 22, 2025
dcb5d97
Added subtreeDiff
dadepo Jan 22, 2025
c870607
Added HeaviestSubtreeForkChoice.setTreeRoot
dadepo Jan 23, 2025
30f303c
Update subtreeDiff to return SortedMap
dadepo Jan 23, 2025
a7747f5
Fix style
dadepo Jan 23, 2025
b16798b
Include call to propagateNewLeaf
dadepo Jan 25, 2025
1da75d9
Add some documentation with some ascii arts.
dadepo Jan 26, 2025
19e3dc4
Added implementation for markForkInvalidCandidate
dadepo Jan 27, 2025
86ee2ff
Merge branch 'main' into dade/fork-choice
dadepo Jan 27, 2025
1a30507
Fix compilation
dadepo Jan 27, 2025
3d65eef
Switch to SlotAndHash
dadepo Jan 27, 2025
f14a189
Use struct name for annotating self
dadepo Jan 27, 2025
f4cbd0a
Merge branch 'main' into dade/fork-choice
dadepo Jan 30, 2025
885abe5
Added initForTest for testing
dadepo Jan 30, 2025
54068ef
Fix leak
dadepo Jan 30, 2025
26c7eb0
Testing HeaviestSubtreeForkChoice.testSetRoot
dadepo Jan 30, 2025
1021df4
Fix subtreeDiff
dadepo Jan 31, 2025
c52d623
Fix selecting of root in initForTest
dadepo Jan 31, 2025
5f7799f
Deinit children when removing from fork_infos
dadepo Jan 31, 2025
a217282
Added test for HeaviestSubtreeForkChoice.subtreeDiff
dadepo Jan 31, 2025
008680c
Added tests for HeaviestSubtreeForkChoice.ancestorIterator
dadepo Feb 1, 2025
2dcaea6
Added test for HeaviestSubtreeForkChoice.testBestOverallSlot
dadepo Feb 1, 2025
87d3611
Document the test tree structure
dadepo Feb 1, 2025
a3a50b8
Added test for HeaviestSubtreeForkChoice.aggregateSlot
dadepo Feb 1, 2025
9d326e7
Added deepestSlot and extended HeaviestSubtreeForkChoice.aggregateSlot
dadepo Feb 1, 2025
4b8b0c2
Added stakeVotedAt
dadepo Feb 1, 2025
5c93d97
Add setStakeVotedAt to use in test
dadepo Feb 1, 2025
9269a6a
Extended Test
dadepo Feb 1, 2025
862618b
Add deepestOverallSlot
dadepo Feb 1, 2025
2ab10fb
Completed HeaviestSubtreeForkChoice.aggregateSlot
dadepo Feb 1, 2025
2ecac91
Added test for HeaviestSubtreeForkChoice.isBestChild
dadepo Feb 1, 2025
d94a0c0
Added setupDuplicateForks
dadepo Feb 2, 2025
0c48304
Added test HeaviestSubtreeForkChoice.addNewLeafSlot_duplicate
dadepo Feb 2, 2025
eac75ce
Add isDuplicateConfirmed
dadepo Feb 2, 2025
0c3fb8d
Implemented markForkValidCandidate
dadepo Feb 2, 2025
86209c2
Rename latest_invalid_ancestor to latestInvalidAncestor
dadepo Feb 2, 2025
fea080b
Added HeaviestSubtreeForkChoice.markForkValidCandidate
dadepo Feb 2, 2025
2848a1e
Move test fork into a variable
dadepo Feb 2, 2025
f65a155
Added test HeaviestSubtreeForkChoice.markForkValidandidate_mark_valid…
dadepo Feb 2, 2025
4d95b86
Remove placeholder tests
dadepo Feb 2, 2025
9bee5cf
Merge branch 'main' into dade/fork-choice
dadepo Feb 3, 2025
f5c93ea
Make bestOverallSlot not returning a value an error case
dadepo Feb 3, 2025
58196b9
Switch to logger
dadepo Feb 3, 2025
76ee5aa
Remove processed todo comment
dadepo Feb 3, 2025
d600459
Made some methods that does not need to be public private
dadepo Feb 4, 2025
d09a5be
Documented addNewLeafSlot
dadepo Feb 4, 2025
3cbfe1c
Document propagateNewLeaf
dadepo Feb 4, 2025
2d61e70
Document isDeepestChild
dadepo Feb 4, 2025
7973db3
Merge branch 'main' into dade/fork-choice
dadepo Feb 5, 2025
71cc94f
Have impl of bestOverallSlot uniform with deepestOverallSlot
dadepo Feb 6, 2025
ea8f226
Document setTreeRoot
dadepo Feb 6, 2025
2e0bcce
Added new line between fields and methods
dadepo Feb 9, 2025
724bbf2
Use equals instead of order for equality check
dadepo Feb 9, 2025
ca43267
Merge branch 'main' into dade/fork-choice
dadepo Feb 9, 2025
7202978
Improve variable names
dadepo Feb 9, 2025
0e163be
Renaming and documentation
dadepo Feb 10, 2025
d08d85a
use self
dadepo Feb 10, 2025
4d0761d
Use sig.time.Duration
dadepo Feb 10, 2025
9bc549c
Rename HeaviestSubtreeForkChoice to just ForkChoice
dadepo Feb 10, 2025
308de26
Panic if node to be removed not found
dadepo Feb 10, 2025
e0bc72c
Panic if new root is not found in fork infos
dadepo Feb 10, 2025
2cd5087
Updated comment
dadepo Feb 10, 2025
b8ef580
Have doInsertAggregateOperation as a standalone function
dadepo Feb 10, 2025
547a7f2
Added github issue
dadepo Feb 10, 2025
fcf5285
Removed MAX_ROOT_PRINT_SECONDS as it is not being used
dadepo Feb 10, 2025
8c85220
Fix link
dadepo Feb 10, 2025
29b356b
Replace errors with panic when slot not found in fork choice
dadepo Feb 10, 2025
408ce6c
Removed the need for alloc. Instead check contains first
dadepo Feb 10, 2025
8d5c66c
Do not panic in markForkValidCandidate
dadepo Feb 10, 2025
189d736
Improve comment
dadepo Feb 10, 2025
a747611
Merge branch 'main' into dade/fork-choice
0xNineteen Feb 12, 2025
5997b62
refactor(svm): refactor transaction implementation (#513)
yewman Feb 12, 2025
91cf6ca
Renamed latest_invalid_ancestor to latest_duplicate_ancestor
dadepo Feb 12, 2025
c6ab19c
Remove setting void to _
dadepo Feb 13, 2025
1f42217
Fix docs
dadepo Feb 13, 2025
3e23572
Use while on optional
dadepo Feb 13, 2025
114ab32
Simplify early return check
dadepo Feb 13, 2025
d8789eb
Simplify struct deconstruction
dadepo Feb 13, 2025
4d71186
Pass UpdateOperations by ref
dadepo Feb 13, 2025
ec824a8
Rename slotAndHashes to slot_and_hashes
dadepo Feb 13, 2025
9b9ffc5
Move initForTest to a standalone utility function
dadepo Feb 13, 2025
f711a59
Use std.testing.expectEqual
dadepo Feb 13, 2025
e429a81
Use std.testing.expectEqual in more places
dadepo Feb 13, 2025
f5684e2
Have the expect as the first parameter
dadepo Feb 13, 2025
96249c4
More std.testing.expectEqual
dadepo Feb 13, 2025
4ba67de
Added HeaviestSubtreeForkChoice.propagateNewLeaf
dadepo Feb 22, 2025
c9d3f11
Change how the fork choice tree is represented in comments
dadepo Feb 22, 2025
95a8269
Rename remaining occurance of best to heaviest
dadepo Feb 22, 2025
758ee91
Merge branch 'main' into dade/fork-choice
dadepo Feb 23, 2025
919a0ec
Comment with links to corresponding parts in Agave
dadepo Feb 24, 2025
9ede1f1
Comment test with links to corresponding tests in Agave
dadepo Feb 24, 2025
1f7013b
Comment with links to corresponding parts in Agave
dadepo Feb 24, 2025
2fffde6
use doc comments to document struct fields
dadepo Feb 24, 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
Loading