node

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2019 License: ISC, ISC Imports: 62 Imported by: 0

README

The Parallelcoin Node ISC License GoDoc

Next generation full node for Parallelcoin, forked from btcd

Hard Fork 1: Plan 9 from Crypto Space

9 algorithms can be used when mining:

  • Blake14lr (decred)
  • Skein (myriadcoin) Cryptonote7v2
  • Lyra2REv2 (sia)
  • Keccac (maxcoin, smartcash)
  • Scrypt (litecoin)
  • SHA256D (bitcoin)
  • GOST Stribog *
  • Skein
  • X11 (dash)
Stochastic Binomial Filter Difficulty Adjustment

After the upcoming hardfork, Parallelcoin will have the following features in its difficulty adjustment regime:

  • Exponential curve with power of 3 to respond gently the natural drift while moving the difficulty fast in below 10% of target and 10x target, to deal with recovering after a large increase in network hashpower

  • 293 second blocks (7 seconds less than 5 minutes), 1439 block averaging window (about 4.8 days) that is varied by interpreting byte 0 of the sha256d hash of newest block hash as a signed 8 bit integer to further disturb any inherent rhythm (like dithering).

  • Difficulty adjustments are based on a window ending at the previous block of each algorithm, meaning sharp rises from one algorithm do not immediately affect the other algorithms, allowing a smoother recovery from a sudden drop in hashrate, soaking up energetic movements more robustly and resiliently, and reducing vulnerability to time distortion attacks.

  • Deterministic noise is added to the difficulty adjustment in a similar way as is done with digital audio and images to improve the effective resolution of the signal by reducing unwanted artifacts caused by the sampling process. Miners are random generators, and a block time is like a tuning filter, so the same principles apply.

  • Rewards will be computed according to a much smoother, satoshi-precision exponential decay curve that will produce a flat annual 5% supply expansion. Increasing the precision of the denomination is planned for the next release cycle, at 0.00000001 as the minimum denomination, there may be issues as userbase increases.

  • Fair Hardfork - Rewards will slowly rise from the initial hard fork at an inverse exponential rate to bring the block reward from 0.02 up to 2 in 2000 blocks, as the adjustment to network capacity takes time, so rewards will closely match the time interval they relate to until it starts faster from the minimum target stabilises in response to what miners create.

Wallet

The pod has no RPC wallet functionality, only core chain functions. It is fully compliant with the original parallelcoind for these functions. For the wallet server, mod, which works also with the CLI controller podctl, it will be possible to send commands to both mod (wallet) and pod full node using the command line.

A Webview/Golang based GUI wallet will come a little later, following the release, and will be able to run on all platforms with with browser or supported built-in web application platforms, Blink and Webkit engines.

* At the time of release there will not be any GPU nor ASIC miners for the GOST Stribog (just stribog 256 bit hash, not combined) and Highwayhash.

Installation

For the main full node server:

go get git.parallelcoin.io/dev/pod

You probably will also want CLI client (can also speak to other bitcoin protocol RPC endpoints also):

go get git.parallelcoin.io/dev/9/cmd/podctl

Requirements

Go 1.11 or newer.

Installation

Windows not available yet

When it is, it will be available here:

https://git.parallelcoin.io/dev/9/releases

Linux/BSD/MacOSX/POSIX - Build from Source
$ go version
$ go env GOROOT GOPATH

NOTE: The GOROOT and GOPATH above must not be the same path. It is recommended that GOPATH is set to a directory in your home directory such as ~/goprojects to avoid write permission issues. It is also recommended to add $GOPATH/bin to your PATH at this point.

  • Run the following commands to obtain pod, all dependencies, and install it:
$ go get git.parallelcoin.io/dev/pod
  • pod (and utilities) will now be installed in $GOPATH/bin. If you did not already add the bin directory to your system path during Go installation, we recommend you do so now.

Updating

Windows

Install a newer MSI

