-
Notifications
You must be signed in to change notification settings - Fork 7
Tx signature field structure
- call crypto_sign_ed25519_detached() of libsodium
- the length of
vchSigis 64
- there are two parts of vchSig,
template data+signature - different template contains different
template dataandsignature:- fork template:
template dataisredeem(33 bytes) + fork(32 bytes),signature addressisredeem - delegate template:
template dataisdelegate(32 bytes) + owner(33 bytes),signature addressisowner - pow template:
template dataismint(32 bytes) + spend(33 bytes),signature addressisspend - weighted and multisig template:
template dataisrequired(1 byte) + mapKeyWeight(8 bytes + all pairs of (key(32 bytes) + weight(1 byte)), the order of key-weight is less operater of key(uint256),signature addressisall signed keys. multi-sign see: Multisignature - payment template:
template dataisbusiness(33 bytes) + customer(33 bytes) + height_exec(4 bytes) + amount(8 bytes) + pledge(8 bytes) + height_end(4 bytes),signature addressisbusinessorcustomer - vote template:
template dataisdelegate(33 bytes) + owner(33 bytes),signature addressisowner
- fork template:
- exchange template:
template data+special data+signature.template dataisspend_m(33 bytes) + spend_s(33 bytes) + height_m(4 bytes) + height_s(4 bytes) + fork_m(32 bytes) + fork_s(32 bytes),special dataisvector(sign_s)+vector(sign_m),signature addressisspend_morspend_s
Usually, the nested template is another template and multi-sign template. The rule is also template data + signature, but the signature is also template data + signature.
For example: another template data + multi-sign template data + multi-sign
If more nested template, form as: top template data + secondary template data + ... + nth template data + nth signature
The receiver of transaction is common not recorded except some special template. Special template list:
- vote template
These special template data are recorded on the head of vchSig.
vchSig: private key signature with 64 length
vchSig: vote template data + private key signature with 64 length
vchSig: vote template data + vote owner signature
vchSig: vote template data + multi-sign template data + multi-sign signature
vchSig: vote2 template data + vote1 template data + multi-sign template data + multi-sign signature
vchSig: vote template data + exchange template data + exchange special data + spend_m or spend_s signature
- Source Installation
- Executable Programs
- Take A Tour of BigBang
- CPoW SOLO Guide
- Create Forks
- Exchange Token Between Two Forks
- Mining by Connect to The Pool
- Miner Program
- EDPoS Vote Guide
- JSON RPC
- Command Line Tool
- TX vchdata serialization definition
- Tx signature field structure
- Multisignature
- IO Stream
- Data Stream