Repository: summa-tx/bitcoin-spv (language: rust)

Issue:
Remove redundant BE/LE elements from structs and serialization format



Discussion / hints:
So if I understand right, I would take 
```
func HeaderFromRaw(raw RawHeader, height uint32) BitcoinHeader {
	digestLE := Hash256(raw[:])
	digestBE := ReverseHash256Endianness(digestLE)
	prevhashLE := ExtractPrevBlockHashLE(raw)
	prevhashBE := ReverseHash256Endianness(prevhashLE)
	merkleRootLE := ExtractMerkleRootLE(raw)
	merkleRootBE := ReverseHash256Endianness(merkleRootLE)

	return BitcoinHeader{
		raw,
		digestBE,
		digestLE,
		height,
		prevhashBE,
		prevhashLE,
		merkleRootBE,
		merkleRootLE,
	}
}
```
and change it to
```
func HeaderFromRaw(raw RawHeader, height uint32) BitcoinHeader {
	digest := Hash256(raw[:])
	prevhash := ExtractPrevBlockHashLE(raw)
	merkleRoot := ExtractMerkleRootLE(raw)

	return BitcoinHeader{
		raw,
		digest,
		height,
		prevhash,
		merkleRoot,
	}
}
```
and then change the BitcoinHeader type appropriately?  I'd probably have to also add a note that these values are LE.
yes, but it needs to be done for all languages

Fix patch:
diff --git a/golang/btcspv/types.go b/golang/btcspv/types.go
index 27c69f20..bc703d8f 100644
--- a/golang/btcspv/types.go
+++ b/golang/btcspv/types.go
@@ -17,16 +17,13 @@ type RawHeader [80]byte
 // HexBytes is a type alias to make JSON hex ser/deser easier
 type HexBytes []byte
 
-// BitcoinHeader is a parsed Bitcoin header
+// BitcoinHeader is a parsed Bitcoin header, values are LE
 type BitcoinHeader struct {
-	Raw          RawHeader     `json:"raw"`
-	Hash         Hash256Digest `json:"hash"`
-	HashLE       Hash256Digest `json:"hash_le"`
-	Height       uint32        `json:"height"`
-	PrevHash     Hash256Digest `json:"prevhash"`
-	PrevHashLE   Hash256Digest `json:"prevhash_le"`
-	MerkleRoot   Hash256Digest `json:"merkle_root"`
-	MerkleRootLE Hash256Digest `json:"merkle_root_le"`
+	Raw        RawHeader     `json:"raw"`
+	Hash       Hash256Digest `json:"hash"`
+	Height     uint32        `json:"height"`
+	PrevHash   Hash256Digest `json:"prevhash"`
+	MerkleRoot Hash256Digest `json:"merkle_root"`
 }
 
 // SPVProof is the base struct for an SPV proof