Linux/BSD/MacOSX/POSIX - Build from Source
  • Run the following commands to update pod, all dependencies, and install it:
$ cd $GOPATH/src/git.parallelcoin.io/dev/pod
$ git pull && glide install
$ go install . ./cmd/...

Getting Started

pod has several configuration options available to tweak how it runs, but all of the basic operations described in the intro section work with zero configuration.

Windows (Installed from MSI)

Launch pod from your Start menu.

Linux/BSD/POSIX/Source
$ ./pod

Discord

Come and chat at our (discord server](https://discord.gg/nJKts94)

Issue Tracker

The integrated github issue tracker is used for this project.

Documentation

The documentation is a work-in-progress. It is located in the docs folder.

License

pod is licensed under the copyfree ISC License.

Documentation

Overview

pod is a full-node Parallelcoin implementation written in Go. The default options are sane for most users. This means pod will work 'out of the box' for most users. However, there are also a wide variety of flags that can be used to control it. The following section provides a usage overview which enumerates the flags. An interesting point to note is that the long form of all of these options (except -C) can be specified in a configuration file that is automatically parsed when pod starts up. By default, the configuration file is located at ~/.pod/pod.conf on POSIX-style operating systems and %LOCALAPPDATA%\pod\pod.conf on Windows. The -C (--configfile) flag, as shown below, can be used to override this location. Usage:

pod [OPTIONS]

Application Options:

-V, --version               Display version information and exit
-C, --configfile=           Path to configuration file (default: /home/loki/.pod/pod.conf)
-b, --datadir=              Directory to store data (default: /home/loki/.pod/data)
    --logdir=               Directory to log output. (default: /home/loki/.pod/logs)
-a, --addpeer=              Add a peer to connect with at startup
    --connect=              Connect only to the specified peers at startup
    --nolisten              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
    --listen=               Add an interface/port to listen for connections (default all interfaces port: 11047, testnet: 21047)
    --maxpeers=             Max number of inbound and outbound peers (default: 125)
    --nobanning             Disable banning of misbehaving peers
    --banduration=          How long to ban misbehaving peers.  Valid time units are {s, m, h}.  Minimum 1 second (default: 24h0m0s)
    --banthreshold=         Maximum allowed ban score before disconnecting and banning misbehaving peers. (default: 100)
    --whitelist=            Add an IP network or IP that will not be banned. (eg. 192.168.1.0/24 or ::1)
-u, --rpcuser=              Username for RPC connections
-P, --rpcpass=              Password for RPC connections
    --rpclimituser=         Username for limited RPC connections
    --rpclimitpass=         Password for limited RPC connections
    --rpclisten=            Add an interface/port to listen for RPC connections (default port: 11048, testnet: 21048) gives sha256d block templates
    --blake14lrlisten=      Additional RPC port that delivers blake14lr versioned block templates
    --cryptonight7v2=      Additional RPC port that delivers cryptonight7v2 versioned block templates
    --keccaklisten=         Additional RPC port that delivers keccak versioned block templates
    --lyra2rev2listen=      Additional RPC port that delivers lyra2rev2 versioned block templates
    --scryptlisten=         Additional RPC port that delivers scrypt versioned block templates
    --striboglisten=           Additional RPC port that delivers stribog versioned block templates
    --skeinlisten=          Additional RPC port that delivers skein versioned block templates
    --x11listen=            Additional RPC port that delivers x11 versioned block templates
    --rpccert=              File containing the certificate file (default: /home/loki/.pod/rpc.cert)
    --rpckey=               File containing the certificate key (default: /home/loki/.pod/rpc.key)
    --rpcmaxclients=        Max number of RPC clients for standard connections (default: 10)
    --rpcmaxwebsockets=     Max number of RPC websocket connections (default: 25)
    --rpcmaxconcurrentreqs= Max number of concurrent RPC requests that may be processed concurrently (default: 20)
    --rpcquirks             Mirror some JSON-RPC quirks of Bitcoin Core -- NOTE: Discouraged unless interoperability issues need to be worked around
    --norpc                 Disable built-in RPC server -- NOTE: The RPC server is disabled by default if no rpcuser/rpcpass or rpclimituser/rpclimitpass is specified
    --tls                   Enable TLS for the RPC server
    --nodnsseed             Disable DNS seeding for peers
    --externalip=           Add an ip to the list of local addresses we claim to listen on to peers
    --proxy=                Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)
    --proxyuser=            Username for proxy server
    --proxypass=            Password for proxy server
    --onion=                Connect to tor hidden services via SOCKS5 proxy (eg. 127.0.0.1:9050)
    --onionuser=            Username for onion proxy server
    --onionpass=            Password for onion proxy server
    --noonion               Disable connecting to tor hidden services
    --torisolation          Enable Tor stream isolation by randomizing user credentials for each connection.
    --testnet               Use the test network
    --regtest               Use the regression test network
    --simnet                Use the simulation test network
    --addcheckpoint=        Add a custom checkpoint.  Format: '<height>:<hash>'
    --nocheckpoints         Disable built-in checkpoints.  Don't do this unless you know what you're doing.
    --dbtype=               Database backend to use for the Block Chain (default: ffldb)
    --profile=              Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536
    --cpuprofile=           Write CPU profile to the specified file
