firo 0.14.11.1 → 0.14.12.0 (#855)
Co-authored-by: Ara <araarakelyan1985@gmail.com>
This commit is contained in:
parent
86168f4c5e
commit
10da32b249
@ -21,6 +21,7 @@ const (
|
||||
OpLelantusMint = 0xc5
|
||||
OpLelantusJMint = 0xc6
|
||||
OpLelantusJoinSplit = 0xc7
|
||||
OpLelantusJoinSplitPayload = 0xc9
|
||||
|
||||
MainnetMagic wire.BitcoinNet = 0xe3d9fef1
|
||||
TestnetMagic wire.BitcoinNet = 0xcffcbeea
|
||||
@ -122,6 +123,8 @@ func (p *FiroParser) GetAddressesFromAddrDesc(addrDesc bchain.AddressDescriptor)
|
||||
return []string{"LelantusJMint"}, false, nil
|
||||
case OpLelantusJoinSplit:
|
||||
return []string{"LelantusJoinSplit"}, false, nil
|
||||
case OpLelantusJoinSplitPayload:
|
||||
return []string{"LelantusJoinSplit"}, false, nil
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,7 +173,7 @@ func (p *FiroParser) ParseBlock(b []byte) (*bchain.Block, error) {
|
||||
} else {
|
||||
if isMTP(header) {
|
||||
mtpHeader := MTPBlockHeader{}
|
||||
mtpHashData := MTPHashData{}
|
||||
mtpHashDataRoot := MTPHashDataRoot{}
|
||||
|
||||
// header
|
||||
err = binary.Read(reader, binary.LittleEndian, &mtpHeader)
|
||||
@ -178,28 +181,46 @@ func (p *FiroParser) ParseBlock(b []byte) (*bchain.Block, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// hash data
|
||||
err = binary.Read(reader, binary.LittleEndian, &mtpHashData)
|
||||
// hash data root
|
||||
err = binary.Read(reader, binary.LittleEndian, &mtpHashDataRoot)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// proof
|
||||
for i := 0; i < MTPL*3; i++ {
|
||||
var numberProofBlocks uint8
|
||||
isAllZero := true
|
||||
for i := 0; i < 16; i++ {
|
||||
if mtpHashDataRoot.HashRootMTP[i] != 0 {
|
||||
isAllZero = false
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
err = binary.Read(reader, binary.LittleEndian, &numberProofBlocks)
|
||||
if !isAllZero {
|
||||
// hash data
|
||||
mtpHashData := MTPHashData{}
|
||||
err = binary.Read(reader, binary.LittleEndian, &mtpHashData)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for j := uint8(0); j < numberProofBlocks; j++ {
|
||||
var mtpData [16]uint8
|
||||
// proof
|
||||
for i := 0; i < MTPL*3; i++ {
|
||||
var numberProofBlocks uint8
|
||||
|
||||
err = binary.Read(reader, binary.LittleEndian, mtpData[:])
|
||||
err = binary.Read(reader, binary.LittleEndian, &numberProofBlocks)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for j := uint8(0); j < numberProofBlocks; j++ {
|
||||
var mtpData [16]uint8
|
||||
|
||||
err = binary.Read(reader, binary.LittleEndian, mtpData[:])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -318,8 +339,11 @@ func isProgPow(h *wire.BlockHeader, isTestNet bool) bool {
|
||||
return isTestNet && epoch >= SwitchToProgPowBlockHeaderTestnet || !isTestNet && epoch >= SwitchToProgPowBlockHeaderMainnet
|
||||
}
|
||||
|
||||
type MTPHashData struct {
|
||||
type MTPHashDataRoot struct {
|
||||
HashRootMTP [16]uint8
|
||||
}
|
||||
|
||||
type MTPHashData struct {
|
||||
BlockMTP [128][128]uint64
|
||||
}
|
||||
|
||||
|
||||
@ -22,10 +22,10 @@
|
||||
"package_name": "backend-firo",
|
||||
"package_revision": "satoshilabs-1",
|
||||
"system_user": "firo",
|
||||
"version": "0.14.11.1",
|
||||
"binary_url": "https://github.com/firoorg/firo/releases/download/v0.14.11.1/firo-0.14.11.1-linux64.tar.gz",
|
||||
"version": "0.14.12.0",
|
||||
"binary_url": "https://github.com/firoorg/firo/releases/download/v0.14.12.0/firo-0.14.12.0-linux64.tar.gz",
|
||||
"verification_type": "sha256",
|
||||
"verification_source": "8669ae8ce3356deee2512a4da133eab347c704cf47c865caf9ea10b46ba8b477",
|
||||
"verification_source": "47c7ae07f85189b6b11068848a5c8f930528e6edfff14fd3c6e6305a01e8da77",
|
||||
"extract_command": "tar -C backend --strip 1 -xf",
|
||||
"exclude_files": [
|
||||
"bin/firo-qt",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user