-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add new getcfilters message for utreexo nodes #197
base: main
Are you sure you want to change the base?
Conversation
Still crashing for me on the latest commit.
|
The node is crashing when the indexes are being initialized and the genesis block is processed. It's happening because during initialization you aren't setting the chain for the index. The below code will fix that. diff --git a/blockchain/indexers/utreexocfindex.go b/blockchain/indexers/utreexocfindex.go
index c0ac2910..d7db4bbc 100644
--- a/blockchain/indexers/utreexocfindex.go
+++ b/blockchain/indexers/utreexocfindex.go
@@ -72,7 +72,8 @@ func (idx *UtreexoCFIndex) NeedsInputs() bool {
// Init initializes the utreexo cf index. This is part of the Indexer
// interface.
-func (idx *UtreexoCFIndex) Init(_ *blockchain.BlockChain) error {
+func (idx *UtreexoCFIndex) Init(chain *blockchain.BlockChain) error {
+ idx.chain = chain
return nil // Nothing to do.
} Though it still doesn't sync and there's an infinite loop happening somewhere... |
Could you make the node error out early if you give Lines 1217 to 1222 in f68f79d
|
Sure. This will be done now. |
CI seems to be failing on the latest commit
|
Add support for new getcfilters message called UtreexoCFilter
When a new block is added, a new UtreexoCFilter filter is created and persisted on the node.
This filter is created by serializing the contents of the roots at that height.
When a node receives a getcfilters message, the logic doesn't change much, it handles it almost identical to how it deals with basic filters.