Skip to content

Commit

Permalink
去除cgo依赖代码,包名改名
Browse files Browse the repository at this point in the history
  • Loading branch information
ekko-Huang committed Sep 12, 2024
1 parent 48a142e commit 647c12b
Show file tree
Hide file tree
Showing 879 changed files with 2,505 additions and 7,684 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand Down Expand Up @@ -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/...
```
Expand All @@ -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

Expand Down
22 changes: 11 additions & 11 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/common_test.go
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
16 changes: 8 additions & 8 deletions app/appmessage/domainconverters.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions app/appmessage/p2p_msgblock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions app/appmessage/p2p_msgblockheader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblockheader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblocklocator.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblocklocator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblockwithtrusteddata.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgibdblocklocator.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgibdblocklocatorhighesthash.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgibdchainblocklocator.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msginvrelayblock.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msginvtransaction.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgpruningpointutxosetchunk.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestaddresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestanticone.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestblocklocator.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestblocklocator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestheaders.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestheaders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestibdblocks.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestibdchainblocklocator.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestrelayblocks.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequesttransactions.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgtransactionnotfound.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions app/appmessage/p2p_msgtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
8 changes: 4 additions & 4 deletions app/appmessage/p2p_msgtx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 647c12b

Please sign in to comment.