constants

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION_ROLLING_MASK = 0x1fffe000 // bip 320 constant
	EXTRANONCE_SIZE      = 4          // in bytes
	DEFAULT_DIFFICULTY   = 1024       // for gpu, fpga, and asic miners
	DEFAULT_COINBASE_TAG = "/pogolo - decentralize or die/"
	MIN_DIFFICULTY       = 0.16       // hard min
	DIFF_ADJUST_PERIOD   = 32         // in shares
	HASHRATE_WINDOW      = int64(600) // 10 min windows
)
View Source
const (
	EXIT_NONE = iota
	EXIT_MISC
	EXIT_BACKEND
	EXIT_CONFIG
	EXIT_NET
)

exit codes

Variables

View Source
var (

	// internal server error
	ERROR_INTERNAL = stratum.Error{Code: 500, Message: "Internal server error"}
	// unknown stratum method
	ERROR_UNK_METHOD = stratum.Error{Code: 501, Message: "Unknown method"}
	// unsupported stratum method
	ERROR_UNSUPP_METHOD = stratum.Error{Code: 502, Message: "Unsupported method"}

	// submission before subscription
	ERROR_NOT_SUBBED   = stratum.Error{Code: 401, Message: "Not subscribed"}
	ERROR_UNAUTHORIZED = stratum.Error{Code: 403, Message: "Unauthorized"}
	// for data we understand but will ignore, optionally disconnecting
	ERROR_NOT_ACCEPTED = stratum.Error{Code: 406, Message: "Not accepted"}
	ERROR_UNK_JOB      = stratum.Error{Code: 410, Message: "Unknown job"}
	ERROR_LOW_DIFF     = stratum.Error{Code: 413, Message: "Difficulty too low"}
	// for data we understand but couldnt process
	ERROR_UNPROCESSABLE = stratum.Error{Code: 422, Message: "Unprocessable content"}
)

errors can be anything, so i chose http-ish codes :3

View Source
var TrueDiff1 = func() *big.Float {
	td1 := big.Int{}
	td1.SetString("26959535291011309493156476344723991336010898738574164086137773096960", 10)
	return new(big.Float).SetInt(&td1)
}()

used for diff calc

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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