mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-26 15:35:55 +00:00
karlan
This commit is contained in:
parent
92574e623f
commit
ad5480443a
@ -1,14 +1,14 @@
|
||||
|
||||
Kaspad
|
||||
====
|
||||
|
||||
[](https://choosealicense.com/licenses/isc/)
|
||||
[](http://godoc.org/github.com/kaspanet/kaspad)
|
||||
[](http://godoc.org/github.com/kaspanet/kaspad/)
|
||||
|
||||
Kaspad is the reference full node Kaspa implementation written in Go (golang).
|
||||
|
||||
## What is kaspa
|
||||
|
||||
Kaspa is a fork of Kaspa with an ASIC resistance implementation
|
||||
Kaspa is an attempt at a proof-of-work cryptocurrency with instant confirmations and sub-second block times. It is based on [the PHANTOM protocol](https://eprint.iacr.org/2018/104.pdf), a generalization of Nakamoto consensus.
|
||||
|
||||
## Requirements
|
||||
@ -51,14 +51,13 @@ $ kaspad
|
||||
```
|
||||
|
||||
## Discord
|
||||
Join our discord server using the following link: https://discord.gg/YNYnNN5Pf2
|
||||
Join our discord server using the following link: https://discord.gg/ZPZRvgMJDT
|
||||
|
||||
## Issue Tracker
|
||||
|
||||
The [integrated github issue tracker](https://github.com/kaspanet/kaspad/issues)
|
||||
is used for this project.
|
||||
|
||||
Issue priorities may be seen at https://github.com/orgs/kaspanet/projects/4
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ func TestVersion(t *testing.T) {
|
||||
pver := uint32(4)
|
||||
|
||||
// Create version message data.
|
||||
tcpAddrMe := &net.TCPAddr{IP: net.ParseIP("127.0.0.1"), Port: 16111}
|
||||
tcpAddrMe := &net.TCPAddr{IP: net.ParseIP("127.0.0.1"), Port: 42111}
|
||||
me := NewNetAddress(tcpAddrMe)
|
||||
generatedID, err := id.GenerateID()
|
||||
if err != nil {
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
// TestNetAddress tests the NetAddress API.
|
||||
func TestNetAddress(t *testing.T) {
|
||||
ip := net.ParseIP("127.0.0.1")
|
||||
port := 16111
|
||||
port := 42111
|
||||
|
||||
// Test NewNetAddress.
|
||||
na := NewNetAddress(&net.TCPAddr{IP: ip, Port: port})
|
||||
|
||||
@ -22,6 +22,9 @@ func (v *blockValidator) ValidateHeaderInIsolation(stagingArea *model.StagingAre
|
||||
return err
|
||||
}
|
||||
|
||||
//todo : drop this
|
||||
//log.Info("blockHash %s - genesisHash %s", blockHash, v.genesisHash)
|
||||
|
||||
if !blockHash.Equal(v.genesisHash) {
|
||||
err = v.checkBlockVersion(header)
|
||||
if err != nil {
|
||||
|
||||
@ -237,7 +237,7 @@ func (c *coinbaseManager) getDeflationaryPeriodBlockSubsidyFromTable(month uint6
|
||||
|
||||
func (c *coinbaseManager) calcDeflationaryPeriodBlockSubsidyFloatCalc(month uint64) uint64 {
|
||||
baseSubsidy := c.deflationaryPhaseBaseSubsidy
|
||||
subsidy := float64(baseSubsidy) / math.Pow(2, float64(month)/12)
|
||||
subsidy := float64(baseSubsidy) / math.Pow(1.4, float64(month)/12)
|
||||
return uint64(subsidy)
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ const (
|
||||
SompiPerKaspa = 100_000_000
|
||||
|
||||
// MaxSompi is the maximum transaction amount allowed in sompi.
|
||||
MaxSompi = uint64(29_000_000_000 * SompiPerKaspa)
|
||||
MaxSompi = uint64(4_961_000_000 * SompiPerKaspa)
|
||||
|
||||
// MaxTxInSequenceNum is the maximum sequence number the sequence field
|
||||
// of a transaction input can be.
|
||||
|
||||
@ -67,9 +67,9 @@ func NewBlockHashWriter() HashWriter {
|
||||
}
|
||||
|
||||
// NewPoWHashWriter Returns a new HashWriter used for the PoW function
|
||||
func NewPoWHashWriter() ShakeHashWriter {
|
||||
shake256 := sha3.NewCShake256(nil, []byte(proofOfWorkDomain))
|
||||
return ShakeHashWriter{shake256}
|
||||
func NewPoWHashWriter() Blake3HashWriter {
|
||||
blake := blake3.New(32, nil)
|
||||
return Blake3HashWriter{blake}
|
||||
}
|
||||
|
||||
// NewHeavyHashWriter Returns a new HashWriter used for the HeavyHash function
|
||||
|
||||
@ -37,6 +37,11 @@ type ShakeHashWriter struct {
|
||||
sha3.ShakeHash
|
||||
}
|
||||
|
||||
// Blake3HashWriter is exactly the same as HashWriter but for Blake3
|
||||
type Blake3HashWriter struct {
|
||||
*blake3.Hasher
|
||||
}
|
||||
|
||||
// InfallibleWrite is just like write but doesn't return anything
|
||||
func (h *ShakeHashWriter) InfallibleWrite(p []byte) {
|
||||
// This write can never return an error, this is part of the hash.Hash interface contract.
|
||||
@ -46,6 +51,15 @@ func (h *ShakeHashWriter) InfallibleWrite(p []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
// InfallibleWrite is just like write but doesn't return anything
|
||||
func (h *Blake3HashWriter) InfallibleWrite(p []byte) {
|
||||
// This write can never return an error, this is part of the hash.Hash interface contract.
|
||||
_, err := h.Write(p)
|
||||
if err != nil {
|
||||
panic(errors.Wrap(err, "this should never happen. sha3.ShakeHash interface promises to not return errors."))
|
||||
}
|
||||
}
|
||||
|
||||
// Finalize returns the resulting hash
|
||||
func (h *ShakeHashWriter) Finalize() *externalapi.DomainHash {
|
||||
var sum [externalapi.DomainHashSize]byte
|
||||
@ -57,3 +71,16 @@ func (h *ShakeHashWriter) Finalize() *externalapi.DomainHash {
|
||||
h.ShakeHash = nil // prevent double reading as it will return a different hash
|
||||
return externalapi.NewDomainHashFromByteArray(&sum)
|
||||
}
|
||||
|
||||
// Finalize returns the resulting hash
|
||||
func (h *Blake3HashWriter) Finalize() *externalapi.DomainHash {
|
||||
var sum [externalapi.DomainHashSize]byte
|
||||
// This should prevent `Sum` for allocating an output buffer, by using the DomainHash buffer. we still copy because we don't want to rely on that.
|
||||
_, err := h.XOF().Read(sum[:])
|
||||
//_, err := h.Read(sum[:])
|
||||
if err != nil {
|
||||
panic(errors.Wrap(err, "this should never happen. sha3.ShakeHash interface promises to not return errors."))
|
||||
}
|
||||
h.Hasher = nil // prevent double reading as it will return a different hash
|
||||
return externalapi.NewDomainHashFromByteArray(&sum)
|
||||
}
|
||||
|
||||
@ -48,8 +48,8 @@ const (
|
||||
// in block take longer)
|
||||
defaultMergeSetSizeLimit = defaultGHOSTDAGK * 10
|
||||
defaultSubsidyGenesisReward = 1 * constants.SompiPerKaspa
|
||||
defaultPreDeflationaryPhaseBaseSubsidy = 500 * constants.SompiPerKaspa
|
||||
defaultDeflationaryPhaseBaseSubsidy = 440 * constants.SompiPerKaspa
|
||||
defaultPreDeflationaryPhaseBaseSubsidy = 50 * constants.SompiPerKaspa
|
||||
defaultDeflationaryPhaseBaseSubsidy = 44 * constants.SompiPerKaspa
|
||||
defaultCoinbasePayloadScriptPublicKeyMaxLength = 150
|
||||
// defaultDifficultyAdjustmentWindowSize is the number of blocks in a block's past used to calculate its difficulty
|
||||
// target.
|
||||
|
||||
@ -18,32 +18,17 @@ var genesisTxOuts = []*externalapi.DomainTransactionOutput{}
|
||||
var genesisTxPayload = []byte{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Blue score
|
||||
0x00, 0xE1, 0xF5, 0x05, 0x00, 0x00, 0x00, 0x00, // Subsidy
|
||||
0x00, 0x00, //script version
|
||||
0x01, // Varint
|
||||
0x00, // OP-FALSE
|
||||
0xd7, 0x95, 0xd7, 0x9e, 0xd7, 0x94, 0x20, 0xd7, // ומה די עליך ועל אחיך ייטב בשאר כספא ודהבה למעבד כרעות אלהכם תעבדון
|
||||
0x93, 0xd7, 0x99, 0x20, 0xd7, 0xa2, 0xd7, 0x9c,
|
||||
0xd7, 0x99, 0xd7, 0x9a, 0x20, 0xd7, 0x95, 0xd7,
|
||||
0xa2, 0xd7, 0x9c, 0x20, 0xd7, 0x90, 0xd7, 0x97,
|
||||
0xd7, 0x99, 0xd7, 0x9a, 0x20, 0xd7, 0x99, 0xd7,
|
||||
0x99, 0xd7, 0x98, 0xd7, 0x91, 0x20, 0xd7, 0x91,
|
||||
0xd7, 0xa9, 0xd7, 0x90, 0xd7, 0xa8, 0x20, 0xd7,
|
||||
0x9b, 0xd7, 0xa1, 0xd7, 0xa4, 0xd7, 0x90, 0x20,
|
||||
0xd7, 0x95, 0xd7, 0x93, 0xd7, 0x94, 0xd7, 0x91,
|
||||
0xd7, 0x94, 0x20, 0xd7, 0x9c, 0xd7, 0x9e, 0xd7,
|
||||
0xa2, 0xd7, 0x91, 0xd7, 0x93, 0x20, 0xd7, 0x9b,
|
||||
0xd7, 0xa8, 0xd7, 0xa2, 0xd7, 0x95, 0xd7, 0xaa,
|
||||
0x20, 0xd7, 0x90, 0xd7, 0x9c, 0xd7, 0x94, 0xd7,
|
||||
0x9b, 0xd7, 0x9d, 0x20, 0xd7, 0xaa, 0xd7, 0xa2,
|
||||
0xd7, 0x91, 0xd7, 0x93, 0xd7, 0x95, 0xd7, 0x9f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Bitcoin block hash 0000000000000000000b1f8e1c17b0133d439174e52efbb0c41c3583a8aa66b0
|
||||
0x00, 0x0b, 0x1f, 0x8e, 0x1c, 0x17, 0xb0, 0x13,
|
||||
0x3d, 0x43, 0x91, 0x74, 0xe5, 0x2e, 0xfb, 0xb0,
|
||||
0xc4, 0x1c, 0x35, 0x83, 0xa8, 0xaa, 0x66, 0xb0,
|
||||
0x0f, 0xca, 0x37, 0xca, 0x66, 0x7c, 0x2d, 0x55, // Checkpoint block hash 0fca37ca667c2d550a6c4416dad9717e50927128c424fa4edbebc436ab13aeef
|
||||
0x0a, 0x6c, 0x44, 0x16, 0xda, 0xd9, 0x71, 0x7e,
|
||||
0x50, 0x92, 0x71, 0x28, 0xc4, 0x24, 0xfa, 0x4e,
|
||||
0xdb, 0xeb, 0xc4, 0x36, 0xab, 0x13, 0xae, 0xef,
|
||||
0x00, 0x00, // Script version
|
||||
0x01, // Varint
|
||||
0x00, // OP-FALSE
|
||||
0x66, 0x6F, 0x72, 0x20, 0x61, 0x76, 0x65, 0x72,
|
||||
0x61, 0x67, 0x65, 0x20, 0x6D, 0x69, 0x6E, 0x65,
|
||||
0x72, 0x20, 0x74, 0x6F, 0x20, 0x61, 0x76, 0x65,
|
||||
0x72, 0x61, 0x67, 0x65, 0x20, 0x75, 0x73, 0x65,
|
||||
0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74,
|
||||
0x68, 0x65, 0x20, 0x70, 0x69, 0x65, 0x63, 0x65,
|
||||
0x20, 0x6F, 0x66, 0x20, 0x61, 0x72, 0x74, 0x20,
|
||||
0x6B, 0x61, 0x73, 0x70, 0x61,
|
||||
}
|
||||
|
||||
// genesisCoinbaseTx is the coinbase transaction for the genesis blocks for
|
||||
@ -54,13 +39,18 @@ var genesisCoinbaseTx = transactionhelper.NewSubnetworkTransaction(0, []*externa
|
||||
// genesisHash is the hash of the first block in the block DAG for the main
|
||||
// network (genesis block).
|
||||
var genesisHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
|
||||
0x58, 0xc2, 0xd4, 0x19, 0x9e, 0x21, 0xf9, 0x10, 0xd1, 0x57, 0x1d, 0x11, 0x49, 0x69, 0xce, 0xce, 0xf4, 0x8f, 0x9, 0xf9, 0x34, 0xd4, 0x2c, 0xcb, 0x6a, 0x28, 0x1a, 0x15, 0x86, 0x8f, 0x29, 0x99,
|
||||
//0x6c, 0x83, 0x78, 0x64, 0xac, 0xd8, 0xff, 0x70, 0x93, 0xf4, 0xbb, 0x48, 0x96, 0x7e, 0x28, 0x30, 0x01, 0x8e, 0xf4, 0x33, 0x27, 0xfc, 0x4b, 0x3f, 0x2d, 0x2a, 0xc6, 0x28, 0x97, 0xf7, 0xa0, 0xa6,
|
||||
0xb3, 0xba, 0x08, 0xbb, 0x0d, 0x35, 0xd2, 0x9d, 0x05, 0x46, 0xfb, 0x97, 0xc2, 0x9e, 0x61, 0x8f, 0x91, 0x87, 0xa1, 0x7d, 0x44, 0xa5, 0x07, 0x45, 0xdf, 0x60, 0x50, 0x58, 0x95, 0x13, 0x02, 0x22,
|
||||
})
|
||||
|
||||
// genesisMerkleRoot is the hash of the first transaction in the genesis block
|
||||
// for the main network.
|
||||
//
|
||||
// var genesisMerkleRoot = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
|
||||
// 0x8e, 0xc8, 0x98, 0x56, 0x8c, 0x68, 0x1, 0xd1, 0x3d, 0xf4, 0xee, 0x6e, 0x2a, 0x1b, 0x54, 0xb7, 0xe6, 0x23, 0x6f, 0x67, 0x1f, 0x20, 0x95, 0x4f, 0x5, 0x30, 0x64, 0x10, 0x51, 0x8e, 0xeb, 0x32,
|
||||
// })
|
||||
var genesisMerkleRoot = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
|
||||
0x8e, 0xc8, 0x98, 0x56, 0x8c, 0x68, 0x1, 0xd1, 0x3d, 0xf4, 0xee, 0x6e, 0x2a, 0x1b, 0x54, 0xb7, 0xe6, 0x23, 0x6f, 0x67, 0x1f, 0x20, 0x95, 0x4f, 0x5, 0x30, 0x64, 0x10, 0x51, 0x8e, 0xeb, 0x32,
|
||||
0xeb, 0xaa, 0x28, 0x9c, 0x50, 0x8e, 0xa9, 0x38, 0x06, 0x77, 0x59, 0x7e, 0x3f, 0xbf, 0x8c, 0xcf, 0xa0, 0x54, 0x2f, 0xe2, 0xb3, 0x2c, 0x21, 0x84, 0xa0, 0xfb, 0x09, 0x0f, 0x61, 0x6c, 0xbe, 0xd4,
|
||||
})
|
||||
|
||||
// genesisBlock defines the genesis block of the block DAG which serves as the
|
||||
@ -71,13 +61,11 @@ var genesisBlock = externalapi.DomainBlock{
|
||||
[]externalapi.BlockLevelParents{},
|
||||
genesisMerkleRoot,
|
||||
&externalapi.DomainHash{},
|
||||
externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
|
||||
0x71, 0x0f, 0x27, 0xdf, 0x42, 0x3e, 0x63, 0xaa, 0x6c, 0xdb, 0x72, 0xb8, 0x9e, 0xa5, 0xa0, 0x6c, 0xff, 0xa3, 0x99, 0xd6, 0x6f, 0x16, 0x77, 0x04, 0x45, 0x5b, 0x5a, 0xf5, 0x9d, 0xef, 0x8e, 0x20,
|
||||
}),
|
||||
1637609671037,
|
||||
486722099,
|
||||
0x3392c,
|
||||
1312860, // Checkpoint DAA score
|
||||
externalapi.NewDomainHashFromByteArray(muhash.EmptyMuHashHash.AsArray()),
|
||||
0x17c5f62fbb6,
|
||||
0x1e7fffff,
|
||||
0x14582,
|
||||
0,
|
||||
0,
|
||||
big.NewInt(0),
|
||||
&externalapi.DomainHash{},
|
||||
|
||||
@ -211,27 +211,12 @@ var MainnetParams = Params{
|
||||
K: defaultGHOSTDAGK,
|
||||
Name: "kaspa-mainnet",
|
||||
Net: appmessage.Mainnet,
|
||||
RPCPort: "16110",
|
||||
DefaultPort: "16111",
|
||||
RPCPort: "42110",
|
||||
DefaultPort: "42111",
|
||||
DNSSeeds: []string{
|
||||
// This DNS seeder is run by Wolfie
|
||||
"mainnet-dnsseed.kas.pa",
|
||||
// This DNS seeder is run by Denis Mashkevich
|
||||
"mainnet-dnsseed-1.kaspanet.org",
|
||||
// This DNS seeder is run by Denis Mashkevich
|
||||
"mainnet-dnsseed-2.kaspanet.org",
|
||||
// This DNS seeder is run by Constantine Bytensky
|
||||
"dnsseed.cbytensky.org",
|
||||
// This DNS seeder is run by Georges Künzli
|
||||
"seeder1.kaspad.net",
|
||||
// This DNS seeder is run by Georges Künzli
|
||||
"seeder2.kaspad.net",
|
||||
// This DNS seeder is run by Georges Künzli
|
||||
"seeder3.kaspad.net",
|
||||
// This DNS seeder is run by Georges Künzli
|
||||
"seeder4.kaspad.net",
|
||||
// This DNS seeder is run by Tim
|
||||
"kaspadns.kaspacalc.net",
|
||||
// Team DNS seed
|
||||
"mainnet-dnsseed-1.kaspacoin.com",
|
||||
"mainnet-dnsseed-2.kaspacoin.com",
|
||||
},
|
||||
|
||||
// DAG parameters
|
||||
@ -282,7 +267,8 @@ var MainnetParams = Params{
|
||||
CoinbasePayloadScriptPublicKeyMaxLength: defaultCoinbasePayloadScriptPublicKeyMaxLength,
|
||||
PruningProofM: defaultPruningProofM,
|
||||
DeflationaryPhaseDaaScore: defaultDeflationaryPhaseDaaScore,
|
||||
DisallowDirectBlocksOnTopOfGenesis: true,
|
||||
// DisallowDirectBlocksOnTopOfGenesis: true,
|
||||
DisallowDirectBlocksOnTopOfGenesis: false,
|
||||
|
||||
// This is technically 255, but we clamped it at 256 - block level of mainnet genesis
|
||||
// This means that any block that has a level lower or equal to genesis will be level 0.
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
package mempool
|
||||
|
||||
import (
|
||||
"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
|
||||
"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
|
||||
"sync"
|
||||
|
||||
"github.com/kaspanet/kaspad/domain/consensusreference"
|
||||
|
||||
@ -2,6 +2,7 @@ package mempool
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/kaspanet/kaspad/infrastructure/logger"
|
||||
|
||||
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
||||
|
||||
@ -2,7 +2,6 @@ package mempool
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/kaspanet/kaspad/domain/consensus/utils/constants"
|
||||
|
||||
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
||||
"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
|
||||
|
||||
2
go.mod
2
go.mod
@ -21,10 +21,12 @@ require (
|
||||
golang.org/x/term v0.5.0
|
||||
google.golang.org/grpc v1.38.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
lukechampine.com/blake3 v1.2.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/golang/snappy v0.0.1 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
|
||||
golang.org/x/net v0.7.0 // indirect
|
||||
golang.org/x/sys v0.5.0 // indirect
|
||||
golang.org/x/text v0.7.0 // indirect
|
||||
|
||||
4
go.sum
4
go.sum
@ -64,6 +64,8 @@ github.com/kaspanet/go-muhash v0.0.4/go.mod h1:10bPW5mO1vNHPSejaAh9ZTtLZE16jzEvg
|
||||
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/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
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=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
@ -182,3 +184,5 @@ gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
|
||||
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
|
||||
|
||||
@ -84,14 +84,14 @@ type Flags struct {
|
||||
AddPeers []string `short:"a" long:"addpeer" description:"Add a peer to connect with at startup"`
|
||||
ConnectPeers []string `long:"connect" description:"Connect only to the specified peers at startup"`
|
||||
DisableListen bool `long:"nolisten" description:"Disable listening for incoming connections -- NOTE: Listening is automatically disabled if the --connect or --proxy options are used without also specifying listen interfaces via --listen"`
|
||||
Listeners []string `long:"listen" description:"Add an interface/port to listen for connections (default all interfaces port: 16111, testnet: 16211)"`
|
||||
Listeners []string `long:"listen" description:"Add an interface/port to listen for connections (default all interfaces port: 42111, testnet: 16211)"`
|
||||
TargetOutboundPeers int `long:"outpeers" description:"Target number of outbound peers"`
|
||||
MaxInboundPeers int `long:"maxinpeers" description:"Max number of inbound peers"`
|
||||
EnableBanning bool `long:"enablebanning" description:"Enable banning of misbehaving peers"`
|
||||
BanDuration time.Duration `long:"banduration" description:"How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1 second"`
|
||||
BanThreshold uint32 `long:"banthreshold" description:"Maximum allowed ban score before disconnecting and banning misbehaving peers."`
|
||||
Whitelists []string `long:"whitelist" description:"Add an IP network or IP that will not be banned. (eg. 192.168.1.0/24 or ::1)"`
|
||||
RPCListeners []string `long:"rpclisten" description:"Add an interface/port to listen for RPC connections (default port: 16110, testnet: 16210)"`
|
||||
RPCListeners []string `long:"rpclisten" description:"Add an interface/port to listen for RPC connections (default port: 42110, testnet: 16210)"`
|
||||
RPCCert string `long:"rpccert" description:"File containing the certificate file"`
|
||||
RPCKey string `long:"rpckey" description:"File containing the certificate key"`
|
||||
RPCMaxClients int `long:"rpcmaxclients" description:"Max number of RPC clients for standard connections"`
|
||||
|
||||
@ -68,9 +68,9 @@
|
||||
; You may specify each IP address with or without a port. The default port will
|
||||
; be added automatically if one is not specified here.
|
||||
; addpeer=192.168.1.1
|
||||
; addpeer=10.0.0.2:16111
|
||||
; addpeer=10.0.0.2:42111
|
||||
; addpeer=fe80::1
|
||||
; addpeer=[fe80::2]:16111
|
||||
; addpeer=[fe80::2]:42111
|
||||
|
||||
; Add persistent peers that you ONLY want to connect to as desired. One peer
|
||||
; per line. You may specify each IP address with or without a port. The
|
||||
@ -78,9 +78,9 @@
|
||||
; NOTE: Specifying this option has other side effects as described above in
|
||||
; the 'addpeer' versus 'connect' summary section.
|
||||
; connect=192.168.1.1
|
||||
; connect=10.0.0.2:16111
|
||||
; connect=10.0.0.2:42111
|
||||
; connect=fe80::1
|
||||
; connect=[fe80::2]:16111
|
||||
; connect=[fe80::2]:42111
|
||||
|
||||
; Maximum number of inbound and outbound peers.
|
||||
; maxinpeers=125
|
||||
@ -117,12 +117,12 @@
|
||||
; listen=0.0.0.0
|
||||
; All ipv6 interfaces on default port:
|
||||
; listen=::
|
||||
; All interfaces on port 16111:
|
||||
; listen=:16111
|
||||
; All ipv4 interfaces on port 16111:
|
||||
; listen=0.0.0.0:16111
|
||||
; All ipv6 interfaces on port 16111:
|
||||
; listen=[::]:16111
|
||||
; All interfaces on port 42111:
|
||||
; listen=:42111
|
||||
; All ipv4 interfaces on port 42111:
|
||||
; listen=0.0.0.0:42111
|
||||
; All ipv6 interfaces on port 42111:
|
||||
; listen=[::]:42111
|
||||
; Only ipv4 localhost on port 8333:
|
||||
; listen=127.0.0.1:8333
|
||||
; Only ipv6 localhost on port 8333:
|
||||
@ -162,16 +162,16 @@
|
||||
; rpclisten=0.0.0.0
|
||||
; All ipv6 interfaces on default port:
|
||||
; rpclisten=::
|
||||
; All interfaces on port 16110:
|
||||
; rpclisten=:16110
|
||||
; All ipv4 interfaces on port 16110:
|
||||
; rpclisten=0.0.0.0:16110
|
||||
; All ipv6 interfaces on port 16110:
|
||||
; rpclisten=[::]:16110
|
||||
; Only ipv4 localhost on port 16110:
|
||||
; rpclisten=127.0.0.1:16110
|
||||
; Only ipv6 localhost on port 16110:
|
||||
; rpclisten=[::1]:16110
|
||||
; All interfaces on port 42110:
|
||||
; rpclisten=:42110
|
||||
; All ipv4 interfaces on port 42110:
|
||||
; rpclisten=0.0.0.0:42110
|
||||
; All ipv6 interfaces on port 42110:
|
||||
; rpclisten=[::]:42110
|
||||
; Only ipv4 localhost on port 42110:
|
||||
; rpclisten=127.0.0.1:42110
|
||||
; Only ipv6 localhost on port 42110:
|
||||
; rpclisten=[::1]:42110
|
||||
; Only ipv4 localhost on non-standard port 8337:
|
||||
; rpclisten=127.0.0.1:8337
|
||||
; All interfaces on non-standard port 8337:
|
||||
|
||||
@ -40,7 +40,7 @@ func TestIPTypes(t *testing.T) {
|
||||
rfc4193, rfc4380, rfc4843, rfc4862, rfc5737, rfc6052, rfc6145, rfc6598,
|
||||
local, valid, routable bool) ipTest {
|
||||
nip := net.ParseIP(ip)
|
||||
na := *appmessage.NewNetAddressIPPort(nip, 16111)
|
||||
na := *appmessage.NewNetAddressIPPort(nip, 42111)
|
||||
test := ipTest{na, rfc1918, rfc2544, rfc3849, rfc3927, rfc3964, rfc4193, rfc4380,
|
||||
rfc4843, rfc4862, rfc5737, rfc6052, rfc6145, rfc6598, local, valid, routable}
|
||||
return test
|
||||
|
||||
@ -28,7 +28,7 @@ func TestAmountCreation(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "max producible",
|
||||
amount: 29e9,
|
||||
amount: 4961e6,
|
||||
valid: true,
|
||||
expected: Amount(constants.MaxSompi),
|
||||
},
|
||||
@ -105,8 +105,8 @@ func TestAmountUnitConversions(t *testing.T) {
|
||||
name: "MKAS",
|
||||
amount: Amount(constants.MaxSompi),
|
||||
unit: AmountMegaKAS,
|
||||
converted: 29000,
|
||||
s: "29000 MKAS",
|
||||
converted: 4961,
|
||||
s: "4961 MKAS",
|
||||
},
|
||||
{
|
||||
name: "kKAS",
|
||||
|
||||
@ -9,9 +9,9 @@ import (
|
||||
const validCharacters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-"
|
||||
|
||||
const (
|
||||
appMajor uint = 0
|
||||
appMinor uint = 12
|
||||
appPatch uint = 14
|
||||
appMajor uint = 1
|
||||
appMinor uint = 0
|
||||
appPatch uint = 0
|
||||
)
|
||||
|
||||
// appBuild is defined as a variable so it can be overridden during the build
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user