Comment on page
Multichain KOR
다중블ë¡ì²´ì¸ 구조는 거래내ì—ì„ ì €ìž¥í•˜ëŠ” ë©”ì¸ ë¸”ë¡ì²´ì¸ê³¼ 블ë¡ì²´ì¸ ìš´ì˜ì— 관계ë˜ëŠ” 여러 서브 블ë¡ì²´ì¸ìœ¼ë¡œ 구성ëœë‹¤. ì´ëŠ” 다양한 ë°ì´í„°êµ¬ì¡°ë¥¼ 단순화시키며 복잡한 비즈니스모ë¸ì„ 체계ì ì¸ ë°ì´í„°ë² ì´ìŠ¤ë¡œ 바꾸어 주는 장ì ì„ ê°€ì§€ê³ ìžˆë‹¤.
- blockchainì˜ ì¢…ë¥˜
- ë‚´ë¶€ ì²´ì¸ ì—°ê²°
- 블ë¡-ê²€ì¦
- Block Structure
- Main Block Structure
- Warrant Block Structure
- Citizen Block Structure
- Oracle Block Structure
- Main block chain: 단순 거래, 블ë¡ì²´ì¸ 기여ë„ì— ë”°ë¥¸ ë³´ìƒ ë‚´ì— ë“±ì„ ê¸°ë¡
- Citizen block chain: SymID 별 ê³„ì • ì •ë³´ ë° ì—…ë°ì´íЏ ì •ë³´ 기ë¡
- Warrant block chain: ì¸ì¦ 노드 ì„ ì¶œ ì •ë³´ 기ë¡
- Oracle block chain: ìš´ì˜ ì •ì±… 파ë¼ë¯¸í„°, í† í°ê°„ 환율 ì •ë³´ 등 기ë¡
- Future block chain: 예약 거래 ê¸°ë¡ (개발중)
Main Blockì€ ê±°ëž˜ ë‚´ì—ì´ë‚˜ ê¸°ë¡ ì‚¬í•ì´ ì—†ë”ë¼ë„ 보안성 강화를 위해 ì¼ì • 주기마다 ìƒì„±ë˜ë©°, Sub Blockì€ ê¸°ë¡í• ë°ì´í„°ê°€ 있는 경우 Main Blockê³¼ 함께 ìƒì„±ëœë‹¤.
Sub Blockì€ Main Block보다 ë°ì´í„°ê°€ ì ì–´ ìƒëŒ€ì 으로 ì¡°ìž‘ì˜ ìœ„í—˜ì„±ì´ ë†’ë‹¤. ë”°ë¼ì„œ Sub Blockì´ ìƒì„±ë 때 Main Blockì˜ ì •ë³´(Number)를 블ë¡ì— 기ë¡í•˜ê³ , 해당 Sub Block ì •ë³´(Number, Hash)를 Main Blockì— ê¸°ë¡í•¨ìœ¼ë¡œì¨ ìž„ì˜ë¡œ Sub Blockë§Œ ì¡°ìž‘í• ìˆ˜ ì—†ë„ë¡ ì„œë¡œ 연결하여 관리ëœë‹¤. (Main Blockì˜ CBHash, WBHash, OBHash, CBNum, WBNum, OBNum ê³¼ ê° Sub Blockì˜ RelatedMBNum ì°¸ê³ )