@@ -36,7 +33,6 @@ type SPVProof struct {
 	Vout              HexBytes      `json:"vout"`
 	Locktime          HexBytes      `json:"locktime"`
 	TxID              Hash256Digest `json:"tx_id"`
-	TxIDLE            Hash256Digest `json:"tx_id_le"`
 	Index             uint32        `json:"index"`
 	ConfirmingHeader  BitcoinHeader `json:"confirming_header"`
 	IntermediateNodes HexBytes      `json:"intermediate_nodes"`
@@ -74,22 +70,16 @@ func NewRawHeader(b []byte) (RawHeader, error) {
 
 // HeaderFromRaw builds a BitcoinHeader from a raw bytestring and height
 func HeaderFromRaw(raw RawHeader, height uint32) BitcoinHeader {
-	digestLE := Hash256(raw[:])
-	digestBE := ReverseHash256Endianness(digestLE)
-	prevhashLE := ExtractPrevBlockHashLE(raw)
-	prevhashBE := ReverseHash256Endianness(prevhashLE)
-	merkleRootLE := ExtractMerkleRootLE(raw)
-	merkleRootBE := ReverseHash256Endianness(merkleRootLE)
+	digest := Hash256(raw[:])
+	prevhash := ExtractPrevBlockHashLE(raw)
+	merkleRoot := ExtractMerkleRootLE(raw)
 
 	return BitcoinHeader{
 		raw,
-		digestBE,
-		digestLE,
+		digest,
 		height,
-		prevhashBE,
-		prevhashLE,
-		merkleRootBE,
-		merkleRootLE,
+		prevhash,
+		merkleRoot,
 	}
 }
 
diff --git a/golang/btcspv/validate_spv.go b/golang/btcspv/validate_spv.go
index 2461410d..73cd4ef7 100644
--- a/golang/btcspv/validate_spv.go
+++ b/golang/btcspv/validate_spv.go
@@ -88,38 +88,20 @@ func ValidateHeaderChain(headers []byte) (sdk.Uint, error) {
 func (b BitcoinHeader) Validate() (bool, error) {
 	// Check that HashLE is the correct hash of the raw header
 	headerHash := Hash256(b.Raw[:])
-	if !bytes.Equal(headerHash[:], b.HashLE[:]) {
-		return false, errors.New("HashLE is not the correct hash of the header")
-	}
-
-	// Check that HashLE is the reverse of Hash
-	reversedHash := ReverseEndianness(b.Hash[:])
-	if !bytes.Equal(reversedHash, b.HashLE[:]) {
-		return false, errors.New("HashLE is not the LE version of Hash")
+	if !bytes.Equal(headerHash[:], b.Hash[:]) {
+		return false, errors.New("Hash is not the correct hash of the header")
 	}
 
 	// Check that the MerkleRootLE is the correct MerkleRoot for the header
 	extractedMerkleRootLE := ExtractMerkleRootLE(b.Raw)
-	if !bytes.Equal(extractedMerkleRootLE[:], b.MerkleRootLE[:]) {
-		return false, errors.New("MerkleRootLE is not the correct merkle root of the header")
-	}
-
-	// Check that MerkleRootLE is the reverse of MerkleRoot
-	reversedMerkleRoot := ReverseEndianness(b.MerkleRoot[:])
-	if !bytes.Equal(reversedMerkleRoot, b.MerkleRootLE[:]) {
-		return false, errors.New("MerkleRootLE is not the LE version of MerkleRoot")
+	if !bytes.Equal(extractedMerkleRootLE[:], b.MerkleRoot[:]) {
+		return false, errors.New("MerkleRoot is not the correct merkle root of the header")
 	}
 
 	// Check that PrevHash is the correct PrevHash for the header
 	extractedPrevHashLE := ExtractPrevBlockHashLE(b.Raw)
-	if bytes.Compare(extractedPrevHashLE[:], b.PrevHashLE[:]) != 0 {
-		return false, errors.New("PrevhashLE is not the correct parent hash of the header")
-	}
-
-	// Check that PrevHashLE is the reverse of Prevhash
-	reversedPrevHash := ReverseEndianness(b.PrevHash[:])
-	if !bytes.Equal(reversedPrevHash, b.PrevHashLE[:]) {
-		return false, errors.New("PrevhashLE is not the LE version of Prevhash")
+	if bytes.Compare(extractedPrevHashLE[:], b.PrevHash[:]) != 0 {
+		return false, errors.New("Prevhash is not the correct parent hash of the header")
 	}
 
 	return true, nil
@@ -141,7 +123,7 @@ func (s SPVProof) Validate() (bool, error) {
 
 	// Calculate the Tx ID and compare it to the one in SPVProof
 	txid := CalculateTxID(s.Version, s.Vin, s.Vout, s.Locktime)
-	if !bytes.Equal(txid[:], s.TxIDLE[:]) {
+	if !bytes.Equal(txid[:], s.TxID[:]) {
 		return false, errors.New("Version, Vin, Vout and Locktime did not yield correct TxID")
 	}
 
@@ -152,7 +134,7 @@ func (s SPVProof) Validate() (bool, error) {
 	}
 
 	// Check that the proof is valid
-	validProof := Prove(s.TxIDLE, s.ConfirmingHeader.MerkleRootLE, intermediateNodes, index)
+	validProof := Prove(s.TxID, s.ConfirmingHeader.MerkleRoot, intermediateNodes, index)
 	if !validProof {
 		return false, errors.New("Merkle Proof is not valid")
 	}
diff --git a/js/README.md b/js/README.md
index b6728923..f0552062 100644
--- a/js/README.md
+++ b/js/README.md
@@ -75,10 +75,11 @@ We have provided serialization methods for proofs with a single header in
 import * as ser from './src/ser'
 import * as ValidateSPV from './src/ValidateSPV'
 
-// An SPV Proof is an object comprised of version, vin, vout, locktime, tx_id, tx_id_le, index, intermediate_nodes and confirming_header
-// Confirming header is a bitcoin header object comprised of hash, hash_le, height, raw (the raw header), merkle_root, merkle_root_le, prevhash, and prevhash_le
+// An SPV Proof is an object comprised of version, vin, vout, locktime, tx_id, index, intermediate_nodes and confirming_header
+// Confirming Header is a bitcoin header object comprised of hash, height, raw (the raw header), merkle_root, and prevhash
+// Values inside an SPV Proof and Confirming Header are Little-Endian
 // This is an example of an SPV Proof stored in JSON
-const SPVProofJSON = "{\"version\": \"0x01000000\",\"vin\": \"0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff\", \"vout\": \"0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900\",\"locktime\": \"0x00000000\",\"tx_id\": \"0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651\",\"tx_id_le\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\",\"index\": 26,\"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\",\"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\",\"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\",\"height\": 592920,\"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\",\"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\",\"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\",\"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}"
+const SPVProofJSON = "{\"version\": \"0x01000000\",\"vin\": \"0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff\", \"vout\": \"0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900\",\"locktime\": \"0x00000000\",\"tx_id\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\",\"index\": 26,\"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\",\"confirming_header\": {\"hash\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\",\"height\": 592920,\"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\",\"merkle_root\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\",\"prevhash\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}"
 
 // deserializeSPVProof will parse the json, deserialize the values, and return an SPVProof object
 let SPVProof = ser.deserializeSPVProof(SPVProofJSON)
@@ -104,16 +105,16 @@ const PROOF_INDEX = 0;
 
 // calculateTxId takes in 4 values as Uint8Arrays: version, vin, vout, and locktime
 // calculateTxId returns the id as a Uint8Array
-let txid = ValidateSPV.calculateTxId(VERSION, VIN, VOUT, LOCKTIME);
+let txID = ValidateSPV.calculateTxId(VERSION, VIN, VOUT, LOCKTIME);
 
 let merkleRoot = BTCUtils.extractMerkleRootLE(HEADER_CHAIN);
-assert(ValidateSPV.prove(txid, merkleRoot, PROOF, PROOF_INDEX, 'Invalid inclusion proof');
+assert(ValidateSPV.prove(txID, merkleRoot, PROOF, PROOF_INDEX, 'Invalid inclusion proof');
 
 let totalDiff;
 try {
     totalDiff = ValidateSP.validateHeaderChain(HEADER_CHAIN);
     console.log(
-        `Verified ${utils.serializeHex(txid)} with ${totalDiff} total work`;
+        `Verified ${utils.serializeHex(txID)} with ${totalDiff} total work`;
     );
 } catch(e) {
     console.log(`Invalid header chain: ${e.message}`);
diff --git a/js/src/ValidateSPV.js b/js/src/ValidateSPV.js
index 956c11a7..054c4c32 100644
--- a/js/src/ValidateSPV.js
+++ b/js/src/ValidateSPV.js
@@ -99,7 +99,7 @@ export function validateHeaderWork(digest, target) {
  *
  * Checks validity of header chain
  *
- * @dev                   Compares current header prevHashLE to previous header's digest
+ * @dev                   Compares current header prevHash (LE) to previous header's digest
  * @param {Uint8Array}    header The raw bytes header
  * @param {Uint8Array}    prevHeaderDigest The previous header's digest
  * @returns {Boolean}     True if header chain is valid, false otherwise
@@ -174,38 +174,20 @@ export function validateHeaderChain(headers) {
 export function validateHeader(header) {
   // Check that HashLE is the correct hash of the raw header
   const headerHash = BTCUtils.hash256(header.raw);
-  if (!utils.typedArraysAreEqual(headerHash, header.hash_le)) {
-    throw new Error('HashLE is not the correct hash of the header');
+  if (!utils.typedArraysAreEqual(headerHash, header.hash)) {
+    throw new Error('Hash is not the correct hash of the header');
   }
 
-  // Check that HashLE is the reverse of Hash
-  const reversedHash = utils.reverseEndianness(header.hash);
-  if (!utils.typedArraysAreEqual(reversedHash, header.hash_le)) {
-    throw new Error('HashLE is not the LE version of Hash');
-  }
-
-  // Check that the MerkleRootLE is the correct MerkleRoot for the header
-  const extractedMerkleRootLE = BTCUtils.extractMerkleRootLE(header.raw);
-  if (!utils.typedArraysAreEqual(extractedMerkleRootLE, header.merkle_root_le)) {
-    throw new Error('MerkleRootLE is not the correct merkle root of the header');
-  }
-
-  // Check that MerkleRootLE is the reverse of MerkleRoot
-  const reversedMerkleRoot = utils.reverseEndianness(header.merkle_root);
-  if (!utils.typedArraysAreEqual(reversedMerkleRoot, header.merkle_root_le)) {
-    throw new Error('MerkleRootLE is not the LE version of MerkleRoot');
+  // Check that the MerkleRoot is the correct MerkleRoot for the header
+  const extractedMerkleRoot = BTCUtils.extractMerkleRootLE(header.raw);
+  if (!utils.typedArraysAreEqual(extractedMerkleRoot, header.merkle_root)) {
+    throw new Error('MerkleRoot is not the correct merkle root of the header');
   }
 
   // Check that PrevHash is the correct PrevHash for the header
   const extractedPrevHash = BTCUtils.extractPrevBlockLE(header.raw);
-  if (!utils.typedArraysAreEqual(extractedPrevHash, header.prevhash_le)) {
-    throw new Error('PrevhashLE is not the correct parent hash of the header');
-  }
-
-  // Check that PrevhashLE is the reverse of Prevhash
-  const reversedPrevhash = utils.reverseEndianness(header.prevhash);
-  if (!utils.typedArraysAreEqual(reversedPrevhash, header.prevhash_le)) {
-    throw new Error('PrevhashLE is not the LE version of Prevhash');
+  if (!utils.typedArraysAreEqual(extractedPrevHash, header.prevhash)) {
+    throw new Error('Prevhash is not the correct parent hash of the header');
   }
 
   return true;
@@ -227,12 +209,12 @@ export function validateProof(proof) {
     vin,
     vout,
     locktime,
-    tx_id_le: txIdLE,
+    tx_id: txID,
     index,
     intermediate_nodes: intermediateNodes,
     confirming_header: confirmingHeader
   } = proof;
-  const { merkle_root_le: merkleRootLE } = confirmingHeader;
+  const { merkle_root: merkleRoot } = confirmingHeader;
 
   const validVin = BTCUtils.validateVin(vin);
   if (!validVin) {
@@ -244,14 +226,14 @@ export function validateProof(proof) {
     throw new Error('Vout is not valid');
   }
 
-  const txID = calculateTxId(version, vin, vout, locktime);
-  if (!utils.typedArraysAreEqual(txID, txIdLE)) {
+  const calculatedTxID = calculateTxId(version, vin, vout, locktime);
+  if (!utils.typedArraysAreEqual(txID, calculatedTxID)) {
     throw new Error('Version, Vin, Vout and Locktime did not yield correct TxID');
   }
 
   validateHeader(confirmingHeader);
 
-  const validProof = prove(txIdLE, merkleRootLE, intermediateNodes, index);
+  const validProof = prove(txID, merkleRoot, intermediateNodes, index);
   if (!validProof) {
     throw new Error('Merkle Proof is not valid');
   }
diff --git a/js/src/ser.js b/js/src/ser.js
index 70afe83f..c56cd337 100644
--- a/js/src/ser.js
+++ b/js/src/ser.js
@@ -12,15 +12,12 @@ export function objectToHeader(o) {
   /* eslint-disable camelcase */
   const raw = utils.deserializeHex(o.raw);
   const hash = utils.deserializeHex(o.hash);
-  const hash_le = utils.deserializeHex(o.hash_le);
   const prevhash = utils.deserializeHex(o.prevhash);
-  const prevhash_le = utils.deserializeHex(o.prevhash_le);
   const merkle_root = utils.deserializeHex(o.merkle_root);
-  const merkle_root_le = utils.deserializeHex(o.merkle_root_le);
   if (raw.length !== 80) {
     throw new TypeError(`Expected 80 bytes, got ${raw.length} bytes`);
   }
-  [hash, hash_le, prevhash, prevhash_le, merkle_root, merkle_root_le].forEach((e) => {
+  [hash, prevhash, merkle_root].forEach((e) => {
     if (e.length !== 32) {
       throw new TypeError(`Expected 32 bytes, got ${e.length} bytes`);
     }
@@ -30,12 +27,9 @@ export function objectToHeader(o) {
   return {
     raw,
     hash,
-    hash_le,
     height: o.height,
     prevhash,
-    prevhash_le,
     merkle_root,
-    merkle_root_le
   };
 }
 
@@ -62,12 +56,9 @@ export function objectFromHeader(h) {
   return {
     raw: utils.serializeHex(h.raw),
     hash: utils.serializeHex(h.hash),
-    hash_le: utils.serializeHex(h.hash_le),
     height: h.height,
     prevhash: utils.serializeHex(h.prevhash),
-    prevhash_le: utils.serializeHex(h.prevhash_le),
     merkle_root: utils.serializeHex(h.merkle_root),
-    merkle_root_le: utils.serializeHex(h.merkle_root_le)
   };
 }
 
@@ -97,14 +88,11 @@ export function objectToSPVProof(o) {
   const vout = utils.deserializeHex(o.vout);
   const locktime = utils.deserializeHex(o.locktime);
   const tx_id = utils.deserializeHex(o.tx_id);
-  const tx_id_le = utils.deserializeHex(o.tx_id_le);
   const intermediate_nodes = utils.deserializeHex(o.intermediate_nodes);
 
-  [tx_id, tx_id_le].forEach((e) => {
-    if (e.length !== 32) {
-      throw new TypeError(`Expected 32 bytes, got ${e.length} bytes`);
-    }
-  });
+  if (tx_id.length !== 32) {
+    throw new TypeError(`Expected 32 bytes, got ${tx_id.length} bytes`);
+  }
 
   return {
     version,
@@ -112,7 +100,6 @@ export function objectToSPVProof(o) {
     vout,
     locktime,
     tx_id,
-    tx_id_le,
     index: o.index,
     intermediate_nodes,
     confirming_header: objectToHeader(o.confirming_header)
@@ -145,7 +132,6 @@ export function objectFromSPVProof(s) {
     vout: utils.serializeHex(s.vout),
     locktime: utils.serializeHex(s.locktime),
     tx_id: utils.serializeHex(s.tx_id),
-    tx_id_le: utils.serializeHex(s.tx_id_le),
     index: s.index,
     intermediate_nodes: utils.serializeHex(s.intermediate_nodes),
     confirming_header: objectFromHeader(s.confirming_header)
diff --git a/python/btcspv/ser.py b/python/btcspv/ser.py
index 444ed9e5..43e84fd4 100644
--- a/python/btcspv/ser.py
+++ b/python/btcspv/ser.py
@@ -15,12 +15,9 @@ def dict_from_relay_header(r: RelayHeader) -> dict:
     return {
         'raw': f"0x{r['raw'].hex()}",
         'hash': f"0x{r['hash'].hex()}",
-        'hash_le': f"0x{r['hash_le'].hex()}",
         'height': r['height'],
         'prevhash': f"0x{r['prevhash'].hex()}",
-        'prevhash_le': f"0x{r['prevhash_le'].hex()}",
         'merkle_root': f"0x{r['merkle_root'].hex()}",
-        'merkle_root_le': f"0x{r['merkle_root_le'].hex()}"
     }
 
 
@@ -44,12 +41,9 @@ def dict_to_relay_header(d: dict) -> RelayHeader:
     return RelayHeader(
         raw=bytes.fromhex(d['raw'][2:]),
         hash=bytes.fromhex(d['hash'][2:]),
-        hash_le=bytes.fromhex(d['hash_le'][2:]),
         height=d['height'],
         prevhash=bytes.fromhex(d['prevhash'][2:]),
-        prevhash_le=bytes.fromhex(d['prevhash_le'][2:]),
         merkle_root=bytes.fromhex(d['merkle_root'][2:]),
-        merkle_root_le=bytes.fromhex(d['merkle_root_le'][2:])
     )
 
 
@@ -76,7 +70,6 @@ def dict_from_spv_proof(s: SPVProof) -> dict:
         'vout': f"0x{s['vout'].hex()}",
         'locktime': f"0x{s['locktime'].hex()}",
         'tx_id': f"0x{s['tx_id'].hex()}",
-        'tx_id_le': f"0x{s['tx_id_le'].hex()}",
         'index': s['index'],
         'intermediate_nodes': f"0x{s['intermediate_nodes'].hex()}",
         'confirming_header': dict_from_relay_header(s['confirming_header'])
@@ -109,7 +102,6 @@ def dict_to_spv_proof(d: dict) -> SPVProof:
         vout=bytes.fromhex(d['vout'][2:]),
         locktime=bytes.fromhex(d['locktime'][2:]),
         tx_id=bytes.fromhex(d['tx_id'][2:]),
-        tx_id_le=bytes.fromhex(d['tx_id_le'][2:]),
         intermediate_nodes=bytes.fromhex(d['intermediate_nodes'][2:]),
         index=d['index'],
         confirming_header=dict_to_relay_header(d['confirming_header'])
diff --git a/python/btcspv/types.py b/python/btcspv/types.py
index aa412522..286e6e97 100644
--- a/python/btcspv/types.py
+++ b/python/btcspv/types.py
@@ -6,12 +6,9 @@
 class RelayHeader(TypedDict):
     raw: bytes
     hash: bytes
-    hash_le: bytes
     height: int
     prevhash: bytes
-    prevhash_le: bytes
     merkle_root: bytes
-    merkle_root_le: bytes
 
 
 class SPVProof(TypedDict):
@@ -21,7 +18,6 @@ class SPVProof(TypedDict):
     vout: bytes
     locktime: bytes
     tx_id: bytes
-    tx_id_le: bytes
     index: int
     intermediate_nodes: bytes
     confirming_header: RelayHeader
diff --git a/python/btcspv/validate_spv.py b/python/btcspv/validate_spv.py
index 61dfe59c..2afaf498 100644
--- a/python/btcspv/validate_spv.py
+++ b/python/btcspv/validate_spv.py
@@ -99,33 +99,19 @@ def validate_header(header: RelayHeader) -> bool:
     '''
     # Check that HashLE is the correct hash of the raw header
     header_hash = rutils.hash256(header['raw'])
-    if header_hash != header['hash_le']:
-        return False
-
-    # Check that HashLE is the reverse of Hash
-    reversed_hash = header['hash'][::-1]
-    if reversed_hash != header['hash_le']:
+    if header_hash != header['hash']:
         return False
 
     # Check that the MerkleRootLE is the correct MerkleRoot for the header
-    extracted_merkle_root_le = extract_merkle_root_le(header['raw'])
-    if extracted_merkle_root_le != header['merkle_root_le']:
-        return False
-
-    # Check that MerkleRootLE is the reverse of MerkleRoot
-    reversed_merkle_root = header['merkle_root'][::-1]
-    if reversed_merkle_root != header['merkle_root_le']:
+    extracted_merkle_root = extract_merkle_root_le(header['raw'])
+    if extracted_merkle_root != header['merkle_root']:
         return False
 
     # Check that PrevHash is the correct PrevHash for the header
-    extracted_prevhash_le = extract_prev_block_le(header['raw'])
-    if extracted_prevhash_le != header['prevhash_le']:
+    extracted_prevhash = extract_prev_block_le(header['raw'])
+    if extracted_prevhash != header['prevhash']:
         return False
 
-    # Check that PrevHashLE is the reverse of PrevHash
-    reversed_prevhash = header['prevhash'][::-1]
-    if reversed_prevhash != header['prevhash_le']:
-        return False
     return True
 
 
@@ -149,15 +135,15 @@ def validate_spvproof(proof: SPVProof) -> bool:
         proof['vout'] +
         proof['locktime']
     )
-    if tx_id != proof['tx_id_le']:
+    if tx_id != proof['tx_id']:
         return False
 
     if not validate_header(proof['confirming_header']):
         return False
 
     valid_proof = prove(
-        proof['tx_id_le'],
-        proof['confirming_header']['merkle_root_le'],
+        proof['tx_id'],
+        proof['confirming_header']['merkle_root'],
         proof['intermediate_nodes'],
         proof['index']
     )
diff --git a/rust/src/std_types.rs b/rust/src/std_types.rs
index de08f18a..0293e3c5 100644
--- a/rust/src/std_types.rs
+++ b/rust/src/std_types.rs
@@ -17,6 +17,7 @@ use crate::validatespv;
 pub type RawBytes = Vec<u8>;
 
 /// BitcoinHeader is a parsed Bitcoin header with height information appended.
+/// Values are LE
 #[derive(Clone, Deserialize, Serialize)]
 pub struct BitcoinHeader {
     /// The double-sha2 digest encoded BE.
@@ -25,23 +26,14 @@ pub struct BitcoinHeader {
     /// The 80-byte raw header.
     #[serde(with = "internal_ser::raw_ser")]
     pub raw: RawHeader,
-    /// The double-sha2 digest encoded LE.
-    #[serde(with = "internal_ser::digest_ser")]
-    pub hash_le: Hash256Digest,
     /// The height of the header
     pub height: u32,
     /// The double-sha2 digest of the parent encoded BE.
     #[serde(with = "internal_ser::digest_ser")]
     pub prevhash: Hash256Digest,
-    /// The double-sha2 digest of the parent encoded LE.
-    #[serde(with = "internal_ser::digest_ser")]
-    pub prevhash_le: Hash256Digest,
     /// The double-sha2 merkle tree root of the block transactions encoded BE.
     #[serde(with = "internal_ser::digest_ser")]
     pub merkle_root: Hash256Digest,
-    /// The double-sha2 merkle tree root of the block transactions encoded LE.
-    #[serde(with = "internal_ser::digest_ser")]
-    pub merkle_root_le: Hash256Digest,
 }
 
 impl BitcoinHeader {
@@ -56,24 +48,15 @@ impl BitcoinHeader {
     /// * Errors if any of the Bitcoin header elements are invalid.
     pub fn validate(&self) -> Result<(), SPVError> {
         let raw_as_slice = &self.raw[..];
-        if self.hash_le[..] != btcspv::hash256(&[raw_as_slice]) {
+        if self.hash[..] != btcspv::hash256(&[raw_as_slice]) {
             return Err(SPVError::WrongDigest);
         }
-        if self.hash_le[..] != utils::reverse_endianness(&self.hash.to_vec())[..] {
-            return Err(SPVError::NonMatchingDigests);
-        }
-        if self.merkle_root_le[..] != btcspv::extract_merkle_root_le(self.raw) {
+        if self.merkle_root[..] != btcspv::extract_merkle_root_le(self.raw) {
             return Err(SPVError::WrongMerkleRoot);
         }
-        if self.merkle_root_le[..] != utils::reverse_endianness(&self.merkle_root.to_vec())[..] {
-            return Err(SPVError::NonMatchingMerkleRoots);
-        }
-        if self.prevhash_le[..] != btcspv::extract_prev_block_hash_le(self.raw) {
+        if self.prevhash[..] != btcspv::extract_prev_block_hash_le(self.raw) {
             return Err(SPVError::WrongPrevHash);
         }
-        if self.prevhash_le[..] != utils::reverse_endianness(&self.prevhash.to_vec())[..] {
-            return Err(SPVError::NonMatchingPrevhashes);
-        }
         Ok(())
     }
 }
@@ -88,12 +71,9 @@ impl PartialEq for BitcoinHeader {
     fn eq(&self, other: &Self) -> bool {
         (self.raw[..] == other.raw[..]
             && self.hash == other.hash
-            && self.hash_le == other.hash_le
             && self.height == other.height
             && self.prevhash == other.prevhash
-            && self.prevhash_le == other.prevhash_le
-            && self.merkle_root == other.merkle_root
-            && self.merkle_root_le == other.merkle_root_le)
+            && self.merkle_root == other.merkle_root)
     }
 }
 
@@ -151,9 +131,6 @@ pub struct SPVProof {
     /// The tx id
     #[serde(with = "internal_ser::digest_ser")]
     pub tx_id: Hash256Digest,
-    /// The tx id in LE
-    #[serde(with = "internal_ser::digest_ser")]
-    pub tx_id_le: Hash256Digest,
     /// The transaction index
     pub index: u32,
     /// The confirming Bitcoin header
@@ -184,7 +161,7 @@ impl SPVProof {
 
         let tx_id =
             validatespv::calculate_txid(&self.version, &self.vin, &self.vout, &self.locktime);
-        if tx_id[..] != self.tx_id_le[..] {
+        if tx_id[..] != self.tx_id[..] {
             return Err(SPVError::WrongTxID);
         }
 
@@ -192,7 +169,7 @@ impl SPVProof {
 
         if !validatespv::prove(
             tx_id,
-            self.confirming_header.merkle_root_le,
+            self.confirming_header.merkle_root,
             &self.intermediate_nodes,
             self.index as u64,
         ) {
diff --git a/rust/src/utils.rs b/rust/src/utils.rs
index ddd7a012..63fa6703 100644
--- a/rust/src/utils.rs
+++ b/rust/src/utils.rs
@@ -177,14 +177,9 @@ pub mod test_utils {
             "Header bytes not multiple of 80" => SPVError::WrongLengthHeader,
             "Header does not meet its own difficulty target" => SPVError::InsufficientWork,
             "Header bytes not a valid chain" => SPVError::InvalidChain,
-            "HashLE is not the correct hash of the header" => SPVError::WrongDigest,
-            "HashLE is not the LE version of Hash" => SPVError::NonMatchingDigests,
-            "MerkleRootLE is not the LE version of MerkleRoot" => SPVError::NonMatchingMerkleRoots,
-            "MerkleRootLE is not the correct merkle root of the header" => {
-                SPVError::WrongMerkleRoot
-            }
-            "PrevhashLE is not the correct parent hash of the header" => SPVError::WrongPrevHash,
-            "PrevhashLE is not the LE version of Prevhash" => SPVError::NonMatchingPrevhashes,
+            "Hash is not the correct hash of the header" => SPVError::WrongDigest,
+            "MerkleRoot is not the correct merkle root of the header" => SPVError::WrongMerkleRoot,
+            "Prevhash is not the correct parent hash of the header" => SPVError::WrongPrevHash,
             "Vin is not valid" => SPVError::InvalidVin,
             "Vout is not valid" => SPVError::InvalidVout,
             "Version, Vin, Vout and Locktime did not yield correct TxID" => SPVError::WrongTxID,


Test patch:
diff --git a/golang/btcspv/types_test.go b/golang/btcspv/types_test.go
index c7c2a58b..fc156018 100644
--- a/golang/btcspv/types_test.go
+++ b/golang/btcspv/types_test.go
@@ -97,12 +97,9 @@ func (suite *TypesSuite) TestMarshalSPVProof() {
 	json.Unmarshal([]byte(valid[0]), &spvProof)
 
 	// Extra assertions here will catch random broken stuff
-	suite.Equal(
-		"74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651",
-		hex.EncodeToString(spvProof.TxID[:]))
 	suite.Equal(
 		"5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674",
-		hex.EncodeToString(spvProof.TxIDLE[:]))
+		hex.EncodeToString(spvProof.TxID[:]))
 	suite.Equal(uint32(26), spvProof.Index)
 	// TODO: assert header equalities
 	suite.Equal(384, len(spvProof.IntermediateNodes))
@@ -197,7 +194,7 @@ func (suite *TypesSuite) TestValidateSPVProof() {
 	invalidHeader.ConfirmingHeader.MerkleRoot = Hash256Digest{0xdd, 0xe2, 0x5e, 0x5d, 0x1c, 0xb2, 0x9a, 0xc6, 0xc0, 0x8b, 0xe7, 0x37, 0x83, 0x73, 0xc6, 0x46, 0xad, 0x18, 0xfc, 0x90, 0xb1, 0x44, 0x35, 0xa9, 0x2a, 0xc8, 0xab, 0x42, 0x28, 0xc9, 0x1a, 0xb6}
 	invalidProof, validationErr := invalidHeader.Validate()
 	suite.Equal(invalidProof, false)
-	suite.EqualError(validationErr, "MerkleRootLE is not the LE version of MerkleRoot")
+	suite.EqualError(validationErr, "MerkleRoot is not the correct merkle root of the header")
 
 	invalidProofs := suite.Fixtures.InvalidProofs
 
diff --git a/js/test/ser.test.js b/js/test/ser.test.js
index 2a880d35..4dd733ae 100644
--- a/js/test/ser.test.js
+++ b/js/test/ser.test.js
@@ -6,7 +6,16 @@ import * as utils from '../src/utils';
 import * as vectors from '../../testProofs.json';
 
 const vectorObj = JSON.parse(JSON.stringify(vectors));
-const { valid, validHeader } = vectorObj;
+const {
+  valid,
+  validHeader,
+  errBadHexBytes,
+  errBadHexHash256,
+  errBadLenHash256,
+  errBadHexRawHeader,
+  errBadLenRawHeader,
+  errBadLenHash
+} = vectorObj;
 
 const { assert } = chai;
 
@@ -17,8 +26,6 @@ describe('ser', () => {
       const proof = ser.deserializeSPVProof(e);
 
       // TODO: make more assertions and clean up this section
-      assert.equal(proof.tx_id_le.length, 32);
-      assert.isFalse(utils.typedArraysAreEqual(proof.tx_id_le, emptyDigest));
       assert.equal(proof.tx_id.length, 32);
       assert.isFalse(utils.typedArraysAreEqual(proof.tx_id, emptyDigest));
 
@@ -35,47 +42,47 @@ describe('ser', () => {
         proof.tx_id,
         secondProof.tx_id
       ));
-      assert.isTrue(utils.typedArraysAreEqual(
-        proof.tx_id_le,
-        secondProof.tx_id_le
-      ));
     });
   });
 
   it('can round-trip serialize Bitcoin header', () => {
-    const emptyDigest = new Uint8Array(32);
     validHeader.forEach((e) => {
       const header = ser.deserializeHeader(e);
 
-      // TODO: make more assertions and clean up this section
-      assert.equal(header.hash.length, 32);
-      assert.isFalse(utils.typedArraysAreEqual(header.hash, emptyDigest));
-      assert.equal(header.hash_le.length, 32);
-      assert.isFalse(utils.typedArraysAreEqual(header.hash_le, emptyDigest));
+      // length assertions
+      assert.equal(header.raw.length, 80);
+      assert.isFalse(utils.typedArraysAreEqual(header.hash, new Uint8Array(80)));
+
+      const len32 = [header.hash, header.prevhash, header.merkle_root];
+      len32.forEach((f) => {
+        assert.equal(f.length, 32);
+        assert.isFalse(utils.typedArraysAreEqual(f, new Uint8Array(32)));
+      });
 
       // re-serialize and re-deserialize
       const jsonHeaderString = ser.serializeHeader(header);
       const secondHeader = ser.deserializeHeader(jsonHeaderString);
 
-      // TODO: make more assertions and clean up this section
-      assert.isTrue(utils.typedArraysAreEqual(
-        header.hash,
-        secondHeader.hash
-      ));
-      assert.isTrue(utils.typedArraysAreEqual(
-        header.hash_le,
-        secondHeader.hash_le
-      ));
-      assert.isTrue(utils.typedArraysAreEqual(
-        header.raw,
-        secondHeader.raw
-      ));
+      // round-trip equality assertions
+      Object.keys(header).forEach((key) => {
+        if (header[key] instanceof Uint8Array) {
+          assert.isTrue(utils.typedArraysAreEqual(
+            header[key],
+            secondHeader[key]
+          ));
+        } else {
+          assert.equal(
+            header[key],
+            secondHeader[key]
+          );
+        }
+      });
     });
   });
 
   it('errBadHexBytes', () => {
     try {
-      ser.deserializeSPVProof(vectorObj.errBadHexBytes);
+      ser.deserializeSPVProof(errBadHexBytes);
       assert(false, 'expected an error');
     } catch (e) {
       assert.include(e.message, 'Error deserializing hex, got non-hex byte:');
@@ -84,7 +91,7 @@ describe('ser', () => {
 
   it('errBadHexHash256', () => {
     try {
-      ser.deserializeSPVProof(vectorObj.errBadHexHash256);
+      ser.deserializeSPVProof(errBadHexHash256);
       assert(false, 'expected an error');
     } catch (e) {
       assert.include(e.message, 'Error deserializing hex, got non-hex byte:');
@@ -93,7 +100,7 @@ describe('ser', () => {
 
   it('errBadLenHash256', () => {
     try {
-      ser.deserializeSPVProof(vectorObj.errBadLenHash256);
+      ser.deserializeSPVProof(errBadLenHash256);
       assert(false, 'expected an error');
     } catch (e) {
       assert.include(e.message, 'Expected 32 bytes, got 31 bytes');
@@ -102,7 +109,7 @@ describe('ser', () => {
 
   it('errBadHexRawHeader', () => {
     try {
-      ser.deserializeSPVProof(vectorObj.errBadHexRawHeader);
+      ser.deserializeSPVProof(errBadHexRawHeader);
       assert(false, 'expected an error');
     } catch (e) {
       assert.include(e.message, 'Error deserializing hex, got non-hex byte:');
@@ -111,7 +118,7 @@ describe('ser', () => {
 
   it('errBadLenRawHeader', () => {
     try {
-      ser.deserializeSPVProof(vectorObj.errBadLenRawHeader);
+      ser.deserializeSPVProof(errBadLenRawHeader);
       assert(false, 'expected an error');
     } catch (e) {
       assert.include(e.message, 'Expected 80 bytes, got 79 bytes');
@@ -120,7 +127,7 @@ describe('ser', () => {
 
   it('errBadLenHash', () => {
     try {
-      ser.deserializeSPVProof(vectorObj.errBadLenHash);
+      ser.deserializeSPVProof(errBadLenHash);
       assert(false, 'expected an error');
     } catch (e) {
       assert.include(e.message, 'Expected 32 bytes, got 31 bytes');
diff --git a/python/btcspv/test/test_validate_spv.py b/python/btcspv/test/test_validate_spv.py
index 5c43c44c..0011d90a 100644
--- a/python/btcspv/test/test_validate_spv.py
+++ b/python/btcspv/test/test_validate_spv.py
@@ -121,7 +121,7 @@ def test_validate_spvproof(self):
 
         invalid_header_proof = self.valid_proofs[0].copy()
         invalid_header_proof['confirming_header'][
-            'merkle_root_le'
+            'merkle_root'
         ] = bytes.fromhex(
             'c61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd'
         )
diff --git a/solidity/test/BTCUtils.test.js b/solidity/test/BTCUtils.test.js
index 0e5b237f..d3feb5f4 100644
--- a/solidity/test/BTCUtils.test.js
+++ b/solidity/test/BTCUtils.test.js
@@ -39,7 +39,6 @@ const {
   validateVin,
   validateVout,
   determineOutputLength,
-  determineOutputLengthError,
   extractOutputAtIndex,
   extractOutputAtIndexError,
   extractMerkleRootLE,
diff --git a/testProofs.json b/testProofs.json
index a181747a..7d194480 100644
--- a/testProofs.json
+++ b/testProofs.json
@@ -1,38 +1,32 @@
 {
     "valid": [
-        "{\"version\": \"0x01000000\",\"vin\": \"0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff\", \"vout\": \"0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900\",\"locktime\": \"0x00000000\",\"tx_id\": \"0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651\",\"tx_id_le\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\",\"index\": 26,\"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\",\"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\",\"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\",\"height\": 592920,\"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\",\"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\",\"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\",\"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}"
+        "{\"version\": \"0x01000000\",\"vin\": \"0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff\", \"vout\": \"0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900\",\"locktime\": \"0x00000000\",\"tx_id\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\",\"index\": 26,\"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\",\"confirming_header\": {\"hash\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\",\"height\": 592920,\"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\",\"merkle_root\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\",\"prevhash\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}"
     ],
     "validHeader": [
-        "{\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\",\"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\",\"height\": 592920,\"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\",\"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\",\"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\",\"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\", \"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}"
+        "{\"hash\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\",\"height\": 592920,\"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\",\"merkle_root\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\",\"prevhash\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}"
     ],
-    "errBadHexBytes": "{\"tx_id\": \"0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651\", \"tx_id_le\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\", \"index\": 26, \"intermediate_nodes\": \"0xQd7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
-    "errBadHexHash256": "{\"tx_id\": \"0xR4d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651\", \"tx_id_le\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\", \"index\": 26, \"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
-    "errBadLenHash256": "{\"tx_id\": \"0xd6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651\", \"tx_id_le\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\", \"index\": 26, \"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
+    "errBadHexBytes": "{\"tx_id\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\", \"index\": 26, \"intermediate_nodes\": \"0xQd7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
+    "errBadHexHash256": "{\"tx_id\": \"0xR176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\", \"index\": 26, \"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
+    "errBadLenHash256": "{\"tx_id\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d6\", \"index\": 26, \"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
     "errBadHexHash160": "\"0xr000000000000000000000000000000000000000\"",
     "errBadLenHash160": "\"0x11111111111111111111111111111111111111\"",
-    "errBadHexRawHeader": "{\"tx_id\": \"0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651\", \"tx_id_le\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\", \"index\": 26, \"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0xS000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
-    "errBadLenRawHeader": "{\"tx_id\": \"0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651\", \"tx_id_le\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\", \"index\": 26, \"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0x00c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
-    "errBadLenHash": "{\"version\": \"0x01000000\",\"vin\": \"0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff\", \"vout\": \"0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900\",\"locktime\": \"0x00000000\",\"tx_id\": \"0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651\",\"tx_id_le\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\",\"index\": 26,\"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\",\"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c\",\"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\",\"height\": 592920,\"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\",\"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\",\"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\",\"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
+    "errBadHexRawHeader": "{\"tx_id\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\", \"index\": 26, \"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0xS000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
+    "errBadLenRawHeader": "{\"tx_id\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\", \"index\": 26, \"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\", \"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d\", \"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\", \"height\": 592920, \"raw\": \"0x00c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\", \"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\", \"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\", \"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
+    "errBadLenHash": "{\"version\": \"0x01000000\",\"vin\": \"0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff\", \"vout\": \"0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900\",\"locktime\": \"0x00000000\",\"tx_id\": \"0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674\",\"index\": 26,\"intermediate_nodes\": \"0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d\",\"confirming_header\": {\"hash\": \"0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c\",\"hash_le\": \"0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000\",\"height\": 592920,\"raw\": \"0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84\",\"merkle_root\": \"0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6\",\"merkle_root_le\": \"0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd\",\"prevhash\": \"0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2\",\"prevhash_le\": \"0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000\"}}",
     "badHeaders": [
-        {"header": {"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","hash": "0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d", "hash_le": "0x5d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"prevhash": "0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2","prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000","merkle_root": "0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd"},"e": "HashLE is not the correct hash of the header"},
+        {"header": {"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","hash": "0x5d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"prevhash": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000","merkle_root": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd"},"e": "Hash is not the correct hash of the header"},
 
-        {"header": {"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","hash": "0x10000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d", "hash_le": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"prevhash": "0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2","prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000","merkle_root": "0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd"},"e": "HashLE is not the LE version of Hash"},
+        {"header": {"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","hash": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"prevhash": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000","merkle_root": "0xa61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd"},"e": "MerkleRoot is not the correct merkle root of the header"},
 
-        {"header": {"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","hash": "0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d", "hash_le": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"prevhash": "0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2","prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000","merkle_root": "0xcde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd"},"e": "MerkleRootLE is not the LE version of MerkleRoot"},
-
-        {"header": {"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","hash": "0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d", "hash_le": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"prevhash": "0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2","prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000","merkle_root": "0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xa61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd"},"e": "MerkleRootLE is not the correct merkle root of the header"},
-
-        {"header": {"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","hash": "0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d", "hash_le": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"prevhash": "0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2", "prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000001","merkle_root": "0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd"},"e": "PrevhashLE is not the correct parent hash of the header"},
-
-        {"header": {"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","hash": "0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d", "hash_le": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"prevhash": "0x10000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2", "prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000","merkle_root": "0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd"},"e": "PrevhashLE is not the LE version of Prevhash"}
+        {"header": {"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","hash": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"prevhash": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000001","merkle_root": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd"},"e": "Prevhash is not the correct parent hash of the header"}
     ],
     "badSPVProofs": [
-        {"proof": {"version": "0x01000000","vin": "0x011746bd867400f3494b8f44c24b83e1aa58c4f0ff25b4a61cffeffd4bc0f9ba300000000000ffffff", "vout": "0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900","locktime": "0x00000000","tx_id": "0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651","tx_id_le": "0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674","index": 26,"intermediate_nodes": "0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d","confirming_header": {"hash": "0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d","hash_le": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","merkle_root": "0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd","prevhash": "0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2", "prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000"}},"e": "Vin is not valid"},
+        {"proof": {"version": "0x01000000","vin": "0x011746bd867400f3494b8f44c24b83e1aa58c4f0ff25b4a61cffeffd4bc0f9ba300000000000ffffff", "vout": "0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900","locktime": "0x00000000","tx_id": "0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674","index": 26,"intermediate_nodes": "0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d","confirming_header": {"hash": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","merkle_root": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd", "prevhash": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000"}},"e": "Vin is not valid"},
 
-        {"proof": {"version": "0x01000000","vin": "0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff", "vout": "0x004897070000000000220020a4333e5612ab1a1043b25755c89b16d55184a42f81799e623e6bc39db8539c180000000000000000166a14edb1b5c2f39af0fec151732585b1049b07895211","locktime": "0x00000000","tx_id": "0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651","tx_id_le": "0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674","index": 26,"intermediate_nodes": "0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d","confirming_header": {"hash": "0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d","hash_le": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","merkle_root": "0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd","prevhash": "0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2", "prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000"}},"e": "Vout is not valid"},
+        {"proof": {"version": "0x01000000","vin": "0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff", "vout": "0x004897070000000000220020a4333e5612ab1a1043b25755c89b16d55184a42f81799e623e6bc39db8539c180000000000000000166a14edb1b5c2f39af0fec151732585b1049b07895211","locktime": "0x00000000","tx_id": "0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674","index": 26,"intermediate_nodes": "0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d","confirming_header": {"hash": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","merkle_root": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd","prevhash": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000"}},"e": "Vout is not valid"},
 
-        {"proof": {"version": "0x01000000","vin": "0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff", "vout": "0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900","locktime": "0x10000000","tx_id": "0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651","tx_id_le": "0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674","index": 26,"intermediate_nodes": "0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d","confirming_header": {"hash": "0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d","hash_le": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","merkle_root": "0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd","prevhash": "0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2", "prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000"}},"e": "Version, Vin, Vout and Locktime did not yield correct TxID"},
+        {"proof": {"version": "0x01000000","vin": "0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff", "vout": "0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900","locktime": "0x10000000","tx_id": "0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674","index": 26,"intermediate_nodes": "0x8d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d","confirming_header": {"hash": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","merkle_root": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd","prevhash": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000"}},"e": "Version, Vin, Vout and Locktime did not yield correct TxID"},
 
-        {"proof": {"version": "0x01000000","vin": "0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff", "vout": "0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900","locktime": "0x00000000","tx_id": "0x74d6d6dc1fc9b0f393abde12e76adeeb3d674b38b7fbea4d9fc28b3bb0f67651","tx_id_le": "0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674","index": 26,"intermediate_nodes": "0x9d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d","confirming_header": {"hash": "0x00000000000000000016633b88de22bd6462283bcf7dcbe559233baaf5fb0c4d","hash_le": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","merkle_root": "0xdde25e5d1cb29ac6c08be7378373c646ad18fc90b14436a92ac8ab4228c91ab6","merkle_root_le": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd","prevhash": "0x00000000000000000001103ad2a8ce7e7d2d9459edb26a3497728b3001b638c2", "prevhash_le": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000"}},"e": "Merkle Proof is not valid"}
+        {"proof": {"version": "0x01000000","vin": "0x0101748906a5c7064550a594c4683ffc6d1ee25292b638c4328bb66403cfceb58a000000006a4730440220364301a77ee7ae34fa71768941a2aad5bd1fa8d3e30d4ce6424d8752e83f2c1b02203c9f8aafced701f59ffb7c151ff2523f3ed1586d29b674efb489e803e9bf93050121029b3008c0fa147fd9db5146e42b27eb0a77389497713d3aad083313d1b1b05ec0ffffffff", "vout": "0x0316312f00000000001976a91400cc8d95d6835252e0d95eb03b11691a21a7bac588ac220200000000000017a914e5034b9de4881d62480a2df81032ef0299dcdc32870000000000000000166a146f6d6e69000000000000001f0000000315e17900","locktime": "0x00000000","tx_id": "0x5176f6b03b8bc29f4deafbb7384b673debde6ae712deab93f3b0c91fdcd6d674","index": 26,"intermediate_nodes": "0x9d7a6d53ce27f79802631f1aae5f172c43d128b210ab4962d488c81c96136cfb75c95def872e878839bd93b42c04eb44da44c401a2d580ca343c3262e9c0a2819ed4bbfb9ea620280b31433f43b2512a893873b8c8c679f61e1a926c0ec80bcfc6225a15d72fbd1116f78b14663d8518236b02e765bf0a746a6a08840c122a02afa4df3ab6b9197a20f00495a404ee8e07da2b7554e94609e9ee1d5da0fb7857ea0332072568d0d53a9aedf851892580504a7fcabfbdde076242eb7f4e5f218a14d2a3f357d950b4f6a1dcf93f7c19c44d0fc122d00afa297b9503c1a6ad24cf36cb5f2835bcf490371db2e96047813a24176c3d3416f84b7ddfb7d8c915eb0c5ce7de089b5d9e700ecd12e09163f173b70bb4c9af33051b466b1f55abd66f3121216ad0ad9dfa898535e1d5e51dd07bd0a73d584daace7902f20ece4ba4f4f241c80cb31eda88a244a3c68d0f157c1049b4153d7addd6548aca0885acafbf98a1f8345c89914c24729ad095c7a0b9acd20232ccd90dbd359468fcc4eee7b67d","confirming_header": {"hash": "0x4d0cfbf5aa3b2359e5cb7dcf3b286264bd22de883b6316000000000000000000","height": 592920,"raw": "0x0000c020c238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000b61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2ddd6376d5d3e211a17d8706a84","merkle_root": "0xb61ac92842abc82aa93644b190fc18ad46c6738337e78bc0c69ab21c5d5ee2dd","prevhash": "0xc238b601308b7297346ab2ed59942d7d7ecea8d23a1001000000000000000000"}},"e": "Merkle Proof is not valid"}
     ]
 }