consts

package
v0.0.0-...-b7062c8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2017 License: LGPL-3.0-or-later Imports: 1 Imported by: 9

Documentation

Index

Constants

View Source
const (
	MAX_COLUMNS = 50 // Maximum columns in tables
	MAX_INDEXES = 10 // Maximum indexes in tables
)
View Source
const ALERT_ERROR_TIME = 1
View Source
const ALERT_KEY = `` /* 588-byte string literal not displayed */
View Source
const BLOCKCHAIN_SIZE = 1000

Approximate blockchain size

View Source
const BLOCKCHAIN_URL = "https://raw.githubusercontent.com/egaas-blockchain/egaas-blockchain.github.io/master/testnet_blockchain"

Where is blockchain. For those who don't want to collect it from nodes

View Source
const CHANGE_KEY_PERIOD = 86400 * 7
View Source
const COMMISSION = 1000
View Source
const COMMISSION_WALLET = 8275283526439353759
View Source
const COUNT_BLOCK_BEFORE_SAVE = RB_BLOCKS_2
View Source
const COUNT_CONFIRMED_NODES = 5

is used in confirmations

View Source
const DATA_TYPE_BLOCK_BODY = 7
View Source
const DATA_TYPE_MAX_BLOCK_ID = 10
View Source
const EGS_DIGIT = 18 //money_digit for EGS 1000000000000000000
View Source
const ERROR_TIME = 3
View Source
const FIRST_QDLT = 1e+26
View Source
const GAPS_BETWEEN_BLOCKS = 3
View Source
const GOOGLE_API_KEY = "AIzaSyBLZlUPgd9uhX05OrsFU68yJOZFrYhZe84"
View Source
const LAST_BLOCK = 330000

Approximate current last block

View Source
const MAX_BLOCK_SIZE = 64 << 20
View Source
const MAX_BLOCK_USER_TXS = 100
View Source
const MAX_TX_BACK = 86400

transaction may wander in the net for a day and then get into a block

View Source
const MAX_TX_COUNT = 100000
View Source
const MAX_TX_FORW = 0

How fast could the time of transaction pass

View Source
const MAX_TX_SIZE = 32 << 20
View Source
const MIN_CONFIRMED_NODES = 0

The number of nodes which should have the same block as we have for regarding this block belongs to the major part of DC-net. For get_confirmed_block_id()

View Source
const OUT_CONNECTIONS = 10

default value, with how many nodes we make the connection

View Source
const RATE_VOTING_PERIOD = 3600
View Source
const RB_BLOCKS_1 = 30
View Source
const RB_BLOCKS_2 = 1440
View Source
const READ_TIMEOUT = 20

timeouts for TCP

View Source
const RECOVERY_ADDRESS = 8275283526439353759
View Source
const ROUND_FIX = 0.00000000001
View Source
const TCP_PORT = "7078"
View Source
const (
	// TxfPublic is the flag of TXHeader
	TxfPublic = 0x01 // Append PublicKey to Sign in TXHeader
)
View Source
const UPD_AND_VER_URL = "http://egaas.org"
View Source
const UPD_FULL_NODES_PERIOD = 3600 // is for the test time, then we have to put 86400
View Source
const VERSION = "0.1.7b1"

Current version

View Source
const WAIT_CONFIRMED_NODES = 10
View Source
const WRITE_TIMEOUT = 20

Variables

View Source
var Countries = []string{} /* 245 elements not displayed */

Countries is the list of the countries

View Source
var LangMap = map[string]int{"en": 1, "ru": 42}

LangMap contains supported languages

View Source
var TxTypes = map[int]string{
	1:  "FirstBlock",
	2:  "Reserved1",
	3:  "Reserved2",
	4:  "Reserved3",
	5:  "DLTTransfer",
	6:  "DLTChangeHostVote",
	7:  "UpdFullNodes",
	8:  "ChangeNodeKey",
	9:  "NewState",
	10: "NewColumn",
	11: "NewTable",
	12: "EditPage",
	13: "EditMenu",
	14: "EditContract",
	15: "NewContract",
	16: "EditColumn",
	17: "EditTable",
	18: "EditStateParameters",
	19: "NewStateParameters",
	20: "NewPage",
	21: "NewMenu",
	22: "ChangeNodeKeyDLT",
	23: "AppendPage",
	24: "RestoreAccessActive",
	25: "RestoreAccessClose",
	26: "RestoreAccessRequest",
	27: "RestoreAccess",
	28: "NewLang",
	29: "EditLang",
	30: "AppendMenu",
	31: "NewSign",
	32: "EditSign",
	33: "EditWallet",
	34: "ActivateContract",
	35: "NewAccount",
}

TxTypes is the list of the embedded transactions

Functions

func IsStruct

func IsStruct(tx int) bool

IsStruct is only used for FirstBlock now

func MakeStruct

func MakeStruct(name string) interface{}

MakeStruct is only used for FirstBlock now

func Sign

func Sign(v interface{}) (sign []byte)

Sign returns the signature attached to the header

Types

type BlockHeader

type BlockHeader struct {
	Type     byte
	BlockID  uint32
	Time     uint32
	WalletID int64
	StateID  byte
	Sign     []byte
}

BlockHeader is a structure of the block header

type CitizenRequest

type CitizenRequest struct {
	TxHeader
	StateID int64
	Sign    []byte
}

CitizenRequest isn't used

type FirstBlock

type FirstBlock struct {
	TxHeader
	PublicKey     []byte
	NodePublicKey []byte
	Host          string
}

FirstBlock is the header of FirstBlock transaction

type NewCitizen

type NewCitizen struct {
	TxHeader
	StateID   int64
	PublicKey []byte
	Sign      []byte
}

NewCitizen isn't used

type TXHeader

type TXHeader struct {
	Type     int32 // byte < 128 system tx 129 - 1 byte 130 - 2 bytes 131 - 3 - bytes 132 - 4 bytes
	Time     uint32
	WalletID uint64
	StateID  int32
	Flags    uint8
	Sign     []byte
}

TXHeader is the header of the contract's transactions

func HeaderNew

func HeaderNew(v interface{}) TXHeader

HeaderNew returns TXHeader

type TXNewCitizen

type TXNewCitizen struct {
	TXHeader
	PublicKey []byte
}

TXNewCitizen isn't used

type TxHeader

type TxHeader struct {
	Type      byte
	Time      uint32
	WalletID  int64
	CitizenID int64
}

TxHeader is the old version of the transaction header

func Header(v interface{}) TxHeader

Header returns TxHeader

Jump to

Keyboard shortcuts

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