-
Notifications
You must be signed in to change notification settings - Fork 232
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
Database: Add --txIndex
to kaspad
#2103
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportBase: 58.95% // Head: 56.86% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev #2103 +/- ##
==========================================
- Coverage 58.95% 56.86% -2.09%
==========================================
Files 679 702 +23
Lines 33060 34376 +1316
==========================================
+ Hits 19490 19548 +58
- Misses 10736 11982 +1246
- Partials 2834 2846 +12
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Converting back to draft. I will apply a notification stream and implement all testing which does not require dag params to be overwritten. |
@@ -0,0 +1,43 @@ | |||
package appmessage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't expose the including block to the user if it's different between kaspads
@@ -0,0 +1,41 @@ | |||
package appmessage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't expose the including block to the user if it's different between kaspads.
@@ -0,0 +1,41 @@ | |||
package appmessage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't expose the including block to the user if it's different between kaspads
@@ -0,0 +1,43 @@ | |||
package appmessage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't expose the including block to the user if it's different between kaspads
@@ -0,0 +1,41 @@ | |||
package appmessage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems redundant to have duplicate commands for multiple/single transactions (relevant for other commands as well)
} | ||
|
||
// TXIncludingBlockHashes returns the including block hashes for for the given txI | ||
func (ti *TXIndex) TXIncludingBlockHashes(txIDs []*externalapi.DomainTransactionID) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant function
} | ||
|
||
// TXIncludingBlocks returns the including block hashes for for the given txIDs | ||
func (ti *TXIndex) TXIncludingBlocks(txIDs []*externalapi.DomainTransactionID) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant function
|
||
go 1.18 | ||
|
||
//replace github.com/kaspanet/kaspad/domain/txindex => /home/ds/Coding/kaspad/kaspad/domain/txindex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please unchange this file
@@ -139,6 +139,49 @@ message KaspadMessage { | |||
GetMempoolEntriesByAddressesResponseMessage getMempoolEntriesByAddressesResponse = 1085; | |||
GetCoinSupplyRequestMessage getCoinSupplyRequest = 1086; | |||
GetCoinSupplyResponseMessage getCoinSupplyResponse= 1087; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to remove from here as well all of the requested commands
@@ -666,6 +666,18 @@ message GetInfoResponseMessage{ | |||
RPCError error = 1000; | |||
} | |||
|
|||
|
|||
//Kaspad most be started with the `--txindex` flag for this Request to work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most -> must. And you should always add a space after //
closes #2092
This allows kaspads to be run with an optional
--txindex
flag. This stores TXIDs with the acceptingBlocHash. this allows for exaustive querying of tx associated data, which is useful to fledge out rpc commands, increase information available to the wallet, and to ease confirmation calculations, or even work them directly into kaspad rpc. the ability to query tx associated blockdata, is a much requested functionality from external developers, the latter of which specifically from exchanges.it follows the example of the utxoindex.
Currently untested, and unintegrated, into kaspad's actual functioning through the rpc manager.
To Do
--> needed to prune txindex
--> bare minimum to update and reset the index accordingly
--> for minimal usecase and testing