-d, --debuglevel=           Logging level for all subsystems {trace, debug, info, warn, error, critical} -- You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set the log level for individual subsystems -- Use show to list available
                            subsystems (default: info)
    --upnp                  Use UPnP to map our listening port outside of NAT
    --minrelaytxfee=        The minimum transaction fee in DUO/kB to be considered a non-zero fee. (default: 1e-05)
    --limitfreerelay=       Limit relay of transactions with no transaction fee to the given amount in thousands of bytes per minute (default: 15)
    --norelaypriority       Do not require free or low-fee transactions to have high priority for relaying
    --trickleinterval=      Minimum time between attempts to send new inventory to a connected peer (default: 10s)
    --maxorphantx=          Max number of orphan transactions to keep in memory (default: 100)
    --algo=                 Sets the algorithm for the CPU miner ( blake14lr, cryptonight7v2, keccak, lyra2rev2, sha256d, scrypt, stribog, skein, x11,default sha256d) (default: sha256d)
    --generate              Generate (mine) bitcoins using the CPU
    --genthreads=           Number of CPU threads to use with CPU miner -1 = all cores (default: 1)
    --miningaddr=           Add the specified payment address to the list of addresses to use for generated blocks -- At least one address is required if the generate option is set
    --blockminsize=         Mininum block size in bytes to be used when creating a block (default: 80)
    --blockmaxsize=         Maximum block size in bytes to be used when creating a block (default: 200000)
    --blockminweight=       Mininum block weight to be used when creating a block (default: 10)
    --blockmaxweight=       Maximum block weight to be used when creating a block (default: 3000000)
    --blockprioritysize=    Size in bytes for high-priority/low-fee transactions when creating a block (default: 50000)
    --uacomment=            Comment to add to the user agent -- See BIP 14 for more information.
    --nopeerbloomfilters    Disable bloom filtering support
    --nocfilters            Disable committed filtering (CF) support
    --dropcfindex           Deletes the index used for committed filtering (CF) support from the database on start up and then exits.
    --sigcachemaxsize=      The maximum number of entries in the signature verification cache (default: 100000)
    --blocksonly            Do not accept transactions from remote peers.
    --txindex               Maintain a full hash-based transaction index which makes all transactions available via the getrawtransaction RPC
    --droptxindex           Deletes the hash-based transaction index from the database on start up and then exits.
    --addrindex             Maintain a full address-based transaction index which makes the searchrawtransactions RPC available
    --dropaddrindex         Deletes the address-based transaction index from the database on start up and then exits.
    --relaynonstd           Relay non-standard transactions regardless of the default settings for the active network.
    --rejectnonstd          Reject non-standard transactions regardless of the default settings for the active network.

