diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1406c29d8a..cede23f939 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ Any contribution to Kaspad is very welcome. ## Getting started If you want to start contributing to Kaspad and don't know where to start, you can pick an issue from -the [list](https://github.com/kaspanet/kaspad/issues). +the [list](https://github.com/coinexcom/kaspad/issues). If you want to make a big change it's better to discuss it first by opening an issue or talk about it in [Discord](https://discord.gg/WmGhhzk) to avoid duplicate work. diff --git a/README.md b/README.md index badee5ca35..c3eb6cf4ce 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # DEPRECATED -The full node reference implementation was [rewritten in Rust](https://github.com/kaspanet/rusty-kaspa), as a result, the Go implementation is now deprecated. +The full node reference implementation was [rewritten in Rust](https://github.com/coinexcom/rusty-kaspa), as a result, the Go implementation is now deprecated. -PLEASE NOTE: Any pull requests or issues that will be opened in this repository will be closed without treatment, except for issues or pull requests related to the kaspawallet, which remains maintained. In any other case, please use the [Rust implementation](https://github.com/kaspanet/rusty-kaspa) instead. +PLEASE NOTE: Any pull requests or issues that will be opened in this repository will be closed without treatment, except for issues or pull requests related to the kaspawallet, which remains maintained. In any other case, please use the [Rust implementation](https://github.com/coinexcom/rusty-kaspa) instead. # Kaspad [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](https://choosealicense.com/licenses/isc/) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/kaspanet/kaspad) +[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/coinexcom/kaspad) Kaspad was the reference full node Kaspa implementation written in Go (golang). @@ -35,7 +35,7 @@ $ go version - Run the following commands to obtain and install kaspad including all dependencies: ```bash -$ git clone https://github.com/kaspanet/kaspad +$ git clone https://github.com/coinexcom/kaspad $ cd kaspad $ go install . ./cmd/... ``` @@ -59,14 +59,14 @@ Join our discord server using the following link: https://discord.gg/YNYnNN5Pf2 ## Issue Tracker -The [integrated github issue tracker](https://github.com/kaspanet/kaspad/issues) +The [integrated github issue tracker](https://github.com/coinexcom/kaspad/issues) is used for this project. Issue priorities may be seen at https://github.com/orgs/kaspanet/projects/4 ## Documentation -The [documentation](https://github.com/kaspanet/docs) is a work-in-progress +The [documentation](https://github.com/coinexcom/docs) is a work-in-progress ## License diff --git a/app/app.go b/app/app.go index d1f8f743bb..67a8ef8306 100644 --- a/app/app.go +++ b/app/app.go @@ -7,17 +7,17 @@ import ( "runtime" "time" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/infrastructure/os/execenv" - "github.com/kaspanet/kaspad/infrastructure/os/limits" - "github.com/kaspanet/kaspad/infrastructure/os/signal" - "github.com/kaspanet/kaspad/infrastructure/os/winservice" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database/ldb" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/os/execenv" + "github.com/coinexcom/kaspad/infrastructure/os/limits" + "github.com/coinexcom/kaspad/infrastructure/os/signal" + "github.com/coinexcom/kaspad/infrastructure/os/winservice" + "github.com/coinexcom/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/profiling" + "github.com/coinexcom/kaspad/version" ) const ( diff --git a/app/appmessage/README.md b/app/appmessage/README.md index 579b74e2c5..cfa5bdbd9d 100644 --- a/app/appmessage/README.md +++ b/app/appmessage/README.md @@ -2,7 +2,7 @@ wire ==== [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](https://choosealicense.com/licenses/isc/) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/kaspanet/kaspad/wire) +[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/coinexcom/kaspad/wire) ======= Package wire implements the kaspa wire protocol. diff --git a/app/appmessage/common_test.go b/app/appmessage/common_test.go index 2069106dbb..50de9ae577 100644 --- a/app/appmessage/common_test.go +++ b/app/appmessage/common_test.go @@ -1,6 +1,6 @@ package appmessage -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // mainnetGenesisHash is the hash of the first block in the block DAG for the // main network (genesis block). diff --git a/app/appmessage/domainconverters.go b/app/appmessage/domainconverters.go index d64b9485fc..b2032a63a0 100644 --- a/app/appmessage/domainconverters.go +++ b/app/appmessage/domainconverters.go @@ -5,14 +5,14 @@ import ( "github.com/pkg/errors" "math/big" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionid" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionid" + "github.com/coinexcom/kaspad/util/mstime" ) // DomainBlockToMsgBlock converts an externalapi.DomainBlock to MsgBlock diff --git a/app/appmessage/p2p_msgblock.go b/app/appmessage/p2p_msgblock.go index 1506e81540..786cc85e99 100644 --- a/app/appmessage/p2p_msgblock.go +++ b/app/appmessage/p2p_msgblock.go @@ -5,7 +5,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // defaultTransactionAlloc is the default size used for the backing array diff --git a/app/appmessage/p2p_msgblock_test.go b/app/appmessage/p2p_msgblock_test.go index b4f342ca9d..9739e1b878 100644 --- a/app/appmessage/p2p_msgblock_test.go +++ b/app/appmessage/p2p_msgblock_test.go @@ -5,15 +5,15 @@ package appmessage import ( + "github.com/coinexcom/kaspad/util/mstime" "github.com/davecgh/go-spew/spew" - "github.com/kaspanet/kaspad/util/mstime" "math" "reflect" "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // TestBlock tests the MsgBlock API. diff --git a/app/appmessage/p2p_msgblockheader.go b/app/appmessage/p2p_msgblockheader.go index e8b4b96f25..4e79953af5 100644 --- a/app/appmessage/p2p_msgblockheader.go +++ b/app/appmessage/p2p_msgblockheader.go @@ -7,10 +7,10 @@ package appmessage import ( "math/big" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/util/mstime" ) // BaseBlockHeaderPayload is the base number of bytes a block header can be, diff --git a/app/appmessage/p2p_msgblockheader_test.go b/app/appmessage/p2p_msgblockheader_test.go index cfdfc6ddd0..d703abad48 100644 --- a/app/appmessage/p2p_msgblockheader_test.go +++ b/app/appmessage/p2p_msgblockheader_test.go @@ -9,8 +9,8 @@ import ( "reflect" "testing" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/davecgh/go-spew/spew" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" ) // TestBlockHeader tests the MsgBlockHeader API. diff --git a/app/appmessage/p2p_msgblocklocator.go b/app/appmessage/p2p_msgblocklocator.go index ccb77a01aa..e923b15253 100644 --- a/app/appmessage/p2p_msgblocklocator.go +++ b/app/appmessage/p2p_msgblocklocator.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MaxBlockLocatorsPerMsg is the maximum number of block locator hashes allowed diff --git a/app/appmessage/p2p_msgblocklocator_test.go b/app/appmessage/p2p_msgblocklocator_test.go index 889fe487d3..719185146f 100644 --- a/app/appmessage/p2p_msgblocklocator_test.go +++ b/app/appmessage/p2p_msgblocklocator_test.go @@ -3,7 +3,7 @@ package appmessage import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/davecgh/go-spew/spew" ) diff --git a/app/appmessage/p2p_msgblockwithtrusteddata.go b/app/appmessage/p2p_msgblockwithtrusteddata.go index 149d89b7d1..c5cefbdedf 100644 --- a/app/appmessage/p2p_msgblockwithtrusteddata.go +++ b/app/appmessage/p2p_msgblockwithtrusteddata.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "math/big" ) diff --git a/app/appmessage/p2p_msgibdblocklocator.go b/app/appmessage/p2p_msgibdblocklocator.go index c0adae4d63..ad14112adb 100644 --- a/app/appmessage/p2p_msgibdblocklocator.go +++ b/app/appmessage/p2p_msgibdblocklocator.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgIBDBlockLocator represents a kaspa ibdBlockLocator message diff --git a/app/appmessage/p2p_msgibdblocklocatorhighesthash.go b/app/appmessage/p2p_msgibdblocklocatorhighesthash.go index 2d21f0318c..5fd7689ed0 100644 --- a/app/appmessage/p2p_msgibdblocklocatorhighesthash.go +++ b/app/appmessage/p2p_msgibdblocklocatorhighesthash.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgIBDBlockLocatorHighestHash represents a kaspa BlockLocatorHighestHash message diff --git a/app/appmessage/p2p_msgibdchainblocklocator.go b/app/appmessage/p2p_msgibdchainblocklocator.go index 57e8e620d9..8709b5438a 100644 --- a/app/appmessage/p2p_msgibdchainblocklocator.go +++ b/app/appmessage/p2p_msgibdchainblocklocator.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgIBDChainBlockLocator implements the Message interface and represents a kaspa diff --git a/app/appmessage/p2p_msginvrelayblock.go b/app/appmessage/p2p_msginvrelayblock.go index 0bfaba5d2b..9f313ae556 100644 --- a/app/appmessage/p2p_msginvrelayblock.go +++ b/app/appmessage/p2p_msginvrelayblock.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgInvRelayBlock implements the Message interface and represents a kaspa diff --git a/app/appmessage/p2p_msginvtransaction.go b/app/appmessage/p2p_msginvtransaction.go index 92abe864a5..bd4bb95169 100644 --- a/app/appmessage/p2p_msginvtransaction.go +++ b/app/appmessage/p2p_msginvtransaction.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MaxInvPerTxInvMsg is the maximum number of hashes that can diff --git a/app/appmessage/p2p_msgpruningpointutxosetchunk.go b/app/appmessage/p2p_msgpruningpointutxosetchunk.go index c4e2063bcf..d788c33119 100644 --- a/app/appmessage/p2p_msgpruningpointutxosetchunk.go +++ b/app/appmessage/p2p_msgpruningpointutxosetchunk.go @@ -1,6 +1,6 @@ package appmessage -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // MsgPruningPointUTXOSetChunk represents a kaspa PruningPointUTXOSetChunk message type MsgPruningPointUTXOSetChunk struct { diff --git a/app/appmessage/p2p_msgrequestaddresses.go b/app/appmessage/p2p_msgrequestaddresses.go index 0c6efb5e8b..83e4466e1e 100644 --- a/app/appmessage/p2p_msgrequestaddresses.go +++ b/app/appmessage/p2p_msgrequestaddresses.go @@ -5,7 +5,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgRequestAddresses implements the Message interface and represents a kaspa diff --git a/app/appmessage/p2p_msgrequestanticone.go b/app/appmessage/p2p_msgrequestanticone.go index 888f9e3c43..22dc78adb5 100644 --- a/app/appmessage/p2p_msgrequestanticone.go +++ b/app/appmessage/p2p_msgrequestanticone.go @@ -5,7 +5,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgRequestAnticone implements the Message interface and represents a kaspa diff --git a/app/appmessage/p2p_msgrequestblocklocator.go b/app/appmessage/p2p_msgrequestblocklocator.go index c7bc9711cb..4b1d7812b9 100644 --- a/app/appmessage/p2p_msgrequestblocklocator.go +++ b/app/appmessage/p2p_msgrequestblocklocator.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgRequestBlockLocator implements the Message interface and represents a kaspa diff --git a/app/appmessage/p2p_msgrequestblocklocator_test.go b/app/appmessage/p2p_msgrequestblocklocator_test.go index 66a34381b5..18f0acac30 100644 --- a/app/appmessage/p2p_msgrequestblocklocator_test.go +++ b/app/appmessage/p2p_msgrequestblocklocator_test.go @@ -3,7 +3,7 @@ package appmessage import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // TestRequestBlockLocator tests the MsgRequestBlockLocator API. diff --git a/app/appmessage/p2p_msgrequestheaders.go b/app/appmessage/p2p_msgrequestheaders.go index 6ccba50691..d093ec9a2d 100644 --- a/app/appmessage/p2p_msgrequestheaders.go +++ b/app/appmessage/p2p_msgrequestheaders.go @@ -5,7 +5,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgRequestHeaders implements the Message interface and represents a kaspa diff --git a/app/appmessage/p2p_msgrequestheaders_test.go b/app/appmessage/p2p_msgrequestheaders_test.go index 4199066da3..c51020a925 100644 --- a/app/appmessage/p2p_msgrequestheaders_test.go +++ b/app/appmessage/p2p_msgrequestheaders_test.go @@ -7,7 +7,7 @@ package appmessage import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // TestRequstIBDBlocks tests the MsgRequestIBDBlocks API. diff --git a/app/appmessage/p2p_msgrequestibdblocks.go b/app/appmessage/p2p_msgrequestibdblocks.go index 078a00dde7..b24a720341 100644 --- a/app/appmessage/p2p_msgrequestibdblocks.go +++ b/app/appmessage/p2p_msgrequestibdblocks.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgRequestIBDBlocks implements the Message interface and represents a kaspa diff --git a/app/appmessage/p2p_msgrequestibdchainblocklocator.go b/app/appmessage/p2p_msgrequestibdchainblocklocator.go index baf87fff96..28010cccca 100644 --- a/app/appmessage/p2p_msgrequestibdchainblocklocator.go +++ b/app/appmessage/p2p_msgrequestibdchainblocklocator.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgRequestIBDChainBlockLocator implements the Message interface and represents a kaspa diff --git a/app/appmessage/p2p_msgrequestpruningpointutxosetandblock.go b/app/appmessage/p2p_msgrequestpruningpointutxosetandblock.go index 994398c672..7ee5a320b9 100644 --- a/app/appmessage/p2p_msgrequestpruningpointutxosetandblock.go +++ b/app/appmessage/p2p_msgrequestpruningpointutxosetandblock.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgRequestPruningPointUTXOSet represents a kaspa RequestPruningPointUTXOSet message diff --git a/app/appmessage/p2p_msgrequestrelayblocks.go b/app/appmessage/p2p_msgrequestrelayblocks.go index 9f6bb246ff..3df66cfbeb 100644 --- a/app/appmessage/p2p_msgrequestrelayblocks.go +++ b/app/appmessage/p2p_msgrequestrelayblocks.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MaxRequestRelayBlocksHashes is the maximum number of hashes that can diff --git a/app/appmessage/p2p_msgrequesttransactions.go b/app/appmessage/p2p_msgrequesttransactions.go index 6d4874a403..278302e4dc 100644 --- a/app/appmessage/p2p_msgrequesttransactions.go +++ b/app/appmessage/p2p_msgrequesttransactions.go @@ -1,7 +1,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MaxInvPerRequestTransactionsMsg is the maximum number of hashes that can diff --git a/app/appmessage/p2p_msgtransactionnotfound.go b/app/appmessage/p2p_msgtransactionnotfound.go index 8bf71de4ef..cc47358b47 100644 --- a/app/appmessage/p2p_msgtransactionnotfound.go +++ b/app/appmessage/p2p_msgtransactionnotfound.go @@ -5,7 +5,7 @@ package appmessage import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MsgTransactionNotFound defines a kaspa TransactionNotFound message which is sent in response to diff --git a/app/appmessage/p2p_msgtx.go b/app/appmessage/p2p_msgtx.go index 2062f03c71..958ed1c65a 100644 --- a/app/appmessage/p2p_msgtx.go +++ b/app/appmessage/p2p_msgtx.go @@ -8,11 +8,11 @@ import ( "encoding/binary" "strconv" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) const ( diff --git a/app/appmessage/p2p_msgtx_test.go b/app/appmessage/p2p_msgtx_test.go index 52bf5618d3..19e64e004f 100644 --- a/app/appmessage/p2p_msgtx_test.go +++ b/app/appmessage/p2p_msgtx_test.go @@ -11,13 +11,13 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionid" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionid" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/davecgh/go-spew/spew" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" ) // TestTx tests the MsgTx API. diff --git a/app/appmessage/p2p_msgversion.go b/app/appmessage/p2p_msgversion.go index 5a7e0e9114..c0ff62e828 100644 --- a/app/appmessage/p2p_msgversion.go +++ b/app/appmessage/p2p_msgversion.go @@ -8,11 +8,11 @@ import ( "fmt" "strings" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/version" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/id" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/id" + "github.com/coinexcom/kaspad/util/mstime" ) // MaxUserAgentLen is the maximum allowed length for the user agent field in a diff --git a/app/appmessage/p2p_msgversion_test.go b/app/appmessage/p2p_msgversion_test.go index 624694cc42..b709def610 100644 --- a/app/appmessage/p2p_msgversion_test.go +++ b/app/appmessage/p2p_msgversion_test.go @@ -9,8 +9,8 @@ import ( "reflect" "testing" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/id" "github.com/davecgh/go-spew/spew" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/id" ) // TestVersion tests the MsgVersion API. diff --git a/app/appmessage/p2p_netaddress.go b/app/appmessage/p2p_netaddress.go index 59f8d36326..93e3d9bfda 100644 --- a/app/appmessage/p2p_netaddress.go +++ b/app/appmessage/p2p_netaddress.go @@ -7,7 +7,7 @@ package appmessage import ( "net" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/util/mstime" ) // NetAddress defines information about a peer on the network including the time diff --git a/app/appmessage/rpc_get_block_count.go b/app/appmessage/rpc_get_block_count.go index c915475d92..a7180fa2b4 100644 --- a/app/appmessage/rpc_get_block_count.go +++ b/app/appmessage/rpc_get_block_count.go @@ -1,6 +1,6 @@ package appmessage -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // GetBlockCountRequestMessage is an appmessage corresponding to // its respective RPC message diff --git a/app/component_manager.go b/app/component_manager.go index 33b9a2c097..efcb2aa3e4 100644 --- a/app/component_manager.go +++ b/app/component_manager.go @@ -4,22 +4,22 @@ import ( "fmt" "sync/atomic" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - - "github.com/kaspanet/kaspad/app/protocol" - "github.com/kaspanet/kaspad/app/rpc" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/utxoindex" - "github.com/kaspanet/kaspad/infrastructure/config" - infrastructuredatabase "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/connmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/id" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + + "github.com/coinexcom/kaspad/app/protocol" + "github.com/coinexcom/kaspad/app/rpc" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/utxoindex" + "github.com/coinexcom/kaspad/infrastructure/config" + infrastructuredatabase "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/connmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/id" + "github.com/coinexcom/kaspad/util/panics" ) // ComponentManager is a wrapper for all the kaspad services diff --git a/app/log.go b/app/log.go index 37a5a8e5d2..3be2de6947 100644 --- a/app/log.go +++ b/app/log.go @@ -6,7 +6,7 @@ package app import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("KASD") diff --git a/app/protocol/common/common.go b/app/protocol/common/common.go index e644d7efaa..2bfd4fef3b 100644 --- a/app/protocol/common/common.go +++ b/app/protocol/common/common.go @@ -1,8 +1,8 @@ package common import ( - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "time" "github.com/pkg/errors" diff --git a/app/protocol/flowcontext/addresses.go b/app/protocol/flowcontext/addresses.go index 0ecf91c480..21346b676a 100644 --- a/app/protocol/flowcontext/addresses.go +++ b/app/protocol/flowcontext/addresses.go @@ -1,7 +1,7 @@ package flowcontext import ( - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" ) // AddressManager returns the address manager associated to the flow context. diff --git a/app/protocol/flowcontext/blocks.go b/app/protocol/flowcontext/blocks.go index 8258f33552..0190e658a3 100644 --- a/app/protocol/flowcontext/blocks.go +++ b/app/protocol/flowcontext/blocks.go @@ -3,14 +3,14 @@ package flowcontext import ( "time" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" ) // OnNewBlock updates the mempool after a new block arrival, and diff --git a/app/protocol/flowcontext/config.go b/app/protocol/flowcontext/config.go index fa6cf1f53c..4b01cf20bd 100644 --- a/app/protocol/flowcontext/config.go +++ b/app/protocol/flowcontext/config.go @@ -1,6 +1,6 @@ package flowcontext -import "github.com/kaspanet/kaspad/infrastructure/config" +import "github.com/coinexcom/kaspad/infrastructure/config" // Config returns an instance of *config.Config associated to the flow context. func (f *FlowContext) Config() *config.Config { diff --git a/app/protocol/flowcontext/domain.go b/app/protocol/flowcontext/domain.go index 05c76e0fd2..52350120f0 100644 --- a/app/protocol/flowcontext/domain.go +++ b/app/protocol/flowcontext/domain.go @@ -1,7 +1,7 @@ package flowcontext import ( - "github.com/kaspanet/kaspad/domain" + "github.com/coinexcom/kaspad/domain" ) // Domain returns the Domain object associated to the flow context. diff --git a/app/protocol/flowcontext/errors.go b/app/protocol/flowcontext/errors.go index f73c2d71dd..940be4a45e 100644 --- a/app/protocol/flowcontext/errors.go +++ b/app/protocol/flowcontext/errors.go @@ -5,9 +5,9 @@ import ( "strings" "sync/atomic" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" ) var ( diff --git a/app/protocol/flowcontext/flow_context.go b/app/protocol/flowcontext/flow_context.go index 7ca8bf0010..57dfd78e7b 100644 --- a/app/protocol/flowcontext/flow_context.go +++ b/app/protocol/flowcontext/flow_context.go @@ -4,18 +4,18 @@ import ( "sync" "time" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/util/mstime" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain" + "github.com/coinexcom/kaspad/domain" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/connmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/id" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/connmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/id" ) // OnNewBlockTemplateHandler is a handler function that's triggered when a new block template is available diff --git a/app/protocol/flowcontext/log.go b/app/protocol/flowcontext/log.go index dbeee6c0c4..3874b3eab0 100644 --- a/app/protocol/flowcontext/log.go +++ b/app/protocol/flowcontext/log.go @@ -1,7 +1,7 @@ package flowcontext import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("PROT") diff --git a/app/protocol/flowcontext/network.go b/app/protocol/flowcontext/network.go index ca8c1f0517..b88b565642 100644 --- a/app/protocol/flowcontext/network.go +++ b/app/protocol/flowcontext/network.go @@ -1,11 +1,11 @@ package flowcontext import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/infrastructure/network/connmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/infrastructure/network/connmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" "github.com/pkg/errors" ) diff --git a/app/protocol/flowcontext/orphans.go b/app/protocol/flowcontext/orphans.go index 16c19bda95..91438dac02 100644 --- a/app/protocol/flowcontext/orphans.go +++ b/app/protocol/flowcontext/orphans.go @@ -1,11 +1,11 @@ package flowcontext import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashset" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashset" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) diff --git a/app/protocol/flowcontext/shared_requested_blocks.go b/app/protocol/flowcontext/shared_requested_blocks.go index 10680464b7..5ff9bc9283 100644 --- a/app/protocol/flowcontext/shared_requested_blocks.go +++ b/app/protocol/flowcontext/shared_requested_blocks.go @@ -3,7 +3,7 @@ package flowcontext import ( "sync" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // SharedRequestedBlocks is a data structure that is shared between peers that diff --git a/app/protocol/flowcontext/shared_requested_transactions.go b/app/protocol/flowcontext/shared_requested_transactions.go index f43e143907..21205135cc 100644 --- a/app/protocol/flowcontext/shared_requested_transactions.go +++ b/app/protocol/flowcontext/shared_requested_transactions.go @@ -3,7 +3,7 @@ package flowcontext import ( "sync" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // SharedRequestedTransactions is a data structure that is shared between peers that diff --git a/app/protocol/flowcontext/transactions.go b/app/protocol/flowcontext/transactions.go index 644c72d93a..f893c9c0ff 100644 --- a/app/protocol/flowcontext/transactions.go +++ b/app/protocol/flowcontext/transactions.go @@ -3,9 +3,9 @@ package flowcontext import ( "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" ) // TransactionIDPropagationInterval is the interval between transaction IDs propagations diff --git a/app/protocol/flows/handshake/handshake.go b/app/protocol/flows/handshake/handshake.go index c60bf9248c..c818ce18c1 100644 --- a/app/protocol/flows/handshake/handshake.go +++ b/app/protocol/flows/handshake/handshake.go @@ -3,18 +3,18 @@ package handshake import ( "sync/atomic" - "github.com/kaspanet/kaspad/domain" + "github.com/coinexcom/kaspad/domain" - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" - "github.com/kaspanet/kaspad/app/appmessage" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/handshake/log.go b/app/protocol/flows/handshake/log.go index 3e76548f99..ad1af0df13 100644 --- a/app/protocol/flows/handshake/log.go +++ b/app/protocol/flows/handshake/log.go @@ -1,8 +1,8 @@ package handshake import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("PROT") diff --git a/app/protocol/flows/handshake/receiveversion.go b/app/protocol/flows/handshake/receiveversion.go index ff302fd312..042f3ae50c 100644 --- a/app/protocol/flows/handshake/receiveversion.go +++ b/app/protocol/flows/handshake/receiveversion.go @@ -1,12 +1,12 @@ package handshake import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/handshake/sendversion.go b/app/protocol/flows/handshake/sendversion.go index 14ca960a21..78d4173ad3 100644 --- a/app/protocol/flows/handshake/sendversion.go +++ b/app/protocol/flows/handshake/sendversion.go @@ -1,12 +1,12 @@ package handshake import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/version" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/ready/log.go b/app/protocol/flows/ready/log.go index 2e7b16a7f1..d46ad3d59e 100644 --- a/app/protocol/flows/ready/log.go +++ b/app/protocol/flows/ready/log.go @@ -1,8 +1,8 @@ package ready import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("PROT") diff --git a/app/protocol/flows/ready/ready.go b/app/protocol/flows/ready/ready.go index 9ad8749844..a68b54ac54 100644 --- a/app/protocol/flows/ready/ready.go +++ b/app/protocol/flows/ready/ready.go @@ -1,13 +1,13 @@ package ready import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" "sync/atomic" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/v5/addressexchange/receiveaddresses.go b/app/protocol/flows/v5/addressexchange/receiveaddresses.go index 654c823ff4..27afe027ba 100644 --- a/app/protocol/flows/v5/addressexchange/receiveaddresses.go +++ b/app/protocol/flows/v5/addressexchange/receiveaddresses.go @@ -1,12 +1,12 @@ package addressexchange import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // ReceiveAddressesContext is the interface for the context needed for the ReceiveAddresses flow. diff --git a/app/protocol/flows/v5/addressexchange/sendaddresses.go b/app/protocol/flows/v5/addressexchange/sendaddresses.go index 7cbdf49329..73cd192f80 100644 --- a/app/protocol/flows/v5/addressexchange/sendaddresses.go +++ b/app/protocol/flows/v5/addressexchange/sendaddresses.go @@ -3,9 +3,9 @@ package addressexchange import ( "math/rand" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // SendAddressesContext is the interface for the context needed for the SendAddresses flow. diff --git a/app/protocol/flows/v5/blockrelay/batch_size_test.go b/app/protocol/flows/v5/blockrelay/batch_size_test.go index 752597c192..b1430f56d0 100644 --- a/app/protocol/flows/v5/blockrelay/batch_size_test.go +++ b/app/protocol/flows/v5/blockrelay/batch_size_test.go @@ -1,7 +1,7 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "testing" ) diff --git a/app/protocol/flows/v5/blockrelay/block_locator.go b/app/protocol/flows/v5/blockrelay/block_locator.go index 76cdd83ed4..3305ec7055 100644 --- a/app/protocol/flows/v5/blockrelay/block_locator.go +++ b/app/protocol/flows/v5/blockrelay/block_locator.go @@ -1,10 +1,10 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (flow *handleRelayInvsFlow) sendGetBlockLocator(highHash *externalapi.DomainHash, limit uint32) error { diff --git a/app/protocol/flows/v5/blockrelay/handle_ibd_block_locator.go b/app/protocol/flows/v5/blockrelay/handle_ibd_block_locator.go index 250c5cf9b7..0c6b9604bd 100644 --- a/app/protocol/flows/v5/blockrelay/handle_ibd_block_locator.go +++ b/app/protocol/flows/v5/blockrelay/handle_ibd_block_locator.go @@ -1,11 +1,11 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleIBDBlockLocatorContext is the interface for the context needed for the HandleIBDBlockLocator flow. diff --git a/app/protocol/flows/v5/blockrelay/handle_ibd_block_requests.go b/app/protocol/flows/v5/blockrelay/handle_ibd_block_requests.go index 45ccc6c443..1f78e50f4c 100644 --- a/app/protocol/flows/v5/blockrelay/handle_ibd_block_requests.go +++ b/app/protocol/flows/v5/blockrelay/handle_ibd_block_requests.go @@ -1,10 +1,10 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/v5/blockrelay/handle_ibd_request_chain_block_locator.go b/app/protocol/flows/v5/blockrelay/handle_ibd_request_chain_block_locator.go index c7bab8e9b9..c4d8df80f7 100644 --- a/app/protocol/flows/v5/blockrelay/handle_ibd_request_chain_block_locator.go +++ b/app/protocol/flows/v5/blockrelay/handle_ibd_request_chain_block_locator.go @@ -1,12 +1,12 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/v5/blockrelay/handle_pruning_point_and_its_anticone_requests.go b/app/protocol/flows/v5/blockrelay/handle_pruning_point_and_its_anticone_requests.go index 4c0a11202b..d29c074fb4 100644 --- a/app/protocol/flows/v5/blockrelay/handle_pruning_point_and_its_anticone_requests.go +++ b/app/protocol/flows/v5/blockrelay/handle_pruning_point_and_its_anticone_requests.go @@ -1,13 +1,13 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "sync/atomic" ) diff --git a/app/protocol/flows/v5/blockrelay/handle_pruning_point_proof_requests.go b/app/protocol/flows/v5/blockrelay/handle_pruning_point_proof_requests.go index 8391a402ab..fd72e61c03 100644 --- a/app/protocol/flows/v5/blockrelay/handle_pruning_point_proof_requests.go +++ b/app/protocol/flows/v5/blockrelay/handle_pruning_point_proof_requests.go @@ -1,10 +1,10 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // PruningPointProofRequestsContext is the interface for the context needed for the HandlePruningPointProofRequests flow. diff --git a/app/protocol/flows/v5/blockrelay/handle_relay_block_requests.go b/app/protocol/flows/v5/blockrelay/handle_relay_block_requests.go index f82fd43f48..c547cefc39 100644 --- a/app/protocol/flows/v5/blockrelay/handle_relay_block_requests.go +++ b/app/protocol/flows/v5/blockrelay/handle_relay_block_requests.go @@ -1,11 +1,11 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/v5/blockrelay/handle_relay_invs.go b/app/protocol/flows/v5/blockrelay/handle_relay_invs.go index 5a03772071..cc53798716 100644 --- a/app/protocol/flows/v5/blockrelay/handle_relay_invs.go +++ b/app/protocol/flows/v5/blockrelay/handle_relay_invs.go @@ -1,19 +1,19 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/app/protocol/flowcontext" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashset" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/flowcontext" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashset" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/v5/blockrelay/handle_request_anticone.go b/app/protocol/flows/v5/blockrelay/handle_request_anticone.go index 208af8c6b5..e97ddb1291 100644 --- a/app/protocol/flows/v5/blockrelay/handle_request_anticone.go +++ b/app/protocol/flows/v5/blockrelay/handle_request_anticone.go @@ -1,13 +1,13 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "sort" ) diff --git a/app/protocol/flows/v5/blockrelay/handle_request_block_locator.go b/app/protocol/flows/v5/blockrelay/handle_request_block_locator.go index 027f869961..656ff0213d 100644 --- a/app/protocol/flows/v5/blockrelay/handle_request_block_locator.go +++ b/app/protocol/flows/v5/blockrelay/handle_request_block_locator.go @@ -1,11 +1,11 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // RequestBlockLocatorContext is the interface for the context needed for the HandleRequestBlockLocator flow. diff --git a/app/protocol/flows/v5/blockrelay/handle_request_headers.go b/app/protocol/flows/v5/blockrelay/handle_request_headers.go index 38225efb05..065a98c393 100644 --- a/app/protocol/flows/v5/blockrelay/handle_request_headers.go +++ b/app/protocol/flows/v5/blockrelay/handle_request_headers.go @@ -1,13 +1,13 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // This constant must be equal at both syncer and syncee. Therefore, never (!!) change this constant unless a new p2p diff --git a/app/protocol/flows/v5/blockrelay/handle_request_pruning_point_utxo_set.go b/app/protocol/flows/v5/blockrelay/handle_request_pruning_point_utxo_set.go index 4d1ed41f27..4c3ed45f76 100644 --- a/app/protocol/flows/v5/blockrelay/handle_request_pruning_point_utxo_set.go +++ b/app/protocol/flows/v5/blockrelay/handle_request_pruning_point_utxo_set.go @@ -2,14 +2,14 @@ package blockrelay import ( "errors" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleRequestPruningPointUTXOSetContext is the interface for the context needed for the HandleRequestPruningPointUTXOSet flow. diff --git a/app/protocol/flows/v5/blockrelay/ibd.go b/app/protocol/flows/v5/blockrelay/ibd.go index 726d072b67..004af19ffc 100644 --- a/app/protocol/flows/v5/blockrelay/ibd.go +++ b/app/protocol/flows/v5/blockrelay/ibd.go @@ -2,17 +2,17 @@ package blockrelay import ( "fmt" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" "time" ) diff --git a/app/protocol/flows/v5/blockrelay/ibd_with_headers_proof.go b/app/protocol/flows/v5/blockrelay/ibd_with_headers_proof.go index d3e345d8dc..ec933f4056 100644 --- a/app/protocol/flows/v5/blockrelay/ibd_with_headers_proof.go +++ b/app/protocol/flows/v5/blockrelay/ibd_with_headers_proof.go @@ -2,12 +2,12 @@ package blockrelay import ( "fmt" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" "github.com/pkg/errors" "time" ) diff --git a/app/protocol/flows/v5/blockrelay/log.go b/app/protocol/flows/v5/blockrelay/log.go index 6c57009900..c0355fae81 100644 --- a/app/protocol/flows/v5/blockrelay/log.go +++ b/app/protocol/flows/v5/blockrelay/log.go @@ -1,8 +1,8 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("PROT") diff --git a/app/protocol/flows/v5/blockrelay/send_virtual_selected_parent_inv.go b/app/protocol/flows/v5/blockrelay/send_virtual_selected_parent_inv.go index fd5a22e8d3..427dd94074 100644 --- a/app/protocol/flows/v5/blockrelay/send_virtual_selected_parent_inv.go +++ b/app/protocol/flows/v5/blockrelay/send_virtual_selected_parent_inv.go @@ -1,11 +1,11 @@ package blockrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // SendVirtualSelectedParentInvContext is the interface for the context needed for the SendVirtualSelectedParentInv flow. diff --git a/app/protocol/flows/v5/ping/receive.go b/app/protocol/flows/v5/ping/receive.go index afa92acbeb..28678cf98c 100644 --- a/app/protocol/flows/v5/ping/receive.go +++ b/app/protocol/flows/v5/ping/receive.go @@ -1,8 +1,8 @@ package ping import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // ReceivePingsContext is the interface for the context needed for the ReceivePings flow. diff --git a/app/protocol/flows/v5/ping/send.go b/app/protocol/flows/v5/ping/send.go index 13980ff117..ee458cd8e3 100644 --- a/app/protocol/flows/v5/ping/send.go +++ b/app/protocol/flows/v5/ping/send.go @@ -1,16 +1,16 @@ package ping import ( - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/app/protocol/flowcontext" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/flowcontext" "github.com/pkg/errors" "time" - "github.com/kaspanet/kaspad/app/appmessage" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/util/random" + "github.com/coinexcom/kaspad/app/appmessage" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/util/random" ) // SendPingsContext is the interface for the context needed for the SendPings flow. diff --git a/app/protocol/flows/v5/register.go b/app/protocol/flows/v5/register.go index d6e919cea7..68a8a10495 100644 --- a/app/protocol/flows/v5/register.go +++ b/app/protocol/flows/v5/register.go @@ -1,16 +1,16 @@ package v5 import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/app/protocol/flowcontext" - "github.com/kaspanet/kaspad/app/protocol/flows/v5/addressexchange" - "github.com/kaspanet/kaspad/app/protocol/flows/v5/blockrelay" - "github.com/kaspanet/kaspad/app/protocol/flows/v5/ping" - "github.com/kaspanet/kaspad/app/protocol/flows/v5/rejects" - "github.com/kaspanet/kaspad/app/protocol/flows/v5/transactionrelay" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/flowcontext" + "github.com/coinexcom/kaspad/app/protocol/flows/v5/addressexchange" + "github.com/coinexcom/kaspad/app/protocol/flows/v5/blockrelay" + "github.com/coinexcom/kaspad/app/protocol/flows/v5/ping" + "github.com/coinexcom/kaspad/app/protocol/flows/v5/rejects" + "github.com/coinexcom/kaspad/app/protocol/flows/v5/transactionrelay" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) type protocolManager interface { diff --git a/app/protocol/flows/v5/rejects/handle_rejects.go b/app/protocol/flows/v5/rejects/handle_rejects.go index 3a9e5a243e..deff3cb20f 100644 --- a/app/protocol/flows/v5/rejects/handle_rejects.go +++ b/app/protocol/flows/v5/rejects/handle_rejects.go @@ -1,9 +1,9 @@ package rejects import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleRejectsContext is the interface for the context needed for the HandleRejects flow. diff --git a/app/protocol/flows/v5/testing/common_test.go b/app/protocol/flows/v5/testing/common_test.go index 642beb4a6e..86efbe081c 100644 --- a/app/protocol/flows/v5/testing/common_test.go +++ b/app/protocol/flows/v5/testing/common_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/v5/testing/receiveaddresses_test.go b/app/protocol/flows/v5/testing/receiveaddresses_test.go index 169f964c5e..a7ccb33c42 100644 --- a/app/protocol/flows/v5/testing/receiveaddresses_test.go +++ b/app/protocol/flows/v5/testing/receiveaddresses_test.go @@ -1,16 +1,16 @@ package testing import ( - "github.com/kaspanet/kaspad/app/protocol/flows/v5/addressexchange" + "github.com/coinexcom/kaspad/app/protocol/flows/v5/addressexchange" "testing" "time" - "github.com/kaspanet/kaspad/app/appmessage" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) type fakeReceiveAddressesContext struct{} diff --git a/app/protocol/flows/v5/transactionrelay/handle_relayed_transactions.go b/app/protocol/flows/v5/transactionrelay/handle_relayed_transactions.go index 401ac46fdf..83fbd1b29b 100644 --- a/app/protocol/flows/v5/transactionrelay/handle_relayed_transactions.go +++ b/app/protocol/flows/v5/transactionrelay/handle_relayed_transactions.go @@ -1,16 +1,16 @@ package transactionrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/app/protocol/flowcontext" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/flowcontext" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/protocol/flows/v5/transactionrelay/handle_relayed_transactions_test.go b/app/protocol/flows/v5/transactionrelay/handle_relayed_transactions_test.go index 5d75be8033..6738becde8 100644 --- a/app/protocol/flows/v5/transactionrelay/handle_relayed_transactions_test.go +++ b/app/protocol/flows/v5/transactionrelay/handle_relayed_transactions_test.go @@ -2,24 +2,24 @@ package transactionrelay_test import ( "errors" - "github.com/kaspanet/kaspad/app/protocol/flowcontext" - "github.com/kaspanet/kaspad/app/protocol/flows/v5/transactionrelay" + "github.com/coinexcom/kaspad/app/protocol/flowcontext" + "github.com/coinexcom/kaspad/app/protocol/flows/v5/transactionrelay" "strings" "testing" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" - - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" + + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) type mocTransactionsRelayContext struct { diff --git a/app/protocol/flows/v5/transactionrelay/handle_requested_transactions.go b/app/protocol/flows/v5/transactionrelay/handle_requested_transactions.go index 00fd23ae2a..16d58c7407 100644 --- a/app/protocol/flows/v5/transactionrelay/handle_requested_transactions.go +++ b/app/protocol/flows/v5/transactionrelay/handle_requested_transactions.go @@ -1,8 +1,8 @@ package transactionrelay import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) type handleRequestedTransactionsFlow struct { diff --git a/app/protocol/flows/v5/transactionrelay/handle_requested_transactions_test.go b/app/protocol/flows/v5/transactionrelay/handle_requested_transactions_test.go index d58563349b..5f08a48a4a 100644 --- a/app/protocol/flows/v5/transactionrelay/handle_requested_transactions_test.go +++ b/app/protocol/flows/v5/transactionrelay/handle_requested_transactions_test.go @@ -1,21 +1,21 @@ package transactionrelay_test import ( - "github.com/kaspanet/kaspad/app/protocol/flowcontext" - "github.com/kaspanet/kaspad/app/protocol/flows/v5/transactionrelay" + "github.com/coinexcom/kaspad/app/protocol/flowcontext" + "github.com/coinexcom/kaspad/app/protocol/flows/v5/transactionrelay" "testing" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/util/panics" "github.com/pkg/errors" ) diff --git a/app/protocol/log.go b/app/protocol/log.go index 1a96c104a6..2dae5e8fe2 100644 --- a/app/protocol/log.go +++ b/app/protocol/log.go @@ -1,8 +1,8 @@ package protocol import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("PROT") diff --git a/app/protocol/manager.go b/app/protocol/manager.go index 2ecae023ad..6079c58318 100644 --- a/app/protocol/manager.go +++ b/app/protocol/manager.go @@ -5,20 +5,20 @@ import ( "sync" "sync/atomic" - "github.com/kaspanet/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/common" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/domain" + "github.com/coinexcom/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/app/protocol/flowcontext" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/connmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/app/protocol/flowcontext" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/connmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" ) // Manager manages the p2p protocol diff --git a/app/protocol/peer/log.go b/app/protocol/peer/log.go index 7f17fac7f9..823184f6fa 100644 --- a/app/protocol/peer/log.go +++ b/app/protocol/peer/log.go @@ -1,7 +1,7 @@ package peer import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("PROT") diff --git a/app/protocol/peer/peer.go b/app/protocol/peer/peer.go index be3a128df5..f6437e80bf 100644 --- a/app/protocol/peer/peer.go +++ b/app/protocol/peer/peer.go @@ -4,13 +4,13 @@ import ( "sync" "time" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/id" - mathUtil "github.com/kaspanet/kaspad/util/math" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/id" + mathUtil "github.com/coinexcom/kaspad/util/math" + "github.com/coinexcom/kaspad/util/mstime" ) // Peer holds data about a peer. diff --git a/app/protocol/protocol.go b/app/protocol/protocol.go index cbac4dbe46..5ef5acd4c9 100644 --- a/app/protocol/protocol.go +++ b/app/protocol/protocol.go @@ -1,20 +1,20 @@ package protocol import ( - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/app/protocol/flows/ready" - "github.com/kaspanet/kaspad/app/protocol/flows/v5" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/flows/ready" + "github.com/coinexcom/kaspad/app/protocol/flows/v5" "sync" "sync/atomic" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/flows/handshake" - peerpkg "github.com/kaspanet/kaspad/app/protocol/peer" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/connmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/flows/handshake" + peerpkg "github.com/coinexcom/kaspad/app/protocol/peer" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/connmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/protocol/protocolerrors/protocolerrors.go b/app/protocol/protocolerrors/protocolerrors.go index dc2d086de1..c0c3d8ed88 100644 --- a/app/protocol/protocolerrors/protocolerrors.go +++ b/app/protocol/protocolerrors/protocolerrors.go @@ -1,7 +1,7 @@ package protocolerrors import ( - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" "github.com/pkg/errors" ) diff --git a/app/rpc/log.go b/app/rpc/log.go index 24f24f448f..b15bd850d0 100644 --- a/app/rpc/log.go +++ b/app/rpc/log.go @@ -1,8 +1,8 @@ package rpc import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("RPCS") diff --git a/app/rpc/manager.go b/app/rpc/manager.go index c9479666b4..5ac38acc1e 100644 --- a/app/rpc/manager.go +++ b/app/rpc/manager.go @@ -1,17 +1,17 @@ package rpc import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/utxoindex" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/connmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/utxoindex" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/connmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" "github.com/pkg/errors" ) diff --git a/app/rpc/rpc.go b/app/rpc/rpc.go index 770b9eb221..34367df8e8 100644 --- a/app/rpc/rpc.go +++ b/app/rpc/rpc.go @@ -1,11 +1,11 @@ package rpc import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/app/rpc/rpchandlers" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/app/rpc/rpchandlers" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/rpc/rpccontext/chain_changed.go b/app/rpc/rpccontext/chain_changed.go index 101eb7d436..9c05295881 100644 --- a/app/rpc/rpccontext/chain_changed.go +++ b/app/rpc/rpccontext/chain_changed.go @@ -1,9 +1,9 @@ package rpccontext import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" ) // ConvertVirtualSelectedParentChainChangesToChainChangedNotificationMessage converts diff --git a/app/rpc/rpccontext/context.go b/app/rpc/rpccontext/context.go index e4674ef620..28e64c92e8 100644 --- a/app/rpc/rpccontext/context.go +++ b/app/rpc/rpccontext/context.go @@ -1,13 +1,13 @@ package rpccontext import ( - "github.com/kaspanet/kaspad/app/protocol" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/utxoindex" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/connmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/app/protocol" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/utxoindex" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/connmanager" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" ) // Context represents the RPC context diff --git a/app/rpc/rpccontext/log.go b/app/rpc/rpccontext/log.go index 3434da2477..bc8aa314bc 100644 --- a/app/rpc/rpccontext/log.go +++ b/app/rpc/rpccontext/log.go @@ -1,7 +1,7 @@ package rpccontext import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("RPCS") diff --git a/app/rpc/rpccontext/notificationmanager.go b/app/rpc/rpccontext/notificationmanager.go index bcd2db4d7c..144dc06f50 100644 --- a/app/rpc/rpccontext/notificationmanager.go +++ b/app/rpc/rpccontext/notificationmanager.go @@ -3,14 +3,14 @@ package rpccontext import ( "sync" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/utxoindex" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/utxoindex" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/rpc/rpccontext/utxos_by_addresses.go b/app/rpc/rpccontext/utxos_by_addresses.go index 00251589c9..ddfd67bdc7 100644 --- a/app/rpc/rpccontext/utxos_by_addresses.go +++ b/app/rpc/rpccontext/utxos_by_addresses.go @@ -2,12 +2,12 @@ package rpccontext import ( "encoding/hex" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/utxoindex" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/utxoindex" ) // ConvertUTXOOutpointEntryPairsToUTXOsByAddressesEntries converts diff --git a/app/rpc/rpccontext/verbosedata.go b/app/rpc/rpccontext/verbosedata.go index e42d3ed8d3..663b7de7a6 100644 --- a/app/rpc/rpccontext/verbosedata.go +++ b/app/rpc/rpccontext/verbosedata.go @@ -5,17 +5,17 @@ import ( "math" "math/big" - difficultyPackage "github.com/kaspanet/kaspad/util/difficulty" + difficultyPackage "github.com/coinexcom/kaspad/util/difficulty" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/dagconfig" ) // ErrBuildBlockVerboseDataInvalidBlock indicates that a block that was given to BuildBlockVerboseData is invalid. diff --git a/app/rpc/rpchandlers/add_peer.go b/app/rpc/rpchandlers/add_peer.go index 8563ebe428..e366bdb25b 100644 --- a/app/rpc/rpchandlers/add_peer.go +++ b/app/rpc/rpchandlers/add_peer.go @@ -1,10 +1,10 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/util/network" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/util/network" ) // HandleAddPeer handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/ban.go b/app/rpc/rpchandlers/ban.go index 0d47d01b3a..ee3e5cf615 100644 --- a/app/rpc/rpchandlers/ban.go +++ b/app/rpc/rpchandlers/ban.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "net" ) diff --git a/app/rpc/rpchandlers/estimate_network_hashes_per_second.go b/app/rpc/rpchandlers/estimate_network_hashes_per_second.go index 3e760bdd05..85883fa9b1 100644 --- a/app/rpc/rpchandlers/estimate_network_hashes_per_second.go +++ b/app/rpc/rpchandlers/estimate_network_hashes_per_second.go @@ -1,11 +1,11 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleEstimateNetworkHashesPerSecond handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_balance_by_address.go b/app/rpc/rpchandlers/get_balance_by_address.go index 7930a7cda5..c70a5fa06a 100644 --- a/app/rpc/rpchandlers/get_balance_by_address.go +++ b/app/rpc/rpchandlers/get_balance_by_address.go @@ -1,11 +1,11 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" ) diff --git a/app/rpc/rpchandlers/get_balances_by_addresses.go b/app/rpc/rpchandlers/get_balances_by_addresses.go index 200864cd6d..010151b6e6 100644 --- a/app/rpc/rpchandlers/get_balances_by_addresses.go +++ b/app/rpc/rpchandlers/get_balances_by_addresses.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/rpc/rpchandlers/get_block.go b/app/rpc/rpchandlers/get_block.go index 5dc5c05579..f8df8bf28c 100644 --- a/app/rpc/rpchandlers/get_block.go +++ b/app/rpc/rpchandlers/get_block.go @@ -1,10 +1,10 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/rpc/rpchandlers/get_block_count.go b/app/rpc/rpchandlers/get_block_count.go index 4033e8d7d3..3d757ce853 100644 --- a/app/rpc/rpchandlers/get_block_count.go +++ b/app/rpc/rpchandlers/get_block_count.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetBlockCount handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_block_dag_info.go b/app/rpc/rpchandlers/get_block_dag_info.go index 95a81790b3..0645590260 100644 --- a/app/rpc/rpchandlers/get_block_dag_info.go +++ b/app/rpc/rpchandlers/get_block_dag_info.go @@ -1,10 +1,10 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetBlockDAGInfo handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_block_template.go b/app/rpc/rpchandlers/get_block_template.go index 2ae3f882d9..c875306930 100644 --- a/app/rpc/rpchandlers/get_block_template.go +++ b/app/rpc/rpchandlers/get_block_template.go @@ -1,14 +1,14 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/util" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/util" + "github.com/coinexcom/kaspad/version" ) // HandleGetBlockTemplate handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_blocks.go b/app/rpc/rpchandlers/get_blocks.go index eb45fab01a..6a10629725 100644 --- a/app/rpc/rpchandlers/get_blocks.go +++ b/app/rpc/rpchandlers/get_blocks.go @@ -1,11 +1,11 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetBlocks handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_blocks_test.go b/app/rpc/rpchandlers/get_blocks_test.go index 38642845fb..56f2a0469f 100644 --- a/app/rpc/rpchandlers/get_blocks_test.go +++ b/app/rpc/rpchandlers/get_blocks_test.go @@ -5,18 +5,18 @@ import ( "sort" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" - - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/app/rpc/rpchandlers" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/miningmanager" - "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/domain/consensus/model" + + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/app/rpc/rpchandlers" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/miningmanager" + "github.com/coinexcom/kaspad/infrastructure/config" ) type fakeDomain struct { diff --git a/app/rpc/rpchandlers/get_coin_supply.go b/app/rpc/rpchandlers/get_coin_supply.go index 757b8a7f69..b192e568f1 100644 --- a/app/rpc/rpchandlers/get_coin_supply.go +++ b/app/rpc/rpchandlers/get_coin_supply.go @@ -1,10 +1,10 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetCoinSupply handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_connected_peer_info.go b/app/rpc/rpchandlers/get_connected_peer_info.go index 37e690b094..dad4f13412 100644 --- a/app/rpc/rpchandlers/get_connected_peer_info.go +++ b/app/rpc/rpchandlers/get_connected_peer_info.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetConnectedPeerInfo handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_current_network.go b/app/rpc/rpchandlers/get_current_network.go index 9e40b5874a..156dbab2a8 100644 --- a/app/rpc/rpchandlers/get_current_network.go +++ b/app/rpc/rpchandlers/get_current_network.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetCurrentNetwork handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_headers.go b/app/rpc/rpchandlers/get_headers.go index 747bf120b2..91ecdb0465 100644 --- a/app/rpc/rpchandlers/get_headers.go +++ b/app/rpc/rpchandlers/get_headers.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetHeaders handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_info.go b/app/rpc/rpchandlers/get_info.go index 308e47615d..260f23b801 100644 --- a/app/rpc/rpchandlers/get_info.go +++ b/app/rpc/rpchandlers/get_info.go @@ -1,10 +1,10 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/version" ) // HandleGetInfo handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_mempool_entries.go b/app/rpc/rpchandlers/get_mempool_entries.go index 4f5ec8c816..bf82376d15 100644 --- a/app/rpc/rpchandlers/get_mempool_entries.go +++ b/app/rpc/rpchandlers/get_mempool_entries.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetMempoolEntries handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_mempool_entries_by_addresses.go b/app/rpc/rpchandlers/get_mempool_entries_by_addresses.go index 0e9bf65f30..12f03a4ed2 100644 --- a/app/rpc/rpchandlers/get_mempool_entries_by_addresses.go +++ b/app/rpc/rpchandlers/get_mempool_entries_by_addresses.go @@ -1,12 +1,12 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/util" ) // HandleGetMempoolEntriesByAddresses handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_mempool_entry.go b/app/rpc/rpchandlers/get_mempool_entry.go index e2200ed5c8..3249f4c1d1 100644 --- a/app/rpc/rpchandlers/get_mempool_entry.go +++ b/app/rpc/rpchandlers/get_mempool_entry.go @@ -1,11 +1,11 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionid" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionid" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetMempoolEntry handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_peer_addresses.go b/app/rpc/rpchandlers/get_peer_addresses.go index 9c7d199481..b270918f52 100644 --- a/app/rpc/rpchandlers/get_peer_addresses.go +++ b/app/rpc/rpchandlers/get_peer_addresses.go @@ -4,9 +4,9 @@ import ( "net" "strconv" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetPeerAddresses handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_selected_tip_hash.go b/app/rpc/rpchandlers/get_selected_tip_hash.go index 8bdf4b8f9d..8380c14c84 100644 --- a/app/rpc/rpchandlers/get_selected_tip_hash.go +++ b/app/rpc/rpchandlers/get_selected_tip_hash.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetSelectedTipHash handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_subnetwork.go b/app/rpc/rpchandlers/get_subnetwork.go index 9d69b5da45..e1c07c6445 100644 --- a/app/rpc/rpchandlers/get_subnetwork.go +++ b/app/rpc/rpchandlers/get_subnetwork.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetSubnetwork handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_utxos_by_addresses.go b/app/rpc/rpchandlers/get_utxos_by_addresses.go index 3fde761435..3e0b47cd66 100644 --- a/app/rpc/rpchandlers/get_utxos_by_addresses.go +++ b/app/rpc/rpchandlers/get_utxos_by_addresses.go @@ -1,11 +1,11 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/util" ) // HandleGetUTXOsByAddresses handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_virtual_selected_parent_blue_score.go b/app/rpc/rpchandlers/get_virtual_selected_parent_blue_score.go index 3b96e67c77..3c1c3ccbaf 100644 --- a/app/rpc/rpchandlers/get_virtual_selected_parent_blue_score.go +++ b/app/rpc/rpchandlers/get_virtual_selected_parent_blue_score.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetVirtualSelectedParentBlueScore handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/get_virtual_selected_parent_chain_from_block.go b/app/rpc/rpchandlers/get_virtual_selected_parent_chain_from_block.go index aec4445c05..c34898826c 100644 --- a/app/rpc/rpchandlers/get_virtual_selected_parent_chain_from_block.go +++ b/app/rpc/rpchandlers/get_virtual_selected_parent_chain_from_block.go @@ -1,10 +1,10 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleGetVirtualSelectedParentChainFromBlock handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/log.go b/app/rpc/rpchandlers/log.go index f096d8c39d..6359efc078 100644 --- a/app/rpc/rpchandlers/log.go +++ b/app/rpc/rpchandlers/log.go @@ -1,8 +1,8 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("RPCS") diff --git a/app/rpc/rpchandlers/notify_block_added.go b/app/rpc/rpchandlers/notify_block_added.go index 2929aa6622..0e663aaec4 100644 --- a/app/rpc/rpchandlers/notify_block_added.go +++ b/app/rpc/rpchandlers/notify_block_added.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleNotifyBlockAdded handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/notify_finality_conflicts.go b/app/rpc/rpchandlers/notify_finality_conflicts.go index 7864797f69..5563fb904f 100644 --- a/app/rpc/rpchandlers/notify_finality_conflicts.go +++ b/app/rpc/rpchandlers/notify_finality_conflicts.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleNotifyFinalityConflicts handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/notify_new_block_template.go b/app/rpc/rpchandlers/notify_new_block_template.go index fc1dcedcdf..06befaa807 100644 --- a/app/rpc/rpchandlers/notify_new_block_template.go +++ b/app/rpc/rpchandlers/notify_new_block_template.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleNotifyNewBlockTemplate handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/notify_pruning_point_utxo_set_overrides.go b/app/rpc/rpchandlers/notify_pruning_point_utxo_set_overrides.go index 58cb833703..d225d3801b 100644 --- a/app/rpc/rpchandlers/notify_pruning_point_utxo_set_overrides.go +++ b/app/rpc/rpchandlers/notify_pruning_point_utxo_set_overrides.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleNotifyPruningPointUTXOSetOverrideRequest handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/notify_utxos_changed.go b/app/rpc/rpchandlers/notify_utxos_changed.go index e43f102043..20a9250f0f 100644 --- a/app/rpc/rpchandlers/notify_utxos_changed.go +++ b/app/rpc/rpchandlers/notify_utxos_changed.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleNotifyUTXOsChanged handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/notify_virtual_daa_score_changed.go b/app/rpc/rpchandlers/notify_virtual_daa_score_changed.go index d7d6d83296..ae01d99fdf 100644 --- a/app/rpc/rpchandlers/notify_virtual_daa_score_changed.go +++ b/app/rpc/rpchandlers/notify_virtual_daa_score_changed.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleNotifyVirtualDaaScoreChanged handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/notify_virtual_selected_parent_blue_score_changed.go b/app/rpc/rpchandlers/notify_virtual_selected_parent_blue_score_changed.go index 73ea4363e2..17a6dcdf0d 100644 --- a/app/rpc/rpchandlers/notify_virtual_selected_parent_blue_score_changed.go +++ b/app/rpc/rpchandlers/notify_virtual_selected_parent_blue_score_changed.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleNotifyVirtualSelectedParentBlueScoreChanged handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/notify_virtual_selected_parent_chain_changed.go b/app/rpc/rpchandlers/notify_virtual_selected_parent_chain_changed.go index 90119a5fbd..4ca0f754b2 100644 --- a/app/rpc/rpchandlers/notify_virtual_selected_parent_chain_changed.go +++ b/app/rpc/rpchandlers/notify_virtual_selected_parent_chain_changed.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleNotifyVirtualSelectedParentChainChanged handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/resolve_finality_conflict.go b/app/rpc/rpchandlers/resolve_finality_conflict.go index 1e3f88fb3e..ff04fe3b7e 100644 --- a/app/rpc/rpchandlers/resolve_finality_conflict.go +++ b/app/rpc/rpchandlers/resolve_finality_conflict.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleResolveFinalityConflict handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/shut_down.go b/app/rpc/rpchandlers/shut_down.go index 6b7bafdf0f..855ee43663 100644 --- a/app/rpc/rpchandlers/shut_down.go +++ b/app/rpc/rpchandlers/shut_down.go @@ -3,9 +3,9 @@ package rpchandlers import ( "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) const pauseBeforeShutDown = time.Second diff --git a/app/rpc/rpchandlers/stop_notifying_pruning_point_utxo_set_overrides.go b/app/rpc/rpchandlers/stop_notifying_pruning_point_utxo_set_overrides.go index 95c11f4e72..7452349697 100644 --- a/app/rpc/rpchandlers/stop_notifying_pruning_point_utxo_set_overrides.go +++ b/app/rpc/rpchandlers/stop_notifying_pruning_point_utxo_set_overrides.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleStopNotifyingPruningPointUTXOSetOverrideRequest handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/stop_notifying_utxos_changed.go b/app/rpc/rpchandlers/stop_notifying_utxos_changed.go index 2ef3763975..80e6113491 100644 --- a/app/rpc/rpchandlers/stop_notifying_utxos_changed.go +++ b/app/rpc/rpchandlers/stop_notifying_utxos_changed.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // HandleStopNotifyingUTXOsChanged handles the respectively named RPC command diff --git a/app/rpc/rpchandlers/submit_block.go b/app/rpc/rpchandlers/submit_block.go index 3a675a56b8..f53f33fb34 100644 --- a/app/rpc/rpchandlers/submit_block.go +++ b/app/rpc/rpchandlers/submit_block.go @@ -2,12 +2,12 @@ package rpchandlers import ( "encoding/json" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/rpc/rpchandlers/submit_transaction.go b/app/rpc/rpchandlers/submit_transaction.go index e1729fcd02..6d31919457 100644 --- a/app/rpc/rpchandlers/submit_transaction.go +++ b/app/rpc/rpchandlers/submit_transaction.go @@ -1,11 +1,11 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/app/rpc/rpchandlers/unban.go b/app/rpc/rpchandlers/unban.go index db3e935d7f..8fe48d625c 100644 --- a/app/rpc/rpchandlers/unban.go +++ b/app/rpc/rpchandlers/unban.go @@ -1,9 +1,9 @@ package rpchandlers import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/rpc/rpccontext" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "net" ) diff --git a/cmd/genkeypair/config.go b/cmd/genkeypair/config.go index a9b8ade2e2..73840498d4 100644 --- a/cmd/genkeypair/config.go +++ b/cmd/genkeypair/config.go @@ -1,8 +1,8 @@ package main import ( + "github.com/coinexcom/kaspad/infrastructure/config" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/infrastructure/config" ) type configFlags struct { diff --git a/cmd/genkeypair/main.go b/cmd/genkeypair/main.go index e54e0aed48..09b9c3eb2c 100644 --- a/cmd/genkeypair/main.go +++ b/cmd/genkeypair/main.go @@ -2,8 +2,8 @@ package main import ( "fmt" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/util" ) func main() { diff --git a/cmd/kaspactl/README.md b/cmd/kaspactl/README.md index 874db75a81..a72c233de7 100644 --- a/cmd/kaspactl/README.md +++ b/cmd/kaspactl/README.md @@ -22,7 +22,7 @@ $ go version - Run the following commands to obtain and install kaspad including all dependencies: ```bash -$ git clone https://github.com/kaspanet/kaspad +$ git clone https://github.com/coinexcom/kaspad $ cd kaspad/cmd/kaspactl $ go install . ``` diff --git a/cmd/kaspactl/command_parser.go b/cmd/kaspactl/command_parser.go index fd39545677..6f560c589e 100644 --- a/cmd/kaspactl/command_parser.go +++ b/cmd/kaspactl/command_parser.go @@ -8,7 +8,7 @@ import ( "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" "github.com/pkg/errors" ) diff --git a/cmd/kaspactl/commands.go b/cmd/kaspactl/commands.go index d56d1b886e..8498666165 100644 --- a/cmd/kaspactl/commands.go +++ b/cmd/kaspactl/commands.go @@ -5,7 +5,7 @@ import ( "reflect" "strings" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" ) var commandTypes = []reflect.Type{ diff --git a/cmd/kaspactl/config.go b/cmd/kaspactl/config.go index c37f8874b6..08a2c8e3d6 100644 --- a/cmd/kaspactl/config.go +++ b/cmd/kaspactl/config.go @@ -1,8 +1,8 @@ package main import ( + "github.com/coinexcom/kaspad/infrastructure/config" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/infrastructure/config" "github.com/pkg/errors" ) diff --git a/cmd/kaspactl/docker/Dockerfile b/cmd/kaspactl/docker/Dockerfile index 009e736b12..a7f3bdc5f0 100644 --- a/cmd/kaspactl/docker/Dockerfile +++ b/cmd/kaspactl/docker/Dockerfile @@ -1,9 +1,9 @@ # -- multistage docker build: stage #1: build stage FROM golang:1.19-alpine AS build -RUN mkdir -p /go/src/github.com/kaspanet/kaspad +RUN mkdir -p /go/src/github.com/coinexcom/kaspad -WORKDIR /go/src/github.com/kaspanet/kaspad +WORKDIR /go/src/github.com/coinexcom/kaspad RUN apk add --no-cache curl git openssh binutils gcc musl-dev @@ -14,7 +14,7 @@ RUN go mod download COPY . . -WORKDIR /go/src/github.com/kaspanet/kaspad/cmd/kaspactl +WORKDIR /go/src/github.com/coinexcom/kaspad/cmd/kaspactl RUN GOOS=linux go build -a -installsuffix cgo -o kaspactl . @@ -24,7 +24,7 @@ WORKDIR /app RUN apk add --no-cache ca-certificates tini -COPY --from=build /go/src/github.com/kaspanet/kaspad/cmd/kaspactl/kaspactl /app/ +COPY --from=build /go/src/github.com/coinexcom/kaspad/cmd/kaspactl/kaspactl /app/ USER nobody ENTRYPOINT [ "/sbin/tini", "--" ] diff --git a/cmd/kaspactl/main.go b/cmd/kaspactl/main.go index df01b794da..c21bfb5c45 100644 --- a/cmd/kaspactl/main.go +++ b/cmd/kaspactl/main.go @@ -2,16 +2,16 @@ package main import ( "fmt" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/version" "os" "time" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" "github.com/pkg/errors" "google.golang.org/protobuf/encoding/protojson" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient/grpcclient" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient/grpcclient" ) func main() { diff --git a/cmd/kaspactl/reflection_helpers.go b/cmd/kaspactl/reflection_helpers.go index 4912292872..9e27fe162d 100644 --- a/cmd/kaspactl/reflection_helpers.go +++ b/cmd/kaspactl/reflection_helpers.go @@ -4,7 +4,7 @@ import ( "reflect" "unicode" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" ) // protobuf generates the command types with two types: diff --git a/cmd/kaspaminer/README.md b/cmd/kaspaminer/README.md index 4cdbb939f9..dea7d2a621 100644 --- a/cmd/kaspaminer/README.md +++ b/cmd/kaspaminer/README.md @@ -22,7 +22,7 @@ $ go version - Run the following commands to obtain and install kaspad including all dependencies: ```bash -$ git clone https://github.com/kaspanet/kaspad +$ git clone https://github.com/coinexcom/kaspad $ cd kaspad/cmd/kaspaminer $ go install . ``` diff --git a/cmd/kaspaminer/client.go b/cmd/kaspaminer/client.go index 2602eee197..d141346ac2 100644 --- a/cmd/kaspaminer/client.go +++ b/cmd/kaspaminer/client.go @@ -1,9 +1,9 @@ package main import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient" "github.com/pkg/errors" "time" ) diff --git a/cmd/kaspaminer/config.go b/cmd/kaspaminer/config.go index 2c459f86af..ee1e8233c3 100644 --- a/cmd/kaspaminer/config.go +++ b/cmd/kaspaminer/config.go @@ -7,13 +7,13 @@ import ( "strconv" "strings" - "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" + "github.com/coinexcom/kaspad/version" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/version" ) const ( diff --git a/cmd/kaspaminer/docker/Dockerfile b/cmd/kaspaminer/docker/Dockerfile index 1f4ea91aed..fca3e92cfe 100644 --- a/cmd/kaspaminer/docker/Dockerfile +++ b/cmd/kaspaminer/docker/Dockerfile @@ -1,9 +1,9 @@ # -- multistage docker build: stage #1: build stage FROM golang:1.19-alpine AS build -RUN mkdir -p /go/src/github.com/kaspanet/kaspad +RUN mkdir -p /go/src/github.com/coinexcom/kaspad -WORKDIR /go/src/github.com/kaspanet/kaspad +WORKDIR /go/src/github.com/coinexcom/kaspad RUN apk add --no-cache curl git openssh binutils gcc musl-dev @@ -14,7 +14,7 @@ RUN go mod download COPY . . -WORKDIR /go/src/github.com/kaspanet/kaspad/cmd/kaspaminer +WORKDIR /go/src/github.com/coinexcom/kaspad/cmd/kaspaminer RUN GOOS=linux go build -a -installsuffix cgo -o kaspaminer . # --- multistage docker build: stage #2: runtime image @@ -23,7 +23,7 @@ WORKDIR /app RUN apk add --no-cache ca-certificates tini -COPY --from=build /go/src/github.com/kaspanet/kaspad/cmd/kaspaminer/kaspaminer /app/ +COPY --from=build /go/src/github.com/coinexcom/kaspad/cmd/kaspaminer/kaspaminer /app/ USER nobody ENTRYPOINT [ "/sbin/tini", "--" ] diff --git a/cmd/kaspaminer/log.go b/cmd/kaspaminer/log.go index 1983ec80b2..0efa16579a 100644 --- a/cmd/kaspaminer/log.go +++ b/cmd/kaspaminer/log.go @@ -2,8 +2,8 @@ package main import ( "fmt" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" "os" ) diff --git a/cmd/kaspaminer/main.go b/cmd/kaspaminer/main.go index d94efaec1a..ea33cb7bdc 100644 --- a/cmd/kaspaminer/main.go +++ b/cmd/kaspaminer/main.go @@ -4,17 +4,17 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/util" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/version" "github.com/pkg/errors" _ "net/http/pprof" - "github.com/kaspanet/kaspad/infrastructure/os/signal" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/infrastructure/os/signal" + "github.com/coinexcom/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/profiling" ) func main() { diff --git a/cmd/kaspaminer/mineloop.go b/cmd/kaspaminer/mineloop.go index 1749b77b90..82104339b9 100644 --- a/cmd/kaspaminer/mineloop.go +++ b/cmd/kaspaminer/mineloop.go @@ -2,18 +2,18 @@ package main import ( nativeerrors "errors" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/version" "math/rand" "sync/atomic" "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/cmd/kaspaminer/templatemanager" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/pow" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/cmd/kaspaminer/templatemanager" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/pow" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" ) diff --git a/cmd/kaspaminer/templatemanager/templatemanager.go b/cmd/kaspaminer/templatemanager/templatemanager.go index dc24f979e0..4b352bd95a 100644 --- a/cmd/kaspaminer/templatemanager/templatemanager.go +++ b/cmd/kaspaminer/templatemanager/templatemanager.go @@ -1,9 +1,9 @@ package templatemanager import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/pow" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/pow" "sync" ) diff --git a/cmd/kaspawallet/balance.go b/cmd/kaspawallet/balance.go index 1f3df3feb9..ced29c62be 100644 --- a/cmd/kaspawallet/balance.go +++ b/cmd/kaspawallet/balance.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/client" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/utils" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/client" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/utils" ) func balance(conf *balanceConfig) error { diff --git a/cmd/kaspawallet/broadcast.go b/cmd/kaspawallet/broadcast.go index c25a580f5d..34a3d2b72d 100644 --- a/cmd/kaspawallet/broadcast.go +++ b/cmd/kaspawallet/broadcast.go @@ -6,8 +6,8 @@ import ( "io/ioutil" "strings" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/client" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/client" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" "github.com/pkg/errors" ) diff --git a/cmd/kaspawallet/config.go b/cmd/kaspawallet/config.go index 75ef147566..41307428d2 100644 --- a/cmd/kaspawallet/config.go +++ b/cmd/kaspawallet/config.go @@ -1,7 +1,7 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/config" "github.com/pkg/errors" "os" diff --git a/cmd/kaspawallet/create.go b/cmd/kaspawallet/create.go index 69268a6ed3..0442a3fbb3 100644 --- a/cmd/kaspawallet/create.go +++ b/cmd/kaspawallet/create.go @@ -5,12 +5,12 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/bip32" - "github.com/kaspanet/kaspad/cmd/kaspawallet/utils" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/bip32" + "github.com/coinexcom/kaspad/cmd/kaspawallet/utils" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/cmd/kaspawallet/keys" + "github.com/coinexcom/kaspad/cmd/kaspawallet/keys" ) func create(conf *createConfig) error { diff --git a/cmd/kaspawallet/create_unsigned_tx.go b/cmd/kaspawallet/create_unsigned_tx.go index f213bc9587..bcd4aa6788 100644 --- a/cmd/kaspawallet/create_unsigned_tx.go +++ b/cmd/kaspawallet/create_unsigned_tx.go @@ -5,9 +5,9 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/client" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/utils" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/client" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/utils" ) func createUnsignedTransaction(conf *createUnsignedTransactionConfig) error { diff --git a/cmd/kaspawallet/daemon/client/client.go b/cmd/kaspawallet/daemon/client/client.go index bc25753edd..9d89abfd97 100644 --- a/cmd/kaspawallet/daemon/client/client.go +++ b/cmd/kaspawallet/daemon/client/client.go @@ -2,12 +2,12 @@ package client import ( "context" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/server" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/server" "time" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" "google.golang.org/grpc" ) diff --git a/cmd/kaspawallet/daemon/pb/kaspawalletd.proto b/cmd/kaspawallet/daemon/pb/kaspawalletd.proto index db1f990a1b..abb6fc2145 100644 --- a/cmd/kaspawallet/daemon/pb/kaspawalletd.proto +++ b/cmd/kaspawallet/daemon/pb/kaspawalletd.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb"; +option go_package = "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb"; package kaspawalletd; service kaspawalletd { diff --git a/cmd/kaspawallet/daemon/server/address.go b/cmd/kaspawallet/daemon/server/address.go index acd80c6b48..54b43763a4 100644 --- a/cmd/kaspawallet/daemon/server/address.go +++ b/cmd/kaspawallet/daemon/server/address.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" ) diff --git a/cmd/kaspawallet/daemon/server/balance.go b/cmd/kaspawallet/daemon/server/balance.go index de1b040066..bc7a6c64f0 100644 --- a/cmd/kaspawallet/daemon/server/balance.go +++ b/cmd/kaspawallet/daemon/server/balance.go @@ -4,8 +4,8 @@ import ( "context" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" ) type balancesType struct{ available, pending uint64 } diff --git a/cmd/kaspawallet/daemon/server/broadcast.go b/cmd/kaspawallet/daemon/server/broadcast.go index 0d01ff6cf7..5847da9bfb 100644 --- a/cmd/kaspawallet/daemon/server/broadcast.go +++ b/cmd/kaspawallet/daemon/server/broadcast.go @@ -4,13 +4,13 @@ import ( "context" "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient" "github.com/pkg/errors" ) diff --git a/cmd/kaspawallet/daemon/server/common.go b/cmd/kaspawallet/daemon/server/common.go index 9da6314a06..b1b7e0f440 100644 --- a/cmd/kaspawallet/daemon/server/common.go +++ b/cmd/kaspawallet/daemon/server/common.go @@ -1,6 +1,6 @@ package server -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" type walletUTXO struct { Outpoint *externalapi.DomainOutpoint diff --git a/cmd/kaspawallet/daemon/server/create_unsigned_transaction.go b/cmd/kaspawallet/daemon/server/create_unsigned_transaction.go index 83928fa139..f0c4c23f9a 100644 --- a/cmd/kaspawallet/daemon/server/create_unsigned_transaction.go +++ b/cmd/kaspawallet/daemon/server/create_unsigned_transaction.go @@ -2,12 +2,9 @@ package server import ( "context" - "fmt" - - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" "github.com/pkg/errors" ) @@ -22,74 +19,12 @@ const minChangeTarget = constants.SompiPerKaspa / 5 func (s *server) CreateUnsignedTransactions(_ context.Context, request *pb.CreateUnsignedTransactionsRequest) ( *pb.CreateUnsignedTransactionsResponse, error, ) { - s.lock.Lock() - defer s.lock.Unlock() - - unsignedTransactions, err := s.createUnsignedTransactions(request.Address, request.Amount, request.IsSendAll, - request.From, request.UseExistingChangeAddress) - if err != nil { - return nil, err - } - return &pb.CreateUnsignedTransactionsResponse{UnsignedTransactions: unsignedTransactions}, nil + return &pb.CreateUnsignedTransactionsResponse{}, nil } func (s *server) createUnsignedTransactions(address string, amount uint64, isSendAll bool, fromAddressesString []string, useExistingChangeAddress bool) ([][]byte, error) { - if !s.isSynced() { - return nil, errors.Errorf("wallet daemon is not synced yet, %s", s.formatSyncStateReport()) - } - // make sure address string is correct before proceeding to a - // potentially long UTXO refreshment operation - toAddress, err := util.DecodeAddress(address, s.params.Prefix) - if err != nil { - return nil, err - } - - var fromAddresses []*walletAddress - for _, from := range fromAddressesString { - fromAddress, exists := s.addressSet[from] - if !exists { - return nil, fmt.Errorf("specified from address %s does not exists", from) - } - fromAddresses = append(fromAddresses, fromAddress) - } - - selectedUTXOs, spendValue, changeSompi, err := s.selectUTXOs(amount, isSendAll, feePerInput, fromAddresses) - if err != nil { - return nil, err - } - - if len(selectedUTXOs) == 0 { - return nil, errors.Errorf("couldn't find funds to spend") - } - - changeAddress, changeWalletAddress, err := s.changeAddress(useExistingChangeAddress, fromAddresses) - if err != nil { - return nil, err - } - - payments := []*libkaspawallet.Payment{{ - Address: toAddress, - Amount: spendValue, - }} - if changeSompi > 0 { - payments = append(payments, &libkaspawallet.Payment{ - Address: changeAddress, - Amount: changeSompi, - }) - } - unsignedTransaction, err := libkaspawallet.CreateUnsignedTransaction(s.keysFile.ExtendedPublicKeys, - s.keysFile.MinimumSignatures, - payments, selectedUTXOs) - if err != nil { - return nil, err - } - - unsignedTransactions, err := s.maybeAutoCompoundTransaction(unsignedTransaction, toAddress, changeAddress, changeWalletAddress) - if err != nil { - return nil, err - } - return unsignedTransactions, nil + return nil, nil } func (s *server) selectUTXOs(spendAmount uint64, isSendAll bool, feePerInput uint64, fromAddresses []*walletAddress) ( diff --git a/cmd/kaspawallet/daemon/server/external_spendable_utxos.go b/cmd/kaspawallet/daemon/server/external_spendable_utxos.go index 15d94cd06e..98aa49468e 100644 --- a/cmd/kaspawallet/daemon/server/external_spendable_utxos.go +++ b/cmd/kaspawallet/daemon/server/external_spendable_utxos.go @@ -3,10 +3,10 @@ package server import ( "context" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/util" ) func (s *server) GetExternalSpendableUTXOs(_ context.Context, request *pb.GetExternalSpendableUTXOsRequest) (*pb.GetExternalSpendableUTXOsResponse, error) { diff --git a/cmd/kaspawallet/daemon/server/log.go b/cmd/kaspawallet/daemon/server/log.go index 82a77a34a0..8ac52d0477 100644 --- a/cmd/kaspawallet/daemon/server/log.go +++ b/cmd/kaspawallet/daemon/server/log.go @@ -5,10 +5,10 @@ import ( "os" "path/filepath" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/util" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/cmd/kaspawallet/daemon/server/rpc.go b/cmd/kaspawallet/daemon/server/rpc.go index a80fe44522..c91a7b21a0 100644 --- a/cmd/kaspawallet/daemon/server/rpc.go +++ b/cmd/kaspawallet/daemon/server/rpc.go @@ -3,8 +3,8 @@ package server import ( "time" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient" ) func connectToRPC(params *dagconfig.Params, rpcServer string, timeout uint32) (*rpcclient.RPCClient, error) { diff --git a/cmd/kaspawallet/daemon/server/send.go b/cmd/kaspawallet/daemon/server/send.go index 68ff8ca74e..32e5c40717 100644 --- a/cmd/kaspawallet/daemon/server/send.go +++ b/cmd/kaspawallet/daemon/server/send.go @@ -3,7 +3,7 @@ package server import ( "context" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" ) func (s *server) Send(_ context.Context, request *pb.SendRequest) (*pb.SendResponse, error) { diff --git a/cmd/kaspawallet/daemon/server/server.go b/cmd/kaspawallet/daemon/server/server.go index 1b43dac8cf..1e8bed64dc 100644 --- a/cmd/kaspawallet/daemon/server/server.go +++ b/cmd/kaspawallet/daemon/server/server.go @@ -8,20 +8,20 @@ import ( "sync/atomic" "time" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/version" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/util/txmass" + "github.com/coinexcom/kaspad/util/txmass" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/util/profiling" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/keys" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" - "github.com/kaspanet/kaspad/infrastructure/os/signal" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/keys" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient" + "github.com/coinexcom/kaspad/infrastructure/os/signal" + "github.com/coinexcom/kaspad/util/panics" "github.com/pkg/errors" "google.golang.org/grpc" diff --git a/cmd/kaspawallet/daemon/server/shutdown.go b/cmd/kaspawallet/daemon/server/shutdown.go index 0f885003fd..67df871de7 100644 --- a/cmd/kaspawallet/daemon/server/shutdown.go +++ b/cmd/kaspawallet/daemon/server/shutdown.go @@ -2,7 +2,7 @@ package server import ( "context" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" ) func (s *server) Shutdown(ctx context.Context, request *pb.ShutdownRequest) (*pb.ShutdownResponse, error) { diff --git a/cmd/kaspawallet/daemon/server/sign.go b/cmd/kaspawallet/daemon/server/sign.go index 5a9c2d0803..54ef0d6a47 100644 --- a/cmd/kaspawallet/daemon/server/sign.go +++ b/cmd/kaspawallet/daemon/server/sign.go @@ -3,9 +3,9 @@ package server import ( "context" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" ) func (s *server) Sign(_ context.Context, request *pb.SignRequest) (*pb.SignResponse, error) { diff --git a/cmd/kaspawallet/daemon/server/split_transaction.go b/cmd/kaspawallet/daemon/server/split_transaction.go index 2f71fb9c2a..078d7eedd0 100644 --- a/cmd/kaspawallet/daemon/server/split_transaction.go +++ b/cmd/kaspawallet/daemon/server/split_transaction.go @@ -1,17 +1,16 @@ package server import ( - "github.com/kaspanet/go-secp256k1" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + "github.com/coinexcom/kaspad/util" ) // maybeAutoCompoundTransaction checks if a transaction's mass is higher that what is allowed for a standard @@ -222,30 +221,7 @@ func (s *server) createSplitTransaction(transaction *serialization.PartiallySign } func (s *server) estimateMassAfterSignatures(transaction *serialization.PartiallySignedTransaction) (uint64, error) { - transaction = transaction.Clone() - var signatureSize uint64 - if s.keysFile.ECDSA { - signatureSize = secp256k1.SerializedECDSASignatureSize - } else { - signatureSize = secp256k1.SerializedSchnorrSignatureSize - } - - for i, input := range transaction.PartiallySignedInputs { - for j, pubKeyPair := range input.PubKeySignaturePairs { - if uint32(j) >= s.keysFile.MinimumSignatures { - break - } - pubKeyPair.Signature = make([]byte, signatureSize+1) // +1 for SigHashType - } - transaction.Tx.Inputs[i].SigOpCount = byte(len(input.PubKeySignaturePairs)) - } - - transactionWithSignatures, err := libkaspawallet.ExtractTransactionDeserialized(transaction, s.keysFile.ECDSA) - if err != nil { - return 0, err - } - - return s.txMassCalculator.CalculateTransactionMass(transactionWithSignatures), nil + return 0, nil } func (s *server) moreUTXOsForMergeTransaction(alreadySelectedUTXOs []*libkaspawallet.UTXO, requiredAmount uint64) ( diff --git a/cmd/kaspawallet/daemon/server/split_transaction_test.go b/cmd/kaspawallet/daemon/server/split_transaction_test.go index 6d87470d31..4d35cd5b33 100644 --- a/cmd/kaspawallet/daemon/server/split_transaction_test.go +++ b/cmd/kaspawallet/daemon/server/split_transaction_test.go @@ -3,21 +3,21 @@ package server import ( "testing" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/serialization" - "github.com/kaspanet/kaspad/cmd/kaspawallet/keys" - "github.com/kaspanet/kaspad/util/txmass" + "github.com/coinexcom/kaspad/cmd/kaspawallet/keys" + "github.com/coinexcom/kaspad/util/txmass" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestEstimateMassAfterSignatures(t *testing.T) { diff --git a/cmd/kaspawallet/daemon/server/sync.go b/cmd/kaspawallet/daemon/server/sync.go index 6aa7bd2b4e..fbabc4716b 100644 --- a/cmd/kaspawallet/daemon/server/sync.go +++ b/cmd/kaspawallet/daemon/server/sync.go @@ -5,9 +5,9 @@ import ( "sort" "time" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/cmd/kaspawallet/daemon/server/version.go b/cmd/kaspawallet/daemon/server/version.go index 046fbc9820..1d8df86acc 100644 --- a/cmd/kaspawallet/daemon/server/version.go +++ b/cmd/kaspawallet/daemon/server/version.go @@ -2,8 +2,8 @@ package server import ( "context" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/version" ) func (s *server) GetVersion(_ context.Context, _ *pb.GetVersionRequest) (*pb.GetVersionResponse, error) { diff --git a/cmd/kaspawallet/docker/Dockerfile b/cmd/kaspawallet/docker/Dockerfile index 1b612eaedc..9c17e3aad1 100644 --- a/cmd/kaspawallet/docker/Dockerfile +++ b/cmd/kaspawallet/docker/Dockerfile @@ -1,9 +1,9 @@ # -- multistage docker build: stage #1: build stage FROM golang:1.18-alpine AS build -RUN mkdir -p /go/src/github.com/kaspanet/kaspad +RUN mkdir -p /go/src/github.com/coinexcom/kaspad -WORKDIR /go/src/github.com/kaspanet/kaspad +WORKDIR /go/src/github.com/coinexcom/kaspad RUN apk add --no-cache curl git openssh binutils gcc musl-dev @@ -14,7 +14,7 @@ RUN go mod download COPY . . -WORKDIR /go/src/github.com/kaspanet/kaspad/cmd/kaspawallet +WORKDIR /go/src/github.com/coinexcom/kaspad/cmd/kaspawallet RUN GOOS=linux go build -a -installsuffix cgo -o kaspawallet . # --- multistage docker build: stage #2: runtime image @@ -23,7 +23,7 @@ WORKDIR /app RUN apk add --no-cache ca-certificates tini -COPY --from=build /go/src/github.com/kaspanet/kaspad/cmd/kaspawallet/kaspawallet /app/ +COPY --from=build /go/src/github.com/coinexcom/kaspad/cmd/kaspawallet/kaspawallet /app/ USER nobody ENTRYPOINT [ "/sbin/tini", "--" ] diff --git a/cmd/kaspawallet/dump_unencrypted_data.go b/cmd/kaspawallet/dump_unencrypted_data.go index a01f6d4e97..3c1b33b22d 100644 --- a/cmd/kaspawallet/dump_unencrypted_data.go +++ b/cmd/kaspawallet/dump_unencrypted_data.go @@ -5,9 +5,9 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/cmd/kaspawallet/keys" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/cmd/kaspawallet/utils" + "github.com/coinexcom/kaspad/cmd/kaspawallet/keys" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/utils" "github.com/pkg/errors" ) diff --git a/cmd/kaspawallet/get_daemon_version.go b/cmd/kaspawallet/get_daemon_version.go index 2e11fbb6f8..9eaac5be5f 100644 --- a/cmd/kaspawallet/get_daemon_version.go +++ b/cmd/kaspawallet/get_daemon_version.go @@ -3,8 +3,8 @@ package main import ( "context" "fmt" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/client" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/client" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" ) func getDaemonVersion(conf *getDaemonVersionConfig) error { diff --git a/cmd/kaspawallet/keys/create.go b/cmd/kaspawallet/keys/create.go index 43402e0652..a4f861f98e 100644 --- a/cmd/kaspawallet/keys/create.go +++ b/cmd/kaspawallet/keys/create.go @@ -7,9 +7,9 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/cmd/kaspawallet/utils" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/utils" + "github.com/coinexcom/kaspad/domain/dagconfig" "github.com/pkg/errors" "github.com/tyler-smith/go-bip39" ) diff --git a/cmd/kaspawallet/keys/keys.go b/cmd/kaspawallet/keys/keys.go index d81eb7908b..5d081033b8 100644 --- a/cmd/kaspawallet/keys/keys.go +++ b/cmd/kaspawallet/keys/keys.go @@ -12,10 +12,10 @@ import ( "runtime" "strings" - "github.com/kaspanet/kaspad/cmd/kaspawallet/utils" + "github.com/coinexcom/kaspad/cmd/kaspawallet/utils" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" "golang.org/x/crypto/argon2" "golang.org/x/crypto/chacha20poly1305" diff --git a/cmd/kaspawallet/libkaspawallet/bip32/child_key_derivation.go b/cmd/kaspawallet/libkaspawallet/bip32/child_key_derivation.go index e92927ccd3..71758e0f60 100644 --- a/cmd/kaspawallet/libkaspawallet/bip32/child_key_derivation.go +++ b/cmd/kaspawallet/libkaspawallet/bip32/child_key_derivation.go @@ -1,8 +1,6 @@ package bip32 import ( - "encoding/binary" - "github.com/kaspanet/go-secp256k1" "github.com/pkg/errors" ) @@ -10,27 +8,7 @@ const hardenedIndexStart = 0x80000000 // NewMaster returns a new extended private key based on the given seed and version func NewMaster(seed []byte, version [4]byte) (*ExtendedKey, error) { - mac := newHMACWriter([]byte("Bitcoin seed")) - mac.InfallibleWrite(seed) - I := mac.Sum(nil) - - var iL, iR [32]byte - copy(iL[:], I[:32]) - copy(iR[:], I[32:]) - - privateKey, err := secp256k1.DeserializeECDSAPrivateKeyFromSlice(iL[:]) - if err != nil { - return nil, err - } - - return &ExtendedKey{ - privateKey: privateKey, - Version: version, - Depth: 0, - ParentFingerprint: [4]byte{}, - ChildNumber: 0, - ChainCode: iR, - }, nil + return nil, errors.New("fail secp256k1") } func isHardened(i uint32) bool { @@ -39,114 +17,5 @@ func isHardened(i uint32) bool { // Child return the i'th derived child of extKey. func (extKey *ExtendedKey) Child(i uint32) (*ExtendedKey, error) { - I, err := extKey.calcI(i) - if err != nil { - return nil, err - } - - var iL, iR [32]byte - copy(iL[:], I[:32]) - copy(iR[:], I[32:]) - - fingerPrint, err := extKey.calcFingerprint() - if err != nil { - return nil, err - } - - childExt := &ExtendedKey{ - Version: extKey.Version, - Depth: extKey.Depth + 1, - ParentFingerprint: fingerPrint, - ChildNumber: i, - ChainCode: iR, - } - - if extKey.privateKey != nil { - childExt.privateKey, err = privateKeyAdd(extKey.privateKey, iL) - if err != nil { - return nil, err - } - } else { - publicKey, err := extKey.PublicKey() - if err != nil { - return nil, err - } - - childExt.publicKey, err = pointAdd(publicKey, iL) - if err != nil { - return nil, err - } - } - - return childExt, nil -} - -func (extKey *ExtendedKey) calcFingerprint() ([4]byte, error) { - publicKey, err := extKey.PublicKey() - if err != nil { - return [4]byte{}, err - } - - serializedPoint, err := publicKey.Serialize() - if err != nil { - return [4]byte{}, err - } - - hash := hash160(serializedPoint[:]) - var fingerprint [4]byte - copy(fingerprint[:], hash[:4]) - return fingerprint, nil -} - -func privateKeyAdd(k *secp256k1.ECDSAPrivateKey, tweak [32]byte) (*secp256k1.ECDSAPrivateKey, error) { - kCopy := *k - err := kCopy.Add(tweak) - if err != nil { - return nil, err - } - - return &kCopy, nil -} - -func (extKey *ExtendedKey) calcI(i uint32) ([]byte, error) { - if isHardened(i) && !extKey.IsPrivate() { - return nil, errors.Errorf("Cannot calculate hardened child for public key") - } - - mac := newHMACWriter(extKey.ChainCode[:]) - if isHardened(i) { - mac.InfallibleWrite([]byte{0x00}) - mac.InfallibleWrite(extKey.privateKey.Serialize()[:]) - } else { - publicKey, err := extKey.PublicKey() - if err != nil { - return nil, err - } - - serializedPublicKey, err := publicKey.Serialize() - if err != nil { - return nil, errors.Wrap(err, "error serializing public key") - } - - mac.InfallibleWrite(serializedPublicKey[:]) - } - - mac.InfallibleWrite(serializeUint32(i)) - return mac.Sum(nil), nil -} - -func serializeUint32(v uint32) []byte { - serialized := make([]byte, 4) - binary.BigEndian.PutUint32(serialized, v) - return serialized -} - -func pointAdd(point *secp256k1.ECDSAPublicKey, tweak [32]byte) (*secp256k1.ECDSAPublicKey, error) { - pointCopy := *point - err := pointCopy.Add(tweak) - if err != nil { - return nil, err - } - - return &pointCopy, nil + return nil, errors.New("fail") } diff --git a/cmd/kaspawallet/libkaspawallet/bip32/extended_key.go b/cmd/kaspawallet/libkaspawallet/bip32/extended_key.go index bde63b250c..36472b3e9c 100644 --- a/cmd/kaspawallet/libkaspawallet/bip32/extended_key.go +++ b/cmd/kaspawallet/libkaspawallet/bip32/extended_key.go @@ -1,15 +1,13 @@ package bip32 import ( - "github.com/btcsuite/btcutil/base58" - "github.com/kaspanet/go-secp256k1" "github.com/pkg/errors" ) // ExtendedKey is a bip32 extended key type ExtendedKey struct { - privateKey *secp256k1.ECDSAPrivateKey - publicKey *secp256k1.ECDSAPublicKey + privateKey interface{} + publicKey interface{} Version [4]byte Depth uint8 ParentFingerprint [4]byte @@ -18,23 +16,13 @@ type ExtendedKey struct { } // PrivateKey returns the ECDSA private key associated with the extended key -func (extKey *ExtendedKey) PrivateKey() *secp256k1.ECDSAPrivateKey { +func (extKey *ExtendedKey) PrivateKey() interface{} { return extKey.privateKey } // PublicKey returns the ECDSA public key associated with the extended key -func (extKey *ExtendedKey) PublicKey() (*secp256k1.ECDSAPublicKey, error) { - if extKey.publicKey != nil { - return extKey.publicKey, nil - } - - publicKey, err := extKey.privateKey.ECDSAPublicKey() - if err != nil { - return nil, err - } - - extKey.publicKey = publicKey - return publicKey, nil +func (extKey *ExtendedKey) PublicKey() (interface{}, error) { + return nil, errors.New("fail") } // IsPrivate returns whether the extended key is private @@ -96,9 +84,5 @@ func (extKey *ExtendedKey) path(path *path) (*ExtendedKey, error) { } func (extKey *ExtendedKey) String() string { - serialized, err := extKey.serialize() - if err != nil { - panic(errors.Wrap(err, "error serializing key")) - } - return base58.Encode(serialized) + panic("error serializing key") } diff --git a/cmd/kaspawallet/libkaspawallet/bip32/serialization.go b/cmd/kaspawallet/libkaspawallet/bip32/serialization.go index ee4a4bbe63..b4d4efc5a6 100644 --- a/cmd/kaspawallet/libkaspawallet/bip32/serialization.go +++ b/cmd/kaspawallet/libkaspawallet/bip32/serialization.go @@ -1,9 +1,6 @@ package bip32 import ( - "encoding/binary" - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/bip32/base58" "github.com/pkg/errors" ) @@ -27,122 +24,5 @@ const extendedKeySerializationLen = versionSerializationLen + // DeserializeExtendedKey deserialized the given base58 string and returns an extended key func DeserializeExtendedKey(extKeyString string) (*ExtendedKey, error) { - serializedBytes := base58.Decode(extKeyString) - return deserializeExtendedPrivateKey(serializedBytes) -} - -func deserializeExtendedPrivateKey(serialized []byte) (*ExtendedKey, error) { - if len(serialized) != extendedKeySerializationLen { - return nil, errors.Errorf("key length must be %d bytes but got %d", extendedKeySerializationLen, len(serialized)) - } - - err := validateChecksum(serialized) - if err != nil { - return nil, err - } - - extKey := &ExtendedKey{} - - copy(extKey.Version[:], serialized[:versionSerializationLen]) - extKey.Depth = serialized[versionSerializationLen] - copy(extKey.ParentFingerprint[:], serialized[versionSerializationLen+depthSerializationLen:]) - extKey.ChildNumber = binary.BigEndian.Uint32( - serialized[versionSerializationLen+depthSerializationLen+fingerprintSerializationLen:], - ) - copy( - extKey.ChainCode[:], - serialized[versionSerializationLen+depthSerializationLen+fingerprintSerializationLen+childNumberSerializationLen:], - ) - - isPrivate := isPrivateVersion(extKey.Version) - if isPrivate { - privateKeyPadding := serialized[versionSerializationLen+ - depthSerializationLen+ - fingerprintSerializationLen+ - childNumberSerializationLen+ - chainCodeSerializationLen] - if privateKeyPadding != 0 { - return nil, errors.Errorf("expected 0 padding for private key but got %d", privateKeyPadding) - } - - extKey.privateKey, err = secp256k1.DeserializeECDSAPrivateKeyFromSlice(serialized[versionSerializationLen+ - depthSerializationLen+ - fingerprintSerializationLen+ - childNumberSerializationLen+ - chainCodeSerializationLen+1 : versionSerializationLen+ - depthSerializationLen+ - fingerprintSerializationLen+ - childNumberSerializationLen+ - chainCodeSerializationLen+ - keySerializationLen]) - if err != nil { - return nil, err - } - } else { - extKey.publicKey, err = secp256k1.DeserializeECDSAPubKey(serialized[versionSerializationLen+ - depthSerializationLen+ - fingerprintSerializationLen+ - childNumberSerializationLen+ - chainCodeSerializationLen : versionSerializationLen+ - depthSerializationLen+ - fingerprintSerializationLen+ - childNumberSerializationLen+ - chainCodeSerializationLen+ - keySerializationLen]) - if err != nil { - return nil, err - } - } - - return extKey, nil -} - -func (extKey *ExtendedKey) serialize() ([]byte, error) { - var serialized [extendedKeySerializationLen]byte - copy(serialized[:], extKey.Version[:]) - serialized[versionSerializationLen] = extKey.Depth - copy(serialized[versionSerializationLen+depthSerializationLen:], extKey.ParentFingerprint[:]) - binary.BigEndian.PutUint32( - serialized[versionSerializationLen+depthSerializationLen+fingerprintSerializationLen:], - extKey.ChildNumber, - ) - copy( - serialized[versionSerializationLen+depthSerializationLen+fingerprintSerializationLen+childNumberSerializationLen:], - extKey.ChainCode[:], - ) - - if extKey.IsPrivate() { - serialized[versionSerializationLen+depthSerializationLen+fingerprintSerializationLen+childNumberSerializationLen+chainCodeSerializationLen] = 0 - copy( - serialized[versionSerializationLen+ - depthSerializationLen+ - fingerprintSerializationLen+ - childNumberSerializationLen+ - chainCodeSerializationLen+ - 1:], - extKey.privateKey.Serialize()[:], - ) - } else { - publicKey, err := extKey.PublicKey() - if err != nil { - return nil, err - } - - serializedPublicKey, err := publicKey.Serialize() - if err != nil { - return nil, err - } - - copy( - serialized[versionSerializationLen+depthSerializationLen+fingerprintSerializationLen+childNumberSerializationLen+chainCodeSerializationLen:], - serializedPublicKey[:], - ) - } - - checkSum := doubleSha256(serialized[:len(serialized)-checkSumLen]) - copy( - serialized[versionSerializationLen+depthSerializationLen+fingerprintSerializationLen+childNumberSerializationLen+chainCodeSerializationLen+keySerializationLen:], - checkSum, - ) - return serialized[:], nil + return nil, errors.New("fail") } diff --git a/cmd/kaspawallet/libkaspawallet/bip39.go b/cmd/kaspawallet/libkaspawallet/bip39.go index 53acda51b6..476de32b75 100644 --- a/cmd/kaspawallet/libkaspawallet/bip39.go +++ b/cmd/kaspawallet/libkaspawallet/bip39.go @@ -3,8 +3,8 @@ package libkaspawallet import ( "fmt" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/bip32" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/bip32" + "github.com/coinexcom/kaspad/domain/dagconfig" "github.com/pkg/errors" "github.com/tyler-smith/go-bip39" ) diff --git a/cmd/kaspawallet/libkaspawallet/converters.go b/cmd/kaspawallet/libkaspawallet/converters.go index 3371a25570..b575c03791 100644 --- a/cmd/kaspawallet/libkaspawallet/converters.go +++ b/cmd/kaspawallet/libkaspawallet/converters.go @@ -3,11 +3,11 @@ package libkaspawallet import ( "encoding/hex" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionid" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionid" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" ) // KaspawalletdUTXOsTolibkaspawalletUTXOs converts a []*pb.UtxosByAddressesEntry to a []*libkaspawallet.UTXO diff --git a/cmd/kaspawallet/libkaspawallet/keypair.go b/cmd/kaspawallet/libkaspawallet/keypair.go index 41c99de362..62926213a9 100644 --- a/cmd/kaspawallet/libkaspawallet/keypair.go +++ b/cmd/kaspawallet/libkaspawallet/keypair.go @@ -5,10 +5,8 @@ import ( "sort" "strings" - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/bip32" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" ) @@ -22,57 +20,16 @@ func CreateKeyPair(ecdsa bool) ([]byte, []byte, error) { } func createKeyPair() ([]byte, []byte, error) { - keyPair, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - return nil, nil, errors.Wrap(err, "Failed to generate private key") - } - publicKey, err := keyPair.SchnorrPublicKey() - if err != nil { - return nil, nil, errors.Wrap(err, "Failed to generate public key") - } - publicKeySerialized, err := publicKey.Serialize() - if err != nil { - return nil, nil, errors.Wrap(err, "Failed to serialize public key") - } - - return keyPair.SerializePrivateKey()[:], publicKeySerialized[:], nil + return nil, nil, errors.New("Failed to generate private key") } func createKeyPairECDSA() ([]byte, []byte, error) { - keyPair, err := secp256k1.GenerateECDSAPrivateKey() - if err != nil { - return nil, nil, errors.Wrap(err, "Failed to generate private key") - } - publicKey, err := keyPair.ECDSAPublicKey() - if err != nil { - return nil, nil, errors.Wrap(err, "Failed to generate public key") - } - publicKeySerialized, err := publicKey.Serialize() - if err != nil { - return nil, nil, errors.Wrap(err, "Failed to serialize public key") - } - - return keyPair.Serialize()[:], publicKeySerialized[:], nil + return nil, nil, errors.New("Failed to generate private key") } // PublicKeyFromPrivateKey returns the public key associated with a private key func PublicKeyFromPrivateKey(privateKeyBytes []byte) ([]byte, error) { - keyPair, err := secp256k1.DeserializeSchnorrPrivateKeyFromSlice(privateKeyBytes) - if err != nil { - return nil, errors.Wrap(err, "Failed to deserialize private key") - } - - publicKey, err := keyPair.SchnorrPublicKey() - if err != nil { - return nil, errors.Wrap(err, "Failed to generate public key") - } - - publicKeySerialized, err := publicKey.Serialize() - if err != nil { - return nil, errors.Wrap(err, "Failed to serialize public key") - } - - return publicKeySerialized[:], nil + return nil, errors.New("Failed to generate private key") } // Address returns the address associated with the given public keys and minimum signatures parameters. @@ -96,40 +53,7 @@ func Address(params *dagconfig.Params, extendedPublicKeys []string, minimumSigna } func p2pkAddress(params *dagconfig.Params, extendedPublicKey string, path string, ecdsa bool) (util.Address, error) { - extendedKey, err := bip32.DeserializeExtendedKey(extendedPublicKey) - if err != nil { - return nil, err - } - - derivedKey, err := extendedKey.DeriveFromPath(path) - if err != nil { - return nil, err - } - - publicKey, err := derivedKey.PublicKey() - if err != nil { - return nil, err - } - - if ecdsa { - serializedECDSAPublicKey, err := publicKey.Serialize() - if err != nil { - return nil, err - } - return util.NewAddressPublicKeyECDSA(serializedECDSAPublicKey[:], params.Prefix) - } - - schnorrPublicKey, err := publicKey.ToSchnorr() - if err != nil { - return nil, err - } - - serializedSchnorrPublicKey, err := schnorrPublicKey.Serialize() - if err != nil { - return nil, err - } - - return util.NewAddressPublicKey(serializedSchnorrPublicKey[:], params.Prefix) + return nil, errors.New("fail") } func sortPublicKeys(extendedPublicKeys []string) { diff --git a/cmd/kaspawallet/libkaspawallet/serialization/protoserialization/wallet.proto b/cmd/kaspawallet/libkaspawallet/serialization/protoserialization/wallet.proto index 72be9a7433..161158d489 100644 --- a/cmd/kaspawallet/libkaspawallet/serialization/protoserialization/wallet.proto +++ b/cmd/kaspawallet/libkaspawallet/serialization/protoserialization/wallet.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package protoserialization; -option go_package = "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization/protoserialization"; +option go_package = "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/serialization/protoserialization"; message PartiallySignedTransaction{ TransactionMessage tx = 1; diff --git a/cmd/kaspawallet/libkaspawallet/serialization/serialization.go b/cmd/kaspawallet/libkaspawallet/serialization/serialization.go index 879a1d576e..b04bd481f7 100644 --- a/cmd/kaspawallet/libkaspawallet/serialization/serialization.go +++ b/cmd/kaspawallet/libkaspawallet/serialization/serialization.go @@ -3,9 +3,9 @@ package serialization import ( "math" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization/protoserialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/serialization/protoserialization" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" "github.com/pkg/errors" "google.golang.org/protobuf/proto" ) diff --git a/cmd/kaspawallet/libkaspawallet/sign.go b/cmd/kaspawallet/libkaspawallet/sign.go index 98057ddb05..056efc8649 100644 --- a/cmd/kaspawallet/libkaspawallet/sign.go +++ b/cmd/kaspawallet/libkaspawallet/sign.go @@ -1,99 +1,11 @@ package libkaspawallet import ( - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/bip32" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/dagconfig" "github.com/pkg/errors" ) -func rawTxInSignature(extendedKey *bip32.ExtendedKey, tx *externalapi.DomainTransaction, idx int, hashType consensushashing.SigHashType, - sighashReusedValues *consensushashing.SighashReusedValues, ecdsa bool) ([]byte, error) { - - privateKey := extendedKey.PrivateKey() - if ecdsa { - return txscript.RawTxInSignatureECDSA(tx, idx, hashType, privateKey, sighashReusedValues) - } - - schnorrKeyPair, err := privateKey.ToSchnorr() - if err != nil { - return nil, err - } - - return txscript.RawTxInSignature(tx, idx, hashType, schnorrKeyPair, sighashReusedValues) -} - // Sign signs the transaction with the given private keys func Sign(params *dagconfig.Params, mnemonics []string, serializedPSTx []byte, ecdsa bool) ([]byte, error) { - partiallySignedTransaction, err := serialization.DeserializePartiallySignedTransaction(serializedPSTx) - if err != nil { - return nil, err - } - - for _, mnemonic := range mnemonics { - err = sign(params, mnemonic, partiallySignedTransaction, ecdsa) - if err != nil { - return nil, err - } - } - return serialization.SerializePartiallySignedTransaction(partiallySignedTransaction) -} - -func sign(params *dagconfig.Params, mnemonic string, partiallySignedTransaction *serialization.PartiallySignedTransaction, ecdsa bool) error { - if isTransactionFullySigned(partiallySignedTransaction) { - return nil - } - - sighashReusedValues := &consensushashing.SighashReusedValues{} - for i, partiallySignedInput := range partiallySignedTransaction.PartiallySignedInputs { - prevOut := partiallySignedInput.PrevOutput - partiallySignedTransaction.Tx.Inputs[i].UTXOEntry = utxo.NewUTXOEntry( - prevOut.Value, - prevOut.ScriptPublicKey, - false, // This is a fake value, because it's irrelevant for the signature - 0, // This is a fake value, because it's irrelevant for the signature - ) - partiallySignedTransaction.Tx.Inputs[i].SigOpCount = byte(len(partiallySignedInput.PubKeySignaturePairs)) - } - - signed := false - for i, partiallySignedInput := range partiallySignedTransaction.PartiallySignedInputs { - isMultisig := len(partiallySignedInput.PubKeySignaturePairs) > 1 - path := defaultPath(isMultisig) - extendedKey, err := extendedKeyFromMnemonicAndPath(mnemonic, path, params) - if err != nil { - return err - } - - derivedKey, err := extendedKey.DeriveFromPath(partiallySignedInput.DerivationPath) - if err != nil { - return err - } - - derivedPublicKey, err := derivedKey.Public() - if err != nil { - return err - } - - for _, pair := range partiallySignedInput.PubKeySignaturePairs { - if pair.ExtendedPublicKey == derivedPublicKey.String() { - pair.Signature, err = rawTxInSignature(derivedKey, partiallySignedTransaction.Tx, i, consensushashing.SigHashAll, sighashReusedValues, ecdsa) - if err != nil { - return err - } - - signed = true - } - } - } - - if !signed { - return errors.Errorf("Public key doesn't match any of the transaction public keys") - } - - return nil + return nil, errors.New("fail") } diff --git a/cmd/kaspawallet/libkaspawallet/transaction.go b/cmd/kaspawallet/libkaspawallet/transaction.go index 62664b66bd..c4e0beb0d7 100644 --- a/cmd/kaspawallet/libkaspawallet/transaction.go +++ b/cmd/kaspawallet/libkaspawallet/transaction.go @@ -1,13 +1,13 @@ package libkaspawallet import ( - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/bip32" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/bip32" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" ) @@ -43,55 +43,7 @@ func CreateUnsignedTransaction( } func multiSigRedeemScript(extendedPublicKeys []string, minimumSignatures uint32, path string, ecdsa bool) ([]byte, error) { - scriptBuilder := txscript.NewScriptBuilder() - scriptBuilder.AddInt64(int64(minimumSignatures)) - for _, key := range extendedPublicKeys { - extendedKey, err := bip32.DeserializeExtendedKey(key) - if err != nil { - return nil, err - } - - derivedKey, err := extendedKey.DeriveFromPath(path) - if err != nil { - return nil, err - } - - publicKey, err := derivedKey.PublicKey() - if err != nil { - return nil, err - } - - var serializedPublicKey []byte - if ecdsa { - serializedECDSAPublicKey, err := publicKey.Serialize() - if err != nil { - return nil, err - } - serializedPublicKey = serializedECDSAPublicKey[:] - } else { - schnorrPublicKey, err := publicKey.ToSchnorr() - if err != nil { - return nil, err - } - - serializedSchnorrPublicKey, err := schnorrPublicKey.Serialize() - if err != nil { - return nil, err - } - serializedPublicKey = serializedSchnorrPublicKey[:] - } - - scriptBuilder.AddData(serializedPublicKey) - } - scriptBuilder.AddInt64(int64(len(extendedPublicKeys))) - - if ecdsa { - scriptBuilder.AddOp(txscript.OpCheckMultiSigECDSA) - } else { - scriptBuilder.AddOp(txscript.OpCheckMultiSig) - } - - return scriptBuilder.Script() + return nil, errors.New("fail") } func createUnsignedTransaction( diff --git a/cmd/kaspawallet/libkaspawallet/transaction_test.go b/cmd/kaspawallet/libkaspawallet/transaction_test.go index 39a469994e..17fb95f1d7 100644 --- a/cmd/kaspawallet/libkaspawallet/transaction_test.go +++ b/cmd/kaspawallet/libkaspawallet/transaction_test.go @@ -2,18 +2,18 @@ package libkaspawallet_test import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" "strings" "testing" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/util" ) func forSchnorrAndECDSA(t *testing.T, testFunc func(t *testing.T, ecdsa bool)) { diff --git a/cmd/kaspawallet/new_address.go b/cmd/kaspawallet/new_address.go index db65215a1e..57a55f1c7b 100644 --- a/cmd/kaspawallet/new_address.go +++ b/cmd/kaspawallet/new_address.go @@ -3,8 +3,8 @@ package main import ( "context" "fmt" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/client" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/client" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" ) func newAddress(conf *newAddressConfig) error { diff --git a/cmd/kaspawallet/parse.go b/cmd/kaspawallet/parse.go index 0e278e90f9..a1297cf453 100644 --- a/cmd/kaspawallet/parse.go +++ b/cmd/kaspawallet/parse.go @@ -3,10 +3,10 @@ package main import ( "encoding/hex" "fmt" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet/serialization" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" "github.com/pkg/errors" "io/ioutil" "strings" diff --git a/cmd/kaspawallet/send.go b/cmd/kaspawallet/send.go index f513304463..06dcd4e8ce 100644 --- a/cmd/kaspawallet/send.go +++ b/cmd/kaspawallet/send.go @@ -6,11 +6,11 @@ import ( "os" "strings" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/client" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/keys" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/cmd/kaspawallet/utils" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/client" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/keys" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/utils" "github.com/pkg/errors" ) diff --git a/cmd/kaspawallet/show_addresses.go b/cmd/kaspawallet/show_addresses.go index 47fbd89e22..56cc9599af 100644 --- a/cmd/kaspawallet/show_addresses.go +++ b/cmd/kaspawallet/show_addresses.go @@ -3,8 +3,8 @@ package main import ( "context" "fmt" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/client" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/client" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" ) func showAddresses(conf *showAddressesConfig) error { diff --git a/cmd/kaspawallet/sign.go b/cmd/kaspawallet/sign.go index c91f7043c9..c2fed7f220 100644 --- a/cmd/kaspawallet/sign.go +++ b/cmd/kaspawallet/sign.go @@ -6,8 +6,8 @@ import ( "os" "strings" - "github.com/kaspanet/kaspad/cmd/kaspawallet/keys" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/keys" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" "github.com/pkg/errors" ) diff --git a/cmd/kaspawallet/start_daemon.go b/cmd/kaspawallet/start_daemon.go index db819aa2fc..4acb9bfc8f 100644 --- a/cmd/kaspawallet/start_daemon.go +++ b/cmd/kaspawallet/start_daemon.go @@ -1,6 +1,6 @@ package main -import "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/server" +import "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/server" func startDaemon(conf *startDaemonConfig) error { return server.Start(conf.NetParams(), conf.Listen, conf.RPCServer, conf.KeysFile, conf.Profile, conf.Timeout) diff --git a/cmd/kaspawallet/sweep.go b/cmd/kaspawallet/sweep.go index d36065d059..1ed4ebe408 100644 --- a/cmd/kaspawallet/sweep.go +++ b/cmd/kaspawallet/sweep.go @@ -5,22 +5,19 @@ import ( "encoding/hex" "fmt" - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/client" - "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization" - "github.com/kaspanet/kaspad/cmd/kaspawallet/utils" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - "github.com/kaspanet/kaspad/util" - "github.com/kaspanet/kaspad/util/txmass" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/client" + "github.com/coinexcom/kaspad/cmd/kaspawallet/daemon/pb" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/cmd/kaspawallet/utils" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + "github.com/coinexcom/kaspad/util" + "github.com/coinexcom/kaspad/util/txmass" "github.com/pkg/errors" ) @@ -213,30 +210,5 @@ func createSplitTransactionsWithSchnorrPrivteKey( } func signWithSchnorrPrivateKey(params *dagconfig.Params, privateKeyBytes []byte, domainTransactions []*externalapi.DomainTransaction) ([][]byte, error) { - - schnorrkeyPair, err := secp256k1.DeserializeSchnorrPrivateKeyFromSlice(privateKeyBytes) - if err != nil { - return nil, err - } - - serializedDomainTransactions := make([][]byte, len(domainTransactions)) - - for i1, domainTransaction := range domainTransactions { - - sighashReusedValues := &consensushashing.SighashReusedValues{} - - for i2, input := range domainTransaction.Inputs { - signature, err := txscript.SignatureScript(domainTransaction, i2, consensushashing.SigHashAll, schnorrkeyPair, sighashReusedValues) - if err != nil { - return nil, err - } - input.SignatureScript = signature - } - serializedDomainTransactions[i1], err = serialization.SerializeDomainTransaction(domainTransaction) - if err != nil { - return nil, err - } - } - - return serializedDomainTransactions, nil + return nil, errors.New("fail") } diff --git a/cmd/kaspawallet/utils/format_kas.go b/cmd/kaspawallet/utils/format_kas.go index e1f396dd57..3cf0270c93 100644 --- a/cmd/kaspawallet/utils/format_kas.go +++ b/cmd/kaspawallet/utils/format_kas.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" "github.com/pkg/errors" ) diff --git a/cmd/kaspawallet/version.go b/cmd/kaspawallet/version.go index 923e1e11e3..17cd2a9146 100644 --- a/cmd/kaspawallet/version.go +++ b/cmd/kaspawallet/version.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/version" "os" "path/filepath" "strings" diff --git a/docker/Dockerfile b/docker/Dockerfile index 7577169bb7..f7fb690207 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,9 +1,9 @@ # -- multistage docker build: stage #1: build stage FROM golang:1.19-alpine AS build -RUN mkdir -p /go/src/github.com/kaspanet/kaspad +RUN mkdir -p /go/src/github.com/coinexcom/kaspad -WORKDIR /go/src/github.com/kaspanet/kaspad +WORKDIR /go/src/github.com/coinexcom/kaspad RUN apk add --no-cache curl git openssh binutils gcc musl-dev @@ -24,8 +24,8 @@ WORKDIR /app RUN apk add --no-cache ca-certificates tini -COPY --from=build /go/src/github.com/kaspanet/kaspad/kaspad /app/ -COPY --from=build /go/src/github.com/kaspanet/kaspad/infrastructure/config/sample-kaspad.conf /app/ +COPY --from=build /go/src/github.com/coinexcom/kaspad/kaspad /app/ +COPY --from=build /go/src/github.com/coinexcom/kaspad/infrastructure/config/sample-kaspad.conf /app/ USER nobody ENTRYPOINT [ "/sbin/tini", "--" ] diff --git a/domain/consensus/consensus.go b/domain/consensus/consensus.go index f21cfaaad0..867b8d2b68 100644 --- a/domain/consensus/consensus.go +++ b/domain/consensus/consensus.go @@ -4,14 +4,14 @@ import ( "math/big" "sync" - "github.com/kaspanet/kaspad/util/mstime" - - "github.com/kaspanet/kaspad/domain/consensus/database" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/util/mstime" + + "github.com/coinexcom/kaspad/domain/consensus/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/staging" "github.com/pkg/errors" ) diff --git a/domain/consensus/consensus_test.go b/domain/consensus/consensus_test.go index 01a8a52204..708293ee51 100644 --- a/domain/consensus/consensus_test.go +++ b/domain/consensus/consensus_test.go @@ -3,11 +3,11 @@ package consensus_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" "github.com/pkg/errors" ) diff --git a/domain/consensus/constructors.go b/domain/consensus/constructors.go index 5ac116532d..7288e01621 100644 --- a/domain/consensus/constructors.go +++ b/domain/consensus/constructors.go @@ -1,8 +1,8 @@ package consensus import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "math/big" "time" ) diff --git a/domain/consensus/database/binaryserialization/hash.go b/domain/consensus/database/binaryserialization/hash.go index 333567bdd6..bf3342b3e5 100644 --- a/domain/consensus/database/binaryserialization/hash.go +++ b/domain/consensus/database/binaryserialization/hash.go @@ -1,7 +1,7 @@ package binaryserialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/database/bucket.go b/domain/consensus/database/bucket.go index 348e1b8d6e..fe130ee764 100644 --- a/domain/consensus/database/bucket.go +++ b/domain/consensus/database/bucket.go @@ -1,8 +1,8 @@ package database import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func dbBucketToDatabaseBucket(bucket model.DBBucket) *database.Bucket { diff --git a/domain/consensus/database/cursor.go b/domain/consensus/database/cursor.go index 27b6a7385b..6ce1b9a227 100644 --- a/domain/consensus/database/cursor.go +++ b/domain/consensus/database/cursor.go @@ -1,8 +1,8 @@ package database import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" ) diff --git a/domain/consensus/database/dbmanager.go b/domain/consensus/database/dbmanager.go index 273b540a98..350ce001ea 100644 --- a/domain/consensus/database/dbmanager.go +++ b/domain/consensus/database/dbmanager.go @@ -1,8 +1,8 @@ package database import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) type dbManager struct { diff --git a/domain/consensus/database/errors.go b/domain/consensus/database/errors.go index 025a624a64..5c1357df57 100644 --- a/domain/consensus/database/errors.go +++ b/domain/consensus/database/errors.go @@ -1,7 +1,7 @@ package database import ( - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) // ErrNotFound denotes that the requested item was not diff --git a/domain/consensus/database/key.go b/domain/consensus/database/key.go index 42b22a977c..d54077c044 100644 --- a/domain/consensus/database/key.go +++ b/domain/consensus/database/key.go @@ -1,8 +1,8 @@ package database import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func dbKeyToDatabaseKey(key model.DBKey) *database.Key { diff --git a/domain/consensus/database/serialization/acceptancedata.go b/domain/consensus/database/serialization/acceptancedata.go index 4024c03b1b..72d76cf39b 100644 --- a/domain/consensus/database/serialization/acceptancedata.go +++ b/domain/consensus/database/serialization/acceptancedata.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // DomainAcceptanceDataToDbAcceptanceData converts model.AcceptanceData to DbAcceptanceData diff --git a/domain/consensus/database/serialization/block.go b/domain/consensus/database/serialization/block.go index 4247dc8fc2..42b332bb18 100644 --- a/domain/consensus/database/serialization/block.go +++ b/domain/consensus/database/serialization/block.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // DomainBlockToDbBlock converts DomainBlocks to DbBlock diff --git a/domain/consensus/database/serialization/block_ghostdag_data.go b/domain/consensus/database/serialization/block_ghostdag_data.go index d6e0f1a34d..5614cddff4 100644 --- a/domain/consensus/database/serialization/block_ghostdag_data.go +++ b/domain/consensus/database/serialization/block_ghostdag_data.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "math/big" ) diff --git a/domain/consensus/database/serialization/blockheader.go b/domain/consensus/database/serialization/blockheader.go index 95d76b2654..fec0fa7727 100644 --- a/domain/consensus/database/serialization/blockheader.go +++ b/domain/consensus/database/serialization/blockheader.go @@ -1,8 +1,8 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" "github.com/pkg/errors" "math" "math/big" diff --git a/domain/consensus/database/serialization/blocklevelparents.go b/domain/consensus/database/serialization/blocklevelparents.go index ef89e0583c..a2e282d006 100644 --- a/domain/consensus/database/serialization/blocklevelparents.go +++ b/domain/consensus/database/serialization/blocklevelparents.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // DbBlockLevelParentsToDomainBlockLevelParents converts a DbBlockLevelParents to a BlockLevelParents diff --git a/domain/consensus/database/serialization/blockrelations.go b/domain/consensus/database/serialization/blockrelations.go index 4a06dcb59c..3053ffef25 100644 --- a/domain/consensus/database/serialization/blockrelations.go +++ b/domain/consensus/database/serialization/blockrelations.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" ) // DomainBlockRelationsToDbBlockRelations converts model.BlockRelations to DbBlockRelations diff --git a/domain/consensus/database/serialization/blockstatus.go b/domain/consensus/database/serialization/blockstatus.go index 5dfdbb6349..4fb846e258 100644 --- a/domain/consensus/database/serialization/blockstatus.go +++ b/domain/consensus/database/serialization/blockstatus.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // DomainBlockStatusToDbBlockStatus converts model.BlockStatus to DbBlockStatus diff --git a/domain/consensus/database/serialization/blues_anticone_sizes.go b/domain/consensus/database/serialization/blues_anticone_sizes.go index 2946d4b84b..e852d8f57b 100644 --- a/domain/consensus/database/serialization/blues_anticone_sizes.go +++ b/domain/consensus/database/serialization/blues_anticone_sizes.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/database/serialization/blues_anticone_sizes_test.go b/domain/consensus/database/serialization/blues_anticone_sizes_test.go index fae9c113ed..182ac5844a 100644 --- a/domain/consensus/database/serialization/blues_anticone_sizes_test.go +++ b/domain/consensus/database/serialization/blues_anticone_sizes_test.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "testing" ) diff --git a/domain/consensus/database/serialization/daa_block.go b/domain/consensus/database/serialization/daa_block.go index 991c985cb1..e85bb57621 100644 --- a/domain/consensus/database/serialization/daa_block.go +++ b/domain/consensus/database/serialization/daa_block.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // BlockGHOSTDAGDataHashPairToDbBlockGhostdagDataHashPair converts *externalapi.BlockGHOSTDAGDataHashPair to *DbBlockGHOSTDAGDataHashPair diff --git a/domain/consensus/database/serialization/dbobjects.proto b/domain/consensus/database/serialization/dbobjects.proto index 1248ad33da..e041d60ffe 100644 --- a/domain/consensus/database/serialization/dbobjects.proto +++ b/domain/consensus/database/serialization/dbobjects.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package serialization; -option go_package = "github.com/kaspanet/kaspad/serialization"; +option go_package = "github.com/coinexcom/kaspad/serialization"; message DbBlock { DbBlockHeader header = 1; diff --git a/domain/consensus/database/serialization/hash.go b/domain/consensus/database/serialization/hash.go index 6e4f7d5c09..61f9bdab2e 100644 --- a/domain/consensus/database/serialization/hash.go +++ b/domain/consensus/database/serialization/hash.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // DbHashToDomainHash converts a DbHash to a DomainHash diff --git a/domain/consensus/database/serialization/multiset.go b/domain/consensus/database/serialization/multiset.go index a19c3e1521..51b27c9f97 100644 --- a/domain/consensus/database/serialization/multiset.go +++ b/domain/consensus/database/serialization/multiset.go @@ -1,8 +1,8 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/utils/multiset" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/utils/multiset" ) // MultisetToDBMultiset converts Multiset to DbMultiset diff --git a/domain/consensus/database/serialization/outpoint.go b/domain/consensus/database/serialization/outpoint.go index aa3b5e1554..335d78dce4 100644 --- a/domain/consensus/database/serialization/outpoint.go +++ b/domain/consensus/database/serialization/outpoint.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // DomainOutpointToDbOutpoint converts DomainOutpoint to DbOutpoint diff --git a/domain/consensus/database/serialization/reachability_data.go b/domain/consensus/database/serialization/reachability_data.go index 97473c7c79..43713c5caf 100644 --- a/domain/consensus/database/serialization/reachability_data.go +++ b/domain/consensus/database/serialization/reachability_data.go @@ -1,9 +1,9 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/reachabilitydata" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/reachabilitydata" ) // ReachablityDataToDBReachablityData converts ReachabilityData to DbReachabilityData diff --git a/domain/consensus/database/serialization/reachablity_interval.go b/domain/consensus/database/serialization/reachablity_interval.go index 6dd9f2e06d..5dcc66345d 100644 --- a/domain/consensus/database/serialization/reachablity_interval.go +++ b/domain/consensus/database/serialization/reachablity_interval.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" ) func reachablityIntervalToDBReachablityInterval(reachabilityInterval *model.ReachabilityInterval) *DbReachabilityInterval { diff --git a/domain/consensus/database/serialization/subnetworkid.go b/domain/consensus/database/serialization/subnetworkid.go index f1775b3fba..01a782f1ee 100644 --- a/domain/consensus/database/serialization/subnetworkid.go +++ b/domain/consensus/database/serialization/subnetworkid.go @@ -1,8 +1,8 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" ) // DbSubnetworkIDToDomainSubnetworkID converts DbSubnetworkId to DomainSubnetworkID diff --git a/domain/consensus/database/serialization/tips.go b/domain/consensus/database/serialization/tips.go index e89eb82619..ccf094bbad 100644 --- a/domain/consensus/database/serialization/tips.go +++ b/domain/consensus/database/serialization/tips.go @@ -1,7 +1,7 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // TipsToDBTips converts a slice of hashes to DbTips diff --git a/domain/consensus/database/serialization/transaction.go b/domain/consensus/database/serialization/transaction.go index 42d8fc7409..cfdbb35a02 100644 --- a/domain/consensus/database/serialization/transaction.go +++ b/domain/consensus/database/serialization/transaction.go @@ -3,7 +3,7 @@ package serialization import ( "math" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/database/serialization/transactionid.go b/domain/consensus/database/serialization/transactionid.go index 24c1c06648..2823bcf774 100644 --- a/domain/consensus/database/serialization/transactionid.go +++ b/domain/consensus/database/serialization/transactionid.go @@ -1,8 +1,8 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionid" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionid" ) // DbTransactionIDToDomainTransactionID converts DbTransactionId to DomainTransactionID diff --git a/domain/consensus/database/serialization/utxo_collection.go b/domain/consensus/database/serialization/utxo_collection.go index f7930bad82..9e66369d96 100644 --- a/domain/consensus/database/serialization/utxo_collection.go +++ b/domain/consensus/database/serialization/utxo_collection.go @@ -1,8 +1,8 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" ) func utxoCollectionToDBUTXOCollection(utxoCollection externalapi.UTXOCollection) ([]*DbUtxoCollectionItem, error) { diff --git a/domain/consensus/database/serialization/utxo_diff.go b/domain/consensus/database/serialization/utxo_diff.go index c411ed3cd5..9104a74af8 100644 --- a/domain/consensus/database/serialization/utxo_diff.go +++ b/domain/consensus/database/serialization/utxo_diff.go @@ -1,8 +1,8 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" ) // UTXODiffToDBUTXODiff converts UTXODiff to DbUtxoDiff diff --git a/domain/consensus/database/serialization/utxo_entry.go b/domain/consensus/database/serialization/utxo_entry.go index 9c4ddb87cb..cd282cbd19 100644 --- a/domain/consensus/database/serialization/utxo_entry.go +++ b/domain/consensus/database/serialization/utxo_entry.go @@ -1,8 +1,8 @@ package serialization import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" "github.com/pkg/errors" "math" ) diff --git a/domain/consensus/database/transaction.go b/domain/consensus/database/transaction.go index 1ecbfa802a..ae07db075e 100644 --- a/domain/consensus/database/transaction.go +++ b/domain/consensus/database/transaction.go @@ -1,8 +1,8 @@ package database import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) type dbTransaction struct { diff --git a/domain/consensus/datastructures/acceptancedatastore/acceptance_data_staging_shard.go b/domain/consensus/datastructures/acceptancedatastore/acceptance_data_staging_shard.go index 1f767d287c..6b98572b25 100644 --- a/domain/consensus/datastructures/acceptancedatastore/acceptance_data_staging_shard.go +++ b/domain/consensus/datastructures/acceptancedatastore/acceptance_data_staging_shard.go @@ -1,8 +1,8 @@ package acceptancedatastore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type acceptanceDataStagingShard struct { diff --git a/domain/consensus/datastructures/acceptancedatastore/acceptance_data_store.go b/domain/consensus/datastructures/acceptancedatastore/acceptance_data_store.go index ef9240ff56..d31a1c62c4 100644 --- a/domain/consensus/datastructures/acceptancedatastore/acceptance_data_store.go +++ b/domain/consensus/datastructures/acceptancedatastore/acceptance_data_store.go @@ -1,11 +1,11 @@ package acceptancedatastore import ( - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" "google.golang.org/protobuf/proto" ) diff --git a/domain/consensus/datastructures/blockheaderstore/block_header_staging_shard.go b/domain/consensus/datastructures/blockheaderstore/block_header_staging_shard.go index bcfc6f8d45..117d87b82a 100644 --- a/domain/consensus/datastructures/blockheaderstore/block_header_staging_shard.go +++ b/domain/consensus/datastructures/blockheaderstore/block_header_staging_shard.go @@ -1,8 +1,8 @@ package blockheaderstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type blockHeaderStagingShard struct { diff --git a/domain/consensus/datastructures/blockheaderstore/block_header_store.go b/domain/consensus/datastructures/blockheaderstore/block_header_store.go index beedfb1478..f215507801 100644 --- a/domain/consensus/datastructures/blockheaderstore/block_header_store.go +++ b/domain/consensus/datastructures/blockheaderstore/block_header_store.go @@ -1,12 +1,12 @@ package blockheaderstore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" ) var bucketName = []byte("block-headers") diff --git a/domain/consensus/datastructures/blockrelationstore/block_relation_staging_shard.go b/domain/consensus/datastructures/blockrelationstore/block_relation_staging_shard.go index 280d9f751d..c016e2b166 100644 --- a/domain/consensus/datastructures/blockrelationstore/block_relation_staging_shard.go +++ b/domain/consensus/datastructures/blockrelationstore/block_relation_staging_shard.go @@ -1,8 +1,8 @@ package blockrelationstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type blockRelationStagingShard struct { diff --git a/domain/consensus/datastructures/blockrelationstore/block_relation_store.go b/domain/consensus/datastructures/blockrelationstore/block_relation_store.go index e8638933c1..9eb32e0006 100644 --- a/domain/consensus/datastructures/blockrelationstore/block_relation_store.go +++ b/domain/consensus/datastructures/blockrelationstore/block_relation_store.go @@ -1,12 +1,12 @@ package blockrelationstore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" ) var bucketName = []byte("block-relations") diff --git a/domain/consensus/datastructures/blockstatusstore/block_status_staging_shard.go b/domain/consensus/datastructures/blockstatusstore/block_status_staging_shard.go index 0d403208f7..4eeb2a3b44 100644 --- a/domain/consensus/datastructures/blockstatusstore/block_status_staging_shard.go +++ b/domain/consensus/datastructures/blockstatusstore/block_status_staging_shard.go @@ -1,8 +1,8 @@ package blockstatusstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type blockStatusStagingShard struct { diff --git a/domain/consensus/datastructures/blockstatusstore/block_status_store.go b/domain/consensus/datastructures/blockstatusstore/block_status_store.go index 76bf51e307..ad08aa6fcd 100644 --- a/domain/consensus/datastructures/blockstatusstore/block_status_store.go +++ b/domain/consensus/datastructures/blockstatusstore/block_status_store.go @@ -1,12 +1,12 @@ package blockstatusstore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" ) var bucketName = []byte("block-statuses") diff --git a/domain/consensus/datastructures/blockstore/block_staging_shard.go b/domain/consensus/datastructures/blockstore/block_staging_shard.go index 12596abaf2..dc46475035 100644 --- a/domain/consensus/datastructures/blockstore/block_staging_shard.go +++ b/domain/consensus/datastructures/blockstore/block_staging_shard.go @@ -1,8 +1,8 @@ package blockstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type blockStagingShard struct { diff --git a/domain/consensus/datastructures/blockstore/block_store.go b/domain/consensus/datastructures/blockstore/block_store.go index aa3adfc02e..11df641b03 100644 --- a/domain/consensus/datastructures/blockstore/block_store.go +++ b/domain/consensus/datastructures/blockstore/block_store.go @@ -1,12 +1,12 @@ package blockstore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" "github.com/pkg/errors" ) diff --git a/domain/consensus/datastructures/blockwindowheapslicestore/block_window_heap_slice_staging_shard.go b/domain/consensus/datastructures/blockwindowheapslicestore/block_window_heap_slice_staging_shard.go index 4dde5ac044..753cedb0fb 100644 --- a/domain/consensus/datastructures/blockwindowheapslicestore/block_window_heap_slice_staging_shard.go +++ b/domain/consensus/datastructures/blockwindowheapslicestore/block_window_heap_slice_staging_shard.go @@ -1,8 +1,8 @@ package blockwindowheapslicestore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type shardKey struct { diff --git a/domain/consensus/datastructures/blockwindowheapslicestore/block_window_heap_slice_store.go b/domain/consensus/datastructures/blockwindowheapslicestore/block_window_heap_slice_store.go index 053f72ccdb..eb04b76019 100644 --- a/domain/consensus/datastructures/blockwindowheapslicestore/block_window_heap_slice_store.go +++ b/domain/consensus/datastructures/blockwindowheapslicestore/block_window_heap_slice_store.go @@ -1,11 +1,11 @@ package blockwindowheapslicestore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucachehashandwindowsizetoblockghostdagdatahashpairs" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucachehashandwindowsizetoblockghostdagdatahashpairs" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/util/staging" "github.com/pkg/errors" ) diff --git a/domain/consensus/datastructures/consensusstatestore/consensus_state_staging_shard.go b/domain/consensus/datastructures/consensusstatestore/consensus_state_staging_shard.go index 8d0803b072..59b0af8af3 100644 --- a/domain/consensus/datastructures/consensusstatestore/consensus_state_staging_shard.go +++ b/domain/consensus/datastructures/consensusstatestore/consensus_state_staging_shard.go @@ -1,8 +1,8 @@ package consensusstatestore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type consensusStateStagingShard struct { diff --git a/domain/consensus/datastructures/consensusstatestore/consensus_state_store.go b/domain/consensus/datastructures/consensusstatestore/consensus_state_store.go index f1ad909ffe..0c7c9f41d7 100644 --- a/domain/consensus/datastructures/consensusstatestore/consensus_state_store.go +++ b/domain/consensus/datastructures/consensusstatestore/consensus_state_store.go @@ -1,10 +1,10 @@ package consensusstatestore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxolrucache" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxolrucache" + "github.com/coinexcom/kaspad/util/staging" ) var importingPruningPointUTXOSetKeyName = []byte("importing-pruning-point-utxo-set") diff --git a/domain/consensus/datastructures/consensusstatestore/tips.go b/domain/consensus/datastructures/consensusstatestore/tips.go index eb2723b1fc..a812b87bb4 100644 --- a/domain/consensus/datastructures/consensusstatestore/tips.go +++ b/domain/consensus/datastructures/consensusstatestore/tips.go @@ -1,10 +1,10 @@ package consensusstatestore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" ) var tipsKeyName = []byte("tips") diff --git a/domain/consensus/datastructures/consensusstatestore/utxo.go b/domain/consensus/datastructures/consensusstatestore/utxo.go index c8b16054b2..997a9b550a 100644 --- a/domain/consensus/datastructures/consensusstatestore/utxo.go +++ b/domain/consensus/datastructures/consensusstatestore/utxo.go @@ -1,9 +1,9 @@ package consensusstatestore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" "github.com/pkg/errors" ) diff --git a/domain/consensus/datastructures/consensusstatestore/utxo_serialization.go b/domain/consensus/datastructures/consensusstatestore/utxo_serialization.go index 387d98e95b..c2c9f885f5 100644 --- a/domain/consensus/datastructures/consensusstatestore/utxo_serialization.go +++ b/domain/consensus/datastructures/consensusstatestore/utxo_serialization.go @@ -1,9 +1,9 @@ package consensusstatestore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" ) func serializeOutpoint(outpoint *externalapi.DomainOutpoint) ([]byte, error) { diff --git a/domain/consensus/datastructures/consensusstatestore/virtual_utxo_set.go b/domain/consensus/datastructures/consensusstatestore/virtual_utxo_set.go index a39232bbda..41e5ce8e80 100644 --- a/domain/consensus/datastructures/consensusstatestore/virtual_utxo_set.go +++ b/domain/consensus/datastructures/consensusstatestore/virtual_utxo_set.go @@ -1,8 +1,8 @@ package consensusstatestore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/datastructures/daablocksstore/daa_blocks_staging_shard.go b/domain/consensus/datastructures/daablocksstore/daa_blocks_staging_shard.go index e305056837..fddf2e72c5 100644 --- a/domain/consensus/datastructures/daablocksstore/daa_blocks_staging_shard.go +++ b/domain/consensus/datastructures/daablocksstore/daa_blocks_staging_shard.go @@ -1,9 +1,9 @@ package daablocksstore import ( - "github.com/kaspanet/kaspad/domain/consensus/database/binaryserialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/database/binaryserialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type daaBlocksStagingShard struct { diff --git a/domain/consensus/datastructures/daablocksstore/daa_blocks_store.go b/domain/consensus/datastructures/daablocksstore/daa_blocks_store.go index 2bb36e9cf1..67ae229c47 100644 --- a/domain/consensus/datastructures/daablocksstore/daa_blocks_store.go +++ b/domain/consensus/datastructures/daablocksstore/daa_blocks_store.go @@ -1,11 +1,11 @@ package daablocksstore import ( - "github.com/kaspanet/kaspad/domain/consensus/database/binaryserialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/database/binaryserialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" ) var daaScoreBucketName = []byte("daa-score") diff --git a/domain/consensus/datastructures/daawindowstore/daa_window_staging_shard.go b/domain/consensus/datastructures/daawindowstore/daa_window_staging_shard.go index 2f15248d65..534d3cc8ef 100644 --- a/domain/consensus/datastructures/daawindowstore/daa_window_staging_shard.go +++ b/domain/consensus/datastructures/daawindowstore/daa_window_staging_shard.go @@ -1,10 +1,10 @@ package daawindowstore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" ) type dbKey struct { diff --git a/domain/consensus/datastructures/daawindowstore/daa_window_store.go b/domain/consensus/datastructures/daawindowstore/daa_window_store.go index 7a7123d6a2..f398ea3fa7 100644 --- a/domain/consensus/datastructures/daawindowstore/daa_window_store.go +++ b/domain/consensus/datastructures/daawindowstore/daa_window_store.go @@ -2,13 +2,13 @@ package daawindowstore import ( "encoding/binary" + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucachehashpairtoblockghostdagdatahashpair" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucachehashpairtoblockghostdagdatahashpair" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/util/staging" "github.com/pkg/errors" ) diff --git a/domain/consensus/datastructures/finalitystore/finality_staging_shard.go b/domain/consensus/datastructures/finalitystore/finality_staging_shard.go index 70d3124602..e3077ef3bc 100644 --- a/domain/consensus/datastructures/finalitystore/finality_staging_shard.go +++ b/domain/consensus/datastructures/finalitystore/finality_staging_shard.go @@ -1,8 +1,8 @@ package finalitystore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type finalityStagingShard struct { diff --git a/domain/consensus/datastructures/finalitystore/finality_store.go b/domain/consensus/datastructures/finalitystore/finality_store.go index 9286fbb738..9feef18429 100644 --- a/domain/consensus/datastructures/finalitystore/finality_store.go +++ b/domain/consensus/datastructures/finalitystore/finality_store.go @@ -1,10 +1,10 @@ package finalitystore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" ) var bucketName = []byte("finality-points") diff --git a/domain/consensus/datastructures/ghostdagdatastore/ghostadag_data_staging_shard.go b/domain/consensus/datastructures/ghostdagdatastore/ghostadag_data_staging_shard.go index d553287a02..00bd274b7d 100644 --- a/domain/consensus/datastructures/ghostdagdatastore/ghostadag_data_staging_shard.go +++ b/domain/consensus/datastructures/ghostdagdatastore/ghostadag_data_staging_shard.go @@ -1,8 +1,8 @@ package ghostdagdatastore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type key struct { diff --git a/domain/consensus/datastructures/ghostdagdatastore/ghostdag_data_store.go b/domain/consensus/datastructures/ghostdagdatastore/ghostdag_data_store.go index 614b38fe63..128d5ef46e 100644 --- a/domain/consensus/datastructures/ghostdagdatastore/ghostdag_data_store.go +++ b/domain/consensus/datastructures/ghostdagdatastore/ghostdag_data_store.go @@ -1,12 +1,12 @@ package ghostdagdatastore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucacheghostdagdata" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucacheghostdagdata" - "github.com/kaspanet/kaspad/util/staging" ) var ghostdagDataBucketName = []byte("block-ghostdag-data") diff --git a/domain/consensus/datastructures/headersselectedchainstore/headers_selected_chain_staging_shard.go b/domain/consensus/datastructures/headersselectedchainstore/headers_selected_chain_staging_shard.go index 3bf26f0e0f..467136e5b6 100644 --- a/domain/consensus/datastructures/headersselectedchainstore/headers_selected_chain_staging_shard.go +++ b/domain/consensus/datastructures/headersselectedchainstore/headers_selected_chain_staging_shard.go @@ -1,9 +1,9 @@ package headersselectedchainstore import ( - "github.com/kaspanet/kaspad/domain/consensus/database/binaryserialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/database/binaryserialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type headersSelectedChainStagingShard struct { diff --git a/domain/consensus/datastructures/headersselectedchainstore/headers_selected_chain_store.go b/domain/consensus/datastructures/headersselectedchainstore/headers_selected_chain_store.go index 6048a83848..a5859547de 100644 --- a/domain/consensus/datastructures/headersselectedchainstore/headers_selected_chain_store.go +++ b/domain/consensus/datastructures/headersselectedchainstore/headers_selected_chain_store.go @@ -2,14 +2,14 @@ package headersselectedchainstore import ( "encoding/binary" - "github.com/kaspanet/kaspad/util/staging" - - "github.com/kaspanet/kaspad/domain/consensus/database" - "github.com/kaspanet/kaspad/domain/consensus/database/binaryserialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucacheuint64tohash" + "github.com/coinexcom/kaspad/util/staging" + + "github.com/coinexcom/kaspad/domain/consensus/database" + "github.com/coinexcom/kaspad/domain/consensus/database/binaryserialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucacheuint64tohash" "github.com/pkg/errors" ) diff --git a/domain/consensus/datastructures/headersselectedtipstore/headers_selected_tip_staging_shard.go b/domain/consensus/datastructures/headersselectedtipstore/headers_selected_tip_staging_shard.go index 245c5bd8d7..ff1eed31fc 100644 --- a/domain/consensus/datastructures/headersselectedtipstore/headers_selected_tip_staging_shard.go +++ b/domain/consensus/datastructures/headersselectedtipstore/headers_selected_tip_staging_shard.go @@ -1,8 +1,8 @@ package headersselectedtipstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type headersSelectedTipStagingShard struct { diff --git a/domain/consensus/datastructures/headersselectedtipstore/headers_selected_tips_store.go b/domain/consensus/datastructures/headersselectedtipstore/headers_selected_tips_store.go index 41cd6e321d..836e7f4563 100644 --- a/domain/consensus/datastructures/headersselectedtipstore/headers_selected_tips_store.go +++ b/domain/consensus/datastructures/headersselectedtipstore/headers_selected_tips_store.go @@ -1,11 +1,11 @@ package headersselectedtipstore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/util/staging" ) var keyName = []byte("headers-selected-tip") diff --git a/domain/consensus/datastructures/mergedepthrootstore/merge_depth_root_staging_shard.go b/domain/consensus/datastructures/mergedepthrootstore/merge_depth_root_staging_shard.go index 17d652ba4b..f44977c2b8 100644 --- a/domain/consensus/datastructures/mergedepthrootstore/merge_depth_root_staging_shard.go +++ b/domain/consensus/datastructures/mergedepthrootstore/merge_depth_root_staging_shard.go @@ -1,8 +1,8 @@ package mergedepthrootstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type mergeDepthRootStagingShard struct { diff --git a/domain/consensus/datastructures/mergedepthrootstore/merge_depth_root_store.go b/domain/consensus/datastructures/mergedepthrootstore/merge_depth_root_store.go index a2e4939abd..6db0657fed 100644 --- a/domain/consensus/datastructures/mergedepthrootstore/merge_depth_root_store.go +++ b/domain/consensus/datastructures/mergedepthrootstore/merge_depth_root_store.go @@ -1,10 +1,10 @@ package mergedepthrootstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" ) var bucketName = []byte("merge-depth-roots") diff --git a/domain/consensus/datastructures/multisetstore/multiset_staging_shard.go b/domain/consensus/datastructures/multisetstore/multiset_staging_shard.go index f7a6c45639..1d6ab873aa 100644 --- a/domain/consensus/datastructures/multisetstore/multiset_staging_shard.go +++ b/domain/consensus/datastructures/multisetstore/multiset_staging_shard.go @@ -1,8 +1,8 @@ package multisetstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type multisetStagingShard struct { diff --git a/domain/consensus/datastructures/multisetstore/multiset_store.go b/domain/consensus/datastructures/multisetstore/multiset_store.go index 8d228caec2..c83f8752ab 100644 --- a/domain/consensus/datastructures/multisetstore/multiset_store.go +++ b/domain/consensus/datastructures/multisetstore/multiset_store.go @@ -1,12 +1,12 @@ package multisetstore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" ) var bucketName = []byte("multisets") diff --git a/domain/consensus/datastructures/pruningstore/imported_pruning_point.go b/domain/consensus/datastructures/pruningstore/imported_pruning_point.go index f07a59114a..b24d4cca55 100644 --- a/domain/consensus/datastructures/pruningstore/imported_pruning_point.go +++ b/domain/consensus/datastructures/pruningstore/imported_pruning_point.go @@ -1,10 +1,10 @@ package pruningstore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/datastructures/pruningstore/pruning_staging_shard.go b/domain/consensus/datastructures/pruningstore/pruning_staging_shard.go index 1298f2f448..59651bf1c5 100644 --- a/domain/consensus/datastructures/pruningstore/pruning_staging_shard.go +++ b/domain/consensus/datastructures/pruningstore/pruning_staging_shard.go @@ -1,8 +1,8 @@ package pruningstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type pruningStagingShard struct { diff --git a/domain/consensus/datastructures/pruningstore/pruning_store.go b/domain/consensus/datastructures/pruningstore/pruning_store.go index a3ab44fc21..8460429038 100644 --- a/domain/consensus/datastructures/pruningstore/pruning_store.go +++ b/domain/consensus/datastructures/pruningstore/pruning_store.go @@ -2,14 +2,14 @@ package pruningstore import ( "encoding/binary" + "github.com/coinexcom/kaspad/domain/consensus/database" + "github.com/coinexcom/kaspad/domain/consensus/database/binaryserialization" + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucacheuint64tohash" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database" - "github.com/kaspanet/kaspad/domain/consensus/database/binaryserialization" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucacheuint64tohash" - "github.com/kaspanet/kaspad/util/staging" "github.com/pkg/errors" ) diff --git a/domain/consensus/datastructures/reachabilitydatastore/reachability_data_staging_shard.go b/domain/consensus/datastructures/reachabilitydatastore/reachability_data_staging_shard.go index 864a0cd502..8a26e5f0b1 100644 --- a/domain/consensus/datastructures/reachabilitydatastore/reachability_data_staging_shard.go +++ b/domain/consensus/datastructures/reachabilitydatastore/reachability_data_staging_shard.go @@ -1,8 +1,8 @@ package reachabilitydatastore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type reachabilityDataStagingShard struct { diff --git a/domain/consensus/datastructures/reachabilitydatastore/reachability_data_store.go b/domain/consensus/datastructures/reachabilitydatastore/reachability_data_store.go index 32af5fb926..ef5af012ce 100644 --- a/domain/consensus/datastructures/reachabilitydatastore/reachability_data_store.go +++ b/domain/consensus/datastructures/reachabilitydatastore/reachability_data_store.go @@ -1,13 +1,13 @@ package reachabilitydatastore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/util/staging" "github.com/pkg/errors" ) diff --git a/domain/consensus/datastructures/utxodiffstore/utxo_diff_staging_shard.go b/domain/consensus/datastructures/utxodiffstore/utxo_diff_staging_shard.go index 1d8dd0b48e..4058777e0d 100644 --- a/domain/consensus/datastructures/utxodiffstore/utxo_diff_staging_shard.go +++ b/domain/consensus/datastructures/utxodiffstore/utxo_diff_staging_shard.go @@ -1,8 +1,8 @@ package utxodiffstore import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type utxoDiffStagingShard struct { diff --git a/domain/consensus/datastructures/utxodiffstore/utxo_diff_store.go b/domain/consensus/datastructures/utxodiffstore/utxo_diff_store.go index b91eb8edbf..2ae142ffcf 100644 --- a/domain/consensus/datastructures/utxodiffstore/utxo_diff_store.go +++ b/domain/consensus/datastructures/utxodiffstore/utxo_diff_store.go @@ -1,12 +1,12 @@ package utxodiffstore import ( + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/lrucache" + "github.com/coinexcom/kaspad/util/staging" "github.com/golang/protobuf/proto" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/lrucache" - "github.com/kaspanet/kaspad/util/staging" "github.com/pkg/errors" ) diff --git a/domain/consensus/factory.go b/domain/consensus/factory.go index 8d1efef470..15a672e545 100644 --- a/domain/consensus/factory.go +++ b/domain/consensus/factory.go @@ -5,57 +5,57 @@ import ( "os" "sync" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/blockwindowheapslicestore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/daawindowstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/mergedepthrootstore" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/processes/blockparentbuilder" - parentssanager "github.com/kaspanet/kaspad/domain/consensus/processes/parentsmanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/pruningproofmanager" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/blockwindowheapslicestore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/daawindowstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/mergedepthrootstore" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/processes/blockparentbuilder" + parentssanager "github.com/coinexcom/kaspad/domain/consensus/processes/parentsmanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/pruningproofmanager" + "github.com/coinexcom/kaspad/util/staging" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/domain/prefixmanager/prefix" - "github.com/kaspanet/kaspad/util/txmass" - - consensusdatabase "github.com/kaspanet/kaspad/domain/consensus/database" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/acceptancedatastore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/blockheaderstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/blockrelationstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/blockstatusstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/blockstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/consensusstatestore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/daablocksstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/finalitystore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/ghostdagdatastore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/headersselectedchainstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/headersselectedtipstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/multisetstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/pruningstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/reachabilitydatastore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/utxodiffstore" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/processes/blockbuilder" - "github.com/kaspanet/kaspad/domain/consensus/processes/blockprocessor" - "github.com/kaspanet/kaspad/domain/consensus/processes/blockvalidator" - "github.com/kaspanet/kaspad/domain/consensus/processes/coinbasemanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/consensusstatemanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/dagtopologymanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/dagtraversalmanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/difficultymanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/finalitymanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/ghostdagmanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/headersselectedtipmanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/mergedepthmanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/pastmediantimemanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/pruningmanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/reachabilitymanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/syncmanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/transactionvalidator" - "github.com/kaspanet/kaspad/domain/dagconfig" - infrastructuredatabase "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" + "github.com/coinexcom/kaspad/domain/prefixmanager/prefix" + "github.com/coinexcom/kaspad/util/txmass" + + consensusdatabase "github.com/coinexcom/kaspad/domain/consensus/database" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/acceptancedatastore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/blockheaderstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/blockrelationstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/blockstatusstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/blockstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/consensusstatestore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/daablocksstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/finalitystore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/ghostdagdatastore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/headersselectedchainstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/headersselectedtipstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/multisetstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/pruningstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/reachabilitydatastore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/utxodiffstore" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/processes/blockbuilder" + "github.com/coinexcom/kaspad/domain/consensus/processes/blockprocessor" + "github.com/coinexcom/kaspad/domain/consensus/processes/blockvalidator" + "github.com/coinexcom/kaspad/domain/consensus/processes/coinbasemanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/consensusstatemanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/dagtopologymanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/dagtraversalmanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/difficultymanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/finalitymanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/ghostdagmanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/headersselectedtipmanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/mergedepthmanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/pastmediantimemanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/pruningmanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/reachabilitymanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/syncmanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/transactionvalidator" + "github.com/coinexcom/kaspad/domain/dagconfig" + infrastructuredatabase "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database/ldb" ) const ( diff --git a/domain/consensus/factory_test.go b/domain/consensus/factory_test.go index b5bca1394e..0260877d95 100644 --- a/domain/consensus/factory_test.go +++ b/domain/consensus/factory_test.go @@ -4,10 +4,10 @@ import ( "io/ioutil" "testing" - "github.com/kaspanet/kaspad/domain/prefixmanager/prefix" + "github.com/coinexcom/kaspad/domain/prefixmanager/prefix" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/infrastructure/db/database/ldb" ) func TestNewConsensus(t *testing.T) { diff --git a/domain/consensus/finality_test.go b/domain/consensus/finality_test.go index 6ac93f8f05..efb2e6dd9e 100644 --- a/domain/consensus/finality_test.go +++ b/domain/consensus/finality_test.go @@ -2,13 +2,13 @@ package consensus_test import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" "github.com/pkg/errors" "math" "math/rand" diff --git a/domain/consensus/log.go b/domain/consensus/log.go index a7768be5e6..311414fce3 100644 --- a/domain/consensus/log.go +++ b/domain/consensus/log.go @@ -1,8 +1,8 @@ package consensus import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("BDAG") diff --git a/domain/consensus/model/acceptancedata_equal_clone_test.go b/domain/consensus/model/acceptancedata_equal_clone_test.go index c7143172d2..1f5deb9b5f 100644 --- a/domain/consensus/model/acceptancedata_equal_clone_test.go +++ b/domain/consensus/model/acceptancedata_equal_clone_test.go @@ -4,8 +4,8 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" ) func initTestTransactionAcceptanceDataForClone() []*externalapi.TransactionAcceptanceData { diff --git a/domain/consensus/model/block_heap.go b/domain/consensus/model/block_heap.go index 95c51c870b..c4b048e8bf 100644 --- a/domain/consensus/model/block_heap.go +++ b/domain/consensus/model/block_heap.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockHeap represents a heap of block hashes, providing a priority-queue functionality type BlockHeap interface { diff --git a/domain/consensus/model/blockiterator.go b/domain/consensus/model/blockiterator.go index bfe57039d4..ab9b8d793a 100644 --- a/domain/consensus/model/blockiterator.go +++ b/domain/consensus/model/blockiterator.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockIterator is an iterator over blocks according to some order. type BlockIterator interface { diff --git a/domain/consensus/model/blockrelations.go b/domain/consensus/model/blockrelations.go index face57b606..5b1266bb86 100644 --- a/domain/consensus/model/blockrelations.go +++ b/domain/consensus/model/blockrelations.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockRelations represents a block's parent/child relations type BlockRelations struct { diff --git a/domain/consensus/model/blockrelations_equal_clone_test.go b/domain/consensus/model/blockrelations_equal_clone_test.go index 98193c22a0..82af40f83e 100644 --- a/domain/consensus/model/blockrelations_equal_clone_test.go +++ b/domain/consensus/model/blockrelations_equal_clone_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func initTestBlockRelationsForClone() []*BlockRelations { diff --git a/domain/consensus/model/externalapi/block_equal_clone_test.go b/domain/consensus/model/externalapi/block_equal_clone_test.go index 9e9db12109..7fa8b46126 100644 --- a/domain/consensus/model/externalapi/block_equal_clone_test.go +++ b/domain/consensus/model/externalapi/block_equal_clone_test.go @@ -1,8 +1,8 @@ package externalapi_test import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" "math/big" "reflect" "testing" diff --git a/domain/consensus/model/externalapi/blocklevelparents.go b/domain/consensus/model/externalapi/blocklevelparents.go index a4768e49b9..a43744008e 100644 --- a/domain/consensus/model/externalapi/blocklevelparents.go +++ b/domain/consensus/model/externalapi/blocklevelparents.go @@ -1,7 +1,7 @@ package externalapi // BlockLevelParents represent the parents within a single super-block level -// See https://github.com/kaspanet/research/issues/3 for further details +// See https://github.com/coinexcom/research/issues/3 for further details type BlockLevelParents []*DomainHash // Equal returns true if this BlockLevelParents is equal to `other` diff --git a/domain/consensus/model/externalapi/transaction_equal_clone_test.go b/domain/consensus/model/externalapi/transaction_equal_clone_test.go index ec23162e82..96cd867ca7 100644 --- a/domain/consensus/model/externalapi/transaction_equal_clone_test.go +++ b/domain/consensus/model/externalapi/transaction_equal_clone_test.go @@ -4,8 +4,8 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" ) // Changed fields of a test struct compared to a base test struct marked as "changed" and diff --git a/domain/consensus/model/interface_datastructures_acceptancedatastore.go b/domain/consensus/model/interface_datastructures_acceptancedatastore.go index 77f4096053..f17237863f 100644 --- a/domain/consensus/model/interface_datastructures_acceptancedatastore.go +++ b/domain/consensus/model/interface_datastructures_acceptancedatastore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // AcceptanceDataStore represents a store of AcceptanceData type AcceptanceDataStore interface { diff --git a/domain/consensus/model/interface_datastructures_blockheaderstore.go b/domain/consensus/model/interface_datastructures_blockheaderstore.go index a8dc612902..9c2282c0e6 100644 --- a/domain/consensus/model/interface_datastructures_blockheaderstore.go +++ b/domain/consensus/model/interface_datastructures_blockheaderstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockHeaderStore represents a store of block headers type BlockHeaderStore interface { diff --git a/domain/consensus/model/interface_datastructures_blockrelationstore.go b/domain/consensus/model/interface_datastructures_blockrelationstore.go index 008d93f2ff..8b150b46ab 100644 --- a/domain/consensus/model/interface_datastructures_blockrelationstore.go +++ b/domain/consensus/model/interface_datastructures_blockrelationstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockRelationStore represents a store of BlockRelations type BlockRelationStore interface { diff --git a/domain/consensus/model/interface_datastructures_blocks_with_trusted_data_daa_window_store.go b/domain/consensus/model/interface_datastructures_blocks_with_trusted_data_daa_window_store.go index 969cd1db2e..8f6f3dfaa9 100644 --- a/domain/consensus/model/interface_datastructures_blocks_with_trusted_data_daa_window_store.go +++ b/domain/consensus/model/interface_datastructures_blocks_with_trusted_data_daa_window_store.go @@ -1,7 +1,7 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // BlocksWithTrustedDataDAAWindowStore stores the DAA window of blocks with trusted data diff --git a/domain/consensus/model/interface_datastructures_blockstatusstore.go b/domain/consensus/model/interface_datastructures_blockstatusstore.go index 3b7a484395..e694685f5e 100644 --- a/domain/consensus/model/interface_datastructures_blockstatusstore.go +++ b/domain/consensus/model/interface_datastructures_blockstatusstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockStatusStore represents a store of BlockStatuses type BlockStatusStore interface { diff --git a/domain/consensus/model/interface_datastructures_blockstore.go b/domain/consensus/model/interface_datastructures_blockstore.go index 8ddcffad56..855c9edf21 100644 --- a/domain/consensus/model/interface_datastructures_blockstore.go +++ b/domain/consensus/model/interface_datastructures_blockstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockStore represents a store of blocks type BlockStore interface { diff --git a/domain/consensus/model/interface_datastructures_consensusstatestore.go b/domain/consensus/model/interface_datastructures_consensusstatestore.go index 97fa8d16e4..1edd6ca433 100644 --- a/domain/consensus/model/interface_datastructures_consensusstatestore.go +++ b/domain/consensus/model/interface_datastructures_consensusstatestore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // ConsensusStateStore represents a store for the current consensus state type ConsensusStateStore interface { diff --git a/domain/consensus/model/interface_datastructures_daablocksstore.go b/domain/consensus/model/interface_datastructures_daablocksstore.go index 6f2dceccf6..a786f6f131 100644 --- a/domain/consensus/model/interface_datastructures_daablocksstore.go +++ b/domain/consensus/model/interface_datastructures_daablocksstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // DAABlocksStore represents a store of ??? type DAABlocksStore interface { diff --git a/domain/consensus/model/interface_datastructures_finalitystore.go b/domain/consensus/model/interface_datastructures_finalitystore.go index 61ec9c6cc6..fd109e7a12 100644 --- a/domain/consensus/model/interface_datastructures_finalitystore.go +++ b/domain/consensus/model/interface_datastructures_finalitystore.go @@ -1,7 +1,7 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // FinalityStore represents a store for finality data diff --git a/domain/consensus/model/interface_datastructures_ghostdagdatastore.go b/domain/consensus/model/interface_datastructures_ghostdagdatastore.go index 17daadd247..2380c603aa 100644 --- a/domain/consensus/model/interface_datastructures_ghostdagdatastore.go +++ b/domain/consensus/model/interface_datastructures_ghostdagdatastore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // GHOSTDAGDataStore represents a store of BlockGHOSTDAGData type GHOSTDAGDataStore interface { diff --git a/domain/consensus/model/interface_datastructures_headersselectedchainstore.go b/domain/consensus/model/interface_datastructures_headersselectedchainstore.go index 4100a62c87..b891ff7153 100644 --- a/domain/consensus/model/interface_datastructures_headersselectedchainstore.go +++ b/domain/consensus/model/interface_datastructures_headersselectedchainstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // HeadersSelectedChainStore represents a store of the headers selected chain type HeadersSelectedChainStore interface { diff --git a/domain/consensus/model/interface_datastructures_headertipsstore.go b/domain/consensus/model/interface_datastructures_headertipsstore.go index 64bb884c82..028fa03c28 100644 --- a/domain/consensus/model/interface_datastructures_headertipsstore.go +++ b/domain/consensus/model/interface_datastructures_headertipsstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // HeaderSelectedTipStore represents a store of the headers selected tip type HeaderSelectedTipStore interface { diff --git a/domain/consensus/model/interface_datastructures_mergedepthrootstore.go b/domain/consensus/model/interface_datastructures_mergedepthrootstore.go index 6fe5c94162..0afeed1516 100644 --- a/domain/consensus/model/interface_datastructures_mergedepthrootstore.go +++ b/domain/consensus/model/interface_datastructures_mergedepthrootstore.go @@ -1,7 +1,7 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MergeDepthRootStore represents a store for merge depth roots diff --git a/domain/consensus/model/interface_datastructures_multisetstore.go b/domain/consensus/model/interface_datastructures_multisetstore.go index 5cd39285ce..1375fbe788 100644 --- a/domain/consensus/model/interface_datastructures_multisetstore.go +++ b/domain/consensus/model/interface_datastructures_multisetstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // MultisetStore represents a store of Multisets type MultisetStore interface { diff --git a/domain/consensus/model/interface_datastructures_pruningstore.go b/domain/consensus/model/interface_datastructures_pruningstore.go index b60a861f86..53e1c92dd4 100644 --- a/domain/consensus/model/interface_datastructures_pruningstore.go +++ b/domain/consensus/model/interface_datastructures_pruningstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // PruningStore represents a store for the current pruning state type PruningStore interface { diff --git a/domain/consensus/model/interface_datastructures_reachabilitydatastore.go b/domain/consensus/model/interface_datastructures_reachabilitydatastore.go index fbbac1f4d9..be6a672bef 100644 --- a/domain/consensus/model/interface_datastructures_reachabilitydatastore.go +++ b/domain/consensus/model/interface_datastructures_reachabilitydatastore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // ReachabilityDataStore represents a store of ReachabilityData type ReachabilityDataStore interface { diff --git a/domain/consensus/model/interface_datastructures_utxodiffstore.go b/domain/consensus/model/interface_datastructures_utxodiffstore.go index bcad418a7a..b72e5f0f33 100644 --- a/domain/consensus/model/interface_datastructures_utxodiffstore.go +++ b/domain/consensus/model/interface_datastructures_utxodiffstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // UTXODiffStore represents a store of UTXODiffs type UTXODiffStore interface { diff --git a/domain/consensus/model/interface_datastructures_windowheapstore.go b/domain/consensus/model/interface_datastructures_windowheapstore.go index b594fc0768..02b1089bc9 100644 --- a/domain/consensus/model/interface_datastructures_windowheapstore.go +++ b/domain/consensus/model/interface_datastructures_windowheapstore.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // WindowHeapSliceStore caches the slices that are needed for the heap implementation of DAGTraversalManager.BlockWindow type WindowHeapSliceStore interface { diff --git a/domain/consensus/model/interface_processes_blockbuilder.go b/domain/consensus/model/interface_processes_blockbuilder.go index a6e6efd57e..a7e56c9328 100644 --- a/domain/consensus/model/interface_processes_blockbuilder.go +++ b/domain/consensus/model/interface_processes_blockbuilder.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockBuilder is responsible for creating blocks from the current state type BlockBuilder interface { diff --git a/domain/consensus/model/interface_processes_blockparentbuilder.go b/domain/consensus/model/interface_processes_blockparentbuilder.go index b865f6eec9..398ba22306 100644 --- a/domain/consensus/model/interface_processes_blockparentbuilder.go +++ b/domain/consensus/model/interface_processes_blockparentbuilder.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockParentBuilder exposes a method to build super-block parents for // a given set of direct parents diff --git a/domain/consensus/model/interface_processes_blockprocessor.go b/domain/consensus/model/interface_processes_blockprocessor.go index cf6b835aa8..3589565027 100644 --- a/domain/consensus/model/interface_processes_blockprocessor.go +++ b/domain/consensus/model/interface_processes_blockprocessor.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // BlockProcessor is responsible for processing incoming blocks type BlockProcessor interface { diff --git a/domain/consensus/model/interface_processes_blockvalidator.go b/domain/consensus/model/interface_processes_blockvalidator.go index 6133671d1f..632e135dd3 100644 --- a/domain/consensus/model/interface_processes_blockvalidator.go +++ b/domain/consensus/model/interface_processes_blockvalidator.go @@ -1,7 +1,7 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // BlockValidator exposes a set of validation classes, after which diff --git a/domain/consensus/model/interface_processes_coinbasemanager.go b/domain/consensus/model/interface_processes_coinbasemanager.go index 878c02caf7..ce296537e7 100644 --- a/domain/consensus/model/interface_processes_coinbasemanager.go +++ b/domain/consensus/model/interface_processes_coinbasemanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // CoinbaseManager exposes methods for handling blocks' // coinbase transactions diff --git a/domain/consensus/model/interface_processes_consensusstatemanager.go b/domain/consensus/model/interface_processes_consensusstatemanager.go index bb22c37902..2ec194e32a 100644 --- a/domain/consensus/model/interface_processes_consensusstatemanager.go +++ b/domain/consensus/model/interface_processes_consensusstatemanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // ConsensusStateManager manages the node's consensus state type ConsensusStateManager interface { diff --git a/domain/consensus/model/interface_processes_dagtopologymanager.go b/domain/consensus/model/interface_processes_dagtopologymanager.go index 9fceff43b8..124eb628da 100644 --- a/domain/consensus/model/interface_processes_dagtopologymanager.go +++ b/domain/consensus/model/interface_processes_dagtopologymanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // DAGTopologyManager exposes methods for querying relationships // between blocks in the DAG diff --git a/domain/consensus/model/interface_processes_dagtraversalmanager.go b/domain/consensus/model/interface_processes_dagtraversalmanager.go index add161c2bb..e2fbcc965c 100644 --- a/domain/consensus/model/interface_processes_dagtraversalmanager.go +++ b/domain/consensus/model/interface_processes_dagtraversalmanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // DAGTraversalManager exposes methods for traversing blocks // in the DAG diff --git a/domain/consensus/model/interface_processes_difficultymanager.go b/domain/consensus/model/interface_processes_difficultymanager.go index c2e2bb6d35..bb398e6740 100644 --- a/domain/consensus/model/interface_processes_difficultymanager.go +++ b/domain/consensus/model/interface_processes_difficultymanager.go @@ -1,7 +1,7 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // DifficultyManager provides a method to resolve the diff --git a/domain/consensus/model/interface_processes_finalitymanager.go b/domain/consensus/model/interface_processes_finalitymanager.go index 57baa45109..19fe3a3250 100644 --- a/domain/consensus/model/interface_processes_finalitymanager.go +++ b/domain/consensus/model/interface_processes_finalitymanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // FinalityManager provides method to validate that a block does not violate finality type FinalityManager interface { diff --git a/domain/consensus/model/interface_processes_ghostdagmanager.go b/domain/consensus/model/interface_processes_ghostdagmanager.go index f060d7b7ca..b157cff1e5 100644 --- a/domain/consensus/model/interface_processes_ghostdagmanager.go +++ b/domain/consensus/model/interface_processes_ghostdagmanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // GHOSTDAGManager resolves and manages GHOSTDAG block data type GHOSTDAGManager interface { diff --git a/domain/consensus/model/interface_processes_headertipsmanager.go b/domain/consensus/model/interface_processes_headertipsmanager.go index 88d80ebab9..aba3aabdea 100644 --- a/domain/consensus/model/interface_processes_headertipsmanager.go +++ b/domain/consensus/model/interface_processes_headertipsmanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // HeadersSelectedTipManager manages the state of the headers selected tip type HeadersSelectedTipManager interface { diff --git a/domain/consensus/model/interface_processes_mergedepthmanager.go b/domain/consensus/model/interface_processes_mergedepthmanager.go index 31bc1b2ac2..a0fb3a3011 100644 --- a/domain/consensus/model/interface_processes_mergedepthmanager.go +++ b/domain/consensus/model/interface_processes_mergedepthmanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // MergeDepthManager is used to validate mergeDepth for blocks type MergeDepthManager interface { diff --git a/domain/consensus/model/interface_processes_parentsmanager.go b/domain/consensus/model/interface_processes_parentsmanager.go index 4550fa86d6..bad1e5dcc1 100644 --- a/domain/consensus/model/interface_processes_parentsmanager.go +++ b/domain/consensus/model/interface_processes_parentsmanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // ParentsManager lets is a wrapper above header parents that replaces empty parents with genesis when needed. type ParentsManager interface { diff --git a/domain/consensus/model/interface_processes_pastmediantimemanager.go b/domain/consensus/model/interface_processes_pastmediantimemanager.go index 35961fdcd8..38b5a56bc7 100644 --- a/domain/consensus/model/interface_processes_pastmediantimemanager.go +++ b/domain/consensus/model/interface_processes_pastmediantimemanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // PastMedianTimeManager provides a method to resolve the // past median time of a block diff --git a/domain/consensus/model/interface_processes_pruningmanager.go b/domain/consensus/model/interface_processes_pruningmanager.go index cda221ba8d..9c9cb5d13b 100644 --- a/domain/consensus/model/interface_processes_pruningmanager.go +++ b/domain/consensus/model/interface_processes_pruningmanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // PruningManager resolves and manages the current pruning point type PruningManager interface { diff --git a/domain/consensus/model/interface_processes_pruningproofmanager.go b/domain/consensus/model/interface_processes_pruningproofmanager.go index de876c6db5..2d4325beb2 100644 --- a/domain/consensus/model/interface_processes_pruningproofmanager.go +++ b/domain/consensus/model/interface_processes_pruningproofmanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // PruningProofManager builds, validates and applies pruning proofs. type PruningProofManager interface { diff --git a/domain/consensus/model/interface_processes_reachabilitytree.go b/domain/consensus/model/interface_processes_reachabilitytree.go index 0120234b55..bf27f54689 100644 --- a/domain/consensus/model/interface_processes_reachabilitytree.go +++ b/domain/consensus/model/interface_processes_reachabilitytree.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // ReachabilityManager maintains a structure that allows to answer // reachability queries in sub-linear time diff --git a/domain/consensus/model/interface_processes_syncmanager.go b/domain/consensus/model/interface_processes_syncmanager.go index 0b8bfc7bc8..7be491325a 100644 --- a/domain/consensus/model/interface_processes_syncmanager.go +++ b/domain/consensus/model/interface_processes_syncmanager.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // SyncManager exposes functions to support sync between kaspad nodes type SyncManager interface { diff --git a/domain/consensus/model/interface_processes_transactionvalidator.go b/domain/consensus/model/interface_processes_transactionvalidator.go index a43d0adc9a..7be9b0565b 100644 --- a/domain/consensus/model/interface_processes_transactionvalidator.go +++ b/domain/consensus/model/interface_processes_transactionvalidator.go @@ -1,7 +1,7 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // TransactionValidator exposes a set of validation classes, after which diff --git a/domain/consensus/model/multiset.go b/domain/consensus/model/multiset.go index 086c42e0e0..6deeff86c5 100644 --- a/domain/consensus/model/multiset.go +++ b/domain/consensus/model/multiset.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // Multiset represents a secp256k1 multiset type Multiset interface { diff --git a/domain/consensus/model/reachabilitydata.go b/domain/consensus/model/reachabilitydata.go index ab3643c3e1..8276b5190d 100644 --- a/domain/consensus/model/reachabilitydata.go +++ b/domain/consensus/model/reachabilitydata.go @@ -3,7 +3,7 @@ package model import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // MutableReachabilityData represents a node in the reachability tree diff --git a/domain/consensus/model/subdag.go b/domain/consensus/model/subdag.go index 3e9f9b1da6..3fbee225a7 100644 --- a/domain/consensus/model/subdag.go +++ b/domain/consensus/model/subdag.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // SubDAG represents a context-free representation of a partial DAG type SubDAG struct { diff --git a/domain/consensus/model/testapi/test_block_builder.go b/domain/consensus/model/testapi/test_block_builder.go index 8b2f9097df..529ddc1ec9 100644 --- a/domain/consensus/model/testapi/test_block_builder.go +++ b/domain/consensus/model/testapi/test_block_builder.go @@ -1,8 +1,8 @@ package testapi import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // TestBlockBuilder adds to the main BlockBuilder methods required by tests diff --git a/domain/consensus/model/testapi/test_consensus.go b/domain/consensus/model/testapi/test_consensus.go index 6738a916ce..5aa3085100 100644 --- a/domain/consensus/model/testapi/test_consensus.go +++ b/domain/consensus/model/testapi/test_consensus.go @@ -3,10 +3,10 @@ package testapi import ( "io" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) // MineJSONBlockType indicates which type of blocks MineJSON mines diff --git a/domain/consensus/model/testapi/test_consensus_state_manager.go b/domain/consensus/model/testapi/test_consensus_state_manager.go index 9ae50c357f..b3eba383b1 100644 --- a/domain/consensus/model/testapi/test_consensus_state_manager.go +++ b/domain/consensus/model/testapi/test_consensus_state_manager.go @@ -1,8 +1,8 @@ package testapi import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // TestConsensusStateManager adds to the main ConsensusStateManager methods required by tests diff --git a/domain/consensus/model/testapi/test_reachability_manager.go b/domain/consensus/model/testapi/test_reachability_manager.go index 5eb56c5c37..9f996dad60 100644 --- a/domain/consensus/model/testapi/test_reachability_manager.go +++ b/domain/consensus/model/testapi/test_reachability_manager.go @@ -1,8 +1,8 @@ package testapi import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // TestReachabilityManager adds to the main ReachabilityManager methods required by tests diff --git a/domain/consensus/model/testapi/test_transaction_validator.go b/domain/consensus/model/testapi/test_transaction_validator.go index 0383e6be87..526fec8546 100644 --- a/domain/consensus/model/testapi/test_transaction_validator.go +++ b/domain/consensus/model/testapi/test_transaction_validator.go @@ -1,8 +1,8 @@ package testapi import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" ) // TestTransactionValidator adds to the main TransactionValidator methods required by tests diff --git a/domain/consensus/model/utxo_diff_reversal_data.go b/domain/consensus/model/utxo_diff_reversal_data.go index c6fed8dd5d..e34226b106 100644 --- a/domain/consensus/model/utxo_diff_reversal_data.go +++ b/domain/consensus/model/utxo_diff_reversal_data.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // UTXODiffReversalData is used by ConsensusStateManager to reverse the UTXODiffs during a re-org type UTXODiffReversalData struct { diff --git a/domain/consensus/model/virtual.go b/domain/consensus/model/virtual.go index ed7c4859ff..dbfd6f4d3b 100644 --- a/domain/consensus/model/virtual.go +++ b/domain/consensus/model/virtual.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // VirtualBlockHash is a marker hash for the virtual block var VirtualBlockHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{ diff --git a/domain/consensus/processes/blockbuilder/block_builder.go b/domain/consensus/processes/blockbuilder/block_builder.go index 88fe446afc..c4e3ecc2fb 100644 --- a/domain/consensus/processes/blockbuilder/block_builder.go +++ b/domain/consensus/processes/blockbuilder/block_builder.go @@ -4,17 +4,17 @@ import ( "math/big" "sort" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/merkle" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/merkle" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/mstime" ) type blockBuilder struct { diff --git a/domain/consensus/processes/blockbuilder/block_builder_test.go b/domain/consensus/processes/blockbuilder/block_builder_test.go index 00726a0e78..eb65065ddf 100644 --- a/domain/consensus/processes/blockbuilder/block_builder_test.go +++ b/domain/consensus/processes/blockbuilder/block_builder_test.go @@ -4,12 +4,12 @@ import ( "github.com/pkg/errors" "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestBuildBlockErrorCases(t *testing.T) { diff --git a/domain/consensus/processes/blockbuilder/log.go b/domain/consensus/processes/blockbuilder/log.go index 120ab53eaa..398a1642d7 100644 --- a/domain/consensus/processes/blockbuilder/log.go +++ b/domain/consensus/processes/blockbuilder/log.go @@ -1,7 +1,7 @@ package blockbuilder import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("BDAG") diff --git a/domain/consensus/processes/blockbuilder/test_block_builder.go b/domain/consensus/processes/blockbuilder/test_block_builder.go index d7089cc8d9..7e19a1b392 100644 --- a/domain/consensus/processes/blockbuilder/test_block_builder.go +++ b/domain/consensus/processes/blockbuilder/test_block_builder.go @@ -2,14 +2,14 @@ package blockbuilder import ( "encoding/binary" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" "math/big" "sort" diff --git a/domain/consensus/processes/blockparentbuilder/blockparentbuilder.go b/domain/consensus/processes/blockparentbuilder/blockparentbuilder.go index adacb42a19..54dd9d36a6 100644 --- a/domain/consensus/processes/blockparentbuilder/blockparentbuilder.go +++ b/domain/consensus/processes/blockparentbuilder/blockparentbuilder.go @@ -1,10 +1,10 @@ package blockparentbuilder import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashset" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashset" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockprocessor/blocklogger/blocklogger.go b/domain/consensus/processes/blockprocessor/blocklogger/blocklogger.go index 24d9418e19..652c651bfe 100644 --- a/domain/consensus/processes/blockprocessor/blocklogger/blocklogger.go +++ b/domain/consensus/processes/blockprocessor/blocklogger/blocklogger.go @@ -7,8 +7,8 @@ package blocklogger import ( "time" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/util/mstime" ) // BlockLogger is a type tracking the amount of blocks/headers/transactions to log the time it took to receive them diff --git a/domain/consensus/processes/blockprocessor/blocklogger/log.go b/domain/consensus/processes/blockprocessor/blocklogger/log.go index 386fe0128d..35d38360bf 100644 --- a/domain/consensus/processes/blockprocessor/blocklogger/log.go +++ b/domain/consensus/processes/blockprocessor/blocklogger/log.go @@ -5,7 +5,7 @@ package blocklogger import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("BDAG") diff --git a/domain/consensus/processes/blockprocessor/blockprocessor.go b/domain/consensus/processes/blockprocessor/blockprocessor.go index f61ed14300..8f15449089 100644 --- a/domain/consensus/processes/blockprocessor/blockprocessor.go +++ b/domain/consensus/processes/blockprocessor/blockprocessor.go @@ -3,10 +3,10 @@ package blockprocessor import ( "time" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/processes/blockprocessor/blocklogger" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/processes/blockprocessor/blocklogger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) // blockProcessor is responsible for processing incoming blocks diff --git a/domain/consensus/processes/blockprocessor/log.go b/domain/consensus/processes/blockprocessor/log.go index 29a23134fb..69a407d074 100644 --- a/domain/consensus/processes/blockprocessor/log.go +++ b/domain/consensus/processes/blockprocessor/log.go @@ -1,7 +1,7 @@ package blockprocessor import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("BDAG") diff --git a/domain/consensus/processes/blockprocessor/validate_and_insert_block.go b/domain/consensus/processes/blockprocessor/validate_and_insert_block.go index 5d71d60e08..3583f6134f 100644 --- a/domain/consensus/processes/blockprocessor/validate_and_insert_block.go +++ b/domain/consensus/processes/blockprocessor/validate_and_insert_block.go @@ -4,16 +4,16 @@ import ( // we need to embed the utxoset of mainnet genesis here _ "embed" "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/multiset" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/difficulty" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/multiset" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/util/staging" "github.com/pkg/errors" ) @@ -232,7 +232,7 @@ func (bp *blockProcessor) loadUTXODataForGenesis(stagingArea *model.StagingArea, // pruning point. // The actual UTXO set that fits Mainnet's genesis' UTXO commitment was removed from the codebase in order // to make reduce the consensus initialization time and the compiled binary size, but can be still - // found here for anyone to verify: https://github.com/kaspanet/kaspad/blob/dbf18d8052f000ba0079be9e79b2d6f5a98b74ca/domain/consensus/processes/blockprocessor/resources/utxos.gz + // found here for anyone to verify: https://github.com/coinexcom/kaspad/blob/dbf18d8052f000ba0079be9e79b2d6f5a98b74ca/domain/consensus/processes/blockprocessor/resources/utxos.gz bp.consensusStateStore.StageVirtualUTXODiff(stagingArea, utxo.NewUTXODiff()) bp.utxoDiffStore.Stage(stagingArea, blockHash, utxo.NewUTXODiff(), nil) bp.multisetStore.Stage(stagingArea, blockHash, multiset.New()) diff --git a/domain/consensus/processes/blockprocessor/validate_and_insert_block_test.go b/domain/consensus/processes/blockprocessor/validate_and_insert_block_test.go index 3f4000a6da..bddb9c2ff5 100644 --- a/domain/consensus/processes/blockprocessor/validate_and_insert_block_test.go +++ b/domain/consensus/processes/blockprocessor/validate_and_insert_block_test.go @@ -4,15 +4,15 @@ import ( "strings" "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/merkle" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/merkle" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockprocessor/validate_and_insert_block_with_trusted_data.go b/domain/consensus/processes/blockprocessor/validate_and_insert_block_with_trusted_data.go index 7627ef00e8..57b8d96232 100644 --- a/domain/consensus/processes/blockprocessor/validate_and_insert_block_with_trusted_data.go +++ b/domain/consensus/processes/blockprocessor/validate_and_insert_block_with_trusted_data.go @@ -1,10 +1,10 @@ package blockprocessor import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func (bp *blockProcessor) validateAndInsertBlockWithTrustedData(stagingArea *model.StagingArea, diff --git a/domain/consensus/processes/blockprocessor/validate_and_insert_imported_pruning_point.go b/domain/consensus/processes/blockprocessor/validate_and_insert_imported_pruning_point.go index 069af66a84..f60650567b 100644 --- a/domain/consensus/processes/blockprocessor/validate_and_insert_imported_pruning_point.go +++ b/domain/consensus/processes/blockprocessor/validate_and_insert_imported_pruning_point.go @@ -1,9 +1,9 @@ package blockprocessor import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockprocessor/validate_and_insert_imported_pruning_point_test.go b/domain/consensus/processes/blockprocessor/validate_and_insert_imported_pruning_point_test.go index 0ecd36b1e5..e79339ea17 100644 --- a/domain/consensus/processes/blockprocessor/validate_and_insert_imported_pruning_point_test.go +++ b/domain/consensus/processes/blockprocessor/validate_and_insert_imported_pruning_point_test.go @@ -1,21 +1,21 @@ package blockprocessor_test import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/dagconfig" "math" "testing" "time" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockprocessor/validate_block.go b/domain/consensus/processes/blockprocessor/validate_block.go index 24ddcc514c..917c888599 100644 --- a/domain/consensus/processes/blockprocessor/validate_block.go +++ b/domain/consensus/processes/blockprocessor/validate_block.go @@ -1,11 +1,11 @@ package blockprocessor import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/util/staging" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockvalidator/block_body_in_context.go b/domain/consensus/processes/blockvalidator/block_body_in_context.go index f032fd96fd..4ec5ab0329 100644 --- a/domain/consensus/processes/blockvalidator/block_body_in_context.go +++ b/domain/consensus/processes/blockvalidator/block_body_in_context.go @@ -1,12 +1,12 @@ package blockvalidator import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/virtual" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/utils/virtual" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) @@ -168,7 +168,7 @@ func (v *blockValidator) checkCoinbaseSubsidy( return err } - // The pruning proof ( https://github.com/kaspanet/docs/blob/main/Reference/prunality/Prunality.pdf ) concludes + // The pruning proof ( https://github.com/coinexcom/docs/blob/main/Reference/prunality/Prunality.pdf ) concludes // that it's impossible for a block to be merged if it was created in the anticone of the pruning point that was // present at the time of the block creation. So if such situation happens we can be sure that it happens during // IBD and that this block has at least pruningDepth-finalityInterval confirmations. diff --git a/domain/consensus/processes/blockvalidator/block_body_in_context_test.go b/domain/consensus/processes/blockvalidator/block_body_in_context_test.go index ac93c895b0..1e3c26fbe6 100644 --- a/domain/consensus/processes/blockvalidator/block_body_in_context_test.go +++ b/domain/consensus/processes/blockvalidator/block_body_in_context_test.go @@ -3,14 +3,14 @@ package blockvalidator_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" - - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus/model" + + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockvalidator/block_body_in_isolation.go b/domain/consensus/processes/blockvalidator/block_body_in_isolation.go index ea29998951..31e1732678 100644 --- a/domain/consensus/processes/blockvalidator/block_body_in_isolation.go +++ b/domain/consensus/processes/blockvalidator/block_body_in_isolation.go @@ -1,14 +1,14 @@ package blockvalidator import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/merkle" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/merkle" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockvalidator/block_body_in_isolation_test.go b/domain/consensus/processes/blockvalidator/block_body_in_isolation_test.go index 0d3062f58f..5b3522e578 100644 --- a/domain/consensus/processes/blockvalidator/block_body_in_isolation_test.go +++ b/domain/consensus/processes/blockvalidator/block_body_in_isolation_test.go @@ -8,18 +8,18 @@ import ( "runtime" "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/merkle" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/merkle" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockvalidator/block_header_in_context.go b/domain/consensus/processes/blockvalidator/block_header_in_context.go index b4d47fa05e..b01e4d18aa 100644 --- a/domain/consensus/processes/blockvalidator/block_header_in_context.go +++ b/domain/consensus/processes/blockvalidator/block_header_in_context.go @@ -2,11 +2,11 @@ package blockvalidator import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockvalidator/block_header_in_context_test.go b/domain/consensus/processes/blockvalidator/block_header_in_context_test.go index e26c3a3c74..0e8f6a206c 100644 --- a/domain/consensus/processes/blockvalidator/block_header_in_context_test.go +++ b/domain/consensus/processes/blockvalidator/block_header_in_context_test.go @@ -2,18 +2,18 @@ package blockvalidator_test import ( "errors" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" "math/big" "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestValidateMedianTime(t *testing.T) { diff --git a/domain/consensus/processes/blockvalidator/block_header_in_isolation.go b/domain/consensus/processes/blockvalidator/block_header_in_isolation.go index 841f59415b..6692e791ad 100644 --- a/domain/consensus/processes/blockvalidator/block_header_in_isolation.go +++ b/domain/consensus/processes/blockvalidator/block_header_in_isolation.go @@ -1,13 +1,13 @@ package blockvalidator import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/mstime" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockvalidator/block_header_in_isolation_test.go b/domain/consensus/processes/blockvalidator/block_header_in_isolation_test.go index 43d6c48ea1..bdb2f73220 100644 --- a/domain/consensus/processes/blockvalidator/block_header_in_isolation_test.go +++ b/domain/consensus/processes/blockvalidator/block_header_in_isolation_test.go @@ -1,18 +1,18 @@ package blockvalidator_test import ( - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" "reflect" "runtime" "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/util/mstime" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockvalidator/blockvalidator.go b/domain/consensus/processes/blockvalidator/blockvalidator.go index 7788a49b56..e4093c56e6 100644 --- a/domain/consensus/processes/blockvalidator/blockvalidator.go +++ b/domain/consensus/processes/blockvalidator/blockvalidator.go @@ -4,11 +4,11 @@ import ( "math/big" "time" - "github.com/kaspanet/kaspad/util/txmass" + "github.com/coinexcom/kaspad/util/txmass" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/util/difficulty" ) // blockValidator exposes a set of validation classes, after which diff --git a/domain/consensus/processes/blockvalidator/header_pruning_point.go b/domain/consensus/processes/blockvalidator/header_pruning_point.go index 1a62aa70ec..8e0a00943d 100644 --- a/domain/consensus/processes/blockvalidator/header_pruning_point.go +++ b/domain/consensus/processes/blockvalidator/header_pruning_point.go @@ -1,9 +1,9 @@ package blockvalidator import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockvalidator/log.go b/domain/consensus/processes/blockvalidator/log.go index 5a5af5012d..0397127855 100644 --- a/domain/consensus/processes/blockvalidator/log.go +++ b/domain/consensus/processes/blockvalidator/log.go @@ -1,7 +1,7 @@ package blockvalidator import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("BLVA") diff --git a/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty.go b/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty.go index 0ade85681a..a8319e5c11 100644 --- a/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty.go +++ b/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty.go @@ -1,13 +1,13 @@ package blockvalidator import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/pow" - "github.com/kaspanet/kaspad/domain/consensus/utils/virtual" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/pow" + "github.com/coinexcom/kaspad/domain/consensus/utils/virtual" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty_test.go b/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty_test.go index 4ca2ff4799..4dab8e58e6 100644 --- a/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty_test.go +++ b/domain/consensus/processes/blockvalidator/pruning_violation_proof_of_work_and_difficulty_test.go @@ -7,18 +7,18 @@ import ( "testing" "time" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/merkle" - "github.com/kaspanet/kaspad/domain/consensus/utils/mining" - "github.com/kaspanet/kaspad/domain/consensus/utils/pow" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/merkle" + "github.com/coinexcom/kaspad/domain/consensus/utils/mining" + "github.com/coinexcom/kaspad/domain/consensus/utils/pow" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/util/difficulty" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/coinbasemanager/coinbasemanager.go b/domain/consensus/processes/coinbasemanager/coinbasemanager.go index 2d54693e03..0afcb656b9 100644 --- a/domain/consensus/processes/coinbasemanager/coinbasemanager.go +++ b/domain/consensus/processes/coinbasemanager/coinbasemanager.go @@ -1,13 +1,13 @@ package coinbasemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashset" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashset" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" "math" ) diff --git a/domain/consensus/processes/coinbasemanager/coinbasemanager_external_test.go b/domain/consensus/processes/coinbasemanager/coinbasemanager_external_test.go index a446ba5d61..08fc8d5ae8 100644 --- a/domain/consensus/processes/coinbasemanager/coinbasemanager_external_test.go +++ b/domain/consensus/processes/coinbasemanager/coinbasemanager_external_test.go @@ -1,10 +1,10 @@ package coinbasemanager_test import ( - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" "testing" ) diff --git a/domain/consensus/processes/coinbasemanager/coinbasemanager_test.go b/domain/consensus/processes/coinbasemanager/coinbasemanager_test.go index a5e658c08c..e206041647 100644 --- a/domain/consensus/processes/coinbasemanager/coinbasemanager_test.go +++ b/domain/consensus/processes/coinbasemanager/coinbasemanager_test.go @@ -1,9 +1,9 @@ package coinbasemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/dagconfig" "strconv" "testing" ) diff --git a/domain/consensus/processes/coinbasemanager/payload.go b/domain/consensus/processes/coinbasemanager/payload.go index ff82e5c690..46aa9f23ac 100644 --- a/domain/consensus/processes/coinbasemanager/payload.go +++ b/domain/consensus/processes/coinbasemanager/payload.go @@ -3,8 +3,8 @@ package coinbasemanager import ( "encoding/binary" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/consensusstatemanager/add_block_to_virtual.go b/domain/consensus/processes/consensusstatemanager/add_block_to_virtual.go index da2f77a1e3..58596b19f2 100644 --- a/domain/consensus/processes/consensusstatemanager/add_block_to_virtual.go +++ b/domain/consensus/processes/consensusstatemanager/add_block_to_virtual.go @@ -1,10 +1,10 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/infrastructure/logger" ) // AddBlock submits the given block to be added to the diff --git a/domain/consensus/processes/consensusstatemanager/add_block_to_virtual_test.go b/domain/consensus/processes/consensusstatemanager/add_block_to_virtual_test.go index 807bae63b8..bd0472b440 100644 --- a/domain/consensus/processes/consensusstatemanager/add_block_to_virtual_test.go +++ b/domain/consensus/processes/consensusstatemanager/add_block_to_virtual_test.go @@ -3,13 +3,13 @@ package consensusstatemanager_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestVirtualDiff(t *testing.T) { diff --git a/domain/consensus/processes/consensusstatemanager/calculate_past_utxo.go b/domain/consensus/processes/consensusstatemanager/calculate_past_utxo.go index 1af4f7072b..a6caadcaa5 100644 --- a/domain/consensus/processes/consensusstatemanager/calculate_past_utxo.go +++ b/domain/consensus/processes/consensusstatemanager/calculate_past_utxo.go @@ -1,15 +1,15 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" ) func (csm *consensusStateManager) CalculatePastUTXOAndAcceptanceData(stagingArea *model.StagingArea, diff --git a/domain/consensus/processes/consensusstatemanager/calculate_past_utxo_test.go b/domain/consensus/processes/consensusstatemanager/calculate_past_utxo_test.go index a734fc28bf..e480932175 100644 --- a/domain/consensus/processes/consensusstatemanager/calculate_past_utxo_test.go +++ b/domain/consensus/processes/consensusstatemanager/calculate_past_utxo_test.go @@ -3,13 +3,13 @@ package consensusstatemanager_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/multiset" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/multiset" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" ) func TestUTXOCommitment(t *testing.T) { diff --git a/domain/consensus/processes/consensusstatemanager/check_finality_violation.go b/domain/consensus/processes/consensusstatemanager/check_finality_violation.go index 0512068791..a6fc3d2bf0 100644 --- a/domain/consensus/processes/consensusstatemanager/check_finality_violation.go +++ b/domain/consensus/processes/consensusstatemanager/check_finality_violation.go @@ -1,8 +1,8 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (csm *consensusStateManager) isViolatingFinality(stagingArea *model.StagingArea, blockHash *externalapi.DomainHash, diff --git a/domain/consensus/processes/consensusstatemanager/consensus_state_manager.go b/domain/consensus/processes/consensusstatemanager/consensus_state_manager.go index 08fbb37bb4..92e60039e4 100644 --- a/domain/consensus/processes/consensusstatemanager/consensus_state_manager.go +++ b/domain/consensus/processes/consensusstatemanager/consensus_state_manager.go @@ -1,8 +1,8 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // consensusStateManager manages the node's consensus state diff --git a/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes.go b/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes.go index 3d51da5cf9..c46694e014 100644 --- a/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes.go +++ b/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes.go @@ -1,8 +1,8 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (csm *consensusStateManager) GetVirtualSelectedParentChainFromBlock(stagingArea *model.StagingArea, blockHash *externalapi.DomainHash) (*externalapi.SelectedChainPath, error) { diff --git a/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes_test.go b/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes_test.go index a3bf586eec..fe454c1576 100644 --- a/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes_test.go +++ b/domain/consensus/processes/consensusstatemanager/find_selected_parent_chain_changes_test.go @@ -3,10 +3,10 @@ package consensusstatemanager_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestCalculateChainPath(t *testing.T) { diff --git a/domain/consensus/processes/consensusstatemanager/import_pruning_utxo_set.go b/domain/consensus/processes/consensusstatemanager/import_pruning_utxo_set.go index 32e5fc5c4d..6cde5495fe 100644 --- a/domain/consensus/processes/consensusstatemanager/import_pruning_utxo_set.go +++ b/domain/consensus/processes/consensusstatemanager/import_pruning_utxo_set.go @@ -1,14 +1,14 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/staging" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/consensusstatemanager/log.go b/domain/consensus/processes/consensusstatemanager/log.go index 6281be0dcb..118c4358f6 100644 --- a/domain/consensus/processes/consensusstatemanager/log.go +++ b/domain/consensus/processes/consensusstatemanager/log.go @@ -1,7 +1,7 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("BDAG") diff --git a/domain/consensus/processes/consensusstatemanager/multisets.go b/domain/consensus/processes/consensusstatemanager/multisets.go index 0afeea65ea..da658ea5da 100644 --- a/domain/consensus/processes/consensusstatemanager/multisets.go +++ b/domain/consensus/processes/consensusstatemanager/multisets.go @@ -1,10 +1,10 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" ) func (csm *consensusStateManager) calculateMultiset(stagingArea *model.StagingArea, diff --git a/domain/consensus/processes/consensusstatemanager/pick_virtual_parents.go b/domain/consensus/processes/consensusstatemanager/pick_virtual_parents.go index 1548108e9a..08202563f8 100644 --- a/domain/consensus/processes/consensusstatemanager/pick_virtual_parents.go +++ b/domain/consensus/processes/consensusstatemanager/pick_virtual_parents.go @@ -1,13 +1,13 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/math" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/math" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashset" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashset" ) func (csm *consensusStateManager) pickVirtualParents(stagingArea *model.StagingArea, tips []*externalapi.DomainHash) ([]*externalapi.DomainHash, error) { diff --git a/domain/consensus/processes/consensusstatemanager/populate_tx_with_utxo_entries.go b/domain/consensus/processes/consensusstatemanager/populate_tx_with_utxo_entries.go index 5946272da6..d968ccf181 100644 --- a/domain/consensus/processes/consensusstatemanager/populate_tx_with_utxo_entries.go +++ b/domain/consensus/processes/consensusstatemanager/populate_tx_with_utxo_entries.go @@ -1,10 +1,10 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" ) // PopulateTransactionWithUTXOEntries populates the transaction UTXO entries with data from the virtual's UTXO set. diff --git a/domain/consensus/processes/consensusstatemanager/resolve.go b/domain/consensus/processes/consensusstatemanager/resolve.go index 85528c9b39..fe37b4d90b 100644 --- a/domain/consensus/processes/consensusstatemanager/resolve.go +++ b/domain/consensus/processes/consensusstatemanager/resolve.go @@ -1,10 +1,10 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/staging" "github.com/pkg/errors" "sort" ) diff --git a/domain/consensus/processes/consensusstatemanager/resolve_block_status.go b/domain/consensus/processes/consensusstatemanager/resolve_block_status.go index 631cbeee5e..89fb27c57f 100644 --- a/domain/consensus/processes/consensusstatemanager/resolve_block_status.go +++ b/domain/consensus/processes/consensusstatemanager/resolve_block_status.go @@ -3,12 +3,12 @@ package consensusstatemanager import ( "fmt" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/util/staging" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/consensusstatemanager/resolve_block_status_test.go b/domain/consensus/processes/consensusstatemanager/resolve_block_status_test.go index 66c41a1145..e1c6d148fd 100644 --- a/domain/consensus/processes/consensusstatemanager/resolve_block_status_test.go +++ b/domain/consensus/processes/consensusstatemanager/resolve_block_status_test.go @@ -2,19 +2,19 @@ package consensusstatemanager_test import ( "errors" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" ) func TestDoubleSpends(t *testing.T) { diff --git a/domain/consensus/processes/consensusstatemanager/resolve_virtual_test.go b/domain/consensus/processes/consensusstatemanager/resolve_virtual_test.go index 5257c45b8e..eae1b6c0ab 100644 --- a/domain/consensus/processes/consensusstatemanager/resolve_virtual_test.go +++ b/domain/consensus/processes/consensusstatemanager/resolve_virtual_test.go @@ -2,15 +2,15 @@ package consensusstatemanager_test import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestAddBlockBetweenResolveVirtualCalls(t *testing.T) { diff --git a/domain/consensus/processes/consensusstatemanager/reverse_utxo_diffs.go b/domain/consensus/processes/consensusstatemanager/reverse_utxo_diffs.go index 49d2b24bd4..34b98d9b3c 100644 --- a/domain/consensus/processes/consensusstatemanager/reverse_utxo_diffs.go +++ b/domain/consensus/processes/consensusstatemanager/reverse_utxo_diffs.go @@ -1,10 +1,10 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/staging" ) func (csm *consensusStateManager) ReverseUTXODiffs(tipHash *externalapi.DomainHash, diff --git a/domain/consensus/processes/consensusstatemanager/reverse_utxo_diffs_test.go b/domain/consensus/processes/consensusstatemanager/reverse_utxo_diffs_test.go index 796c777042..697507721d 100644 --- a/domain/consensus/processes/consensusstatemanager/reverse_utxo_diffs_test.go +++ b/domain/consensus/processes/consensusstatemanager/reverse_utxo_diffs_test.go @@ -3,14 +3,14 @@ package consensusstatemanager_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestReverseUTXODiffs(t *testing.T) { diff --git a/domain/consensus/processes/consensusstatemanager/test_consensus_state_manager.go b/domain/consensus/processes/consensusstatemanager/test_consensus_state_manager.go index 79114e4cf6..1e98ecb7ac 100644 --- a/domain/consensus/processes/consensusstatemanager/test_consensus_state_manager.go +++ b/domain/consensus/processes/consensusstatemanager/test_consensus_state_manager.go @@ -1,9 +1,9 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" ) type testConsensusStateManager struct { diff --git a/domain/consensus/processes/consensusstatemanager/update_virtual.go b/domain/consensus/processes/consensusstatemanager/update_virtual.go index 9b38bc9429..999daf0480 100644 --- a/domain/consensus/processes/consensusstatemanager/update_virtual.go +++ b/domain/consensus/processes/consensusstatemanager/update_virtual.go @@ -1,9 +1,9 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/logger" ) func (csm *consensusStateManager) updateVirtual(stagingArea *model.StagingArea, newBlockHash *externalapi.DomainHash, diff --git a/domain/consensus/processes/consensusstatemanager/utxo_diffs.go b/domain/consensus/processes/consensusstatemanager/utxo_diffs.go index 2e6953ae2e..58d3674958 100644 --- a/domain/consensus/processes/consensusstatemanager/utxo_diffs.go +++ b/domain/consensus/processes/consensusstatemanager/utxo_diffs.go @@ -1,8 +1,8 @@ package consensusstatemanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (csm *consensusStateManager) stageDiff(stagingArea *model.StagingArea, blockHash *externalapi.DomainHash, diff --git a/domain/consensus/processes/consensusstatemanager/verify_and_build_utxo.go b/domain/consensus/processes/consensusstatemanager/verify_and_build_utxo.go index f1958cdbea..e65e33d3ea 100644 --- a/domain/consensus/processes/consensusstatemanager/verify_and_build_utxo.go +++ b/domain/consensus/processes/consensusstatemanager/verify_and_build_utxo.go @@ -3,15 +3,15 @@ package consensusstatemanager import ( "sort" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/merkle" + "github.com/coinexcom/kaspad/domain/consensus/utils/merkle" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/consensusstatemanager/virtual_parents_test.go b/domain/consensus/processes/consensusstatemanager/virtual_parents_test.go index 940e03ef2c..bb4689dbd1 100644 --- a/domain/consensus/processes/consensusstatemanager/virtual_parents_test.go +++ b/domain/consensus/processes/consensusstatemanager/virtual_parents_test.go @@ -4,12 +4,12 @@ import ( "sort" "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestConsensusStateManager_pickVirtualParents(t *testing.T) { diff --git a/domain/consensus/processes/dagtopologymanager/dagtopologymanager.go b/domain/consensus/processes/dagtopologymanager/dagtopologymanager.go index ea8717aef3..68e4dc018e 100644 --- a/domain/consensus/processes/dagtopologymanager/dagtopologymanager.go +++ b/domain/consensus/processes/dagtopologymanager/dagtopologymanager.go @@ -1,8 +1,8 @@ package dagtopologymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/dagtopologymanager/dagtopologymanager_external_test.go b/domain/consensus/processes/dagtopologymanager/dagtopologymanager_external_test.go index 4db1b691d9..b2cdb2328d 100644 --- a/domain/consensus/processes/dagtopologymanager/dagtopologymanager_external_test.go +++ b/domain/consensus/processes/dagtopologymanager/dagtopologymanager_external_test.go @@ -3,11 +3,11 @@ package dagtopologymanager_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestIsAncestorOf(t *testing.T) { diff --git a/domain/consensus/processes/dagtraversalmanager/anticone.go b/domain/consensus/processes/dagtraversalmanager/anticone.go index 856b11e18f..8f46db85d1 100644 --- a/domain/consensus/processes/dagtraversalmanager/anticone.go +++ b/domain/consensus/processes/dagtraversalmanager/anticone.go @@ -1,9 +1,9 @@ package dagtraversalmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashset" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashset" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/dagtraversalmanager/block_heap.go b/domain/consensus/processes/dagtraversalmanager/block_heap.go index f515d7913a..4ff8222c76 100644 --- a/domain/consensus/processes/dagtraversalmanager/block_heap.go +++ b/domain/consensus/processes/dagtraversalmanager/block_heap.go @@ -3,8 +3,8 @@ package dagtraversalmanager import ( "container/heap" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func blockGHOSTDAGDataHashPairLess(left, right *externalapi.BlockGHOSTDAGDataHashPair, gm model.GHOSTDAGManager) bool { diff --git a/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager.go b/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager.go index 41302edb78..c17df266da 100644 --- a/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager.go +++ b/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager.go @@ -1,8 +1,8 @@ package dagtraversalmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager_test.go b/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager_test.go index a1eb6f3ec9..6dcecb7835 100644 --- a/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager_test.go +++ b/domain/consensus/processes/dagtraversalmanager/dagtraversalmanager_test.go @@ -3,11 +3,11 @@ package dagtraversalmanager_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestLowestChainBlockAboveOrEqualToBlueScore(t *testing.T) { diff --git a/domain/consensus/processes/dagtraversalmanager/selected_child_iterator.go b/domain/consensus/processes/dagtraversalmanager/selected_child_iterator.go index cb027ada9e..3e45147e2a 100644 --- a/domain/consensus/processes/dagtraversalmanager/selected_child_iterator.go +++ b/domain/consensus/processes/dagtraversalmanager/selected_child_iterator.go @@ -1,8 +1,8 @@ package dagtraversalmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/dagtraversalmanager/window.go b/domain/consensus/processes/dagtraversalmanager/window.go index a896305cb4..936da8b6d8 100644 --- a/domain/consensus/processes/dagtraversalmanager/window.go +++ b/domain/consensus/processes/dagtraversalmanager/window.go @@ -1,9 +1,9 @@ package dagtraversalmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func (dtm *dagTraversalManager) DAABlockWindow(stagingArea *model.StagingArea, highHash *externalapi.DomainHash) ([]*externalapi.DomainHash, error) { diff --git a/domain/consensus/processes/dagtraversalmanager/window_test.go b/domain/consensus/processes/dagtraversalmanager/window_test.go index 39fd9d7700..04ebdff569 100644 --- a/domain/consensus/processes/dagtraversalmanager/window_test.go +++ b/domain/consensus/processes/dagtraversalmanager/window_test.go @@ -5,13 +5,13 @@ import ( "sort" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashset" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashset" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/dagconfig" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/difficultymanager/blockwindow.go b/domain/consensus/processes/difficultymanager/blockwindow.go index 8c66eb7aad..cb9c42cf8b 100644 --- a/domain/consensus/processes/difficultymanager/blockwindow.go +++ b/domain/consensus/processes/difficultymanager/blockwindow.go @@ -1,9 +1,9 @@ package difficultymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/util/difficulty" "math" "math/big" ) diff --git a/domain/consensus/processes/difficultymanager/difficultymanager.go b/domain/consensus/processes/difficultymanager/difficultymanager.go index 1838729ff2..b000a66e9b 100644 --- a/domain/consensus/processes/difficultymanager/difficultymanager.go +++ b/domain/consensus/processes/difficultymanager/difficultymanager.go @@ -4,13 +4,13 @@ import ( "math/big" "time" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/math" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/math" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/util/difficulty" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // DifficultyManager provides a method to resolve the diff --git a/domain/consensus/processes/difficultymanager/difficultymanager_test.go b/domain/consensus/processes/difficultymanager/difficultymanager_test.go index fe6cb5882e..c3db1424f1 100644 --- a/domain/consensus/processes/difficultymanager/difficultymanager_test.go +++ b/domain/consensus/processes/difficultymanager/difficultymanager_test.go @@ -4,17 +4,17 @@ import ( "testing" "time" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/util/difficulty" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/util/mstime" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/dagconfig" ) func TestDifficulty(t *testing.T) { diff --git a/domain/consensus/processes/difficultymanager/hashrate.go b/domain/consensus/processes/difficultymanager/hashrate.go index 658c7be11c..c00b16f814 100644 --- a/domain/consensus/processes/difficultymanager/hashrate.go +++ b/domain/consensus/processes/difficultymanager/hashrate.go @@ -3,9 +3,9 @@ package difficultymanager import ( "math/big" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/difficultymanager/log.go b/domain/consensus/processes/difficultymanager/log.go index 272a4decc9..e80e657fc3 100644 --- a/domain/consensus/processes/difficultymanager/log.go +++ b/domain/consensus/processes/difficultymanager/log.go @@ -1,7 +1,7 @@ package difficultymanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("DAA") diff --git a/domain/consensus/processes/finalitymanager/finality_manager.go b/domain/consensus/processes/finalitymanager/finality_manager.go index 5f04fde283..794241fe42 100644 --- a/domain/consensus/processes/finalitymanager/finality_manager.go +++ b/domain/consensus/processes/finalitymanager/finality_manager.go @@ -3,9 +3,9 @@ package finalitymanager import ( "errors" - "github.com/kaspanet/kaspad/domain/consensus/database" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type finalityManager struct { diff --git a/domain/consensus/processes/finalitymanager/log.go b/domain/consensus/processes/finalitymanager/log.go index 57f86af109..cfa7396940 100644 --- a/domain/consensus/processes/finalitymanager/log.go +++ b/domain/consensus/processes/finalitymanager/log.go @@ -1,7 +1,7 @@ package finalitymanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("BDAG") diff --git a/domain/consensus/processes/ghostdag2/ghostdagimpl.go b/domain/consensus/processes/ghostdag2/ghostdagimpl.go index 7e40b27481..4e37ad7ee3 100644 --- a/domain/consensus/processes/ghostdag2/ghostdagimpl.go +++ b/domain/consensus/processes/ghostdag2/ghostdagimpl.go @@ -3,12 +3,12 @@ package ghostdag2 import ( "sort" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/util/difficulty" "math/big" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type ghostdagHelper struct { diff --git a/domain/consensus/processes/ghostdagmanager/compare.go b/domain/consensus/processes/ghostdagmanager/compare.go index fb5387aea7..4d765b7663 100644 --- a/domain/consensus/processes/ghostdagmanager/compare.go +++ b/domain/consensus/processes/ghostdagmanager/compare.go @@ -1,8 +1,8 @@ package ghostdagmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (gm *ghostdagManager) findSelectedParent(stagingArea *model.StagingArea, parentHashes []*externalapi.DomainHash) ( diff --git a/domain/consensus/processes/ghostdagmanager/ghostdag.go b/domain/consensus/processes/ghostdagmanager/ghostdag.go index af349a106a..5d27385291 100644 --- a/domain/consensus/processes/ghostdagmanager/ghostdag.go +++ b/domain/consensus/processes/ghostdagmanager/ghostdag.go @@ -3,9 +3,9 @@ package ghostdagmanager import ( "math/big" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/util/difficulty" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/ghostdagmanager/ghostdag_test.go b/domain/consensus/processes/ghostdagmanager/ghostdag_test.go index b373ba104c..a60331d0ca 100644 --- a/domain/consensus/processes/ghostdagmanager/ghostdag_test.go +++ b/domain/consensus/processes/ghostdagmanager/ghostdag_test.go @@ -9,15 +9,15 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/processes/ghostdag2" - "github.com/kaspanet/kaspad/domain/consensus/processes/ghostdagmanager" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/processes/ghostdag2" + "github.com/coinexcom/kaspad/domain/consensus/processes/ghostdagmanager" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/util/difficulty" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/ghostdagmanager/ghostdagmanager.go b/domain/consensus/processes/ghostdagmanager/ghostdagmanager.go index 100ecd3de7..3cefcda7f4 100644 --- a/domain/consensus/processes/ghostdagmanager/ghostdagmanager.go +++ b/domain/consensus/processes/ghostdagmanager/ghostdagmanager.go @@ -1,8 +1,8 @@ package ghostdagmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // ghostdagManager resolves and manages GHOSTDAG block data diff --git a/domain/consensus/processes/ghostdagmanager/mergeset.go b/domain/consensus/processes/ghostdagmanager/mergeset.go index e641d35abd..19df842282 100644 --- a/domain/consensus/processes/ghostdagmanager/mergeset.go +++ b/domain/consensus/processes/ghostdagmanager/mergeset.go @@ -3,9 +3,9 @@ package ghostdagmanager import ( "sort" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (gm *ghostdagManager) mergeSetWithoutSelectedParent(stagingArea *model.StagingArea, diff --git a/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager.go b/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager.go index 109619e162..979c96c026 100644 --- a/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager.go +++ b/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager.go @@ -1,8 +1,8 @@ package headersselectedtipmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type headerTipsManager struct { diff --git a/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager_test.go b/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager_test.go index 55e2ce8e6b..a4cec1d016 100644 --- a/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager_test.go +++ b/domain/consensus/processes/headersselectedtipmanager/headersselectedtipmanager_test.go @@ -3,12 +3,12 @@ package headersselectedtipmanager_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/mergedepthmanager/log.go b/domain/consensus/processes/mergedepthmanager/log.go index b95b850e7e..5edc396cef 100644 --- a/domain/consensus/processes/mergedepthmanager/log.go +++ b/domain/consensus/processes/mergedepthmanager/log.go @@ -1,7 +1,7 @@ package mergedepthmanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("MDMN") diff --git a/domain/consensus/processes/mergedepthmanager/merge_depth_manager.go b/domain/consensus/processes/mergedepthmanager/merge_depth_manager.go index 15fb778d7b..59e94a85af 100644 --- a/domain/consensus/processes/mergedepthmanager/merge_depth_manager.go +++ b/domain/consensus/processes/mergedepthmanager/merge_depth_manager.go @@ -1,10 +1,10 @@ package mergedepthmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/parentsmanager/parentsmanager.go b/domain/consensus/processes/parentsmanager/parentsmanager.go index a510ba164a..0f338ecafb 100644 --- a/domain/consensus/processes/parentsmanager/parentsmanager.go +++ b/domain/consensus/processes/parentsmanager/parentsmanager.go @@ -1,8 +1,8 @@ package parentssanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type parentsManager struct { diff --git a/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager.go b/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager.go index bfe65f1a3a..2a8771950e 100644 --- a/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager.go +++ b/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager.go @@ -3,10 +3,10 @@ package pastmediantimemanager import ( "sort" - "github.com/kaspanet/kaspad/domain/consensus/utils/sorters" + "github.com/coinexcom/kaspad/domain/consensus/utils/sorters" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager_test.go b/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager_test.go index 549c9d3e0a..d534b3ef08 100644 --- a/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager_test.go +++ b/domain/consensus/processes/pastmediantimemanager/pastmediantimemanager_test.go @@ -3,12 +3,12 @@ package pastmediantimemanager_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestPastMedianTime(t *testing.T) { diff --git a/domain/consensus/processes/pruningmanager/log.go b/domain/consensus/processes/pruningmanager/log.go index e43a0617e5..16d56c4c50 100644 --- a/domain/consensus/processes/pruningmanager/log.go +++ b/domain/consensus/processes/pruningmanager/log.go @@ -1,5 +1,5 @@ package pruningmanager -import "github.com/kaspanet/kaspad/infrastructure/logger" +import "github.com/coinexcom/kaspad/infrastructure/logger" var log = logger.RegisterSubSystem("PRNM") diff --git a/domain/consensus/processes/pruningmanager/pruning_test.go b/domain/consensus/processes/pruningmanager/pruning_test.go index 3897051530..799a8ad252 100644 --- a/domain/consensus/processes/pruningmanager/pruning_test.go +++ b/domain/consensus/processes/pruningmanager/pruning_test.go @@ -2,18 +2,18 @@ package pruningmanager_test import ( "encoding/json" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" "os" "path/filepath" "testing" "time" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/dagconfig" ) type jsonBlock struct { diff --git a/domain/consensus/processes/pruningmanager/pruningmanager.go b/domain/consensus/processes/pruningmanager/pruningmanager.go index c5bdf1cf90..304a3b9b62 100644 --- a/domain/consensus/processes/pruningmanager/pruningmanager.go +++ b/domain/consensus/processes/pruningmanager/pruningmanager.go @@ -1,15 +1,15 @@ package pruningmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/multiset" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/consensus/utils/virtual" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/multiset" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/utils/virtual" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/staging" "github.com/pkg/errors" "sort" ) diff --git a/domain/consensus/processes/pruningproofmanager/log.go b/domain/consensus/processes/pruningproofmanager/log.go index d3e4d9b05c..37c46ee8d5 100644 --- a/domain/consensus/processes/pruningproofmanager/log.go +++ b/domain/consensus/processes/pruningproofmanager/log.go @@ -1,5 +1,5 @@ package pruningproofmanager -import "github.com/kaspanet/kaspad/infrastructure/logger" +import "github.com/coinexcom/kaspad/infrastructure/logger" var log = logger.RegisterSubSystem("PPMN") diff --git a/domain/consensus/processes/pruningproofmanager/pruningproofmanager.go b/domain/consensus/processes/pruningproofmanager/pruningproofmanager.go index 700a9a827d..e90b0d9f33 100644 --- a/domain/consensus/processes/pruningproofmanager/pruningproofmanager.go +++ b/domain/consensus/processes/pruningproofmanager/pruningproofmanager.go @@ -1,23 +1,23 @@ package pruningproofmanager import ( - consensusDB "github.com/kaspanet/kaspad/domain/consensus/database" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/blockheaderstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/blockrelationstore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/ghostdagdatastore" - "github.com/kaspanet/kaspad/domain/consensus/datastructures/reachabilitydatastore" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/processes/dagtopologymanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/dagtraversalmanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/ghostdagmanager" - "github.com/kaspanet/kaspad/domain/consensus/processes/reachabilitymanager" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashset" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/staging" + consensusDB "github.com/coinexcom/kaspad/domain/consensus/database" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/blockheaderstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/blockrelationstore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/ghostdagdatastore" + "github.com/coinexcom/kaspad/domain/consensus/datastructures/reachabilitydatastore" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/processes/dagtopologymanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/dagtraversalmanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/ghostdagmanager" + "github.com/coinexcom/kaspad/domain/consensus/processes/reachabilitymanager" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashset" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/staging" "github.com/pkg/errors" "math/big" ) diff --git a/domain/consensus/processes/reachabilitymanager/fetch.go b/domain/consensus/processes/reachabilitymanager/fetch.go index 56c7cf886e..2dfb654824 100644 --- a/domain/consensus/processes/reachabilitymanager/fetch.go +++ b/domain/consensus/processes/reachabilitymanager/fetch.go @@ -1,10 +1,10 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/database" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/reachabilitydata" + "github.com/coinexcom/kaspad/domain/consensus/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/reachabilitydata" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/reachabilitymanager/future_covering_set.go b/domain/consensus/processes/reachabilitymanager/future_covering_set.go index 78abfea60f..dcc64a6bd9 100644 --- a/domain/consensus/processes/reachabilitymanager/future_covering_set.go +++ b/domain/consensus/processes/reachabilitymanager/future_covering_set.go @@ -1,8 +1,8 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // insertToFutureCoveringSet inserts the given block into this node's FutureCoveringSet diff --git a/domain/consensus/processes/reachabilitymanager/interval.go b/domain/consensus/processes/reachabilitymanager/interval.go index 6347607ee0..222c5186dd 100644 --- a/domain/consensus/processes/reachabilitymanager/interval.go +++ b/domain/consensus/processes/reachabilitymanager/interval.go @@ -1,7 +1,7 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" "github.com/pkg/errors" "math" ) diff --git a/domain/consensus/processes/reachabilitymanager/log.go b/domain/consensus/processes/reachabilitymanager/log.go index 926d3ddbb6..2c8546d22a 100644 --- a/domain/consensus/processes/reachabilitymanager/log.go +++ b/domain/consensus/processes/reachabilitymanager/log.go @@ -1,7 +1,7 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("REAC") diff --git a/domain/consensus/processes/reachabilitymanager/main_test.go b/domain/consensus/processes/reachabilitymanager/main_test.go index c130d010c2..38e61acb16 100644 --- a/domain/consensus/processes/reachabilitymanager/main_test.go +++ b/domain/consensus/processes/reachabilitymanager/main_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) const logLevel = logger.LevelWarn diff --git a/domain/consensus/processes/reachabilitymanager/ordered_tree_node_set.go b/domain/consensus/processes/reachabilitymanager/ordered_tree_node_set.go index 14c6fab3e5..540a05b78f 100644 --- a/domain/consensus/processes/reachabilitymanager/ordered_tree_node_set.go +++ b/domain/consensus/processes/reachabilitymanager/ordered_tree_node_set.go @@ -1,8 +1,8 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // orderedTreeNodeSet is an ordered set of model.DomainHash ordered by the respectful intervals. diff --git a/domain/consensus/processes/reachabilitymanager/reachability.go b/domain/consensus/processes/reachabilitymanager/reachability.go index 52ae6b942b..306e842d4a 100644 --- a/domain/consensus/processes/reachabilitymanager/reachability.go +++ b/domain/consensus/processes/reachabilitymanager/reachability.go @@ -1,8 +1,8 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // IsDAGAncestorOf returns true if blockHashA is an ancestor of diff --git a/domain/consensus/processes/reachabilitymanager/reachabilityManager_test.go b/domain/consensus/processes/reachabilitymanager/reachabilityManager_test.go index 805306c350..646ac0628f 100644 --- a/domain/consensus/processes/reachabilitymanager/reachabilityManager_test.go +++ b/domain/consensus/processes/reachabilitymanager/reachabilityManager_test.go @@ -3,11 +3,11 @@ package reachabilitymanager_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestReachabilityIsDAGAncestorOf(t *testing.T) { diff --git a/domain/consensus/processes/reachabilitymanager/reachability_external_test.go b/domain/consensus/processes/reachabilitymanager/reachability_external_test.go index c934b70f16..553725658d 100644 --- a/domain/consensus/processes/reachabilitymanager/reachability_external_test.go +++ b/domain/consensus/processes/reachabilitymanager/reachability_external_test.go @@ -4,11 +4,11 @@ import ( "math" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestAddChildThatPointsDirectlyToTheSelectedParentChainBelowReindexRoot(t *testing.T) { diff --git a/domain/consensus/processes/reachabilitymanager/reachability_stretch_test.go b/domain/consensus/processes/reachabilitymanager/reachability_stretch_test.go index 4eefec81c2..d431ceed68 100644 --- a/domain/consensus/processes/reachabilitymanager/reachability_stretch_test.go +++ b/domain/consensus/processes/reachabilitymanager/reachability_stretch_test.go @@ -8,12 +8,12 @@ import ( "os" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/dagconfig" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/reachabilitymanager/reachability_test.go b/domain/consensus/processes/reachabilitymanager/reachability_test.go index dc72936ac2..00bd222ced 100644 --- a/domain/consensus/processes/reachabilitymanager/reachability_test.go +++ b/domain/consensus/processes/reachabilitymanager/reachability_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type reachabilityDataStoreMock struct { diff --git a/domain/consensus/processes/reachabilitymanager/reachabilitymanager.go b/domain/consensus/processes/reachabilitymanager/reachabilitymanager.go index 08f152e054..4256972661 100644 --- a/domain/consensus/processes/reachabilitymanager/reachabilitymanager.go +++ b/domain/consensus/processes/reachabilitymanager/reachabilitymanager.go @@ -1,8 +1,8 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // reachabilityManager maintains a structure that allows to answer diff --git a/domain/consensus/processes/reachabilitymanager/reindex_context.go b/domain/consensus/processes/reachabilitymanager/reindex_context.go index f464f660d9..22bc5ac20b 100644 --- a/domain/consensus/processes/reachabilitymanager/reindex_context.go +++ b/domain/consensus/processes/reachabilitymanager/reindex_context.go @@ -1,8 +1,8 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/reachabilitymanager/stage.go b/domain/consensus/processes/reachabilitymanager/stage.go index 04ea86c82d..e46d2bad55 100644 --- a/domain/consensus/processes/reachabilitymanager/stage.go +++ b/domain/consensus/processes/reachabilitymanager/stage.go @@ -1,8 +1,8 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (rt *reachabilityManager) stageData(stagingArea *model.StagingArea, blockHash *externalapi.DomainHash, data model.ReachabilityData) { diff --git a/domain/consensus/processes/reachabilitymanager/test_reachabilitymanager.go b/domain/consensus/processes/reachabilitymanager/test_reachabilitymanager.go index 25a251f3a9..76cab201f1 100644 --- a/domain/consensus/processes/reachabilitymanager/test_reachabilitymanager.go +++ b/domain/consensus/processes/reachabilitymanager/test_reachabilitymanager.go @@ -1,9 +1,9 @@ package reachabilitymanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" ) type testReachabilityManager struct { diff --git a/domain/consensus/processes/reachabilitymanager/tree.go b/domain/consensus/processes/reachabilitymanager/tree.go index 63d3dfe2bd..c009ebe854 100644 --- a/domain/consensus/processes/reachabilitymanager/tree.go +++ b/domain/consensus/processes/reachabilitymanager/tree.go @@ -5,10 +5,10 @@ import ( "strings" "time" - "github.com/kaspanet/kaspad/domain/consensus/utils/reachabilitydata" + "github.com/coinexcom/kaspad/domain/consensus/utils/reachabilitydata" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/syncmanager/antipast.go b/domain/consensus/processes/syncmanager/antipast.go index f00207f451..0b44505004 100644 --- a/domain/consensus/processes/syncmanager/antipast.go +++ b/domain/consensus/processes/syncmanager/antipast.go @@ -1,8 +1,8 @@ package syncmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) @@ -151,7 +151,7 @@ func (sm *syncManager) missingBlockBodyHashes(stagingArea *model.StagingArea, hi // In these cases - return an empty list of blocks to sync return []*externalapi.DomainHash{}, nil } - // TODO: Once block children are fixed (https://github.com/kaspanet/kaspad/issues/1499), + // TODO: Once block children are fixed (https://github.com/coinexcom/kaspad/issues/1499), // this error should be returned rather the logged log.Errorf("No header-only blocks between %s and %s", lowHash, highHash) diff --git a/domain/consensus/processes/syncmanager/blocklocator.go b/domain/consensus/processes/syncmanager/blocklocator.go index e748ebcd32..2271270ccf 100644 --- a/domain/consensus/processes/syncmanager/blocklocator.go +++ b/domain/consensus/processes/syncmanager/blocklocator.go @@ -1,9 +1,9 @@ package syncmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/database" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/syncmanager/blocklocator_test.go b/domain/consensus/processes/syncmanager/blocklocator_test.go index 7f462f0208..bdd0f6f45c 100644 --- a/domain/consensus/processes/syncmanager/blocklocator_test.go +++ b/domain/consensus/processes/syncmanager/blocklocator_test.go @@ -4,11 +4,11 @@ import ( "strings" "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/syncmanager/log.go b/domain/consensus/processes/syncmanager/log.go index fc1d727bd1..42fd9fa663 100644 --- a/domain/consensus/processes/syncmanager/log.go +++ b/domain/consensus/processes/syncmanager/log.go @@ -1,7 +1,7 @@ package syncmanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("SYNC") diff --git a/domain/consensus/processes/syncmanager/syncinfo.go b/domain/consensus/processes/syncmanager/syncinfo.go index 254db57845..c0a8392fcd 100644 --- a/domain/consensus/processes/syncmanager/syncinfo.go +++ b/domain/consensus/processes/syncmanager/syncinfo.go @@ -1,8 +1,8 @@ package syncmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (sm *syncManager) syncInfo(stagingArea *model.StagingArea) (*externalapi.SyncInfo, error) { diff --git a/domain/consensus/processes/syncmanager/syncmanager.go b/domain/consensus/processes/syncmanager/syncmanager.go index fa162b79ca..0aa5bda401 100644 --- a/domain/consensus/processes/syncmanager/syncmanager.go +++ b/domain/consensus/processes/syncmanager/syncmanager.go @@ -1,9 +1,9 @@ package syncmanager import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/syncmanager/syncmanager_test.go b/domain/consensus/processes/syncmanager/syncmanager_test.go index c2efad1371..a4dbf21632 100644 --- a/domain/consensus/processes/syncmanager/syncmanager_test.go +++ b/domain/consensus/processes/syncmanager/syncmanager_test.go @@ -6,11 +6,11 @@ import ( "sort" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" ) func TestSyncManager_GetHashesBetween(t *testing.T) { diff --git a/domain/consensus/processes/transactionvalidator/mass.go b/domain/consensus/processes/transactionvalidator/mass.go index d994104705..8b6918bf8d 100644 --- a/domain/consensus/processes/transactionvalidator/mass.go +++ b/domain/consensus/processes/transactionvalidator/mass.go @@ -1,7 +1,7 @@ package transactionvalidator import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // PopulateMass calculates and populates the mass of the given transaction diff --git a/domain/consensus/processes/transactionvalidator/test_transaction_validator.go b/domain/consensus/processes/transactionvalidator/test_transaction_validator.go index 86bf715b43..e1ec0a922f 100644 --- a/domain/consensus/processes/transactionvalidator/test_transaction_validator.go +++ b/domain/consensus/processes/transactionvalidator/test_transaction_validator.go @@ -1,9 +1,9 @@ package transactionvalidator import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" ) type testTransactionValidator struct { diff --git a/domain/consensus/processes/transactionvalidator/transaction_in_context.go b/domain/consensus/processes/transactionvalidator/transaction_in_context.go index 88f6cf076e..ce49b918fc 100644 --- a/domain/consensus/processes/transactionvalidator/transaction_in_context.go +++ b/domain/consensus/processes/transactionvalidator/transaction_in_context.go @@ -3,13 +3,13 @@ package transactionvalidator import ( "math" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/transactionvalidator/transaction_in_context_test.go b/domain/consensus/processes/transactionvalidator/transaction_in_context_test.go deleted file mode 100644 index d22e9663ab..0000000000 --- a/domain/consensus/processes/transactionvalidator/transaction_in_context_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package transactionvalidator - -import ( - "testing" -) - -// TestSequenceLocksActive tests the SequenceLockActive function to ensure it -// works as expected in all possible combinations/scenarios. -func TestSequenceLocksActive(t *testing.T) { - tests := []struct { - seqLock sequenceLock - blockDAAScore uint64 - - want bool - }{ - // Block based sequence lock with equal block DAA score. - {seqLock: sequenceLock{1000}, blockDAAScore: 1001, want: true}, - - // Block based sequence lock with current DAA score below seq lock block DAA score. - {seqLock: sequenceLock{1000}, blockDAAScore: 90, want: false}, - - // Block based sequence lock at the same DAA score, so shouldn't yet be active. - {seqLock: sequenceLock{1000}, blockDAAScore: 1000, want: false}, - } - - validator := transactionValidator{} - for i, test := range tests { - got := validator.sequenceLockActive(&test.seqLock, test.blockDAAScore) - if got != test.want { - t.Fatalf("SequenceLockActive #%d got %v want %v", i, got, test.want) - } - } -} diff --git a/domain/consensus/processes/transactionvalidator/transaction_in_isolation.go b/domain/consensus/processes/transactionvalidator/transaction_in_isolation.go index 699374aab3..610a88b57b 100644 --- a/domain/consensus/processes/transactionvalidator/transaction_in_isolation.go +++ b/domain/consensus/processes/transactionvalidator/transaction_in_isolation.go @@ -1,11 +1,11 @@ package transactionvalidator import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" "github.com/pkg/errors" ) diff --git a/domain/consensus/processes/transactionvalidator/transaction_in_isolation_test.go b/domain/consensus/processes/transactionvalidator/transaction_in_isolation_test.go deleted file mode 100644 index b9acce545f..0000000000 --- a/domain/consensus/processes/transactionvalidator/transaction_in_isolation_test.go +++ /dev/null @@ -1,160 +0,0 @@ -package transactionvalidator_test - -import ( - "testing" - - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/pkg/errors" -) - -type txSubnetworkData struct { - subnetworkID externalapi.DomainSubnetworkID - gas uint64 - payload []byte -} - -func TestValidateTransactionInIsolationAndPopulateMass(t *testing.T) { - testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) { - cfg := *consensusConfig - - factory := consensus.NewFactory() - tc, teardown, err := factory.NewTestConsensus(&cfg, "TestValidateTransactionInIsolationAndPopulateMass") - if err != nil { - t.Fatalf("Error setting up consensus: %+v", err) - } - defer teardown(false) - - tests := []struct { - name string - numInputs uint32 - numOutputs uint32 - outputValue uint64 - nodeSubnetworkID externalapi.DomainSubnetworkID - txSubnetworkData *txSubnetworkData - extraModificationsFunc func(*externalapi.DomainTransaction) - expectedErr error - daaScore uint64 - }{ - {"good one", 1, 1, 1, subnetworks.SubnetworkIDNative, nil, nil, nil, 0}, - {"no inputs", 0, 1, 1, subnetworks.SubnetworkIDNative, nil, nil, ruleerrors.ErrNoTxInputs, 0}, - {"no outputs", 1, 0, 1, subnetworks.SubnetworkIDNative, nil, nil, nil, 0}, - {"too much sompi in one output", 1, 1, constants.MaxSompi + 1, - subnetworks.SubnetworkIDNative, - nil, - nil, - ruleerrors.ErrBadTxOutValue, 0}, - {"too much sompi before- valid now", 1, 1, 21e14 + 1, - subnetworks.SubnetworkIDNative, - nil, - nil, - nil, 0}, - {"too much sompi in one output - after hf", 1, 1, constants.MaxSompi + 1, - subnetworks.SubnetworkIDNative, - nil, - nil, - ruleerrors.ErrBadTxOutValue, 0}, - {"too much sompi in one output", 1, 1, constants.MaxSompi + 1, - subnetworks.SubnetworkIDNative, - nil, - nil, - ruleerrors.ErrBadTxOutValue, 0}, - {"duplicate inputs", 2, 1, 1, - subnetworks.SubnetworkIDNative, - nil, - func(tx *externalapi.DomainTransaction) { tx.Inputs[1].PreviousOutpoint.Index = 0 }, - ruleerrors.ErrDuplicateTxInputs, 0}, - {"1 input coinbase", - 1, - 1, - 1, - subnetworks.SubnetworkIDNative, - &txSubnetworkData{subnetworks.SubnetworkIDCoinbase, 0, nil}, - nil, - ruleerrors.ErrCoinbaseWithInputs, 0}, - {"no inputs coinbase", - 0, - 1, - 1, - subnetworks.SubnetworkIDNative, - &txSubnetworkData{subnetworks.SubnetworkIDCoinbase, 0, nil}, - nil, - nil, 0}, - {"too long payload coinbase", - 1, - 1, - 1, - subnetworks.SubnetworkIDNative, - &txSubnetworkData{subnetworks.SubnetworkIDCoinbase, 0, make([]byte, consensusConfig.MaxCoinbasePayloadLength+1)}, - nil, - ruleerrors.ErrBadCoinbasePayloadLen, 0}, - {"non-zero gas in Kaspa", 1, 1, 1, - subnetworks.SubnetworkIDNative, - nil, - func(tx *externalapi.DomainTransaction) { - tx.Gas = 1 - }, - ruleerrors.ErrInvalidGas, 0}, - {"non-zero gas in subnetwork registry", 1, 1, 1, - subnetworks.SubnetworkIDRegistry, - &txSubnetworkData{subnetworks.SubnetworkIDRegistry, 1, []byte{}}, - nil, - ruleerrors.ErrInvalidGas, 0}, - {"non-zero payload in Kaspa", 1, 1, 1, - subnetworks.SubnetworkIDNative, - nil, - func(tx *externalapi.DomainTransaction) { - tx.Payload = []byte{1} - }, - ruleerrors.ErrInvalidPayload, 0}, - } - - for _, test := range tests { - tx := createTxForTest(test.numInputs, test.numOutputs, test.outputValue, test.txSubnetworkData) - - if test.extraModificationsFunc != nil { - test.extraModificationsFunc(tx) - } - - err := tc.TransactionValidator().ValidateTransactionInIsolation(tx, test.daaScore) - if !errors.Is(err, test.expectedErr) { - t.Errorf("TestValidateTransactionInIsolationAndPopulateMass: '%s': unexpected error %+v", test.name, err) - } - } - }) -} - -func createTxForTest(numInputs uint32, numOutputs uint32, outputValue uint64, subnetworkData *txSubnetworkData) *externalapi.DomainTransaction { - txIns := []*externalapi.DomainTransactionInput{} - txOuts := []*externalapi.DomainTransactionOutput{} - - for i := uint32(0); i < numInputs; i++ { - txIns = append(txIns, &externalapi.DomainTransactionInput{ - PreviousOutpoint: externalapi.DomainOutpoint{ - TransactionID: externalapi.DomainTransactionID{}, - Index: i, - }, - SignatureScript: []byte{}, - Sequence: constants.MaxTxInSequenceNum, - SigOpCount: 1, - }) - } - - for i := uint32(0); i < numOutputs; i++ { - txOuts = append(txOuts, &externalapi.DomainTransactionOutput{ - ScriptPublicKey: &externalapi.ScriptPublicKey{Script: []byte{}, Version: 0}, - Value: outputValue, - }) - } - - if subnetworkData != nil { - return transactionhelper.NewSubnetworkTransaction(constants.MaxTransactionVersion, txIns, txOuts, &subnetworkData.subnetworkID, subnetworkData.gas, subnetworkData.payload) - } - - return transactionhelper.NewNativeTransaction(constants.MaxTransactionVersion, txIns, txOuts) -} diff --git a/domain/consensus/processes/transactionvalidator/transactionvalidator.go b/domain/consensus/processes/transactionvalidator/transactionvalidator.go index 818e88e9b6..ee6879f396 100644 --- a/domain/consensus/processes/transactionvalidator/transactionvalidator.go +++ b/domain/consensus/processes/transactionvalidator/transactionvalidator.go @@ -1,10 +1,10 @@ package transactionvalidator import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/util/txmass" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/util/txmass" ) const sigCacheSize = 10_000 @@ -49,7 +49,6 @@ func New(blockCoinbaseMaturity uint64, ghostdagDataStore: ghostdagDataStore, daaBlocksStore: daaBlocksStore, sigCache: txscript.NewSigCache(sigCacheSize), - sigCacheECDSA: txscript.NewSigCacheECDSA(sigCacheSize), txMassCalculator: txMassCalculator, } } diff --git a/domain/consensus/processes/transactionvalidator/transactionvalidator_test.go b/domain/consensus/processes/transactionvalidator/transactionvalidator_test.go deleted file mode 100644 index 447b1934b5..0000000000 --- a/domain/consensus/processes/transactionvalidator/transactionvalidator_test.go +++ /dev/null @@ -1,520 +0,0 @@ -package transactionvalidator_test - -import ( - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/util" - - "testing" - - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/pkg/errors" -) - -func TestValidateTransactionInContextAndPopulateFee(t *testing.T) { - testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) { - factory := consensus.NewFactory() - tc, tearDown, err := factory.NewTestConsensus(consensusConfig, - "TestValidateTransactionInContextAndPopulateFee") - if err != nil { - t.Fatalf("Failed create a NewTestConsensus: %s", err) - } - defer tearDown(false) - - privateKey, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - t.Fatalf("Failed to generate a private key: %v", err) - } - publicKey, err := privateKey.SchnorrPublicKey() - if err != nil { - t.Fatalf("Failed to generate a public key: %v", err) - } - publicKeySerialized, err := publicKey.Serialize() - if err != nil { - t.Fatalf("Failed to serialize public key: %v", err) - } - addr, err := util.NewAddressPublicKey(publicKeySerialized[:], consensusConfig.Prefix) - if err != nil { - t.Fatalf("Failed to generate p2pk address: %v", err) - } - scriptPublicKey, err := txscript.PayToAddrScript(addr) - if err != nil { - t.Fatalf("PayToAddrScript: unexpected error: %v", err) - } - prevOutTxID := &externalapi.DomainTransactionID{} - prevOutPoint := externalapi.DomainOutpoint{TransactionID: *prevOutTxID, Index: 1} - - txInput := externalapi.DomainTransactionInput{ - PreviousOutpoint: prevOutPoint, - SignatureScript: []byte{}, - Sequence: constants.MaxTxInSequenceNum, - SigOpCount: 1, - UTXOEntry: utxo.NewUTXOEntry( - 100_000_000, // 1 KAS - scriptPublicKey, - true, - uint64(5)), - } - txInputWrongSignature := externalapi.DomainTransactionInput{ - PreviousOutpoint: prevOutPoint, - SignatureScript: []byte{}, - SigOpCount: 1, - UTXOEntry: utxo.NewUTXOEntry( - 100_000_000, // 1 KAS - scriptPublicKey, - true, - uint64(5)), - } - immatureCoinbaseInput := externalapi.DomainTransactionInput{ - PreviousOutpoint: prevOutPoint, - SignatureScript: []byte{}, - Sequence: constants.MaxTxInSequenceNum, - SigOpCount: 1, - UTXOEntry: utxo.NewUTXOEntry( - 100_000_000, // 1 KAS - scriptPublicKey, - true, - uint64(6)), - } - - txInputWithLargeAmount := externalapi.DomainTransactionInput{ - PreviousOutpoint: prevOutPoint, - SignatureScript: []byte{}, - Sequence: constants.MaxTxInSequenceNum, - SigOpCount: 1, - UTXOEntry: utxo.NewUTXOEntry( - 21e14+1, - scriptPublicKey, - false, - 0), - } - - txInputWithLargeAmountAfterHF := externalapi.DomainTransactionInput{ - PreviousOutpoint: prevOutPoint, - SignatureScript: []byte{}, - Sequence: constants.MaxTxInSequenceNum, - SigOpCount: 1, - UTXOEntry: utxo.NewUTXOEntry( - constants.MaxSompi+1, - scriptPublicKey, - false, - 0), - } - - txOutput := externalapi.DomainTransactionOutput{ - Value: 100000000, // 1 KAS - ScriptPublicKey: scriptPublicKey, - } - txOutputBigValue := externalapi.DomainTransactionOutput{ - Value: 200_000_000, // 2 KAS - ScriptPublicKey: scriptPublicKey, - } - - validTx := externalapi.DomainTransaction{ - Version: constants.MaxTransactionVersion, - Inputs: []*externalapi.DomainTransactionInput{&txInput}, - Outputs: []*externalapi.DomainTransactionOutput{&txOutput}, - SubnetworkID: subnetworks.SubnetworkIDRegistry, - Gas: 0, - LockTime: 0} - - for i, input := range validTx.Inputs { - signatureScript, err := txscript.SignatureScript(&validTx, i, consensushashing.SigHashAll, privateKey, - &consensushashing.SighashReusedValues{}) - if err != nil { - t.Fatalf("Failed to create a sigScript: %v", err) - } - input.SignatureScript = signatureScript - } - - txWithImmatureCoinbase := externalapi.DomainTransaction{ - Version: constants.MaxTransactionVersion, - Inputs: []*externalapi.DomainTransactionInput{&immatureCoinbaseInput}, - Outputs: []*externalapi.DomainTransactionOutput{&txOutput}, - SubnetworkID: subnetworks.SubnetworkIDRegistry, - Gas: 0, - LockTime: 0} - txWithLargeAmountBeforeHF := externalapi.DomainTransaction{ - Version: constants.MaxTransactionVersion, - Inputs: []*externalapi.DomainTransactionInput{&txInputWithLargeAmount}, - Outputs: []*externalapi.DomainTransactionOutput{&txOutput}, - SubnetworkID: subnetworks.SubnetworkIDRegistry, - Gas: 0, - LockTime: 0} - - txWithInvalidAmount := externalapi.DomainTransaction{ - Version: constants.MaxTransactionVersion, - Inputs: []*externalapi.DomainTransactionInput{&txInputWithLargeAmountAfterHF}, - Outputs: []*externalapi.DomainTransactionOutput{&txOutput}, - SubnetworkID: subnetworks.SubnetworkIDRegistry, - Gas: 0, - LockTime: 0} - - for i, input := range txWithLargeAmountBeforeHF.Inputs { - signatureScript, err := txscript.SignatureScript(&txWithLargeAmountBeforeHF, i, consensushashing.SigHashAll, privateKey, - &consensushashing.SighashReusedValues{}) - if err != nil { - t.Fatalf("Failed to create a sigScript: %v", err) - } - input.SignatureScript = signatureScript - } - - txWithBigValue := externalapi.DomainTransaction{ - Version: constants.MaxTransactionVersion, - Inputs: []*externalapi.DomainTransactionInput{&txInput}, - Outputs: []*externalapi.DomainTransactionOutput{&txOutputBigValue}, - SubnetworkID: subnetworks.SubnetworkIDRegistry, - Gas: 0, - LockTime: 0} - txWithInvalidSignature := externalapi.DomainTransaction{ - Version: constants.MaxTransactionVersion, - Inputs: []*externalapi.DomainTransactionInput{&txInputWrongSignature}, - Outputs: []*externalapi.DomainTransactionOutput{&txOutput}, - SubnetworkID: subnetworks.SubnetworkIDRegistry, - Gas: 0, - LockTime: 0} - - stagingArea := model.NewStagingArea() - - povBlockHash := externalapi.NewDomainHashFromByteArray(&[32]byte{0x01}) - tc.DAABlocksStore().StageDAAScore(stagingArea, povBlockHash, consensusConfig.BlockCoinbaseMaturity+txInput.UTXOEntry.BlockDAAScore()) - - // Just use some stub ghostdag data - tc.GHOSTDAGDataStore().Stage(stagingArea, povBlockHash, externalapi.NewBlockGHOSTDAGData( - 0, - nil, - consensusConfig.GenesisHash, - nil, - nil, - nil), false) - - tests := []struct { - name string - tx *externalapi.DomainTransaction - povBlockHash *externalapi.DomainHash - isValid bool - expectedError error - }{ - { - name: "Valid transaction", - tx: &validTx, - povBlockHash: povBlockHash, - isValid: true, - expectedError: nil, - }, - { // The calculated block coinbase maturity is smaller than the minimum expected blockCoinbaseMaturity. - // The povBlockHash DAA score is 10 and the UTXO DAA score is 5, hence the The subtraction between - // them will yield a smaller result than the required CoinbaseMaturity (currently set to 100). - name: "checkTransactionCoinbaseMaturity", - tx: &txWithImmatureCoinbase, - povBlockHash: povBlockHash, - isValid: false, - expectedError: ruleerrors.ErrImmatureSpend, - }, - { // The total inputs amount is bigger than the allowed maximum before the HF (21e14) - name: "checkTransactionInputAmounts - valid", - tx: &txWithLargeAmountBeforeHF, - povBlockHash: povBlockHash, - isValid: true, - expectedError: nil, - }, - { // The total inputs amount is bigger than the allowed maximum (constants.MaxSompi) - name: "checkTransactionInputAmounts - invalid - after HF", - tx: &txWithInvalidAmount, - povBlockHash: povBlockHash, - isValid: false, - expectedError: ruleerrors.ErrBadTxOutValue, - }, - { // The total SompiIn (sum of inputs amount) is smaller than the total SompiOut (sum of outputs value) and hence invalid. - name: "checkTransactionOutputAmounts", - tx: &txWithBigValue, - povBlockHash: povBlockHash, - isValid: false, - expectedError: ruleerrors.ErrSpendTooHigh, - }, - { // The SignatureScript is wrong - name: "checkTransactionScripts", - tx: &txWithInvalidSignature, - povBlockHash: povBlockHash, - isValid: false, - expectedError: ruleerrors.ErrScriptValidation, - }, - } - - for _, test := range tests { - err := tc.TransactionValidator().ValidateTransactionInContextAndPopulateFee(stagingArea, test.tx, test.povBlockHash) - - if test.isValid { - if err != nil { - t.Fatalf("Unexpected error on TestValidateTransactionInContextAndPopulateFee"+ - " on test '%v': %+v", test.name, err) - } - } else { - if err == nil || !errors.Is(err, test.expectedError) { - t.Fatalf("TestValidateTransactionInContextAndPopulateFee: test %v:"+ - " Unexpected error: Expected to: %v, but got : %+v", test.name, test.expectedError, err) - } - } - } - }) -} - -func TestSigningTwoInputs(t *testing.T) { - testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) { - consensusConfig.BlockCoinbaseMaturity = 0 - factory := consensus.NewFactory() - tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestSigningTwoInputs") - if err != nil { - t.Fatalf("Error setting up consensus: %+v", err) - } - defer teardown(false) - - privateKey, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - t.Fatalf("Failed to generate a private key: %v", err) - } - publicKey, err := privateKey.SchnorrPublicKey() - if err != nil { - t.Fatalf("Failed to generate a public key: %v", err) - } - publicKeySerialized, err := publicKey.Serialize() - if err != nil { - t.Fatalf("Failed to serialize public key: %v", err) - } - addr, err := util.NewAddressPublicKey(publicKeySerialized[:], consensusConfig.Prefix) - if err != nil { - t.Fatalf("Failed to generate p2pk address: %v", err) - } - - scriptPublicKey, err := txscript.PayToAddrScript(addr) - if err != nil { - t.Fatalf("PayToAddrScript: unexpected error: %v", err) - } - - coinbaseData := &externalapi.DomainCoinbaseData{ - ScriptPublicKey: scriptPublicKey, - } - - block1Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, coinbaseData, nil) - if err != nil { - t.Fatalf("AddBlock: %+v", err) - } - - block2Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{block1Hash}, coinbaseData, nil) - if err != nil { - t.Fatalf("AddBlock: %+v", err) - } - - block3Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{block2Hash}, coinbaseData, nil) - if err != nil { - t.Fatalf("AddBlock: %+v", err) - } - - block2, _, err := tc.GetBlock(block2Hash) - if err != nil { - t.Fatalf("Error getting block2: %+v", err) - } - - block3, _, err := tc.GetBlock(block3Hash) - if err != nil { - t.Fatalf("Error getting block3: %+v", err) - } - - block2Tx := block2.Transactions[0] - block2TxOut := block2Tx.Outputs[0] - - block3Tx := block3.Transactions[0] - block3TxOut := block3Tx.Outputs[0] - - tx := &externalapi.DomainTransaction{ - Version: constants.MaxTransactionVersion, - Inputs: []*externalapi.DomainTransactionInput{ - { - PreviousOutpoint: externalapi.DomainOutpoint{ - TransactionID: *consensushashing.TransactionID(block2.Transactions[0]), - Index: 0, - }, - Sequence: constants.MaxTxInSequenceNum, - SigOpCount: 1, - UTXOEntry: utxo.NewUTXOEntry(block2TxOut.Value, block2TxOut.ScriptPublicKey, true, 0), - }, - { - PreviousOutpoint: externalapi.DomainOutpoint{ - TransactionID: *consensushashing.TransactionID(block3.Transactions[0]), - Index: 0, - }, - Sequence: constants.MaxTxInSequenceNum, - SigOpCount: 1, - UTXOEntry: utxo.NewUTXOEntry(block3TxOut.Value, block3TxOut.ScriptPublicKey, true, 0), - }, - }, - Outputs: []*externalapi.DomainTransactionOutput{{ - Value: 1, - ScriptPublicKey: &externalapi.ScriptPublicKey{ - Script: nil, - Version: 0, - }, - }}, - SubnetworkID: subnetworks.SubnetworkIDNative, - Gas: 0, - LockTime: 0, - } - - sighashReusedValues := &consensushashing.SighashReusedValues{} - for i, input := range tx.Inputs { - signatureScript, err := txscript.SignatureScript(tx, i, consensushashing.SigHashAll, privateKey, - sighashReusedValues) - if err != nil { - t.Fatalf("Failed to create a sigScript: %v", err) - } - input.SignatureScript = signatureScript - } - - _, virtualChangeSet, err := tc.AddBlock([]*externalapi.DomainHash{block3Hash}, nil, []*externalapi.DomainTransaction{tx}) - if err != nil { - t.Fatalf("AddBlock: %+v", err) - } - - txOutpoint := &externalapi.DomainOutpoint{ - TransactionID: *consensushashing.TransactionID(tx), - Index: 0, - } - if !virtualChangeSet.VirtualUTXODiff.ToAdd().Contains(txOutpoint) { - t.Fatalf("tx was not accepted by the DAG") - } - }) -} - -func TestSigningTwoInputsECDSA(t *testing.T) { - testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) { - consensusConfig.BlockCoinbaseMaturity = 0 - factory := consensus.NewFactory() - tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestSigningTwoInputsECDSA") - if err != nil { - t.Fatalf("Error setting up consensus: %+v", err) - } - defer teardown(false) - - privateKey, err := secp256k1.GenerateECDSAPrivateKey() - if err != nil { - t.Fatalf("Failed to generate a private key: %v", err) - } - publicKey, err := privateKey.ECDSAPublicKey() - if err != nil { - t.Fatalf("Failed to generate a public key: %v", err) - } - publicKeySerialized, err := publicKey.Serialize() - if err != nil { - t.Fatalf("Failed to serialize public key: %v", err) - } - addr, err := util.NewAddressPublicKeyECDSA(publicKeySerialized[:], consensusConfig.Prefix) - if err != nil { - t.Fatalf("Failed to generate p2pk address: %v", err) - } - - scriptPublicKey, err := txscript.PayToAddrScript(addr) - if err != nil { - t.Fatalf("PayToAddrScript: unexpected error: %v", err) - } - - coinbaseData := &externalapi.DomainCoinbaseData{ - ScriptPublicKey: scriptPublicKey, - } - - block1Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{consensusConfig.GenesisHash}, coinbaseData, nil) - if err != nil { - t.Fatalf("AddBlock: %+v", err) - } - - block2Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{block1Hash}, coinbaseData, nil) - if err != nil { - t.Fatalf("AddBlock: %+v", err) - } - - block3Hash, _, err := tc.AddBlock([]*externalapi.DomainHash{block2Hash}, coinbaseData, nil) - if err != nil { - t.Fatalf("AddBlock: %+v", err) - } - - block2, _, err := tc.GetBlock(block2Hash) - if err != nil { - t.Fatalf("Error getting block2: %+v", err) - } - - block3, _, err := tc.GetBlock(block3Hash) - if err != nil { - t.Fatalf("Error getting block3: %+v", err) - } - - block2Tx := block2.Transactions[0] - block2TxOut := block2Tx.Outputs[0] - - block3Tx := block3.Transactions[0] - block3TxOut := block3Tx.Outputs[0] - - tx := &externalapi.DomainTransaction{ - Version: constants.MaxTransactionVersion, - Inputs: []*externalapi.DomainTransactionInput{ - { - PreviousOutpoint: externalapi.DomainOutpoint{ - TransactionID: *consensushashing.TransactionID(block2.Transactions[0]), - Index: 0, - }, - Sequence: constants.MaxTxInSequenceNum, - SigOpCount: 1, - UTXOEntry: utxo.NewUTXOEntry(block2TxOut.Value, block2TxOut.ScriptPublicKey, true, 0), - }, - { - PreviousOutpoint: externalapi.DomainOutpoint{ - TransactionID: *consensushashing.TransactionID(block3.Transactions[0]), - Index: 0, - }, - Sequence: constants.MaxTxInSequenceNum, - SigOpCount: 1, - UTXOEntry: utxo.NewUTXOEntry(block3TxOut.Value, block3TxOut.ScriptPublicKey, true, 0), - }, - }, - Outputs: []*externalapi.DomainTransactionOutput{{ - Value: 1, - ScriptPublicKey: &externalapi.ScriptPublicKey{ - Script: nil, - Version: 0, - }, - }}, - SubnetworkID: subnetworks.SubnetworkIDNative, - Gas: 0, - LockTime: 0, - } - - sighashReusedValues := &consensushashing.SighashReusedValues{} - for i, input := range tx.Inputs { - signatureScript, err := txscript.SignatureScriptECDSA(tx, i, consensushashing.SigHashAll, privateKey, - sighashReusedValues) - if err != nil { - t.Fatalf("Failed to create a sigScript: %v", err) - } - input.SignatureScript = signatureScript - } - - _, virtualChangeSet, err := tc.AddBlock([]*externalapi.DomainHash{block3Hash}, nil, []*externalapi.DomainTransaction{tx}) - if err != nil { - t.Fatalf("AddBlock: %+v", err) - } - - txOutpoint := &externalapi.DomainOutpoint{ - TransactionID: *consensushashing.TransactionID(tx), - Index: 0, - } - if !virtualChangeSet.VirtualUTXODiff.ToAdd().Contains(txOutpoint) { - t.Fatalf("tx was not accepted by the DAG") - } - }) -} diff --git a/domain/consensus/pruning_test.go b/domain/consensus/pruning_test.go index 6deee273ff..d3bb615342 100644 --- a/domain/consensus/pruning_test.go +++ b/domain/consensus/pruning_test.go @@ -3,9 +3,9 @@ package consensus_test import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/dagconfig" ) func TestPruningDepth(t *testing.T) { diff --git a/domain/consensus/ruleerrors/rule_error.go b/domain/consensus/ruleerrors/rule_error.go index a46f8528af..938c76f8ab 100644 --- a/domain/consensus/ruleerrors/rule_error.go +++ b/domain/consensus/ruleerrors/rule_error.go @@ -3,8 +3,8 @@ package ruleerrors import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" "github.com/pkg/errors" ) diff --git a/domain/consensus/ruleerrors/rule_error_test.go b/domain/consensus/ruleerrors/rule_error_test.go index 8ad035ce3b..9be456ae76 100644 --- a/domain/consensus/ruleerrors/rule_error_test.go +++ b/domain/consensus/ruleerrors/rule_error_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func TestNewErrMissingTxOut(t *testing.T) { diff --git a/domain/consensus/test_consensus.go b/domain/consensus/test_consensus.go index 64d61afdfd..054fd08a33 100644 --- a/domain/consensus/test_consensus.go +++ b/domain/consensus/test_consensus.go @@ -3,16 +3,16 @@ package consensus import ( "encoding/json" "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashset" - "github.com/kaspanet/kaspad/util/staging" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashset" + "github.com/coinexcom/kaspad/util/staging" "io" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" ) diff --git a/domain/consensus/test_consensus_getters.go b/domain/consensus/test_consensus_getters.go index 877dec8551..3381b24941 100644 --- a/domain/consensus/test_consensus_getters.go +++ b/domain/consensus/test_consensus_getters.go @@ -1,10 +1,10 @@ package consensus import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func (tc *testConsensus) DatabaseContext() model.DBManager { diff --git a/domain/consensus/test_consensus_render_to_dot.go b/domain/consensus/test_consensus_render_to_dot.go index e2320bff0e..49685f1cf1 100644 --- a/domain/consensus/test_consensus_render_to_dot.go +++ b/domain/consensus/test_consensus_render_to_dot.go @@ -8,7 +8,7 @@ import ( "os/exec" "strings" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" ) // RenderDAGToDot is a helper function for debugging tests. diff --git a/domain/consensus/timelock_CLTV_test.go b/domain/consensus/timelock_CLTV_test.go index ce7a5122d1..7c73ec4032 100644 --- a/domain/consensus/timelock_CLTV_test.go +++ b/domain/consensus/timelock_CLTV_test.go @@ -4,15 +4,15 @@ import ( "errors" "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" ) // TestCheckLockTimeVerifyConditionedByDAAScore verifies that an output locked by the CLTV script is spendable only after diff --git a/domain/consensus/utils/blockheader/blockheader.go b/domain/consensus/utils/blockheader/blockheader.go index 85aac19ef2..22fb440529 100644 --- a/domain/consensus/utils/blockheader/blockheader.go +++ b/domain/consensus/utils/blockheader/blockheader.go @@ -1,8 +1,8 @@ package blockheader import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/pow" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/pow" "math/big" ) diff --git a/domain/consensus/utils/blockheader/blockheader_test.go b/domain/consensus/utils/blockheader/blockheader_test.go index 04fccaac23..36f4ac156f 100644 --- a/domain/consensus/utils/blockheader/blockheader_test.go +++ b/domain/consensus/utils/blockheader/blockheader_test.go @@ -1,7 +1,7 @@ package blockheader import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "math/big" "testing" ) diff --git a/domain/consensus/utils/consensushashing/block.go b/domain/consensus/utils/consensushashing/block.go index 0c24dd3d8e..e55782fdde 100644 --- a/domain/consensus/utils/consensushashing/block.go +++ b/domain/consensus/utils/consensushashing/block.go @@ -3,10 +3,10 @@ package consensushashing import ( "io" - "github.com/kaspanet/kaspad/domain/consensus/utils/serialization" + "github.com/coinexcom/kaspad/domain/consensus/utils/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/consensushashing/calculate_signature_hash.go b/domain/consensus/utils/consensushashing/calculate_signature_hash.go index a90dda5db2..d845b4c702 100644 --- a/domain/consensus/utils/consensushashing/calculate_signature_hash.go +++ b/domain/consensus/utils/consensushashing/calculate_signature_hash.go @@ -1,10 +1,10 @@ package consensushashing import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" - "github.com/kaspanet/kaspad/domain/consensus/utils/serialization" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/utils/serialization" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/consensushashing/calculate_signature_hash_test.go b/domain/consensus/utils/consensushashing/calculate_signature_hash_test.go deleted file mode 100644 index 2d52b36d75..0000000000 --- a/domain/consensus/utils/consensushashing/calculate_signature_hash_test.go +++ /dev/null @@ -1,517 +0,0 @@ -package consensushashing_test - -import ( - "encoding/hex" - "fmt" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "testing" - - "github.com/kaspanet/go-secp256k1" - - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util" - - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" -) - -// shortened versions of SigHash types to fit in single line of test case -const ( - all = consensushashing.SigHashAll - none = consensushashing.SigHashNone - single = consensushashing.SigHashSingle - allAnyoneCanPay = consensushashing.SigHashAll | consensushashing.SigHashAnyOneCanPay - noneAnyoneCanPay = consensushashing.SigHashNone | consensushashing.SigHashAnyOneCanPay - singleAnyoneCanPay = consensushashing.SigHashSingle | consensushashing.SigHashAnyOneCanPay -) - -func modifyOutput(outputIndex int) func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - return func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - clone := tx.Clone() - clone.Outputs[outputIndex].Value = 100 - return clone - } -} - -func modifyInput(inputIndex int) func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - return func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - clone := tx.Clone() - clone.Inputs[inputIndex].PreviousOutpoint.Index = 2 - return clone - } -} - -func modifyAmountSpent(inputIndex int) func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - return func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - clone := tx.Clone() - utxoEntry := clone.Inputs[inputIndex].UTXOEntry - clone.Inputs[inputIndex].UTXOEntry = utxo.NewUTXOEntry(666, utxoEntry.ScriptPublicKey(), false, 100) - return clone - } -} - -func modifyScriptPublicKey(inputIndex int) func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - return func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - clone := tx.Clone() - utxoEntry := clone.Inputs[inputIndex].UTXOEntry - scriptPublicKey := utxoEntry.ScriptPublicKey() - scriptPublicKey.Script = append(scriptPublicKey.Script, 1, 2, 3) - clone.Inputs[inputIndex].UTXOEntry = utxo.NewUTXOEntry(utxoEntry.Amount(), scriptPublicKey, false, 100) - return clone - } -} - -func modifySequence(inputIndex int) func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - return func(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - clone := tx.Clone() - clone.Inputs[inputIndex].Sequence = 12345 - return clone - } -} - -func modifyPayload(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - clone := tx.Clone() - clone.Payload = []byte{6, 6, 6, 4, 2, 0, 1, 3, 3, 7} - return clone -} - -func modifyGas(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - clone := tx.Clone() - clone.Gas = 1234 - return clone -} - -func modifySubnetworkID(tx *externalapi.DomainTransaction) *externalapi.DomainTransaction { - clone := tx.Clone() - clone.SubnetworkID = externalapi.DomainSubnetworkID{6, 6, 6, 4, 2, 0, 1, 3, 3, 7} - return clone -} - -func TestCalculateSignatureHashSchnorr(t *testing.T) { - nativeTx, subnetworkTx, err := generateTxs() - if err != nil { - t.Fatalf("Error from generateTxs: %+v", err) - } - - // Note: Expected values were generated by the same code that they test, - // As long as those were not verified using 3rd-party code they only check for regression, not correctness - tests := []struct { - name string - tx *externalapi.DomainTransaction - hashType consensushashing.SigHashType - inputIndex int - modificationFunction func(*externalapi.DomainTransaction) *externalapi.DomainTransaction - expectedSignatureHash string - }{ - // native transactions - - // sigHashAll - {name: "native-all-0", tx: nativeTx, hashType: all, inputIndex: 0, - expectedSignatureHash: "03b7ac6927b2b67100734c3cc313ff8c2e8b3ce3e746d46dd660b706a916b1f5"}, - {name: "native-all-0-modify-input-1", tx: nativeTx, hashType: all, inputIndex: 0, - modificationFunction: modifyInput(1), // should change the hash - expectedSignatureHash: "a9f563d86c0ef19ec2e4f483901d202e90150580b6123c3d492e26e7965f488c"}, - {name: "native-all-0-modify-output-1", tx: nativeTx, hashType: all, inputIndex: 0, - modificationFunction: modifyOutput(1), // should change the hash - expectedSignatureHash: "aad2b61bd2405dfcf7294fc2be85f325694f02dda22d0af30381cb50d8295e0a"}, - {name: "native-all-0-modify-sequence-1", tx: nativeTx, hashType: all, inputIndex: 0, - modificationFunction: modifySequence(1), // should change the hash - expectedSignatureHash: "0818bd0a3703638d4f01014c92cf866a8903cab36df2fa2506dc0d06b94295e8"}, - {name: "native-all-anyonecanpay-0", tx: nativeTx, hashType: allAnyoneCanPay, inputIndex: 0, - expectedSignatureHash: "24821e466e53ff8e5fa93257cb17bb06131a48be4ef282e87f59d2bdc9afebc2"}, - {name: "native-all-anyonecanpay-0-modify-input-0", tx: nativeTx, hashType: allAnyoneCanPay, inputIndex: 0, - modificationFunction: modifyInput(0), // should change the hash - expectedSignatureHash: "d09cb639f335ee69ac71f2ad43fd9e59052d38a7d0638de4cf989346588a7c38"}, - {name: "native-all-anyonecanpay-0-modify-input-1", tx: nativeTx, hashType: allAnyoneCanPay, inputIndex: 0, - modificationFunction: modifyInput(1), // shouldn't change the hash - expectedSignatureHash: "24821e466e53ff8e5fa93257cb17bb06131a48be4ef282e87f59d2bdc9afebc2"}, - {name: "native-all-anyonecanpay-0-modify-sequence", tx: nativeTx, hashType: allAnyoneCanPay, inputIndex: 0, - modificationFunction: modifySequence(1), // shouldn't change the hash - expectedSignatureHash: "24821e466e53ff8e5fa93257cb17bb06131a48be4ef282e87f59d2bdc9afebc2"}, - - // sigHashNone - {name: "native-none-0", tx: nativeTx, hashType: none, inputIndex: 0, - expectedSignatureHash: "38ce4bc93cf9116d2e377b33ff8449c665b7b5e2f2e65303c543b9afdaa4bbba"}, - {name: "native-none-0-modify-output-1", tx: nativeTx, hashType: none, inputIndex: 0, - modificationFunction: modifyOutput(1), // shouldn't change the hash - expectedSignatureHash: "38ce4bc93cf9116d2e377b33ff8449c665b7b5e2f2e65303c543b9afdaa4bbba"}, - {name: "native-none-0-modify-sequence-0", tx: nativeTx, hashType: none, inputIndex: 0, - modificationFunction: modifySequence(0), // should change the hash - expectedSignatureHash: "d9efdd5edaa0d3fd0133ee3ab731d8c20e0a1b9f3c0581601ae2075db1109268"}, - {name: "native-none-0-modify-sequence-1", tx: nativeTx, hashType: none, inputIndex: 0, - modificationFunction: modifySequence(1), // shouldn't change the hash - expectedSignatureHash: "38ce4bc93cf9116d2e377b33ff8449c665b7b5e2f2e65303c543b9afdaa4bbba"}, - {name: "native-none-anyonecanpay-0", tx: nativeTx, hashType: noneAnyoneCanPay, inputIndex: 0, - expectedSignatureHash: "06aa9f4239491e07bb2b6bda6b0657b921aeae51e193d2c5bf9e81439cfeafa0"}, - {name: "native-none-anyonecanpay-0-modify-amount-spent", tx: nativeTx, hashType: noneAnyoneCanPay, inputIndex: 0, - modificationFunction: modifyAmountSpent(0), // should change the hash - expectedSignatureHash: "f07f45f3634d3ea8c0f2cb676f56e20993edf9be07a83bf0dfdb3debcf1441bf"}, - {name: "native-none-anyonecanpay-0-modify-script-public-key", tx: nativeTx, hashType: noneAnyoneCanPay, inputIndex: 0, - modificationFunction: modifyScriptPublicKey(0), // should change the hash - expectedSignatureHash: "20a525c54dc33b2a61201f05233c086dbe8e06e9515775181ed96550b4f2d714"}, - - // sigHashSingle - {name: "native-single-0", tx: nativeTx, hashType: single, inputIndex: 0, - expectedSignatureHash: "44a0b407ff7b239d447743dd503f7ad23db5b2ee4d25279bd3dffaf6b474e005"}, - {name: "native-single-0-modify-output-0", tx: nativeTx, hashType: single, inputIndex: 0, - modificationFunction: modifyOutput(0), // should change the hash - expectedSignatureHash: "0fcaca1211f7ea44997717eb84c04c9c807db8b59797bc6800c2ccb135a5271c"}, - {name: "native-single-0-modify-output-1", tx: nativeTx, hashType: single, inputIndex: 0, - modificationFunction: modifyOutput(1), // shouldn't change the hash - expectedSignatureHash: "44a0b407ff7b239d447743dd503f7ad23db5b2ee4d25279bd3dffaf6b474e005"}, - {name: "native-single-0-modify-sequence-0", tx: nativeTx, hashType: single, inputIndex: 0, - modificationFunction: modifySequence(0), // should change the hash - expectedSignatureHash: "83796d22879718eee1165d4aace667bb6778075dab579c32c57be945f466a451"}, - {name: "native-single-0-modify-sequence-1", tx: nativeTx, hashType: single, inputIndex: 0, - modificationFunction: modifySequence(1), // shouldn't change the hash - expectedSignatureHash: "44a0b407ff7b239d447743dd503f7ad23db5b2ee4d25279bd3dffaf6b474e005"}, - {name: "native-single-2-no-corresponding-output", tx: nativeTx, hashType: single, inputIndex: 2, - expectedSignatureHash: "022ad967192f39d8d5895d243e025ec14cc7a79708c5e364894d4eff3cecb1b0"}, - {name: "native-single-2-no-corresponding-output-modify-output-1", tx: nativeTx, hashType: single, inputIndex: 2, - modificationFunction: modifyOutput(1), // shouldn't change the hash - expectedSignatureHash: "022ad967192f39d8d5895d243e025ec14cc7a79708c5e364894d4eff3cecb1b0"}, - {name: "native-single-anyonecanpay-0", tx: nativeTx, hashType: singleAnyoneCanPay, inputIndex: 0, - expectedSignatureHash: "43b20aba775050cf9ba8d5e48fc7ed2dc6c071d23f30382aea58b7c59cfb8ed7"}, - {name: "native-single-anyonecanpay-2-no-corresponding-output", tx: nativeTx, hashType: singleAnyoneCanPay, inputIndex: 2, - expectedSignatureHash: "846689131fb08b77f83af1d3901076732ef09d3f8fdff945be89aa4300562e5f"}, - - // subnetwork transaction - {name: "subnetwork-all-0", tx: subnetworkTx, hashType: all, inputIndex: 0, - expectedSignatureHash: "b2f421c933eb7e1a91f1d9e1efa3f120fe419326c0dbac487752189522550e0c"}, - {name: "subnetwork-all-modify-payload", tx: subnetworkTx, hashType: all, inputIndex: 0, - modificationFunction: modifyPayload, // should change the hash - expectedSignatureHash: "12ab63b9aea3d58db339245a9b6e9cb6075b2253615ce0fb18104d28de4435a1"}, - {name: "subnetwork-all-modify-gas", tx: subnetworkTx, hashType: all, inputIndex: 0, - modificationFunction: modifyGas, // should change the hash - expectedSignatureHash: "2501edfc0068d591160c4bd98646c6e6892cdc051182a8be3ccd6d67f104fd17"}, - {name: "subnetwork-all-subnetwork-id", tx: subnetworkTx, hashType: all, inputIndex: 0, - modificationFunction: modifySubnetworkID, // should change the hash - expectedSignatureHash: "a5d1230ede0dfcfd522e04123a7bcd721462fed1d3a87352031a4f6e3c4389b6"}, - } - - for _, test := range tests { - tx := test.tx - if test.modificationFunction != nil { - tx = test.modificationFunction(tx) - } - - actualSignatureHash, err := consensushashing.CalculateSignatureHashSchnorr( - tx, test.inputIndex, test.hashType, &consensushashing.SighashReusedValues{}) - if err != nil { - t.Errorf("%s: Error from CalculateSignatureHashSchnorr: %+v", test.name, err) - continue - } - - if actualSignatureHash.String() != test.expectedSignatureHash { - t.Errorf("%s: expected signature hash: '%s'; but got: '%s'", - test.name, test.expectedSignatureHash, actualSignatureHash) - } - } -} - -func TestCalculateSignatureHashECDSA(t *testing.T) { - nativeTx, subnetworkTx, err := generateTxs() - if err != nil { - t.Fatalf("Error from generateTxs: %+v", err) - } - - // Note: Expected values were generated by the same code that they test, - // As long as those were not verified using 3rd-party code they only check for regression, not correctness - tests := []struct { - name string - tx *externalapi.DomainTransaction - hashType consensushashing.SigHashType - inputIndex int - modificationFunction func(*externalapi.DomainTransaction) *externalapi.DomainTransaction - expectedSignatureHash string - }{ - // native transactions - - // sigHashAll - {name: "native-all-0", tx: nativeTx, hashType: all, inputIndex: 0, - expectedSignatureHash: "1d679268414c20ffe952e3c255befd892e60e86ae1657fce8a20225e5dc87d64"}, - {name: "native-all-0-modify-input-1", tx: nativeTx, hashType: all, inputIndex: 0, - modificationFunction: modifyInput(1), // should change the hash - expectedSignatureHash: "c573469b9ec6551507371d26eaa75417905420577f56d0277c4234a99f2305d7"}, - {name: "native-all-0-modify-output-1", tx: nativeTx, hashType: all, inputIndex: 0, - modificationFunction: modifyOutput(1), // should change the hash - expectedSignatureHash: "a92450b0662c120db3993b6bb258d06d2bcb983aa591d85f97adf8b7207a5db5"}, - {name: "native-all-0-modify-sequence-1", tx: nativeTx, hashType: all, inputIndex: 0, - modificationFunction: modifySequence(1), // should change the hash - expectedSignatureHash: "c7a7524096499e4401a1592f892bada1afe7f7d276c4f0e691c993e17c03cf7d"}, - {name: "native-all-anyonecanpay-0", tx: nativeTx, hashType: allAnyoneCanPay, inputIndex: 0, - expectedSignatureHash: "13270aeb5b56d844d064d5d2cf06af7dbd0341fd55069b9af56d5e3c99f2eddd"}, - {name: "native-all-anyonecanpay-0-modify-input-0", tx: nativeTx, hashType: allAnyoneCanPay, inputIndex: 0, - modificationFunction: modifyInput(0), // should change the hash - expectedSignatureHash: "981959e8c427ba4a06c3d53abc93514ba179d8cc7e94daeb4f516a0c2c685f86"}, - {name: "native-all-anyonecanpay-0-modify-input-1", tx: nativeTx, hashType: allAnyoneCanPay, inputIndex: 0, - modificationFunction: modifyInput(1), // shouldn't change the hash - expectedSignatureHash: "13270aeb5b56d844d064d5d2cf06af7dbd0341fd55069b9af56d5e3c99f2eddd"}, - {name: "native-all-anyonecanpay-0-modify-sequence", tx: nativeTx, hashType: allAnyoneCanPay, inputIndex: 0, - modificationFunction: modifySequence(1), // shouldn't change the hash - expectedSignatureHash: "13270aeb5b56d844d064d5d2cf06af7dbd0341fd55069b9af56d5e3c99f2eddd"}, - - // sigHashNone - {name: "native-none-0", tx: nativeTx, hashType: none, inputIndex: 0, - expectedSignatureHash: "a45955ca970039160bb91b1ea42e070b4ff21598654aad91c562e8b9af922c5f"}, - {name: "native-none-0-modify-output-1", tx: nativeTx, hashType: none, inputIndex: 0, - modificationFunction: modifyOutput(1), // shouldn't change the hash - expectedSignatureHash: "a45955ca970039160bb91b1ea42e070b4ff21598654aad91c562e8b9af922c5f"}, - {name: "native-none-0-modify-sequence-0", tx: nativeTx, hashType: none, inputIndex: 0, - modificationFunction: modifySequence(0), // should change the hash - expectedSignatureHash: "e1a430a24d77bc259ae572e1505dd67d3444ba0ffbc7918e06ae7e907e575adb"}, - {name: "native-none-0-modify-sequence-1", tx: nativeTx, hashType: none, inputIndex: 0, - modificationFunction: modifySequence(1), // shouldn't change the hash - expectedSignatureHash: "a45955ca970039160bb91b1ea42e070b4ff21598654aad91c562e8b9af922c5f"}, - {name: "native-none-anyonecanpay-0", tx: nativeTx, hashType: noneAnyoneCanPay, inputIndex: 0, - expectedSignatureHash: "6bae2a0f1f7b9fd59804f4720a1a918be31b7ec12e184585fa16bda8c7f8c35c"}, - {name: "native-none-anyonecanpay-0-modify-amount-spent", tx: nativeTx, hashType: noneAnyoneCanPay, inputIndex: 0, - modificationFunction: modifyAmountSpent(0), // should change the hash - expectedSignatureHash: "6653d3d882d2ffc1c3ff5b7ccf07f7970c5973b824abb5b117803809c5a884c7"}, - {name: "native-none-anyonecanpay-0-modify-script-public-key", tx: nativeTx, hashType: noneAnyoneCanPay, inputIndex: 0, - modificationFunction: modifyScriptPublicKey(0), // should change the hash - expectedSignatureHash: "da3cb9094d905de69b3881cf8d4e2d5268bcf029dec5b62a972fcab90e6abde9"}, - - // sigHashSingle - {name: "native-single-0", tx: nativeTx, hashType: single, inputIndex: 0, - expectedSignatureHash: "964d03d8477dd468f3d9933676b5b4a976a68fee1760eae037be4247c36cc207"}, - {name: "native-single-0-modify-output-0", tx: nativeTx, hashType: single, inputIndex: 0, - modificationFunction: modifyOutput(0), // should change the hash - expectedSignatureHash: "7c51b4a7c6a6e786b1c420c859c2853131d7041b8ba8de72cbcd026b2e0d511b"}, - {name: "native-single-0-modify-output-1", tx: nativeTx, hashType: single, inputIndex: 0, - modificationFunction: modifyOutput(1), // shouldn't change the hash - expectedSignatureHash: "964d03d8477dd468f3d9933676b5b4a976a68fee1760eae037be4247c36cc207"}, - {name: "native-single-0-modify-sequence-0", tx: nativeTx, hashType: single, inputIndex: 0, - modificationFunction: modifySequence(0), // should change the hash - expectedSignatureHash: "d31e5a9e71560d2f66483e7e4e7d41418b66cd22814450848a2d8fa78045d6a0"}, - {name: "native-single-0-modify-sequence-1", tx: nativeTx, hashType: single, inputIndex: 0, - modificationFunction: modifySequence(1), // shouldn't change the hash - expectedSignatureHash: "964d03d8477dd468f3d9933676b5b4a976a68fee1760eae037be4247c36cc207"}, - {name: "native-single-2-no-corresponding-output", tx: nativeTx, hashType: single, inputIndex: 2, - expectedSignatureHash: "667b6b65682a6e1e14aec699a177d22ce1392661828e54dcd97cd83b05233d41"}, - {name: "native-single-2-no-corresponding-output-modify-output-1", tx: nativeTx, hashType: single, inputIndex: 2, - modificationFunction: modifyOutput(1), // shouldn't change the hash - expectedSignatureHash: "667b6b65682a6e1e14aec699a177d22ce1392661828e54dcd97cd83b05233d41"}, - {name: "native-single-anyonecanpay-0", tx: nativeTx, hashType: singleAnyoneCanPay, inputIndex: 0, - expectedSignatureHash: "a11c2fbcd4f09bffce9e5fca62323388a2cf9037fd3be66211c7869c067123a2"}, - {name: "native-single-anyonecanpay-2-no-corresponding-output", tx: nativeTx, hashType: singleAnyoneCanPay, inputIndex: 2, - expectedSignatureHash: "00f429dfb9150d7a96aa3f179bcc6f8fbf9bce481f00c6bb97af67e108e5d0ff"}, - - // subnetwork transaction - {name: "subnetwork-all-0", tx: subnetworkTx, hashType: all, inputIndex: 0, - expectedSignatureHash: "807d351414ff592ba097daa5c7937311d6382107f23a6ae415954e248a0527e0"}, - {name: "subnetwork-all-modify-payload", tx: subnetworkTx, hashType: all, inputIndex: 0, - modificationFunction: modifyPayload, // should change the hash - expectedSignatureHash: "0bb2a9a37cc27a60c91c1c9b5ff29bc09f1b39faa3ec55edb15dcbc6c9ce03d7"}, - {name: "subnetwork-all-modify-gas", tx: subnetworkTx, hashType: all, inputIndex: 0, - modificationFunction: modifyGas, // should change the hash - expectedSignatureHash: "78dcfa1ea6a6f01c31805bda3cc71d7356f32b87a8bf3b80b4a4d0d5f95e8741"}, - {name: "subnetwork-all-subnetwork-id", tx: subnetworkTx, hashType: all, inputIndex: 0, - modificationFunction: modifySubnetworkID, // should change the hash - expectedSignatureHash: "6412917f0d5d856c37897d9a98c3817dc1f1668deff73efeefbe2529e00e3511"}, - } - - for _, test := range tests { - tx := test.tx - if test.modificationFunction != nil { - tx = test.modificationFunction(tx) - } - - actualSignatureHash, err := consensushashing.CalculateSignatureHashECDSA( - tx, test.inputIndex, test.hashType, &consensushashing.SighashReusedValues{}) - if err != nil { - t.Errorf("%s: Error from CalculateSignatureHashECDSA: %+v", test.name, err) - continue - } - - if actualSignatureHash.String() != test.expectedSignatureHash { - t.Errorf("%s: expected signature hash: '%s'; but got: '%s'", - test.name, test.expectedSignatureHash, actualSignatureHash) - } - } -} - -func generateTxs() (nativeTx, subnetworkTx *externalapi.DomainTransaction, err error) { - genesisCoinbase := dagconfig.SimnetParams.GenesisBlock.Transactions[0] - genesisCoinbaseTransactionID := consensushashing.TransactionID(genesisCoinbase) - - address1Str := "kaspasim:qzpj2cfa9m40w9m2cmr8pvfuqpp32mzzwsuw6ukhfduqpp32mzzws59e8fapc" - address1, err := util.DecodeAddress(address1Str, util.Bech32PrefixKaspaSim) - if err != nil { - return nil, nil, fmt.Errorf("error decoding address1: %+v", err) - } - address1ToScript, err := txscript.PayToAddrScript(address1) - if err != nil { - return nil, nil, fmt.Errorf("error generating script: %+v", err) - } - - address2Str := "kaspasim:qr7w7nqsdnc3zddm6u8s9fex4ysk95hm3v30q353ymuqpp32mzzws59e8fapc" - address2, err := util.DecodeAddress(address2Str, util.Bech32PrefixKaspaSim) - if err != nil { - return nil, nil, fmt.Errorf("error decoding address2: %+v", err) - } - address2ToScript, err := txscript.PayToAddrScript(address2) - if err != nil { - return nil, nil, fmt.Errorf("error generating script: %+v", err) - } - - txIns := []*externalapi.DomainTransactionInput{ - { - PreviousOutpoint: *externalapi.NewDomainOutpoint(genesisCoinbaseTransactionID, 0), - Sequence: 0, - UTXOEntry: utxo.NewUTXOEntry(100, address1ToScript, false, 0), - }, - { - PreviousOutpoint: *externalapi.NewDomainOutpoint(genesisCoinbaseTransactionID, 1), - Sequence: 1, - UTXOEntry: utxo.NewUTXOEntry(200, address2ToScript, false, 0), - }, - { - PreviousOutpoint: *externalapi.NewDomainOutpoint(genesisCoinbaseTransactionID, 2), - Sequence: 2, - UTXOEntry: utxo.NewUTXOEntry(300, address2ToScript, false, 0), - }, - } - - txOuts := []*externalapi.DomainTransactionOutput{ - { - Value: 300, - ScriptPublicKey: address2ToScript, - }, - { - Value: 300, - ScriptPublicKey: address1ToScript, - }, - } - - nativeTx = &externalapi.DomainTransaction{ - Version: 0, - Inputs: txIns, - Outputs: txOuts, - LockTime: 1615462089000, - SubnetworkID: subnetworks.SubnetworkIDNative, - } - subnetworkTx = &externalapi.DomainTransaction{ - Version: 0, - Inputs: txIns, - Outputs: txOuts, - LockTime: 1615462089000, - SubnetworkID: externalapi.DomainSubnetworkID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - Gas: 250, - Payload: []byte{10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}, - } - - return nativeTx, subnetworkTx, nil -} - -func BenchmarkCalculateSignatureHashSchnorr(b *testing.B) { - sigHashTypes := []consensushashing.SigHashType{ - consensushashing.SigHashAll, - consensushashing.SigHashNone, - consensushashing.SigHashSingle, - consensushashing.SigHashAll | consensushashing.SigHashAnyOneCanPay, - consensushashing.SigHashNone | consensushashing.SigHashAnyOneCanPay, - consensushashing.SigHashSingle | consensushashing.SigHashAnyOneCanPay} - - for _, size := range []int{10, 100, 1000} { - tx := generateTransaction(b, sigHashTypes, size) - - b.Run(fmt.Sprintf("%d-inputs-and-outputs", size), func(b *testing.B) { - for i := 0; i < b.N; i++ { - reusedValues := &consensushashing.SighashReusedValues{} - for inputIndex := range tx.Inputs { - sigHashType := sigHashTypes[inputIndex%len(sigHashTypes)] - _, err := consensushashing.CalculateSignatureHashSchnorr(tx, inputIndex, sigHashType, reusedValues) - if err != nil { - b.Fatalf("Error from CalculateSignatureHashSchnorr: %+v", err) - } - } - } - }) - } -} - -func generateTransaction(b *testing.B, sigHashTypes []consensushashing.SigHashType, inputAndOutputSizes int) *externalapi.DomainTransaction { - sourceScript := getSourceScript(b) - tx := &externalapi.DomainTransaction{ - Version: 0, - Inputs: generateInputs(inputAndOutputSizes, sourceScript), - Outputs: generateOutputs(inputAndOutputSizes, sourceScript), - LockTime: 123456789, - SubnetworkID: externalapi.DomainSubnetworkID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - Gas: 125, - Payload: []byte{9, 8, 7, 6, 5, 4, 3, 2, 1}, - Fee: 0, - Mass: 0, - ID: nil, - } - signTx(b, tx, sigHashTypes) - return tx -} - -func signTx(b *testing.B, tx *externalapi.DomainTransaction, sigHashTypes []consensushashing.SigHashType) { - sourceAddressPKStr := "a4d85b7532123e3dd34e58d7ce20895f7ca32349e29b01700bb5a3e72d2570eb" - privateKeyBytes, err := hex.DecodeString(sourceAddressPKStr) - if err != nil { - b.Fatalf("Error parsing private key hex: %+v", err) - } - keyPair, err := secp256k1.DeserializeSchnorrPrivateKeyFromSlice(privateKeyBytes) - if err != nil { - b.Fatalf("Error deserializing private key: %+v", err) - } - for i, txIn := range tx.Inputs { - signatureScript, err := txscript.SignatureScript( - tx, i, sigHashTypes[i%len(sigHashTypes)], keyPair, &consensushashing.SighashReusedValues{}) - if err != nil { - b.Fatalf("Error from SignatureScript: %+v", err) - } - txIn.SignatureScript = signatureScript - } - -} - -func generateInputs(size int, sourceScript *externalapi.ScriptPublicKey) []*externalapi.DomainTransactionInput { - inputs := make([]*externalapi.DomainTransactionInput, size) - - for i := 0; i < size; i++ { - inputs[i] = &externalapi.DomainTransactionInput{ - PreviousOutpoint: *externalapi.NewDomainOutpoint( - externalapi.NewDomainTransactionIDFromByteArray(&[32]byte{12, 3, 4, 5}), 1), - SignatureScript: nil, - Sequence: uint64(i), - UTXOEntry: utxo.NewUTXOEntry(uint64(i), sourceScript, false, 12), - } - } - - return inputs -} - -func getSourceScript(b *testing.B) *externalapi.ScriptPublicKey { - sourceAddressStr := "kaspasim:qz6f9z6l3x4v3lf9mgf0t934th4nx5kgzu663x9yjh" - - sourceAddress, err := util.DecodeAddress(sourceAddressStr, util.Bech32PrefixKaspaSim) - if err != nil { - b.Fatalf("Error from DecodeAddress: %+v", err) - } - - sourceScript, err := txscript.PayToAddrScript(sourceAddress) - if err != nil { - b.Fatalf("Error from PayToAddrScript: %+v", err) - } - return sourceScript -} - -func generateOutputs(size int, script *externalapi.ScriptPublicKey) []*externalapi.DomainTransactionOutput { - outputs := make([]*externalapi.DomainTransactionOutput, size) - - for i := 0; i < size; i++ { - outputs[i] = &externalapi.DomainTransactionOutput{ - Value: uint64(i), - ScriptPublicKey: script, - } - } - - return outputs -} diff --git a/domain/consensus/utils/consensushashing/transaction.go b/domain/consensus/utils/consensushashing/transaction.go index aadbaafd43..24cafcb52e 100644 --- a/domain/consensus/utils/consensushashing/transaction.go +++ b/domain/consensus/utils/consensushashing/transaction.go @@ -3,12 +3,12 @@ package consensushashing import ( "io" - "github.com/kaspanet/kaspad/domain/consensus/utils/serialization" + "github.com/coinexcom/kaspad/domain/consensus/utils/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/util/binaryserializer" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/util/binaryserializer" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/hashes/strings.go b/domain/consensus/utils/hashes/strings.go index 91a901a6ca..47ddf8a1fd 100644 --- a/domain/consensus/utils/hashes/strings.go +++ b/domain/consensus/utils/hashes/strings.go @@ -1,7 +1,7 @@ package hashes import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // ToStrings converts a slice of hashes into a slice of the corresponding strings diff --git a/domain/consensus/utils/hashes/writers.go b/domain/consensus/utils/hashes/writers.go index 04c43b66f5..f28f82379f 100644 --- a/domain/consensus/utils/hashes/writers.go +++ b/domain/consensus/utils/hashes/writers.go @@ -1,7 +1,7 @@ package hashes import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" "golang.org/x/crypto/sha3" "hash" diff --git a/domain/consensus/utils/hashset/hash_set.go b/domain/consensus/utils/hashset/hash_set.go index 8772b45078..6ed289612e 100644 --- a/domain/consensus/utils/hashset/hash_set.go +++ b/domain/consensus/utils/hashset/hash_set.go @@ -3,7 +3,7 @@ package hashset import ( "strings" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // HashSet is an unsorted unique collection of DomainHashes diff --git a/domain/consensus/utils/lrucache/lrucache.go b/domain/consensus/utils/lrucache/lrucache.go index bf54abcf0a..74f3506b78 100644 --- a/domain/consensus/utils/lrucache/lrucache.go +++ b/domain/consensus/utils/lrucache/lrucache.go @@ -1,7 +1,7 @@ package lrucache import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // LRUCache is a least-recently-used cache for any type diff --git a/domain/consensus/utils/lrucacheghostdagdata/lrucacheghostdagdata.go b/domain/consensus/utils/lrucacheghostdagdata/lrucacheghostdagdata.go index 44eb770bbe..1b1cfbb5a7 100644 --- a/domain/consensus/utils/lrucacheghostdagdata/lrucacheghostdagdata.go +++ b/domain/consensus/utils/lrucacheghostdagdata/lrucacheghostdagdata.go @@ -1,6 +1,6 @@ package lrucacheghostdagdata -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" type lruKey struct { blockHash externalapi.DomainHash diff --git a/domain/consensus/utils/lrucachehashandwindowsizetoblockghostdagdatahashpairs/lrucachehashandwindowsizetoblockghostdagdatahashpairs.go b/domain/consensus/utils/lrucachehashandwindowsizetoblockghostdagdatahashpairs/lrucachehashandwindowsizetoblockghostdagdatahashpairs.go index ef2459c738..9e62a2e166 100644 --- a/domain/consensus/utils/lrucachehashandwindowsizetoblockghostdagdatahashpairs/lrucachehashandwindowsizetoblockghostdagdatahashpairs.go +++ b/domain/consensus/utils/lrucachehashandwindowsizetoblockghostdagdatahashpairs/lrucachehashandwindowsizetoblockghostdagdatahashpairs.go @@ -1,6 +1,6 @@ package lrucachehashandwindowsizetoblockghostdagdatahashpairs -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" type lruKey struct { blockHash externalapi.DomainHash diff --git a/domain/consensus/utils/lrucachehashpairtoblockghostdagdatahashpair/lrucachehashpairtoblockghostdagdatahashpair.go b/domain/consensus/utils/lrucachehashpairtoblockghostdagdatahashpair/lrucachehashpairtoblockghostdagdatahashpair.go index 674a4c6d13..d383e96185 100644 --- a/domain/consensus/utils/lrucachehashpairtoblockghostdagdatahashpair/lrucachehashpairtoblockghostdagdatahashpair.go +++ b/domain/consensus/utils/lrucachehashpairtoblockghostdagdatahashpair/lrucachehashpairtoblockghostdagdatahashpair.go @@ -1,6 +1,6 @@ package lrucachehashpairtoblockghostdagdatahashpair -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" type lruKey struct { blockHash externalapi.DomainHash diff --git a/domain/consensus/utils/lrucacheuint64tohash/lrucacheuint64tohash.go b/domain/consensus/utils/lrucacheuint64tohash/lrucacheuint64tohash.go index 7df4b1e0f1..2c240d68f6 100644 --- a/domain/consensus/utils/lrucacheuint64tohash/lrucacheuint64tohash.go +++ b/domain/consensus/utils/lrucacheuint64tohash/lrucacheuint64tohash.go @@ -1,6 +1,6 @@ package lrucacheuint64tohash -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // LRUCache is a least-recently-used cache from // uint64 to DomainHash diff --git a/domain/consensus/utils/merkle/merkle.go b/domain/consensus/utils/merkle/merkle.go index c53a0ef88c..4df75825c3 100644 --- a/domain/consensus/utils/merkle/merkle.go +++ b/domain/consensus/utils/merkle/merkle.go @@ -3,9 +3,9 @@ package merkle import ( "math" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" ) // nextPowerOfTwo returns the next highest power of two from a given number if diff --git a/domain/consensus/utils/mining/solve.go b/domain/consensus/utils/mining/solve.go index 12d3ea8c75..8d36ec06b6 100644 --- a/domain/consensus/utils/mining/solve.go +++ b/domain/consensus/utils/mining/solve.go @@ -4,8 +4,8 @@ import ( "math" "math/rand" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/pow" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/pow" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/multiset/multiset.go b/domain/consensus/utils/multiset/multiset.go index cae0ddb444..d0f54a0d61 100644 --- a/domain/consensus/utils/multiset/multiset.go +++ b/domain/consensus/utils/multiset/multiset.go @@ -1,54 +1,16 @@ package multiset import ( - "github.com/kaspanet/go-muhash" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" "github.com/pkg/errors" ) -type multiset struct { - ms *muhash.MuHash -} - -func (m multiset) Add(data []byte) { - m.ms.Add(data) -} - -func (m multiset) Remove(data []byte) { - m.ms.Remove(data) -} - -func (m multiset) Hash() *externalapi.DomainHash { - finalizedHash := m.ms.Finalize() - return externalapi.NewDomainHashFromByteArray(finalizedHash.AsArray()) -} - -func (m multiset) Serialize() []byte { - return m.ms.Serialize()[:] -} - -func (m multiset) Clone() model.Multiset { - return &multiset{ms: m.ms.Clone()} -} - // FromBytes deserializes the given bytes slice and returns a multiset. func FromBytes(multisetBytes []byte) (model.Multiset, error) { - serialized := &muhash.SerializedMuHash{} - if len(serialized) != len(multisetBytes) { - return nil, errors.Errorf("mutliset bytes expected to be in length of %d but got %d", - len(serialized), len(multisetBytes)) - } - copy(serialized[:], multisetBytes) - ms, err := muhash.DeserializeMuHash(serialized) - if err != nil { - return nil, err - } - - return &multiset{ms: ms}, nil + return nil, errors.New("fail") } // New returns a new model.Multiset func New() model.Multiset { - return &multiset{ms: muhash.NewMuHash()} + return nil } diff --git a/domain/consensus/utils/pow/heavyhash.go b/domain/consensus/utils/pow/heavyhash.go index dd090659fa..2c26f05fc0 100644 --- a/domain/consensus/utils/pow/heavyhash.go +++ b/domain/consensus/utils/pow/heavyhash.go @@ -1,8 +1,8 @@ package pow import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" "math" ) diff --git a/domain/consensus/utils/pow/heavyhash_test.go b/domain/consensus/utils/pow/heavyhash_test.go index 6eddd101c1..b2a7434f2a 100644 --- a/domain/consensus/utils/pow/heavyhash_test.go +++ b/domain/consensus/utils/pow/heavyhash_test.go @@ -3,8 +3,8 @@ package pow import ( "bytes" "encoding/hex" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" "math/rand" "testing" ) diff --git a/domain/consensus/utils/pow/pow.go b/domain/consensus/utils/pow/pow.go index d821511a42..9b045b2d36 100644 --- a/domain/consensus/utils/pow/pow.go +++ b/domain/consensus/utils/pow/pow.go @@ -1,11 +1,11 @@ package pow import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/hashes" - "github.com/kaspanet/kaspad/domain/consensus/utils/serialization" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/hashes" + "github.com/coinexcom/kaspad/domain/consensus/utils/serialization" + "github.com/coinexcom/kaspad/util/difficulty" "github.com/pkg/errors" "math/big" diff --git a/domain/consensus/utils/pow/xoshiro.go b/domain/consensus/utils/pow/xoshiro.go index 7775d58a76..e899cc7926 100644 --- a/domain/consensus/utils/pow/xoshiro.go +++ b/domain/consensus/utils/pow/xoshiro.go @@ -2,7 +2,7 @@ package pow import ( "encoding/binary" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "math/bits" ) diff --git a/domain/consensus/utils/reachabilitydata/reachability_data.go b/domain/consensus/utils/reachabilitydata/reachability_data.go index d4252aa24d..5b4352e2e5 100644 --- a/domain/consensus/utils/reachabilitydata/reachability_data.go +++ b/domain/consensus/utils/reachabilitydata/reachability_data.go @@ -1,8 +1,8 @@ package reachabilitydata import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type reachabilityData struct { diff --git a/domain/consensus/utils/reachabilitydata/reachabilitydata_equal_clone_test.go b/domain/consensus/utils/reachabilitydata/reachabilitydata_equal_clone_test.go index c3811c9f8b..0450f18f2f 100644 --- a/domain/consensus/utils/reachabilitydata/reachabilitydata_equal_clone_test.go +++ b/domain/consensus/utils/reachabilitydata/reachabilitydata_equal_clone_test.go @@ -4,8 +4,8 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func TestReachabilityData_Equal(t *testing.T) { diff --git a/domain/consensus/utils/serialization/common.go b/domain/consensus/utils/serialization/common.go index f6aa083a29..0e434632e6 100644 --- a/domain/consensus/utils/serialization/common.go +++ b/domain/consensus/utils/serialization/common.go @@ -3,8 +3,8 @@ package serialization import ( "io" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/util/binaryserializer" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/util/binaryserializer" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/subnetworks/compare.go b/domain/consensus/utils/subnetworks/compare.go index 80a49195b6..6e0b6433b7 100644 --- a/domain/consensus/utils/subnetworks/compare.go +++ b/domain/consensus/utils/subnetworks/compare.go @@ -2,7 +2,7 @@ package subnetworks import ( "bytes" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // Less returns true iff id a is less than id b diff --git a/domain/consensus/utils/subnetworks/from_bytes.go b/domain/consensus/utils/subnetworks/from_bytes.go index a2e612d804..732f75deab 100644 --- a/domain/consensus/utils/subnetworks/from_bytes.go +++ b/domain/consensus/utils/subnetworks/from_bytes.go @@ -1,7 +1,7 @@ package subnetworks import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/subnetworks/from_string.go b/domain/consensus/utils/subnetworks/from_string.go index 784cb08fa9..1474d9d7ad 100644 --- a/domain/consensus/utils/subnetworks/from_string.go +++ b/domain/consensus/utils/subnetworks/from_string.go @@ -3,7 +3,7 @@ package subnetworks import ( "encoding/hex" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // FromString creates a DomainSubnetworkID from the given byte slice diff --git a/domain/consensus/utils/subnetworks/subnetworks.go b/domain/consensus/utils/subnetworks/subnetworks.go index ffa73e4a4e..efca58bdfe 100644 --- a/domain/consensus/utils/subnetworks/subnetworks.go +++ b/domain/consensus/utils/subnetworks/subnetworks.go @@ -1,6 +1,6 @@ package subnetworks -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" var ( // SubnetworkIDNative is the default subnetwork ID which is used for transactions without related payload data diff --git a/domain/consensus/utils/testutils/create_transaction.go b/domain/consensus/utils/testutils/create_transaction.go index a5e2196439..56495effa6 100644 --- a/domain/consensus/utils/testutils/create_transaction.go +++ b/domain/consensus/utils/testutils/create_transaction.go @@ -1,10 +1,10 @@ package testutils import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" ) // CreateTransaction create a transaction that spends the first output of provided transaction. diff --git a/domain/consensus/utils/testutils/for_all_nets.go b/domain/consensus/utils/testutils/for_all_nets.go index e47315ce91..c1d4fa906f 100644 --- a/domain/consensus/utils/testutils/for_all_nets.go +++ b/domain/consensus/utils/testutils/for_all_nets.go @@ -3,8 +3,8 @@ package testutils import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/dagconfig" ) // ForAllNets runs the passed testFunc with all available networks diff --git a/domain/consensus/utils/testutils/op_true_script.go b/domain/consensus/utils/testutils/op_true_script.go index 68be93cfbf..3b3f9de0be 100644 --- a/domain/consensus/utils/testutils/op_true_script.go +++ b/domain/consensus/utils/testutils/op_true_script.go @@ -1,9 +1,9 @@ package testutils import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/testutils/test_ghostdag.go b/domain/consensus/utils/testutils/test_ghostdag.go index ae890bec3c..411cf339cc 100644 --- a/domain/consensus/utils/testutils/test_ghostdag.go +++ b/domain/consensus/utils/testutils/test_ghostdag.go @@ -4,9 +4,9 @@ import ( "sort" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" ) type testGhostDAGSorter struct { diff --git a/domain/consensus/utils/transactionhelper/coinbase.go b/domain/consensus/utils/transactionhelper/coinbase.go index 21eaf317c9..37c814cbff 100644 --- a/domain/consensus/utils/transactionhelper/coinbase.go +++ b/domain/consensus/utils/transactionhelper/coinbase.go @@ -1,8 +1,8 @@ package transactionhelper import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" ) // CoinbaseTransactionIndex is the index of the coinbase transaction in every block diff --git a/domain/consensus/utils/transactionhelper/new.go b/domain/consensus/utils/transactionhelper/new.go index a335aec1fa..16afc33bb5 100644 --- a/domain/consensus/utils/transactionhelper/new.go +++ b/domain/consensus/utils/transactionhelper/new.go @@ -1,8 +1,8 @@ package transactionhelper import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" ) // NewSubnetworkTransaction returns a new trsnactions in the specified subnetwork with specified gas and payload diff --git a/domain/consensus/utils/transactionid/from_bytes.go b/domain/consensus/utils/transactionid/from_bytes.go index 3a1dacd03c..6b45c34870 100644 --- a/domain/consensus/utils/transactionid/from_bytes.go +++ b/domain/consensus/utils/transactionid/from_bytes.go @@ -1,7 +1,7 @@ package transactionid import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // FromBytes creates a DomainTransactionID from the given byte slice diff --git a/domain/consensus/utils/transactionid/from_string.go b/domain/consensus/utils/transactionid/from_string.go index e5c68d1abd..38cfb549fc 100644 --- a/domain/consensus/utils/transactionid/from_string.go +++ b/domain/consensus/utils/transactionid/from_string.go @@ -1,7 +1,7 @@ package transactionid import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // FromString creates a new DomainTransactionID from the given string diff --git a/domain/consensus/utils/txscript/README.md b/domain/consensus/utils/txscript/README.md index 8abc0ef170..f557745317 100644 --- a/domain/consensus/utils/txscript/README.md +++ b/domain/consensus/utils/txscript/README.md @@ -2,7 +2,7 @@ txscript ======== [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](https://choosealicense.com/licenses/isc/) -[![GoDoc](https://godoc.org/github.com/kaspanet/kaspad/txscript?status.png)](http://godoc.org/github.com/kaspanet/kaspad/txscript) +[![GoDoc](https://godoc.org/github.com/coinexcom/kaspad/txscript?status.png)](http://godoc.org/github.com/coinexcom/kaspad/txscript) Package txscript implements the kaspa transaction script language. There is a comprehensive test suite. @@ -15,10 +15,10 @@ although it is still fairly powerful. ## Examples -* [Standard Pay-to-pubkey Script](http://godoc.org/github.com/kaspanet/kaspad/txscript#example-PayToAddrScript) +* [Standard Pay-to-pubkey Script](http://godoc.org/github.com/coinexcom/kaspad/txscript#example-PayToAddrScript) Demonstrates creating a script which pays to a kaspa address. It also prints the created script hex and uses the DisasmString function to display the disassembled script. -* [Extracting Details from Standard Scripts](http://godoc.org/github.com/kaspanet/kaspad/txscript#example-ExtractPkScriptAddrs) +* [Extracting Details from Standard Scripts](http://godoc.org/github.com/coinexcom/kaspad/txscript#example-ExtractPkScriptAddrs) Demonstrates extracting information from a standard public key script. diff --git a/domain/consensus/utils/txscript/engine.go b/domain/consensus/utils/txscript/engine.go index a662b32467..5a19456aba 100644 --- a/domain/consensus/utils/txscript/engine.go +++ b/domain/consensus/utils/txscript/engine.go @@ -7,10 +7,10 @@ package txscript import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/infrastructure/logger" ) // ScriptFlags is a bitmask defining additional operations or tests that will be @@ -45,7 +45,7 @@ type Engine struct { numOps int flags ScriptFlags sigCache *SigCache - sigCacheECDSA *SigCacheECDSA + sigCacheECDSA interface{} sigHashReusedValues *consensushashing.SighashReusedValues isP2SH bool // treat execution as pay-to-script-hash savedFirstStack [][]byte // stack from first script for ps2h scripts diff --git a/domain/consensus/utils/txscript/engine_test.go b/domain/consensus/utils/txscript/engine_test.go index 1f5582b552..102453537b 100644 --- a/domain/consensus/utils/txscript/engine_test.go +++ b/domain/consensus/utils/txscript/engine_test.go @@ -7,9 +7,9 @@ package txscript import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // TestBadPC sets the pc to a deliberately bad result then confirms that Step() diff --git a/domain/consensus/utils/txscript/example_test.go b/domain/consensus/utils/txscript/example_test.go index a770e5a655..ce57495d2b 100644 --- a/domain/consensus/utils/txscript/example_test.go +++ b/domain/consensus/utils/txscript/example_test.go @@ -7,11 +7,11 @@ package txscript_test import ( "encoding/hex" "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/util" ) // This example demonstrates creating a script which pays to a kaspa address. diff --git a/domain/consensus/utils/txscript/log.go b/domain/consensus/utils/txscript/log.go index 06ebf67baf..8e3a8e1901 100644 --- a/domain/consensus/utils/txscript/log.go +++ b/domain/consensus/utils/txscript/log.go @@ -5,7 +5,7 @@ package txscript import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("SCRP") diff --git a/domain/consensus/utils/txscript/main_test.go b/domain/consensus/utils/txscript/main_test.go index cd8622ac65..bdb18ae186 100644 --- a/domain/consensus/utils/txscript/main_test.go +++ b/domain/consensus/utils/txscript/main_test.go @@ -1,7 +1,7 @@ package txscript import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" "os" "testing" ) diff --git a/domain/consensus/utils/txscript/opcode.go b/domain/consensus/utils/txscript/opcode.go index 3543d1be24..80e37a4762 100644 --- a/domain/consensus/utils/txscript/opcode.go +++ b/domain/consensus/utils/txscript/opcode.go @@ -8,16 +8,13 @@ import ( "bytes" "crypto/sha256" "encoding/binary" + "errors" "fmt" "hash" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "golang.org/x/crypto/blake2b" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - - "github.com/kaspanet/go-secp256k1" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" ) // An opcode defines the information related to a txscript opcode. opfunc, if @@ -1921,169 +1918,11 @@ func opcodeBlake2b(op *parsedOpcode, vm *Engine) error { // // Stack transformation: [... signature pubkey] -> [... bool] func opcodeCheckSig(op *parsedOpcode, vm *Engine) error { - pkBytes, err := vm.dstack.PopByteArray() - if err != nil { - return err - } - - fullSigBytes, err := vm.dstack.PopByteArray() - if err != nil { - return err - } - - // The signature actually needs needs to be longer than this, but at - // least 1 byte is needed for the hash type below. The full length is - // checked depending on the script flags and upon parsing the signature. - if len(fullSigBytes) < 1 { - vm.dstack.PushBool(false) - return nil - } - - // Trim off hashtype from the signature string and check if the - // signature and pubkey conform to the strict encoding requirements - // depending on the flags. - // - // NOTE: When the strict encoding flags are set, any errors in the - // signature or public encoding here result in an immediate script error - // (and thus no result bool is pushed to the data stack). This differs - // from the logic below where any errors in parsing the signature is - // treated as the signature failure resulting in false being pushed to - // the data stack. This is required because the more general script - // validation consensus rules do not have the new strict encoding - // requirements enabled by the flags. - hashType := consensushashing.SigHashType(fullSigBytes[len(fullSigBytes)-1]) - sigBytes := fullSigBytes[:len(fullSigBytes)-1] - if !hashType.IsStandardSigHashType() { - return scriptError(ErrInvalidSigHashType, fmt.Sprintf("invalid hash type 0x%x", hashType)) - } - if err := vm.checkSignatureLength(sigBytes); err != nil { - return err - } - if err := vm.checkPubKeyEncoding(pkBytes); err != nil { - return err - } - - // Generate the signature hash based on the signature hash type. - sigHash, err := consensushashing.CalculateSignatureHashSchnorr(&vm.tx, vm.txIdx, hashType, vm.sigHashReusedValues) - if err != nil { - vm.dstack.PushBool(false) - return nil - } - - pubKey, err := secp256k1.DeserializeSchnorrPubKey(pkBytes) - if err != nil { - vm.dstack.PushBool(false) - return nil - } - signature, err := secp256k1.DeserializeSchnorrSignatureFromSlice(sigBytes) - if err != nil { - vm.dstack.PushBool(false) - return nil - } - - var valid bool - secpHash := secp256k1.Hash(*sigHash.ByteArray()) - if vm.sigCache != nil { - - valid = vm.sigCache.Exists(secpHash, signature, pubKey) - if !valid && pubKey.SchnorrVerify(&secpHash, signature) { - vm.sigCache.Add(secpHash, signature, pubKey) - valid = true - } - } else { - valid = pubKey.SchnorrVerify(&secpHash, signature) - } - - if !valid && len(sigBytes) > 0 { - str := "signature not empty on failed checksig" - return scriptError(ErrNullFail, str) - } - - vm.dstack.PushBool(valid) - return nil + return errors.New("fail") } func opcodeCheckSigECDSA(op *parsedOpcode, vm *Engine) error { - pkBytes, err := vm.dstack.PopByteArray() - if err != nil { - return err - } - - fullSigBytes, err := vm.dstack.PopByteArray() - if err != nil { - return err - } - - // The signature actually needs needs to be longer than this, but at - // least 1 byte is needed for the hash type below. The full length is - // checked depending on the script flags and upon parsing the signature. - if len(fullSigBytes) < 1 { - vm.dstack.PushBool(false) - return nil - } - - // Trim off hashtype from the signature string and check if the - // signature and pubkey conform to the strict encoding requirements - // depending on the flags. - // - // NOTE: When the strict encoding flags are set, any errors in the - // signature or public encoding here result in an immediate script error - // (and thus no result bool is pushed to the data stack). This differs - // from the logic below where any errors in parsing the signature is - // treated as the signature failure resulting in false being pushed to - // the data stack. This is required because the more general script - // validation consensus rules do not have the new strict encoding - // requirements enabled by the flags. - hashType := consensushashing.SigHashType(fullSigBytes[len(fullSigBytes)-1]) - sigBytes := fullSigBytes[:len(fullSigBytes)-1] - if !hashType.IsStandardSigHashType() { - return scriptError(ErrInvalidSigHashType, fmt.Sprintf("invalid hash type 0x%x", hashType)) - } - if err := vm.checkSignatureLengthECDSA(sigBytes); err != nil { - return err - } - if err := vm.checkPubKeyEncodingECDSA(pkBytes); err != nil { - return err - } - - // Generate the signature hash based on the signature hash type. - sigHash, err := consensushashing.CalculateSignatureHashECDSA(&vm.tx, vm.txIdx, hashType, vm.sigHashReusedValues) - if err != nil { - vm.dstack.PushBool(false) - return nil - } - - pubKey, err := secp256k1.DeserializeECDSAPubKey(pkBytes) - if err != nil { - vm.dstack.PushBool(false) - return nil - } - signature, err := secp256k1.DeserializeECDSASignatureFromSlice(sigBytes) - if err != nil { - vm.dstack.PushBool(false) - return nil - } - - var valid bool - secpHash := secp256k1.Hash(*sigHash.ByteArray()) - if vm.sigCacheECDSA != nil { - - valid = vm.sigCacheECDSA.Exists(secpHash, signature, pubKey) - if !valid && pubKey.ECDSAVerify(&secpHash, signature) { - vm.sigCacheECDSA.Add(secpHash, signature, pubKey) - valid = true - } - } else { - valid = pubKey.ECDSAVerify(&secpHash, signature) - } - - if !valid && len(sigBytes) > 0 { - str := "signature not empty on failed checksig" - return scriptError(ErrNullFail, str) - } - - vm.dstack.PushBool(valid) - return nil + return errors.New("fail") } // opcodeCheckSigVerify is a combination of opcodeCheckSig and opcodeVerify. @@ -2099,21 +1938,6 @@ func opcodeCheckSigVerify(op *parsedOpcode, vm *Engine) error { return err } -// parsedSigInfo houses a raw signature along with its parsed form and a flag -// for whether or not it has already been parsed. It is used to prevent parsing -// the same signature multiple times when verifying a multisig. -type parsedSigInfo struct { - signature []byte - parsedSignature *secp256k1.SchnorrSignature - parsed bool -} - -type parsedSigInfoECDSA struct { - signature []byte - parsedSignature *secp256k1.ECDSASignature - parsed bool -} - // opcodeCheckMultiSig treats the top item on the stack as an integer number of // public keys, followed by that many entries as raw data representing the public // keys, followed by the integer number of signatures, followed by that many @@ -2128,341 +1952,11 @@ type parsedSigInfoECDSA struct { // Stack transformation: // [... [sig ...] numsigs [pubkey ...] numpubkeys] -> [... bool] func opcodeCheckMultiSig(op *parsedOpcode, vm *Engine) error { - numKeys, err := vm.dstack.PopInt() - if err != nil { - return err - } - - numPubKeys := int(numKeys.Int32()) - if numPubKeys < 0 { - str := fmt.Sprintf("number of pubkeys %d is negative", - numPubKeys) - return scriptError(ErrInvalidPubKeyCount, str) - } - if numPubKeys > MaxPubKeysPerMultiSig { - str := fmt.Sprintf("too many pubkeys: %d > %d", - numPubKeys, MaxPubKeysPerMultiSig) - return scriptError(ErrInvalidPubKeyCount, str) - } - vm.numOps += numPubKeys - if vm.numOps > MaxOpsPerScript { - str := fmt.Sprintf("exceeded max operation limit of %d", - MaxOpsPerScript) - return scriptError(ErrTooManyOperations, str) - } - - pubKeys := make([][]byte, 0, numPubKeys) - for i := 0; i < numPubKeys; i++ { - pubKey, err := vm.dstack.PopByteArray() - if err != nil { - return err - } - pubKeys = append(pubKeys, pubKey) - } - - numSigs, err := vm.dstack.PopInt() - if err != nil { - return err - } - numSignatures := int(numSigs.Int32()) - if numSignatures < 0 { - str := fmt.Sprintf("number of signatures %d is negative", - numSignatures) - return scriptError(ErrInvalidSignatureCount, str) - - } - if numSignatures > numPubKeys { - str := fmt.Sprintf("more signatures than pubkeys: %d > %d", - numSignatures, numPubKeys) - return scriptError(ErrInvalidSignatureCount, str) - } - - signatures := make([]*parsedSigInfo, 0, numSignatures) - for i := 0; i < numSignatures; i++ { - signature, err := vm.dstack.PopByteArray() - if err != nil { - return err - } - sigInfo := &parsedSigInfo{signature: signature} - signatures = append(signatures, sigInfo) - } - - success := true - numPubKeys++ - pubKeyIdx := -1 - signatureIdx := 0 - - for numSignatures > 0 { - // When there are more signatures than public keys remaining, - // there is no way to succeed since too many signatures are - // invalid, so exit early. - pubKeyIdx++ - numPubKeys-- - if numSignatures > numPubKeys { - success = false - break - } - - sigInfo := signatures[signatureIdx] - pubKey := pubKeys[pubKeyIdx] - - // The order of the signature and public key evaluation is - // important here since it can be distinguished by an - // OP_CHECKMULTISIG NOT when the strict encoding flag is set. - - rawSig := sigInfo.signature - if len(rawSig) == 0 { - // Skip to the next pubkey if signature is empty. - continue - } - - // Split the signature into hash type and signature components. - hashType := consensushashing.SigHashType(rawSig[len(rawSig)-1]) - signature := rawSig[:len(rawSig)-1] - - // Only parse and check the signature encoding once. - var parsedSig *secp256k1.SchnorrSignature - if !sigInfo.parsed { - if !hashType.IsStandardSigHashType() { - return scriptError(ErrInvalidSigHashType, fmt.Sprintf("invalid hash type 0x%x", hashType)) - } - if err := vm.checkSignatureLength(signature); err != nil { - return err - } - - // Parse the signature. - parsedSig, err = secp256k1.DeserializeSchnorrSignatureFromSlice(signature) - sigInfo.parsed = true - if err != nil { - continue - } - - sigInfo.parsedSignature = parsedSig - } else { - // Skip to the next pubkey if the signature is invalid. - if sigInfo.parsedSignature == nil { - continue - } - - // Use the already parsed signature. - parsedSig = sigInfo.parsedSignature - } - - if err := vm.checkPubKeyEncoding(pubKey); err != nil { - return err - } - - // Parse the pubkey. - parsedPubKey, err := secp256k1.DeserializeSchnorrPubKey(pubKey) - if err != nil { - continue - } - - // Generate the signature hash based on the signature hash type. - sigHash, err := consensushashing.CalculateSignatureHashSchnorr(&vm.tx, vm.txIdx, hashType, vm.sigHashReusedValues) - if err != nil { - return err - } - - secpHash := secp256k1.Hash(*sigHash.ByteArray()) - var valid bool - if vm.sigCache != nil { - valid = vm.sigCache.Exists(secpHash, parsedSig, parsedPubKey) - if !valid && parsedPubKey.SchnorrVerify(&secpHash, parsedSig) { - vm.sigCache.Add(secpHash, parsedSig, parsedPubKey) - valid = true - } - } else { - valid = parsedPubKey.SchnorrVerify(&secpHash, parsedSig) - } - - if valid { - // PubKey verified, move on to the next signature. - signatureIdx++ - numSignatures-- - } - } - - if !success { - for _, sig := range signatures { - if len(sig.signature) > 0 { - str := "not all signatures empty on failed checkmultisig" - return scriptError(ErrNullFail, str) - } - } - } - - vm.dstack.PushBool(success) - return nil + return errors.New("fail") } func opcodeCheckMultiSigECDSA(op *parsedOpcode, vm *Engine) error { - numKeys, err := vm.dstack.PopInt() - if err != nil { - return err - } - - numPubKeys := int(numKeys.Int32()) - if numPubKeys < 0 { - str := fmt.Sprintf("number of pubkeys %d is negative", - numPubKeys) - return scriptError(ErrInvalidPubKeyCount, str) - } - if numPubKeys > MaxPubKeysPerMultiSig { - str := fmt.Sprintf("too many pubkeys: %d > %d", - numPubKeys, MaxPubKeysPerMultiSig) - return scriptError(ErrInvalidPubKeyCount, str) - } - vm.numOps += numPubKeys - if vm.numOps > MaxOpsPerScript { - str := fmt.Sprintf("exceeded max operation limit of %d", - MaxOpsPerScript) - return scriptError(ErrTooManyOperations, str) - } - - pubKeys := make([][]byte, 0, numPubKeys) - for i := 0; i < numPubKeys; i++ { - pubKey, err := vm.dstack.PopByteArray() - if err != nil { - return err - } - pubKeys = append(pubKeys, pubKey) - } - - numSigs, err := vm.dstack.PopInt() - if err != nil { - return err - } - numSignatures := int(numSigs.Int32()) - if numSignatures < 0 { - str := fmt.Sprintf("number of signatures %d is negative", - numSignatures) - return scriptError(ErrInvalidSignatureCount, str) - - } - if numSignatures > numPubKeys { - str := fmt.Sprintf("more signatures than pubkeys: %d > %d", - numSignatures, numPubKeys) - return scriptError(ErrInvalidSignatureCount, str) - } - - signatures := make([]*parsedSigInfoECDSA, 0, numSignatures) - for i := 0; i < numSignatures; i++ { - signature, err := vm.dstack.PopByteArray() - if err != nil { - return err - } - sigInfo := &parsedSigInfoECDSA{signature: signature} - signatures = append(signatures, sigInfo) - } - - success := true - numPubKeys++ - pubKeyIdx := -1 - signatureIdx := 0 - - for numSignatures > 0 { - // When there are more signatures than public keys remaining, - // there is no way to succeed since too many signatures are - // invalid, so exit early. - pubKeyIdx++ - numPubKeys-- - if numSignatures > numPubKeys { - success = false - break - } - - sigInfo := signatures[signatureIdx] - pubKey := pubKeys[pubKeyIdx] - - // The order of the signature and public key evaluation is - // important here since it can be distinguished by an - // OP_CHECKMULTISIG NOT when the strict encoding flag is set. - - rawSig := sigInfo.signature - if len(rawSig) == 0 { - // Skip to the next pubkey if signature is empty. - continue - } - - // Split the signature into hash type and signature components. - hashType := consensushashing.SigHashType(rawSig[len(rawSig)-1]) - signature := rawSig[:len(rawSig)-1] - - // Only parse and check the signature encoding once. - var parsedSig *secp256k1.ECDSASignature - if !sigInfo.parsed { - if !hashType.IsStandardSigHashType() { - return scriptError(ErrInvalidSigHashType, fmt.Sprintf("invalid hash type 0x%x", hashType)) - } - if err := vm.checkSignatureLengthECDSA(signature); err != nil { - return err - } - - // Parse the signature. - parsedSig, err = secp256k1.DeserializeECDSASignatureFromSlice(signature) - sigInfo.parsed = true - if err != nil { - continue - } - - sigInfo.parsedSignature = parsedSig - } else { - // Skip to the next pubkey if the signature is invalid. - if sigInfo.parsedSignature == nil { - continue - } - - // Use the already parsed signature. - parsedSig = sigInfo.parsedSignature - } - - if err := vm.checkPubKeyEncodingECDSA(pubKey); err != nil { - return err - } - - // Parse the pubkey. - parsedPubKey, err := secp256k1.DeserializeECDSAPubKey(pubKey) - if err != nil { - continue - } - - // Generate the signature hash based on the signature hash type. - sigHash, err := consensushashing.CalculateSignatureHashECDSA(&vm.tx, vm.txIdx, hashType, vm.sigHashReusedValues) - if err != nil { - return err - } - - secpHash := secp256k1.Hash(*sigHash.ByteArray()) - var valid bool - if vm.sigCacheECDSA != nil { - valid = vm.sigCacheECDSA.Exists(secpHash, parsedSig, parsedPubKey) - if !valid && parsedPubKey.ECDSAVerify(&secpHash, parsedSig) { - vm.sigCacheECDSA.Add(secpHash, parsedSig, parsedPubKey) - valid = true - } - } else { - valid = parsedPubKey.ECDSAVerify(&secpHash, parsedSig) - } - - if valid { - // PubKey verified, move on to the next signature. - signatureIdx++ - numSignatures-- - } - } - - if !success { - for _, sig := range signatures { - if len(sig.signature) > 0 { - str := "not all signatures empty on failed checkmultisig" - return scriptError(ErrNullFail, str) - } - } - } - - vm.dstack.PushBool(success) - return nil + return errors.New("fail") } // opcodeCheckMultiSigVerify is a combination of opcodeCheckMultiSig and diff --git a/domain/consensus/utils/txscript/reference_test.go b/domain/consensus/utils/txscript/reference_test.go deleted file mode 100644 index 2dc9883bc1..0000000000 --- a/domain/consensus/utils/txscript/reference_test.go +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright (c) 2013-2017 The btcsuite developers -// Use of this source code is governed by an ISC -// license that can be found in the LICENSE file. - -package txscript - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "io/ioutil" - "strconv" - "strings" - "testing" - - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/pkg/errors" -) - -// scriptTestName returns a descriptive test name for the given reference script -// test data. -func scriptTestName(test []interface{}) (string, error) { - // The test must consist of a signature script, public key script, flags, - // and expected error. Finally, it may optionally contain a comment. - if len(test) < 4 || len(test) > 5 { - return "", errors.Errorf("invalid test length %d", len(test)) - } - - // Use the comment for the test name if one is specified, otherwise, - // construct the name based on the signature script, public key script, - // and flags. - var name string - if len(test) == 5 { - name = fmt.Sprintf("test (%s)", test[4]) - } else { - name = fmt.Sprintf("test ([%s, %s, %s])", test[0], - test[1], test[2]) - } - return name, nil -} - -// parse hex string into a []byte. -func parseHex(tok string) ([]byte, error) { - if !strings.HasPrefix(tok, "0x") { - return nil, errors.New("not a hex number") - } - return hex.DecodeString(tok[2:]) -} - -// shortFormOps holds a map of opcode names to values for use in short form -// parsing. It is declared here so it only needs to be created once. -var shortFormOps map[string]byte - -// parseShortForm parses a string into a script as follows: -// - Opcodes other than the push opcodes and unknown are present as -// either OP_NAME or just NAME -// - Plain numbers are made into push operations -// - Numbers beginning with 0x are inserted into the []byte as-is (so -// 0x14 is OP_DATA_20) -// - Single quoted strings are pushed as data -// - Anything else is an error -func parseShortForm(script string, version uint16) ([]byte, error) { - if version > constants.MaxScriptPublicKeyVersion { - return nil, errors.Errorf("unknown version %d (max: %d)", - version, constants.MaxScriptPublicKeyVersion) - } - - // Only create the short form opcode map once. - if shortFormOps == nil { - ops := make(map[string]byte) - for opcodeName, opcodeValue := range OpcodeByName { - if strings.Contains(opcodeName, "OP_UNKNOWN") { - continue - } - ops[opcodeName] = opcodeValue - - // The opcodes named OP_# can't have the OP_ prefix - // stripped or they would conflict with the plain - // numbers. Also, since OP_FALSE and OP_TRUE are - // aliases for the OP_0, and OP_1, respectively, they - // have the same value, so detect those by name and - // allow them. - if (opcodeName == "OP_FALSE" || opcodeName == "OP_TRUE") || - (opcodeValue != Op0 && (opcodeValue < Op1 || - opcodeValue > Op16)) { - - ops[strings.TrimPrefix(opcodeName, "OP_")] = opcodeValue - } - } - shortFormOps = ops - } - - // Split only does one separator so convert all \n and tab into space. - script = strings.Replace(script, "\n", " ", -1) - script = strings.Replace(script, "\t", " ", -1) - tokens := strings.Split(script, " ") - builder := NewScriptBuilder() - - for _, tok := range tokens { - if len(tok) == 0 { - continue - } - // if parses as a plain number - if num, err := strconv.ParseInt(tok, 10, 64); err == nil { - builder.AddInt64(num) - continue - } else if bts, err := parseHex(tok); err == nil { - // Concatenate the bytes manually since the test code - // intentionally creates scripts that are too large and - // would cause the builder to error otherwise. - if builder.err == nil { - builder.script = append(builder.script, bts...) - } - } else if len(tok) >= 2 && - tok[0] == '\'' && tok[len(tok)-1] == '\'' { - builder.AddFullData([]byte(tok[1 : len(tok)-1])) - } else if opcode, ok := shortFormOps[tok]; ok { - builder.AddOp(opcode) - } else { - return nil, errors.Errorf("bad token %q", tok) - } - - } - return builder.Script() -} - -// parseScriptFlags parses the provided flags string from the format used in the -// reference tests into ScriptFlags suitable for use in the script engine. -func parseScriptFlags(flagStr string) (ScriptFlags, error) { - var flags ScriptFlags - - sFlags := strings.Split(flagStr, ",") - for _, flag := range sFlags { - switch flag { - case "": - // Nothing. - default: - return flags, errors.Errorf("invalid flag: %s", flag) - } - } - return flags, nil -} - -// parseExpectedResult parses the provided expected result string into allowed -// script error codes. An error is returned if the expected result string is -// not supported. -func parseExpectedResult(expected string) ([]ErrorCode, error) { - switch expected { - case "OK": - return nil, nil - case "UNKNOWN_ERROR": - return []ErrorCode{ErrNumberTooBig, ErrMinimalData}, nil - case "PUBKEYFORMAT": - return []ErrorCode{ErrPubKeyFormat}, nil - case "EVAL_FALSE": - return []ErrorCode{ErrEvalFalse, ErrEmptyStack}, nil - case "EMPTY_STACK": - return []ErrorCode{ErrEmptyStack}, nil - case "EQUALVERIFY": - return []ErrorCode{ErrEqualVerify}, nil - case "NULLFAIL": - return []ErrorCode{ErrNullFail}, nil - case "SIG_HIGH_S": - return []ErrorCode{ErrSigHighS}, nil - case "SIG_HASHTYPE": - return []ErrorCode{ErrInvalidSigHashType}, nil - case "SIG_PUSHONLY": - return []ErrorCode{ErrNotPushOnly}, nil - case "CLEANSTACK": - return []ErrorCode{ErrCleanStack}, nil - case "BAD_OPCODE": - return []ErrorCode{ErrReservedOpcode, ErrMalformedPush}, nil - case "UNBALANCED_CONDITIONAL": - return []ErrorCode{ErrUnbalancedConditional, - ErrInvalidStackOperation}, nil - case "OP_RETURN": - return []ErrorCode{ErrEarlyReturn}, nil - case "VERIFY": - return []ErrorCode{ErrVerify}, nil - case "INVALID_STACK_OPERATION", "INVALID_ALTSTACK_OPERATION": - return []ErrorCode{ErrInvalidStackOperation}, nil - case "DISABLED_OPCODE": - return []ErrorCode{ErrDisabledOpcode}, nil - case "PUSH_SIZE": - return []ErrorCode{ErrElementTooBig}, nil - case "OP_COUNT": - return []ErrorCode{ErrTooManyOperations}, nil - case "STACK_SIZE": - return []ErrorCode{ErrStackOverflow}, nil - case "SCRIPT_SIZE": - return []ErrorCode{ErrScriptTooBig}, nil - case "PUBKEY_COUNT": - return []ErrorCode{ErrInvalidPubKeyCount}, nil - case "SIG_COUNT": - return []ErrorCode{ErrInvalidSignatureCount}, nil - case "MINIMALDATA": - return []ErrorCode{ErrMinimalData}, nil - case "NEGATIVE_LOCKTIME": - return []ErrorCode{ErrNegativeLockTime}, nil - case "UNSATISFIED_LOCKTIME": - return []ErrorCode{ErrUnsatisfiedLockTime}, nil - case "MINIMALIF": - return []ErrorCode{ErrMinimalIf}, nil - } - - return nil, errors.Errorf("unrecognized expected result in test data: %v", - expected) -} - -// createSpendTx generates a basic spending transaction given the passed -// signature and public key scripts. -func createSpendingTx(sigScript []byte, scriptPubKey *externalapi.ScriptPublicKey) *externalapi.DomainTransaction { - outpoint := externalapi.DomainOutpoint{ - TransactionID: externalapi.DomainTransactionID{}, - Index: ^uint32(0), - } - input := &externalapi.DomainTransactionInput{ - PreviousOutpoint: outpoint, - SignatureScript: []byte{Op0, Op0}, - Sequence: constants.MaxTxInSequenceNum, - } - output := &externalapi.DomainTransactionOutput{Value: 0, ScriptPublicKey: scriptPubKey} - coinbaseTx := &externalapi.DomainTransaction{ - Version: 1, - Inputs: []*externalapi.DomainTransactionInput{input}, - Outputs: []*externalapi.DomainTransactionOutput{output}, - } - - outpoint = externalapi.DomainOutpoint{ - TransactionID: *consensushashing.TransactionID(coinbaseTx), - Index: 0, - } - input = &externalapi.DomainTransactionInput{ - PreviousOutpoint: outpoint, - SignatureScript: sigScript, - Sequence: constants.MaxTxInSequenceNum, - } - output = &externalapi.DomainTransactionOutput{Value: 0, ScriptPublicKey: nil} - spendingTx := &externalapi.DomainTransaction{ - Version: 1, - Inputs: []*externalapi.DomainTransactionInput{input}, - Outputs: []*externalapi.DomainTransactionOutput{output}, - } - - return spendingTx -} - -// testScripts ensures all of the passed script tests execute with the expected -// results with or without using a signature cache, as specified by the -// parameter. -func testScripts(t *testing.T, tests [][]interface{}, useSigCache bool) { - // Create a signature cache to use only if requested. - var sigCache *SigCache - var sigCacheECDSA *SigCacheECDSA - if useSigCache { - sigCache = NewSigCache(10) - sigCacheECDSA = NewSigCacheECDSA(10) - } - - for i, test := range tests { - // "Format is: [[wit..., amount]?, scriptSig, scriptPubKey, - // flags, expected_scripterror, ... comments]" - - // Skip single line comments. - if len(test) == 1 { - continue - } - - // Construct a name for the test based on the comment and test - // data. - name, err := scriptTestName(test) - if err != nil { - t.Errorf("TestScripts: invalid test #%d: %v", i, err) - continue - } - - // Extract and parse the signature script from the test fields. - scriptSigStr, ok := test[0].(string) - if !ok { - t.Errorf("%s: signature script is not a string", name) - continue - } - scriptSig, err := parseShortForm(scriptSigStr, 0) - if err != nil { - t.Errorf("%s: can't parse signature script: %v", name, - err) - continue - } - - // Extract and parse the public key script from the test fields. - scriptPubKeyStr, ok := test[1].(string) - if !ok { - t.Errorf("%s: public key script is not a string", name) - continue - } - script, err := parseShortForm(scriptPubKeyStr, 0) - if err != nil { - t.Errorf("%s: can't parse public key script: %v", name, - err) - continue - } - scriptPubKey := &externalapi.ScriptPublicKey{Script: script, Version: 0} - - // Extract and parse the script flags from the test fields. - flagsStr, ok := test[2].(string) - if !ok { - t.Errorf("%s: flags field is not a string", name) - continue - } - flags, err := parseScriptFlags(flagsStr) - if err != nil { - t.Errorf("%s: %v", name, err) - continue - } - - // Extract and parse the expected result from the test fields. - // - // Convert the expected result string into the allowed script - // error codes. This is necessary because txscript is more - // fine grained with its errors than the reference test data, so - // some of the reference test data errors map to more than one - // possibility. - resultStr, ok := test[3].(string) - if !ok { - t.Errorf("%s: result field is not a string", name) - continue - } - allowedErrorCodes, err := parseExpectedResult(resultStr) - if err != nil { - t.Errorf("%s: %v", name, err) - continue - } - - // Generate a transaction pair such that one spends from the - // other and the provided signature and public key scripts are - // used, then create a new engine to execute the scripts. - tx := createSpendingTx(scriptSig, scriptPubKey) - - vm, err := NewEngine(scriptPubKey, tx, 0, flags, sigCache, sigCacheECDSA, &consensushashing.SighashReusedValues{}) - if err == nil { - err = vm.Execute() - } - - // Ensure there were no errors when the expected result is OK. - if resultStr == "OK" { - if err != nil { - t.Errorf("%s failed to execute: %v", name, err) - } - continue - } - - // At this point an error was expected so ensure the result of - // the execution matches it. - success := false - for _, code := range allowedErrorCodes { - if IsErrorCode(err, code) { - success = true - break - } - } - if !success { - var scriptErr Error - if ok := errors.As(err, &scriptErr); ok { - t.Errorf("%s: want error codes %v, got %v", name, - allowedErrorCodes, scriptErr.ErrorCode) - continue - } - t.Errorf("%s: want error codes %v, got err: %v (%T)", - name, allowedErrorCodes, err, err) - continue - } - } -} - -// TestScripts ensures all of the tests in script_tests.json execute with the -// expected results as defined in the test data. -func TestScripts(t *testing.T) { - file, err := ioutil.ReadFile("data/script_tests.json") - if err != nil { - t.Fatalf("TestScripts: %v\n", err) - } - - var tests [][]interface{} - err = json.Unmarshal(file, &tests) - if err != nil { - t.Fatalf("TestScripts couldn't Unmarshal: %v", err) - } - - // Disable non-test logs - logLevel := log.Level() - log.SetLevel(logger.LevelOff) - defer log.SetLevel(logLevel) - - // Run all script tests with and without the signature cache. - testScripts(t, tests, true) - testScripts(t, tests, false) -} diff --git a/domain/consensus/utils/txscript/script.go b/domain/consensus/utils/txscript/script.go index 3a51bc7953..4234286be7 100644 --- a/domain/consensus/utils/txscript/script.go +++ b/domain/consensus/utils/txscript/script.go @@ -8,9 +8,9 @@ import ( "bytes" "fmt" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // These are the constants specified for maximums in individual scripts. diff --git a/domain/consensus/utils/txscript/script_test.go b/domain/consensus/utils/txscript/script_test.go index faedb5bd73..7de363a911 100644 --- a/domain/consensus/utils/txscript/script_test.go +++ b/domain/consensus/utils/txscript/script_test.go @@ -7,7 +7,7 @@ package txscript import ( "bytes" "encoding/hex" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "reflect" "testing" ) diff --git a/domain/consensus/utils/txscript/sigcache.go b/domain/consensus/utils/txscript/sigcache.go index 2adee4f106..59b880ec43 100644 --- a/domain/consensus/utils/txscript/sigcache.go +++ b/domain/consensus/utils/txscript/sigcache.go @@ -4,10 +4,23 @@ package txscript -import ( - "github.com/kaspanet/go-secp256k1" +const ( + // SerializedSchnorrSignatureSize defines the length in bytes of SerializedSchnorrSignature + SerializedSchnorrSignatureSize = 64 ) +// SchnorrSignature is a type representing a Schnorr Signature. +// The struct itself is an opaque data type that should only be created via the supplied methods. +type SchnorrSignature struct { + signature [SerializedSchnorrSignatureSize]byte +} + +// SchnorrPublicKey is a PublicKey type used to sign and verify Schnorr signatures. +// The struct itself is an opaque data type that should only be created via the supplied methods. +type SchnorrPublicKey struct { + init bool +} + // sigCacheEntry represents an entry in the SigCache. Entries within the // SigCache are keyed according to the sigHash of the signature. In the // scenario of a cache-hit (according to the sigHash), an additional comparison @@ -15,8 +28,8 @@ import ( // match. In the occasion that two sigHashes collide, the newer sigHash will // simply overwrite the existing entry. type sigCacheEntry struct { - sig *secp256k1.SchnorrSignature - pubKey *secp256k1.SchnorrPublicKey + sig *SchnorrSignature + pubKey *SchnorrPublicKey } // SigCache implements an Schnorr signature verification cache with a randomized @@ -30,7 +43,7 @@ type sigCacheEntry struct { // optimization which speeds up the validation of transactions within a block, // if they've already been seen and verified within the mempool. type SigCache struct { - validSigs map[secp256k1.Hash]sigCacheEntry + validSigs map[interface{}]sigCacheEntry maxEntries uint } @@ -41,7 +54,7 @@ type SigCache struct { // cache to exceed the max. func NewSigCache(maxEntries uint) *SigCache { return &SigCache{ - validSigs: make(map[secp256k1.Hash]sigCacheEntry, maxEntries), + validSigs: make(map[interface{}]sigCacheEntry, maxEntries), maxEntries: maxEntries, } } @@ -51,10 +64,8 @@ func NewSigCache(maxEntries uint) *SigCache { // // NOTE: This function is safe for concurrent access. Readers won't be blocked // unless there exists a writer, adding an entry to the SigCache. -func (s *SigCache) Exists(sigHash secp256k1.Hash, sig *secp256k1.SchnorrSignature, pubKey *secp256k1.SchnorrPublicKey) bool { - entry, ok := s.validSigs[sigHash] - - return ok && entry.pubKey.IsEqual(pubKey) && entry.sig.IsEqual(sig) +func (s *SigCache) Exists(sigHash, sig, pubKey interface{}) bool { + return false } // Add adds an entry for a signature over 'sigHash' under public key 'pubKey' @@ -64,27 +75,5 @@ func (s *SigCache) Exists(sigHash secp256k1.Hash, sig *secp256k1.SchnorrSignatur // // NOTE: This function is safe for concurrent access. Writers will block // simultaneous readers until function execution has concluded. -func (s *SigCache) Add(sigHash secp256k1.Hash, sig *secp256k1.SchnorrSignature, pubKey *secp256k1.SchnorrPublicKey) { - if s.maxEntries == 0 { - return - } - - // If adding this new entry will put us over the max number of allowed - // entries, then evict an entry. - if uint(len(s.validSigs)+1) > s.maxEntries { - // Remove a random entry from the map. Relying on the random - // starting point of Go's map iteration. It's worth noting that - // the random iteration starting point is not 100% guaranteed - // by the spec, however most Go compilers support it. - // Ultimately, the iteration order isn't important here because - // in order to manipulate which items are evicted, an adversary - // would need to be able to execute preimage attacks on the - // hashing function in order to start eviction at a specific - // entry. - for sigEntry := range s.validSigs { - delete(s.validSigs, sigEntry) - break - } - } - s.validSigs[sigHash] = sigCacheEntry{sig, pubKey} +func (s *SigCache) Add(sigHash, sig, pubKey interface{}) { } diff --git a/domain/consensus/utils/txscript/sigcache_ecdsa.go b/domain/consensus/utils/txscript/sigcache_ecdsa.go index 27e1ae706f..075a7ab1aa 100644 --- a/domain/consensus/utils/txscript/sigcache_ecdsa.go +++ b/domain/consensus/utils/txscript/sigcache_ecdsa.go @@ -4,21 +4,6 @@ package txscript -import ( - "github.com/kaspanet/go-secp256k1" -) - -// sigCacheEntryECDSA represents an entry in the SigCache. Entries within the -// SigCache are keyed according to the sigHash of the signature. In the -// scenario of a cache-hit (according to the sigHash), an additional comparison -// of the signature, and public key will be executed in order to ensure a complete -// match. In the occasion that two sigHashes collide, the newer sigHash will -// simply overwrite the existing entry. -type sigCacheEntryECDSA struct { - sig *secp256k1.ECDSASignature - pubKey *secp256k1.ECDSAPublicKey -} - // SigCacheECDSA implements an ECDSA signature verification cache with a randomized // entry eviction policy. Only valid signatures will be added to the cache. The // benefits of SigCache are two fold. Firstly, usage of SigCache mitigates a DoS @@ -30,61 +15,4 @@ type sigCacheEntryECDSA struct { // optimization which speeds up the validation of transactions within a block, // if they've already been seen and verified within the mempool. type SigCacheECDSA struct { - validSigs map[secp256k1.Hash]sigCacheEntryECDSA - maxEntries uint -} - -// NewSigCacheECDSA creates and initializes a new instance of SigCache. Its sole -// parameter 'maxEntries' represents the maximum number of entries allowed to -// exist in the SigCache at any particular moment. Random entries are evicted -// to make room for new entries that would cause the number of entries in the -// cache to exceed the max. -func NewSigCacheECDSA(maxEntries uint) *SigCacheECDSA { - return &SigCacheECDSA{ - validSigs: make(map[secp256k1.Hash]sigCacheEntryECDSA, maxEntries), - maxEntries: maxEntries, - } -} - -// Exists returns true if an existing entry of 'sig' over 'sigHash' for public -// key 'pubKey' is found within the SigCache. Otherwise, false is returned. -// -// NOTE: This function is safe for concurrent access. Readers won't be blocked -// unless there exists a writer, adding an entry to the SigCache. -func (s *SigCacheECDSA) Exists(sigHash secp256k1.Hash, sig *secp256k1.ECDSASignature, pubKey *secp256k1.ECDSAPublicKey) bool { - entry, ok := s.validSigs[sigHash] - - return ok && entry.pubKey.IsEqual(pubKey) && entry.sig.IsEqual(sig) -} - -// Add adds an entry for a signature over 'sigHash' under public key 'pubKey' -// to the signature cache. In the event that the SigCache is 'full', an -// existing entry is randomly chosen to be evicted in order to make space for -// the new entry. -// -// NOTE: This function is safe for concurrent access. Writers will block -// simultaneous readers until function execution has concluded. -func (s *SigCacheECDSA) Add(sigHash secp256k1.Hash, sig *secp256k1.ECDSASignature, pubKey *secp256k1.ECDSAPublicKey) { - if s.maxEntries == 0 { - return - } - - // If adding this new entry will put us over the max number of allowed - // entries, then evict an entry. - if uint(len(s.validSigs)+1) > s.maxEntries { - // Remove a random entry from the map. Relying on the random - // starting point of Go's map iteration. It's worth noting that - // the random iteration starting point is not 100% guaranteed - // by the spec, however most Go compilers support it. - // Ultimately, the iteration order isn't important here because - // in order to manipulate which items are evicted, an adversary - // would need to be able to execute preimage attacks on the - // hashing function in order to start eviction at a specific - // entry. - for sigEntry := range s.validSigs { - delete(s.validSigs, sigEntry) - break - } - } - s.validSigs[sigHash] = sigCacheEntryECDSA{sig, pubKey} } diff --git a/domain/consensus/utils/txscript/sigcache_test.go b/domain/consensus/utils/txscript/sigcache_test.go deleted file mode 100644 index 2c24084a94..0000000000 --- a/domain/consensus/utils/txscript/sigcache_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) 2015-2016 The btcsuite developers -// Use of this source code is governed by an ISC -// license that can be found in the LICENSE file. - -package txscript - -import ( - "crypto/rand" - "github.com/kaspanet/go-secp256k1" - "testing" -) - -// genRandomSig returns a random message, a signature of the message under the -// public key and the public key. This function is used to generate randomized -// test data. -func genRandomSig() (*secp256k1.Hash, *secp256k1.SchnorrSignature, *secp256k1.SchnorrPublicKey, error) { - privKey, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - return nil, nil, nil, err - } - - msgHash := &secp256k1.Hash{} - if _, err := rand.Read(msgHash[:]); err != nil { - return nil, nil, nil, err - } - - sig, err := privKey.SchnorrSign(msgHash) - if err != nil { - return nil, nil, nil, err - } - - pubkey, err := privKey.SchnorrPublicKey() - if err != nil { - return nil, nil, nil, err - } - - return msgHash, sig, pubkey, nil -} - -// TestSigCacheAddExists tests the ability to add, and later check the -// existence of a signature triplet in the signature cache. -func TestSigCacheAddExists(t *testing.T) { - sigCache := NewSigCache(200) - - // Generate a random sigCache entry triplet. - msg1, sig1, key1, err := genRandomSig() - if err != nil { - t.Fatalf("unable to generate random signature test data") - } - - // Add the triplet to the signature cache. - sigCache.Add(*msg1, sig1, key1) - - // The previously added triplet should now be found within the sigcache. - sig1Copy := secp256k1.DeserializeSchnorrSignature(sig1.Serialize()) - key1Serialized, _ := key1.Serialize() - key1Copy, _ := secp256k1.DeserializeSchnorrPubKey(key1Serialized[:]) - if !sigCache.Exists(*msg1, sig1Copy, key1Copy) { - t.Errorf("previously added item not found in signature cache") - } -} - -// TestSigCacheAddEvictEntry tests the eviction case where a new signature -// triplet is added to a full signature cache which should trigger randomized -// eviction, followed by adding the new element to the cache. -func TestSigCacheAddEvictEntry(t *testing.T) { - // Create a sigcache that can hold up to 100 entries. - sigCacheSize := uint(100) - sigCache := NewSigCache(sigCacheSize) - - // Fill the sigcache up with some random sig triplets. - for i := uint(0); i < sigCacheSize; i++ { - msg, sig, key, err := genRandomSig() - if err != nil { - t.Fatalf("unable to generate random signature test data") - } - - sigCache.Add(*msg, sig, key) - - sigCopy := secp256k1.DeserializeSchnorrSignature(sig.Serialize()) - keySerialized, _ := key.Serialize() - keyCopy, _ := secp256k1.DeserializeSchnorrPubKey(keySerialized[:]) - if !sigCache.Exists(*msg, sigCopy, keyCopy) { - t.Errorf("previously added item not found in signature" + - "cache") - } - } - - // The sigcache should now have sigCacheSize entries within it. - if uint(len(sigCache.validSigs)) != sigCacheSize { - t.Fatalf("sigcache should now have %v entries, instead it has %v", - sigCacheSize, len(sigCache.validSigs)) - } - - // Add a new entry, this should cause eviction of a randomly chosen - // previous entry. - msgNew, sigNew, keyNew, err := genRandomSig() - if err != nil { - t.Fatalf("unable to generate random signature test data") - } - sigCache.Add(*msgNew, sigNew, keyNew) - - // The sigcache should still have sigCache entries. - if uint(len(sigCache.validSigs)) != sigCacheSize { - t.Fatalf("sigcache should now have %v entries, instead it has %v", - sigCacheSize, len(sigCache.validSigs)) - } - - // The entry added above should be found within the sigcache. - sigNewCopy := secp256k1.DeserializeSchnorrSignature(sigNew.Serialize()) - keyNewSerialized, _ := keyNew.Serialize() - keyNewCopy, _ := secp256k1.DeserializeSchnorrPubKey(keyNewSerialized[:]) - if !sigCache.Exists(*msgNew, sigNewCopy, keyNewCopy) { - t.Fatalf("previously added item not found in signature cache") - } -} - -// TestSigCacheAddMaxEntriesZeroOrNegative tests that if a sigCache is created -// with a max size <= 0, then no entries are added to the sigcache at all. -func TestSigCacheAddMaxEntriesZeroOrNegative(t *testing.T) { - // Create a sigcache that can hold up to 0 entries. - sigCache := NewSigCache(0) - - // Generate a random sigCache entry triplet. - msg1, sig1, key1, err := genRandomSig() - if err != nil { - t.Fatalf("unable to generate random signature test data") - } - - // Add the triplet to the signature cache. - sigCache.Add(*msg1, sig1, key1) - - // The generated triplet should not be found. - sig1Copy := secp256k1.DeserializeSchnorrSignature(sig1.Serialize()) - key1Serialized, _ := key1.Serialize() - key1Copy, _ := secp256k1.DeserializeSchnorrPubKey(key1Serialized[:]) - if sigCache.Exists(*msg1, sig1Copy, key1Copy) { - t.Errorf("previously added signature found in sigcache, but" + - "shouldn't have been") - } - - // There shouldn't be any entries in the sigCache. - if len(sigCache.validSigs) != 0 { - t.Errorf("%v items found in sigcache, no items should have"+ - "been added", len(sigCache.validSigs)) - } -} diff --git a/domain/consensus/utils/txscript/sign.go b/domain/consensus/utils/txscript/sign.go deleted file mode 100644 index 589c1682f2..0000000000 --- a/domain/consensus/utils/txscript/sign.go +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) 2013-2015 The btcsuite developers -// Use of this source code is governed by an ISC -// license that can be found in the LICENSE file. - -package txscript - -import ( - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/pkg/errors" - - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util" -) - -// RawTxInSignature returns the serialized Schnorr signature for the input idx of -// the given transaction, with hashType appended to it. -func RawTxInSignature(tx *externalapi.DomainTransaction, idx int, hashType consensushashing.SigHashType, - key *secp256k1.SchnorrKeyPair, sighashReusedValues *consensushashing.SighashReusedValues) ([]byte, error) { - - hash, err := consensushashing.CalculateSignatureHashSchnorr(tx, idx, hashType, sighashReusedValues) - if err != nil { - return nil, err - } - secpHash := secp256k1.Hash(*hash.ByteArray()) - signature, err := key.SchnorrSign(&secpHash) - if err != nil { - return nil, errors.Errorf("cannot sign tx input: %s", err) - } - - return append(signature.Serialize()[:], byte(hashType)), nil -} - -// RawTxInSignatureECDSA returns the serialized ECDSA signature for the input idx of -// the given transaction, with hashType appended to it. -func RawTxInSignatureECDSA(tx *externalapi.DomainTransaction, idx int, hashType consensushashing.SigHashType, - key *secp256k1.ECDSAPrivateKey, sighashReusedValues *consensushashing.SighashReusedValues) ([]byte, error) { - - hash, err := consensushashing.CalculateSignatureHashECDSA(tx, idx, hashType, sighashReusedValues) - if err != nil { - return nil, err - } - secpHash := secp256k1.Hash(*hash.ByteArray()) - signature, err := key.ECDSASign(&secpHash) - if err != nil { - return nil, errors.Errorf("cannot sign tx input: %s", err) - } - - return append(signature.Serialize()[:], byte(hashType)), nil -} - -// SignatureScript creates an input signature script for tx to spend KAS sent -// from a previous output to the owner of a Schnorr private key. tx must include all -// transaction inputs and outputs, however txin scripts are allowed to be filled -// or empty. The returned script is calculated to be used as the idx'th txin -// sigscript for tx. script is the ScriptPublicKey of the previous output being used -// as the idx'th input. privKey is serialized in either a compressed or -// uncompressed format based on compress. This format must match the same format -// used to generate the payment address, or the script validation will fail. -func SignatureScript(tx *externalapi.DomainTransaction, idx int, hashType consensushashing.SigHashType, - privKey *secp256k1.SchnorrKeyPair, sighashReusedValues *consensushashing.SighashReusedValues) ([]byte, error) { - - sig, err := RawTxInSignature(tx, idx, hashType, privKey, sighashReusedValues) - if err != nil { - return nil, err - } - - return NewScriptBuilder().AddData(sig).Script() -} - -// SignatureScriptECDSA creates an input signature script for tx to spend KAS sent -// from a previous output to the owner of an ECDSA private key. tx must include all -// transaction inputs and outputs, however txin scripts are allowed to be filled -// or empty. The returned script is calculated to be used as the idx'th txin -// sigscript for tx. script is the ScriptPublicKey of the previous output being used -// as the idx'th input. privKey is serialized in either a compressed or -// uncompressed format based on compress. This format must match the same format -// used to generate the payment address, or the script validation will fail. -func SignatureScriptECDSA(tx *externalapi.DomainTransaction, idx int, hashType consensushashing.SigHashType, - privKey *secp256k1.ECDSAPrivateKey, sighashReusedValues *consensushashing.SighashReusedValues) ([]byte, error) { - - sig, err := RawTxInSignatureECDSA(tx, idx, hashType, privKey, sighashReusedValues) - if err != nil { - return nil, err - } - - return NewScriptBuilder().AddData(sig).Script() -} - -func sign(dagParams *dagconfig.Params, tx *externalapi.DomainTransaction, idx int, - script *externalapi.ScriptPublicKey, hashType consensushashing.SigHashType, - sighashReusedValues *consensushashing.SighashReusedValues, kdb KeyDB, sdb ScriptDB) ( - []byte, ScriptClass, util.Address, error) { - - class, address, err := ExtractScriptPubKeyAddress(script, dagParams) - if err != nil { - return nil, NonStandardTy, nil, err - } - - switch class { - case PubKeyTy: - // look up key for address - key, err := kdb.GetKey(address) - if err != nil { - return nil, class, nil, err - } - - signedScript, err := SignatureScript(tx, idx, hashType, key, sighashReusedValues) - if err != nil { - return nil, class, nil, err - } - - return signedScript, class, address, nil - case ScriptHashTy: - script, err := sdb.GetScript(address) - if err != nil { - return nil, class, nil, err - } - - return script, class, address, nil - default: - return nil, class, nil, errors.New("can't sign unknown transactions") - } -} - -// mergeScripts merges sigScript and prevScript assuming they are both -// partial solutions for scriptPubKey spending output idx of tx. class, addresses -// and nrequired are the result of extracting the addresses from scriptPubKey. -// The return value is the best effort merging of the two scripts. Calling this -// function with addresses, class and nrequired that do not match scriptPubKey is -// an error and results in undefined behaviour. -func mergeScripts(dagParams *dagconfig.Params, tx *externalapi.DomainTransaction, idx int, - class ScriptClass, sigScript []byte, prevScript *externalapi.ScriptPublicKey) ([]byte, error) { - - switch class { - case ScriptHashTy: - // Remove the last push in the script and then recurse. - // this could be a lot less inefficient. - sigPops, err := parseScript(sigScript) - if err != nil || len(sigPops) == 0 { - return prevScript.Script, nil - } - prevPops, err := parseScript(prevScript.Script) - if err != nil || len(prevPops) == 0 { - return sigScript, nil - } - - // assume that script in sigPops is the correct one, we just - // made it. - script := sigPops[len(sigPops)-1].data - scriptPubKey := &externalapi.ScriptPublicKey{ - Script: script, - Version: prevScript.Version, - } - // We already know this information somewhere up the stack. - class, _, _ := - ExtractScriptPubKeyAddress(scriptPubKey, dagParams) - - // regenerate scripts. - sigScript, _ := unparseScript(sigPops) - prevScriptByte, _ := unparseScript(prevPops) - prevScript = &externalapi.ScriptPublicKey{ - Script: prevScriptByte, - Version: prevScript.Version, - } - // Merge - mergedScript, err := mergeScripts(dagParams, tx, idx, class, sigScript, prevScript) - if err != nil { - return nil, err - } - - // Reappend the script and return the result. - builder := NewScriptBuilder() - builder.AddOps(mergedScript) - builder.AddData(script) - return builder.Script() - - // It doesn't actually make sense to merge anything other than multiig - // and scripthash (because it could contain multisig). Everything else - // has either zero signature, can't be spent, or has a single signature - // which is either present or not. The other two cases are handled - // above. In the conflict case here we just assume the longest is - // correct (this matches behaviour of the reference implementation). - default: - if len(sigScript) > len(prevScript.Script) { - return sigScript, nil - } - return prevScript.Script, nil - } -} - -// KeyDB is an interface type provided to SignTxOutput, it encapsulates -// any user state required to get the private keys for an address. -type KeyDB interface { - GetKey(util.Address) (*secp256k1.SchnorrKeyPair, error) -} - -// KeyClosure implements KeyDB with a closure. -type KeyClosure func(util.Address) (*secp256k1.SchnorrKeyPair, error) - -// GetKey implements KeyDB by returning the result of calling the closure. -func (kc KeyClosure) GetKey(address util.Address) (*secp256k1.SchnorrKeyPair, error) { - return kc(address) -} - -// ScriptDB is an interface type provided to SignTxOutput, it encapsulates any -// user state required to get the scripts for an pay-to-script-hash address. -type ScriptDB interface { - GetScript(util.Address) ([]byte, error) -} - -// ScriptClosure implements ScriptDB with a closure. -type ScriptClosure func(util.Address) ([]byte, error) - -// GetScript implements ScriptDB by returning the result of calling the closure. -func (sc ScriptClosure) GetScript(address util.Address) ([]byte, error) { - return sc(address) -} - -// SignTxOutput signs output idx of the given tx to resolve the script given in -// scriptPublicKey with a signature type of hashType. Any keys required will be -// looked up by calling getKey() with the string of the given address. -// Any pay-to-script-hash signatures will be similarly looked up by calling -// getScript. If previousScript is provided then the results in previousScript -// will be merged in a type-dependent manner with the newly generated. -// signature script. -func SignTxOutput(dagParams *dagconfig.Params, tx *externalapi.DomainTransaction, idx int, - scriptPublicKey *externalapi.ScriptPublicKey, hashType consensushashing.SigHashType, - sighashReusedValues *consensushashing.SighashReusedValues, kdb KeyDB, sdb ScriptDB, - previousScript *externalapi.ScriptPublicKey) ([]byte, error) { - - sigScript, class, _, err := sign(dagParams, tx, - idx, scriptPublicKey, hashType, sighashReusedValues, kdb, sdb) - if err != nil { - return nil, err - } - - if class == ScriptHashTy { - scriptHashPreimageScriptPublicKey := &externalapi.ScriptPublicKey{ - Script: sigScript, - Version: scriptPublicKey.Version, - } - - realSigScript, _, _, err := sign(dagParams, tx, idx, - scriptHashPreimageScriptPublicKey, hashType, sighashReusedValues, kdb, sdb) - if err != nil { - return nil, err - } - - // Append the p2sh script as the last push in the script. - builder := NewScriptBuilder() - builder.AddOps(realSigScript) - builder.AddData(sigScript) - - sigScript, _ = builder.Script() - } - - // Merge scripts. with any previous data, if any. - return mergeScripts(dagParams, tx, idx, class, sigScript, previousScript) -} diff --git a/domain/consensus/utils/txscript/sign_test.go b/domain/consensus/utils/txscript/sign_test.go deleted file mode 100644 index b9eb62febd..0000000000 --- a/domain/consensus/utils/txscript/sign_test.go +++ /dev/null @@ -1,893 +0,0 @@ -// Copyright (c) 2013-2016 The btcsuite developers -// Use of this source code is governed by an ISC -// license that can be found in the LICENSE file. - -package txscript - -import ( - "fmt" - "testing" - - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/pkg/errors" - - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util" -) - -func mkGetKey(keys map[string]*secp256k1.SchnorrKeyPair) KeyDB { - if keys == nil { - return KeyClosure(func(addr util.Address) (*secp256k1.SchnorrKeyPair, error) { - return nil, errors.New("nope") - }) - } - return KeyClosure(func(addr util.Address) (*secp256k1.SchnorrKeyPair, error) { - key, ok := keys[addr.EncodeAddress()] - if !ok { - return nil, errors.New("nope") - } - return key, nil - }) -} - -func mkGetScript(scripts map[string][]byte) ScriptDB { - if scripts == nil { - return ScriptClosure(func(addr util.Address) ([]byte, error) { - return nil, errors.New("nope") - }) - } - return ScriptClosure(func(addr util.Address) ([]byte, error) { - script, ok := scripts[addr.EncodeAddress()] - if !ok { - return nil, errors.New("nope") - } - return script, nil - }) -} - -func checkScripts(msg string, tx *externalapi.DomainTransaction, idx int, sigScript []byte, scriptPubKey *externalapi.ScriptPublicKey) error { - tx.Inputs[idx].SignatureScript = sigScript - var flags ScriptFlags - vm, err := NewEngine(scriptPubKey, tx, idx, - flags, nil, nil, &consensushashing.SighashReusedValues{}) - if err != nil { - return errors.Errorf("failed to make script engine for %s: %v", - msg, err) - } - - err = vm.Execute() - if err != nil { - return errors.Errorf("invalid script signature for %s: %v", msg, - err) - } - - return nil -} - -func signAndCheck(msg string, tx *externalapi.DomainTransaction, idx int, scriptPubKey *externalapi.ScriptPublicKey, - hashType consensushashing.SigHashType, kdb KeyDB, sdb ScriptDB) error { - - sigScript, err := SignTxOutput(&dagconfig.TestnetParams, tx, idx, - scriptPubKey, hashType, &consensushashing.SighashReusedValues{}, kdb, sdb, - &externalapi.ScriptPublicKey{Script: nil, Version: 0}) - if err != nil { - return errors.Errorf("failed to sign output %s: %v", msg, err) - } - - return checkScripts(msg, tx, idx, sigScript, scriptPubKey) -} - -func TestSignTxOutput(t *testing.T) { - t.Parallel() - - // make key - // make script based on key. - // sign with magic pixie dust. - hashTypes := []consensushashing.SigHashType{ - consensushashing.SigHashAll, - consensushashing.SigHashNone, - consensushashing.SigHashSingle, - consensushashing.SigHashAll | consensushashing.SigHashAnyOneCanPay, - consensushashing.SigHashNone | consensushashing.SigHashAnyOneCanPay, - consensushashing.SigHashSingle | consensushashing.SigHashAnyOneCanPay, - } - inputs := []*externalapi.DomainTransactionInput{ - { - PreviousOutpoint: externalapi.DomainOutpoint{ - TransactionID: externalapi.DomainTransactionID{}, - Index: 0, - }, - Sequence: 4294967295, - }, - { - PreviousOutpoint: externalapi.DomainOutpoint{ - TransactionID: externalapi.DomainTransactionID{}, - Index: 1, - }, - Sequence: 4294967295, - }, - { - PreviousOutpoint: externalapi.DomainOutpoint{ - TransactionID: externalapi.DomainTransactionID{}, - Index: 2, - }, - Sequence: 4294967295, - }, - } - outputs := []*externalapi.DomainTransactionOutput{ - { - Value: 1, - ScriptPublicKey: &externalapi.ScriptPublicKey{Script: nil, Version: 0}, - }, - { - Value: 2, - ScriptPublicKey: &externalapi.ScriptPublicKey{Script: nil, Version: 0}, - }, - { - Value: 3, - ScriptPublicKey: &externalapi.ScriptPublicKey{Script: nil, Version: 0}, - }, - } - tx := &externalapi.DomainTransaction{ - Version: 0, - Inputs: inputs, - Outputs: outputs, - } - - key, scriptPubKey, address, err := generateKeys() - if err != nil { - t.Fatal(err) - } - // Pay to Pubkey (merging with correct) - for _, hashType := range hashTypes { - for _, input := range tx.Inputs { - input.UTXOEntry = utxo.NewUTXOEntry(500, scriptPubKey, false, 100) - } - for i := range tx.Inputs { - msg := fmt.Sprintf("%d:%d", hashType, i) - - sigScript, err := SignTxOutput(&dagconfig.TestnetParams, - tx, i, scriptPubKey, hashType, &consensushashing.SighashReusedValues{}, - mkGetKey(map[string]*secp256k1.SchnorrKeyPair{ - address.EncodeAddress(): key, - }), mkGetScript(nil), &externalapi.ScriptPublicKey{Script: nil, Version: 0}) - if err != nil { - t.Errorf("failed to sign output %s: %v", msg, - err) - break - } - - // by the above loop, this should be valid, now sign - // again and merge. - sigScript, err = SignTxOutput(&dagconfig.TestnetParams, - tx, i, scriptPubKey, hashType, &consensushashing.SighashReusedValues{}, - mkGetKey(map[string]*secp256k1.SchnorrKeyPair{ - address.EncodeAddress(): key, - }), mkGetScript(nil), &externalapi.ScriptPublicKey{ - Script: sigScript, - Version: scriptPubKey.Version, - }) - if err != nil { - t.Errorf("failed to sign output %s a "+ - "second time: %v", msg, err) - break - } - - err = checkScripts(msg, tx, i, sigScript, scriptPubKey) - if err != nil { - t.Fatalf("twice signed script invalid for "+ - "%s: %v", msg, err) - break - } - } - } - - // Pay to Pubkey - for _, hashType := range hashTypes { - for i := range tx.Inputs { - msg := fmt.Sprintf("%d:%d", hashType, i) - - key, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - t.Errorf("failed to make privKey for %s: %s", - msg, err) - break - } - - pubKey, err := key.SchnorrPublicKey() - if err != nil { - t.Errorf("failed to make a publickey for %s: %s", - key, err) - break - } - - serializedPubKey, err := pubKey.Serialize() - if err != nil { - t.Errorf("failed to make a pubkey for %s: %s", - key, err) - break - } - - address, err := util.NewAddressPublicKey(serializedPubKey[:], util.Bech32PrefixKaspaTest) - if err != nil { - t.Errorf("failed to make address for %s: %v", - msg, err) - break - } - - scriptPubKey, err := PayToAddrScript(address) - if err != nil { - t.Errorf("failed to make scriptPubKey "+ - "for %s: %v", msg, err) - } - err = signAndCheck(msg, tx, i, scriptPubKey, hashType, - mkGetKey(map[string]*secp256k1.SchnorrKeyPair{ - address.EncodeAddress(): key, - }), - mkGetScript(nil)) - if err != nil { - t.Error(err) - break - } - } - } - - // Pay to Pubkey with duplicate merge - for _, hashType := range hashTypes { - for i := range tx.Inputs { - msg := fmt.Sprintf("%d:%d", hashType, i) - - key, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - t.Errorf("failed to make privKey for %s: %s", - msg, err) - break - } - - pubKey, err := key.SchnorrPublicKey() - if err != nil { - t.Errorf("failed to make a publickey for %s: %s", - key, err) - break - } - - serializedPubKey, err := pubKey.Serialize() - if err != nil { - t.Errorf("failed to make a pubkey for %s: %s", - key, err) - break - } - - address, err := util.NewAddressPublicKey(serializedPubKey[:], util.Bech32PrefixKaspaTest) - if err != nil { - t.Errorf("failed to make address for %s: %v", - msg, err) - break - } - - scriptPubKey, err := PayToAddrScript(address) - if err != nil { - t.Errorf("failed to make scriptPubKey "+ - "for %s: %v", msg, err) - } - - sigScript, err := SignTxOutput(&dagconfig.TestnetParams, - tx, i, scriptPubKey, hashType, &consensushashing.SighashReusedValues{}, - mkGetKey(map[string]*secp256k1.SchnorrKeyPair{ - address.EncodeAddress(): key, - }), mkGetScript(nil), &externalapi.ScriptPublicKey{Script: nil, Version: 0}) - if err != nil { - t.Errorf("failed to sign output %s: %v", msg, - err) - break - } - - // by the above loop, this should be valid, now sign - // again and merge. - sigScript, err = SignTxOutput(&dagconfig.TestnetParams, - tx, i, scriptPubKey, hashType, &consensushashing.SighashReusedValues{}, - mkGetKey(map[string]*secp256k1.SchnorrKeyPair{ - address.EncodeAddress(): key, - }), mkGetScript(nil), &externalapi.ScriptPublicKey{ - Script: sigScript, - Version: scriptPubKey.Version, - }) - if err != nil { - t.Errorf("failed to sign output %s a "+ - "second time: %v", msg, err) - break - } - - err = checkScripts(msg, tx, i, sigScript, scriptPubKey) - if err != nil { - t.Errorf("twice signed script invalid for "+ - "%s: %v", msg, err) - break - } - } - } - - // As before, but with p2sh now. - - // Pay to Pubkey - for _, hashType := range hashTypes { - for i := range tx.Inputs { - msg := fmt.Sprintf("%d:%d", hashType, i) - - key, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - t.Errorf("failed to make privKey for %s: %s", - msg, err) - break - } - - pubKey, err := key.SchnorrPublicKey() - if err != nil { - t.Errorf("failed to make a publickey for %s: %s", - key, err) - break - } - - serializedPubKey, err := pubKey.Serialize() - if err != nil { - t.Errorf("failed to make a pubkey for %s: %s", - key, err) - break - } - - address, err := util.NewAddressPublicKey(serializedPubKey[:], util.Bech32PrefixKaspaTest) - if err != nil { - t.Errorf("failed to make address for %s: %v", - msg, err) - break - } - - scriptPubKey, err := PayToAddrScript(address) - if err != nil { - t.Errorf("failed to make scriptPubKey "+ - "for %s: %v", msg, err) - } - - scriptAddr, err := util.NewAddressScriptHash( - scriptPubKey.Script, util.Bech32PrefixKaspaTest) - if err != nil { - t.Errorf("failed to make p2sh addr for %s: %v", - msg, err) - break - } - - scriptScriptPubKey, err := PayToAddrScript(scriptAddr) - if err != nil { - t.Errorf("failed to make script scriptPubKey for "+ - "%s: %v", msg, err) - break - } - - err = signAndCheck(msg, tx, i, scriptScriptPubKey, hashType, - mkGetKey(map[string]*secp256k1.SchnorrKeyPair{address.EncodeAddress(): key}), - mkGetScript(map[string][]byte{scriptAddr.EncodeAddress(): scriptPubKey.Script})) - if err != nil { - t.Error(err) - break - } - } - } - - // Pay to Pubkey with duplicate merge - for _, hashType := range hashTypes { - for i := range tx.Inputs { - msg := fmt.Sprintf("%d:%d", hashType, i) - - key, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - t.Errorf("failed to make privKey for %s: %s", - msg, err) - break - } - - pubKey, err := key.SchnorrPublicKey() - if err != nil { - t.Errorf("failed to make a publickey for %s: %s", - key, err) - break - } - - serializedPubKey, err := pubKey.Serialize() - if err != nil { - t.Errorf("failed to make a pubkey for %s: %s", - key, err) - break - } - - address, err := util.NewAddressPublicKey(serializedPubKey[:], util.Bech32PrefixKaspaTest) - if err != nil { - t.Errorf("failed to make address for %s: %v", - msg, err) - break - } - - scriptPubKey, err := PayToAddrScript(address) - if err != nil { - t.Errorf("failed to make scriptPubKey "+ - "for %s: %v", msg, err) - } - - scriptAddr, err := util.NewAddressScriptHash( - scriptPubKey.Script, util.Bech32PrefixKaspaTest) - if err != nil { - t.Errorf("failed to make p2sh addr for %s: %v", - msg, err) - break - } - - scriptScriptPubKey, err := PayToAddrScript(scriptAddr) - if err != nil { - t.Errorf("failed to make script scriptPubKey for "+ - "%s: %v", msg, err) - break - } - _, err = SignTxOutput(&dagconfig.TestnetParams, - tx, i, scriptScriptPubKey, hashType, &consensushashing.SighashReusedValues{}, - mkGetKey(map[string]*secp256k1.SchnorrKeyPair{ - address.EncodeAddress(): key, - }), mkGetScript(map[string][]byte{ - scriptAddr.EncodeAddress(): scriptPubKey.Script, - }), &externalapi.ScriptPublicKey{Script: nil, Version: 0}) - if err != nil { - t.Errorf("failed to sign output %s: %v", msg, - err) - break - } - - // by the above loop, this should be valid, now sign - // again and merge. - sigScript, err := SignTxOutput(&dagconfig.TestnetParams, - tx, i, scriptScriptPubKey, hashType, &consensushashing.SighashReusedValues{}, - mkGetKey(map[string]*secp256k1.SchnorrKeyPair{ - address.EncodeAddress(): key, - }), mkGetScript(map[string][]byte{ - scriptAddr.EncodeAddress(): scriptPubKey.Script, - }), &externalapi.ScriptPublicKey{Script: nil, Version: 0}) - if err != nil { - t.Errorf("failed to sign output %s a "+ - "second time: %v", msg, err) - break - } - - err = checkScripts(msg, tx, i, sigScript, scriptScriptPubKey) - if err != nil { - t.Errorf("twice signed script invalid for "+ - "%s: %v", msg, err) - break - } - } - } -} - -func generateKeys() (keyPair *secp256k1.SchnorrKeyPair, scriptPublicKey *externalapi.ScriptPublicKey, - addressPubKeyHash *util.AddressPublicKey, err error) { - - key, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - return nil, nil, nil, errors.Errorf("failed to make privKey: %s", err) - } - - pubKey, err := key.SchnorrPublicKey() - if err != nil { - return nil, nil, nil, errors.Errorf("failed to make a publickey for %s: %s", key, err) - } - - serializedPubKey, err := pubKey.Serialize() - if err != nil { - return nil, nil, nil, errors.Errorf("failed to serialize a pubkey for %s: %s", pubKey, err) - } - address, err := util.NewAddressPublicKey(serializedPubKey[:], util.Bech32PrefixKaspaTest) - if err != nil { - return nil, nil, nil, errors.Errorf("failed to make address for %s: %s", serializedPubKey, err) - } - - scriptPubKey, err := PayToAddrScript(address) - if err != nil { - return nil, nil, nil, errors.Errorf("failed to make scriptPubKey for %s: %s", address, err) - } - return key, scriptPubKey, address, err -} - -type tstInput struct { - txout *externalapi.DomainTransactionOutput - sigscriptGenerates bool - inputValidates bool - indexOutOfRange bool -} - -type tstSigScript struct { - name string - inputs []tstInput - hashType consensushashing.SigHashType - scriptAtWrongIndex bool -} - -var coinbaseOutpoint = &externalapi.DomainOutpoint{ - Index: (1 << 32) - 1, -} - -// Pregenerated private key, with associated public key and scriptPubKeys -// for the uncompressed and compressed hash160. -var ( - privKeyD = secp256k1.SerializedPrivateKey{0x6b, 0x0f, 0xd8, 0xda, 0x54, 0x22, 0xd0, 0xb7, - 0xb4, 0xfc, 0x4e, 0x55, 0xd4, 0x88, 0x42, 0xb3, 0xa1, 0x65, - 0xac, 0x70, 0x7f, 0x3d, 0xa4, 0x39, 0x5e, 0xcb, 0x3b, 0xb0, - 0xd6, 0x0e, 0x06, 0x92} - oldUncompressedScriptPubKey = &externalapi.ScriptPublicKey{[]byte{0x76, 0xa9, 0x14, 0xd1, 0x7c, 0xb5, - 0xeb, 0xa4, 0x02, 0xcb, 0x68, 0xe0, 0x69, 0x56, 0xbf, 0x32, - 0x53, 0x90, 0x0e, 0x0a, 0x86, 0xc9, 0xfa, 0x88, 0xac}, 0} - oldCompressedScriptPubKey = &externalapi.ScriptPublicKey{[]byte{0x76, 0xa9, 0x14, 0x27, 0x4d, 0x9f, 0x7f, - 0x61, 0x7e, 0x7c, 0x7a, 0x1c, 0x1f, 0xb2, 0x75, 0x79, 0x10, - 0x43, 0x65, 0x68, 0x27, 0x9d, 0x86, 0x88, 0xac}, 0} - p2pkScriptPubKey = &externalapi.ScriptPublicKey{[]byte{0x20, 0xb2, 0x52, 0xf0, 0x49, 0x85, 0x78, 0x03, 0x03, - 0xc8, 0x7d, 0xce, 0x51, 0x7f, 0xa8, 0x69, 0x0b, - 0x91, 0x95, 0xf4, 0xf3, 0x5c, 0x26, 0x73, 0x05, - 0x05, 0xa2, 0xee, 0xbc, 0x09, 0x38, 0x34, 0x3a, 0xac}, 0} - shortScriptPubKey = &externalapi.ScriptPublicKey{[]byte{0x76, 0xa9, 0x14, 0xd1, 0x7c, 0xb5, - 0xeb, 0xa4, 0x02, 0xcb, 0x68, 0xe0, 0x69, 0x56, 0xbf, 0x32, - 0x53, 0x90, 0x0e, 0x0a, 0x88, 0xac}, 0} -) - -// Pretend output amounts. -const coinbaseVal = 2500000000 -const fee = 5000000 - -var sigScriptTests = []tstSigScript{ - { - name: "one input old uncompressed", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: oldUncompressedScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: false, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAll, - scriptAtWrongIndex: false, - }, - { - name: "two inputs old uncompressed", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: oldUncompressedScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: false, - indexOutOfRange: false, - }, - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal + fee, - ScriptPublicKey: oldUncompressedScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: false, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAll, - scriptAtWrongIndex: false, - }, - { - name: "one input old compressed", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: oldCompressedScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: false, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAll, - scriptAtWrongIndex: false, - }, - { - name: "two inputs old compressed", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: oldCompressedScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: false, - indexOutOfRange: false, - }, - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal + fee, - ScriptPublicKey: oldCompressedScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: false, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAll, - scriptAtWrongIndex: false, - }, - { - name: "one input 32byte pubkey", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAll, - scriptAtWrongIndex: false, - }, - { - name: "two inputs 32byte pubkey", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal + fee, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAll, - scriptAtWrongIndex: false, - }, - { - name: "hashType SigHashNone", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashNone, - scriptAtWrongIndex: false, - }, - { - name: "hashType SigHashSingle", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashSingle, - scriptAtWrongIndex: false, - }, - { - name: "hashType SigHashAll | SigHashAnyoneCanPay", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAll | consensushashing.SigHashAnyOneCanPay, - scriptAtWrongIndex: false, - }, - { - name: "hashType SigHashAnyoneCanPay", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: false, - inputValidates: false, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAnyOneCanPay, - scriptAtWrongIndex: false, - }, - { - name: "hashType non-exist", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: false, - inputValidates: false, - indexOutOfRange: false, - }, - }, - hashType: 0b00000011, - scriptAtWrongIndex: false, - }, - { - name: "valid script at wrong index", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal + fee, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAll, - scriptAtWrongIndex: true, - }, - { - name: "index out of range", - inputs: []tstInput{ - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - { - txout: &externalapi.DomainTransactionOutput{ - Value: coinbaseVal + fee, - ScriptPublicKey: p2pkScriptPubKey, - }, - sigscriptGenerates: true, - inputValidates: true, - indexOutOfRange: false, - }, - }, - hashType: consensushashing.SigHashAll, - scriptAtWrongIndex: true, - }, -} - -// Test the sigscript generation for valid and invalid inputs, all -// hashTypes, and with and without compression. This test creates -// sigscripts to spend fake coinbase inputs, as sigscripts cannot be -// created for the DomainTransactions in txTests, since they come from the blockDAG -// and we don't have the private keys. -func TestSignatureScript(t *testing.T) { - t.Parallel() - - privKey, _ := secp256k1.DeserializeSchnorrPrivateKey(&privKeyD) - -nexttest: - for i := range sigScriptTests { - outputs := []*externalapi.DomainTransactionOutput{ - {Value: 500, ScriptPublicKey: &externalapi.ScriptPublicKey{[]byte{OpReturn}, 0}}, - } - - inputs := []*externalapi.DomainTransactionInput{} - for j := range sigScriptTests[i].inputs { - txOut := sigScriptTests[i].inputs[j].txout - inputs = append(inputs, &externalapi.DomainTransactionInput{ - PreviousOutpoint: *coinbaseOutpoint, - UTXOEntry: utxo.NewUTXOEntry(txOut.Value, txOut.ScriptPublicKey, false, 10), - }) - } - tx := &externalapi.DomainTransaction{ - Version: 0, - Inputs: inputs, - Outputs: outputs, - } - - var script []byte - var err error - for j := range tx.Inputs { - var idx int - if sigScriptTests[i].inputs[j].indexOutOfRange { - t.Errorf("at test %v", sigScriptTests[i].name) - idx = len(sigScriptTests[i].inputs) - } else { - idx = j - } - script, err = SignatureScript(tx, idx, sigScriptTests[i].hashType, privKey, - &consensushashing.SighashReusedValues{}) - - if (err == nil) != sigScriptTests[i].inputs[j].sigscriptGenerates { - if err == nil { - t.Errorf("passed test '%v' incorrectly", - sigScriptTests[i].name) - } else { - t.Errorf("failed test '%v': %v", - sigScriptTests[i].name, err) - } - continue nexttest - } - if !sigScriptTests[i].inputs[j].sigscriptGenerates { - // done with this test - continue nexttest - } - - tx.Inputs[j].SignatureScript = script - } - - // If testing using a correct sigscript but for an incorrect - // index, use last input script for first input. Requires > 0 - // inputs for test. - if sigScriptTests[i].scriptAtWrongIndex { - tx.Inputs[0].SignatureScript = script - sigScriptTests[i].inputs[0].inputValidates = false - } - - // Validate tx input scripts - var scriptFlags ScriptFlags - for j := range tx.Inputs { - vm, err := NewEngine(sigScriptTests[i].inputs[j].txout.ScriptPublicKey, tx, j, scriptFlags, nil, nil, - &consensushashing.SighashReusedValues{}) - if err != nil { - t.Errorf("cannot create script vm for test %v: %v", - sigScriptTests[i].name, err) - continue nexttest - } - err = vm.Execute() - if (err == nil) != sigScriptTests[i].inputs[j].inputValidates { - if err == nil { - t.Errorf("passed test '%v' validation incorrectly: %v", - sigScriptTests[i].name, err) - } else { - t.Errorf("failed test '%v' validation: %v", - sigScriptTests[i].name, err) - } - continue nexttest - } - } - } -} diff --git a/domain/consensus/utils/txscript/standard.go b/domain/consensus/utils/txscript/standard.go index 2d9ce3c9b5..a994afda9a 100644 --- a/domain/consensus/utils/txscript/standard.go +++ b/domain/consensus/utils/txscript/standard.go @@ -7,12 +7,12 @@ package txscript import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/util" ) // ScriptClass is an enumeration for the list of standard types of script. diff --git a/domain/consensus/utils/txscript/standard_test.go b/domain/consensus/utils/txscript/standard_test.go index 4173db3fc6..aac2fd091d 100644 --- a/domain/consensus/utils/txscript/standard_test.go +++ b/domain/consensus/utils/txscript/standard_test.go @@ -6,12 +6,12 @@ package txscript import ( "bytes" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "reflect" "testing" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/util" ) // mustParseShortForm parses the passed short form script and returns the diff --git a/domain/consensus/utils/utxo/diff_algebra.go b/domain/consensus/utils/utxo/diff_algebra.go index 87fe57a68e..df724240a7 100644 --- a/domain/consensus/utils/utxo/diff_algebra.go +++ b/domain/consensus/utils/utxo/diff_algebra.go @@ -1,7 +1,7 @@ package utxo import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/utxo/diff_algebra_test.go b/domain/consensus/utils/utxo/diff_algebra_test.go index e25f70c009..285923f41c 100644 --- a/domain/consensus/utils/utxo/diff_algebra_test.go +++ b/domain/consensus/utils/utxo/diff_algebra_test.go @@ -4,9 +4,9 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionid" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionid" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (mud *mutableUTXODiff) equal(other *mutableUTXODiff) bool { diff --git a/domain/consensus/utils/utxo/immutable_utxo_diff.go b/domain/consensus/utils/utxo/immutable_utxo_diff.go index 3c0f6d0c21..219ca0db9a 100644 --- a/domain/consensus/utils/utxo/immutable_utxo_diff.go +++ b/domain/consensus/utils/utxo/immutable_utxo_diff.go @@ -1,7 +1,7 @@ package utxo import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/utxo/mutable_utxo_diff.go b/domain/consensus/utils/utxo/mutable_utxo_diff.go index 2f328f985d..14ef4e3d44 100644 --- a/domain/consensus/utils/utxo/mutable_utxo_diff.go +++ b/domain/consensus/utils/utxo/mutable_utxo_diff.go @@ -3,9 +3,9 @@ package utxo import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/utxo/serialization.go b/domain/consensus/utils/utxo/serialization.go index 41cf8745a6..c834dea329 100644 --- a/domain/consensus/utils/utxo/serialization.go +++ b/domain/consensus/utils/utxo/serialization.go @@ -4,9 +4,9 @@ import ( "bytes" "io" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/serialization" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionid" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/serialization" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionid" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/utxo/serialization_test.go b/domain/consensus/utils/utxo/serialization_test.go index 000ead6915..de2d91aec2 100644 --- a/domain/consensus/utils/utxo/serialization_test.go +++ b/domain/consensus/utils/utxo/serialization_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func Benchmark_serializeUTXO(b *testing.B) { diff --git a/domain/consensus/utils/utxo/utxo_collection.go b/domain/consensus/utils/utxo/utxo_collection.go index b517035ea9..38c184a47a 100644 --- a/domain/consensus/utils/utxo/utxo_collection.go +++ b/domain/consensus/utils/utxo/utxo_collection.go @@ -5,7 +5,7 @@ import ( "sort" "strings" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type utxoCollection map[externalapi.DomainOutpoint]externalapi.UTXOEntry diff --git a/domain/consensus/utils/utxo/utxo_entry.go b/domain/consensus/utils/utxo/utxo_entry.go index 5ee810fd10..72a920dd07 100644 --- a/domain/consensus/utils/utxo/utxo_entry.go +++ b/domain/consensus/utils/utxo/utxo_entry.go @@ -1,7 +1,7 @@ package utxo import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) type utxoEntry struct { diff --git a/domain/consensus/utils/utxo/utxo_entry_test.go b/domain/consensus/utils/utxo/utxo_entry_test.go index ba8b0b63a6..5a07c79c07 100644 --- a/domain/consensus/utils/utxo/utxo_entry_test.go +++ b/domain/consensus/utils/utxo/utxo_entry_test.go @@ -1,7 +1,7 @@ package utxo import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "testing" ) diff --git a/domain/consensus/utils/utxo/utxo_iterator.go b/domain/consensus/utils/utxo/utxo_iterator.go index 276b0fc22e..31544f0227 100644 --- a/domain/consensus/utils/utxo/utxo_iterator.go +++ b/domain/consensus/utils/utxo/utxo_iterator.go @@ -1,7 +1,7 @@ package utxo import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/utxo/utxo_iterator_with_diff.go b/domain/consensus/utils/utxo/utxo_iterator_with_diff.go index 067e3ff6f0..9c8ba3165b 100644 --- a/domain/consensus/utils/utxo/utxo_iterator_with_diff.go +++ b/domain/consensus/utils/utxo/utxo_iterator_with_diff.go @@ -1,7 +1,7 @@ package utxo import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/domain/consensus/utils/utxolrucache/utxolrucache.go b/domain/consensus/utils/utxolrucache/utxolrucache.go index 8ae0413412..cef09a815c 100644 --- a/domain/consensus/utils/utxolrucache/utxolrucache.go +++ b/domain/consensus/utils/utxolrucache/utxolrucache.go @@ -1,7 +1,7 @@ package utxolrucache import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // LRUCache is a least-recently-used cache for UTXO entries diff --git a/domain/consensus/utils/virtual/virtual.go b/domain/consensus/utils/virtual/virtual.go index 6cb133f9bb..201e1e8e09 100644 --- a/domain/consensus/utils/virtual/virtual.go +++ b/domain/consensus/utils/virtual/virtual.go @@ -1,8 +1,8 @@ package virtual import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // ContainsOnlyVirtualGenesis returns whether the given block hashes contain only the virtual diff --git a/domain/consensusreference/consensusreference.go b/domain/consensusreference/consensusreference.go index e9620143b3..9151091949 100644 --- a/domain/consensusreference/consensusreference.go +++ b/domain/consensusreference/consensusreference.go @@ -1,6 +1,6 @@ package consensusreference -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // ConsensusReference holds a reference to a consensus object. // The consensus object may be swapped with a new one entirely diff --git a/domain/dagconfig/README.md b/domain/dagconfig/README.md index a144afb0a5..944e4cd363 100644 --- a/domain/dagconfig/README.md +++ b/domain/dagconfig/README.md @@ -2,7 +2,7 @@ dagconfig ======== [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](https://choosealicense.com/licenses/isc/) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/kaspanet/kaspad/dagconfig) +[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/coinexcom/kaspad/dagconfig) Package dagconfig defines DAG configuration parameters for the standard Kaspad networks and provides the ability for callers to define their own custom @@ -18,8 +18,8 @@ import ( "fmt" "log" - "github.com/kaspanet/kaspad/util" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/util" + "github.com/coinexcom/kaspad/domain/dagconfig" ) var testnet = flag.Bool("testnet", false, "operate on the testnet Kaspa network") diff --git a/domain/dagconfig/consensus_defaults.go b/domain/dagconfig/consensus_defaults.go index 8bc914431f..62e778deee 100644 --- a/domain/dagconfig/consensus_defaults.go +++ b/domain/dagconfig/consensus_defaults.go @@ -1,7 +1,7 @@ package dagconfig import ( - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" "time" ) diff --git a/domain/dagconfig/doc.go b/domain/dagconfig/doc.go index 1a47131a22..5ed3db74e9 100644 --- a/domain/dagconfig/doc.go +++ b/domain/dagconfig/doc.go @@ -27,8 +27,8 @@ variable (either directly, or hidden in a library call). "fmt" "log" - "github.com/kaspanet/kaspad/util" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/util" + "github.com/coinexcom/kaspad/domain/dagconfig" ) var testnet = flag.Bool("testnet", false, "operate on the testnet Kaspa network") diff --git a/domain/dagconfig/genesis.go b/domain/dagconfig/genesis.go index 40b4cee494..26dc6a38fa 100644 --- a/domain/dagconfig/genesis.go +++ b/domain/dagconfig/genesis.go @@ -5,11 +5,10 @@ package dagconfig import ( - "github.com/kaspanet/go-muhash" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/blockheader" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/blockheader" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" "math/big" ) @@ -125,7 +124,7 @@ var devnetGenesisBlock = externalapi.DomainBlock{ []externalapi.BlockLevelParents{}, devnetGenesisMerkleRoot, &externalapi.DomainHash{}, - externalapi.NewDomainHashFromByteArray(muhash.EmptyMuHashHash.AsArray()), + externalapi.NewDomainHashFromByteArray(EmptyMuHashHash.AsArray()), 0x11e9db49828, 525264379, 0x48e5e, @@ -179,7 +178,7 @@ var simnetGenesisBlock = externalapi.DomainBlock{ []externalapi.BlockLevelParents{}, simnetGenesisMerkleRoot, &externalapi.DomainHash{}, - externalapi.NewDomainHashFromByteArray(muhash.EmptyMuHashHash.AsArray()), + externalapi.NewDomainHashFromByteArray(EmptyMuHashHash.AsArray()), 0x17c5f62fbb6, 0x207fffff, 0x2, @@ -233,7 +232,7 @@ var testnetGenesisBlock = externalapi.DomainBlock{ []externalapi.BlockLevelParents{}, testnetGenesisMerkleRoot, &externalapi.DomainHash{}, - externalapi.NewDomainHashFromByteArray(muhash.EmptyMuHashHash.AsArray()), + externalapi.NewDomainHashFromByteArray(EmptyMuHashHash.AsArray()), 0x17c5f62fbb6, 0x1e7fffff, 0x14582, diff --git a/domain/dagconfig/genesis_test.go b/domain/dagconfig/genesis_test.go index 5807735468..e0661ba9b7 100644 --- a/domain/dagconfig/genesis_test.go +++ b/domain/dagconfig/genesis_test.go @@ -7,7 +7,7 @@ package dagconfig import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" ) // TestGenesisBlock tests the genesis block of the main network for validity by diff --git a/domain/dagconfig/params.go b/domain/dagconfig/params.go index 7c735924f4..2984ec3184 100644 --- a/domain/dagconfig/params.go +++ b/domain/dagconfig/params.go @@ -8,16 +8,25 @@ import ( "math/big" "time" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/util/network" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/util/network" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/util" ) +const HashSize = 32 + +// Hash is a type encapsulating the result of hashing some unknown sized data. +// it typically represents Blake2b. +type Hash [HashSize]byte + +// EmptyMuHashHash is the hash of `NewMuHash().Finalize()` +var EmptyMuHashHash = Hash{0x54, 0x4e, 0xb3, 0x14, 0x2c, 0x0, 0xf, 0xa, 0xd2, 0xc7, 0x6a, 0xc4, 0x1f, 0x42, 0x22, 0xab, 0xba, 0xba, 0xbe, 0xd8, 0x30, 0xee, 0xaf, 0xee, 0x4b, 0x6d, 0xc5, 0x6b, 0x52, 0xd5, 0xca, 0xc0} + // These variables are the DAG proof-of-work limit parameters for each default // network. var ( @@ -175,7 +184,7 @@ type Params struct { // CoinbasePayloadScriptPublicKeyMaxLength is the maximum allowed script public key in the coinbase's payload CoinbasePayloadScriptPublicKeyMaxLength uint8 - // PruningProofM is the 'm' constant in the pruning proof. For more details see: https://github.com/kaspanet/research/issues/3 + // PruningProofM is the 'm' constant in the pruning proof. For more details see: https://github.com/coinexcom/research/issues/3 PruningProofM uint64 // DeflationaryPhaseDaaScore is the DAA score after which the monetary policy switches @@ -526,3 +535,8 @@ func init() { mustRegister(&SimnetParams) mustRegister(&DevnetParams) } + +// AsArray is a helper function to returns a pointer to the underlying byte array. +func (hash *Hash) AsArray() *[32]byte { + return (*[32]byte)(hash) +} diff --git a/domain/dagconfig/params_test.go b/domain/dagconfig/params_test.go index d3f8505800..96ec0db8a4 100644 --- a/domain/dagconfig/params_test.go +++ b/domain/dagconfig/params_test.go @@ -7,7 +7,7 @@ package dagconfig import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func TestNewHashFromStr(t *testing.T) { diff --git a/domain/dagconfig/register_test.go b/domain/dagconfig/register_test.go index 799b4576e2..6cb5856bca 100644 --- a/domain/dagconfig/register_test.go +++ b/domain/dagconfig/register_test.go @@ -2,8 +2,6 @@ package dagconfig_test import ( "testing" - - . "github.com/kaspanet/kaspad/domain/dagconfig" ) // Define some of the required parameters for a user-registered diff --git a/domain/domain.go b/domain/domain.go index 3e02530d40..700e1ba494 100644 --- a/domain/domain.go +++ b/domain/domain.go @@ -5,15 +5,15 @@ import ( "sync/atomic" "unsafe" - "github.com/kaspanet/kaspad/domain/consensusreference" - - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/miningmanager" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - "github.com/kaspanet/kaspad/domain/prefixmanager" - "github.com/kaspanet/kaspad/domain/prefixmanager/prefix" - infrastructuredatabase "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/consensusreference" + + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/miningmanager" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + "github.com/coinexcom/kaspad/domain/prefixmanager" + "github.com/coinexcom/kaspad/domain/prefixmanager/prefix" + infrastructuredatabase "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" ) diff --git a/domain/domain_test.go b/domain/domain_test.go index ad7489349c..5c82b7e157 100644 --- a/domain/domain_test.go +++ b/domain/domain_test.go @@ -4,14 +4,14 @@ import ( "fmt" "math/big" - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + "github.com/coinexcom/kaspad/infrastructure/db/database/ldb" "io/ioutil" "os" "strings" diff --git a/domain/log.go b/domain/log.go index 359473161e..9a712d0386 100644 --- a/domain/log.go +++ b/domain/log.go @@ -1,7 +1,7 @@ package domain import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("DOMN") diff --git a/domain/migrate.go b/domain/migrate.go index ffb43acb46..95a942e5cf 100644 --- a/domain/migrate.go +++ b/domain/migrate.go @@ -1,7 +1,7 @@ package domain import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" "math" ) diff --git a/domain/miningmanager/blocktemplatebuilder/blocktemplatebuilder.go b/domain/miningmanager/blocktemplatebuilder/blocktemplatebuilder.go index 76e61101f5..e490bce6c1 100644 --- a/domain/miningmanager/blocktemplatebuilder/blocktemplatebuilder.go +++ b/domain/miningmanager/blocktemplatebuilder/blocktemplatebuilder.go @@ -1,20 +1,20 @@ package blocktemplatebuilder import ( - "github.com/kaspanet/kaspad/domain/consensus/processes/coinbasemanager" - "github.com/kaspanet/kaspad/domain/consensus/utils/merkle" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensusreference" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/domain/consensus/processes/coinbasemanager" + "github.com/coinexcom/kaspad/domain/consensus/utils/merkle" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensusreference" + "github.com/coinexcom/kaspad/util/mstime" "math" "sort" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/util/difficulty" - consensusexternalapi "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - miningmanagerapi "github.com/kaspanet/kaspad/domain/miningmanager/model" + consensusexternalapi "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + miningmanagerapi "github.com/coinexcom/kaspad/domain/miningmanager/model" "github.com/pkg/errors" ) @@ -151,7 +151,7 @@ func (btb *blockTemplateBuilder) BuildBlockTemplate( if err != nil { // mempool.RemoveInvalidTransactions might return errors in situations that are perfectly fine in this context. // TODO: Once the mempool invariants are clear, this should be converted back `return nil, err`: - // https://github.com/kaspanet/kaspad/issues/1553 + // https://github.com/coinexcom/kaspad/issues/1553 log.Criticalf("Error from mempool.RemoveInvalidTransactions: %+v", err) } // We can call this recursively without worry because this should almost never happen diff --git a/domain/miningmanager/blocktemplatebuilder/log.go b/domain/miningmanager/blocktemplatebuilder/log.go index dc873211dd..cb330a1251 100644 --- a/domain/miningmanager/blocktemplatebuilder/log.go +++ b/domain/miningmanager/blocktemplatebuilder/log.go @@ -5,7 +5,7 @@ package blocktemplatebuilder import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("BLTB") diff --git a/domain/miningmanager/blocktemplatebuilder/txselection.go b/domain/miningmanager/blocktemplatebuilder/txselection.go index 6ebfec6897..fcd28010e4 100644 --- a/domain/miningmanager/blocktemplatebuilder/txselection.go +++ b/domain/miningmanager/blocktemplatebuilder/txselection.go @@ -5,9 +5,9 @@ import ( "math/rand" "sort" - consensusexternalapi "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" + consensusexternalapi "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" ) const ( diff --git a/domain/miningmanager/factory.go b/domain/miningmanager/factory.go index 16b50fb29a..d0f6d7e845 100644 --- a/domain/miningmanager/factory.go +++ b/domain/miningmanager/factory.go @@ -1,10 +1,10 @@ package miningmanager import ( - "github.com/kaspanet/kaspad/domain/consensusreference" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/domain/miningmanager/blocktemplatebuilder" - mempoolpkg "github.com/kaspanet/kaspad/domain/miningmanager/mempool" + "github.com/coinexcom/kaspad/domain/consensusreference" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/miningmanager/blocktemplatebuilder" + mempoolpkg "github.com/coinexcom/kaspad/domain/miningmanager/mempool" "sync" "time" ) diff --git a/domain/miningmanager/mempool/check_transaction_standard.go b/domain/miningmanager/mempool/check_transaction_standard.go index 9a66e2b677..708b0c2647 100644 --- a/domain/miningmanager/mempool/check_transaction_standard.go +++ b/domain/miningmanager/mempool/check_transaction_standard.go @@ -3,13 +3,13 @@ package mempool import ( "fmt" - "github.com/kaspanet/kaspad/util/txmass" + "github.com/coinexcom/kaspad/util/txmass" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" ) const ( diff --git a/domain/miningmanager/mempool/check_transaction_standard_test.go b/domain/miningmanager/mempool/check_transaction_standard_test.go index 1482c2b8c4..4ed8026c93 100644 --- a/domain/miningmanager/mempool/check_transaction_standard_test.go +++ b/domain/miningmanager/mempool/check_transaction_standard_test.go @@ -9,17 +9,17 @@ import ( "math" "testing" - "github.com/kaspanet/kaspad/domain/consensusreference" + "github.com/coinexcom/kaspad/domain/consensusreference" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" ) diff --git a/domain/miningmanager/mempool/config.go b/domain/miningmanager/mempool/config.go index dafa127165..62ebf52674 100644 --- a/domain/miningmanager/mempool/config.go +++ b/domain/miningmanager/mempool/config.go @@ -3,11 +3,11 @@ package mempool import ( "time" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/util" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/dagconfig" ) const ( diff --git a/domain/miningmanager/mempool/fill_inputs_and_get_missing_parents.go b/domain/miningmanager/mempool/fill_inputs_and_get_missing_parents.go index ad9cfc6075..5f9b53da56 100644 --- a/domain/miningmanager/mempool/fill_inputs_and_get_missing_parents.go +++ b/domain/miningmanager/mempool/fill_inputs_and_get_missing_parents.go @@ -1,11 +1,11 @@ package mempool import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool/model" "github.com/pkg/errors" ) diff --git a/domain/miningmanager/mempool/handle_new_block_transactions.go b/domain/miningmanager/mempool/handle_new_block_transactions.go index 344043138e..a8410e4bf8 100644 --- a/domain/miningmanager/mempool/handle_new_block_transactions.go +++ b/domain/miningmanager/mempool/handle_new_block_transactions.go @@ -1,9 +1,9 @@ package mempool import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" ) func (mp *mempool) handleNewBlockTransactions(blockTransactions []*externalapi.DomainTransaction) ( diff --git a/domain/miningmanager/mempool/log.go b/domain/miningmanager/mempool/log.go index e7524eb3b7..5a2d6f3e7b 100644 --- a/domain/miningmanager/mempool/log.go +++ b/domain/miningmanager/mempool/log.go @@ -5,7 +5,7 @@ package mempool import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("TXMP") diff --git a/domain/miningmanager/mempool/mempool.go b/domain/miningmanager/mempool/mempool.go index 1261e84b1d..d6cbddff00 100644 --- a/domain/miningmanager/mempool/mempool.go +++ b/domain/miningmanager/mempool/mempool.go @@ -3,15 +3,15 @@ package mempool import ( "sync" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/domain/consensusreference" + "github.com/coinexcom/kaspad/domain/consensusreference" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - miningmanagermodel "github.com/kaspanet/kaspad/domain/miningmanager/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + miningmanagermodel "github.com/coinexcom/kaspad/domain/miningmanager/model" ) type mempool struct { diff --git a/domain/miningmanager/mempool/mempool_utxo_set.go b/domain/miningmanager/mempool/mempool_utxo_set.go index bbe5552585..c99b9d85dc 100644 --- a/domain/miningmanager/mempool/mempool_utxo_set.go +++ b/domain/miningmanager/mempool/mempool_utxo_set.go @@ -3,13 +3,13 @@ package mempool import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool/model" ) type mempoolUTXOSet struct { diff --git a/domain/miningmanager/mempool/model/map_types.go b/domain/miningmanager/mempool/model/map_types.go index ca364287b7..0591616aac 100644 --- a/domain/miningmanager/mempool/model/map_types.go +++ b/domain/miningmanager/mempool/model/map_types.go @@ -1,7 +1,7 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // IDToTransactionMap maps transactionID to a MempoolTransaction diff --git a/domain/miningmanager/mempool/model/mempool_transaction.go b/domain/miningmanager/mempool/model/mempool_transaction.go index 017e13c1fd..29092b45d9 100644 --- a/domain/miningmanager/mempool/model/mempool_transaction.go +++ b/domain/miningmanager/mempool/model/mempool_transaction.go @@ -1,8 +1,8 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" ) // MempoolTransaction represents a transaction inside the main TransactionPool diff --git a/domain/miningmanager/mempool/model/orphan_transaction.go b/domain/miningmanager/mempool/model/orphan_transaction.go index c3af19c18a..e3b733a64b 100644 --- a/domain/miningmanager/mempool/model/orphan_transaction.go +++ b/domain/miningmanager/mempool/model/orphan_transaction.go @@ -1,8 +1,8 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" ) // OrphanTransaction represents a transaction in the OrphanPool diff --git a/domain/miningmanager/mempool/model/transaction.go b/domain/miningmanager/mempool/model/transaction.go index 8333251fa6..8054a0c861 100644 --- a/domain/miningmanager/mempool/model/transaction.go +++ b/domain/miningmanager/mempool/model/transaction.go @@ -1,6 +1,6 @@ package model -import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" +import "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" // Transaction represents a generic transaction either in the mempool's main TransactionPool or OrphanPool type Transaction interface { diff --git a/domain/miningmanager/mempool/orphan_pool.go b/domain/miningmanager/mempool/orphan_pool.go index 59767d5014..bf1c67781b 100644 --- a/domain/miningmanager/mempool/orphan_pool.go +++ b/domain/miningmanager/mempool/orphan_pool.go @@ -3,16 +3,16 @@ package mempool import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool/model" "github.com/pkg/errors" ) diff --git a/domain/miningmanager/mempool/remove_transaction.go b/domain/miningmanager/mempool/remove_transaction.go index a21c4a1628..52784267aa 100644 --- a/domain/miningmanager/mempool/remove_transaction.go +++ b/domain/miningmanager/mempool/remove_transaction.go @@ -1,8 +1,8 @@ package mempool import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool/model" ) func (mp *mempool) removeTransaction(transactionID *externalapi.DomainTransactionID, removeRedeemers bool) error { diff --git a/domain/miningmanager/mempool/revalidate_high_priority_transactions.go b/domain/miningmanager/mempool/revalidate_high_priority_transactions.go index bba68388be..ccdac61585 100644 --- a/domain/miningmanager/mempool/revalidate_high_priority_transactions.go +++ b/domain/miningmanager/mempool/revalidate_high_priority_transactions.go @@ -1,9 +1,9 @@ package mempool import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool/model" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool/model" + "github.com/coinexcom/kaspad/infrastructure/logger" ) func (mp *mempool) revalidateHighPriorityTransactions() ([]*externalapi.DomainTransaction, error) { diff --git a/domain/miningmanager/mempool/transactions_pool.go b/domain/miningmanager/mempool/transactions_pool.go index 63908ee770..82e16e73de 100644 --- a/domain/miningmanager/mempool/transactions_pool.go +++ b/domain/miningmanager/mempool/transactions_pool.go @@ -5,9 +5,9 @@ import ( "github.com/pkg/errors" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool/model" ) type transactionsPool struct { diff --git a/domain/miningmanager/mempool/validate_and_insert_transaction.go b/domain/miningmanager/mempool/validate_and_insert_transaction.go index ff8c752d32..3fc925b41e 100644 --- a/domain/miningmanager/mempool/validate_and_insert_transaction.go +++ b/domain/miningmanager/mempool/validate_and_insert_transaction.go @@ -2,10 +2,10 @@ package mempool import ( "fmt" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" ) func (mp *mempool) validateAndInsertTransaction(transaction *externalapi.DomainTransaction, isHighPriority bool, diff --git a/domain/miningmanager/mempool/validate_transaction.go b/domain/miningmanager/mempool/validate_transaction.go index 86695f051f..8295aa8f35 100644 --- a/domain/miningmanager/mempool/validate_transaction.go +++ b/domain/miningmanager/mempool/validate_transaction.go @@ -2,10 +2,10 @@ package mempool import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" ) func (mp *mempool) validateTransactionPreUTXOEntry(transaction *externalapi.DomainTransaction) error { diff --git a/domain/miningmanager/miningmanager.go b/domain/miningmanager/miningmanager.go index 10bf6d0dc1..8c551a5378 100644 --- a/domain/miningmanager/miningmanager.go +++ b/domain/miningmanager/miningmanager.go @@ -4,9 +4,9 @@ import ( "sync" "time" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensusreference" - miningmanagermodel "github.com/kaspanet/kaspad/domain/miningmanager/model" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensusreference" + miningmanagermodel "github.com/coinexcom/kaspad/domain/miningmanager/model" ) // MiningManager creates block templates for mining as well as maintaining diff --git a/domain/miningmanager/miningmanager_test.go b/domain/miningmanager/miningmanager_test.go index 56cd8be413..82d5b3bd64 100644 --- a/domain/miningmanager/miningmanager_test.go +++ b/domain/miningmanager/miningmanager_test.go @@ -1,28 +1,28 @@ package miningmanager_test import ( - "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet" - "github.com/kaspanet/kaspad/domain/consensusreference" - "github.com/kaspanet/kaspad/domain/miningmanager/model" - "github.com/kaspanet/kaspad/util" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/cmd/kaspawallet/libkaspawallet" + "github.com/coinexcom/kaspad/domain/consensusreference" + "github.com/coinexcom/kaspad/domain/miningmanager/model" + "github.com/coinexcom/kaspad/util" + "github.com/coinexcom/kaspad/version" "reflect" "strings" "testing" - "github.com/kaspanet/kaspad/domain/miningmanager/mempool" - - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/miningmanager" + "github.com/coinexcom/kaspad/domain/miningmanager/mempool" + + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/utils/txscript" + "github.com/coinexcom/kaspad/domain/consensus/utils/utxo" + "github.com/coinexcom/kaspad/domain/miningmanager" "github.com/pkg/errors" ) diff --git a/domain/miningmanager/model/interface_blocktemplatebuilder.go b/domain/miningmanager/model/interface_blocktemplatebuilder.go index dbc17eeb6f..fba5aaed58 100644 --- a/domain/miningmanager/model/interface_blocktemplatebuilder.go +++ b/domain/miningmanager/model/interface_blocktemplatebuilder.go @@ -1,7 +1,7 @@ package model import ( - consensusexternalapi "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + consensusexternalapi "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // BlockTemplateBuilder builds block templates for miners to consume diff --git a/domain/miningmanager/model/interface_mempool.go b/domain/miningmanager/model/interface_mempool.go index 777d23cde8..74d9420a49 100644 --- a/domain/miningmanager/model/interface_mempool.go +++ b/domain/miningmanager/model/interface_mempool.go @@ -1,8 +1,8 @@ package model import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/ruleerrors" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/ruleerrors" ) // Mempool maintains a set of known transactions that diff --git a/domain/prefixmanager/log.go b/domain/prefixmanager/log.go index 6a3abff43a..7e47f6ef85 100644 --- a/domain/prefixmanager/log.go +++ b/domain/prefixmanager/log.go @@ -1,8 +1,8 @@ package prefixmanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("PRFX") diff --git a/domain/prefixmanager/prefix.go b/domain/prefixmanager/prefix.go index 3148d2d0ab..c357283d58 100644 --- a/domain/prefixmanager/prefix.go +++ b/domain/prefixmanager/prefix.go @@ -1,8 +1,8 @@ package prefixmanager import ( - "github.com/kaspanet/kaspad/domain/prefixmanager/prefix" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/domain/prefixmanager/prefix" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) var activePrefixKey = database.MakeBucket(nil).Key([]byte("active-prefix")) diff --git a/domain/utxoindex/log.go b/domain/utxoindex/log.go index f65790f4c9..f92f47b9d9 100644 --- a/domain/utxoindex/log.go +++ b/domain/utxoindex/log.go @@ -5,7 +5,7 @@ package utxoindex import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("UTIN") diff --git a/domain/utxoindex/model.go b/domain/utxoindex/model.go index a6ffefc1d7..0feea45b2c 100644 --- a/domain/utxoindex/model.go +++ b/domain/utxoindex/model.go @@ -1,7 +1,7 @@ package utxoindex import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) // ScriptPublicKeyString is a script public key represented as a string diff --git a/domain/utxoindex/serialization.go b/domain/utxoindex/serialization.go index cffc339ca9..215954b5e6 100644 --- a/domain/utxoindex/serialization.go +++ b/domain/utxoindex/serialization.go @@ -2,8 +2,8 @@ package utxoindex import ( "encoding/binary" - "github.com/kaspanet/kaspad/domain/consensus/database/serialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/database/serialization" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" "google.golang.org/protobuf/proto" "io" diff --git a/domain/utxoindex/serialization_test.go b/domain/utxoindex/serialization_test.go index 6834e86573..782211c39c 100644 --- a/domain/utxoindex/serialization_test.go +++ b/domain/utxoindex/serialization_test.go @@ -2,7 +2,7 @@ package utxoindex import ( "encoding/binary" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" "io" "math/rand" diff --git a/domain/utxoindex/store.go b/domain/utxoindex/store.go index d42f4ac524..00bed3aaec 100644 --- a/domain/utxoindex/store.go +++ b/domain/utxoindex/store.go @@ -3,10 +3,10 @@ package utxoindex import ( "encoding/binary" - "github.com/kaspanet/kaspad/domain/consensus/database/binaryserialization" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/database/binaryserialization" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) diff --git a/domain/utxoindex/utxoindex.go b/domain/utxoindex/utxoindex.go index 670fb25b01..71bb9a410d 100644 --- a/domain/utxoindex/utxoindex.go +++ b/domain/utxoindex/utxoindex.go @@ -1,10 +1,10 @@ package utxoindex import ( - "github.com/kaspanet/kaspad/domain" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/logger" "sync" ) diff --git a/go.mod b/go.mod index 6015e924dc..93a84192c9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/kaspanet/kaspad +module github.com/coinexcom/kaspad go 1.18 @@ -11,13 +11,10 @@ require ( github.com/golang/protobuf v1.5.2 github.com/jessevdk/go-flags v1.4.0 github.com/jrick/logrotate v1.0.0 - github.com/kaspanet/go-muhash v0.0.4 - github.com/kaspanet/go-secp256k1 v0.0.7 github.com/pkg/errors v0.9.1 github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d github.com/tyler-smith/go-bip39 v1.1.0 golang.org/x/crypto v0.1.0 - golang.org/x/exp v0.0.0-20220414153411-bcd21879b8fd golang.org/x/term v0.5.0 google.golang.org/grpc v1.38.0 google.golang.org/protobuf v1.28.1 diff --git a/go.sum b/go.sum index 95827ee43d..40e1bea381 100644 --- a/go.sum +++ b/go.sum @@ -20,7 +20,6 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= @@ -59,10 +58,6 @@ github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGAR github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/kaspanet/go-muhash v0.0.4 h1:CQrm1RTJpQy+h4ZFjj9qq42K5fmA5QTGifzb47p4qWk= -github.com/kaspanet/go-muhash v0.0.4/go.mod h1:10bPW5mO1vNHPSejaAh9ZTtLZE16jzEvgaP7f3Q5s/8= -github.com/kaspanet/go-secp256k1 v0.0.7 h1:WHnrwopKB6ZeHSbdAwwxNhTqflm56XT1mM6LF4/OvOs= -github.com/kaspanet/go-secp256k1 v0.0.7/go.mod h1:cFbxhxKkxqHX5eIwUGKARkph19PehipDPJejWB+H0jM= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= @@ -85,12 +80,9 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210317152858-513c2a44f670/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20220414153411-bcd21879b8fd h1:zVFyTKZN/Q7mNRWSs1GOYnHM9NiFSJ54YVRsD0rNWT4= -golang.org/x/exp v0.0.0-20220414153411-bcd21879b8fd/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -104,7 +96,6 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -118,7 +109,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= diff --git a/infrastructure/config/config.go b/infrastructure/config/config.go index 2f5008547c..1197290441 100644 --- a/infrastructure/config/config.go +++ b/infrastructure/config/config.go @@ -17,13 +17,13 @@ import ( "time" "github.com/btcsuite/go-socks/socks" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util" + "github.com/coinexcom/kaspad/util/network" + "github.com/coinexcom/kaspad/version" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util" - "github.com/kaspanet/kaspad/util/network" - "github.com/kaspanet/kaspad/version" "github.com/pkg/errors" ) diff --git a/infrastructure/config/config_test.go b/infrastructure/config/config_test.go index fd205b351b..ca25351641 100644 --- a/infrastructure/config/config_test.go +++ b/infrastructure/config/config_test.go @@ -7,9 +7,9 @@ import ( "runtime" "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func TestCreateDefaultConfigFile(t *testing.T) { diff --git a/infrastructure/config/log.go b/infrastructure/config/log.go index 1b3fea00fb..62b4688884 100644 --- a/infrastructure/config/log.go +++ b/infrastructure/config/log.go @@ -5,7 +5,7 @@ package config import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("CNFG") diff --git a/infrastructure/config/network.go b/infrastructure/config/network.go index 890c54667e..a5e7a7ecbe 100644 --- a/infrastructure/config/network.go +++ b/infrastructure/config/network.go @@ -3,14 +3,14 @@ package config import ( "encoding/json" "fmt" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "math/big" "os" "time" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/util/difficulty" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util/difficulty" "github.com/pkg/errors" ) diff --git a/infrastructure/db/database/README.md b/infrastructure/db/database/README.md index 4244f5c8f7..5a2171f66c 100644 --- a/infrastructure/db/database/README.md +++ b/infrastructure/db/database/README.md @@ -2,7 +2,7 @@ database ======== [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](https://choosealicense.com/licenses/isc/) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/kaspanet/kaspad/database) +[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/coinexcom/kaspad/database) Package database provides a database for kaspad. diff --git a/infrastructure/db/database/common_test.go b/infrastructure/db/database/common_test.go index 82c9e538d1..150f003c13 100644 --- a/infrastructure/db/database/common_test.go +++ b/infrastructure/db/database/common_test.go @@ -5,8 +5,8 @@ import ( "io/ioutil" "testing" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database/ldb" ) type databasePrepareFunc func(t *testing.T, testName string) (db database.Database, name string, teardownFunc func()) diff --git a/infrastructure/db/database/cursor_test.go b/infrastructure/db/database/cursor_test.go index 65e908f76c..3e61aad4eb 100644 --- a/infrastructure/db/database/cursor_test.go +++ b/infrastructure/db/database/cursor_test.go @@ -8,7 +8,7 @@ package database_test import ( "bytes" "fmt" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" "reflect" "strings" "testing" diff --git a/infrastructure/db/database/database_test.go b/infrastructure/db/database/database_test.go index 2f7f3d9904..84d591abcd 100644 --- a/infrastructure/db/database/database_test.go +++ b/infrastructure/db/database/database_test.go @@ -9,7 +9,7 @@ import ( "bytes" "testing" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func TestDatabasePut(t *testing.T) { diff --git a/infrastructure/db/database/ldb/cursor.go b/infrastructure/db/database/ldb/cursor.go index 1cd3747d21..dc4ca3460e 100644 --- a/infrastructure/db/database/ldb/cursor.go +++ b/infrastructure/db/database/ldb/cursor.go @@ -3,7 +3,7 @@ package ldb import ( "bytes" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" "github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/util" diff --git a/infrastructure/db/database/ldb/cursor_test.go b/infrastructure/db/database/ldb/cursor_test.go index ae410b067e..f262954f28 100644 --- a/infrastructure/db/database/ldb/cursor_test.go +++ b/infrastructure/db/database/ldb/cursor_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func validateCurrentCursorKeyAndValue(t *testing.T, testName string, cursor database.Cursor, diff --git a/infrastructure/db/database/ldb/leveldb.go b/infrastructure/db/database/ldb/leveldb.go index 239e49c444..fc61be2d5f 100644 --- a/infrastructure/db/database/ldb/leveldb.go +++ b/infrastructure/db/database/ldb/leveldb.go @@ -1,7 +1,7 @@ package ldb import ( - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" "github.com/syndtr/goleveldb/leveldb" ldbErrors "github.com/syndtr/goleveldb/leveldb/errors" diff --git a/infrastructure/db/database/ldb/leveldb_test.go b/infrastructure/db/database/ldb/leveldb_test.go index 7920e09098..15aad10883 100644 --- a/infrastructure/db/database/ldb/leveldb_test.go +++ b/infrastructure/db/database/ldb/leveldb_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func prepareDatabaseForTest(t *testing.T, testName string) (ldb *LevelDB, teardownFunc func()) { diff --git a/infrastructure/db/database/ldb/log.go b/infrastructure/db/database/ldb/log.go index 670e9bb257..47a0c6de08 100644 --- a/infrastructure/db/database/ldb/log.go +++ b/infrastructure/db/database/ldb/log.go @@ -1,7 +1,7 @@ package ldb import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("KSDB") diff --git a/infrastructure/db/database/ldb/transaction.go b/infrastructure/db/database/ldb/transaction.go index 10cfa20359..56be19d706 100644 --- a/infrastructure/db/database/ldb/transaction.go +++ b/infrastructure/db/database/ldb/transaction.go @@ -1,7 +1,7 @@ package ldb import ( - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" "github.com/pkg/errors" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/infrastructure/db/database/ldb/transaction_test.go b/infrastructure/db/database/ldb/transaction_test.go index bf2c9a7a14..45f2d2324d 100644 --- a/infrastructure/db/database/ldb/transaction_test.go +++ b/infrastructure/db/database/ldb/transaction_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func TestTransactionCloseErrors(t *testing.T) { diff --git a/infrastructure/db/database/transaction_test.go b/infrastructure/db/database/transaction_test.go index e8a44170c7..cdc98c24e3 100644 --- a/infrastructure/db/database/transaction_test.go +++ b/infrastructure/db/database/transaction_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" ) func TestTransactionPut(t *testing.T) { diff --git a/infrastructure/logger/logs.go b/infrastructure/logger/logs.go index 497e6d47cd..c381bb3663 100644 --- a/infrastructure/logger/logs.go +++ b/infrastructure/logger/logs.go @@ -35,7 +35,7 @@ package logger import ( "bytes" "fmt" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/util/mstime" "os" "runtime" "sync/atomic" diff --git a/infrastructure/network/addressmanager/addressmanager.go b/infrastructure/network/addressmanager/addressmanager.go index fa0f0964d0..e0eb4300d6 100644 --- a/infrastructure/network/addressmanager/addressmanager.go +++ b/infrastructure/network/addressmanager/addressmanager.go @@ -5,13 +5,13 @@ package addressmanager import ( - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/util/mstime" "net" "sync" "time" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/addressmanager/addressmanager_test.go b/infrastructure/network/addressmanager/addressmanager_test.go index bc4dd6c145..32d887edc3 100644 --- a/infrastructure/network/addressmanager/addressmanager_test.go +++ b/infrastructure/network/addressmanager/addressmanager_test.go @@ -9,10 +9,10 @@ import ( "reflect" "testing" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/db/database/ldb" + "github.com/coinexcom/kaspad/util/mstime" ) func newAddressManagerForTest(t *testing.T, testName string) (addressManager *AddressManager, teardown func()) { diff --git a/infrastructure/network/addressmanager/addressrandomize.go b/infrastructure/network/addressmanager/addressrandomize.go index 2f5b62c1d1..3727489fee 100644 --- a/infrastructure/network/addressmanager/addressrandomize.go +++ b/infrastructure/network/addressmanager/addressrandomize.go @@ -5,7 +5,7 @@ import ( "math/rand" "time" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" ) // AddressRandomize implement addressRandomizer interface diff --git a/infrastructure/network/addressmanager/config.go b/infrastructure/network/addressmanager/config.go index 3e707044ca..86fdec8cd1 100644 --- a/infrastructure/network/addressmanager/config.go +++ b/infrastructure/network/addressmanager/config.go @@ -3,7 +3,7 @@ package addressmanager import ( "net" - "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/config" ) // Config is a descriptor which specifies the AddressManager instance configuration. diff --git a/infrastructure/network/addressmanager/localaddressmanager.go b/infrastructure/network/addressmanager/localaddressmanager.go index 4a6820f2c0..335e2b1e35 100644 --- a/infrastructure/network/addressmanager/localaddressmanager.go +++ b/infrastructure/network/addressmanager/localaddressmanager.go @@ -7,7 +7,7 @@ import ( "strings" "sync" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/addressmanager/log.go b/infrastructure/network/addressmanager/log.go index f89be0144f..35aba3d812 100644 --- a/infrastructure/network/addressmanager/log.go +++ b/infrastructure/network/addressmanager/log.go @@ -5,7 +5,7 @@ package addressmanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("ADXR") diff --git a/infrastructure/network/addressmanager/network.go b/infrastructure/network/addressmanager/network.go index acdd94feef..2f6c339693 100644 --- a/infrastructure/network/addressmanager/network.go +++ b/infrastructure/network/addressmanager/network.go @@ -7,7 +7,7 @@ package addressmanager import ( "net" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" ) var ( diff --git a/infrastructure/network/addressmanager/network_test.go b/infrastructure/network/addressmanager/network_test.go index 526289c17c..6f94a581ba 100644 --- a/infrastructure/network/addressmanager/network_test.go +++ b/infrastructure/network/addressmanager/network_test.go @@ -8,7 +8,7 @@ import ( "net" "testing" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" ) // TestIPTypes ensures the various functions which determine the type of an IP diff --git a/infrastructure/network/addressmanager/store.go b/infrastructure/network/addressmanager/store.go index b95f8fa2fe..0d8782b142 100644 --- a/infrastructure/network/addressmanager/store.go +++ b/infrastructure/network/addressmanager/store.go @@ -2,9 +2,9 @@ package addressmanager import ( "encoding/binary" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/util/mstime" "github.com/pkg/errors" "net" ) diff --git a/infrastructure/network/addressmanager/store_test.go b/infrastructure/network/addressmanager/store_test.go index c071ba39b9..1406a117ab 100644 --- a/infrastructure/network/addressmanager/store_test.go +++ b/infrastructure/network/addressmanager/store_test.go @@ -1,8 +1,8 @@ package addressmanager import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/util/mstime" "net" "reflect" "testing" diff --git a/infrastructure/network/addressmanager/test_utils.go b/infrastructure/network/addressmanager/test_utils.go index 736cb7aef1..4a92eae3b9 100644 --- a/infrastructure/network/addressmanager/test_utils.go +++ b/infrastructure/network/addressmanager/test_utils.go @@ -4,8 +4,8 @@ import ( "net" "strconv" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/infrastructure/network/connmanager/connection_set.go b/infrastructure/network/connmanager/connection_set.go index 4ecd73a7ce..acda585d4c 100644 --- a/infrastructure/network/connmanager/connection_set.go +++ b/infrastructure/network/connmanager/connection_set.go @@ -1,7 +1,7 @@ package connmanager import ( - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" ) type connectionSet map[string]*netadapter.NetConnection diff --git a/infrastructure/network/connmanager/connmanager.go b/infrastructure/network/connmanager/connmanager.go index caafb936b1..234c64e447 100644 --- a/infrastructure/network/connmanager/connmanager.go +++ b/infrastructure/network/connmanager/connmanager.go @@ -6,15 +6,15 @@ import ( "sync/atomic" "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/dnsseed" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/dnsseed" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" - "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/config" ) // connectionRequest represents a user request (either through CLI or RPC) to connect to a certain node diff --git a/infrastructure/network/connmanager/log.go b/infrastructure/network/connmanager/log.go index 00baa2f4f6..2691eabd7f 100644 --- a/infrastructure/network/connmanager/log.go +++ b/infrastructure/network/connmanager/log.go @@ -1,8 +1,8 @@ package connmanager import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("CMGR") diff --git a/infrastructure/network/connmanager/outgoing_connections.go b/infrastructure/network/connmanager/outgoing_connections.go index bb47555940..e80507e9b2 100644 --- a/infrastructure/network/connmanager/outgoing_connections.go +++ b/infrastructure/network/connmanager/outgoing_connections.go @@ -1,6 +1,6 @@ package connmanager -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // checkOutgoingConnections goes over all activeOutgoing and makes sure they are still active. // Then it opens connections so that we have targetOutgoing active connections diff --git a/infrastructure/network/dnsseed/log.go b/infrastructure/network/dnsseed/log.go index 91c5c4ece7..fe4f0b5ddc 100644 --- a/infrastructure/network/dnsseed/log.go +++ b/infrastructure/network/dnsseed/log.go @@ -5,8 +5,8 @@ package dnsseed import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("CMGR") diff --git a/infrastructure/network/dnsseed/pb/peer_service.proto b/infrastructure/network/dnsseed/pb/peer_service.proto index 9f5df2e182..a0334271ca 100644 --- a/infrastructure/network/dnsseed/pb/peer_service.proto +++ b/infrastructure/network/dnsseed/pb/peer_service.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/kaspanet/kaspad/pb"; +option go_package = "github.com/coinexcom/kaspad/pb"; service PeerService { rpc GetPeersList(GetPeersListRequest) returns (GetPeersListResponse) {} diff --git a/infrastructure/network/dnsseed/seed.go b/infrastructure/network/dnsseed/seed.go index 4e6cbc5a76..8842703e49 100644 --- a/infrastructure/network/dnsseed/seed.go +++ b/infrastructure/network/dnsseed/seed.go @@ -12,15 +12,15 @@ import ( "strconv" "time" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/app/appmessage" - pb2 "github.com/kaspanet/kaspad/infrastructure/network/dnsseed/pb" + "github.com/coinexcom/kaspad/app/appmessage" + pb2 "github.com/coinexcom/kaspad/infrastructure/network/dnsseed/pb" "google.golang.org/grpc" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/util/mstime" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/dagconfig" ) const ( diff --git a/infrastructure/network/netadapter/log.go b/infrastructure/network/netadapter/log.go index 8b72b6a9af..39e1066689 100644 --- a/infrastructure/network/netadapter/log.go +++ b/infrastructure/network/netadapter/log.go @@ -1,7 +1,7 @@ package netadapter import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("NTAR") diff --git a/infrastructure/network/netadapter/netadapter.go b/infrastructure/network/netadapter/netadapter.go index 0f50c8deb2..2984c67ee7 100644 --- a/infrastructure/network/netadapter/netadapter.go +++ b/infrastructure/network/netadapter/netadapter.go @@ -4,12 +4,12 @@ import ( "sync" "sync/atomic" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/id" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/id" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/netadapter_test.go b/infrastructure/network/netadapter/netadapter_test.go index 8d7ef866ac..b6aa2fb0f0 100644 --- a/infrastructure/network/netadapter/netadapter_test.go +++ b/infrastructure/network/netadapter/netadapter_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // routerInitializerForTest returns new RouterInitializer which simply sets diff --git a/infrastructure/network/netadapter/netconnection.go b/infrastructure/network/netadapter/netconnection.go index 8f0c655040..653d07a454 100644 --- a/infrastructure/network/netadapter/netconnection.go +++ b/infrastructure/network/netadapter/netconnection.go @@ -2,13 +2,13 @@ package netadapter import ( "fmt" - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" "sync/atomic" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/id" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/id" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server" ) // NetConnection is a wrapper to a server connection for use by services external to NetAdapter diff --git a/infrastructure/network/netadapter/router/log.go b/infrastructure/network/netadapter/router/log.go index bcc7ecf3aa..ab49aa1aca 100644 --- a/infrastructure/network/netadapter/router/log.go +++ b/infrastructure/network/netadapter/router/log.go @@ -1,7 +1,7 @@ package router import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("ROUT") diff --git a/infrastructure/network/netadapter/router/route.go b/infrastructure/network/netadapter/router/route.go index 2f0c6daa3f..6410d6aa75 100644 --- a/infrastructure/network/netadapter/router/route.go +++ b/infrastructure/network/netadapter/router/route.go @@ -4,9 +4,9 @@ import ( "sync" "time" - "github.com/kaspanet/kaspad/app/protocol/protocolerrors" + "github.com/coinexcom/kaspad/app/protocol/protocolerrors" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/router/router.go b/infrastructure/network/netadapter/router/router.go index 2f7816fd82..0af6e00eef 100644 --- a/infrastructure/network/netadapter/router/router.go +++ b/infrastructure/network/netadapter/router/router.go @@ -4,7 +4,7 @@ import ( "fmt" "sync" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/connection_loops.go b/infrastructure/network/netadapter/server/grpcserver/connection_loops.go index 0f5c6359ea..74d10bf6a5 100644 --- a/infrastructure/network/netadapter/server/grpcserver/connection_loops.go +++ b/infrastructure/network/netadapter/server/grpcserver/connection_loops.go @@ -1,19 +1,19 @@ package grpcserver import ( + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/davecgh/go-spew/spew" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/logger" "io" "os" "strconv" "sync" "time" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" ) func (c *gRPCConnection) connectionLoops() error { diff --git a/infrastructure/network/netadapter/server/grpcserver/grpc_connection.go b/infrastructure/network/netadapter/server/grpcserver/grpc_connection.go index 42bec85fd4..6bfb6b2630 100644 --- a/infrastructure/network/netadapter/server/grpcserver/grpc_connection.go +++ b/infrastructure/network/netadapter/server/grpcserver/grpc_connection.go @@ -5,13 +5,13 @@ import ( "sync" "sync/atomic" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server" "google.golang.org/grpc" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/grpc_server.go b/infrastructure/network/netadapter/server/grpcserver/grpc_server.go index 8e84dfeda8..89221a36cc 100644 --- a/infrastructure/network/netadapter/server/grpcserver/grpc_server.go +++ b/infrastructure/network/netadapter/server/grpcserver/grpc_server.go @@ -3,8 +3,8 @@ package grpcserver import ( "context" "fmt" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server" + "github.com/coinexcom/kaspad/util/panics" "github.com/pkg/errors" "google.golang.org/grpc" "google.golang.org/grpc/peer" diff --git a/infrastructure/network/netadapter/server/grpcserver/log.go b/infrastructure/network/netadapter/server/grpcserver/log.go index d5fe6e2ec1..f7f3942b06 100644 --- a/infrastructure/network/netadapter/server/grpcserver/log.go +++ b/infrastructure/network/netadapter/server/grpcserver/log.go @@ -5,8 +5,8 @@ package grpcserver import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("TXMP") diff --git a/infrastructure/network/netadapter/server/grpcserver/p2pserver.go b/infrastructure/network/netadapter/server/grpcserver/p2pserver.go index 9b6b108b60..6e77c324d7 100644 --- a/infrastructure/network/netadapter/server/grpcserver/p2pserver.go +++ b/infrastructure/network/netadapter/server/grpcserver/p2pserver.go @@ -2,9 +2,9 @@ package grpcserver import ( "context" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/util/panics" "github.com/pkg/errors" "google.golang.org/grpc" "google.golang.org/grpc/encoding/gzip" diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/README.md b/infrastructure/network/netadapter/server/grpcserver/protowire/README.md index 2c1922f8c0..5ad43babeb 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/README.md +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/README.md @@ -11,5 +11,5 @@ Documentation ------------- To generate `rpc.md`: -1. `go install -u github.com/kaspanet/protoc-gen-doc/cmd/protoc-gen-doc` +1. `go install -u github.com/coinexcom/protoc-gen-doc/cmd/protoc-gen-doc` 2. In the protowire directory: `protoc --doc_out=. --doc_opt=markdown,rpc.md rpc.proto` diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/common.go b/infrastructure/network/netadapter/server/grpcserver/protowire/common.go index 4a82393152..33ebed45e4 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/common.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/common.go @@ -3,12 +3,12 @@ package protowire import ( "math" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionid" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/subnetworks" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionid" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/util/mstime" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/messages.proto b/infrastructure/network/netadapter/server/grpcserver/protowire/messages.proto index 50be89138c..4e310c482d 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/messages.proto +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/messages.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package protowire; -option go_package = "github.com/kaspanet/kaspad/protowire"; +option go_package = "github.com/coinexcom/kaspad/protowire"; import "p2p.proto"; import "rpc.proto"; diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p.proto b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p.proto index 51b0351db6..c0d916a950 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p.proto +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package protowire; -option go_package = "github.com/kaspanet/kaspad/protowire"; +option go_package = "github.com/coinexcom/kaspad/protowire"; message RequestAddressesMessage{ bool includeAllSubnetworks = 1; diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_addresses.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_addresses.go index f714b1a6ed..ee65e64fe0 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_addresses.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_addresses.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block.go index fba4af0d1f..72c2b1e9a2 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_headers.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_headers.go index e65379764d..b168a067d4 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_headers.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_headers.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_locator.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_locator.go index 66a1525597..93f1ebdafb 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_locator.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_locator.go @@ -1,8 +1,8 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_with_trusted_data.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_with_trusted_data.go index f690d8c4de..f1893dd7a9 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_with_trusted_data.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_with_trusted_data.go @@ -1,8 +1,8 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" "math/big" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_with_trusted_data_v4.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_with_trusted_data_v4.go index fe1594fd08..90a7e5f413 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_with_trusted_data_v4.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_block_with_trusted_data_v4.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_blocks_with_trusted_data.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_blocks_with_trusted_data.go index f1ec888f4a..4fb8014515 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_blocks_with_trusted_data.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_blocks_with_trusted_data.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_headers.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_headers.go index 26f38fa4b3..627726ff2d 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_headers.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_headers.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_pruning_point_utxo_set_chunks.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_pruning_point_utxo_set_chunks.go index faaee86432..9ad6c01a13 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_pruning_point_utxo_set_chunks.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_done_pruning_point_utxo_set_chunks.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_header.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_header.go index d2f84a3ac5..6e805390a2 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_header.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_header.go @@ -1,9 +1,9 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/util/mstime" "github.com/pkg/errors" "math" "math/big" diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block.go index 8c7c237337..e16014a8ac 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator.go index 0dd38f6928..85eb4845b7 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator_highest_hash.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator_highest_hash.go index fcbc4eda41..b8518039aa 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator_highest_hash.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator_highest_hash.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator_highest_hash_not_found.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator_highest_hash_not_found.go index 7228c71190..5d85bc2ad4 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator_highest_hash_not_found.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_block_locator_highest_hash_not_found.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_chain_block_locator.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_chain_block_locator.go index c45a2bce4d..80b2bcab0d 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_chain_block_locator.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ibd_chain_block_locator.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_inv_relay_block.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_inv_relay_block.go index 1f60fcc9ce..81b661cc1f 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_inv_relay_block.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_inv_relay_block.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_inv_transactions.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_inv_transactions.go index b14597d702..3fcc1458dc 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_inv_transactions.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_inv_transactions.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ping.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ping.go index bcd741c47f..20ee5038b6 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ping.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ping.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pong.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pong.go index dc99ec8388..32e10eb553 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pong.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pong.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_point_proof.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_point_proof.go index 567220d64b..610e3f545a 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_point_proof.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_point_proof.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_point_utxo_set_chunk.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_point_utxo_set_chunk.go index 057cd77f5c..016ff76181 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_point_utxo_set_chunk.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_point_utxo_set_chunk.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_points.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_points.go index f81adf5cd4..c938280b5c 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_points.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_pruning_points.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ready.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ready.go index 99a54377d4..b6bf63bc94 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ready.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_ready.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_reject.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_reject.go index 987ece3559..1c3499c670 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_reject.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_reject.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_addresses.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_addresses.go index a9e60b9abb..9cda31eced 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_addresses.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_addresses.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_anticone.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_anticone.go index 1e1c3bca08..fe05501232 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_anticone.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_anticone.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_block_locator.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_block_locator.go index 35e5a542d9..6db32bf81d 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_block_locator.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_block_locator.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_headers.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_headers.go index a12097913a..1a9ae3b76c 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_headers.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_headers.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_ibd_blocks.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_ibd_blocks.go index 1467a1b37d..4404b82159 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_ibd_blocks.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_ibd_blocks.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_ibd_chain_block_locator.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_ibd_chain_block_locator.go index f74154a10a..066b28266c 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_ibd_chain_block_locator.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_ibd_chain_block_locator.go @@ -1,8 +1,8 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_headers.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_headers.go index 05adfa4faa..3f44b93b06 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_headers.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_headers.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_pruning_point_and_its_anticone_blocks.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_pruning_point_and_its_anticone_blocks.go index 15d2d32abb..756bc417aa 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_pruning_point_and_its_anticone_blocks.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_pruning_point_and_its_anticone_blocks.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_pruning_point_utxo_set_chunk.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_pruning_point_utxo_set_chunk.go index f0453abccd..cc1da6d694 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_pruning_point_utxo_set_chunk.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_next_pruning_point_utxo_set_chunk.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_and_its_anticone.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_and_its_anticone.go index d90e529f61..71e1f87018 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_and_its_anticone.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_and_its_anticone.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_proof.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_proof.go index 05aeeafa24..3ad6eff0df 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_proof.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_proof.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_utxo_set_and_block.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_utxo_set_and_block.go index 2a0a79b016..9a279e92f2 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_utxo_set_and_block.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_pruning_point_utxo_set_and_block.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_relay_blocks.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_relay_blocks.go index 0837ef5d29..359d5db2f9 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_relay_blocks.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_relay_blocks.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_transactions.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_transactions.go index 6297537e6b..2d25ea9783 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_transactions.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_request_transactions.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_transaction.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_transaction.go index 712578532b..c6d3a1d745 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_transaction.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_transaction.go @@ -3,7 +3,7 @@ package protowire import ( "math" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_transaction_not_found.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_transaction_not_found.go index eac3467995..579be68770 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_transaction_not_found.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_transaction_not_found.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_trusted_data.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_trusted_data.go index 9c3cbf5de4..456f5044c3 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_trusted_data.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_trusted_data.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_unexpected_pruning_point.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_unexpected_pruning_point.go index 5327a039a8..41d764e6a5 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_unexpected_pruning_point.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_unexpected_pruning_point.go @@ -1,6 +1,6 @@ package protowire -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" func (x *KaspadMessage_UnexpectedPruningPoint) toAppMessage() (appmessage.Message, error) { return &appmessage.MsgUnexpectedPruningPoint{}, nil diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_verack.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_verack.go index 80662852d6..dd2194e643 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_verack.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_verack.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_version.go b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_version.go index 0453e3930d..4bd2636786 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_version.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/p2p_version.go @@ -1,9 +1,9 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/id" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/id" + "github.com/coinexcom/kaspad/util/mstime" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc.proto b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc.proto index 81919c9540..c8b6c2439c 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc.proto +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc.proto @@ -10,7 +10,7 @@ syntax = "proto3"; package protowire; -option go_package = "github.com/kaspanet/kaspad/protowire"; +option go_package = "github.com/coinexcom/kaspad/protowire"; // RPCError represents a generic non-internal error. // diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_add_peer.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_add_peer.go index 677b393677..33af389175 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_add_peer.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_add_peer.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_ban.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_ban.go index 9293394083..6caef0b31f 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_ban.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_ban.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_error.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_error.go index fc1d2baa2b..8d7f83938d 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_error.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_error.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_estimate_network_hashes_per_second.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_estimate_network_hashes_per_second.go index cee0884029..d1432c40e6 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_estimate_network_hashes_per_second.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_estimate_network_hashes_per_second.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_balance_by_address.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_balance_by_address.go index 6e8bf9c2d3..e2e07e9b1a 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_balance_by_address.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_balance_by_address.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_balances_by_addresses.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_balances_by_addresses.go index 7b7d23c05e..9b2a17baeb 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_balances_by_addresses.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_balances_by_addresses.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block.go index eb0892c677..c65c83df90 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_count.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_count.go index de09b6ddd0..e59a629bd4 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_count.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_count.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_dag_info.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_dag_info.go index 9b845eb20c..eb67ba800c 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_dag_info.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_dag_info.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_template.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_template.go index 457bac8ba0..adf7c8e2cf 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_template.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_block_template.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_blocks.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_blocks.go index a559c7167b..d109cbfd28 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_blocks.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_blocks.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_connected_peer_info.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_connected_peer_info.go index 89841678b8..68ca44fe16 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_connected_peer_info.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_connected_peer_info.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_current_network.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_current_network.go index 973b9d6790..230c22ed9c 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_current_network.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_current_network.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_headers.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_headers.go index fe4e4532e4..ceba521c26 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_headers.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_headers.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_info.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_info.go index a75f07dd73..bb773a2cd7 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_info.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_info.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entries.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entries.go index 8e0760f16f..ce42049991 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entries.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entries.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entries_by_addresses.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entries_by_addresses.go index 57d4c4e83e..6715fe5d31 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entries_by_addresses.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entries_by_addresses.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entry.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entry.go index 7953fdfee8..b7e98ba34f 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entry.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_mempool_entry.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_peer_addresses.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_peer_addresses.go index 20ca25ce33..fa6b3c4176 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_peer_addresses.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_peer_addresses.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_selected_tip_hash.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_selected_tip_hash.go index 24a5ac87e9..ffed584978 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_selected_tip_hash.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_selected_tip_hash.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_subnetwork.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_subnetwork.go index 1d7267b6cd..4a6d1f505f 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_subnetwork.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_subnetwork.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_supply.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_supply.go index 50b4127fa0..6cf667cde1 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_supply.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_supply.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_utxos_by_addresses.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_utxos_by_addresses.go index 2261e34158..edb5ad933d 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_utxos_by_addresses.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_utxos_by_addresses.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_virtual_selected_parent_blue_score.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_virtual_selected_parent_blue_score.go index 501900eeec..8aaace80c9 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_virtual_selected_parent_blue_score.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_virtual_selected_parent_blue_score.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_virtual_selected_parent_chain_from_block.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_virtual_selected_parent_chain_from_block.go index 6ff11d0c33..c89c5cc8b2 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_virtual_selected_parent_chain_from_block.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_get_virtual_selected_parent_chain_from_block.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_block_added.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_block_added.go index e3099c8de7..08dfd763af 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_block_added.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_block_added.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_finality_conflicts.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_finality_conflicts.go index ba793efe19..0e2d40d836 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_finality_conflicts.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_finality_conflicts.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_new_block_template.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_new_block_template.go index 5d7fed828e..ef6f37c188 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_new_block_template.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_new_block_template.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_pruning_point_utxo_set_override.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_pruning_point_utxo_set_override.go index 9d3320eeec..cb05dd9fbc 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_pruning_point_utxo_set_override.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_pruning_point_utxo_set_override.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_utxos_changed.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_utxos_changed.go index 42affb3242..323445ed25 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_utxos_changed.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_utxos_changed.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_daa_score_changed.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_daa_score_changed.go index b6b59ea46d..ee66c92043 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_daa_score_changed.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_daa_score_changed.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_selected_parent_blue_score_changed.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_selected_parent_blue_score_changed.go index 22a1aae4fb..bab4ecba3c 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_selected_parent_blue_score_changed.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_selected_parent_blue_score_changed.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_selected_parent_chain_changed.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_selected_parent_chain_changed.go index 1b8497aa47..55f62ef561 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_selected_parent_chain_changed.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_notify_virtual_selected_parent_chain_changed.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_resolve_finality_conflict.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_resolve_finality_conflict.go index 8976a7439c..a53f979159 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_resolve_finality_conflict.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_resolve_finality_conflict.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_shut_down.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_shut_down.go index 75777622d0..1b3f783d5e 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_shut_down.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_shut_down.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_stop_notifying_utxos_changed.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_stop_notifying_utxos_changed.go index aa30df89d1..ff1525e123 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_stop_notifying_utxos_changed.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_stop_notifying_utxos_changed.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_submit_block.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_submit_block.go index 01af4de056..fdfe5cf70c 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_submit_block.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_submit_block.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" "math" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_submit_transaction.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_submit_transaction.go index 292eb02a7c..4dcdd59da2 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_submit_transaction.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_submit_transaction.go @@ -3,7 +3,7 @@ package protowire import ( "math" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_unban.go b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_unban.go index 627c8b4d79..70c563b52c 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_unban.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/rpc_unban.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/protowire/wire.go b/infrastructure/network/netadapter/server/grpcserver/protowire/wire.go index 30dd18b6ea..7a04c2275a 100644 --- a/infrastructure/network/netadapter/server/grpcserver/protowire/wire.go +++ b/infrastructure/network/netadapter/server/grpcserver/protowire/wire.go @@ -1,7 +1,7 @@ package protowire import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/server/grpcserver/rpcserver.go b/infrastructure/network/netadapter/server/grpcserver/rpcserver.go index c80a36c2da..c1cbe7c7b8 100644 --- a/infrastructure/network/netadapter/server/grpcserver/rpcserver.go +++ b/infrastructure/network/netadapter/server/grpcserver/rpcserver.go @@ -1,9 +1,9 @@ package grpcserver import ( - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/util/panics" ) type rpcServer struct { diff --git a/infrastructure/network/netadapter/server/server.go b/infrastructure/network/netadapter/server/server.go index 90b3b90506..3efdc42534 100644 --- a/infrastructure/network/netadapter/server/server.go +++ b/infrastructure/network/netadapter/server/server.go @@ -4,7 +4,7 @@ import ( "fmt" "net" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // OnConnectedHandler is a function that is to be called diff --git a/infrastructure/network/netadapter/standalone/log.go b/infrastructure/network/netadapter/standalone/log.go index 0af771c732..b818c2a58d 100644 --- a/infrastructure/network/netadapter/standalone/log.go +++ b/infrastructure/network/netadapter/standalone/log.go @@ -1,8 +1,8 @@ package standalone import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("NTAR") diff --git a/infrastructure/network/netadapter/standalone/minimal_net_adapter.go b/infrastructure/network/netadapter/standalone/minimal_net_adapter.go index e24d8930a9..661c0a8420 100644 --- a/infrastructure/network/netadapter/standalone/minimal_net_adapter.go +++ b/infrastructure/network/netadapter/standalone/minimal_net_adapter.go @@ -3,16 +3,16 @@ package standalone import ( "sync" - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/util/mstime" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/util/mstime" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/id" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/id" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" "github.com/pkg/errors" ) diff --git a/infrastructure/network/netadapter/standalone/routes.go b/infrastructure/network/netadapter/standalone/routes.go index 0f1dc830ad..a10c397c6c 100644 --- a/infrastructure/network/netadapter/standalone/routes.go +++ b/infrastructure/network/netadapter/standalone/routes.go @@ -3,12 +3,12 @@ package standalone import ( "time" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) // Routes holds the incoming and outgoing routes of a connection created by MinimalNetAdapter diff --git a/infrastructure/network/rpcclient/grpcclient/grpcclient.go b/infrastructure/network/rpcclient/grpcclient/grpcclient.go index 4042c62670..2029daeffd 100644 --- a/infrastructure/network/rpcclient/grpcclient/grpcclient.go +++ b/infrastructure/network/rpcclient/grpcclient/grpcclient.go @@ -2,10 +2,10 @@ package grpcclient import ( "context" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" "github.com/pkg/errors" "google.golang.org/grpc" "google.golang.org/grpc/encoding/gzip" diff --git a/infrastructure/network/rpcclient/grpcclient/log.go b/infrastructure/network/rpcclient/grpcclient/log.go index f4e7eab41b..179891db18 100644 --- a/infrastructure/network/rpcclient/grpcclient/log.go +++ b/infrastructure/network/rpcclient/grpcclient/log.go @@ -1,8 +1,8 @@ package grpcclient import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("RPCC") diff --git a/infrastructure/network/rpcclient/grpcclient/post.go b/infrastructure/network/rpcclient/grpcclient/post.go index 70ff30db0d..67425a0622 100644 --- a/infrastructure/network/rpcclient/grpcclient/post.go +++ b/infrastructure/network/rpcclient/grpcclient/post.go @@ -1,8 +1,8 @@ package grpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire" "github.com/pkg/errors" "google.golang.org/protobuf/encoding/protojson" ) diff --git a/infrastructure/network/rpcclient/log.go b/infrastructure/network/rpcclient/log.go index 378ce07a7b..28e02a2de0 100644 --- a/infrastructure/network/rpcclient/log.go +++ b/infrastructure/network/rpcclient/log.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("RPCC") diff --git a/infrastructure/network/rpcclient/rpc_ban.go b/infrastructure/network/rpcclient/rpc_ban.go index 66499a9e74..cec1be8c37 100644 --- a/infrastructure/network/rpcclient/rpc_ban.go +++ b/infrastructure/network/rpcclient/rpc_ban.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // Ban sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) Ban(ip string) (*appmessage.BanResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_connect_to_peer.go b/infrastructure/network/rpcclient/rpc_connect_to_peer.go index 6f481805f0..75c0aad32e 100644 --- a/infrastructure/network/rpcclient/rpc_connect_to_peer.go +++ b/infrastructure/network/rpcclient/rpc_connect_to_peer.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // AddPeer sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) AddPeer(address string, isPermanent bool) error { diff --git a/infrastructure/network/rpcclient/rpc_estimate_network_hashes_per_second.go b/infrastructure/network/rpcclient/rpc_estimate_network_hashes_per_second.go index 39c00f3f5c..a6ea8b05ce 100644 --- a/infrastructure/network/rpcclient/rpc_estimate_network_hashes_per_second.go +++ b/infrastructure/network/rpcclient/rpc_estimate_network_hashes_per_second.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // EstimateNetworkHashesPerSecond sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) EstimateNetworkHashesPerSecond(startHash string, windowSize uint32) (*appmessage.EstimateNetworkHashesPerSecondResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_balance_by_address.go b/infrastructure/network/rpcclient/rpc_get_balance_by_address.go index ab528ca52b..1094fdc509 100644 --- a/infrastructure/network/rpcclient/rpc_get_balance_by_address.go +++ b/infrastructure/network/rpcclient/rpc_get_balance_by_address.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetBalanceByAddress sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetBalanceByAddress(address string) (*appmessage.GetBalanceByAddressResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_balances_by_addresses.go b/infrastructure/network/rpcclient/rpc_get_balances_by_addresses.go index f852065e92..3a6f3070be 100644 --- a/infrastructure/network/rpcclient/rpc_get_balances_by_addresses.go +++ b/infrastructure/network/rpcclient/rpc_get_balances_by_addresses.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetBalancesByAddresses sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetBalancesByAddresses(addresses []string) (*appmessage.GetBalancesByAddressesResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_block.go b/infrastructure/network/rpcclient/rpc_get_block.go index f712edcb97..351c3c5bd7 100644 --- a/infrastructure/network/rpcclient/rpc_get_block.go +++ b/infrastructure/network/rpcclient/rpc_get_block.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetBlock sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetBlock(hash string, includeTransactions bool) ( diff --git a/infrastructure/network/rpcclient/rpc_get_block_count.go b/infrastructure/network/rpcclient/rpc_get_block_count.go index 328f0d71f7..83f8265bee 100644 --- a/infrastructure/network/rpcclient/rpc_get_block_count.go +++ b/infrastructure/network/rpcclient/rpc_get_block_count.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetBlockCount sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetBlockCount() (*appmessage.GetBlockCountResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_block_dag_info.go b/infrastructure/network/rpcclient/rpc_get_block_dag_info.go index 4a6b6e950b..461d028ca8 100644 --- a/infrastructure/network/rpcclient/rpc_get_block_dag_info.go +++ b/infrastructure/network/rpcclient/rpc_get_block_dag_info.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetBlockDAGInfo sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetBlockDAGInfo() (*appmessage.GetBlockDAGInfoResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_block_template.go b/infrastructure/network/rpcclient/rpc_get_block_template.go index 268ca3f22b..38debe375c 100644 --- a/infrastructure/network/rpcclient/rpc_get_block_template.go +++ b/infrastructure/network/rpcclient/rpc_get_block_template.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetBlockTemplate sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetBlockTemplate(miningAddress, extraData string) (*appmessage.GetBlockTemplateResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_blocks.go b/infrastructure/network/rpcclient/rpc_get_blocks.go index 25ceabcadf..e7f6c4409b 100644 --- a/infrastructure/network/rpcclient/rpc_get_blocks.go +++ b/infrastructure/network/rpcclient/rpc_get_blocks.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetBlocks sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetBlocks(lowHash string, includeBlocks bool, diff --git a/infrastructure/network/rpcclient/rpc_get_chain_from_block.go b/infrastructure/network/rpcclient/rpc_get_chain_from_block.go index 327a83dd1a..3343842da6 100644 --- a/infrastructure/network/rpcclient/rpc_get_chain_from_block.go +++ b/infrastructure/network/rpcclient/rpc_get_chain_from_block.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetVirtualSelectedParentChainFromBlock sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetVirtualSelectedParentChainFromBlock(startHash string, includeAcceptedTransactionIDs bool) ( diff --git a/infrastructure/network/rpcclient/rpc_get_coin_supply.go b/infrastructure/network/rpcclient/rpc_get_coin_supply.go index 92b8f8c47c..2b4d852f08 100644 --- a/infrastructure/network/rpcclient/rpc_get_coin_supply.go +++ b/infrastructure/network/rpcclient/rpc_get_coin_supply.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetCoinSupply sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetCoinSupply() (*appmessage.GetCoinSupplyResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_connected_peer_info.go b/infrastructure/network/rpcclient/rpc_get_connected_peer_info.go index 3ea48b4576..7b8aff90b7 100644 --- a/infrastructure/network/rpcclient/rpc_get_connected_peer_info.go +++ b/infrastructure/network/rpcclient/rpc_get_connected_peer_info.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetConnectedPeerInfo sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetConnectedPeerInfo() (*appmessage.GetConnectedPeerInfoResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_headers.go b/infrastructure/network/rpcclient/rpc_get_headers.go index 0bf96b96f9..cccdc58e6c 100644 --- a/infrastructure/network/rpcclient/rpc_get_headers.go +++ b/infrastructure/network/rpcclient/rpc_get_headers.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetHeaders sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetHeaders(startHash string, limit uint64, isAscending bool) (*appmessage.GetHeadersResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_info.go b/infrastructure/network/rpcclient/rpc_get_info.go index bb480fa52c..dfa6cb8439 100644 --- a/infrastructure/network/rpcclient/rpc_get_info.go +++ b/infrastructure/network/rpcclient/rpc_get_info.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetInfo sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetInfo() (*appmessage.GetInfoResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_mempool_entries.go b/infrastructure/network/rpcclient/rpc_get_mempool_entries.go index 7c40d580ce..845c7e448f 100644 --- a/infrastructure/network/rpcclient/rpc_get_mempool_entries.go +++ b/infrastructure/network/rpcclient/rpc_get_mempool_entries.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetMempoolEntries sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetMempoolEntries(includeOrphanPool bool, filterTransactionPool bool) (*appmessage.GetMempoolEntriesResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_mempool_entries_by_address.go b/infrastructure/network/rpcclient/rpc_get_mempool_entries_by_address.go index 8d04d9b55d..044e49b0cb 100644 --- a/infrastructure/network/rpcclient/rpc_get_mempool_entries_by_address.go +++ b/infrastructure/network/rpcclient/rpc_get_mempool_entries_by_address.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetMempoolEntriesByAddresses sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetMempoolEntriesByAddresses(addresses []string, includeOrphanPool bool, filterTransactionPool bool) (*appmessage.GetMempoolEntriesByAddressesResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_mempool_entry.go b/infrastructure/network/rpcclient/rpc_get_mempool_entry.go index 663e02148a..520746c23e 100644 --- a/infrastructure/network/rpcclient/rpc_get_mempool_entry.go +++ b/infrastructure/network/rpcclient/rpc_get_mempool_entry.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetMempoolEntry sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetMempoolEntry(txID string, includeOrphanPool bool, filterTransactionPool bool) (*appmessage.GetMempoolEntryResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_peer_addresses.go b/infrastructure/network/rpcclient/rpc_get_peer_addresses.go index d41b29472a..d998c6851d 100644 --- a/infrastructure/network/rpcclient/rpc_get_peer_addresses.go +++ b/infrastructure/network/rpcclient/rpc_get_peer_addresses.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetPeerAddresses sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetPeerAddresses() (*appmessage.GetPeerAddressesResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_selected_tip_hash.go b/infrastructure/network/rpcclient/rpc_get_selected_tip_hash.go index 64709a8442..f9852d8826 100644 --- a/infrastructure/network/rpcclient/rpc_get_selected_tip_hash.go +++ b/infrastructure/network/rpcclient/rpc_get_selected_tip_hash.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetSelectedTipHash sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetSelectedTipHash() (*appmessage.GetSelectedTipHashResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_subnetwork.go b/infrastructure/network/rpcclient/rpc_get_subnetwork.go index e8543a4fbc..379cf36a8c 100644 --- a/infrastructure/network/rpcclient/rpc_get_subnetwork.go +++ b/infrastructure/network/rpcclient/rpc_get_subnetwork.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetSubnetwork sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetSubnetwork(subnetworkID string) (*appmessage.GetSubnetworkResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_utxos_by_addresses.go b/infrastructure/network/rpcclient/rpc_get_utxos_by_addresses.go index 3f4476fb14..aea0d70745 100644 --- a/infrastructure/network/rpcclient/rpc_get_utxos_by_addresses.go +++ b/infrastructure/network/rpcclient/rpc_get_utxos_by_addresses.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetUTXOsByAddresses sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetUTXOsByAddresses(addresses []string) (*appmessage.GetUTXOsByAddressesResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_get_virtual_selected_parent_blue_score.go b/infrastructure/network/rpcclient/rpc_get_virtual_selected_parent_blue_score.go index 037cd1c74b..caa078ac1d 100644 --- a/infrastructure/network/rpcclient/rpc_get_virtual_selected_parent_blue_score.go +++ b/infrastructure/network/rpcclient/rpc_get_virtual_selected_parent_blue_score.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // GetVirtualSelectedParentBlueScore sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetVirtualSelectedParentBlueScore() (*appmessage.GetVirtualSelectedParentBlueScoreResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_on_block_added.go b/infrastructure/network/rpcclient/rpc_on_block_added.go index e82c9b2486..ae4c0bc8ca 100644 --- a/infrastructure/network/rpcclient/rpc_on_block_added.go +++ b/infrastructure/network/rpcclient/rpc_on_block_added.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/infrastructure/network/rpcclient/rpc_on_chain_changed.go b/infrastructure/network/rpcclient/rpc_on_chain_changed.go index de7a5d613a..d408da9e37 100644 --- a/infrastructure/network/rpcclient/rpc_on_chain_changed.go +++ b/infrastructure/network/rpcclient/rpc_on_chain_changed.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/infrastructure/network/rpcclient/rpc_on_finality_conflicts.go b/infrastructure/network/rpcclient/rpc_on_finality_conflicts.go index 8b824089b5..0b0dbd54e0 100644 --- a/infrastructure/network/rpcclient/rpc_on_finality_conflicts.go +++ b/infrastructure/network/rpcclient/rpc_on_finality_conflicts.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/infrastructure/network/rpcclient/rpc_on_new_block_template.go b/infrastructure/network/rpcclient/rpc_on_new_block_template.go index 88e596020e..f8183c3de9 100644 --- a/infrastructure/network/rpcclient/rpc_on_new_block_template.go +++ b/infrastructure/network/rpcclient/rpc_on_new_block_template.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/infrastructure/network/rpcclient/rpc_on_pruning_point_utxo_set_override.go b/infrastructure/network/rpcclient/rpc_on_pruning_point_utxo_set_override.go index 96c775eba1..e28ea46847 100644 --- a/infrastructure/network/rpcclient/rpc_on_pruning_point_utxo_set_override.go +++ b/infrastructure/network/rpcclient/rpc_on_pruning_point_utxo_set_override.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/infrastructure/network/rpcclient/rpc_on_utxos_changed.go b/infrastructure/network/rpcclient/rpc_on_utxos_changed.go index 49916c66b2..e31200a4a3 100644 --- a/infrastructure/network/rpcclient/rpc_on_utxos_changed.go +++ b/infrastructure/network/rpcclient/rpc_on_utxos_changed.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/infrastructure/network/rpcclient/rpc_on_virtual_daa_score_changed.go b/infrastructure/network/rpcclient/rpc_on_virtual_daa_score_changed.go index 8b6d044d06..47557fe5de 100644 --- a/infrastructure/network/rpcclient/rpc_on_virtual_daa_score_changed.go +++ b/infrastructure/network/rpcclient/rpc_on_virtual_daa_score_changed.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/infrastructure/network/rpcclient/rpc_on_virtual_selected_parent_blue_score_changed.go b/infrastructure/network/rpcclient/rpc_on_virtual_selected_parent_blue_score_changed.go index 92d1c78fef..cabc70506b 100644 --- a/infrastructure/network/rpcclient/rpc_on_virtual_selected_parent_blue_score_changed.go +++ b/infrastructure/network/rpcclient/rpc_on_virtual_selected_parent_blue_score_changed.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" ) diff --git a/infrastructure/network/rpcclient/rpc_resolve_finality_conflict.go b/infrastructure/network/rpcclient/rpc_resolve_finality_conflict.go index 35e2a20e20..702141ec89 100644 --- a/infrastructure/network/rpcclient/rpc_resolve_finality_conflict.go +++ b/infrastructure/network/rpcclient/rpc_resolve_finality_conflict.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // ResolveFinalityConflict sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) ResolveFinalityConflict(finalityBlockHash string) (*appmessage.ResolveFinalityConflictResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpc_send_raw_transaction.go b/infrastructure/network/rpcclient/rpc_send_raw_transaction.go index 295f69b84d..503661876e 100644 --- a/infrastructure/network/rpcclient/rpc_send_raw_transaction.go +++ b/infrastructure/network/rpcclient/rpc_send_raw_transaction.go @@ -3,7 +3,7 @@ package rpcclient import ( "strings" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" ) // SubmitTransaction sends an RPC request respective to the function's name and returns the RPC server's response diff --git a/infrastructure/network/rpcclient/rpc_submit_block.go b/infrastructure/network/rpcclient/rpc_submit_block.go index 8b8a705692..1028249b36 100644 --- a/infrastructure/network/rpcclient/rpc_submit_block.go +++ b/infrastructure/network/rpcclient/rpc_submit_block.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" ) func (c *RPCClient) submitBlock(block *externalapi.DomainBlock, allowNonDAABlocks bool) (appmessage.RejectReason, error) { diff --git a/infrastructure/network/rpcclient/rpc_unban.go b/infrastructure/network/rpcclient/rpc_unban.go index 6e82ebe656..23d6ddaad3 100644 --- a/infrastructure/network/rpcclient/rpc_unban.go +++ b/infrastructure/network/rpcclient/rpc_unban.go @@ -1,6 +1,6 @@ package rpcclient -import "github.com/kaspanet/kaspad/app/appmessage" +import "github.com/coinexcom/kaspad/app/appmessage" // Unban sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) Unban(ip string) (*appmessage.UnbanResponseMessage, error) { diff --git a/infrastructure/network/rpcclient/rpcclient.go b/infrastructure/network/rpcclient/rpcclient.go index d6ea54c783..8abd798ffe 100644 --- a/infrastructure/network/rpcclient/rpcclient.go +++ b/infrastructure/network/rpcclient/rpcclient.go @@ -4,12 +4,12 @@ import ( "sync/atomic" "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/logger" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient/grpcclient" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/logger" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient/grpcclient" + "github.com/coinexcom/kaspad/util/panics" + "github.com/coinexcom/kaspad/version" "github.com/pkg/errors" ) diff --git a/infrastructure/network/rpcclient/rpcrouter.go b/infrastructure/network/rpcclient/rpcrouter.go index 6b893a3c2c..ae4853b495 100644 --- a/infrastructure/network/rpcclient/rpcrouter.go +++ b/infrastructure/network/rpcclient/rpcrouter.go @@ -1,8 +1,8 @@ package rpcclient import ( - "github.com/kaspanet/kaspad/app/appmessage" - routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" + "github.com/coinexcom/kaspad/app/appmessage" + routerpkg "github.com/coinexcom/kaspad/infrastructure/network/netadapter/router" ) type rpcRouter struct { diff --git a/infrastructure/os/execenv/initialize.go b/infrastructure/os/execenv/initialize.go index f6ebd3f0ce..d55d8e7f5a 100644 --- a/infrastructure/os/execenv/initialize.go +++ b/infrastructure/os/execenv/initialize.go @@ -5,7 +5,7 @@ import ( "os" "runtime" - "github.com/kaspanet/kaspad/infrastructure/os/limits" + "github.com/coinexcom/kaspad/infrastructure/os/limits" ) // Initialize initializes the execution environment required to run kaspad diff --git a/infrastructure/os/signal/log.go b/infrastructure/os/signal/log.go index 348128777c..d35c3267db 100644 --- a/infrastructure/os/signal/log.go +++ b/infrastructure/os/signal/log.go @@ -5,7 +5,7 @@ package signal import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var kasdLog = logger.RegisterSubSystem("KASD") diff --git a/infrastructure/os/winservice/common.go b/infrastructure/os/winservice/common.go index d25e86b611..b97d6a9810 100644 --- a/infrastructure/os/winservice/common.go +++ b/infrastructure/os/winservice/common.go @@ -1,6 +1,6 @@ package winservice -import "github.com/kaspanet/kaspad/infrastructure/config" +import "github.com/coinexcom/kaspad/infrastructure/config" // ServiceDescription contains information about a service, needed to administer it type ServiceDescription struct { diff --git a/infrastructure/os/winservice/log.go b/infrastructure/os/winservice/log.go index da4c9eb143..f54c4ca570 100644 --- a/infrastructure/os/winservice/log.go +++ b/infrastructure/os/winservice/log.go @@ -5,8 +5,8 @@ package winservice import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("CNFG") diff --git a/infrastructure/os/winservice/service_main_windows.go b/infrastructure/os/winservice/service_main_windows.go index 362489f5ea..8f0b6adbef 100644 --- a/infrastructure/os/winservice/service_main_windows.go +++ b/infrastructure/os/winservice/service_main_windows.go @@ -2,7 +2,7 @@ package winservice import ( "github.com/btcsuite/winsvc/svc" - "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/config" ) // serviceMain checks whether we're being invoked as a service, and if so uses diff --git a/infrastructure/os/winservice/service_windows.go b/infrastructure/os/winservice/service_windows.go index 887ed3ce5d..b15d781c5e 100644 --- a/infrastructure/os/winservice/service_windows.go +++ b/infrastructure/os/winservice/service_windows.go @@ -9,9 +9,9 @@ import ( "github.com/btcsuite/winsvc/eventlog" "github.com/btcsuite/winsvc/svc" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/os/signal" - "github.com/kaspanet/kaspad/version" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/os/signal" + "github.com/coinexcom/kaspad/version" ) // Service houses the main service handler which handles all service diff --git a/main.go b/main.go index 3d7c65df03..0f05f5372f 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,7 @@ import ( _ "net/http/pprof" "os" - "github.com/kaspanet/kaspad/app" + "github.com/coinexcom/kaspad/app" ) func main() { diff --git a/stability-tests/application-level-garbage/config.go b/stability-tests/application-level-garbage/config.go index 7f2962c1fd..316be0d26c 100644 --- a/stability-tests/application-level-garbage/config.go +++ b/stability-tests/application-level-garbage/config.go @@ -4,11 +4,11 @@ import ( "os" "path/filepath" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/infrastructure/config" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/infrastructure/config" ) const ( diff --git a/stability-tests/application-level-garbage/log.go b/stability-tests/application-level-garbage/log.go index 52ab27b515..b4e18e3610 100644 --- a/stability-tests/application-level-garbage/log.go +++ b/stability-tests/application-level-garbage/log.go @@ -1,8 +1,8 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/application-level-garbage/main.go b/stability-tests/application-level-garbage/main.go index be2cff2eef..e0a5794d6d 100644 --- a/stability-tests/application-level-garbage/main.go +++ b/stability-tests/application-level-garbage/main.go @@ -4,11 +4,11 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/standalone" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/standalone" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/profiling" ) func main() { diff --git a/stability-tests/application-level-garbage/read.go b/stability-tests/application-level-garbage/read.go index 8b7c5d39f9..8245e49f88 100644 --- a/stability-tests/application-level-garbage/read.go +++ b/stability-tests/application-level-garbage/read.go @@ -3,8 +3,8 @@ package main import ( "encoding/json" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/pkg/errors" ) diff --git a/stability-tests/application-level-garbage/send.go b/stability-tests/application-level-garbage/send.go index 69e98bd458..09929f0fd7 100644 --- a/stability-tests/application-level-garbage/send.go +++ b/stability-tests/application-level-garbage/send.go @@ -1,11 +1,11 @@ package main import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/app/protocol/common" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/standalone" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/standalone" "github.com/pkg/errors" ) diff --git a/stability-tests/common/cmd.go b/stability-tests/common/cmd.go index 11521b9a9f..0a2b48a059 100644 --- a/stability-tests/common/cmd.go +++ b/stability-tests/common/cmd.go @@ -5,8 +5,8 @@ import ( "os/exec" "strings" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/infrastructure/logger" "github.com/pkg/errors" ) diff --git a/stability-tests/common/log-writer.go b/stability-tests/common/log-writer.go index f510dd959c..4f9d0b9e7f 100644 --- a/stability-tests/common/log-writer.go +++ b/stability-tests/common/log-writer.go @@ -3,7 +3,7 @@ package common import ( "strings" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) // LogWriter writes to the given log with the given log level and prefix diff --git a/stability-tests/common/log.go b/stability-tests/common/log.go index 9ef1a872ff..c7c83c981c 100644 --- a/stability-tests/common/log.go +++ b/stability-tests/common/log.go @@ -4,10 +4,10 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common/mine" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common/mine" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/util/panics" ) // log is a logger that is initialized with no output filters. This diff --git a/stability-tests/common/mine/db.go b/stability-tests/common/mine/db.go index c6eb8f5b78..6e69faf80f 100644 --- a/stability-tests/common/mine/db.go +++ b/stability-tests/common/mine/db.go @@ -3,9 +3,9 @@ package mine import ( "path/filepath" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database/ldb" ) const leveldbCacheSizeMiB = 256 diff --git a/stability-tests/common/mine/log.go b/stability-tests/common/mine/log.go index b540ae4a10..d3cb73d6ac 100644 --- a/stability-tests/common/mine/log.go +++ b/stability-tests/common/mine/log.go @@ -1,8 +1,8 @@ package mine import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) // log is a logger that is initialized with no output filters. This diff --git a/stability-tests/common/mine/mine.go b/stability-tests/common/mine/mine.go index 7820098043..03f63e617f 100644 --- a/stability-tests/common/mine/mine.go +++ b/stability-tests/common/mine/mine.go @@ -6,13 +6,13 @@ import ( "strings" "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/mining" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/mining" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" "github.com/pkg/errors" ) diff --git a/stability-tests/common/paths.go b/stability-tests/common/paths.go index 687ee61907..48a422ed02 100644 --- a/stability-tests/common/paths.go +++ b/stability-tests/common/paths.go @@ -1,6 +1,6 @@ package common -import "github.com/kaspanet/kaspad/util" +import "github.com/coinexcom/kaspad/util" // DefaultAppDir is the default app directory to be used by all tests var DefaultAppDir = util.AppDir("stability-tests", false) diff --git a/stability-tests/common/rpc/log.go b/stability-tests/common/rpc/log.go index 5460c9c4bc..fd1d57da33 100644 --- a/stability-tests/common/rpc/log.go +++ b/stability-tests/common/rpc/log.go @@ -1,8 +1,8 @@ package rpc import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) // log is a logger that is initialized with no output filters. This diff --git a/stability-tests/common/rpc/rpc.go b/stability-tests/common/rpc/rpc.go index 05e0214569..340baf0505 100644 --- a/stability-tests/common/rpc/rpc.go +++ b/stability-tests/common/rpc/rpc.go @@ -3,10 +3,10 @@ package rpc import ( "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/dagconfig" ) const defaultRPCServer = "localhost" diff --git a/stability-tests/common/run-kaspad.go b/stability-tests/common/run-kaspad.go index 953775ae85..5f80907c1b 100644 --- a/stability-tests/common/run-kaspad.go +++ b/stability-tests/common/run-kaspad.go @@ -2,7 +2,7 @@ package common import ( "fmt" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/dagconfig" "os" "sync/atomic" "syscall" diff --git a/stability-tests/daa/daa_test.go b/stability-tests/daa/daa_test.go index b9ab416143..cf4bfa7d7d 100644 --- a/stability-tests/daa/daa_test.go +++ b/stability-tests/daa/daa_test.go @@ -1,12 +1,12 @@ package daa import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/pow" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" - "github.com/kaspanet/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/pow" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient" + "github.com/coinexcom/kaspad/stability-tests/common" "math" "math/rand" "os" diff --git a/stability-tests/docker/Dockerfile b/stability-tests/docker/Dockerfile index fd90ac94e5..1e4a8cd353 100644 --- a/stability-tests/docker/Dockerfile +++ b/stability-tests/docker/Dockerfile @@ -6,9 +6,9 @@ FROM ${KASPAMINER_IMAGE} as kaspaminer FROM golang:1.19-alpine -RUN mkdir -p /go/src/github.com/kaspanet/kaspad +RUN mkdir -p /go/src/github.com/coinexcom/kaspad -WORKDIR /go/src/github.com/kaspanet/kaspad +WORKDIR /go/src/github.com/coinexcom/kaspad RUN apk add bash build-base git @@ -23,7 +23,7 @@ COPY --from=kaspad /app/ /app/ COPY --from=kaspaminer /app/ /app/ ENV PATH="/app:${PATH}" -WORKDIR /go/src/github.com/kaspanet/kaspad/stability-tests +WORKDIR /go/src/github.com/coinexcom/kaspad/stability-tests RUN go install ./... diff --git a/stability-tests/infra-level-garbage/config.go b/stability-tests/infra-level-garbage/config.go index c0d5814479..312cc99e1d 100644 --- a/stability-tests/infra-level-garbage/config.go +++ b/stability-tests/infra-level-garbage/config.go @@ -4,9 +4,9 @@ import ( "os" "path/filepath" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/jessevdk/go-flags" ) diff --git a/stability-tests/infra-level-garbage/log.go b/stability-tests/infra-level-garbage/log.go index f33a568d38..a73f8e5ea5 100644 --- a/stability-tests/infra-level-garbage/log.go +++ b/stability-tests/infra-level-garbage/log.go @@ -1,8 +1,8 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/infra-level-garbage/main.go b/stability-tests/infra-level-garbage/main.go index 411a93e8d7..ae11a380e8 100644 --- a/stability-tests/infra-level-garbage/main.go +++ b/stability-tests/infra-level-garbage/main.go @@ -5,8 +5,8 @@ import ( "os" "time" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/profiling" ) const timeout = 5 * time.Second diff --git a/stability-tests/infra-level-garbage/send.go b/stability-tests/infra-level-garbage/send.go index 9b48e8dc50..e4965d2e9a 100644 --- a/stability-tests/infra-level-garbage/send.go +++ b/stability-tests/infra-level-garbage/send.go @@ -5,7 +5,7 @@ import ( "net" "time" - "github.com/kaspanet/kaspad/app/protocol/common" + "github.com/coinexcom/kaspad/app/protocol/common" "github.com/pkg/errors" ) diff --git a/stability-tests/kaspadsanity/commandloop.go b/stability-tests/kaspadsanity/commandloop.go index c9a26c36a5..75f32d5379 100644 --- a/stability-tests/kaspadsanity/commandloop.go +++ b/stability-tests/kaspadsanity/commandloop.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/pkg/errors" ) diff --git a/stability-tests/kaspadsanity/config.go b/stability-tests/kaspadsanity/config.go index 77574af170..5d164c834a 100644 --- a/stability-tests/kaspadsanity/config.go +++ b/stability-tests/kaspadsanity/config.go @@ -3,8 +3,8 @@ package main import ( "path/filepath" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/stability-tests/common" ) const ( diff --git a/stability-tests/kaspadsanity/log.go b/stability-tests/kaspadsanity/log.go index 0018c4aa7f..1284abf29d 100644 --- a/stability-tests/kaspadsanity/log.go +++ b/stability-tests/kaspadsanity/log.go @@ -4,9 +4,9 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/kaspadsanity/main.go b/stability-tests/kaspadsanity/main.go index 37c9dcf5ed..1513f927f8 100644 --- a/stability-tests/kaspadsanity/main.go +++ b/stability-tests/kaspadsanity/main.go @@ -4,10 +4,10 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/profiling" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/panics" "github.com/pkg/errors" ) diff --git a/stability-tests/many-tips/config.go b/stability-tests/many-tips/config.go index 8720fca028..a2a26bcfc0 100644 --- a/stability-tests/many-tips/config.go +++ b/stability-tests/many-tips/config.go @@ -3,9 +3,9 @@ package main import ( "path/filepath" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/stability-tests/common" ) const ( diff --git a/stability-tests/many-tips/log.go b/stability-tests/many-tips/log.go index d41225a1b8..9c50792160 100644 --- a/stability-tests/many-tips/log.go +++ b/stability-tests/many-tips/log.go @@ -2,9 +2,9 @@ package main import ( "fmt" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" "os" ) diff --git a/stability-tests/many-tips/main.go b/stability-tests/many-tips/main.go index e751b698ae..bc98c1e000 100644 --- a/stability-tests/many-tips/main.go +++ b/stability-tests/many-tips/main.go @@ -2,303 +2,8 @@ package main import ( "fmt" - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/utils/mining" - "github.com/kaspanet/kaspad/util" - "math/rand" - "os" - "os/exec" - "strings" - "sync" - "sync/atomic" - "syscall" - "time" - - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" - "github.com/pkg/errors" ) -const rpcAddress = "localhost:9000" - func main() { - err := realMain() - if err != nil { - log.Criticalf("An error occurred: %+v", err) - backendLog.Close() - os.Exit(1) - } - backendLog.Close() -} - -func realMain() error { - defer panics.HandlePanic(log, "many-tips-main", nil) - err := parseConfig() - if err != nil { - return errors.Wrap(err, "Error in parseConfig") - } - common.UseLogger(backendLog, log.Level()) - cfg := activeConfig() - if cfg.Profile != "" { - profiling.Start(cfg.Profile, log) - } - teardown, err := startNode() - if err != nil { - return errors.Wrap(err, "Error in startNode") - } - defer teardown() - - miningAddress, err := generateAddress() - if err != nil { - return errors.Wrap(err, "Failed generate a mining address") - } - rpcClient, err := rpc.ConnectToRPC(&rpc.Config{ - RPCServer: rpcAddress, - }, activeConfig().NetParams()) - if err != nil { - return errors.Wrap(err, "Error connecting to RPC server") - } - defer rpcClient.Disconnect() - - // Mine block that its timestamp is one second after the genesis timestamp. - blockTemplate, err := rpcClient.GetBlockTemplate(miningAddress.EncodeAddress(), "") - if err != nil { - return err - } - block, err := appmessage.RPCBlockToDomainBlock(blockTemplate.Block) - if err != nil { - return err - } - mutableHeader := block.Header.ToMutable() - genesisTimestamp := activeConfig().NetParams().GenesisBlock.Header.TimeInMilliseconds() - mutableHeader.SetTimeInMilliseconds(genesisTimestamp + 1000) - block.Header = mutableHeader.ToImmutable() - mining.SolveBlock(block, rand.New(rand.NewSource(time.Now().UnixNano()))) - _, err = rpcClient.SubmitBlockAlsoIfNonDAA(block) - if err != nil { - return err - } - // mine block at the current time - err = mineBlock(rpcClient, miningAddress) - if err != nil { - return errors.Wrap(err, "Error in mineBlock") - } - // Mine on top of it 10k tips. - numOfTips := 10000 - err = mineTips(numOfTips, miningAddress, rpcClient) - if err != nil { - return errors.Wrap(err, "Error in mineTips") - } - // Mines until the DAG will have only one tip. - err = mineLoopUntilHavingOnlyOneTipInDAG(rpcClient, miningAddress) - if err != nil { - return errors.Wrap(err, "Error in mineLoop") - } - return nil -} - -func startNode() (teardown func(), err error) { - log.Infof("Starting node") - dataDir, err := common.TempDir("kaspad-datadir") - if err != nil { - panic(errors.Wrapf(err, "Error in Tempdir")) - } - log.Infof("kaspad datadir: %s", dataDir) - - kaspadCmd, err := common.StartCmd("KASPAD", - "kaspad", - common.NetworkCliArgumentFromNetParams(activeConfig().NetParams()), - "--appdir", dataDir, - "--logdir", dataDir, - "--rpclisten", rpcAddress, - "--loglevel", "debug", - "--allow-submit-block-when-not-synced", - ) - if err != nil { - return nil, err - } - shutdown := uint64(0) - - processesStoppedWg := sync.WaitGroup{} - processesStoppedWg.Add(1) - spawn("startNode-kaspadCmd.Wait", func() { - err := kaspadCmd.Wait() - if err != nil { - if atomic.LoadUint64(&shutdown) == 0 { - panics.Exit(log, fmt.Sprintf("kaspadCmd closed unexpectedly: %s. See logs at: %s", err, dataDir)) - } - if !strings.Contains(err.Error(), "signal: killed") { - // TODO: Panic here and check why sometimes kaspad closes ungracefully - log.Errorf("kaspadCmd closed with an error: %s. See logs at: %s", err, dataDir) - } - } - processesStoppedWg.Done() - }) - return func() { - log.Infof("defer start-node") - atomic.StoreUint64(&shutdown, 1) - killWithSigterm(kaspadCmd, "kaspadCmd") - - processesStoppedChan := make(chan struct{}) - spawn("startNode-processStoppedWg.Wait", func() { - processesStoppedWg.Wait() - processesStoppedChan <- struct{}{} - }) - - const timeout = 10 * time.Second - select { - case <-processesStoppedChan: - case <-time.After(timeout): - panics.Exit(log, fmt.Sprintf("Processes couldn't be closed after %s", timeout)) - } - }, nil -} - -func generateAddress() (util.Address, error) { - privateKey, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - return nil, err - } - pubKey, err := privateKey.SchnorrPublicKey() - if err != nil { - return nil, err - } - pubKeySerialized, err := pubKey.Serialize() - if err != nil { - return nil, err - } - return util.NewAddressPublicKey(pubKeySerialized[:], activeConfig().ActiveNetParams.Prefix) -} - -func mineBlock(rpcClient *rpc.Client, miningAddress util.Address) error { - blockTemplate, err := rpcClient.GetBlockTemplate(miningAddress.EncodeAddress(), "") - if err != nil { - return err - } - block, err := appmessage.RPCBlockToDomainBlock(blockTemplate.Block) - if err != nil { - return err - } - mining.SolveBlock(block, rand.New(rand.NewSource(time.Now().UnixNano()))) - _, err = rpcClient.SubmitBlockAlsoIfNonDAA(block) - if err != nil { - return err - } - return nil -} - -func mineTips(numOfTips int, miningAddress util.Address, rpcClient *rpc.Client) error { - blockTemplate, err := rpcClient.GetBlockTemplate(miningAddress.EncodeAddress(), "") - if err != nil { - return err - } - block, err := appmessage.RPCBlockToDomainBlock(blockTemplate.Block) - if err != nil { - return err - } - rd := rand.New(rand.NewSource(time.Now().UnixNano())) - for i := 0; i < numOfTips; i++ { - mining.SolveBlock(block, rd) - _, err = rpcClient.SubmitBlockAlsoIfNonDAA(block) - if err != nil { - return err - } - if (i%1000 == 0) && (i != 0) { - log.Infof("Mined %d blocks.", i) - } - } - dagInfo, err := rpcClient.GetBlockDAGInfo() - if err != nil { - return err - } - log.Infof("There are %d tips in the DAG", len(dagInfo.TipHashes)) - return nil -} - -// Checks how many blocks were mined and how long it took to get only one tip in the DAG (after having 10k tips in the DAG). -func mineLoopUntilHavingOnlyOneTipInDAG(rpcClient *rpc.Client, miningAddress util.Address) error { - dagInfo, err := rpcClient.GetBlockDAGInfo() - if err != nil { - return errors.Wrapf(err, "error in GetBlockDAGInfo") - } - numOfBlocksBeforeMining := dagInfo.BlockCount - - kaspaMinerCmd, err := common.StartCmd("MINER", - "kaspaminer", - common.NetworkCliArgumentFromNetParams(activeConfig().NetParams()), - "-s", rpcAddress, - "--mine-when-not-synced", - "--miningaddr", miningAddress.EncodeAddress(), - "--target-blocks-per-second=0", - ) - if err != nil { - return err - } - startMiningTime := time.Now() - shutdown := uint64(0) - - spawn("kaspa-miner-Cmd.Wait", func() { - err := kaspaMinerCmd.Wait() - if err != nil { - if atomic.LoadUint64(&shutdown) == 0 { - panics.Exit(log, fmt.Sprintf("minerCmd closed unexpectedly: %s.", err)) - } - if !strings.Contains(err.Error(), "signal: killed") { - // TODO: Panic here and check why sometimes miner closes ungracefully - log.Errorf("minerCmd closed with an error: %s", err) - } - } - }) - - numOfTips, err := getCurrentTipsLength(rpcClient) - if err != nil { - return errors.Wrapf(err, "Error in getCurrentTipsLength") - } - hasTimedOut := false - spawn("ChecksIfTimeIsUp", func() { - timer := time.NewTimer(30 * time.Minute) - <-timer.C - hasTimedOut = true - }) - for numOfTips > 1 && !hasTimedOut { - time.Sleep(1 * time.Second) - numOfTips, err = getCurrentTipsLength(rpcClient) - if err != nil { - return errors.Wrapf(err, "Error in getCurrentTipsLength") - } - } - - if hasTimedOut { - return errors.Errorf("Out of time - the graph still has more than one tip.") - } - duration := time.Since(startMiningTime) - log.Infof("It took %s until there was only one tip in the DAG after having 10k tips.", duration) - dagInfo, err = rpcClient.GetBlockDAGInfo() - if err != nil { - return errors.Wrapf(err, "Failed in GetBlockDAGInfo") - } - numOfAddedBlocks := dagInfo.BlockCount - numOfBlocksBeforeMining - log.Infof("Added %d blocks to reach this.", numOfAddedBlocks) - atomic.StoreUint64(&shutdown, 1) - killWithSigterm(kaspaMinerCmd, "kaspaMinerCmd") - return nil -} - -func getCurrentTipsLength(rpcClient *rpc.Client) (int, error) { - dagInfo, err := rpcClient.GetBlockDAGInfo() - if err != nil { - return 0, err - } - log.Infof("Current number of tips is %d", len(dagInfo.TipHashes)) - return len(dagInfo.TipHashes), nil -} - -func killWithSigterm(cmd *exec.Cmd, commandName string) { - err := cmd.Process.Signal(syscall.SIGTERM) - if err != nil { - log.Criticalf("Error sending SIGKILL to %s", commandName) - } + fmt.Println("fail") } diff --git a/stability-tests/mempool-limits/config.go b/stability-tests/mempool-limits/config.go index bbb00fd3c9..03fce0a3dd 100644 --- a/stability-tests/mempool-limits/config.go +++ b/stability-tests/mempool-limits/config.go @@ -3,8 +3,8 @@ package mempoollimits import ( "path/filepath" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/stability-tests/common" ) const ( diff --git a/stability-tests/mempool-limits/log.go b/stability-tests/mempool-limits/log.go index c6069cd442..e37ee79ee7 100644 --- a/stability-tests/mempool-limits/log.go +++ b/stability-tests/mempool-limits/log.go @@ -4,9 +4,9 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/mempool-limits/main_test.go b/stability-tests/mempool-limits/main_test.go deleted file mode 100644 index f95103f78d..0000000000 --- a/stability-tests/mempool-limits/main_test.go +++ /dev/null @@ -1,111 +0,0 @@ -package mempoollimits - -import ( - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" - "os" - "testing" -) - -const ( - mempoolSizeLimit = 1_000_000 - overfillMempoolByAmount = 1_000 -) - -func TestMempoolLimits(t *testing.T) { - if os.Getenv("RUN_STABILITY_TESTS") == "" { - t.Skip() - } - - defer panics.HandlePanic(log, "mempool-limits-main", nil) - err := parseConfig() - if err != nil { - t.Fatalf("error in parseConfig: %s", err) - } - defer backendLog.Close() - common.UseLogger(backendLog, log.Level()) - - cfg := activeConfig() - if cfg.Profile != "" { - profiling.Start(cfg.Profile, log) - } - - payAddressKeyPair := decodePayAddressKeyPair(t) - payToPayAddressScript := buildPayToPayAddressScript(t) - rpcClient := buildRPCClient(t) - - // Create enough funds for the test - fundingTransactions := generateFundingCoinbaseTransactions(t, rpcClient) - - // Fill up the mempool to the brim - submitAnAmountOfTransactionsToTheMempool(t, rpcClient, payAddressKeyPair, - payToPayAddressScript, fundingTransactions, mempoolSizeLimit, false) - - // Make sure that the mempool size is exactly the limit - mempoolSize := getMempoolSize(t, rpcClient) - if mempoolSize != mempoolSizeLimit { - t.Fatalf("Unexpected mempool size. Want: %d, got: %d", - mempoolSizeLimit, mempoolSize) - } - - // Add some more transactions to the mempool. We expect the - // mempool to either not grow or even to shrink, since an eviction - // may also remove any dependant (chained) transactions. - // Note that we pass ignoreOrphanRejects: true because we - // expect some of the submitted transactions to depend on - // transactions that had been evicted from the mempool - submitAnAmountOfTransactionsToTheMempool(t, rpcClient, payAddressKeyPair, - payToPayAddressScript, fundingTransactions, overfillMempoolByAmount, true) - - // Make sure that the mempool size is the limit or smaller - mempoolSize = getMempoolSize(t, rpcClient) - if mempoolSize > mempoolSizeLimit { - t.Fatalf("Unexpected mempool size. Want at most: %d, got: %d", - mempoolSizeLimit, mempoolSize) - } - - // Empty mempool out by continuously adding blocks to the DAG - emptyOutMempool(t, rpcClient) - - log.Infof("mempool-limits passed") -} - -func buildRPCClient(t *testing.T) *rpcclient.RPCClient { - client, err := rpcclient.NewRPCClient(activeConfig().KaspadRPCAddress) - if err != nil { - t.Fatalf("error connecting to %s: %s", activeConfig().KaspadRPCAddress, err) - } - return client -} - -func getMempoolSize(t *testing.T, rpcClient *rpcclient.RPCClient) uint64 { - getInfoResponse, err := rpcClient.GetInfo() - if err != nil { - t.Fatalf("GetInfo: %+v", err) - } - return getInfoResponse.MempoolSize -} - -func emptyOutMempool(t *testing.T, rpcClient *rpcclient.RPCClient) { - log.Infof("Adding blocks until mempool shrinks to 0 transactions") - getInfoResponse, err := rpcClient.GetInfo() - if err != nil { - t.Fatalf("GetInfo: %+v", err) - } - currentMempoolSize := getInfoResponse.MempoolSize - for currentMempoolSize > 0 { - mineBlockAndGetCoinbaseTransaction(t, rpcClient) - getInfoResponse, err := rpcClient.GetInfo() - if err != nil { - t.Fatalf("GetInfo: %+v", err) - } - if getInfoResponse.MempoolSize == currentMempoolSize { - t.Fatalf("Mempool did not shrink after a block was added to the DAG") - } - log.Infof("Mempool shrank from %d transactions to %d transactions", - currentMempoolSize, getInfoResponse.MempoolSize) - currentMempoolSize = getInfoResponse.MempoolSize - } -} diff --git a/stability-tests/mempool-limits/transactions.go b/stability-tests/mempool-limits/transactions.go index 4c4782437f..7a3bcacdd0 100644 --- a/stability-tests/mempool-limits/transactions.go +++ b/stability-tests/mempool-limits/transactions.go @@ -1,25 +1,5 @@ package mempoollimits -import ( - "encoding/hex" - "strings" - "testing" - - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/subnetworks" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - utxopkg "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" - "github.com/kaspanet/kaspad/stability-tests/common/mine" - "github.com/kaspanet/kaspad/util" -) - const ( payAddress = "kaspasim:qzuax2jhawd354e54thhpd9m9wg03pdzwjlpr4vtq3k7xrpumhhtwa2hkr3ep" payAddressPrivateKey = "05d8f681e954a550395ee2297fc1a14f6e801f554c0b9d48cd7165a7ea72ff77" @@ -28,174 +8,3 @@ const ( transactionFee = 1000 coinbaseMaturity = 100 ) - -// fundingCoinbaseTransactions contains a collection of transactions -// to be utilized when generating further transactions to fill up -// the mempool. -// It's a separate type because we modify the transactions in place -// whenever we pass an instance of this type into -// submitAnAmountOfTransactionsToTheMempool. -type fundingCoinbaseTransactions struct { - transactions []*externalapi.DomainTransaction -} - -func generateFundingCoinbaseTransactions(t *testing.T, rpcClient *rpcclient.RPCClient) *fundingCoinbaseTransactions { - // Mine a block, since we need at least one block above the genesis - // to create a spendable UTXO - mineBlockAndGetCoinbaseTransaction(t, rpcClient) - - log.Infof("Generating funding coinbase transactions") - fundingCoinbaseTransactions := &fundingCoinbaseTransactions{ - transactions: make([]*externalapi.DomainTransaction, fundingCoinbaseTransactionAmount), - } - for i := 0; i < fundingCoinbaseTransactionAmount; i++ { - fundingCoinbaseTransactions.transactions[i] = mineBlockAndGetCoinbaseTransaction(t, rpcClient) - } - - log.Infof("Maturing funding coinbase transactions") - for i := 0; i < coinbaseMaturity; i++ { - mineBlockAndGetCoinbaseTransaction(t, rpcClient) - } - - return fundingCoinbaseTransactions -} - -func submitAnAmountOfTransactionsToTheMempool(t *testing.T, rpcClient *rpcclient.RPCClient, - payAddressKeyPair *secp256k1.SchnorrKeyPair, payToPayAddressScript *externalapi.ScriptPublicKey, - fundingTransactions *fundingCoinbaseTransactions, amountToSubmit int, ignoreOrphanRejects bool) { - - log.Infof("Generating %d transactions", amountToSubmit) - transactions := make([]*externalapi.DomainTransaction, 0) - for len(transactions) < amountToSubmit { - var coinbaseTransaction *externalapi.DomainTransaction - coinbaseTransaction, fundingTransactions.transactions = fundingTransactions.transactions[0], fundingTransactions.transactions[1:] - - unspentTransactions := []*externalapi.DomainTransaction{coinbaseTransaction} - for len(transactions) < amountToSubmit && len(unspentTransactions) > 0 { - var transactionToSpend *externalapi.DomainTransaction - transactionToSpend, unspentTransactions = unspentTransactions[0], unspentTransactions[1:] - spendingTransactions := generateTransactionsWithMultipleOutputs(t, payAddressKeyPair, payToPayAddressScript, transactionToSpend) - transactions = append(transactions, spendingTransactions...) - unspentTransactions = append(unspentTransactions, spendingTransactions...) - } - log.Infof("Generated %d transactions", len(transactions)) - } - - transactions = transactions[:amountToSubmit] - log.Infof("Submitting %d transactions", len(transactions)) - - for i, transaction := range transactions { - rpcTransaction := appmessage.DomainTransactionToRPCTransaction(transaction) - _, err := rpcClient.SubmitTransaction(rpcTransaction, consensushashing.TransactionID(transaction).String(), false) - if err != nil { - if ignoreOrphanRejects && strings.Contains(err.Error(), "orphan") { - continue - } - t.Fatalf("SubmitTransaction: %+v", err) - } - log.Infof("Submitted %d transactions", i+1) - } -} - -func mineBlockAndGetCoinbaseTransaction(t *testing.T, rpcClient *rpcclient.RPCClient) *externalapi.DomainTransaction { - getBlockTemplateResponse, err := rpcClient.GetBlockTemplate(payAddress, "") - if err != nil { - t.Fatalf("GetBlockTemplate: %+v", err) - } - templateBlock, err := appmessage.RPCBlockToDomainBlock(getBlockTemplateResponse.Block) - if err != nil { - t.Fatalf("RPCBlockToDomainBlock: %+v", err) - } - mine.SolveBlock(templateBlock) - _, err = rpcClient.SubmitBlockAlsoIfNonDAA(templateBlock) - if err != nil { - t.Fatalf("SubmitBlock: %+v", err) - } - return templateBlock.Transactions[transactionhelper.CoinbaseTransactionIndex] -} - -func generateTransactionsWithMultipleOutputs(t *testing.T, - payAddressKeyPair *secp256k1.SchnorrKeyPair, payToPayAddressScript *externalapi.ScriptPublicKey, - fundingTransaction *externalapi.DomainTransaction) []*externalapi.DomainTransaction { - - var transactions []*externalapi.DomainTransaction - for fundingTransactionOutputIndex, fundingTransactionOutput := range fundingTransaction.Outputs { - if fundingTransactionOutput.Value < transactionFee { - continue - } - outputValue := (fundingTransactionOutput.Value - transactionFee) / outputsPerTransaction - - fundingTransactionID := consensushashing.TransactionID(fundingTransaction) - spendingTransactionInputs := []*externalapi.DomainTransactionInput{ - { - PreviousOutpoint: externalapi.DomainOutpoint{ - TransactionID: *fundingTransactionID, - Index: uint32(fundingTransactionOutputIndex), - }, - UTXOEntry: utxopkg.NewUTXOEntry( - fundingTransactionOutput.Value, - payToPayAddressScript, - false, - 0), - }, - } - - spendingTransactionOutputs := make([]*externalapi.DomainTransactionOutput, outputsPerTransaction) - for i := 0; i < outputsPerTransaction; i++ { - spendingTransactionOutputs[i] = &externalapi.DomainTransactionOutput{ - Value: outputValue, - ScriptPublicKey: payToPayAddressScript, - } - } - - spendingTransaction := &externalapi.DomainTransaction{ - Version: constants.MaxTransactionVersion, - Inputs: spendingTransactionInputs, - Outputs: spendingTransactionOutputs, - LockTime: 0, - SubnetworkID: subnetworks.SubnetworkIDNative, - Gas: 0, - Payload: nil, - } - - for spendingTransactionInputIndex, spendingTransactionInput := range spendingTransactionInputs { - signatureScript, err := txscript.SignatureScript( - spendingTransaction, - spendingTransactionInputIndex, - consensushashing.SigHashAll, - payAddressKeyPair, - &consensushashing.SighashReusedValues{}) - if err != nil { - t.Fatalf("SignatureScript: %+v", err) - } - spendingTransactionInput.SignatureScript = signatureScript - } - - transactions = append(transactions, spendingTransaction) - } - return transactions -} - -func decodePayAddressKeyPair(t *testing.T) *secp256k1.SchnorrKeyPair { - privateKeyBytes, err := hex.DecodeString(payAddressPrivateKey) - if err != nil { - t.Fatalf("DecodeString: %+v", err) - } - keyPair, err := secp256k1.DeserializeSchnorrPrivateKeyFromSlice(privateKeyBytes) - if err != nil { - t.Fatalf("DeserializeSchnorrPrivateKeyFromSlice: %+v", err) - } - return keyPair -} - -func buildPayToPayAddressScript(t *testing.T) *externalapi.ScriptPublicKey { - address, err := util.DecodeAddress(payAddress, dagconfig.SimnetParams.Prefix) - if err != nil { - t.Fatalf("DecodeAddress: %+v", err) - } - script, err := txscript.PayToAddrScript(address) - if err != nil { - t.Fatalf("PayToAddrScript: %+v", err) - } - return script -} diff --git a/stability-tests/minejson/config.go b/stability-tests/minejson/config.go index 0fa700ec9b..1afc0d5f81 100644 --- a/stability-tests/minejson/config.go +++ b/stability-tests/minejson/config.go @@ -3,10 +3,10 @@ package main import ( "path/filepath" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" "github.com/jessevdk/go-flags" ) diff --git a/stability-tests/minejson/log.go b/stability-tests/minejson/log.go index 8cc34702cd..66ca914b95 100644 --- a/stability-tests/minejson/log.go +++ b/stability-tests/minejson/log.go @@ -1,8 +1,8 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/minejson/main.go b/stability-tests/minejson/main.go index dd71e3fd5a..063aaa9861 100644 --- a/stability-tests/minejson/main.go +++ b/stability-tests/minejson/main.go @@ -1,12 +1,12 @@ package main import ( - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/mine" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/mine" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/profiling" "github.com/pkg/errors" ) diff --git a/stability-tests/netsync/chain_generator/config.go b/stability-tests/netsync/chain_generator/config.go index 7348572f6f..0de2585510 100644 --- a/stability-tests/netsync/chain_generator/config.go +++ b/stability-tests/netsync/chain_generator/config.go @@ -3,8 +3,8 @@ package main import ( "path/filepath" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/stability-tests/common" ) const ( diff --git a/stability-tests/netsync/chain_generator/log.go b/stability-tests/netsync/chain_generator/log.go index e8c0353d48..52f8bd1f14 100644 --- a/stability-tests/netsync/chain_generator/log.go +++ b/stability-tests/netsync/chain_generator/log.go @@ -4,9 +4,9 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/netsync/chain_generator/main.go b/stability-tests/netsync/chain_generator/main.go index 056f250c2b..e8898812e5 100644 --- a/stability-tests/netsync/chain_generator/main.go +++ b/stability-tests/netsync/chain_generator/main.go @@ -5,8 +5,8 @@ import ( "os" "strconv" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/mine" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/mine" "github.com/pkg/errors" ) diff --git a/stability-tests/netsync/check_resolve_virtual.go b/stability-tests/netsync/check_resolve_virtual.go index 7d16ecadcb..7aec3be921 100644 --- a/stability-tests/netsync/check_resolve_virtual.go +++ b/stability-tests/netsync/check_resolve_virtual.go @@ -2,8 +2,8 @@ package main import ( "fmt" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" "github.com/pkg/errors" "time" ) diff --git a/stability-tests/netsync/check_sync_rate.go b/stability-tests/netsync/check_sync_rate.go index b34f73ba58..d4064a1633 100644 --- a/stability-tests/netsync/check_sync_rate.go +++ b/stability-tests/netsync/check_sync_rate.go @@ -3,7 +3,7 @@ package main import ( "time" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" "github.com/pkg/errors" ) diff --git a/stability-tests/netsync/config.go b/stability-tests/netsync/config.go index b62c99323a..ad5205f4cd 100644 --- a/stability-tests/netsync/config.go +++ b/stability-tests/netsync/config.go @@ -3,8 +3,8 @@ package main import ( "path/filepath" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/jessevdk/go-flags" ) diff --git a/stability-tests/netsync/fast-pruning-ibd-test/generate_test.go b/stability-tests/netsync/fast-pruning-ibd-test/generate_test.go index 2c631f5bc1..b15938295a 100644 --- a/stability-tests/netsync/fast-pruning-ibd-test/generate_test.go +++ b/stability-tests/netsync/fast-pruning-ibd-test/generate_test.go @@ -1,10 +1,10 @@ package fast_pruning_ibd_test import ( - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/dagconfig" "io/ioutil" "os" "path" diff --git a/stability-tests/netsync/log.go b/stability-tests/netsync/log.go index 740a89a299..4e61e1271d 100644 --- a/stability-tests/netsync/log.go +++ b/stability-tests/netsync/log.go @@ -4,9 +4,9 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/netsync/main.go b/stability-tests/netsync/main.go index 9c961ca69c..a3def34e9e 100644 --- a/stability-tests/netsync/main.go +++ b/stability-tests/netsync/main.go @@ -3,9 +3,9 @@ package main import ( "sync/atomic" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/profiling" "github.com/pkg/errors" ) diff --git a/stability-tests/netsync/node.go b/stability-tests/netsync/node.go index 52035e5947..3262755bee 100644 --- a/stability-tests/netsync/node.go +++ b/stability-tests/netsync/node.go @@ -2,19 +2,19 @@ package main import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus" "os/exec" "strings" "sync/atomic" "syscall" "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/mine" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" - "github.com/kaspanet/kaspad/util" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/mine" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/util" + "github.com/coinexcom/kaspad/util/panics" "github.com/pkg/errors" ) diff --git a/stability-tests/orphans/check_top_is_tip.go b/stability-tests/orphans/check_top_is_tip.go index c0eafbe986..8b113e0dad 100644 --- a/stability-tests/orphans/check_top_is_tip.go +++ b/stability-tests/orphans/check_top_is_tip.go @@ -1,9 +1,9 @@ package main import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" "github.com/pkg/errors" ) diff --git a/stability-tests/orphans/config.go b/stability-tests/orphans/config.go index f344021fb6..6457b7a1a6 100644 --- a/stability-tests/orphans/config.go +++ b/stability-tests/orphans/config.go @@ -4,10 +4,10 @@ import ( "os" "path/filepath" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" "github.com/jessevdk/go-flags" ) diff --git a/stability-tests/orphans/connect_to_node.go b/stability-tests/orphans/connect_to_node.go index b4cb968e09..f2905f8705 100644 --- a/stability-tests/orphans/connect_to_node.go +++ b/stability-tests/orphans/connect_to_node.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/standalone" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/standalone" ) func connectToNode() *standalone.Routes { diff --git a/stability-tests/orphans/log.go b/stability-tests/orphans/log.go index 8459341a77..ea2b9a6437 100644 --- a/stability-tests/orphans/log.go +++ b/stability-tests/orphans/log.go @@ -1,8 +1,8 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/orphans/main.go b/stability-tests/orphans/main.go index 9abac93673..0c2f0d9643 100644 --- a/stability-tests/orphans/main.go +++ b/stability-tests/orphans/main.go @@ -7,9 +7,9 @@ import ( "github.com/pkg/errors" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/util/profiling" ) var timeout = 30 * time.Second diff --git a/stability-tests/orphans/prepare_blocks.go b/stability-tests/orphans/prepare_blocks.go index bc306e0440..f07161686c 100644 --- a/stability-tests/orphans/prepare_blocks.go +++ b/stability-tests/orphans/prepare_blocks.go @@ -1,12 +1,12 @@ package main import ( - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/mine" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/infrastructure/db/database/ldb" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/mine" "github.com/pkg/errors" ) diff --git a/stability-tests/orphans/send_blocks.go b/stability-tests/orphans/send_blocks.go index 1959fbd95c..283afda186 100644 --- a/stability-tests/orphans/send_blocks.go +++ b/stability-tests/orphans/send_blocks.go @@ -1,10 +1,10 @@ package main import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/infrastructure/network/netadapter/standalone" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/infrastructure/network/netadapter/standalone" "github.com/pkg/errors" ) diff --git a/stability-tests/reorg/config.go b/stability-tests/reorg/config.go index 6723773d2b..d6696dfac0 100644 --- a/stability-tests/reorg/config.go +++ b/stability-tests/reorg/config.go @@ -4,8 +4,8 @@ import ( "os" "path/filepath" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/jessevdk/go-flags" ) diff --git a/stability-tests/reorg/log.go b/stability-tests/reorg/log.go index f3fdb72cc3..d8626bff89 100644 --- a/stability-tests/reorg/log.go +++ b/stability-tests/reorg/log.go @@ -1,8 +1,8 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/reorg/main.go b/stability-tests/reorg/main.go index b6b66b3f23..3be003d86c 100644 --- a/stability-tests/reorg/main.go +++ b/stability-tests/reorg/main.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/profiling" ) func main() { diff --git a/stability-tests/reorg/reorg.go b/stability-tests/reorg/reorg.go index e691dc9c47..3127ac151d 100644 --- a/stability-tests/reorg/reorg.go +++ b/stability-tests/reorg/reorg.go @@ -7,13 +7,13 @@ import ( "os" "time" - "github.com/kaspanet/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/domain/consensus" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/model/testapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/testapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/dagconfig" ) func testReorg(cfg *configFlags) { diff --git a/stability-tests/rpc-idle-clients/config.go b/stability-tests/rpc-idle-clients/config.go index 7dbe1d5499..648fd6ae01 100644 --- a/stability-tests/rpc-idle-clients/config.go +++ b/stability-tests/rpc-idle-clients/config.go @@ -3,11 +3,11 @@ package main import ( "path/filepath" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" ) const ( diff --git a/stability-tests/rpc-idle-clients/log.go b/stability-tests/rpc-idle-clients/log.go index 8a96e645c0..b0a154b0e1 100644 --- a/stability-tests/rpc-idle-clients/log.go +++ b/stability-tests/rpc-idle-clients/log.go @@ -1,8 +1,8 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/rpc-idle-clients/main.go b/stability-tests/rpc-idle-clients/main.go index bc20c840b3..6bdde16e6f 100644 --- a/stability-tests/rpc-idle-clients/main.go +++ b/stability-tests/rpc-idle-clients/main.go @@ -3,10 +3,10 @@ package main import ( "time" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/profiling" "github.com/pkg/errors" ) diff --git a/stability-tests/rpc-stability/config.go b/stability-tests/rpc-stability/config.go index 8de8227dd3..fb0eab6237 100644 --- a/stability-tests/rpc-stability/config.go +++ b/stability-tests/rpc-stability/config.go @@ -3,10 +3,10 @@ package main import ( "path/filepath" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" "github.com/jessevdk/go-flags" ) diff --git a/stability-tests/rpc-stability/log.go b/stability-tests/rpc-stability/log.go index 28b5254e8f..6eafe96c45 100644 --- a/stability-tests/rpc-stability/log.go +++ b/stability-tests/rpc-stability/log.go @@ -1,8 +1,8 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/rpc-stability/main.go b/stability-tests/rpc-stability/main.go index a271807e85..f1951bbb81 100644 --- a/stability-tests/rpc-stability/main.go +++ b/stability-tests/rpc-stability/main.go @@ -1,10 +1,10 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient/grpcclient" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient/grpcclient" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/profiling" "github.com/pkg/errors" ) diff --git a/stability-tests/rpc-stability/send.go b/stability-tests/rpc-stability/send.go index 37efdefa85..b6694c65f4 100644 --- a/stability-tests/rpc-stability/send.go +++ b/stability-tests/rpc-stability/send.go @@ -1,7 +1,7 @@ package main import ( - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient/grpcclient" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient/grpcclient" "github.com/pkg/errors" ) diff --git a/stability-tests/simple-sync/config.go b/stability-tests/simple-sync/config.go index 88c4aaf917..69e2b2036f 100644 --- a/stability-tests/simple-sync/config.go +++ b/stability-tests/simple-sync/config.go @@ -3,9 +3,9 @@ package main import ( "path/filepath" + "github.com/coinexcom/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/stability-tests/common" "github.com/jessevdk/go-flags" - "github.com/kaspanet/kaspad/infrastructure/config" - "github.com/kaspanet/kaspad/stability-tests/common" ) const ( diff --git a/stability-tests/simple-sync/log.go b/stability-tests/simple-sync/log.go index 9f4a12a34a..30ef8f2b03 100644 --- a/stability-tests/simple-sync/log.go +++ b/stability-tests/simple-sync/log.go @@ -4,9 +4,9 @@ import ( "fmt" "os" - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" ) var ( diff --git a/stability-tests/simple-sync/main.go b/stability-tests/simple-sync/main.go index aedcec8ef4..43b3cefd57 100644 --- a/stability-tests/simple-sync/main.go +++ b/stability-tests/simple-sync/main.go @@ -4,10 +4,10 @@ import ( "os" "sync/atomic" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" - "github.com/kaspanet/kaspad/util/panics" - "github.com/kaspanet/kaspad/util/profiling" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/profiling" "github.com/pkg/errors" ) diff --git a/stability-tests/simple-sync/mineloop.go b/stability-tests/simple-sync/mineloop.go index 307c226a9f..4378c4bc60 100644 --- a/stability-tests/simple-sync/mineloop.go +++ b/stability-tests/simple-sync/mineloop.go @@ -3,11 +3,10 @@ package main import ( "time" - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/stability-tests/common/rpc" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/stability-tests/common/rpc" + "github.com/coinexcom/kaspad/util" "github.com/pkg/errors" ) @@ -91,22 +90,7 @@ func mineLoop(syncerRPCClient, syncedRPCClient *rpc.Client) error { } func generateAddress() (util.Address, error) { - privateKey, err := secp256k1.GenerateSchnorrKeyPair() - if err != nil { - return nil, err - } - - pubKey, err := privateKey.SchnorrPublicKey() - if err != nil { - return nil, err - } - - pubKeySerialized, err := pubKey.Serialize() - if err != nil { - return nil, err - } - - return util.NewAddressPublicKey(pubKeySerialized[:], activeConfig().ActiveNetParams.Prefix) + return nil, errors.New("fail") } func areTipsAreEqual(resultA, resultB *appmessage.GetBlockDAGInfoResponseMessage) bool { diff --git a/stability-tests/simple-sync/start-nodes.go b/stability-tests/simple-sync/start-nodes.go index 3ccd0d38b0..20ff74bb01 100644 --- a/stability-tests/simple-sync/start-nodes.go +++ b/stability-tests/simple-sync/start-nodes.go @@ -7,8 +7,8 @@ import ( "sync/atomic" "time" - "github.com/kaspanet/kaspad/stability-tests/common" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/stability-tests/common" + "github.com/coinexcom/kaspad/util/panics" "github.com/pkg/errors" ) diff --git a/testing/integration/16_incoming_connections_test.go b/testing/integration/16_incoming_connections_test.go index 8ccc6e8378..86a34cbef4 100644 --- a/testing/integration/16_incoming_connections_test.go +++ b/testing/integration/16_incoming_connections_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" ) func Test16IncomingConnections(t *testing.T) { diff --git a/testing/integration/address_exchange_test.go b/testing/integration/address_exchange_test.go index fc59b268f9..3a17806585 100644 --- a/testing/integration/address_exchange_test.go +++ b/testing/integration/address_exchange_test.go @@ -1,7 +1,7 @@ package integration import ( - "github.com/kaspanet/kaspad/infrastructure/network/addressmanager" + "github.com/coinexcom/kaspad/infrastructure/network/addressmanager" "testing" ) diff --git a/testing/integration/basic_sync_test.go b/testing/integration/basic_sync_test.go index a5b5eb8b6c..010bc0fbc9 100644 --- a/testing/integration/basic_sync_test.go +++ b/testing/integration/basic_sync_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" ) func TestIntegrationBasicSync(t *testing.T) { diff --git a/testing/integration/config_test.go b/testing/integration/config_test.go index 6a975bd33d..6d071e5db8 100644 --- a/testing/integration/config_test.go +++ b/testing/integration/config_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/infrastructure/config" ) const ( diff --git a/testing/integration/ibd_test.go b/testing/integration/ibd_test.go index e45e514115..ac035ae4ca 100644 --- a/testing/integration/ibd_test.go +++ b/testing/integration/ibd_test.go @@ -1,18 +1,18 @@ package integration import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/mining" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/domain/consensus/utils/mining" "math/rand" "reflect" "sync" "testing" "time" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" ) func TestIBD(t *testing.T) { diff --git a/testing/integration/log_test.go b/testing/integration/log_test.go index ee6875207c..4aaf8cd949 100644 --- a/testing/integration/log_test.go +++ b/testing/integration/log_test.go @@ -6,8 +6,8 @@ package integration import ( - "github.com/kaspanet/kaspad/infrastructure/logger" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/util/panics" ) var log = logger.RegisterSubSystem("INTG") diff --git a/testing/integration/main_test.go b/testing/integration/main_test.go index 7520d8f1ff..f3a4eff666 100644 --- a/testing/integration/main_test.go +++ b/testing/integration/main_test.go @@ -1,7 +1,7 @@ package integration import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" "os" "testing" ) diff --git a/testing/integration/mining_test.go b/testing/integration/mining_test.go index 6a483cd2d4..c2b8b05385 100644 --- a/testing/integration/mining_test.go +++ b/testing/integration/mining_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/mining" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/mining" ) func mineNextBlock(t *testing.T, harness *appHarness) *externalapi.DomainBlock { diff --git a/testing/integration/notifications_test.go b/testing/integration/notifications_test.go index 3689279551..0b53739e27 100644 --- a/testing/integration/notifications_test.go +++ b/testing/integration/notifications_test.go @@ -3,7 +3,7 @@ package integration import ( "testing" - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" ) func setOnBlockAddedHandler(t *testing.T, harness *appHarness, handler func(notification *appmessage.BlockAddedNotificationMessage)) { diff --git a/testing/integration/rpc_test.go b/testing/integration/rpc_test.go index 76caf1ff5a..f7ebd1b611 100644 --- a/testing/integration/rpc_test.go +++ b/testing/integration/rpc_test.go @@ -1,12 +1,12 @@ package integration import ( - "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/infrastructure/config" "runtime" "testing" "time" - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" + "github.com/coinexcom/kaspad/infrastructure/network/rpcclient" ) const rpcTimeout = 10 * time.Second diff --git a/testing/integration/selected_parent_chain_test.go b/testing/integration/selected_parent_chain_test.go index f5f8280356..1e7217e6cb 100644 --- a/testing/integration/selected_parent_chain_test.go +++ b/testing/integration/selected_parent_chain_test.go @@ -3,10 +3,10 @@ package integration import ( "testing" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" + "github.com/coinexcom/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/domain/consensus/utils/consensushashing" ) func TestVirtualSelectedParentChain(t *testing.T) { diff --git a/testing/integration/setup_test.go b/testing/integration/setup_test.go index 4b28234847..bacdb65af1 100644 --- a/testing/integration/setup_test.go +++ b/testing/integration/setup_test.go @@ -4,14 +4,14 @@ import ( "path/filepath" "testing" - "github.com/kaspanet/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" + "github.com/coinexcom/kaspad/infrastructure/db/database/ldb" - "github.com/kaspanet/kaspad/infrastructure/db/database" + "github.com/coinexcom/kaspad/infrastructure/db/database" - "github.com/kaspanet/kaspad/app" - "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/coinexcom/kaspad/app" + "github.com/coinexcom/kaspad/infrastructure/config" ) type appHarness struct { diff --git a/testing/integration/tx_relay_test.go b/testing/integration/tx_relay_test.go deleted file mode 100644 index cd01efd1f2..0000000000 --- a/testing/integration/tx_relay_test.go +++ /dev/null @@ -1,177 +0,0 @@ -package integration - -import ( - "encoding/hex" - "strings" - "testing" - "time" - - "github.com/kaspanet/kaspad/app/protocol/flowcontext" - - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/util" -) - -func TestTxRelay(t *testing.T) { - payer, mediator, payee, teardown := standardSetup(t) - defer teardown() - - // Connect nodes in chain: payer <--> mediator <--> payee - // So that payee doesn't directly get transactions from payer - connect(t, payer, mediator) - connect(t, mediator, payee) - - payeeBlockAddedChan := make(chan *appmessage.RPCBlockHeader) - setOnBlockAddedHandler(t, payee, func(notification *appmessage.BlockAddedNotificationMessage) { - payeeBlockAddedChan <- notification.Block.Header - }) - // skip the first block because it's paying to genesis script - mineNextBlock(t, payer) - waitForPayeeToReceiveBlock(t, payeeBlockAddedChan) - // use the second block to get money to pay with - secondBlock := mineNextBlock(t, payer) - waitForPayeeToReceiveBlock(t, payeeBlockAddedChan) - - // Mine BlockCoinbaseMaturity more blocks for our money to mature - for i := uint64(0); i < payer.config.ActiveNetParams.BlockCoinbaseMaturity; i++ { - mineNextBlock(t, payer) - waitForPayeeToReceiveBlock(t, payeeBlockAddedChan) - } - - // Sleep for `TransactionIDPropagationInterval` to make sure that our transaction will - // be propagated - time.Sleep(flowcontext.TransactionIDPropagationInterval) - - msgTx := generateTx(t, secondBlock.Transactions[transactionhelper.CoinbaseTransactionIndex], payer, payee) - domainTransaction := appmessage.MsgTxToDomainTransaction(msgTx) - rpcTransaction := appmessage.DomainTransactionToRPCTransaction(domainTransaction) - response, err := payer.rpcClient.SubmitTransaction(rpcTransaction, consensushashing.TransactionID(domainTransaction).String(), false) - if err != nil { - t.Fatalf("Error submitting transaction: %+v", err) - } - txID := response.TransactionID - - txAddedToMempoolChan := make(chan struct{}) - - mempoolAddressQuery := []string{payee.miningAddress, payer.miningAddress} - - spawn("TestTxRelay-WaitForTransactionPropagation", func() { - ticker := time.NewTicker(10 * time.Millisecond) - defer ticker.Stop() - - for range ticker.C { - - getMempoolEntryResponse, err := payee.rpcClient.GetMempoolEntry(txID, true, false) - if err != nil { - if strings.Contains(err.Error(), "not found") { - continue - } - - t.Fatalf("Error getting mempool entry: %+v", err) - } - mempoolEntry := getMempoolEntryResponse.Entry - if mempoolEntry.IsOrphan { - t.Fatalf("transaction %s is an orphan, although it shouldn't be", mempoolEntry.Transaction.VerboseData.TransactionID) - } - - getMempoolEntriesByAddressesResponse, err := payee.rpcClient.GetMempoolEntriesByAddresses(mempoolAddressQuery, true, false) - if err != nil { - t.Fatalf("Error getting mempool entry: %+v", err) - } - for _, mempoolEntryByAddress := range getMempoolEntriesByAddressesResponse.Entries { - if payee.miningAddress == mempoolEntryByAddress.Address { - if len(mempoolEntryByAddress.Sending) > 1 { - t.Fatal("Error payee is sending") - } - if len(mempoolEntryByAddress.Receiving) < 1 { - t.Fatal("Error payee is not reciving") - } - } - if payer.miningAddress == mempoolEntryByAddress.Address { - if len(mempoolEntryByAddress.Sending) < 1 { - t.Fatal("Error payer is not sending") - } - if len(mempoolEntryByAddress.Receiving) > 1 { - t.Fatal("Error payer is reciving") - } - } - for _, mempoolEntry := range mempoolEntryByAddress.Receiving { - if mempoolEntry.IsOrphan { - t.Fatalf("transaction %s is an orphan, although it shouldn't be", mempoolEntry.Transaction.VerboseData.TransactionID) - } - } - for _, mempoolEntry := range mempoolEntryByAddress.Sending { - if mempoolEntry.IsOrphan { - t.Fatalf("transaction %s is an orphan, although it shouldn't be", mempoolEntry.Transaction.VerboseData.TransactionID) - } - } - } - - close(txAddedToMempoolChan) - return - } - }) - - select { - case <-txAddedToMempoolChan: - case <-time.After(defaultTimeout): - t.Fatalf("Timeout waiting for transaction to be accepted into mempool") - } -} - -func waitForPayeeToReceiveBlock(t *testing.T, payeeBlockAddedChan chan *appmessage.RPCBlockHeader) { - select { - case <-payeeBlockAddedChan: - case <-time.After(defaultTimeout): - t.Fatalf("Timeout waiting for block added") - } -} - -func generateTx(t *testing.T, firstBlockCoinbase *externalapi.DomainTransaction, payer, payee *appHarness) *appmessage.MsgTx { - txIns := make([]*appmessage.TxIn, 1) - txIns[0] = appmessage.NewTxIn(appmessage.NewOutpoint(consensushashing.TransactionID(firstBlockCoinbase), 0), []byte{}, 0, 1) - - payeeAddress, err := util.DecodeAddress(payee.miningAddress, util.Bech32PrefixKaspaSim) - if err != nil { - t.Fatalf("Error decoding payeeAddress: %+v", err) - } - toScript, err := txscript.PayToAddrScript(payeeAddress) - if err != nil { - t.Fatalf("Error generating script: %+v", err) - } - - txOuts := []*appmessage.TxOut{appmessage.NewTxOut(firstBlockCoinbase.Outputs[0].Value-1000, toScript)} - - msgTx := appmessage.NewNativeMsgTx(constants.MaxTransactionVersion, txIns, txOuts) - - privateKeyBytes, err := hex.DecodeString(payer.miningAddressPrivateKey) - if err != nil { - t.Fatalf("Error decoding private key: %+v", err) - } - privateKey, err := secp256k1.DeserializeSchnorrPrivateKeyFromSlice(privateKeyBytes) - if err != nil { - t.Fatalf("Error deserializing private key: %+v", err) - } - - fromScript := firstBlockCoinbase.Outputs[0].ScriptPublicKey - fromAmount := firstBlockCoinbase.Outputs[0].Value - - tx := appmessage.MsgTxToDomainTransaction(msgTx) - tx.Inputs[0].UTXOEntry = utxo.NewUTXOEntry(fromAmount, fromScript, false, 500) - signatureScript, err := txscript.SignatureScript(tx, 0, consensushashing.SigHashAll, privateKey, - &consensushashing.SighashReusedValues{}) - if err != nil { - t.Fatalf("Error signing transaction: %+v", err) - } - msgTx.TxIn[0].SignatureScript = signatureScript - - return msgTx -} diff --git a/testing/integration/utxo_index_test.go b/testing/integration/utxo_index_test.go deleted file mode 100644 index 04e4ff5584..0000000000 --- a/testing/integration/utxo_index_test.go +++ /dev/null @@ -1,228 +0,0 @@ -package integration - -import ( - "encoding/hex" - "testing" - - "github.com/kaspanet/kaspad/domain/consensus/utils/utxo" - - "github.com/kaspanet/go-secp256k1" - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing" - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionid" - "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" - "github.com/kaspanet/kaspad/util" -) - -func TestUTXOIndex(t *testing.T) { - // Setup a single kaspad instance - harnessParams := &harnessParams{ - p2pAddress: p2pAddress1, - rpcAddress: rpcAddress1, - miningAddress: miningAddress1, - miningAddressPrivateKey: miningAddress1PrivateKey, - utxoIndex: true, - } - kaspad, teardown := setupHarness(t, harnessParams) - defer teardown() - - // skip the first block because it's paying to genesis script, - // which contains no outputs - mineNextBlock(t, kaspad) - - // Register for UTXO changes - const blockAmountToMine = 100 - onUTXOsChangedChan := make(chan *appmessage.UTXOsChangedNotificationMessage, blockAmountToMine) - err := kaspad.rpcClient.RegisterForUTXOsChangedNotifications([]string{miningAddress1}, func( - notification *appmessage.UTXOsChangedNotificationMessage) { - - onUTXOsChangedChan <- notification - }) - if err != nil { - t.Fatalf("Failed to register for UTXO change notifications: %s", err) - } - - // Mine some blocks - for i := 0; i < blockAmountToMine; i++ { - mineNextBlock(t, kaspad) - } - - //check if rewards corrosponds to circulating supply. - getCoinSupplyResponse, err := kaspad.rpcClient.GetCoinSupply() - if err != nil { - t.Fatalf("Error Retriving Coin supply: %s", err) - } - - rewardsMinedSompi := uint64(blockAmountToMine * constants.SompiPerKaspa * 500) - getBlockCountResponse, err := kaspad.rpcClient.GetBlockCount() - if err != nil { - t.Fatalf("Error Retriving BlockCount: %s", err) - } - rewardsMinedViaBlockCountSompi := uint64( - (getBlockCountResponse.BlockCount - 2) * constants.SompiPerKaspa * 500, // -2 because of genesis and virtual. - ) - - if getCoinSupplyResponse.CirculatingSompi != rewardsMinedSompi { - t.Fatalf("Error: Circulating supply Mismatch - Circulating Sompi: %d Sompi Mined: %d", getCoinSupplyResponse.CirculatingSompi, rewardsMinedSompi) - } else if getCoinSupplyResponse.CirculatingSompi != rewardsMinedViaBlockCountSompi { - t.Fatalf("Error: Circulating supply Mismatch - Circulating Sompi: %d Sompi Mined via Block count: %d", getCoinSupplyResponse.CirculatingSompi, rewardsMinedViaBlockCountSompi) - } - - // Collect the UTXO and make sure there's nothing in Removed - // Note that we expect blockAmountToMine-1 messages because - // the last block won't be accepted until the next block is - // mined - var notificationEntries []*appmessage.UTXOsByAddressesEntry - for i := 0; i < blockAmountToMine; i++ { - notification := <-onUTXOsChangedChan - if len(notification.Removed) > 0 { - t.Fatalf("Unexpectedly received that a UTXO has been removed") - } - for _, added := range notification.Added { - notificationEntries = append(notificationEntries, added) - } - } - - // Submit a few transactions that spends some UTXOs - const transactionAmountToSpend = 5 - for i := 0; i < transactionAmountToSpend; i++ { - rpcTransaction, transactionID := buildTransactionForUTXOIndexTest(t, notificationEntries[i]) - _, err = kaspad.rpcClient.SubmitTransaction(rpcTransaction, transactionID, false) - if err != nil { - t.Fatalf("Error submitting transaction: %s", err) - } - } - - // Mine a block to include the above transactions - mineNextBlock(t, kaspad) - - // Make sure this block removed the UTXOs we spent - notification := <-onUTXOsChangedChan - if len(notification.Removed) != transactionAmountToSpend { - t.Fatalf("Unexpected amount of removed UTXOs. Want: %d, got: %d", - transactionAmountToSpend, len(notification.Removed)) - } - for i := 0; i < transactionAmountToSpend; i++ { - entry := notificationEntries[i] - - found := false - for _, removed := range notification.Removed { - if *removed.Outpoint == *entry.Outpoint { - found = true - break - } - } - if !found { - t.Fatalf("Missing entry amongst removed UTXOs: %s:%d", - entry.Outpoint.TransactionID, entry.Outpoint.Index) - } - } - for _, added := range notification.Added { - notificationEntries = append(notificationEntries, added) - } - - // Remove the UTXOs we spent from `notificationEntries` - notificationEntries = notificationEntries[transactionAmountToSpend:] - - // Get all the UTXOs and make sure the response is equivalent - // to the data collected via notifications - utxosByAddressesResponse, err := kaspad.rpcClient.GetUTXOsByAddresses([]string{miningAddress1}) - if err != nil { - t.Fatalf("Failed to get UTXOs: %s", err) - } - if len(notificationEntries) != len(utxosByAddressesResponse.Entries) { - t.Fatalf("Unexpected amount of UTXOs. Want: %d, got: %d", - len(notificationEntries), len(utxosByAddressesResponse.Entries)) - } - for _, notificationEntry := range notificationEntries { - var foundResponseEntry *appmessage.UTXOsByAddressesEntry - for _, responseEntry := range utxosByAddressesResponse.Entries { - if *notificationEntry.Outpoint == *responseEntry.Outpoint { - foundResponseEntry = responseEntry - break - } - } - if foundResponseEntry == nil { - t.Fatalf("Missing entry in UTXOs response: %s:%d", - notificationEntry.Outpoint.TransactionID, notificationEntry.Outpoint.Index) - } - if notificationEntry.UTXOEntry.Amount != foundResponseEntry.UTXOEntry.Amount { - t.Fatalf("Unexpected UTXOEntry for outpoint %s:%d. Want: %+v, got: %+v", - notificationEntry.Outpoint.TransactionID, notificationEntry.Outpoint.Index, - notificationEntry.UTXOEntry, foundResponseEntry.UTXOEntry) - } - if notificationEntry.UTXOEntry.BlockDAAScore != foundResponseEntry.UTXOEntry.BlockDAAScore { - t.Fatalf("Unexpected UTXOEntry for outpoint %s:%d. Want: %+v, got: %+v", - notificationEntry.Outpoint.TransactionID, notificationEntry.Outpoint.Index, - notificationEntry.UTXOEntry, foundResponseEntry.UTXOEntry) - } - if notificationEntry.UTXOEntry.IsCoinbase != foundResponseEntry.UTXOEntry.IsCoinbase { - t.Fatalf("Unexpected UTXOEntry for outpoint %s:%d. Want: %+v, got: %+v", - notificationEntry.Outpoint.TransactionID, notificationEntry.Outpoint.Index, - notificationEntry.UTXOEntry, foundResponseEntry.UTXOEntry) - } - if *notificationEntry.UTXOEntry.ScriptPublicKey != *foundResponseEntry.UTXOEntry.ScriptPublicKey { - t.Fatalf("Unexpected UTXOEntry for outpoint %s:%d. Want: %+v, got: %+v", - notificationEntry.Outpoint.TransactionID, notificationEntry.Outpoint.Index, - notificationEntry.UTXOEntry, foundResponseEntry.UTXOEntry) - } - } -} - -func buildTransactionForUTXOIndexTest(t *testing.T, entry *appmessage.UTXOsByAddressesEntry) (*appmessage.RPCTransaction, string) { - transactionIDBytes, err := hex.DecodeString(entry.Outpoint.TransactionID) - if err != nil { - t.Fatalf("Error decoding transaction ID: %s", err) - } - transactionID, err := transactionid.FromBytes(transactionIDBytes) - if err != nil { - t.Fatalf("Error decoding transaction ID: %s", err) - } - - txIns := make([]*appmessage.TxIn, 1) - txIns[0] = appmessage.NewTxIn(appmessage.NewOutpoint(transactionID, entry.Outpoint.Index), []byte{}, 0, 1) - - payeeAddress, err := util.DecodeAddress(miningAddress1, util.Bech32PrefixKaspaSim) - if err != nil { - t.Fatalf("Error decoding payeeAddress: %+v", err) - } - toScript, err := txscript.PayToAddrScript(payeeAddress) - if err != nil { - t.Fatalf("Error generating script: %+v", err) - } - - txOuts := []*appmessage.TxOut{appmessage.NewTxOut(entry.UTXOEntry.Amount-1000, toScript)} - - fromScriptCode, err := hex.DecodeString(entry.UTXOEntry.ScriptPublicKey.Script) - if err != nil { - t.Fatalf("Error decoding script public key: %s", err) - } - fromScript := &externalapi.ScriptPublicKey{Script: fromScriptCode, Version: 0} - fromAmount := entry.UTXOEntry.Amount - - msgTx := appmessage.NewNativeMsgTx(constants.MaxTransactionVersion, txIns, txOuts) - - privateKeyBytes, err := hex.DecodeString(miningAddress1PrivateKey) - if err != nil { - t.Fatalf("Error decoding private key: %+v", err) - } - privateKey, err := secp256k1.DeserializeSchnorrPrivateKeyFromSlice(privateKeyBytes) - if err != nil { - t.Fatalf("Error deserializing private key: %+v", err) - } - - tx := appmessage.MsgTxToDomainTransaction(msgTx) - tx.Inputs[0].UTXOEntry = utxo.NewUTXOEntry(fromAmount, fromScript, false, 500) - - signatureScript, err := txscript.SignatureScript(tx, 0, consensushashing.SigHashAll, privateKey, - &consensushashing.SighashReusedValues{}) - if err != nil { - t.Fatalf("Error signing transaction: %+v", err) - } - msgTx.TxIn[0].SignatureScript = signatureScript - - domainTransaction := appmessage.MsgTxToDomainTransaction(msgTx) - return appmessage.DomainTransactionToRPCTransaction(domainTransaction), consensushashing.TransactionID(domainTransaction).String() -} diff --git a/testing/integration/virtual_selected_parent_blue_score_test.go b/testing/integration/virtual_selected_parent_blue_score_test.go index 651fc40413..8ae5dc8c7d 100644 --- a/testing/integration/virtual_selected_parent_blue_score_test.go +++ b/testing/integration/virtual_selected_parent_blue_score_test.go @@ -1,7 +1,7 @@ package integration import ( - "github.com/kaspanet/kaspad/app/appmessage" + "github.com/coinexcom/kaspad/app/appmessage" "testing" ) diff --git a/util/README.md b/util/README.md index 811e8e6d86..194bdb0e11 100644 --- a/util/README.md +++ b/util/README.md @@ -2,6 +2,6 @@ util ======= [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](https://choosealicense.com/licenses/isc/) -[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/kaspanet/util) +[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/coinexcom/util) Package util provides kaspa-specific convenience functions and types. diff --git a/util/address.go b/util/address.go index 3b4e8f2d73..b2efbdd1a7 100644 --- a/util/address.go +++ b/util/address.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/blake2b" - "github.com/kaspanet/kaspad/util/bech32" + "github.com/coinexcom/kaspad/util/bech32" ) var ( diff --git a/util/address_test.go b/util/address_test.go index 158bc99efb..fdc945bd91 100644 --- a/util/address_test.go +++ b/util/address_test.go @@ -12,7 +12,7 @@ import ( "strings" "testing" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/util" ) func TestAddresses(t *testing.T) { diff --git a/util/amount.go b/util/amount.go index ba22920b83..7def875b2a 100644 --- a/util/amount.go +++ b/util/amount.go @@ -5,7 +5,7 @@ package util import ( - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" "github.com/pkg/errors" "math" "strconv" diff --git a/util/amount_test.go b/util/amount_test.go index 962af6ad6d..47765d0736 100644 --- a/util/amount_test.go +++ b/util/amount_test.go @@ -5,11 +5,9 @@ package util_test import ( - "github.com/kaspanet/kaspad/domain/consensus/utils/constants" + "github.com/coinexcom/kaspad/domain/consensus/utils/constants" "math" "testing" - - . "github.com/kaspanet/kaspad/util" ) func TestAmountCreation(t *testing.T) { diff --git a/util/appdata_test.go b/util/appdata_test.go index 1451205bf4..d2bac67376 100644 --- a/util/appdata_test.go +++ b/util/appdata_test.go @@ -12,7 +12,7 @@ import ( "testing" "unicode" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/util" ) // TestAppDataDir tests the API for AppDir to ensure it gives expected diff --git a/util/bech32/README.md b/util/bech32/README.md index ef75fc42de..d2af41263d 100644 --- a/util/bech32/README.md +++ b/util/bech32/README.md @@ -2,14 +2,14 @@ bech32 ========== [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](https://choosealicense.com/licenses/isc/) -[![GoDoc](https://godoc.org/github.com/kaspanet/kaspad/util/bech32?status.png)](http://godoc.org/github.com/kaspanet/kaspad/util/bech32) +[![GoDoc](https://godoc.org/github.com/coinexcom/kaspad/util/bech32?status.png)](http://godoc.org/github.com/coinexcom/kaspad/util/bech32) Package bech32 provides a Go implementation of the bech32 format. ## Examples -* [Bech32 decode Example](http://godoc.org/github.com/kaspanet/kaspad/util/bech32#example-Bech32Decode) +* [Bech32 decode Example](http://godoc.org/github.com/coinexcom/kaspad/util/bech32#example-Bech32Decode) Demonstrates how to decode a bech32 encoded string. -* [Bech32 encode Example](http://godoc.org/github.com/kaspanet/kaspad/util/bech32#example-BechEncode) +* [Bech32 encode Example](http://godoc.org/github.com/coinexcom/kaspad/util/bech32#example-BechEncode) Demonstrates how to encode data into a bech32 string. diff --git a/util/bech32/bech32_test.go b/util/bech32/bech32_test.go index 2a1190f077..66fc63e11a 100644 --- a/util/bech32/bech32_test.go +++ b/util/bech32/bech32_test.go @@ -5,7 +5,7 @@ package bech32_test import ( - "github.com/kaspanet/kaspad/util/bech32" + "github.com/coinexcom/kaspad/util/bech32" "testing" ) diff --git a/util/bech32/example_test.go b/util/bech32/example_test.go index 0d5f96500a..42bd6c23b7 100644 --- a/util/bech32/example_test.go +++ b/util/bech32/example_test.go @@ -7,7 +7,7 @@ package bech32_test import ( "encoding/hex" "fmt" - "github.com/kaspanet/kaspad/util/bech32" + "github.com/coinexcom/kaspad/util/bech32" ) // This example demonstrates how to decode a bech32 encoded string. diff --git a/util/difficulty/difficulty_test.go b/util/difficulty/difficulty_test.go index 075297e395..5712a09c73 100644 --- a/util/difficulty/difficulty_test.go +++ b/util/difficulty/difficulty_test.go @@ -2,14 +2,14 @@ package difficulty_test import ( "fmt" - "github.com/kaspanet/kaspad/domain/consensus" + "github.com/coinexcom/kaspad/domain/consensus" "math" "math/big" "testing" - "github.com/kaspanet/kaspad/domain/consensus/utils/testutils" - "github.com/kaspanet/kaspad/domain/dagconfig" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/domain/consensus/utils/testutils" + "github.com/coinexcom/kaspad/domain/dagconfig" + "github.com/coinexcom/kaspad/util/difficulty" ) func TestGetHashrateString(t *testing.T) { diff --git a/util/example_test.go b/util/example_test.go index 1cf6152813..f91654d268 100644 --- a/util/example_test.go +++ b/util/example_test.go @@ -2,11 +2,11 @@ package util_test import ( "fmt" - "github.com/kaspanet/kaspad/util/difficulty" + "github.com/coinexcom/kaspad/util/difficulty" "math" "math/big" - "github.com/kaspanet/kaspad/util" + "github.com/coinexcom/kaspad/util" ) func ExampleAmount() { diff --git a/util/internal_test.go b/util/internal_test.go index 89dec921aa..8485986304 100644 --- a/util/internal_test.go +++ b/util/internal_test.go @@ -12,7 +12,7 @@ interface. The functions are only exported while the tests are being run. package util import ( - "github.com/kaspanet/kaspad/util/bech32" + "github.com/coinexcom/kaspad/util/bech32" "golang.org/x/crypto/blake2b" ) diff --git a/util/locks/log.go b/util/locks/log.go index e8cd0ae055..0de10a9300 100644 --- a/util/locks/log.go +++ b/util/locks/log.go @@ -1,7 +1,7 @@ package locks import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var log = logger.RegisterSubSystem("UTIL") diff --git a/util/math/min_test.go b/util/math/min_test.go index 62d46f4d61..776810e11a 100644 --- a/util/math/min_test.go +++ b/util/math/min_test.go @@ -1,7 +1,7 @@ package math_test import ( - utilMath "github.com/kaspanet/kaspad/util/math" + utilMath "github.com/coinexcom/kaspad/util/math" "math" "testing" ) diff --git a/util/panics/log.go b/util/panics/log.go index 5769ee2cc2..c7c94c6529 100644 --- a/util/panics/log.go +++ b/util/panics/log.go @@ -1,7 +1,7 @@ package panics import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var utilLog = logger.RegisterSubSystem("UTIL") diff --git a/util/panics/panics.go b/util/panics/panics.go index 025fc208d9..a2b0cd1e12 100644 --- a/util/panics/panics.go +++ b/util/panics/panics.go @@ -2,7 +2,7 @@ package panics import ( "fmt" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" "os" "runtime/debug" "sync/atomic" diff --git a/util/profiling/profiling.go b/util/profiling/profiling.go index b77969f2ca..e4fa5dfa1a 100644 --- a/util/profiling/profiling.go +++ b/util/profiling/profiling.go @@ -2,7 +2,7 @@ package profiling import ( "fmt" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" "net" "net/http" "os" @@ -12,7 +12,7 @@ import ( // Required for profiling _ "net/http/pprof" - "github.com/kaspanet/kaspad/util/panics" + "github.com/coinexcom/kaspad/util/panics" "runtime" "runtime/pprof" ) diff --git a/util/staging/commit_all_changes.go b/util/staging/commit_all_changes.go index 8e7c2cae94..7f790d4939 100644 --- a/util/staging/commit_all_changes.go +++ b/util/staging/commit_all_changes.go @@ -1,8 +1,8 @@ package staging import ( - "github.com/kaspanet/kaspad/domain/consensus/model" - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/domain/consensus/model" + "github.com/coinexcom/kaspad/infrastructure/logger" "sync/atomic" ) diff --git a/util/staging/log.go b/util/staging/log.go index bf22489238..d0d9be56c6 100644 --- a/util/staging/log.go +++ b/util/staging/log.go @@ -1,7 +1,7 @@ package staging import ( - "github.com/kaspanet/kaspad/infrastructure/logger" + "github.com/coinexcom/kaspad/infrastructure/logger" ) var utilLog = logger.RegisterSubSystem("UTIL") diff --git a/util/txmass/calculator.go b/util/txmass/calculator.go index 5206f7fe57..b6132c2aa7 100644 --- a/util/txmass/calculator.go +++ b/util/txmass/calculator.go @@ -1,8 +1,8 @@ package txmass import ( - "github.com/kaspanet/kaspad/domain/consensus/model/externalapi" - "github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper" + "github.com/coinexcom/kaspad/domain/consensus/model/externalapi" + "github.com/coinexcom/kaspad/domain/consensus/utils/transactionhelper" ) // Calculator exposes methods to calculate the mass of a transaction diff --git a/version/version.go b/version/version.go index 31ba813c7e..158b5a727c 100644 --- a/version/version.go +++ b/version/version.go @@ -15,7 +15,7 @@ const ( ) // appBuild is defined as a variable so it can be overridden during the build -// process with '-ldflags "-X github.com/kaspanet/kaspad/version.appBuild=foo"' if needed. +// process with '-ldflags "-X github.com/coinexcom/kaspad/version.appBuild=foo"' if needed. // It MUST only contain characters from validCharacters. var appBuild string