Welcome to LGCY Network
Search…
Introduction
Abstract
Architecture
Delegated Proof of Stake (DPoS)
Governance
LGCY Virtual Machine
Tokenomics
Developer Fund
Build
LGCY Contract Code
USDL Contract Code
Node
Account
Structure
Technicals
Smart Contract
Transaction
USDL
About
Minting Mechanism
Powered By
GitBook
Structure
The three different account types are Normal, AssetIssue, and Contract. An Account contains 7 parameters:
1.
account_name
: the name for this account – e.g. BillsAccount.
2.
type
: what type of this account is – e.g. 0 (stands for type ‘Normal’).
3.
balance
: balance of this account – e.g. 4213312.
4.
vote
: received votes on this account – e.g. {(“0x1b7w…9xj3”,323), (“0x8djq…j12m”,88),…,(“0x82nd…mx6i”,10001)}.
5.
asset
: other assets expected LGCY in this account – e.g. {, }.
6.
latest_operation_time:
the latest operation time of this account.
Protobuf data structure:
message
Account
{
message
Vote
{
bytes
vote_address =
1
;
int64
vote_count =
2
;
}
bytes
accout_name =
1
;
AccountType type =
2
;
bytes
address =
3
;
int64
balance =
4
;
repeated
Vote votes =
5
;
map<
string
,
int64
> asset =
6
;
int64
latest_operation_time =
10
;
}
enum AccountType {
Normal = 0;
AssetIssue = 1;
Contract = 2;
}
BLOCK
A block typically contains a block header and several transactions.
Protobuf data structure:
message
Block
{
BlockHeader block_header =
1
;
repeated Transaction transactions =
2
;
}
BLOCK HEADER
A block header contains raw_data, witness_signature, and blockID.
Protobuf data structure:
message BlockHeader {
message raw {
int64 timestamp = 1;
bytes txTrieRoot = 2;
bytes parentHash = 3;
uint64 number = 4;
uint64 version = 5;
bytes witness_address = 6;
}
bytes witness_signature = 2;
bytes blockID = 3;
}
Raw Data
Raw data is denoted as
raw_data
in Protobuf. It contains the raw data of a message, containing 6 parameters:
1.
timestamp
: timestamp of this message – e.g. 1543884429000.
2.
txTrieRoot
: the Merkle Tree’s Root – e.g. 7dacsa…3ed.
3.
parentHash
: the hash of the last block – e.g. 7dacsa…3ed.
4.
number
: the block height – e.g. 4638708.
5.
version
: reserved – e.g. 5.
6.
witness_address
: the address of the witness packed in this block – e.g. 41928c…4d21
WITNESS SIGNATURE
Witness signature is denoted as witness_signature in Protobuf, which is the signature for this block header from the witness node.
BLOCK ID
Block ID is denoted as blockID in Protobuf. It contains the atomic identification of a block. A Block ID contains 2 parameters:
1.
hash
: the hash of block.
2.
number
: the hash and height of the block.
Build - Previous
Account
Next
Technicals
Last modified
4mo ago
Copy link