Help Options:

-h, --help                  Show this help message

Index

Constants

View Source
const (
	DefaultConfigFilename        = "conf.json"
	DefaultDataDirname           = "node"
	DefaultLogLevel              = "info"
	DefaultLogDirname            = "node"
	DefaultLogFilename           = "log"
	DefaultAddress               = "127.0.0.1"
	DefaultPort                  = "11047"
	DefaultRPCPort               = "11048"
	DefalutRPCAddr               = "127.0.0.1"
	DefaultRPCServer             = "127.0.0.1:11048"
	DefaultListener              = "127.0.0.1:11047"
	DefaultRPCListener           = "127.0.0.1"
	DefaultMaxPeers              = 125
	DefaultBanDuration           = time.Hour * 24
	DefaultBanThreshold          = 100
	DefaultConnectTimeout        = time.Second * 30
	DefaultMaxRPCClients         = 10
	DefaultMaxRPCWebsockets      = 25
	DefaultMaxRPCConcurrentReqs  = 20
	DefaultDbType                = "ffldb"
	DefaultFreeTxRelayLimit      = 15.0
	DefaultTrickleInterval       = peer.DefaultTrickleInterval
	DefaultBlockMinSize          = 80
	DefaultBlockMaxSize          = 200000
	DefaultBlockMinWeight        = 10
	DefaultBlockMaxWeight        = 3000000
	BlockMaxSizeMin              = 1000
	BlockSizeMax                 = blockchain.MaxBlockBaseSize - 1000
	BlockWeightMin               = 4000
	BlockWeightMax               = blockchain.MaxBlockWeight - 4000
	DefaultGenerate              = false
	DefaultGenThreads            = 1
	DefaultMinerListener         = "127.0.0.1:11011"
	DefaultMaxOrphanTransactions = 100
	DefaultMaxOrphanTxSize       = 100000
	DefaultSigCacheMaxSize       = 1000000
	// These are set to default on because more often one wants them than not
	DefaultTxIndex   = true
	DefaultAddrIndex = true
	DefaultAlgo      = "random"
)

Variables

View Source
var ActiveNetParams = &nine.MainNetParams

ActiveNetParams is a pointer to the parameters specific to the currently active bitcoin network.

View Source
var Cfg = &nine.Config{}
View Source
var DefaultHomeDir = util.AppDataDir("pod", false)
View Source
var DefaultRPCCertFile = filepath.Join(DefaultHomeDir, "rpc.cert")
View Source
var DefaultRPCKeyFile = filepath.Join(DefaultHomeDir, "rpc.key")
View Source
var ErrClientQuit = errors.New("client quit")

ErrClientQuit describes the error where a client send is not processed due to the client having already been disconnected or dropped.

View Source
var (
	// ErrRPCNoWallet is an error returned to RPC clients when the provided command is recognized as a wallet command.
	ErrRPCNoWallet = &json.RPCError{
		Code:    json.ErrRPCNoWallet,
		Message: "This implementation does not implement wallet commands",
	}
)

Errors

View Source
var (
	// ErrRPCUnimplemented is an error returned to RPC clients when the provided command is recognized, but not implemented.
	ErrRPCUnimplemented = &json.RPCError{
		Code:    json.ErrRPCUnimplemented,
		Message: "Command unimplemented",
	}
)

Errors

View Source
var ErrRescanReorg = json.RPCError{
	Code:    json.ErrRPCDatabase,
	Message: "Reorganize",
}

ErrRescanReorg defines the error that is returned when an unrecoverable reorganize is detected during a rescan.

View Source
var KnownDbTypes = database.SupportedDrivers()
View Source
var Log = cl.NewSubSystem("cmd/node", ll.DEFAULT)

Log is the logger for node

View Source
var StateCfg = &nine.StateConfig{}

Functions

func CleanAndExpandPath

func CleanAndExpandPath(
	path string,
) string