multichain1
여러 ê°œì˜ ë¸”ë¡ë“¤ì€ ë‹¤ìˆ˜ì˜ ë‚´ë¶€ ì²´ì¸ìœ¼ë¡œ ì—°ê²°ë˜ë©° DAG(Directed Acyclic Graph)를 그리며 성장해 ê°ìœ¼ë¡œ ì¸í•´ 비가ì—ì„±ì„ í™•ë³´í•œë‹¤. Sub Block Chainì€ ë„쿨 ì‹ë¬¼ì²˜ëŸ¼ Main Chainì„ ì§€ì£¼ì‚¼ì•„ ê°™ì´ ìžë¼ëŠ” ë°©ì‹ì´ë‹¤. ë”°ë¼ì„œ íŠ¹ì • ì²´ì¸ì˜ íŠ¹ì • 블ë¡ì„ ì¡°ìž‘ 하기위해서는 ë©”ì¸ ë¸”ë¡ ì²´ì¸ì˜ 최초블ë¡ë¶€í„° 시작해서 주기ì 으로 변경ë˜ëŠ” ë¶ˆíŠ¹ì • ë‹¤ìˆ˜ì˜ ë³´ì¦ ë…¸ë“œë“¤ì˜ ì „ìžì„œëª…ì„ ëª¨ë‘ ìœ„ì¡°í•´ì•¼ 한다.

multichain2
ë˜í•œ Main Blockì´ ìƒì„±ë 때 ìœ íš¨í•œ Sub Blockì˜ ì •ë³´(Number)를 기ë¡í•¨ìœ¼ë¡œì¨ Main Block ìƒì„± 시ì ì— í™œë™ ì¤‘ì¸ Sub Blockì˜ ê²€ìƒ‰ì´ ê°€ëŠ¥í•˜ë‹¤.
ëª¨ë“ Sub Blockì€ ìƒì„±ì‹œê¸°ì™€ ì ìš© 시기가 다를 수 있다.
아래 그림ì—서 Main Block M2 ìƒì„±ì‹œ 최종 Citizen Blockì€ C1ì´ë‹¤. 즉 C1ì— ê¸°ë¡ëœ ë‚´ìš©ì€ Main Block M2부터 ë°˜ì˜ëœë‹¤ëŠ” ì˜ë¯¸ì´ë‹¤.
아래 그림ì—서 Main Block M3부터 활ë™í•œ Warrant Nodeë“¤ì€ W1ì— ê¸°ë¡ë˜ì–´ 있다는 ê²ƒì„ ì•Œ 수 있다. Warrant Blockì€ í•´ë‹¹ Warrant Blockì„ ì 용하기 몇 ë¸”ë¡ ì´ì „ì— ìƒì„±ëœë‹¤. (예를 들어 Main Block Numberê°€ 100ì—서 200까지 ì ìš©í• Warrant Blockì€ Main Block Numberê°€ 90ì¼ë•Œ ìƒì„±ëœë‹¤.) ì´ë¥¼ 관리하기위해서 Warrant Blockì—는 ê° Warrant Blockì˜ ì ìš© 주기와 Warrant Node 임기가 í¬í•¨ë˜ì–´ 있다.
ì°¸ê³ : Main Blockì˜ ActiveCBNum, ActiveWBNum, ActiveOBNum

multichain3
블ë¡ì˜ ê²€ì¦ì€ ë¸”ë¡ ë‚´ì— í¬í•¨ëœ 서명 ê°’ì„ ê²€ì¦í•¨ìœ¼ë¡œì¨ ì´ë£¨ì–´ì§„다. ë¸”ë¡ ë‚´ì˜ ì„œëª…ì€ ê²°í•© 서명 ë°©ì‹ì„ 사용하며, ì´ëŠ” ë¸”ë¡ í•©ì˜ì— 찬성한 ë³´ì¦ ë…¸ë“œë“¤ì´ ìƒì„±í•œ ì„œëª…ì„ ê²°í•©í•˜ì—¬ ìƒì„±ëœë‹¤.

multichain4
ì´ë ‡ê²Œ ìƒì„±ëœ ì„œëª…ì„ ê²€ì¦í•˜ê¸° 위해서는 ë¸”ë¡ í•©ì˜ì— 찬성한 ì „ì²´ ë³´ì¦ ë…¸ë“œë“¤ì˜ ì‹ ì›ì„ 확ì¸í• 수 있어야만 하며, ì´ëŠ” 블ë¡ì„ 조작하기 위해서는 ê²°í•© 서명 ìƒì„±ì— ì‚¬ìš©ëœ ì „ì²´ ë³´ì¦ ë…¸ë“œë“¤ì˜ ì „ìžì„œëª…ì„ ëª¨ë‘ ìœ„ì¡°í•´ì•¼ 한다는 ê²ƒì„ ì˜ë¯¸í•œë‹¤.

