include

package
v0.0.0-...-a67057a Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GOSSIP_PROTOCOL_V1      = "blockchain_gossip/1.0.0"
	SYNC_PROTOCOL_V1        = "blockchain_sync/1.1.0"
	FASTFORWARD_PROTOCOL_V1 = "blockchain_fastforward/1.0.0"

	SYNC_PROTOCOL_V2        = "blockchain_sync/1.2.0"
	FASTFORWARD_PROTOCOL_V2 = "blockchain_fastforward/1.2.0"

	SUPPORTED_GOSSIP_PROTOCOLS = GOSSIP_PROTOCOL_V1

	SNAPSHOT_PROTOCOL = "blockchain_snapshot/1.0.0"

	TX_PROTOCOL               = "blockchain_txn/1.0.0"
	LOC_ASSERTION_PROTOCOL    = "loc_assertion/1.0.0"
	STATE_CHANNEL_PROTOCOL_V1 = "state_channel/1.0.0"

	// B58 Address Versions
	B58_MAINNET_VER = 0
	B58_TESTNET_VER = 2
	B58_HTLC_VER    = 24

	EVT_MGR = "blockchain_event_mgr"
)
View Source
const (
	// determines if a GW can route packets
	GW_CAPABILITY_ROUTE_PACKETS = 0x01
	// determines if a GW can issue POC Challenges
	GW_CAPABILITY_POC_CHALLENGER = 0x02
	// determines if a GW can accept POC Challenges
	GW_CAPABILITY_POC_CHALLENGEE = 0x04
	// determines if a GW can witness challenges
	GW_CAPABILITY_POC_WITNESS = 0x08
	// determines if a GW can issue receipts
	GW_CAPABILITY_POC_RECEIPT = 0x10
	// determines if a GW can participate in consensus group
	GW_CAPABILITY_CONSENSUS_GROUP = 0x20
)

The current full range of possible capabilities supported across the various gateway modes

View Source
const (
	GW_CAPABILITIES_DATAONLY_GATEWAY_V1 = 0 ^ GW_CAPABILITY_ROUTE_PACKETS

	GW_CAPABILITIES_LIGHT_GATEWAY_V1_PART1 = 0 ^ GW_CAPABILITY_ROUTE_PACKETS ^ GW_CAPABILITY_POC_CHALLENGER
	GW_CAPABILITIES_LIGHT_GATEWAY_V1_PART2 = GW_CAPABILITY_POC_CHALLENGEE ^ GW_CAPABILITY_POC_WITNESS ^ GW_CAPABILITY_POC_RECEIPT
	GW_CAPABILITIES_LIGHT_GATEWAY_V1       = GW_CAPABILITIES_LIGHT_GATEWAY_V1_PART1 ^ GW_CAPABILITIES_LIGHT_GATEWAY_V1_PART2
)

V1 capabilities for each gateway type defined below In practise we should never need to use these but they cover a case in blockchain_ledger_gateway_v2:mask_for_gateway_mode/2 whereby we have a GW with its mode field set but the corresponding bitmask chain var is not found....which should never really happen but I feel better for covering the scenario

View Source
const (
	DC_TO_USD                   = 0.00001
	USD_TO_DC                   = 100000
	BONES_PER_HNT               = 100000000
	ORACLE_PRICE_SCALING_FACTOR = 100000000
	LEGACY_STAKING_FEE          = 1
	LEGACY_TXN_FEE              = 0
)
View Source
const (
	// default values for gateways
	// as dBi * 10
	DEFAULT_GAIN = 12
	// as AGL (above ground level) in meters
	DEFAULT_ELEVATION = 0

	SC_MAX_ACTORS = 1100
	// Hz -> MHz multiplier
	MHzToHzMultiplier = 1000000
)

Variables

View Source
var BC_UPGRADE_NAMES = []string{
	"gateway_v2",
	"hex_targets",
	"gateway_oui",
	"h3dex",
	"h3dex2",
	"gateway_lg3",
	"clear_witnesses"}
View Source
var SUPPORTED_FASTFORWARD_PROTOCOLS = []string{FASTFORWARD_PROTOCOL_V2, FASTFORWARD_PROTOCOL_V1}
View Source
var SUPPORTED_SYNC_PROTOCOLS = []string{SYNC_PROTOCOL_V2, SYNC_PROTOCOL_V1}

this is meant to be constant! Please don't mutate it!

Functions

func GW_CAPABILITIES_SET

func GW_CAPABILITIES_SET(Capabilities []byte) byte

helper macros

func GW_CAPABILITY_QUERY

func GW_CAPABILITY_QUERY(Mask byte, Capability byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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