-
Notifications
You must be signed in to change notification settings - Fork 199
/
constants.go
42 lines (36 loc) · 1.28 KB
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package process
// BlockHeaderState specifies which is the state of the block header received
type BlockHeaderState int
const (
// BHReceived defines ID of a received block header
BHReceived BlockHeaderState = iota
// BHProcessed defines ID of a processed block header
BHProcessed
// BHProposed defines ID of a proposed block header
BHProposed
// BHNotarized defines ID of a notarized block header
BHNotarized
)
// TransactionType specifies the type of the transaction
type TransactionType int
const (
// MoveBalance defines ID of a payment transaction - moving balances
MoveBalance TransactionType = iota
// SCDeployment defines ID of a transaction to store a smart contract
SCDeployment
// SCInvoking defines ID of a transaction of type smart contract call
SCInvoking
// RewardTx defines ID of a reward transaction
RewardTx
// InvalidTransaction defines unknown transaction type
InvalidTransaction
)
const ShardBlockFinality = 1
const MetaBlockFinality = 1
const MaxHeaderRequestsAllowed = 10
const MaxItemsInBlock = 15000
const MinItemsInBlock = 15000
const MaxNoncesDifference = 5
// TODO - calculate exactly in case of the VM, for every VM to have a similar constant, operations / seconds
const MaxGasLimitPerMiniBlock = uint64(100000)
const MaxRequestsWithTimeoutAllowed = 10