CleanAndExpandPath expands environment variables and leading ~ in the passed path, cleans the result, and returns it.

func FileExists

func FileExists(
	name string,
) bool

FileExists reports whether the named file or directory exists.

func Main

func Main(serverChan chan<- *server) (err error)

Main is the real main function for pod. It is necessary to work around the fact that deferred functions do not run when os.Exit() is called. The optional serverChan parameter is mainly used by the service code to be notified with the server once it is setup so it can gracefully stop it when requested from the service control manager.

func NetName

func NetName(chainParams *nine.Params) string

NetName returns the name used when referring to a bitcoin network. At the time of writing, pod currently places blocks for testnet version 3 in the data and log directory "testnet", which does not match the Name field of the chaincfg parameters. This function can be used to override this directory name as "testnet" when the passed active network matches wire.TestNet3. A proper upgrade to move the data and log directories for this network to "testnet3" is planned for the future, at which point this function can be removed and the network parameter's name used instead.

func NewCheckpointFromStr

func NewCheckpointFromStr(checkpoint string) (chaincfg.Checkpoint, error)

NewCheckpointFromStr parses checkpoints in the '<height>:<hash>' format.

func NewConfigParser

func NewConfigParser(
	cfg *Config,
	so *serviceOptions,
	options flags.Options,
) *flags.Parser

NewConfigParser returns a new command line flags parser.

func NormalizeAddress

func NormalizeAddress(
	addr,
	defaultPort string,
) string

NormalizeAddress returns addr with the passed default port appended if there is not already a port specified.

func NormalizeAddresses

func NormalizeAddresses(
	addrs []string,
	defaultPort string,
) []string

NormalizeAddresses returns a new slice with all the passed peer addresses normalized with the given default port, and all duplicates removed.

func ParseCheckpoints

func ParseCheckpoints(
	checkpointStrings []string,
) (
	[]chaincfg.Checkpoint,
	error,
)

ParseCheckpoints checks the checkpoint strings for valid syntax ('<height>:<hash>') and parses them to chaincfg.Checkpoint instances.

func RemoveDuplicateAddresses

func RemoveDuplicateAddresses(
	addrs []string,
) []string

RemoveDuplicateAddresses returns a new slice with all duplicate entries in addrs removed.

func UseLogger

func UseLogger(
	logger *cl.SubSystem,
)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using log.

func ValidDbType

func ValidDbType(
	dbType string,
) bool

ValidDbType returns whether or not dbType is a supported database type.

func ValidLogLevel

func ValidLogLevel(
	logLevel string,
) bool

ValidLogLevel returns whether or not logLevel is a valid debug log level.

func Version

func Version() string

