Documentation

Index

Constants

View Source
const (
	WithdrawStake byte = iota
	PlaceStake
	WithdrawReward
)
View Source
const (
	// Size of individual chunks sent for a syncing peer.
	SyncChunkSize = 16 * 1024 // 64KB

	// Size of file size used for streaming file to disk during syncing.
	SyncPooledFileSize = 100 * 1024 * 1024 // 100MB
)
View Source
const (
	// VersionMajor is major version component of the current release
	VersionMajor = 0
	// VersionMinor is minor version component of the current release
	VersionMinor = 2
	// VersionPatch is patch version component of the current release
	VersionPatch = 0
)

Variables

View Source
var (
	// S/Kademlia overlay network parameters.
	SKademliaC1 = 1
	SKademliaC2 = 1

	// Snowball consensus protocol parameters.
	SnowballK     = 2
	SnowballAlpha = 0.8
	SnowballBeta  = 50

	// Timeout for querying a transaction to K peers.
	QueryTimeout = 1 * time.Second

	// Number of rounds we should be behind before we start syncing.
	SyncIfRoundsDifferBy uint64 = 2

	// Max graph depth difference to search for eligible transaction
	// parents from for our node.
	MaxDepthDiff uint64 = 10

	//
	MaxDownloadDepthDiff uint64 = 1500

	// Max number of parents referencable by a transaction.
	MaxParentsPerTransaction = 32

	// Minimum difficulty to define a critical transaction.
	MinDifficulty byte = 8

	// Factor to scale a transactions confidence down by to compute the difficulty needed to define a critical transaction.
	DifficultyScaleFactor = 0.5

	// Default fee amount paid by a node per transaction.
	DefaultTransactionFee uint64 = 2

	// Multiplier for size of transaction payload to calculate it's fee
	TransactionFeeMultiplier = 0.05

	// Minimum amount of stake to start being able to reap validator rewards.
	MinimumStake uint64 = 100

	MinimumRewardWithdraw = MinimumStake

	RewardWithdrawalsRoundLimit = 50

	FaucetAddress = "0f569c84d434fb0ca682c733176f7c0c2d853fce04d95ae131d2f9b4124d93d8"

	GasTable = map[string]uint64{}/* 177 elements not displayed */

	TagLabels = map[string]Tag{
		`nop`:      TagNop,
		`transfer`: TagTransfer,
		`contract`: TagContract,
		`batch`:    TagBatch,
		`stake`:    TagStake,
	}

	ContractDefaultMemoryPages = 4
	ContractMaxMemoryPages     = 4096
	ContractTableSize          = 4096
	ContractMaxValueSlots      = 8192
	ContractMaxCallStackDepth  = 256
	ContractMaxGlobals         = 64
)
View Source
var (
	GitCommit = "unset"
	GoVersion = "unset"
	OSArch    = "unset"

	// VersionMeta is append to the version string
	VersionMeta = "testing"
)

    variables set via linker flags

    View Source
    var Version = func() string {
    	return fmt.Sprintf("v%d.%d.%d-%s", VersionMajor, VersionMinor, VersionPatch, VersionMeta)
    }()

      Version holds the textual version string.

      View Source
      var VersionCode = func() uint32 {
      	var versionCode uint32
      
      	versionCode = (VersionMajor << 24) | (VersionMinor << 16) | VersionPatch
      
      	return versionCode
      }()

      Functions

      This section is empty.

      Types

      type Tag

      type Tag byte

        Tag is a wrapper for a transaction tag.

        const (
        	TagNop Tag = iota
        	TagTransfer
        	TagContract
        	TagStake
        	TagBatch
        )

          Transaction tags.

          func (Tag) String

          func (tag Tag) String() string

            String converts a given tag to a string.