multichain5
- Data size
Type | Size(Bytes) |
uint64 | 8 |
common.Address | 10 |
Common.Hash | 32 |
common.PubKeyHash | 20 |
*big.Int | 가변 |
BKeyPub | 65 |
BKeyPubSigned | 128 |
Sign | 64 |
Bloom | 256 |
Extra | 256 |
Payload | 32000 |
​ |
Name | Type | Description |
header | *Header | í—¤ë” |
transactions | Transactions | ë¸”ë¡ ë‚´ì˜ íŠ¸ëžœìžì…˜ 리스트 |
rewards | Rewards | ë¸”ë¡ ë‚´ì˜ ë³´ìƒ ë‚´ì— |
validatorInfos | ValidatorInfo | ë¸”ë¡ í•©ì˜ì— 찬성한 ë³´ì¦ ë…¸ë“œ ì •ë³´ ë‚´ì— |
signInfo | *SignInfo | ë¸”ë¡ ê²€ì¦ì„ 위한 서명 ì •ë³´ |
- Header Structure in Main Block
Name | Type | Json Name | Description |
ParentHash | Common.Hash | parentHash | 부모 ë¸”ë¡ í—¤ë”ì˜ í•´ì‹œê°’ |
Primary | Common.Address | primary | ë¸”ë¡ ì œì•ˆìžì˜ SymID |
Root | Common.Hash | stateRoot | ìƒíƒœ 트리 ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
SctRoot | Common.Hash | sctStateRoot | SCT 트리 ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
TxHash | Common.Hash | transactionsRoot | 트랜ìžì…˜ 트리 ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
RewardHash | Common.Hash | rewardRoot | ë³´ìƒ íŠ¸ë¦¬ ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
ReceiptHash | Common.Hash | receiptsRoot | ì˜ìˆ˜ì¦ 트리 ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
CBHash | Common.Hash | cbHash | 블ë¡ê³¼ ì—°ê²°ëœ ì‹œí‹°ì¦Œ 블ë¡ì˜ 해시값 |
WBHash | Common.Hash | wbHash | 블ë¡ê³¼ ì—°ê²°ëœ ì›ŒëŸ°íŠ¸ 블ë¡ì˜ 해시값 |
OBHash | Common.Hash | obHash | 블ë¡ê³¼ ì—°ê²°ëœ ì˜¤ë¼í´ 블ë¡ì˜ 해시값 |
Number | *big.Int | number | 블ë¡ì˜ ë†’ì´ (ë¸”ë¡ ìƒì„± 주기와 무관하게 트랜ìžì…˜ì´ 존재하거나, ë¸”ë¡ ìƒì„± ì£¼ê¸°ì— ë§žì¶° ë¸”ë¡ ìƒì„±ì‹œ 마다 카운트ë˜ëŠ” ê°’) |
CBNum | *big.Int | cbNum | 블ë¡ê³¼ ì—°ê²°ëœ ì‹œí‹°ì¦Œ 블ë¡ì˜ ë†’ì´ |
WBNum | *big.Int | wbNum | 블ë¡ê³¼ ì—°ê²°ëœ ì›ŒëŸ°íŠ¸ 블ë¡ì˜ ë†’ì´ |
OBNum | *big.Int | obNum | 블ë¡ê³¼ ì—°ê²°ëœ ì˜¤ë¼í´ 블ë¡ì˜ ë†’ì´ |
ActiveCBNum | *big.Int | activeCbNum | 최종 ìƒì„±ëœ 시티즌 블ë¡ì˜ ë†’ì´ ë²ˆí˜¸ |
ActiveWBNum | *big.Int | activeWbNum | 블ë¡ì„ ê²€ì¦í•˜ê¸° 위해 필요한 워런트 블ë¡ì˜ ë†’ì´ ë²ˆí˜¸ |
ActiveOBNum | *big.Int | activeObNum | 현재 ì ìš© ì¤‘ì¸ ì˜¤ë¼í´ 블ë¡ì˜ ë†’ì´ ë²ˆí˜¸ |
Bloom | Bloom | logsBloom | 트랜ìžì…˜ë“¤ì˜ ë¡œê·¸ë“¤ì„ ë¸”ë£¸í•„í„°ë¡œ 표현 |
TickStamp | *big.Int | tickStamp | ë¸”ë¡ ìƒì„± 주기(BlockGenTick) 마다 카운트 ë˜ëŠ” ê°’ |
Time | *big.Int | timeStamp | 타임스탬프 epoch값 (UTC) |
GasLimit | uint64 | gasLimit | 블ë¡ë‹¹ 현재 지급 가능한 최대 가스 ì´í•© |
GasUsed | uint64 | gasUsed | ë©”ì¸ ë¸”ë¡ ë‚´ì— íŠ¸ëžœìžì…˜ì— ì˜í•´ ì‚¬ìš©ëœ ê°€ìŠ¤ì˜ ì´í•© |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
- Transactions in Main Block
Name | Type | Json Name | Description |
Publisher | common.Address | from | ë°œì‹ ìž ì£¼ì†Œ |
AccountNonce | uint64 | nonce | 트랜ìžì…˜ ì¼ë ¨ë²ˆí˜¸ |
Price | *big.Int | gasPrice | ë°œì‹ ìžê°€ 거래를 처리하기 위하여 지급하는 가스가격 |
GasLimit | uint64 | gas | 거래를 ì²˜ë¦¬í•˜ëŠ”ë° í—ˆìš©ë˜ëŠ” 최대 가스량 |
Recipient | common.Address | to | ìˆ˜ì‹ ìž ì£¼ì†Œ (ê³„ì • ë˜ëŠ” 컨트랙트 주소) |
Amount | *big.Int | value | ìˆ˜ì‹ ìžì—게 보내는 ì½”ì¸ ì–‘ |
Payload | []byte | input | ìž„ì˜ì˜ 메시지 or ê³„ì•½ì— ëŒ€í•œ 함수 호출 or ê³„ì•½ì„ ìƒì„±í•˜ëŠ” 코드 |
Type | uint64 | type | 트랜ìžì…˜ 종류 ( 0: original, 1:sct, 2:deposit) |
WorkNode | []common.Address | workNodes | 트랜ìžì…˜ì„ 중개하는 워í¬ë…¸ë“œì˜ SymID |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
V | *big.Int | v | ECDSA 서명 구성 요소 |
R | *big.Int | r | ECDSA 서명 구성 요소 |
S | *big.Int | s | ECDSA 서명 구성 요소 |
- Rewards in Main Block
Name | Type | Json Name | Description |
SymId | Common.Address | symId | ë³´ìƒì„ ë°›ì„ ê³„ì •ì˜ Sym ID |
Value | *big.Int | value | ë³´ìƒì„ ë°›ì„ ì–‘ |
Type | uint | type | ë³´ìƒ ì¢…ë¥˜ (Reserved) |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
- ValidatorInfos in Main Block
Name | Type | Json Name | Description |
SymId | Common.Address | symId | ë¸”ë¡ í•©ì˜ì— 찬성한 ë³´ì¦ ë…¸ë“œì˜ Sym ID |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
- SignInfos in Main Block
Name | Type | Json Name | Description |
MBNum | *big.Int | mbNum | 서명 ì •ë³´ì™€ ê´€ë ¨ ëœ ë©”ì¸ ë¸”ë¡ì˜ ë†’ì´ ë²ˆí˜¸ (ë¸”ë¡ ë™ê¸°í™”시 사용) |
Sign | []byte | sign | ê²°í•© 서명 ê°’(ë¸”ë¡ ê²€ì¦ìžê°€ ìƒì„±í•œ 서명 + 프ë¼ì´ë¨¸ë¦¬ ì„œëª…ì„ ê²°í•©í•œ ê°’) |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
- ê²€ì¦ìž 서명 범위 (Header, Transactions, Rewards)
- 프ë¼ì´ë¨¸ë¦¬ 서명 범위 (Header, Transactions, Rewards, ValidatorInfos)
Name | Type | Description |
header | *WarrantHeader | í—¤ë” |
warrants | []*Warrant | ë¸”ë¡ ë‚´ì˜ ë³´ì¦ ë…¸ë“œ ì •ë³´ 리스트 |
- Header in Warrant Block
Name | Type | Json Name | Description |
ParentHash | Common.Hash | parentHash | 부모 ë¸”ë¡ í—¤ë”ì˜ í•´ì‹œê°’ |
RelatedMBNum | *big.Int | relatedMbNum | 블ë¡ê³¼ ê´€ë ¨ ëœ ë©”ì¸ ë¸”ë¡ ë†’ì´ ë²ˆí˜¸ |
WarrantHash | Common.Hash | warrantsRoot | ë³´ì¦ë…¸ë“œì •ë³´ 트리 ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
Number | *big.Int | number | 현재 블ë¡ì˜ ë†’ì´ |
BeginMBNum | *big.Int | beginMbNum | 블ë¡ë‚´ì— í¬í•¨ ëœ ë³´ì¦ ë…¸ë“œ ì •ë³´ë¥¼ ì´ìš©í•˜ì—¬ ê²€ì¦ í• ìˆ˜ 있는 ë©”ì¸ ë¸”ë¡ ì‹œìž‘ 번호 |
EndMBNum | *big.Int | endMbNum | 블ë¡ë‚´ì— í¬í•¨ ëœ ë³´ì¦ ë…¸ë“œ ì •ë³´ë¥¼ ì´ìš©í•˜ì—¬ ê²€ì¦ í• ìˆ˜ 있는 ë©”ì¸ ë¸”ë¡ ë 번호 |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
- Warrant Data in Warrant Block
Name | Type | Json Name | Description |
SymId | *Common.Address | symId | ë³´ì¦ ë…¸ë“œë¡œ í™œë™ í• ë…¸ë“œì˜ Sym ID |
BKeyPub | []byte | bKeyPub | ë¸”ë¡ ê²€ì¦ìš© 공개키 ê°’ |
BKeyPubSigned | []byte | bKeyPubSigned | ë¸”ë¡ ê²€ì¦ìš© 공개키를 어카운트 키로 서명한 ê°’ |
Group | *uint64 | group | ë³´ì¦ ë…¸ë“œ 그룹 (A or B) |
Elected | *big.Int | elected | 해당 노드가 ë³´ì¦ ë…¸ë“œë¡œ í™œë™ í• ìˆ˜ 있는 ë©”ì¸ ë¸”ë¡ ì‹œìž‘ 번호 |
Finished | *big.Int | finished | 해당 노드가 ë³´ì¦ ë…¸ë“œë¡œ í™œë™ í• ìˆ˜ 있는 ë©”ì¸ ë¸”ë¡ ë 번호 |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
Name | Type | Description |
header | *CitizenHeader | í—¤ë” |
citizens | []*Citizen | ë¸”ë¡ ë‚´ì˜ ì‹œí‹°ì¦Œ ë°ì´í„° 리스트 |
- Header in Citizen Block
Name | Type | Json Name | Description |
ParentHash | Common.Hash | parentHash | 부모 ë¸”ë¡ í—¤ë”ì˜ í•´ì‹œê°’ |
Root | Common.Hash | stateRoot | 시티즌 ìƒíƒœ 트리 ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
RelatedMBNum | *big.Int | relatedMbNum | 블ë¡ê³¼ ê´€ë ¨ ëœ ë©”ì¸ë¸”ë¡ ë†’ì´ ë²ˆí˜¸ |
CitizenHash | Common.Hash | citizensRoot | 시티즌 ì •ë³´ 트리 ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
Number | *big.Int | number | 블ë¡ì˜ ë†’ì´ |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
- Citizen Data in Citizen Block
Name | Type | Json Name | Description |
Publisher | common.Address | from | 시티즌 ì •ë³´ë¥¼ 발행한 CAì˜ Sym ID |
Recipient | *common.Address | to | Reserved |
AccountNonce | uint64 | nonce | 시티즌 ì¼ë ¨ë²ˆí˜¸ |
SymId | common.Address | symId | ì‹ ê·œ ë“±ë¡ ë˜ëŠ” ì—…ë°ì´íŠ¸í• Citizenì˜ Sym ID |
AKeyPubH | common.PubKeyHash | aKeyPubH | 20bytes, Account 공개키 hash (20bytes cut) |
VFlag | *uint64 | vFlag | ê²€ì¦ ë ˆë²¨ |
Country | *uint64 | country | êµê°€ 코드 |
Status | *uint64 | status | ìƒíƒœ 코드 ( 0x01: Active, 0x02 :Revoked, 0x03 : Locked, 0x04 : Marked |
Credit | *uint64 | credit | ì‹ ìš©ë„ |
Role | *uint64 | role | ì—í• ( 0xf0f0 : Master CA, 0xf0f1 : CA, 0xf0f2 : Oracle, 0x1 : general, 0x02 : Dapp) |
RefCode | *uint64 | refCode | ë°œê¸‰ìž ì°¸ì¡° 코드 |
WriteTime | *big.Int | writeTime | ì‹ ê·œ ë“±ë¡ ë˜ëŠ” ì—…ë°ì´íЏ ìš”ì² ì‹œê°„ |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
V | *big.Int | v | ECDSA 서명 구성 요소 |
R | *big.Int | r | ECDSA 서명 구성 요소 |
S | *big.Int | s | ECDSA 서명 구성 요소 |
Name | Type | Description |
header | *OracleHeader | í—¤ë” |
citizens | []*Oracle | ë¸”ë¡ ë‚´ì˜ ì˜¤ë¼í´ ë°ì´í„° 리스트 |
- Header in Oracle Block
Name | Type | Json Name | Description |
ParentHash | Common.Hash | parentHash | 부모 ë¸”ë¡ í—¤ë”ì˜ í•´ì‹œê°’ |
Root | Common.Hash | stateRoot | 오ë¼í´ ìƒíƒœ 트리 ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
RelatedMBNum | *big.Int | relatedMbNum | 블ë¡ê³¼ ê´€ë ¨ ëœ ë©”ì¸ë¸”ë¡ ë†’ì´ ë²ˆí˜¸ |
OracleHash | Common.Hash | citizensRoot | 오ë¼í´ ì •ë³´ 트리 ë£¨íŠ¸ì˜ í•´ì‹œê°’ |
Number | *big.Int | number | 블ë¡ì˜ ë†’ì´ |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
- Oracle Data in Oracle Block
Name | Type | Json Name | Description |
Publisher | common.Address | from | 오ë¼í´ë¼ì´ì €ì˜ Sym ID |
Recipient | *common.Address | to | Reserved |
AccountNonce | uint64 | nonce | 오ë¼í´ ì¼ë ¨ 번호 |
Payload | []byte | payload | 오ë¼í´ 파ë¼ë¯¸í„° ì •ë³´ |
Extra | []byte | extraData | 추가 ì •ë³´ (optional) |
V | *big.Int | v | ECDSA 서명 구성 요소 |
R | *big.Int | r | ECDSA 서명 구성 요소 |
S | *big.Int | s | ECDSA 서명 구성 요소 |
Last modified 1yr ago