Version returns the application version as a properly formed string per the semantic versioning 2.0.0 spec (http://semver.org/).

Types

type Config

type Config struct {
	ShowVersion          *bool            `short:"V" long:"version" description:"Display version information and exit"`
	ConfigFile           *string          `short:"C" long:"configfile" description:"Path to configuration file"`
	DataDir              *string          `short:"b" long:"datadir" description:"Directory to store data"`
	LogDir               *string          `long:"logdir" description:"Directory to log output."`
	DebugLevel           *string          `long:"debuglevel" description:"baseline debug level for all subsystems unless specified"`
	AddPeers             *cli.StringSlice `short:"a" long:"addpeer" description:"Add a peer to connect with at startup"`
	ConnectPeers         *cli.StringSlice `long:"connect" description:"Connect only to the specified peers at startup"`
	DisableListen        *bool            `` /* 217-byte string literal not displayed */
	Listeners            *cli.StringSlice `` /* 128-byte string literal not displayed */
	MaxPeers             *int             `long:"maxpeers" description:"Max number of inbound and outbound peers"`
	DisableBanning       *bool            `long:"nobanning" description:"Disable banning of misbehaving peers"`
	BanDuration          *time.Duration   `long:"banduration" description:"How long to ban misbehaving peers.  Valid time units are {s, m, h, d}.  Minimum 1 second"`
	BanThreshold         *int             `long:"banthreshold" description:"Maximum allowed ban score before disconnecting and banning misbehaving peers."`
	Whitelists           *cli.StringSlice `long:"whitelist" description:"Add an IP network or IP that will not be banned. (eg. 192.168.1.0/24 or ::1)"`
	RPCUser              *string          `short:"u" long:"rpcuser" description:"Username for RPC connections"`
	RPCPass              *string          `short:"P" long:"rpcpass" default-mask:"-" description:"Password for RPC connections"`
	RPCLimitUser         *string          `long:"rpclimituser" description:"Username for limited RPC connections"`
	RPCLimitPass         *string          `long:"rpclimitpass" default-mask:"-" description:"Password for limited RPC connections"`
	RPCListeners         *cli.StringSlice `` /* 150-byte string literal not displayed */
	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"`
	RPCMaxWebsockets     *int             `long:"rpcmaxwebsockets" description:"Max number of RPC websocket connections"`
	RPCMaxConcurrentReqs *int             `long:"rpcmaxconcurrentreqs" description:"Max number of concurrent RPC requests that may be processed concurrently"`
	RPCQuirks            *bool            `` /* 151-byte string literal not displayed */
	DisableRPC           *bool            `` /* 165-byte string literal not displayed */
	TLS                  *bool            `long:"tls" description:"Enable TLS for the RPC server"`
	DisableDNSSeed       *bool            `long:"nodnsseed" description:"Disable DNS seeding for peers"`
	ExternalIPs          *cli.StringSlice `long:"externalip" description:"Add an ip to the list of local addresses we claim to listen on to peers"`
	Proxy                *string          `long:"proxy" description:"Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)"`
	ProxyUser            *string          `long:"proxyuser" description:"Username for proxy server"`
	ProxyPass            *string          `long:"proxypass" default-mask:"-" description:"Password for proxy server"`
	OnionProxy           *string          `long:"onion" description:"Connect to tor hidden services via SOCKS5 proxy (eg. 127.0.0.1:9050)"`
	OnionProxyUser       *string          `long:"onionuser" description:"Username for onion proxy server"`
	OnionProxyPass       *string          `long:"onionpass" default-mask:"-" description:"Password for onion proxy server"`
	Onion                *bool            `long:"noonion" description:"Disable connecting to tor hidden services"`
	TorIsolation         *bool            `long:"torisolation" description:"Enable Tor stream isolation by randomizing user credentials for each connection."`
	TestNet3             *bool            `long:"testnet" description:"Use the test network"`
	RegressionTest       *bool            `long:"regtest" description:"Use the regression test network"`
	SimNet               *bool            `long:"simnet" description:"Use the simulation test network"`
	AddCheckpoints       *cli.StringSlice `long:"addcheckpoint" description:"Add a custom checkpoint.  Format: '<height>:<hash>'"`
	DisableCheckpoints   *bool            `long:"nocheckpoints" description:"Disable built-in checkpoints.  Don't do this unless you know what you're doing."`
	DbType               *string          `long:"dbtype" description:"Database backend to use for the Block Chain"`
	Profile              *string          `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536"`
	CPUProfile           *string          `long:"cpuprofile" description:"Write CPU profile to the specified file"`
	Upnp                 *bool            `long:"upnp" description:"Use UPnP to map our listening port outside of NAT"`
	MinRelayTxFee        *float64         `long:"minrelaytxfee" description:"The minimum transaction fee in DUO/kB to be considered a non-zero fee."`
	FreeTxRelayLimit     *float64         `` /* 140-byte string literal not displayed */
	NoRelayPriority      *bool            `long:"norelaypriority" description:"Do not require free or low-fee transactions to have high priority for relaying"`
	TrickleInterval      *time.Duration   `long:"trickleinterval" description:"Minimum time between attempts to send new inventory to a connected peer"`
	MaxOrphanTxs         *int             `long:"maxorphantx" description:"Max number of orphan transactions to keep in memory"`
	Algo                 *string          `` /* 168-byte string literal not displayed */
	Generate             *bool            `long:"generate" description:"Generate (mine) bitcoins using the CPU"`
	GenThreads           *int             `long:"genthreads" description:"Number of CPU threads to use with CPU miner -1 = all cores"`
	MiningAddrs          *cli.StringSlice `` /* 177-byte string literal not displayed */
	MinerListener        *string          `long:"minerlistener" description:"listen address for miner controller"`
	MinerPass            *string          `` /* 141-byte string literal not displayed */
	BlockMinSize         *int             `long:"blockminsize" description:"Mininum block size in bytes to be used when creating a block"`
	BlockMaxSize         *int             `long:"blockmaxsize" description:"Maximum block size in bytes to be used when creating a block"`
	BlockMinWeight       *int             `long:"blockminweight" description:"Mininum block weight to be used when creating a block"`
	BlockMaxWeight       *int             `long:"blockmaxweight" description:"Maximum block weight to be used when creating a block"`
	BlockPrioritySize    *int             `long:"blockprioritysize" description:"Size in bytes for high-priority/low-fee transactions when creating a block"`
	UserAgentComments    *cli.StringSlice `long:"uacomment" description:"Comment to add to the user agent -- See BIP 14 for more information."`
	NoPeerBloomFilters   *bool            `long:"nopeerbloomfilters" description:"Disable bloom filtering support"`
	NoCFilters           *bool            `long:"nocfilters" description:"Disable committed filtering (CF) support"`
	DropCfIndex          *bool            `` /* 138-byte string literal not displayed */
	SigCacheMaxSize      *int             `long:"sigcachemaxsize" description:"The maximum number of entries in the signature verification cache"`
	BlocksOnly           *bool            `long:"blocksonly" description:"Do not accept transactions from remote peers."`
	TxIndex              *bool            `` /* 142-byte string literal not displayed */
	DropTxIndex          *bool            `long:"droptxindex" description:"Deletes the hash-based transaction index from the database on start up and then exits."`
	AddrIndex            *bool            `` /* 130-byte string literal not displayed */
	DropAddrIndex        *bool            `long:"dropaddrindex" description:"Deletes the address-based transaction index from the database on start up and then exits."`
	RelayNonStd          *bool            `long:"relaynonstd" description:"Relay non-standard transactions regardless of the default settings for the active network."`
	RejectNonStd         *bool            `long:"rejectnonstd" description:"Reject non-standard transactions regardless of the default settings for the active network."`
}

Config defines the configuration options for pod. See loadConfig for details on the configuration load process.

type NAT

type NAT interface {
	// Get the external address from outside the NAT.
	GetExternalAddress() (addr net.IP, err error)
	// Add a port mapping for protocol ("udp" or "tcp") from external port to internal port with description lasting for timeout.
	AddPortMapping(protocol string, externalPort, internalPort int, description string, timeout int) (mappedExternalPort int, err error)
	// Remove a previously added port mapping from external port to internal port.
	DeletePortMapping(protocol string, externalPort, internalPort int) (err error)
}

NAT is an interface representing a NAT traversal options for example UPNP or NAT-PMP. It provides methods to query and manipulate this traversal to allow access to services.

func Discover

func Discover() (nat NAT, err error)

Discover searches the local network for a UPnP router returning a NAT for the network if so, nil if not.

Directories

Path Synopsis
rpctest
Package rpctest provides a pod-specific RPC testing harness crafting and executing integration tests by driving a `pod` instance via the `RPC` interface.
Package rpctest provides a pod-specific RPC testing harness crafting and executing integration tests by driving a `pod` instance via the `RPC` interface.
Package mempool provides a policy-enforced pool of unmined bitcoin transactions.
Package mempool provides a policy-enforced pool of unmined bitcoin transactions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL